:root{color-scheme:dark;--gold:#c4a06b;--gold-light:#f0d7a6;--ivory:#f3e8d1;--cyan:#77e3dc;--panel:rgba(5,14,23,.9);font-family:Georgia,'Times New Roman',serif;background:#050a10;color:var(--ivory)}
*{box-sizing:border-box}body{margin:0;overflow:hidden;overscroll-behavior:none}button,select,input{font:inherit}button{color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.42}button:focus-visible,select:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}button{border:0}button,select{min-height:38px}button:hover:not(:disabled){color:#fff4d8}button[hidden],[hidden]{display:none!important}#game{width:100vw;height:100vh;height:100dvh;display:grid;place-items:center;background:#03070c}#stage{position:relative;isolation:isolate;width:100%;height:100%;overflow:hidden;container-type:size}#world{position:absolute;inset:0;width:100%;height:100%;display:block}.vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 15cqw rgba(0,4,12,.48);background:linear-gradient(180deg,rgba(1,8,16,.28),transparent 25%,transparent 60%,rgba(1,7,12,.55));z-index:1}#damage-flash{position:absolute;inset:0;pointer-events:none;z-index:2;background:#b0274b;opacity:0;transition:opacity .3s}.world-header{position:absolute;inset:0 0 auto;z-index:3;padding:3cqh 3cqw;pointer-events:none;display:flex;justify-content:space-between;align-items:flex-start}.world-header>*{pointer-events:auto}.wordmark h1{font-size:clamp(15px,1.9cqw,31px);text-transform:uppercase;letter-spacing:.15em;font-weight:400;margin:0;text-shadow:0 2px 8px #000}.gold-rule{height:12px;position:relative;border-top:1px solid var(--gold);margin-top:8px;text-align:right}.gold-rule span{position:relative;top:-13px;padding:0 6px;background:#07131b;color:var(--gold);font-size:18px}.wordmark p{font-size:clamp(13px,1.4cqw,22px);letter-spacing:.08em;margin:0}.panel{background:var(--panel);border:1px solid var(--gold);outline:1px solid rgba(196,160,107,.2);outline-offset:3px;box-shadow:0 8px 25px #0005,inset 0 0 20px #0004;position:relative}.panel:before,.panel:after{content:'✧';position:absolute;color:var(--gold);font-size:16px;line-height:12px;pointer-events:none}.panel:before{left:-7px;top:-6px}.panel:after{right:-7px;bottom:-6px}.enemy-status{width:25cqw;min-width:210px;padding:12px 16px}.enemy-title{display:flex;justify-content:space-between;gap:16px;font-size:clamp(15px,1.5cqw,25px);letter-spacing:.04em}.enemy-title span:last-child{font:11px system-ui,sans-serif;color:var(--gold);align-self:center;white-space:nowrap}.bar{padding:2px;border:1px solid var(--gold);height:12px;background:#02070b}.bar i{display:block;height:100%;transition:width .5s ease;width:100%;background:linear-gradient(90deg,#99313a,#f6788e)}.enemy-bar{margin:8px 0;height:13px}.enemy-detail{display:flex;gap:8px;justify-content:space-between;font:10px/1.3 system-ui,sans-serif;color:#b8b4c1}.enemy-detail span:last-child{color:#c6a5ed;white-space:nowrap}.top-actions{position:absolute;top:3cqh;left:50%;transform:translateX(-50%);display:flex;gap:5px;align-items:center}.quiet-button{background:#07101bb3;border:1px solid #7e78605c;border-radius:2px;color:#cdc6b8;font:11px system-ui,sans-serif;padding:6px 10px;min-height:30px}.quiet-button.active{color:var(--cyan);border-color:#77e3dc70}#turn-banner{position:absolute;top:17cqh;left:50%;transform:translateX(-50%);text-align:center;display:flex;flex-direction:column;gap:5px;pointer-events:none;z-index:3;text-shadow:0 2px 10px #000,0 0 30px #000}#turn-eyebrow{font:9px system-ui,sans-serif;letter-spacing:.23em;color:var(--gold-light)}#turn-title{font-size:clamp(18px,2cqw,32px);font-weight:400;white-space:nowrap}#turn-detail{font:11px system-ui,sans-serif;color:#c4cdd2;white-space:nowrap}.bottom-hud{position:absolute;left:3cqw;right:3cqw;bottom:max(4cqh,env(safe-area-inset-bottom));z-index:4;display:grid;grid-template-columns:27% 46% 14%;justify-content:space-between;align-items:end;gap:2cqw}.player-status{padding:12px;display:flex;gap:12px;min-height:125px;background:linear-gradient(90deg,rgba(4,12,20,.96),rgba(4,12,20,.82))}.portrait{width:6cqw;height:112px;object-fit:cover;object-position:center 22%;border:1px solid var(--gold);align-self:center;background:#17202b}.player-stats{flex:1;min-width:0}.player-name{display:flex;justify-content:space-between;gap:5px;font-size:clamp(13px,1.2cqw,20px);margin-bottom:7px}.player-name span:last-child{color:var(--gold-light);white-space:nowrap}.stat-line{display:flex;justify-content:space-between;font-size:clamp(12px,1.2cqw,18px);margin-bottom:4px}.hp-bar{height:11px}.hp-bar i{background:linear-gradient(90deg,#389b81,#a5d997)}.resonance-label{color:var(--gold-light);font-size:clamp(11px,1.1cqw,16px);margin-top:7px}.resonance-bar{height:9px}.resonance-bar i{width:0;background:linear-gradient(90deg,#2da5b6,#b0f1e6);box-shadow:0 0 8px #7fe7f270}.xp-label{margin-top:6px;font:9px system-ui,sans-serif;color:#98a6ab}.pitch-panel{padding:10px 18px 9px;min-height:158px}.pitch-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:clamp(16px,1.5cqw,24px)}.text-button{background:transparent;color:var(--gold-light);padding:3px 4px;min-height:24px;font:11px system-ui,sans-serif}.pitch-heading .text-button{margin-left:auto}#turn-clock{font:11px system-ui,sans-serif;color:#b7ccd4;font-variant-numeric:tabular-nums;min-width:25px;text-align:right}.pitch-content{display:flex;gap:16px;align-items:center;margin-top:4px}.pitch-chart{position:relative;flex:1;height:70px;overflow:hidden;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(20% - 1px),#8eb4c610 calc(20% - 1px),#8eb4c610 20%)}.pitch-row{height:33.33%;display:flex;align-items:center;gap:9px;font-size:11px;color:#c0ccd1}.pitch-row span{width:23px}.pitch-row i{flex:1;height:1px;background:#a7b9cb18}.pitch-row.active{color:var(--gold-light)}.pitch-row.active i{background:#e7be7c65;box-shadow:0 0 8px #e7be7c60}#pitch-trace{position:absolute;inset:0 0 0 32px;width:calc(100% - 32px);height:100%}#pitch-cursor{position:absolute;left:68%;top:50%;transform:translate(-50%,-50%);width:11px;height:11px;border-radius:50%;border:1px solid #ffedbd;background:#a4fbf1;box-shadow:0 0 14px #8ffbf0,0 0 24px #8ffbf080;opacity:.4}.hold-status{display:flex;flex-direction:column;align-items:center;width:82px;flex-shrink:0;gap:4px}#hold-ring{--progress:0;display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:conic-gradient(var(--gold-light) calc(var(--progress)*360deg),#7b83952b 0);position:relative;box-shadow:0 0 15px #d1b27f10}#hold-ring:before{content:'';position:absolute;inset:5px;border-radius:50%;background:#08131e}#target-note{position:relative;font-size:21px;color:var(--gold-light)}#pitch-feedback{font:9px/1.3 system-ui,sans-serif;text-align:center;color:#c3cbd2;min-height:12px}.note-targets{display:flex;gap:5px;margin:5px 96px 3px 30px}.note-target{flex:1;min-height:22px;padding:2px 5px;border:1px solid #b3945c40;background:#1c293244;color:#829197;font:10px system-ui,sans-serif;white-space:nowrap;touch-action:none}.note-target.current{color:#ffdf9e;border-color:var(--gold);background:#8f724529}.note-target.done{color:var(--cyan);border-color:#77e3dc75;background:#77e3dc12}.pitch-foot{display:flex;gap:8px;justify-content:space-between;font:9px system-ui,sans-serif;color:#97a6af}.battle-menu{padding:5px 7px;display:flex;flex-direction:column;min-height:158px}.menu-item{background:transparent;min-height:35px;padding:5px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #ae97622b;font-size:clamp(15px,1.4cqw,22px);text-align:left;position:relative}.menu-item:last-child{border-bottom:0}.menu-item.selected{background:linear-gradient(90deg,#8aacae28,#b6ccda0f);box-shadow:inset 0 0 0 1px #d2be8d70}.menu-item.selected:before{content:'▸';position:absolute;left:2px;color:var(--gold-light)}kbd{font:10px system-ui,sans-serif;color:#9fa8a3}.menu-item:hover{background:#adc3d315}.welcome-card{position:absolute;bottom:8cqh;left:50%;transform:translateX(-50%);width:min(570px,80cqw);padding:27px 36px;text-align:center;z-index:7;background:rgba(5,14,23,.96)}.eyebrow{font:10px system-ui,sans-serif;letter-spacing:.22em;color:var(--gold-light);margin:0 0 12px}h2{font-size:clamp(25px,3cqw,43px);line-height:1.1;font-weight:400;letter-spacing:.01em;margin:0 0 17px}.welcome-card>p:not(.eyebrow),.defeat-card>p:not(.eyebrow){font-size:15px;line-height:1.7;color:#cad0ce;margin:8px 0 18px}.welcome-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.primary-button,.secondary-button{padding:12px 19px;border:1px solid var(--gold);background:linear-gradient(135deg,#9e7d44,#614d30);color:#fff1d0;font-size:14px;min-height:43px;box-shadow:inset 0 1px #ecd4a532}.secondary-button{background:#0f1d2b;box-shadow:none;color:#d5dce0;border-color:#677a87}.welcome-card .welcome-note,.defeat-card .welcome-note{font:10px/1.7 system-ui,sans-serif!important;color:#94a4ad!important;margin:17px 0 7px!important}.error-text{color:#efa4b2!important;font:12px/1.5 system-ui,sans-serif!important;min-height:0}.error-text:empty{display:none}.cinematic{position:absolute;left:15%;right:15%;bottom:8cqh;padding:20px 28px;z-index:6;background:rgba(5,14,23,.95)}.cinematic>p{font-size:clamp(15px,1.6cqw,24px);line-height:1.7;margin:0 0 10px}.cinematic>div{display:flex;align-items:center;gap:18px}.cinematic>div>span{font:10px system-ui,sans-serif;color:var(--gold)}.cinematic button:last-child{margin-left:auto}.command-popover{position:absolute;right:19cqw;bottom:26cqh;width:300px;max-width:60cqw;z-index:9;padding:12px 16px}.popover-title{display:flex;justify-content:space-between;border-bottom:1px solid #c4a06b55;margin-bottom:9px;padding-bottom:5px;font-size:20px}.choice-button{display:block;width:100%;background:transparent;border-bottom:1px solid #a5abbe25;text-align:left;padding:10px 4px;color:var(--ivory)}.choice-button strong{font-weight:400;font-size:17px;display:block}.choice-button small{font:10px/1.6 system-ui,sans-serif;color:#a6b7bf;display:block;margin-top:3px}.choice-button:hover{background:#b9b39018}.modal-backdrop{position:absolute;inset:0;z-index:12;background:#020811b8;backdrop-filter:blur(5px);display:grid;place-items:center;padding:18px}.settings-card,.defeat-card{width:min(480px,85cqw);max-height:95cqh;overflow-y:auto;padding:26px 32px}.settings-card h2{font-size:32px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:11px 0;font:12px system-ui,sans-serif}.settings-row select{max-width:56%;padding:5px 7px;background:#122132;border:1px solid #8e7c5b;color:var(--ivory);font:12px system-ui,sans-serif}.settings-row input{width:20px;height:20px;accent-color:#a8d7cf}.settings-help{font:10px/1.7 system-ui,sans-serif;color:#95a4af;margin:7px 0 16px}.settings-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:20px}.settings-actions .primary-button{width:100%}.mic-level{display:flex;gap:12px;align-items:center;font:10px system-ui,sans-serif;color:#a1bfc4}.mic-level meter{width:100px;height:8px;margin-left:auto}.defeat-card{text-align:center}.defeat-stats{display:flex;justify-content:center;gap:25px;padding:17px 0;border-top:1px solid #b3945c60;border-bottom:1px solid #b3945c60;margin:20px 0}.defeat-stats span{font:10px system-ui,sans-serif;color:#a4b3b9;display:flex;flex-direction:column;gap:8px}.defeat-stats strong{font:26px Georgia,serif;color:var(--gold-light)}.unlock-message{font:12px/1.6 system-ui,sans-serif!important;color:var(--cyan)!important}#rotate-prompt{display:none}#load-screen{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;background:#07111d;font:13px system-ui,sans-serif;color:var(--gold-light);letter-spacing:.08em}.loading-clef{font:80px Georgia,serif;color:var(--gold-light)}.load-track{width:180px;height:2px;background:#38424c}.load-track i{height:100%;display:block;width:0;background:var(--gold);transition:width .4s}#toast{position:absolute;left:50%;top:12cqh;transform:translate(-50%,-10px);max-width:75cqw;padding:9px 16px;background:#07131ef0;border:1px solid #9b8a60;color:var(--ivory);font:12px/1.4 system-ui,sans-serif;text-align:center;z-index:18;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s}#toast.visible{opacity:1;transform:translate(-50%,0)}#battle-floats{position:absolute;inset:0;z-index:3;pointer-events:none}.battle-float{position:absolute;font-size:32px;color:#ffde98;text-shadow:0 2px 8px #000;animation:float-up 1.8s ease-out forwards}.battle-float.damage{color:#fa9ca7}.battle-float.heal{color:#9be8c1}@keyframes float-up{0%{opacity:0;transform:translateY(0)}15%{opacity:1}100%{opacity:0;transform:translateY(-65px)}}body[data-mode=title] .bottom-hud,body[data-mode=story] .bottom-hud{opacity:0;pointer-events:none}body[data-mode=title] #turn-banner,body[data-mode=story] #turn-banner{opacity:0}body[data-mode=title] .enemy-status{opacity:0}body[data-mode=title] .top-actions{opacity:0;pointer-events:none}
@media(min-aspect-ratio:21/9){#stage{max-width:220vh;max-width:220dvh;}}@media(max-width:1050px){.bottom-hud{grid-template-columns:27% 48% 17%;left:3cqw;right:3cqw;gap:1.5cqw;bottom:max(3cqh,env(safe-area-inset-bottom))}.player-status{padding:9px;gap:8px}.portrait{height:100px}.pitch-panel{padding:9px 12px}.enemy-status{padding:10px 13px}.quiet-button{padding:5px 7px}.world-header{padding-top:4cqh}.top-actions{top:4cqh}.player-name{font-size:14px}.menu-item{padding:5px 11px}#turn-banner{top:20cqh}.pitch-foot{font-size:8px}.enemy-detail{font-size:9px}}
@media(orientation:landscape) and (max-height:600px){.world-header{padding:4cqh max(3cqw,env(safe-area-inset-left)) 0}.wordmark h1{font-size:clamp(14px,2.2cqw,22px)}.wordmark p{font-size:12px}.gold-rule{margin-top:6px;height:8px}.enemy-status{width:27cqw;min-width:190px;padding:7px 10px}.enemy-title{font-size:14px}.enemy-bar{margin:5px 0;height:9px}.enemy-detail{font-size:8px}.top-actions{top:4cqh;gap:3px}.quiet-button{font-size:9px;min-height:26px;padding:4px 6px}#fullscreen-button{display:none}#turn-banner{top:23cqh;gap:3px}#turn-title{font-size:19px}#turn-eyebrow{font-size:7px}#turn-detail{font-size:9px}.bottom-hud{left:max(3cqw,env(safe-area-inset-left));right:max(3cqw,env(safe-area-inset-right));bottom:max(3cqh,env(safe-area-inset-bottom));grid-template-columns:27% 48% 17%;gap:1cqw}.player-status{min-height:110px;gap:6px;padding:7px}.portrait{width:6.5cqw;height:85px}.player-name{font-size:12px;margin-bottom:5px}.stat-line{font-size:11px;margin-bottom:3px}.resonance-label{font-size:10px;margin-top:5px}.hp-bar{height:8px}.resonance-bar{height:7px}.xp-label{font-size:7px;margin-top:5px}.pitch-panel{min-height:110px;padding:6px 10px}.pitch-heading{font-size:15px}.pitch-heading .text-button{font-size:9px;min-height:19px}#turn-clock{font-size:9px}.pitch-content{margin-top:0;gap:9px}.pitch-chart{height:43px}.pitch-row{font-size:9px}.hold-status{width:60px;gap:1px}#hold-ring{width:40px;height:40px}#hold-ring:before{inset:3px}#target-note{font-size:16px}#pitch-feedback{font-size:7px;min-height:9px}.note-targets{margin:2px 67px 3px 30px;gap:4px}.note-target{font-size:9px;min-height:23px}.pitch-foot{font-size:7px}.battle-menu{padding:3px;min-height:110px}.menu-item{min-height:26px;font-size:15px;padding:3px 10px}.menu-item kbd{font-size:8px}.welcome-card{bottom:7cqh;padding:18px 30px;width:min(510px,76cqw)}.welcome-card h2{font-size:29px;margin-bottom:10px}.welcome-card>p:not(.eyebrow){font-size:13px;margin-bottom:12px}.eyebrow{font-size:8px;margin-bottom:8px}.primary-button,.secondary-button{font-size:12px;min-height:37px;padding:8px 13px}.welcome-card .welcome-note{font-size:8px!important;margin-top:11px!important}.welcome-card>.text-button{font-size:9px}.cinematic{bottom:7cqh;padding:14px 22px}.cinematic>p{font-size:16px;line-height:1.5}.settings-card{padding:18px 26px;max-height:92cqh;width:450px}.settings-card h2{font-size:25px;margin-bottom:14px}.settings-row{margin:7px 0;font-size:11px}.settings-row select{min-height:30px;font-size:11px}.settings-help{font-size:9px;margin:4px 0 10px}.settings-actions{margin-top:12px;gap:6px}.settings-actions .primary-button{width:auto}.defeat-card{padding:20px 28px;width:480px}.defeat-card h2{font-size:30px;margin-bottom:10px}.defeat-card>p:not(.eyebrow){font-size:13px;margin:6px 0 13px}.defeat-stats{padding:12px 0;margin:12px 0}.defeat-stats strong{font-size:22px}.defeat-card .welcome-note{font-size:8px!important;margin-top:10px!important}.command-popover{bottom:36cqh;right:21cqw;width:285px;padding:8px 13px}.choice-button{padding:7px 4px}.choice-button strong{font-size:15px}.choice-button small{font-size:9px}.popover-title{font-size:17px}.battle-float{font-size:24px}}
@media(orientation:portrait){#rotate-prompt{position:absolute;inset:0;z-index:30;background:#07111df5;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:30px}.rotate-clef{font-size:90px;color:var(--gold);margin-bottom:25px}#rotate-prompt h2{font-size:30px}#rotate-prompt p{font-size:16px;line-height:1.8;color:#b5c6cc}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* The voice chart owns its animation; the surrounding HUD keeps a stable layout. */
.pitch-panel{min-height:190px}.pitch-heading{height:25px;min-width:0;white-space:nowrap}.pitch-heading>span:first-child{overflow:hidden;text-overflow:ellipsis;min-width:0;font-size:clamp(13px,1.25cqw,20px)}.pitch-heading .text-button{flex-shrink:0;min-width:57px}#turn-clock{flex-shrink:0;min-width:32px}
.pitch-chart{height:106px;background:#07131b55;contain:layout paint style;isolation:isolate;overflow:hidden;flex:1;min-width:0}.pitch-content{gap:10px;align-items:center}.hold-status{width:69px;gap:3px}#hold-ring{width:46px;height:46px}#hold-ring:before{inset:4px}#target-note{font-size:18px}#pitch-feedback{font-size:8px;height:20px;line-height:10px;max-width:69px;overflow:hidden}.next-note-card{display:grid;grid-template-columns:auto auto;column-gap:5px;align-items:center;border-top:1px solid #c4a06b55;padding-top:3px;width:100%;text-align:center}.next-note-card small{grid-column:1/-1;font:6px/1.3 system-ui,sans-serif;letter-spacing:.15em;color:#bdad91}.next-note-card strong{font-size:16px;font-weight:400;color:#f1d8a1}.next-note-card>span{font:7px system-ui,sans-serif;white-space:nowrap;color:#b3c5ce}
#pitch-lanes,#guide-notes{position:absolute;inset:0;pointer-events:none}.guide-lane{position:absolute;left:0;right:0;border-top:1px solid #a7b9cb20;height:0}.guide-lane>span{position:absolute;left:0;top:-5px;width:23px;background:#0a1720f5;color:#b6c4ca;font:9px/10px system-ui,sans-serif;z-index:5}#guide-notes{z-index:2}.score-note{position:absolute;left:0;height:11px;border:1px solid #d8b46e99;background:linear-gradient(90deg,#d8b46e70,#b08b4840);border-radius:3px;will-change:transform;white-space:nowrap;overflow:hidden;color:#fff0c6;box-shadow:0 0 4px #d8b46e20;transition:background-color .1s}.score-note>span{font:7px/9px system-ui,sans-serif;padding-left:4px;vertical-align:top}.score-note.active{border-color:#ffe0a4;background:#b39b575e;box-shadow:0 0 9px #d6b76e50}.score-note.matched{background:#5ee68a8c;border-color:#91ffb0;color:#effff2;box-shadow:0 0 9px #63f49a66}.score-note.missed{opacity:.3}.sing-line{position:absolute;left:26%;top:0;bottom:0;z-index:3;border-left:1px dashed #e3d1a6a6;pointer-events:none}.sing-line>span{position:absolute;top:0;left:4px;font:6px/8px system-ui,sans-serif;letter-spacing:.08em;color:#d3c6a6}#pitch-trace{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none}#pitch-cursor{left:26%;width:10px;height:10px;z-index:6;pointer-events:none;background:#7df4a6;border-color:#e1ffe4;box-shadow:0 0 11px #5cff98,0 0 20px #41f27a66;transition:opacity .12s}#pitch-cursor.on-note{box-shadow:0 0 16px #b0ffd1,0 0 25px #5dff8d}#cursor-note{position:absolute;right:12px;top:-5px;min-width:25px;font:8px/12px system-ui,sans-serif;text-align:right;color:#a8ffbf;text-shadow:0 1px 3px #000;background:#07131bc9}.note-targets{margin:6px 0 5px;gap:4px}.note-target{min-height:26px;font-size:9px;padding:3px 2px;touch-action:none}.note-target.held{color:#b7ffcb;border-color:#79f5a2;background:#5df49325}.pitch-foot{height:10px;line-height:10px;white-space:nowrap;overflow:hidden;gap:5px}#input-hint{overflow:hidden;text-overflow:ellipsis;min-width:0}#live-note{flex-shrink:0}.bottom-hud{contain:layout style}.battle-menu{min-height:158px}.battle-menu,.menu-item{backface-visibility:hidden}.tempo-setting{gap:10px}.tempo-setting input{width:140px;min-width:65px;accent-color:#9cdbb7}.tempo-setting output{font:11px system-ui,sans-serif;color:var(--gold-light);white-space:nowrap;min-width:55px;text-align:right}.tempo-setting label{white-space:nowrap}
@media(orientation:landscape) and (max-height:600px){
 .pitch-panel{min-height:151px;padding:6px 9px}.pitch-heading{height:21px}.pitch-heading>span:first-child{font-size:12px}.pitch-heading .text-button{font-size:8px;min-width:43px}.pitch-chart{height:77px}.pitch-content{gap:5px}.hold-status{width:51px;gap:1px}#hold-ring{width:32px;height:32px}#hold-ring:before{inset:3px}#target-note{font-size:14px}#pitch-feedback{font-size:6px;height:16px;line-height:8px;max-width:51px}.next-note-card{padding-top:2px;column-gap:3px}.next-note-card small{font-size:5px}.next-note-card strong{font-size:13px}.next-note-card>span{font-size:6px}.guide-lane>span{font-size:7px;line-height:8px;top:-4px;width:20px}.score-note{height:9px}.score-note>span{font-size:6px;line-height:7px;padding-left:2px}#cursor-note{font-size:7px;min-width:21px}.note-targets{gap:3px;margin:4px 0}.note-target{font-size:7px;min-height:26px;padding:2px 1px}.pitch-foot{font-size:6px;height:9px;line-height:9px}.battle-menu{min-height:120px}.menu-item{min-height:28px}#turn-banner{left:56%;top:22cqh}#turn-title{font-size:17px}.tempo-setting input{width:125px}.settings-help.tempo-help{margin-bottom:7px}
}
.bottom-hud{transform:translateZ(0);isolation:isolate}
#victory-flash{position:absolute;inset:0;background:#fffde5;opacity:0;pointer-events:none;z-index:5}
#pitch-shadow{position:absolute;left:26%;width:11px;height:11px;border:1px solid #baffcfb0;border-radius:50%;background:#a9ffc744;box-shadow:0 0 9px #89fba750;transform:translate(-50%,-50%);z-index:5;pointer-events:none}
#explore-hud{position:absolute;inset:0;pointer-events:none;z-index:5}
#explore-hud button,#explore-hud a{pointer-events:auto}
.explore-heading{position:absolute;left:3%;top:15%;padding:10px 15px;max-width:320px;display:flex;flex-direction:column;gap:4px;font-size:18px}
.explore-heading small{font:11px/1.5 system-ui,sans-serif;color:#c2cecd}
.explore-actions{position:absolute;right:3%;bottom:4%;display:flex;gap:8px}
.explore-actions a{display:grid;place-items:center;text-decoration:none}
.explore-hint{position:absolute;left:50%;bottom:2%;transform:translateX(-50%);font:10px system-ui,sans-serif;color:#e1dfcf;text-shadow:0 1px 4px #000;white-space:nowrap}
#move-pad{position:absolute;left:3%;bottom:4%;display:grid;grid-template-columns:42px 42px 42px;grid-template-rows:42px 42px;gap:4px}
#move-pad button{border:1px solid #ad9869a0;background:#07131bd9;color:#eadbb8;font:25px Georgia,serif;min-height:42px;border-radius:4px;touch-action:none}
#move-pad button:first-child{grid-column:2}#move-pad button:nth-child(2){grid-column:1}
body[data-mode="explore"] #battle-hud,body[data-mode="explore"] #turn-banner,body[data-mode="explore"] .enemy-status{display:none}
.editor-link{display:inline-block;text-decoration:none;margin:8px 0}
#character-menu,#village-dialog{position:fixed;inset:0;z-index:18;padding:16px;overflow:hidden}
.character-card{width:min(1000px,100%);height:min(760px,calc(100dvh - 32px));padding:20px 24px;display:flex;flex-direction:column;overflow:hidden}
.character-heading{display:flex;align-items:center;gap:16px;flex-shrink:0}.character-heading canvas{width:70px;height:70px;object-fit:contain}.character-heading h2{font-size:29px;margin:0 0 4px}.character-heading p{margin:0;font:12px system-ui,sans-serif}.character-heading .eyebrow{font-size:8px;margin-bottom:6px}.character-heading button{margin-left:auto;align-self:flex-start}
#character-message{font:13px/1.5 system-ui,sans-serif;color:#d6d9cc;margin:12px 0}
.character-body{display:grid;grid-template-columns:1fr 1.15fr 1.1fr;gap:24px;overflow-y:auto;min-height:0;padding-right:8px;scrollbar-gutter:stable}
.character-body h3{font:21px Georgia,serif;color:var(--gold-light);margin:10px 0}.character-body p{font:12px/1.6 system-ui,sans-serif}.character-stat{display:flex;justify-content:space-between;align-items:center;padding:6px 0;gap:8px;font:13px system-ui,sans-serif}.character-stat button{min-width:37px;min-height:34px}
#equipment-slots{display:grid;gap:15px}#equipment-slots label{font:12px system-ui,sans-serif;color:var(--gold-light)}#equipment-slots select{display:block;width:100%;margin:6px 0;font:12px system-ui,sans-serif;background:#10202c;border:1px solid #9b845a;color:#ede5ce;padding:6px}#equipment-slots small{font:11px/1.6 system-ui,sans-serif;color:#afbebd}
.mastery-row{margin:14px 0;display:grid;gap:6px}.mastery-row strong{font:14px Georgia,serif}.mastery-row small{font:10px/1.5 system-ui,sans-serif;color:#abbcbc}.mastery-row progress{width:100%;height:8px;accent-color:#9fddbd}
.inventory-item{display:flex;align-items:center;gap:8px;font:11px/1.5 system-ui,sans-serif;margin:4px 0}.inventory-item canvas{width:40px;height:40px;flex-shrink:0}.character-card footer{padding-top:15px;flex-shrink:0;display:flex;justify-content:flex-end}
.dialogue-card{width:min(560px,90vw);padding:28px}.dialogue-card p:not(.eyebrow){font:15px/1.9 Georgia,serif;color:#d7ddcd}.dialogue-card h2{font-size:28px}
@media(orientation:landscape) and (max-height:600px){.character-card{padding:12px 18px}.character-heading canvas{width:45px;height:45px}.character-heading h2{font-size:22px}.character-heading .eyebrow{font-size:7px}.character-heading p{font-size:10px}#character-message{font-size:11px;margin:6px 0}.character-body{gap:16px}.character-body h3{font-size:17px}.character-body p,.character-stat{font-size:11px}.character-card footer{padding-top:8px}.explore-heading{top:22%;padding:6px 10px;font-size:14px;max-width:250px}.explore-heading small{font-size:9px}.explore-hint{display:none}.explore-actions{bottom:4%}.dialogue-card{padding:16px 25px}.dialogue-card p:not(.eyebrow){font-size:13px;line-height:1.6}.dialogue-card h2{font-size:24px}}
@media(max-width:700px){.character-body{grid-template-columns:1fr 1fr}.character-body>section:last-child{grid-column:1/-1}}
.pitch-chart{height:132px}.pitch-panel{min-height:224px}
.score-note,.score-note.active,.score-note.matched{background:transparent;border:0;box-shadow:none;border-radius:0;overflow:visible}
.note-core,.note-grace{display:block;position:absolute;left:0;right:0;font-style:normal;box-sizing:border-box;border-radius:2px}
.note-core{top:28.57143%;height:42.85714%;border:1px solid #e2bd73bd;background:#c9a75966;color:#fff1c7}
.note-core:after{content:'';position:absolute;top:50%;left:0;right:0;border-top:1px solid #ffe7a460;pointer-events:none}
.note-grace{height:28.57143%;border:1px solid #f5e8c380;background:#f2e6bf12}
.grace-top{top:0}.grace-bottom{bottom:0}
.note-label{position:absolute;left:4px;top:50%;transform:translateY(-50%);font:8px/10px system-ui,sans-serif;z-index:1}
.score-note.active .note-core{border-color:#fff0b8;background:#d9b65a88}
.score-note.matched .note-core{border-color:#b4ffd1;background:#57dd8b7a;color:#f3fff7}
.score-note.matched.partial .note-core{border-color:#e2bd73bd;background:#c9a75966;color:#fff1c7}
.score-note.partial .note-grace{border-color:#d4ffe5;background:#8bdca637}
.pitch-window{position:absolute;left:calc(26% - 12px);width:24px;transform:translateY(-50%);z-index:3;pointer-events:none}
.pitch-window .note-core{background:#e2bd7317;border-color:#f2dba4}
.pitch-window .note-grace{background:#f3eaca0a;border-color:#f4edd18a;border-style:dashed}
.pitch-window.matched .note-core{border-color:#a0ffc1;background:#73ffa429}
.pitch-window.partial .note-grace{border-color:#c4ffdb;background:#86eda32b}
#settings .voice-prefs{min-width:0;margin:16px 0;padding:10px 0 14px;border:0;border-top:1px solid #b09b6744;border-bottom:1px solid #b09b6744}
#settings .voice-prefs legend{padding:0 8px 0 0;color:var(--gold-light);font:17px Georgia,serif}
#settings .range-setting{display:grid;grid-template-columns:145px minmax(55px,1fr) 52px;gap:8px}
#settings .range-setting input{width:100%;min-width:0;margin:0;accent-color:#9cdbb7}
#settings .range-setting output{text-align:right;font:11px system-ui,sans-serif;font-variant-numeric:tabular-nums}
#settings #learn-room-noise{margin:6px 0;font-size:11px}
#settings-close{position:sticky;top:0;float:right;z-index:2;background:#0b1821;min-height:32px;margin-top:-6px;font-size:11px}
@media(orientation:landscape) and (max-height:600px){.pitch-chart{height:104px}.pitch-panel{min-height:178px}.note-label{font-size:7px;line-height:8px;left:2px}}
#settings{position:fixed;inset:0;padding:0;overflow:hidden;contain:layout style;z-index:15}
#settings .settings-card{width:var(--settings-width,480px);height:var(--settings-height,560px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);min-width:0;padding:25px 28px;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain;font:12px/1.4 system-ui,sans-serif;transform:none;zoom:1;flex:none}
#settings .settings-card:before,#settings .settings-card:after{display:none}
#settings h2{font:32px/1.12 Georgia,serif;margin:0 0 20px;letter-spacing:0}
#settings .eyebrow{font:9px/1.3 system-ui,sans-serif;letter-spacing:.22em;margin:0 0 10px}
#settings .settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;min-height:38px;margin:8px 0;font-size:12px}
#settings select{max-width:48%;min-height:36px;font:12px system-ui,sans-serif}
#settings .settings-help{font:10px/1.6 system-ui,sans-serif;margin:4px 0 12px;overflow-wrap:anywhere}
#settings .tempo-setting{display:grid;grid-template-columns:auto minmax(65px,1fr) 58px;gap:10px}
#settings .tempo-setting input{width:100%;min-width:0;margin:0}
#settings .tempo-setting output{min-width:0;font-size:11px;font-variant-numeric:tabular-nums}
#settings .mic-level{display:grid;grid-template-columns:minmax(0,1fr) 95px;align-items:center;gap:8px;height:24px;margin:8px 0;font:10px system-ui,sans-serif}
#settings #mic-settings-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings meter{width:95px;min-width:0}
#settings .settings-actions{margin-top:12px;gap:6px}
#settings .settings-actions .primary-button{width:100%;min-height:40px;font:14px Georgia,serif}
#settings .settings-actions .text-button{font-size:11px}
#settings .error-text{font:11px/1.5 system-ui,sans-serif;overflow-wrap:anywhere}
#resume-notice{position:absolute;left:50%;top:12%;transform:translateX(-50%);z-index:8;min-height:40px;padding:8px 20px;background:#07131bf2;border-color:var(--gold);font-size:13px}
#song-points{flex:0 0 60px;text-align:right;color:#b7f4c9;font:11px system-ui,sans-serif;font-variant-numeric:tabular-nums}
#song-accuracy{flex-shrink:0;min-width:62px;text-align:right;font-variant-numeric:tabular-nums}
#turn-clock{width:24px;min-width:24px}
.pitch-heading{gap:6px}.pitch-heading>span:first-child{flex:1;min-width:0}.pitch-heading .text-button{margin-left:0}
@media(orientation:landscape) and (max-height:600px){#settings .settings-card{padding:18px 25px}#settings h2{font-size:27px;margin-bottom:12px}#settings .settings-row{min-height:34px;margin:6px 0}#settings .settings-help{margin-bottom:8px}#song-points{flex-basis:45px;font-size:8px}.pitch-heading{gap:4px}#turn-clock{width:20px;min-width:20px}#song-accuracy{min-width:47px}}
@media(orientation:landscape) and (max-height:600px){#turn-banner{left:60%}}
@media(orientation:landscape) and (max-height:430px){#turn-banner{left:51%;top:16cqh}#turn-detail{display:none}}
#song-shortcut{position:absolute;left:50%;top:12%;transform:translateX(-50%);z-index:5;pointer-events:none;font:11px system-ui,sans-serif;color:#ade2bd;text-shadow:0 1px 5px #000;background:#06120bb3;border-radius:3px;padding:5px 10px;max-width:70%;text-align:center}#song-shortcut:empty{display:none}@media(max-height:500px){#song-shortcut{top:16%;font-size:9px;padding:3px 8px}}
.hero-actions{position:absolute;right:3%;bottom:9%;display:flex;flex-wrap:wrap;gap:7px;align-items:center;justify-content:flex-end;max-width:60%;pointer-events:auto}.hero-actions button{background:#08141ee8;min-height:38px}.hero-actions button[aria-pressed=true]{border-color:#bde4b6;background:#26472e}#animation-test-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}#animation-test-state{width:100%;text-align:right;font:11px system-ui,sans-serif;color:#cce4c4;text-shadow:0 1px 4px #000}@media(max-height:500px){.hero-actions{bottom:9%;gap:4px;max-width:65%}.hero-actions button{min-height:32px;padding:5px 9px;font-size:11px}#animation-test-controls{gap:4px}#animation-test-state{font-size:9px}}
#motion-readout{width:100%;text-align:right;color:#cfccb9;font:10px/1.3 system-ui,sans-serif;text-shadow:0 1px 4px #000}#motion-readout:empty{display:none}@media(max-height:500px){#motion-readout{font-size:8px}}
