/* Concert rendering is isolated from menus, stories, and scoring. */
html body #modal:has(> .modal-card > #modalContent > .concert-scene){padding:0!important;align-items:stretch!important;justify-content:stretch!important;background:#080706!important}
html body #modal:has(> .modal-card > #modalContent > .concert-scene) .modal-card{position:relative!important;width:100%!important;max-width:none!important;height:100dvh!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#130c08!important;overflow:hidden!important;box-sizing:border-box}
html body #modal:has(> .modal-card > #modalContent > .concert-scene) #modalContent{position:relative!important;display:block!important;padding:0!important;margin:0!important;height:100%!important;max-height:none!important;overflow:hidden!important}
#modalContent:has(> .concert-scene)>:not(.concert-scene):not([data-preserve-concert]){display:none!important}
#modal:has(> .modal-card > #modalContent > .concert-scene) .modal-close{display:none!important}
html body #modal .concert-scene{--gold:#f6d69a;--ink:#271506;position:relative;isolation:isolate;width:100%;height:100%;min-height:300px;overflow:hidden;color:#fae6bc;background:#1e150f url('../assets/concert-room.webp') center 28%/cover no-repeat;font-family:Georgia,'Noto Serif JP','Yu Mincho',serif;touch-action:manipulation}
.concert-scene::before{content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;background:linear-gradient(90deg,#130c08a0,transparent 35%,transparent 65%,#130c08a0),linear-gradient(#0b090b88,transparent 25%,#120b0622 65%,#0b0603bb);box-shadow:inset 0 0 80px #0008}
.concert-header{position:absolute;top:max(18px,env(safe-area-inset-top));left:4%;right:4%;height:18%;z-index:8;pointer-events:none}
#modal .concert-back{pointer-events:auto;position:absolute;left:0;top:0;width:44px;height:44px;min-height:44px;border:1px solid #e9c787;border-radius:50%;background:#1c1209d9;color:#f7dfb0;font:32px/30px Georgia;box-shadow:0 0 0 3px #281e1255;touch-action:manipulation}
.concert-title{position:absolute;left:62px;top:0;text-align:left;max-width:52%;text-shadow:0 2px 8px #000}
.concert-title small{font:9px/1.4 Georgia;letter-spacing:.25em;color:#d9b979}
#modal .concert-title h2{color:#ffebc5!important;font:clamp(20px,3.1vw,38px)/1.2 Georgia,'Yu Mincho',serif!important;margin:4px 0 6px!important;padding:0 0 8px!important;border-bottom:1px solid #caa56388;letter-spacing:.08em;white-space:normal}
.concert-title p{font-size:clamp(10px,1.3vw,15px)!important;margin:0!important;color:#e4d3b2}
.concert-hud{position:absolute;right:0;top:0;text-align:right;font-variant-numeric:tabular-nums;text-shadow:0 2px 12px #000;min-width:115px}
.concert-hud>div{margin-bottom:12px}
.concert-hud small{display:block;font:11px Georgia;letter-spacing:.15em;color:#dfc69a}
.concert-hud b{display:block;font:clamp(22px,3.5vw,40px)/1.15 Georgia;letter-spacing:.06em;font-weight:normal;color:#ffe9b9}
.concert-hud>div+div{border-top:1px solid #d0a35b77;padding-top:9px}
.concert-motto{position:absolute;left:5%;top:31%;z-index:2;color:#f5dbaa;font-size:clamp(15px,2.2vw,24px);line-height:1.8;font-style:italic;text-shadow:0 2px 12px #000;pointer-events:none}
.concert-motto span{display:block;font:8px/1.8 Georgia;letter-spacing:.23em;border-top:1px solid #b69a6555;margin-top:12px;padding-top:12px}
.concert-runway{position:absolute;left:14%;width:72%;top:23%;height:52%;z-index:3}
html body #modal .concert-scene #rhythmStage{position:absolute!important;inset:0!important;height:100%!important;min-height:0!important;width:100%!important;margin:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;overflow:visible!important;transform:none!important}
#modal .concert-scene .rhythm-lanes,#modal .concert-scene .rhythm-lane{display:contents!important;transform:none!important}
#modal .concert-scene .lane-note-name,#modal .concert-scene .practice-level-corner,#modal .concert-scene .rhythm-hit-zone,#modal .concert-scene .falling-note>span,#modal .concert-scene .falling-note>small,#modal .concert-scene .falling-note-sustain,#modal .concert-scene .canon-perspective-grid,#modal .concert-scene .canon-vanishing-point{display:none!important}
/* v0.80.665 — 4-corner clipping follows the procedural note grid exactly.
   BOTH images are full-bleed/opaque, not premasked art with transparent edges.
   The image is never geometrically stretched and orientation changes the asset,
   not the score positions, notes, number of lanes, or keyboard controls. */
#modal .concert-scene .concert-wood-texture{
 position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;
 clip-path:polygon(38% 6%,62% 6%,98% 96%,2% 96%);
 -webkit-clip-path:polygon(38% 6%,62% 6%,98% 96%,2% 96%);
}
#modal .concert-scene .concert-wood-picture{
 position:absolute;inset:0;display:block;width:100%;height:100%;
}
#modal .concert-scene .concert-wood-image{
 position:absolute;inset:0;width:100%;height:100%;display:block;
 object-fit:cover;object-position:center center;
 /* This file has no transparent margins, even at the very edges. */
 filter:saturate(.94) contrast(1.04) brightness(.92);
}
#modal .concert-scene .concert-wood-texture::after{
 content:'';position:absolute;inset:0;pointer-events:none;
 background:linear-gradient(180deg,rgba(20,9,2,.25),transparent 33%,rgba(14,5,1,.08) 88%);
}
.concert-grid{position:absolute;inset:0;z-index:1;width:100%;height:100%;overflow:visible;pointer-events:none;filter:drop-shadow(0 2px 4px #0008)}
.concert-grid line{vector-effect:non-scaling-stroke;stroke:#dc9a43;stroke-width:1;filter:drop-shadow(0 0 3px #faba68)}
.concert-grid .edge{stroke:#ffd890;stroke-width:2}
.concert-grid .division{stroke:#f4b962;stroke-opacity:.72}
#modal .concert-scene .falling-note,#modal .concert-scene .concert-bass-note{position:absolute!important;z-index:4;min-width:0!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important;border:1px solid #fff2c7!important;border-radius:3px!important;background:linear-gradient(#fffdf0,#ffe8a0 55%,#e1a244)!important;box-shadow:0 0 5px #fff5cd,0 0 14px #ffb53baa,0 5px 8px #0008!important;pointer-events:none;transition:none!important;animation:none!important;transform-origin:center!important;box-sizing:border-box}
#modal .concert-scene .concert-bass-note{background:linear-gradient(#f4ffff,#7dddff 55%,#2085bd)!important;border-color:#c6f8ff!important;box-shadow:0 0 7px #c5f6ff,0 0 19px #42bdeb88!important}
.concert-note-tail{position:absolute;bottom:65%;left:32%;width:36%;background:linear-gradient(0deg,#ffdc9cc9,#c68b3522);border-left:1px solid #ffde9299;border-right:1px solid #ffde9299;z-index:-1;pointer-events:none;transform-origin:bottom}
.concert-bass-note .concert-note-tail{background:linear-gradient(0deg,#72dfffbb,#127db722);border-color:#a0ecff88}
.concert-strike{position:absolute;left:2%;width:96%;top:96%;height:2px;z-index:6;background:#fff1c3;box-shadow:0 0 5px 2px #ffd28e,0 0 18px 5px #ffb83d66;pointer-events:none}
.concert-strike::after{content:'';position:absolute;inset:-12px 0;background:linear-gradient(transparent,#f8c06c44,transparent)}
.concert-flare{position:absolute;top:0;width:85px;height:85px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(#fff9de 0 5%,#ffcf8a88 15%,transparent 65%);border:1px solid #f5d09299;animation:concert-bloom .48s ease-out forwards}
@keyframes concert-bloom{from{scale:.3;opacity:1}to{scale:1.5;opacity:0}}
.concert-console{position:absolute;left:9%;right:9%;top:76%;height:10%;z-index:4;padding:12px 5% 5px;box-sizing:border-box;border:3px ridge #a16d36;background:linear-gradient(95deg,#2b1308,#845023 48%,#341909);box-shadow:0 -5px 0 #27170e,0 -7px 0 #c1843b,0 10px 20px #0009;pointer-events:none}
.console-inscription{position:absolute;top:1px;left:0;right:0;text-align:center;color:#e3b968;font:7px Georgia;letter-spacing:.27em}
.console-manual{display:flex;height:calc((100% - 10px)/3);gap:1px;padding:0 4px;margin:1px 0 2px;background:#150e08;box-shadow:0 2px 0 #120a05,0 -1px 0 #ba824044;transform-origin:center bottom;will-change:transform,filter}
.console-manual[data-manual="1"]{transform:perspective(260px) rotateX(14deg) scaleX(.94);filter:brightness(.78);box-shadow:0 1px 0 #0b0704,0 -1px 0 #9f6c3433}
.console-manual[data-manual="2"]{transform:perspective(260px) rotateX(12deg) scaleX(.97);filter:brightness(.9);box-shadow:0 2px 0 #0f0905,0 -1px 0 #b87b3b44}
.console-manual[data-manual="3"]{transform:perspective(260px) rotateX(9deg) scaleX(1);filter:brightness(1.04);box-shadow:0 2px 0 #120a05,0 -1px 0 #cf955255}
.console-manual i{position:relative;flex:1;background:linear-gradient(#b2a384,#ffedc8 45%,#dbc297);border-radius:0 0 1px 1px;box-shadow:inset 0 -2px #8e7449}
.console-manual[data-manual="1"] i{background:linear-gradient(#968a73,#dbc9a7 48%,#b9a27e)}
.console-manual[data-manual="2"] i{background:linear-gradient(#aa9b80,#f0dcb8 46%,#cbb18a)}
.console-manual .has-sharp::after{content:'';position:absolute;right:-30%;top:0;width:55%;height:64%;background:linear-gradient(90deg,#070504,#3d2d20,#100b06);z-index:1;border-bottom:2px solid #060403;box-shadow:1px 1px 1px #0008}
.concert-controls{position:absolute;left:15.44%;width:69.12%;top:87%;height:10%;display:grid;grid-template-columns:repeat(var(--controls),minmax(0,1fr));gap:6px;z-index:7;perspective:900px}
#modal .concert-scene .rhythm-keys{display:contents!important}
#modal .concert-scene .rhythm-key,#modal .concert-scene [data-pedal-key]{position:relative!important;display:flex!important;flex-direction:column;justify-content:center;align-items:center;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;padding:0!important;margin:0!important;box-sizing:border-box!important;touch-action:none;user-select:none;-webkit-user-select:none;border-radius:9px!important;border:2px solid #f5d8a2!important;background:linear-gradient(110deg,#c8a364,#ffebbe 27%,#edcc8e 80%,#b48b4b)!important;color:#67421d!important;box-shadow:inset 0 0 0 3px #f9e4b577,inset 0 -7px 0 #b18b48,0 5px 0 #493019,0 7px 0 #ab7639,0 10px 15px #0008!important;transform:rotateX(9deg);transition:filter .09s,box-shadow .09s!important}
#modal .concert-scene .rhythm-key b{font:clamp(11px,2vw,20px) Georgia!important;color:#68451f!important;white-space:nowrap;writing-mode:horizontal-tb}
#modal .concert-scene .rhythm-key small{font:10px Georgia!important;color:#866333!important}
#modal .concert-scene .rhythm-key::before{content:'❧';font:15px Georgia;position:absolute;top:3%;color:#b58b4855}
#modal .concert-scene .rhythm-key.hit,#modal .concert-scene .rhythm-key.holding{background:linear-gradient(#fff5d5,#f2c87b)!important;transform:translateY(3px);box-shadow:inset 0 -3px #ac803e,0 2px 0 #583f21,0 0 25px #ffcd7777!important}
#modal .concert-scene #practicePedal{display:contents!important}
#modal .concert-scene [data-pedal-panel]{display:contents!important}
#modal .concert-scene [data-pedal-key]{background:linear-gradient(110deg,#4a7981,#c5e9e3 35%,#8bbbbb)!important;border-color:#b7e9ed!important;color:#163c47!important;box-shadow:inset 0 0 0 3px #daffff33,inset 0 -7px #4b7c86,0 5px #1e343d,0 7px #af7638!important}
#modal .concert-scene [data-pedal-key].holding{transform:translateY(3px);background:linear-gradient(#e0ffff,#67cfe8)!important;box-shadow:0 0 24px #62d8f1,inset 0 -3px #5794a1!important}
#modal .concert-scene .pedal-track,#modal .concert-scene [data-pedal-cue],#modal .concert-scene [data-pedal-intro]{display:none!important}
#modal .concert-scene .pedal-heading{position:static!important;color:#1c4850!important;font:clamp(11px,1.5vw,17px) Georgia!important}
#modal .concert-scene .pedal-pc-hint{display:block;font-size:9px}
#modal .concert-scene .practice-countdown{z-index:9;top:45%!important;color:#ffe7a9!important;text-shadow:0 0 25px #d28d32;background:none!important}
#modal .concert-scene .practice-judgement-flash{top:38%!important;left:50%;z-index:9;font-family:Georgia;pointer-events:none}
#modal .concert-scene .practice-judgement-flash small{display:none!important}
#modal .concert-scene .practice-performance-curtain{display:none!important}
#modal .concert-scene .concert-start{position:absolute;z-index:12;left:50%;top:48%;width:min(330px,82%);transform:translate(-50%,-50%);padding:20px!important;border:1px solid #c6a36c;border-radius:14px;background:#1c140de8!important;box-shadow:0 10px 70px #000a;box-sizing:border-box;text-align:center}
#modal .concert-scene .concert-start p{display:block!important;color:#ecd8b2;font-size:12px!important;line-height:1.8}
#modal .concert-scene .concert-start button{background:linear-gradient(#f4deaa,#b98b45)!important;border:1px solid #f8dfa6!important;color:#3b2611!important;min-height:44px!important;box-shadow:0 3px #654823!important}
#modal .concert-scene .concert-start small{color:#cab794!important;font-size:10px!important}
#modal.practice-live-input .concert-scene .concert-start,#modal.practice-live-input .concert-scene .duet-mode,#modal.practice-live-input .concert-orientation{display:none!important}
.concert-scene .duet-mode{position:absolute;bottom:17%;z-index:13;left:50%;transform:translateX(-50%);padding:4px 8px;background:#20190eeb;color:#e8d3ae;border-radius:8px;white-space:nowrap;font:12px Georgia}
.concert-scene .duet-mode select{color:#ead5a9;background:#261c12;border:1px solid #ab8b54;padding:5px;border-radius:5px}
.concert-orientation{position:absolute;left:0;right:0;bottom:24%;text-align:center;z-index:12;color:#cbbb9e;font:10px Georgia;pointer-events:none}
.concert-progress{position:absolute;bottom:0;left:0;right:0;height:2px;z-index:8;background:#a9804122}
.concert-progress i{display:block;height:100%;width:0;background:#e9c483;box-shadow:0 0 9px #d1a253}
.concert-bass-held .concert-strike{box-shadow:0 0 5px 2px #ffd28e,-20px 0 24px 7px #8adeff77}
@media(orientation:portrait){
 .concert-header{top:max(16px,env(safe-area-inset-top));height:22%;left:5%;right:5%}
 .concert-title{left:50px;right:0;max-width:none;text-align:center;padding-right:40px}
 #modal .concert-title h2{font-size:clamp(17px,5vw,29px)!important}
 .concert-hud{top:105px;right:0}.concert-hud b{font-size:27px}.concert-hud small{font-size:9px}.concert-hud>div{margin-bottom:7px}.concert-hud>div+div{padding-top:6px}
 .concert-motto{top:19%;left:6%;font-size:16px;line-height:1.8}.concert-motto span{font-size:7px;margin-top:7px;padding-top:7px}
 .concert-runway{left:1%;width:98%;top:29%;height:43%}
 .concert-console{left:2%;right:2%;top:73%;height:12%;padding-top:14px}
 .concert-controls{left:2.96%;width:94.08%;top:87%;height:10%;gap:5px}
 #modal .concert-scene .rhythm-key b{font-size:13px!important}.concert-scene .duet-mode{bottom:18%}
}
/* The image is already opaque edge to edge; no per-key or landscape scaling.
   Exact edge match is guaranteed by CSS mask and SVG using the same vertices. */
@media(orientation:landscape) and (max-height:480px){.concert-header{top:10px}.concert-title small{font-size:7px}.concert-title p{font-size:10px!important}#modal .concert-title h2{font-size:20px!important}.concert-hud b{font-size:23px}.concert-hud small{font-size:9px}.concert-hud>div{margin-bottom:5px}.concert-hud>div+div{padding-top:4px}.concert-motto{font-size:15px}.concert-controls{top:85%;height:13%}.concert-console{top:74%;height:9%;padding:8px 5% 2px}.console-manual{height:calc((100% - 4px)/3);margin:0 0 1px}.console-inscription{font-size:5px}.concert-runway{top:20%;height:53%}#modal .concert-scene .rhythm-key b{font-size:12px!important}#modal .concert-scene .rhythm-key::before{display:none}.concert-orientation{bottom:26%}}
@media(pointer:coarse){#modal .concert-scene .rhythm-key small,#modal .concert-scene .pedal-pc-hint{display:none!important}}
@media(prefers-reduced-motion:reduce){.concert-flare{animation:none;opacity:.5;width:36px;height:36px;border:0}#modal .concert-scene .rhythm-key,#modal .concert-scene [data-pedal-key]{transition:none!important}}
#modal .concert-scene .falling-note,#modal .concert-scene .concert-bass-note{opacity:0!important}

#modal .concert-scene .rhythm-key b{font-size:clamp(8px,1.1vw,14px)!important;white-space:normal;overflow-wrap:anywhere;line-height:1.15!important}#modal .concert-scene .rhythm-key::before{display:none}#modal .concert-scene .concert-controls{gap:2px}#modal .concert-scene .pedal-heading{font-size:clamp(8px,1vw,13px)!important}#modal .concert-scene .rhythm-key,#modal .concert-scene [data-pedal-key]{border-width:1px!important;border-radius:4px!important}

/* v0.80.286 — organ resonance feedback layer */
.concert-pipe-glow{
 position:absolute;z-index:1;pointer-events:none;left:24%;right:24%;top:4%;height:31%;
 opacity:var(--pipe-glow,0);
 background:
   radial-gradient(ellipse at 50% 18%,rgba(255,244,210,.25) 0 7%,rgba(246,210,122,.14) 20%,transparent 58%),
   repeating-linear-gradient(90deg,transparent 0 5%,rgba(216,154,60,.13) 5.4% 6.5%,transparent 7% 11%);
 filter:blur(8px) brightness(1);
 mix-blend-mode:screen;
 transition:opacity 1500ms cubic-bezier(.2,.65,.25,1),filter 1500ms ease-out;
}
.concert-pipe-glow.is-breathing{animation:concert-pipe-breathe 1.15s ease-in-out infinite}
.concert-pipe-glow.perfect-breathe{animation:concert-pipe-perfect 620ms ease-out both}
.concert-pipe-glow.fx-combo-break{filter:blur(14px) brightness(.72)}
@keyframes concert-pipe-breathe{0%,100%{filter:blur(8px) brightness(1)}50%{filter:blur(8.5px) brightness(1.23)}}
@keyframes concert-pipe-perfect{0%{filter:blur(8px) brightness(1)}28%{filter:blur(7px) brightness(1.55)}100%{filter:blur(8px) brightness(1)}}
.concert-hud [data-concert-combo].combo-lift{animation:concert-combo-lift 300ms ease-out}
@keyframes concert-combo-lift{0%{transform:scale(1)}45%{transform:scale(1.09);text-shadow:0 0 12px #f6d27a}100%{transform:scale(1)}}

.concert-return-fx{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:5;pointer-events:none;mix-blend-mode:screen}
.concert-return-fx path{fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.concert-return-fx.grade-perfect .beam-core{
 stroke:#fff6d8;stroke-width:calc(3.6px * var(--combo-beam-scale,1));
 filter:drop-shadow(0 0 3px #fff2cc) drop-shadow(0 0 9px #f6d27a) drop-shadow(0 0 17px #d89a3c99);
 stroke-dasharray:.19 1;stroke-dashoffset:.20;animation:concert-return-perfect 430ms cubic-bezier(.2,.72,.2,1) forwards;
}
.concert-return-fx.grade-perfect .beam-ghost{
 stroke:#f6d27a;stroke-width:calc(3.0px * var(--combo-beam-scale,1));opacity:.30;
 stroke-dasharray:.17 1;stroke-dashoffset:.20;filter:blur(6px) drop-shadow(0 0 10px #d89a3c88);
 animation:concert-return-perfect 500ms cubic-bezier(.2,.72,.2,1) forwards;
}
.concert-return-fx.grade-perfect .ghost-1{opacity:.16;filter:blur(10px);animation-delay:70ms}
.concert-return-fx.grade-perfect .ghost-2{opacity:.07;filter:blur(14px);animation-delay:140ms}
.concert-return-fx.grade-perfect .ghost-3{opacity:.04;filter:blur(16px);animation-delay:210ms}
.concert-return-fx.grade-great .beam-core{
 stroke:#efd293;stroke-width:2.2px;opacity:.58;filter:drop-shadow(0 0 5px #e1aa57aa);
 stroke-dasharray:.24 1;stroke-dashoffset:.24;animation:concert-return-great 215ms ease-out forwards;
}
.concert-return-fx.release .release-line{
 stroke:#fff4d2;stroke-width:1.7px;opacity:.72;filter:drop-shadow(0 0 6px #f1c66a99);
 stroke-dasharray:.14 1;stroke-dashoffset:.14;animation:concert-return-release 210ms ease-out forwards;
}
@keyframes concert-return-perfect{0%{stroke-dashoffset:.20;opacity:0}12%{opacity:1}78%{opacity:.92}100%{stroke-dashoffset:-1.04;opacity:0}}
@keyframes concert-return-great{0%{stroke-dashoffset:.24;opacity:0}18%{opacity:.58}100%{stroke-dashoffset:-.66;opacity:0}}
@keyframes concert-return-release{0%{stroke-dashoffset:.14;opacity:0}20%{opacity:.72}100%{stroke-dashoffset:-1;opacity:0}}
.concert-pipe-arrival{position:absolute;z-index:6;width:36px;height:36px;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;background:radial-gradient(circle,#fff9e7 0 6%,#f6d27a99 18%,#d89a3c44 38%,transparent 70%);filter:blur(.2px);animation:concert-pipe-arrival 560ms ease-out forwards}
@keyframes concert-pipe-arrival{0%{scale:.25;opacity:0}25%{scale:.72;opacity:.9}100%{scale:1.45;opacity:0}}

#modal .concert-scene .rhythm-key.fx-key-perfect{animation:concert-key-perfect 290ms ease-out!important}
#modal .concert-scene .rhythm-key.fx-key-great{animation:concert-key-great 230ms ease-out!important}
#modal .concert-scene .rhythm-key.fx-key-good{animation:concert-key-good 175ms ease-out!important}
#modal .concert-scene .rhythm-key.fx-key-miss{animation:concert-key-miss 600ms ease-out!important}
@keyframes concert-key-perfect{0%{filter:brightness(1)}30%{filter:brightness(1.34);box-shadow:inset 0 0 0 3px #fff6d899,inset 0 -7px #b18b48,0 5px #493019,0 7px #ab7639,0 0 24px #f6d27aaa!important}100%{filter:brightness(1)}}
@keyframes concert-key-great{0%{filter:brightness(1)}35%{filter:brightness(1.18);box-shadow:inset 0 0 0 3px #efd29366,inset 0 -7px #b18b48,0 5px #493019,0 7px #ab7639,0 0 13px #d89a3c77!important}100%{filter:brightness(1)}}
@keyframes concert-key-good{0%{filter:brightness(1)}42%{filter:brightness(1.10)}100%{filter:brightness(1)}}
@keyframes concert-key-miss{0%{filter:brightness(.85) saturate(.78)}35%{filter:brightness(.72) saturate(.68)}100%{filter:brightness(1) saturate(1)}}

.concert-flare.grade-perfect{background:radial-gradient(#fff9de 0 6%,#f6d27aaa 18%,#d89a3c44 43%,transparent 69%);animation-duration:.50s}
.concert-flare.grade-great{width:56px;height:56px;background:radial-gradient(#fff3d9 0 6%,#d9b67277 22%,transparent 66%);animation-duration:.34s;opacity:.62}
.concert-flare.grade-good{width:34px;height:34px;background:radial-gradient(#ead6a955 0 10%,transparent 64%);animation-duration:.22s;opacity:.38}
.concert-miss-puff{position:absolute;top:0;width:54px;height:28px;transform:translate(-50%,-50%);pointer-events:none;border-radius:50%;background:radial-gradient(ellipse,#c89a6329 0 30%,transparent 72%);filter:blur(8px);animation:concert-miss-puff 610ms ease-out forwards}
.concert-miss-puff::after{content:'';position:absolute;inset:-5px;background:radial-gradient(ellipse,#c89a6310 0 32%,transparent 74%);filter:blur(14px)}
@keyframes concert-miss-puff{0%{opacity:.45;transform:translate(-50%,-50%) scale(.72)}35%{opacity:.28}100%{opacity:0;transform:translate(-50%,-58%) scale(1.18)}}

#modal .concert-scene .falling-note.fx-hold-breathe{filter:brightness(1);animation:concert-hold-head-breathe 1.05s ease-in-out infinite!important}
#modal .concert-scene .falling-note.fx-hold-breathe .concert-note-tail{animation:concert-hold-tail-breathe 1.05s ease-in-out infinite}
@keyframes concert-hold-head-breathe{0%,100%{filter:brightness(1);box-shadow:0 0 5px #fff5cd,0 0 14px #ffb53baa,0 5px 8px #0008!important}50%{filter:brightness(.92);box-shadow:0 0 4px #fff5cdaa,0 0 10px #f1c66a77,0 5px 8px #0008!important}}
@keyframes concert-hold-tail-breathe{0%,100%{opacity:1;filter:brightness(1);transform:scaleX(1)}50%{opacity:.78;filter:brightness(.92);transform:scaleX(.94)}}

.concert-hold-break-fx{position:absolute;z-index:7;display:block;transform:translateX(-50%);height:20px;pointer-events:none;animation:concert-hold-break-shell 840ms cubic-bezier(.2,.65,.25,1) forwards}
.concert-hold-break-fx .hold-break-head{position:absolute;inset:0;border:1px solid #e2c995;border-radius:3px;background:linear-gradient(#fff6df,#e2c995 58%,#b98a52);box-shadow:0 0 6px #e2c99599,0 0 13px #b98a5266;animation:concert-hold-break-head 820ms ease-out forwards}
.concert-hold-break-fx .hold-break-tail{position:absolute;bottom:65%;left:32%;width:36%;transform-origin:bottom center;background:linear-gradient(0deg,#e2c995b8,#b98a5222);border-left:1px solid #e2c99577;border-right:1px solid #e2c99577;animation:concert-hold-break-tail 820ms cubic-bezier(.2,.65,.25,1) forwards}
@keyframes concert-hold-break-shell{0%{opacity:.60}18%{opacity:.56}42%{opacity:.43}70%{opacity:.20}100%{opacity:0}}
@keyframes concert-hold-break-head{0%{opacity:.60;filter:blur(0) brightness(1)}18%{opacity:.54;filter:blur(1px) brightness(.96)}42%{opacity:.38;filter:blur(3px) brightness(.88)}70%{opacity:.18;filter:blur(7px) brightness(.78)}100%{opacity:0;filter:blur(12px) brightness(.68)}}
@keyframes concert-hold-break-tail{
 0%{opacity:.60;transform:scaleX(1) scaleY(1);filter:blur(0)}
 18%{opacity:.52;transform:scaleX(.84) scaleY(.97);filter:blur(2px)}
 42%{opacity:.38;transform:scaleX(.58) scaleY(.88);filter:blur(5px)}
 70%{opacity:.20;transform:scaleX(.28) scaleY(.72);filter:blur(9px)}
 100%{opacity:0;transform:scaleX(.08) scaleY(.58);filter:blur(14px)}
}

@media(prefers-reduced-motion:reduce){
 .concert-pipe-glow.is-breathing{animation:none}
 .concert-return-fx path,.concert-pipe-arrival,.concert-miss-puff,.concert-hold-break-fx,#modal .concert-scene .falling-note.fx-hold-breathe,#modal .concert-scene .falling-note.fx-hold-breathe .concert-note-tail{animation-duration:1ms!important;animation-iteration-count:1!important}
}

/* v0.80.410: same-beat harmony is visible without adding a new mode. */
#modal .falling-note.chord-part{background:linear-gradient(135deg,#fff5ce,#ddb777)!important;border-color:#f5d58a!important;box-shadow:0 0 12px rgba(224,180,76,.50)!important}
#modal .falling-note.chord-melody{outline:2px solid #e7b950;outline-offset:1px}
#modal .falling-note.chord-part small{font-weight:700!important}
#modal .rhythm-key{touch-action:manipulation;-webkit-user-select:none;user-select:none}
@media(pointer:coarse){#modal.practice-streamlined-modal .rhythm-key{touch-action:none;min-width:0}}


/* v0.80.411: final touch-target pass (no new gameplay modes).
 * Preserve one lane per note and its corresponding key. No horizontally scrolled
 * keybed: stage/key alignment remains identical at every viewport width.
 */
@media (orientation:portrait) and (max-width:600px){
 html[data-responsive-profile="mobile-portrait"] body #modal.practice-streamlined-modal:has(.concert-scene) .modal-card{
   width:100vw!important;max-width:100vw!important;padding:0!important;margin:0!important;
   height:100dvh!important;max-height:100dvh!important;
 }
 html[data-responsive-profile="mobile-portrait"] body #modal.practice-streamlined-modal:has(.concert-scene) #modalContent{
   width:100%!important;padding:0!important;
 }
 #modal .concert-scene .concert-controls{
   left:0.6%!important;width:98.8%!important;
   gap:1px!important;height:11.8%!important;top:86.5%!important;
 }
 #modal .concert-scene .concert-controls .rhythm-key,
 #modal .concert-scene .concert-controls [data-pedal-key]{
   border-radius:4px!important;min-width:0!important;touch-action:none!important;
 }
 #modal .concert-scene .concert-controls .rhythm-key b{
   font-size:clamp(9px,2.45vw,12px)!important;
   line-height:1.13!important;word-break:keep-all;
 }
 #modal .concert-scene .concert-controls .pedal-heading{
   font-size:clamp(8px,2.25vw,11px)!important;
 }
}
/* Clearer cue for accompanying notes, retaining the original melody and timing. */
#modal .concert-scene .falling-note.chord-part{
  background:linear-gradient(#f4fbff,#a4dce4 55%,#5699b9)!important;
  border-color:#e0fcff!important;
  box-shadow:0 0 8px #b5ecff,0 0 15px #42abd488,0 5px 8px #0008!important;
}
#modal .concert-scene .falling-note.chord-melody{
  outline:2px solid #ffe6a0!important;outline-offset:2px!important;
}
#modal .concert-scene .concert-controls :is(.rhythm-key,[data-pedal-key]):focus-visible{
  outline:3px solid #eff9ff!important;outline-offset:-3px!important;
}

/* v0.80.664 — desktop landscape safe frame. The generated walnut art, dynamic
   SVG lane lines, judgement line and playable keys share the SAME geometry.
   Keep the validated portrait proportions unchanged. The playable bottom edge
   is 96% of .concert-runway; controls start at exactly the 2% stage inset. */
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 481px) {
 #modal .concert-scene .concert-runway {
  left: 18%; width: 64%;
 }
 #modal .concert-scene .concert-controls {
  left: 19.28%; width: 61.44%;
 }
 #modal .concert-scene .concert-console {
  left: 17%; right: 17%;
 }
}
/* On shorter widescreen desktops, preserve the same left/right safe margins.
   Height-specific rules still control the positions of the lane and keys. */
@media (orientation: landscape) and (min-width: 1000px) and (max-height: 480px) {
 #modal .concert-scene .concert-runway {
  left: 18%; width: 64%;
 }
 #modal .concert-scene .concert-controls {
  left: 19.28%; width: 61.44%;
 }
 #modal .concert-scene .concert-console {
  left: 17%; right: 17%;
 }
}

/* v677: optional next-step guidance, readable on Android portrait screens. */
.concert-gift-next-step{margin:10px 0 8px;padding:12px 14px;border:1px solid #dfd5bf;border-radius:15px;background:rgba(255,253,244,.9);color:#514938;text-align:left}
.concert-gift-next-step small{display:block;font-weight:700;color:#6a624e;margin-bottom:5px}
.concert-gift-next-step p{margin:0;line-height:1.7;font-size:.9rem;overflow-wrap:anywhere}
@media (max-width:520px){.concert-gift-next-step{padding:10px 12px}.concert-gift-next-step p{font-size:.84rem}}

/* v0.80.686 — sustained notes share the normalized perspective of the wood. */
#modal .concert-scene .concert-tail-layer{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;overflow:hidden;clip-path:polygon(38% 6%,62% 6%,98% 96%,2% 96%)}
.concert-sustain-band{fill:#ffdc9c99;stroke:#ffde9277;stroke-width:.8;vector-effect:non-scaling-stroke}
.concert-sustain-band.bass{fill:#72dfff99;stroke:#a0ecff99}
.concert-sustain-band.holding{animation:concert-sustain-breathe 1.05s ease-in-out infinite}
.concert-sustain-band.break-echo{animation:concert-hold-break-shell 840ms ease-out forwards}
@keyframes concert-sustain-breathe{0%,100%{opacity:1}50%{opacity:.72}}
#modal .concert-scene .concert-hold-break-fx{transform:translate(-50%,-50%)}
@media(prefers-reduced-motion:reduce){.concert-sustain-band.holding{animation:none}}

/* v764: short role prompt in count-in only; never over live falling notes. */
#modal .concert-scene .concert-role-guide-countin{display:none!important;position:absolute;z-index:10;top:25%;left:50%;transform:translateX(-50%);width:min(84%,420px);box-sizing:border-box;padding:9px 12px;margin:0;border:1px solid #c6a36c;border-radius:12px;background:#1c140df2;color:#fff0cc;text-align:center;font:600 clamp(12px,2.8vw,15px)/1.5 system-ui,sans-serif;pointer-events:none}
#modal.practice-live-input .concert-scene .concert-role-guide-countin{display:block!important}
#modal .concert-scene .concert-start .concert-role-guide-start{border-top:1px solid #a98a5655;padding-top:8px;margin:8px 0 12px!important;color:#fff0cc!important}
@media(orientation:landscape) and (max-height:480px){#modal .concert-scene .concert-role-guide-countin{top:20%;padding:4px 8px;font-size:11px}}
