/* Approved concept HUD. All ornamental artwork is a raster nine-slice or
 * sprite atlas; note lanes, timing bars and meters remain live UI controls. */
:root{--gold:#bda065;--gold-light:#f3deb0;--panel:rgba(5,12,15,.84)}
.panel{border:10px solid transparent;border-image:url('assets/ui/gold-frame.png') 150 / 14px stretch;outline:0;background:var(--panel);background-clip:padding-box;box-shadow:0 5px 24px #0007}
.panel:before,.panel:after{content:none}
.world-header{padding:2.7cqh max(2.2cqw,env(safe-area-inset-left)) 0}
.wordmark h1{font-size:clamp(17px,1.95cqw,32px);letter-spacing:.16em;color:var(--gold-light)}
.wordmark p{font-size:clamp(11px,1.02cqw,18px);text-transform:uppercase;letter-spacing:.25em;color:#eddfbc}
.gold-rule{margin-top:7px;height:9px;border-color:#bda0659c}.gold-rule span{display:none}
.enemy-status.panel{border:0;outline:0;box-shadow:none;background:transparent;padding:0;width:25cqw;min-width:210px;text-shadow:0 2px 6px #000}
.enemy-title{font-size:clamp(14px,1.25cqw,23px);text-transform:uppercase;letter-spacing:.12em;align-items:center;gap:8px}
.enemy-title #enemy-level{font-size:9px;letter-spacing:.05em}.enemy-bar{height:12px;margin:7px 0;background:#080d11e6}
.enemy-detail{font-size:9px;color:#d6d1c0}
.top-actions{top:2.7cqh}.top-actions .quiet-button{background:#080f15bb;border-color:#bda06570;color:#e9ddc3}
.bar{height:13px;padding:2px;border:1px solid #d1b573;background:#060b0feb;box-shadow:0 0 0 2px #151d1b9e}
.hp-bar i,.enemy-bar i{background:linear-gradient(90deg,#a71c39,#f16b87);box-shadow:inset 0 1px #ffbdc57a}
.resonance-bar i{background:linear-gradient(90deg,#36aeb9,#8ff9f2);box-shadow:0 0 8px #65edea70,inset 0 1px #eaffffb3}
.bottom-hud{left:max(2cqw,env(safe-area-inset-left));right:max(2cqw,env(safe-area-inset-right));bottom:max(2.2cqh,env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(165px,21%) minmax(0,1fr) minmax(175px,19%);align-items:end;gap:1.1cqw;contain:layout style}
.player-status.panel{display:flex;align-items:center;gap:10px;padding:0;border:0;outline:0;background:#050c1070;box-shadow:none;min-height:0;isolation:isolate}
.portrait-frame{border:8px solid transparent;border-image:url('assets/ui/gold-frame.png') 150 / 13px stretch;background:#0a141a;flex:0 0 clamp(64px,6.9cqw,125px);height:clamp(106px,11.2cqw,170px);overflow:hidden}
.portrait-frame .portrait{width:100%;height:100%;border:0;object-fit:cover;object-position:50% 30%;display:block}
.player-stats{flex:1;min-width:0;padding:8px 3px 8px 0}.player-name{display:flex;justify-content:space-between;gap:4px;font-size:11px;letter-spacing:.06em;margin:0 0 9px;color:#e5d5af}
.player-name>span:first-child{text-transform:uppercase;font-size:9px}.stat-line{font-size:clamp(10px,.98cqw,17px);letter-spacing:.07em;gap:5px;margin-bottom:5px;white-space:nowrap}
.resonance-label{font-size:clamp(9px,.9cqw,15px);margin-top:11px;text-transform:uppercase;letter-spacing:.1em}.resonance-label #resonance-text{font:8px system-ui,sans-serif;letter-spacing:0;color:#aee6de}
.hp-bar,.resonance-bar{height:11px}.xp-label{font:8px/1.4 system-ui,sans-serif;color:#c7c5b3;margin-top:8px;min-height:12px}
.pitch-panel.panel{min-width:0;min-height:0;padding:3px 8px 7px;border-width:12px;background:rgba(3,12,18,.84)}
.pitch-heading{height:25px;gap:10px;justify-content:center;min-width:0}.pitch-heading>span:first-child{flex:1;text-align:center;color:#f5dfab;text-transform:uppercase;font-size:clamp(12px,1.3cqw,23px);letter-spacing:.085em;font-weight:400;line-height:23px}
.pitch-heading .text-button{flex:0 0 auto;min-width:47px;min-height:22px;font-size:9px;padding:2px 0;color:#d9c38e}
.pitch-content{display:flex;align-items:stretch;gap:10px;margin-top:5px;min-width:0}
.pitch-chart{height:clamp(105px,16cqh,155px);flex:1;min-width:0;background:repeating-linear-gradient(90deg,#07131c30 0 calc(10% - 1px),#a5cfc21c calc(10% - 1px) 10%);border:1px solid #7485844f}
.guide-lane{border-color:#91aaa73d}.guide-lane>span{width:28px;top:-5px;font:10px/11px Georgia,serif;color:#e5dec7;background:#09161cf2;padding-left:2px}
.note-core{border:1px solid #ffe4a1;background:linear-gradient(180deg,#d8b152ac,#cf9d2c91);border-radius:4px;box-shadow:0 0 7px #e2b75966,inset 0 0 5px #fff0ba5c;color:#fff3ca}
.note-grace{border-color:#efe5c57a;background:#f6e7bb0d}.note-label{left:0;right:0;text-align:center;font:bold 10px/12px Georgia,serif;text-shadow:0 1px #291a07}
.score-note.active .note-core,.score-note.matched .note-core{border-color:#fff0b7;background:linear-gradient(180deg,#ffe694d4,#cea039ad);color:#201705;box-shadow:0 0 9px #ffe6a5aa,inset 0 0 5px #fff9dd90}
.score-note.partial .note-grace{border-color:#caefdb;background:#b3edd925}.score-note.matched.partial .note-core{border-color:#ffe6a4;background:#c9a75999}
.score-note.matched .note-label{text-shadow:none}.score-note.missed{opacity:.3}
.sing-line{border-left:1px solid #9dffbc;box-shadow:0 0 10px #67ff9b99}.sing-line>span{display:none}
#pitch-cursor{width:15px;height:15px;border:2px solid #eaffdf;background:#a7ffb9c7;box-shadow:0 0 0 4px #77ffae28,0 0 18px #69ff9a}
#cursor-note{right:17px;top:-5px;font:10px/13px Georgia,serif;background:#0b231bd9;color:#bbffcc;min-width:23px}
#pitch-shadow{width:13px;height:13px;border-color:#d6ffe48f;background:#a7ffc72b}
.pitch-window{opacity:.55}.pitch-window .note-core{background:#adffb60a;border-color:#a8ffc183}.pitch-window .note-grace{background:transparent;border-color:#edf1db5e}
.hold-status{flex:0 0 clamp(76px,6.9cqw,116px);width:auto;display:flex;align-items:stretch;justify-content:space-evenly;gap:0;border:1px solid #bda06561;background:#071117b8;padding:1px 5px}
.pitch-readout,#hold-ring{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;width:100%;height:auto;min-height:29px;border-radius:0;background:none;box-shadow:none;padding:3px 0;position:relative}
.pitch-readout+.pitch-readout{border-top:1px solid #bda06537}#hold-ring:before{content:none}
.pitch-readout small{font:clamp(8px,.8cqw,13px)/1.3 Georgia,serif;color:#e4d5af;letter-spacing:.02em}
.pitch-readout strong,#target-note{font:400 clamp(18px,1.65cqw,29px)/1.15 Georgia,serif;color:#f2e1bc;white-space:nowrap}
.live-readout small,.live-readout strong{color:#a0ffc3}#live-note{min-width:26px;text-align:right;flex-shrink:0}
.next-note-card{display:flex;flex-wrap:wrap;text-align:left;column-gap:3px;padding-top:3px}.next-note-card small{grid-column:auto;font-size:clamp(8px,.8cqw,13px)}.next-note-card strong{font-size:clamp(18px,1.65cqw,29px)}
#next-note-time{flex:0 0 100%;text-align:right;font:8px/1 system-ui,sans-serif;color:#b5c9be;min-height:8px;letter-spacing:0}
.note-targets{margin:7px 0 3px;display:flex;gap:4px;min-width:0}.note-target{min-width:0;flex:1;min-height:28px;font:9px/1.2 system-ui,sans-serif;color:#e1d3af;border-color:#bba06957;background:#071116d9;border-radius:2px;padding:3px 0}
.note-target.current{color:#ffe5a1;background:#4f411fd9}.note-target.held{border-color:#a4ffc1;background:#4a87504f;color:#e0ffdf}
.pitch-foot{height:auto;min-height:23px;position:relative;display:flex;align-items:center;justify-content:space-between;gap:7px;padding-top:5px;white-space:normal;overflow:visible}
#input-hint{font:8px/1.25 system-ui,sans-serif;color:#b3c3be;flex:1;max-width:30%;overflow:hidden}
.pitch-foot .pitch-badge{position:relative;flex:0 1 auto;max-width:55%;width:auto;min-width:110px;height:24px;min-height:24px;display:grid;align-items:center;overflow:hidden;border:5px solid transparent;border-image:url('assets/ui/gold-frame.png') 150 / 9px stretch;background:#10291fe6;padding:0 5px;color:#d1f9cd;text-align:center;text-transform:uppercase;letter-spacing:.045em;font:clamp(8px,.78cqw,14px)/1 Georgia,serif;white-space:nowrap;box-shadow:0 0 12px #5af39125}
#pitch-panel[data-match=idle] .pitch-badge,#pitch-panel[data-match=listening] .pitch-badge{background:#0c171ce6;color:#dfd6b7;box-shadow:none}
#pitch-panel[data-match=partial] .pitch-badge{background:#3c301ce6;color:#ffe4aa}
.score-summary{flex:0 0 auto;display:flex;align-items:center;justify-content:end;gap:6px;font:8px/1.2 system-ui,sans-serif;color:#c8d9ca;white-space:nowrap}
#song-points{flex:0 0 auto;min-width:0;font:inherit;color:#c6eac9}#song-accuracy{font:inherit;min-width:0}#turn-clock{font:inherit;width:auto;min-width:16px}
.battle-menu.panel{min-height:0;padding:6px 4px 5px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;border-width:8px;background:#050e13ba}
.battle-menu .menu-item{display:flex;align-items:center;justify-content:start;flex-direction:column;gap:2px;min-width:0;min-height:76px;padding:3px 0;background:none;border:0;box-shadow:none;text-align:center;color:#f1e1bb;font:clamp(10px,.9cqw,16px)/1.2 Georgia,serif}
.menu-item.selected:before{content:none}.menu-item .command-icon{display:block;flex:0 0 auto;width:clamp(40px,3.8cqw,70px);height:clamp(40px,3.8cqw,70px);background-image:url('assets/ui/command-icons.png');background-size:200% 200%;background-repeat:no-repeat;filter:saturate(.7);transition:filter .15s}
.menu-item[data-action=sing] .command-icon{background-position:0 0}.menu-item[data-action=melodies] .command-icon{background-position:100% 0}.menu-item[data-action=guard] .command-icon{background-position:0 100%}.menu-item[data-action=items] .command-icon{background-position:100% 100%}
.menu-item.selected .command-icon,.menu-item:hover:not(:disabled) .command-icon,.menu-item:focus-visible .command-icon{filter:saturate(.9) brightness(1.3) drop-shadow(0 0 4px #e5c27690)}
.menu-item:disabled{opacity:.65}.menu-item kbd{font:8px/1 system-ui,sans-serif;color:#b8baa9}.menu-item:focus-visible{outline:1px solid #f2ddae;outline-offset:1px}
.command-popover{right:3cqw;bottom:30cqh;border-width:12px;background:#061218f5}.popover-title{color:#efd7a4}.choice-button{border-color:#bda06540}
.welcome-card,.cinematic,.defeat-card,.character-card,.dialogue-card{background-color:#061118ed}
@media(max-width:1100px){
 .bottom-hud{grid-template-columns:minmax(145px,20%) minmax(0,1fr) minmax(125px,16%);gap:1cqw}
 .battle-menu.panel{grid-template-columns:repeat(2,minmax(0,1fr));padding:4px;gap:1px}.battle-menu .menu-item{min-height:63px;gap:0}.menu-item .command-icon{width:40px;height:40px}.menu-item kbd{display:none}
 .player-status.panel{gap:6px}.portrait-frame{flex-basis:62px;height:112px}.player-name{font-size:9px;margin-bottom:7px}.player-name>span:first-child{font-size:7px}.resonance-label #resonance-text{display:none}.xp-label{font-size:7px;line-height:1.3}
 .pitch-panel.panel{padding:2px 5px 5px;border-width:10px}.pitch-heading>span:first-child{font-size:12px}.pitch-heading .text-button{font-size:8px;min-width:40px}.pitch-content{gap:6px}.pitch-readout small{font-size:8px}.pitch-readout strong,#target-note,.next-note-card strong{font-size:19px}.hold-status{flex-basis:76px;padding:0 4px}.pitch-foot .pitch-badge{min-width:100px;font-size:8px}.score-summary{font-size:7px;gap:4px}#input-hint{max-width:25%;font-size:7px}.pitch-heading{height:23px}.guide-lane>span{font-size:9px}
}
@media(orientation:landscape) and (max-height:600px){
 .world-header{padding-top:3cqh}.world-header .wordmark h1{font-size:clamp(14px,2.1cqw,22px)}.wordmark p{font-size:9px}.gold-rule{height:7px;margin-top:5px}.enemy-status.panel{min-width:170px;width:25cqw}.enemy-title{font-size:12px}.enemy-title #enemy-level{font-size:8px}.enemy-bar{height:9px;margin:5px 0}.enemy-detail{font-size:7px}.top-actions{top:3cqh}
 .bottom-hud{bottom:max(2cqh,env(safe-area-inset-bottom))}.pitch-chart{height:clamp(75px,23cqh,112px)}.pitch-panel.panel{border-width:9px;padding:0 4px 3px}.pitch-heading{height:19px;gap:3px}.pitch-heading>span:first-child{font-size:11px;line-height:18px;letter-spacing:.03em}.pitch-heading .text-button{min-height:18px;font-size:7px;min-width:36px}.pitch-content{margin-top:2px;gap:5px}.hold-status{flex-basis:69px}.pitch-readout,#hold-ring{min-height:23px;padding:1px 0}.pitch-readout small,.next-note-card small{font-size:7px}.pitch-readout strong,#target-note,.next-note-card strong{font-size:17px}#next-note-time{font-size:7px;min-height:7px}.guide-lane>span{font-size:8px;line-height:9px;top:-4px;width:24px}.note-label{font-size:9px;line-height:10px}#cursor-note{font-size:8px}.note-targets{gap:3px;margin:4px 0 0}.note-target{min-height:27px;font-size:8px}.pitch-foot{min-height:21px;padding-top:3px;gap:4px}.pitch-foot .pitch-badge{min-width:96px;min-height:22px;height:22px;font-size:8px;border-width:4px}#input-hint{display:none}.score-summary{margin-left:auto;font-size:7px}
 .portrait-frame{flex-basis:54px;height:94px;border-width:6px;border-image-width:10px}.player-stats{padding-block:4px}.player-name{font-size:8px;margin-bottom:6px}.player-name>span:first-child{font-size:7px}.stat-line{font-size:10px;letter-spacing:.03em;margin-bottom:4px}.resonance-label{font-size:8px;margin-top:7px}.hp-bar,.resonance-bar{height:8px;padding:1px}.xp-label{margin-top:5px;font-size:6px}.battle-menu.panel{border-width:6px;padding:3px}.battle-menu .menu-item{min-height:55px;font-size:10px}.menu-item .command-icon{width:34px;height:34px}.command-popover{bottom:49cqh;right:3cqw;padding:7px 10px;width:265px}
 #turn-banner{top:17cqh;left:51%}#turn-title{font-size:16px}#turn-eyebrow{font-size:7px}#turn-detail{font-size:9px}
}
@media(orientation:landscape) and (max-width:760px){
 .bottom-hud{left:max(1.6cqw,env(safe-area-inset-left));right:max(1.6cqw,env(safe-area-inset-right));grid-template-columns:128px minmax(0,1fr) 106px;gap:6px}.portrait-frame{flex-basis:45px;height:84px}.player-status.panel{gap:4px}.player-stats{padding-right:1px}.player-name>span:first-child{display:none}.player-name{justify-content:end;font-size:7px;margin-bottom:4px}.stat-line{font-size:9px;gap:2px}.resonance-label{font-size:7px}.xp-label{font-size:6px}.battle-menu .menu-item{font-size:9px;min-height:51px}.menu-item .command-icon{width:32px;height:32px}.hold-status{flex-basis:60px;padding-inline:3px}.pitch-readout small,.next-note-card small{font-size:6px}.pitch-readout strong,#target-note,.next-note-card strong{font-size:15px}.pitch-heading>span:first-child{font-size:9px}.pitch-heading .text-button{font-size:6px;min-width:32px}.pitch-foot .pitch-badge{font-size:7px;min-width:82px;padding-inline:2px}.score-summary{font-size:6px;gap:3px}.note-target{font-size:7px;min-height:27px}.note-label{font-size:8px}
}
.pitch-foot{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
#input-hint{max-width:none;grid-column:1}.pitch-foot .pitch-badge{grid-column:2;max-width:none;justify-self:center;font-size:clamp(9px,.8cqw,14px)}
.score-summary{grid-column:3;justify-self:end;margin-left:0}
#pitch-feedback.pitch-badge{width:auto;max-width:none;height:26px;min-height:26px;font:clamp(9px,.8cqw,14px)/1 Georgia,serif;line-height:1;letter-spacing:.045em;overflow:hidden}
body[data-input=mic] .note-targets{display:none}
@media(orientation:landscape) and (max-height:600px){#pitch-feedback.pitch-badge{font-size:8px;height:22px;min-height:22px}}
@media(orientation:landscape) and (max-width:760px){#pitch-feedback.pitch-badge{font-size:7px}}
