.melody-scene{display:flex;flex-direction:column;height:100%;min-height:0;background:linear-gradient(#1d3d39,#101a2e);color:#fff;text-align:center}
.melody-scene>header{padding:18px 12px 10px;flex:none;border-bottom:2px solid #6bb58b;background:linear-gradient(#305b49,#183a34)}
.melody-scene header small{font-size:11px;letter-spacing:1px;color:#bcf3ce}
.melody-scene h1{font-size:clamp(23px,6vw,32px);line-height:1.1;margin:7px 0;color:#fff0b2;text-shadow:0 3px #14261c}
.melody-scene header p{margin:0;font-size:14px;color:#bfe9d0}
.melody-scene__body{flex:1;min-height:0;overflow:auto}
.melody-scene__stage.rehearsal-stage{isolation:isolate;height:auto;min-height:0;max-height:none;aspect-ratio:748/434;border-top:0;--stage-border-color:#62dc76}
.melody-scene__background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.melody-scene__intro{margin:16px auto 8px;padding:0 18px;max-width:480px;font-size:16px;line-height:1.35}
.melody-scene__performer{color:#b2e9ca;font-size:13px;padding:0 12px}
.melody-scene progress{width:80%;height:8px;accent-color:#6deaa2}
.melody-scene [data-melody-status]{font-size:13px;min-height:20px;margin:8px 14px;color:#ffe4a0}
.melody-scene footer{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 14px max(18px,env(safe-area-inset-bottom));border-top:2px solid #538d73;background:#112b28}
.melody-scene button{min-height:50px;border:3px solid #bcf6cf;border-radius:13px;background:linear-gradient(#73d995,#2c9c69);box-shadow:inset 0 3px #ffffff40,0 4px #115136;font:900 14px/1.1 "Baloo 2",sans-serif;color:#102e24;padding:10px 7px;cursor:pointer}
.melody-scene [data-melody-continue]{background:linear-gradient(#ffe78c,#edb143);border-color:#fff1ac;box-shadow:inset 0 3px #ffffff40,0 4px #795326;color:#38260c}
.melody-scene button:disabled{opacity:.5;cursor:wait}

.melody-scene__quality{margin:14px 16px 8px;text-align:left}
/* Same rehearsal palette and costume tier components; only static decoration. */
.melody-scene{background:#091c20}
.melody-scene>header{padding:16px 14px 12px;background:linear-gradient(155deg,#163c30,#091c20);border-bottom:2px solid #62dc76;box-shadow:inset 0 3px #ffffff0d}
.melody-scene>header h1{font-size:clamp(24px,6.5vw,32px);line-height:1.02;margin:9px 0;color:#fff0b2;text-shadow:0 2px #09271c}
.melody-scene>header p{display:inline-block;padding:4px 10px;border:1px solid #62dc7666;border-radius:7px;background:#0c281f;color:#caffd2;font-size:12px;font-weight:900}
.melody-scene__recording{margin:14px 12px 0;padding:10px 12px 0;border:1px solid #3c5875;border-radius:12px;background:#10243f;box-shadow:0 3px 0 #06111e;text-align:left}
.melody-scene__quality{margin:0}
.melody-scene__quality .costume-proposals__tier{grid-template-columns:auto minmax(0,1fr) auto;margin-bottom:10px}
.melody-scene__quality .costume-proposals__tier-copy{gap:3px}
.melody-scene__recording .melody-scene__intro{margin:10px 0 14px;padding:0;font-size:14px;line-height:1.35;color:#dce6f7}
.melody-scene__track{display:flex;justify-content:space-between;gap:8px;color:#a4cbb4;font-size:10px;font-weight:900;letter-spacing:.04em;margin-bottom:5px}
.melody-scene progress{display:block;width:100%;height:12px;overflow:hidden;appearance:none;border:1px solid #4d805c;border-radius:5px;background:#091b18;box-shadow:inset 0 2px 3px #0008}
.melody-scene progress::-webkit-progress-bar{background:#091b18}
.melody-scene progress::-webkit-progress-value{background:linear-gradient(#c6ffd0,#70e58a 38%,#187c3b)}
.melody-scene progress::-moz-progress-bar{background:linear-gradient(#c6ffd0,#70e58a 38%,#187c3b)}
.melody-scene [data-melody-status]{margin:8px 0 10px;font-size:12px;line-height:1.3;min-height:16px;color:#ffe4a0}
.melody-scene__advice{margin:14px 16px 18px;padding-left:10px;border-left:3px solid #62dc76;text-align:left}
.melody-scene__advice strong{color:#70df83;font-size:12px;letter-spacing:.04em}
.melody-scene__advice p{margin:4px 0 0;color:#b6c8c1;font-size:13px;line-height:1.35}
@media(max-height:700px){.melody-scene>header{padding-top:10px}.melody-scene>header small{font-size:10px}.melody-scene>header h1{font-size:23px;margin:6px 0}.melody-scene__recording{margin-top:10px}}

html body .melody-scene button.modal-action[data-melody-continue]{position:relative;padding-inline:28px}
.melody-scene [data-melody-continue] > span{position:absolute;right:12px;top:50%;transform:translateY(-50%)}

.melody-scene__score{display:grid;justify-items:center;align-content:center;min-width:48px;padding:6px 7px;border:1px solid var(--costume-tier);border-radius:9px;color:var(--costume-tier);background:linear-gradient(145deg,var(--costume-tier-dark),#080e21);box-shadow:inset 0 1px rgba(255,255,255,.25),0 2px 0 #050d1b;text-align:center}
.melody-scene__score[hidden]{display:none}
.melody-scene__score strong{font-size:clamp(17px,4.5vw,21px);font-weight:900;line-height:1;text-shadow:0 2px 2px #000}
.melody-scene__score small{margin-top:3px;font-size:6px;font-weight:900;letter-spacing:.06em;line-height:1}
.melody-scene__quality .costume-proposals__tier-copy strong{line-height:1.2}

/* Same foreground framing as the repertoire author and the costumes shopkeeper. */
.melody-scene__stage > .melody-scene__guitarist{
 position:absolute;z-index:10;top:-4%;bottom:auto;left:82%;width:120%;height:120%;
 display:none;object-fit:contain;object-position:center bottom;
 transform:translateX(-50%);transform-origin:center bottom;
 filter:drop-shadow(0 7px 5px rgba(0,0,0,.48));pointer-events:none;
}
.melody-scene.is-playing .melody-scene__guitarist{--offset:-50%;display:block;animation:cuartetoSpeakingSquash .8s ease-in-out infinite}
.melody-scene.is-playing .melody-scene__performer-in-cast{visibility:hidden}
@media(prefers-reduced-motion:reduce){.melody-scene.is-playing .melody-scene__guitarist{animation:none}}
