/* Recorded gestures keep the illustrated atlas for fallback and the final bow. */
.musician-clip{display:none;width:100%;height:100%;pointer-events:none}
.soloist.clip-ready:not([data-frame="3"]){background-size:0 0}
.soloist.clip-ready:not([data-frame="3"]) .musician-clip{display:block}

/* One clear result, with details available in the existing ranking dialog. */
#overlay-eyebrow:empty,#launch-hint:empty,#rank-caption:empty{display:none}
.result-stats{display:flex;flex-direction:column;gap:12px}
.current-score{width:100%;padding:16px;border-radius:20px}
.current-score strong{font-size:clamp(38px,4.5vw,58px)}
.current-score>span{font:14px 'Segoe UI',sans-serif}
.success-badge{background:transparent;border:0;padding:0;font-size:17px}
.personal-score,.result-rank{width:100%;display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:14px}
.personal-score strong,.result-rank strong{font:700 19px 'Segoe UI',sans-serif;color:var(--teal)}
.run-ranking{gap:8px}
.result-rank{border-top:1px solid #d7bc8f;padding-top:12px}
.ranking-actions .text-button{font-size:12px;min-height:32px}
.overlay-actions{margin-top:4px}
@media(max-width:600px) and (orientation:portrait){
 .current-score strong{font-size:48px}
}
@media(max-height:550px) and (orientation:landscape){
 .result-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}
 .current-score{grid-row:1/3;padding:9px}
 .current-score strong{font-size:38px}
 .success-badge{font-size:15px}
 .personal-score{gap:5px;font-size:12px}
 .personal-score strong,.result-rank strong{font-size:16px}
 .result-rank{padding-top:7px;font-size:13px}
 .run-ranking{gap:0}
 .ranking-actions .text-button{min-height:24px;padding:3px;font-size:11px}
}
@media(prefers-reduced-motion:reduce){.musician-canvas{display:none!important}}

/* A single row of backlit silhouettes, with fixed velvet theatre seats. */
.audience{position:absolute;left:0;right:0;bottom:-2px;height:25%;min-height:50px;max-height:130px;display:flex;align-items:flex-end;justify-content:center;z-index:3;pointer-events:none;background:linear-gradient(transparent 76%,#1a0c1caa)}
.spectator{position:relative;width:8.333%;height:100%;max-width:105px;flex:none}
.spectator svg{position:absolute;bottom:0;display:block;width:100%;height:auto;overflow:visible}
.audience-person{filter:drop-shadow(0 -1px 1px #ef9a4366)}
@media(max-width:600px) and (orientation:portrait){
 .audience{height:21%;min-height:65px;max-height:95px}
 .spectator{width:16.667%;max-width:none}
 .spectator:nth-child(n+7){display:none}
}
@media(max-height:550px) and (orientation:landscape){
 .audience{height:29%;min-height:30px;max-height:60px}
 .spectator{max-width:60px}
 .spectator svg{height:100%}
}

/* The recital ends in place. Only this small results panel appears; the score,
   stage, performer, audience and controls retain their playing geometry. */
.concert-stage[data-state=finished] .overlay{inset:10px 10px auto auto;width:clamp(220px,27%,330px);padding:0;background:none;align-items:flex-start;justify-content:flex-end;pointer-events:none}
.concert-stage[data-state=finished] .launch-card{width:100%;max-width:none;max-height:none;padding:18px;gap:9px;border-radius:20px;pointer-events:auto;box-shadow:inset 0 0 0 3px #fff5df,0 7px 24px #240b2033}
.concert-stage[data-state=finished] .launch-card h2{font-size:26px}
.concert-stage[data-state=finished] #overlay-copy{display:none}
.concert-stage[data-state=finished] .result-stats{display:flex;gap:8px}
.concert-stage[data-state=finished] .current-score{padding:10px;border-radius:14px}
.concert-stage[data-state=finished] .current-score strong{font-size:38px}
.concert-stage[data-state=finished] .current-score>span{font-size:11px}
.concert-stage[data-state=finished] .success-badge{font-size:13px}
.concert-stage[data-state=finished] .personal-score,.concert-stage[data-state=finished] .result-rank{font-size:12px;gap:8px}
.concert-stage[data-state=finished] .personal-score strong,.concert-stage[data-state=finished] .result-rank strong{font-size:15px}
.concert-stage[data-state=finished] .result-rank{padding-top:8px}
.concert-stage[data-state=finished] .run-ranking{gap:2px}
.concert-stage[data-state=finished] .ranking-actions .text-button{min-height:30px;font-size:11px;padding:3px}
.concert-stage[data-state=finished] .overlay-actions{flex-direction:column;align-items:stretch;gap:9px;margin:0}
.concert-stage[data-state=finished] .overlay-actions .primary-button,.concert-stage[data-state=finished] .overlay-actions .paper-button{font-size:14px;min-height:44px;padding:8px}
#stage-reaction.thanks{top:1%;left:62%;font-size:clamp(18px,2.1vw,27px);padding:6px 12px;border:1px solid #e9bd76;border-radius:16px;background:#fff0d9;color:#652f36;text-shadow:none;white-space:nowrap}
@media(max-width:600px) and (orientation:portrait){
 /* The upper-right of the staff has room for the panel without covering the solo. */
 .concert-stage[data-state=finished] .overlay{top:5px;right:5px;width:62%}
 .concert-stage[data-state=finished] .launch-card{padding:9px 11px;gap:4px;border-radius:16px}
 .concert-stage[data-state=finished] .launch-card h2{display:none}
 .concert-stage[data-state=finished] .result-stats{gap:4px}
 .concert-stage[data-state=finished] .current-score{display:flex;align-items:center;justify-content:center;gap:8px;padding:3px}
 .concert-stage[data-state=finished] .current-score strong{font-size:27px}
 .concert-stage[data-state=finished] .current-score>span{font-size:10px;max-width:50px}
 .concert-stage[data-state=finished] .success-badge{display:none}
 .concert-stage[data-state=finished] .personal-score,.concert-stage[data-state=finished] .result-rank{font-size:11px}
 .concert-stage[data-state=finished] .personal-score strong,.concert-stage[data-state=finished] .result-rank strong{font-size:13px}
 .concert-stage[data-state=finished] .result-rank{padding-top:3px}
 .concert-stage[data-state=finished] .ranking-actions .text-button{min-height:26px;font-size:10px}
 .concert-stage[data-state=finished] .overlay-actions{gap:6px}
 .concert-stage[data-state=finished] .overlay-actions .primary-button,.concert-stage[data-state=finished] .overlay-actions .paper-button{min-height:40px;padding:6px 3px;font-size:12px}
 #stage-reaction.thanks{left:68%;top:3%;font-size:18px;padding:5px 9px}
}
@media(max-width:600px) and (max-height:700px) and (orientation:portrait){
 .concert-stage[data-state=finished] .overlay{width:80%}
 .concert-stage[data-state=finished] .launch-card{display:grid;grid-template-columns:1fr 1fr;padding:7px 10px;gap:5px 8px}
 .concert-stage[data-state=finished] .result-stats{display:contents}
 .concert-stage[data-state=finished] .current-score{grid-column:1/-1}
 .concert-stage[data-state=finished] .personal-score,.concert-stage[data-state=finished] .result-rank{font-size:9px;gap:4px}
 .concert-stage[data-state=finished] .personal-score strong,.concert-stage[data-state=finished] .result-rank strong{font-size:11px}
 .concert-stage[data-state=finished] .result-rank{padding:0;border:0}
 .concert-stage[data-state=finished] .ranking-actions{display:none}
 .concert-stage[data-state=finished] .overlay-actions{grid-column:1/-1;flex-direction:row;gap:6px}
 .concert-stage[data-state=finished] .overlay-actions .primary-button,.concert-stage[data-state=finished] .overlay-actions .paper-button{flex:1;min-height:44px;padding:4px;font-size:11px}
}
@media(max-height:550px) and (orientation:landscape){
 .concert-stage[data-state=finished] .overlay{top:0;right:6px;width:28%;min-width:210px}
 .concert-stage[data-state=finished] .launch-card{padding:7px 10px;gap:3px;border-radius:14px}
 .concert-stage[data-state=finished] .launch-card h2{font-size:19px}
 .concert-stage[data-state=finished] .result-stats{gap:3px}
 .concert-stage[data-state=finished] .current-score{display:flex;align-items:center;justify-content:center;gap:8px;padding:3px}
 .concert-stage[data-state=finished] .current-score strong{font-size:26px}
 .concert-stage[data-state=finished] .current-score>span{font-size:10px}
 .concert-stage[data-state=finished] .success-badge{display:none}
 .concert-stage[data-state=finished] .personal-score,.concert-stage[data-state=finished] .result-rank{font-size:10px}
 .concert-stage[data-state=finished] .personal-score strong,.concert-stage[data-state=finished] .result-rank strong{font-size:12px}
 .concert-stage[data-state=finished] .result-rank{padding-top:3px}
 .concert-stage[data-state=finished] .ranking-actions .text-button{min-height:24px;font-size:10px;padding:2px}
 .concert-stage[data-state=finished] .overlay-actions{flex-direction:row;gap:5px}
 .concert-stage[data-state=finished] .overlay-actions .primary-button,.concert-stage[data-state=finished] .overlay-actions .paper-button{flex:1;min-height:36px;padding:4px;font-size:11px}
 #stage-reaction.thanks{left:58%;top:2%;font-size:14px;padding:4px 7px}
}
