/* v0.8 — an intimate, hand-drawn basement theater. */
.overlay-songs{display:block;margin:0 auto 12px;padding:9px 17px;min-height:39px;border:1px solid #8b795d;color:#d0bfa0;background:#332f27;border-radius:2px;font:13px var(--story-font)}
.overlay{border-color:#77654e!important;box-shadow:0 0 0 3px #131410,inset 0 0 0 1px #4c4334!important;border-radius:4px!important}.direction-pad{background:#252620!important;box-shadow:0 5px #12130f!important;border-color:#5c6050!important}.fan-chip strong{color:#c6b28c}.result b{color:#d2bba0}.songline .album{flex-shrink:0}
:root{color:#ddd3bf;background:#151412;--ink:#171613;--paper:#e3dccb;--rust:#91686a;--line:#6c6255}
body{background:radial-gradient(ellipse at 50% 0,#3a3027,transparent 70%),#131311;color:var(--paper)}
button:focus-visible{outline:2px solid #cbbb96;outline-offset:3px}
.cabinet{background:#302e29;border:2px solid #5c5549;border-radius:12px 12px 36px 12px;box-shadow:inset 0 0 0 3px #151512,0 15px 50px #0009}
.brand{font-size:17px;color:#e0d6c3;font-style:normal}.brand em{font:8px monospace;letter-spacing:2px;color:#a99a83;margin-top:5px}.brand-star{color:#a8906a;text-shadow:none;font-size:22px}
.top-actions{gap:4px}.top-actions button{background:#292722;border:1px solid #61584c;border-radius:3px;color:#cabca6;box-shadow:0 2px #0c0c0a;font-size:9px;padding:7px}
.screen{background:#191a17;border:1px solid #776c5a;border-radius:3px;box-shadow:inset 0 0 18px #0009;padding:9px 8px 0}
.hud small,.energy-box span{color:#b1a38e}.hud b{color:#e1d5bc;text-shadow:none;font-style:normal}
progress,progress::-webkit-progress-bar{background:#37332e;border-color:#82725b}progress::-webkit-progress-value{background:#9c756e;border-radius:1px}
.stage{background:radial-gradient(ellipse at 50% 120%,#73543a88,transparent 65%),repeating-linear-gradient(90deg,#241c19 0 16px,#382922 18px 40px,#1c1815 42px 52px);border:1px solid #655340;border-radius:1px;box-shadow:inset 0 0 25px #000a;height:clamp(125px,19dvh,170px)}
.stage::before,.stage::after{content:'';position:absolute;top:17px;width:5px;height:8px;background:#e1c599;border-radius:50%;box-shadow:0 0 13px 4px #ba945155;z-index:1}.stage::before{left:15%}.stage::after{right:15%}
.stage-label{color:#b6a38a;font-size:7px}.stage-label span:last-child{color:#e0d4be}.stage-lights{filter:sepia(1);opacity:.12}.sparkles{display:none}.crowd{color:#b8996f;opacity:.4;letter-spacing:5px;font-size:13px}
.sprite{background-image:url('idols-theatre.png');image-rendering:auto;filter:drop-shadow(0 2px 2px #0008);width:auto;aspect-ratio:1/2}.idol>span{background:#171713bc;border-radius:0;color:#d0c1a5;font-size:10px;padding:0 4px}
.album{border-radius:2px;background:#39332c;border:1px solid #857155;color:#c7af88;font-size:16px}.songline{gap:6px;padding:7px 1px}.songline b{font-family:var(--story-font);font-size:12px;color:#e3d8c3}.songline div>span,.songline>span{color:#b2a28b;font-size:8px}.songline>span{margin-left:0;white-space:nowrap}.songline>div:nth-child(2){flex:1}.song-select{font:11px var(--story-font);color:#ddd0b8;background:#433a30;border:1px solid #8a785c;border-radius:2px;padding:6px;white-space:nowrap;box-shadow:0 2px #0d0d0b;min-height:32px}
.progress-track{background:#37322c}.progress-track div{background:#ae9370}
.board-wrap{background:#201e1b;border:2px solid #7c715e;box-shadow:0 0 0 2px #0a0b09,4px 4px #0a0b0966;border-radius:1px}.live-card>small,.next-card>small,.live-card>span,.next-card>span{color:#a79a83}.live-card>b{color:#ddd0b5;text-shadow:none;font-style:normal}.fan-chip{background:#332f29;border:1px solid #63594b;border-radius:1px;color:#c6af89;box-shadow:none}.next-card{background:#26251f;border:1px solid #615a4c;border-radius:1px}.line-chip{color:#c6b794;border-color:#514938}.beat-meter>span{color:#b4a68d}.beat-track{background:linear-gradient(90deg,#4a453b,#8c6c64);border:1px solid #9e8b6c}.beat-track b{color:#c3a578;text-shadow:none}
.controls{background:#37352f;border-top:1px solid #5f594a;box-shadow:inset 0 3px #48453c;border-radius:0 0 25px 8px}.console-mark{color:#a29883;font-size:8px;letter-spacing:1px}.console-heart{color:#716451;text-shadow:none}.direction-pad::before{background:linear-gradient(90deg,#22231f,#494940,#272923);border-color:#11120e;box-shadow:0 5px #11120e}.direction-pad button{background:linear-gradient(#4e5046,#292c25);border:1px solid #666a58;color:#d3cbb4;box-shadow:0 5px #11120e,inset 0 1px #797d68;border-radius:5px}.direction-pad small{color:#b3a48d}.action-pad .rotate,.action-pad .drop{background:radial-gradient(circle at 35% 25%,#ad837b,#6e4143 68%,#41272a);color:#e9dccc;border:2px solid #321c20;box-shadow:0 6px #181210,0 8px 5px #0007,inset 0 2px 2px #bba08c55}.action-pad .rotate{background:radial-gradient(circle at 35% 25%,#8c8875,#57594b 68%,#373b30);border-color:#23271e}.action-pad button small{color:#e3d6bd}.action-pad button:active,.direction-pad button:active,.direction-pad button.active,.action-pad button.active{transform:translateY(4px);box-shadow:0 2px #11120e,inset 0 2px 4px #0006}.controls footer{color:#b0a28d}.desktop-note{color:#8b8170}
.overlay{background:linear-gradient(#191917f5,#27231ff7);backdrop-filter:blur(3px)}.overlay .tag,.overlay .hint{color:#a79a80}.overlay h2{color:#e2d5bc}.overlay p{color:#c6bca7}.modal-star{color:#9f8c68;text-shadow:none}.primary{background:#6d4d4c;border:1px solid #b29a80;box-shadow:0 4px #100e0d;border-radius:3px;color:#eee1cb}.result{border-color:#685b49;background:#2e2a24;color:#cab99b}
.interactive-comic{background:radial-gradient(ellipse at 80% 0,#352c23,transparent 65%),#1a1916}.comic-heading>span{color:#9d8d74}.comic-heading h2{color:#e2d5bd}.comic-panel{background-image:url('prologue-theatre.png');background-color:#24221b;border:2px solid #151510;box-shadow:3px 4px #080907;image-rendering:auto;outline:1px solid #8c7e66;outline-offset:1px}
.comic-panel.panel-1{border-radius:1px 4px 2px 1px}.comic-panel.panel-2{border-radius:3px 1px 2px 2px}.comic-bubble{background:#e7e1d3;color:#26231d;border-color:#29261f;box-shadow:2px 2px #100e0966;border-radius:43% 47% 41% 48% / 18% 24% 21% 25%}.comic-bubble>span{color:#816352}.comic-bubble.speech::after{background:#e7e1d3;border-color:#29261f}.comic-bubble.thought{background:#292721ee;color:#e4d7bd;border-color:#b19c78;box-shadow:2px 3px #0e0e0a}.comic-bubble.thought>span{color:#b6a17e}.comic-bubble.narration{background:#171813ed;color:#d7cdb8;border-color:#7a6e55;box-shadow:2px 2px #090a07}.comic-bubble.narration>span{color:#af9b77}.comic-bubble.file{background:#d8ccb2;color:#332c20;border-color:#877051}.comic-help{color:#a09277}.interactive-comic .story-bottom{border-color:#534a39}.interactive-comic .story-bottom button,.story-top button{background:#2c2b24;border-color:#82735c;color:#d1c3a8;border-radius:2px}.interactive-comic .story-bottom button:last-child{background:#665247;border-color:#ad9676}.interactive-comic .story-bottom>span,.story-top{color:#b3a181}
.after-story{background:#1e1e19;color:#ddd0b6}.after-portrait{background-image:url('idols-theatre.png');image-rendering:auto}.after-portrait.rival{background-image:url('prologue-theatre.png')}.after-story h2{color:#d7c9ad}.after-story>p{color:#c5b79c}.after-actions button{background:#514137;border:1px solid #968269;color:#e5d5b8;border-radius:2px}
.song-picker{position:absolute;z-index:30;inset:0;background:#1d1e19;display:flex;flex-direction:column;padding:22px 18px;color:#ddd0b8;overflow:hidden}.picker-head{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #625847;padding-bottom:14px}.picker-head small{font:9px monospace;letter-spacing:1px;color:#a28c6c}.picker-head h2{font:23px var(--story-font);margin:9px 0 0;color:#e1d6be}.picker-head button{width:40px;height:40px;background:#34332b;color:#d0bfa0;border:1px solid #807359;border-radius:3px}#song-feedback{font-size:11px;color:#a9997b;margin:13px 0}#song-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 4px 10px 0}.track-card{display:flex;gap:12px;background:#292922;border:1px solid #534d3d;box-shadow:3px 3px #11120e;padding:15px 12px;margin-bottom:13px}.track-card.selected{border-color:#c1a37b;background:#333027}.track-index{font:italic 23px Georgia,serif;color:#8e7a57;border-right:1px solid #574d3b;padding-right:10px;align-self:stretch}.track-info{flex:1}.track-info>small{font:9px monospace;color:#b69a76;letter-spacing:.5px}.track-info h3{font:20px var(--story-font);margin:7px 0;color:#e6d9c0}.track-info em{font:italic 12px Georgia,serif;color:#a99b81}.track-info p{font-size:11px;line-height:1.6;color:#b6aa90;margin:9px 0}.track-info>span{font:10px monospace;color:#baaa89}.track-actions{display:flex;gap:9px;margin-top:13px}.track-actions button{min-height:38px;flex:1;border:1px solid #847356;background:#3f3b2f;color:#d9c9a9;border-radius:2px;font:12px var(--story-font);box-shadow:0 3px #13140f}.track-actions button:last-child{background:#664d43}.track-actions button:disabled{opacity:.7;background:#333329}.picker-foot{font-size:10px;text-align:center;color:#a29174;margin:10px 0 0}
@media(max-width:500px){.cabinet{border-radius:0;border-width:0}.brand{font-size:15px}.brand em{font-size:7px;letter-spacing:1.4px}.top-actions button{font-size:9px;padding:6px}.song-picker{padding-top:max(20px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}}
@media(max-height:730px){.stage{height:112px}.songline{padding:5px 0}.album{width:24px;height:24px}.songline b{font-size:11px}.songline div>span{font-size:7px}.songline>span{font-size:8px}.song-select{font-size:10px;min-height:29px;padding:4px}.picker-head{padding-bottom:9px}.picker-head h2{font-size:20px}.track-card{padding:12px 10px;margin-bottom:10px}.track-info p{margin:6px 0}.song-picker{padding:15px}.track-info h3{font-size:18px}.comic-bubble.thought>p{font-size:13px}.comic-bubble.narration>p{font-size:11px}}
@media(prefers-reduced-motion:reduce){.comic-reveal,.bubble-reveal{animation:none}}
.comic-bubble.speech,.comic-bubble.thought{border-radius:50%;padding:16px 22px;text-align:center}
.comic-bubble.speech::after{display:none}
.idols{align-items:flex-end;bottom:18px;height:calc(100% - 34px)}
.idol{min-width:0;flex:1 1 0}
/* Each character occupies 512 × 1024 pixels in the three-column atlas. */
.idol .sprite{flex:none;height:calc(100% - 16px);width:auto;aspect-ratio:1 / 2;min-width:0;max-width:none;background-size:300% 100%}
.after-portrait:not(.rival){width:70px;height:140px;aspect-ratio:1 / 2;background-size:300% 100%}
@media(max-height:730px){.stage{height:132px}.after-portrait:not(.rival){width:55px;height:110px}}
.comic-bubble.speech>p,.comic-bubble.thought>p{font-size:14px;line-height:1.45}
@media(max-height:730px){.comic-bubble.speech,.comic-bubble.thought{padding:12px 20px}.comic-bubble.speech>p,.comic-bubble.thought>p{font-size:12px}}
/* Frame the upper body at the full lane width; auto height preserves the art ratio. */
.idol .sprite{width:100%;height:calc(100% - 18px);aspect-ratio:auto;background-size:300% auto;background-position:0 0;filter:brightness(1.12) drop-shadow(0 2px 2px #0008)}
.riria .sprite{background-position:50% 0}.nerune .sprite{background-position:100% 0}
.idol>span{position:relative;z-index:2;font-size:11px;line-height:18px;padding:0 7px;background:#181711e8}
/* v0.9: compact stage, large chibi faces, wider board and thumb controls. */
header{height:34px;padding-bottom:4px}.brand{font-size:14px}.brand em{font-size:7px}.brand-star{font-size:19px}
.hud{gap:8px;padding-bottom:5px}.hud b{font-size:15px}.hud small{font-size:7px}.hud progress{height:6px;margin-top:4px}
.stage{height:118px}.stage-label{font-size:7px;padding:4px 6px}
.idols{bottom:2px;height:calc(100% - 18px);left:8px;right:8px}
.idol .sprite{background-image:url('idols-nocturne.png');height:calc(100% - 16px);width:auto;aspect-ratio:1;flex:none;background-size:300% 100%;background-position:0 0;image-rendering:pixelated;filter:drop-shadow(0 2px 1px #0008)}
.riria .sprite{background-position:50% 0}.nerune .sprite{background-position:100% 0}
.idol>span{font-size:10px;line-height:14px;padding:0 5px}.crowd{display:none}
.songline{padding:4px 0}.songline .album{width:23px;height:23px}.songline b{font-size:11px}.songline div>span{font-size:8px}
.board-layout{gap:8px;padding-top:7px}.board-wrap{aspect-ratio:8 / 12}.live-card,.next-card{width:45px}.next-card{padding:5px 0}.fan-chip{padding:4px 5px;margin-top:6px}.live-card .micro{font-size:7px;margin-top:5px}.live-card>b{font-size:22px}.line-chip{padding-top:3px}
.controls{height:220px;flex-shrink:0;padding-left:12px;padding-right:12px}.console-mark{padding-top:9px;font-size:7px}.control-deck{height:165px}
.direction-pad{width:142px;height:78px}.direction-pad::before{height:112px;width:48px;top:-17px;left:47px}.direction-pad button{width:64px;height:70px;font-size:25px;border-radius:8px}.direction-pad small{bottom:-27px;font-size:8px}
.action-pad{height:150px;width:145px}.action-pad .rotate{width:65px;height:65px}.action-pad .drop{width:82px;height:82px}.action-pad button span{font-size:29px}.action-pad button small{font-size:12px}.console-heart{display:none}.controls footer{font-size:8px;padding-top:4px}
.story-vocal{position:absolute;left:50%;bottom:75px;transform:translateX(-50%);z-index:20;background:#e7dfccec;color:#362b23;border:1px solid #a58b65;border-radius:50%;padding:10px 20px;font:14px var(--story-font);pointer-events:none;animation:comic-in .2s ease-out}
@media(max-height:730px){.stage{height:108px}.controls{height:190px}.control-deck{height:139px}.action-pad{height:133px;width:137px}.action-pad .rotate{width:60px;height:60px}.action-pad .drop{width:76px;height:76px}.direction-pad{width:132px;height:72px}.direction-pad::before{left:44px;width:44px;height:102px;top:-15px}.direction-pad button{width:59px;height:65px}.beat-meter{padding-top:6px;padding-bottom:7px}.controls footer{font-size:7px}.console-mark{padding-top:7px}}
@media(max-width:360px){.controls{padding-left:8px;padding-right:8px}.direction-pad{width:122px}.direction-pad button{width:54px}.direction-pad::before{left:39px}.action-pad{width:124px}.action-pad .rotate{width:56px;height:56px}.action-pad .drop{width:70px;height:70px}.brand{font-size:12px}.brand em{letter-spacing:.5px}.top-actions button{padding:6px 4px}}
@media(prefers-reduced-motion:reduce){.story-vocal{animation:none}}
/* Stage characters only: larger pixel dolls, no changes to stage or page dimensions. */
.stage .idols{height:calc(100% - 8px);bottom:0}
.stage .idol{position:relative;container-type:size}
.stage .idol .sprite{background-image:url('idols-stage-dolls.png');width:min(100cqw,100cqh);height:auto;aspect-ratio:1;flex:none;max-width:none;background-size:300% 100%;image-rendering:pixelated}
.stage .idol>span{position:absolute;bottom:0;left:50%;transform:translateX(-50%);white-space:nowrap}
