/* Arcade cabinet layout. The sidebar's remaining height belongs to the info card. */
body{height:100dvh;overflow:hidden;font-family:'DejaVu Sans Mono','Courier New',monospace}
main{height:100dvh;max-width:1800px;padding:14px;gap:10px;grid-template-rows:64px 42px minmax(0,1fr)}
main>header{gap:20px;padding:0 4px 8px;border-bottom:1px solid #333333;min-width:0}
.brand{flex:none;gap:12px;font-size:25px;line-height:1;letter-spacing:1px}.brand-icon{display:flex;align-items:center;justify-content:center;width:46px;height:46px;padding:0;font-size:29px;border:2px solid #ffe000}.brand-icon span{font-size:17px;padding:0;color:#ffe000}.brand .brand-wordmark{display:block;white-space:nowrap}.brand .brand-wordmark small{display:block;margin-top:7px;font-size:12px;letter-spacing:4px;color:#ffe000}
.header-controls{flex-wrap:nowrap;gap:7px;min-width:0}.header-controls button{min-height:34px;padding:6px 9px;font-size:10px;letter-spacing:.4px;box-shadow:0 3px #0d0d0d}.coin-wallet,.highscore{min-height:34px;padding:5px 8px;gap:6px;border-width:1px;box-shadow:none}.highscore strong{font-size:19px}.highscore span{font-size:8px}
.arena-heading{min-width:0;gap:16px;padding:0 6px}.contest{font-size:15px;gap:8px}.contest .versus{font-size:10px}.ai-gap-readout{padding-left:10px}.ai-gap-readout>span{font-size:8px}#ai-gap{font-size:18px}.round-heading h1{font-size:19px;margin:0}.round-heading p{display:block;font-size:11px;margin:4px 0 0}
.play-layout{grid-template-columns:minmax(0,1fr) 326px;grid-template-rows:minmax(0,1fr);gap:14px;min-height:0;min-width:0}
.game-shell{display:grid;grid-template-rows:26px 54px minmax(0,1fr) auto auto auto 34px;min-height:0;min-width:0}.game-shell>.camera-bar{grid-row:1}.game-shell>.arcade-hud{grid-row:2}.game-shell>.media-well{grid-row:3}.game-shell>.room-card{grid-row:4}.game-shell>.power-controls{grid-row:5}.game-shell>.shortcut-strip{grid-row:6}.game-shell>.status-bar{grid-row:7}
.camera-bar{padding:4px 12px;font-size:10px}.arcade-hud{display:grid;grid-template-columns:1.15fr 1fr 1fr 1fr;gap:0;padding:6px 12px;font-size:10px}.arcade-hud>div:not([hidden]){display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;min-width:0;margin:0;height:100%;border-right:1px solid #2b2b2b}.arcade-hud>div:last-child{border:0}.coin-hud>span:first-child{display:none}.coin-hud>span,.mice-hud>span,.points-hud>span,#lives-label{font-size:8px;letter-spacing:.5px}#live-points,#round-coins,.mice-hud strong{font-size:23px;line-height:1}#shields{gap:3px;height:24px}#shields i{width:22px;height:23px;font-size:25px}
.media-well{padding:0 8px 0 48px;min-height:0}.viewport{max-width:100%;max-height:100%}.distance-meter{left:6px}.start-panel{overflow:visible;padding:18px;gap:9px;justify-content:center}.start-avatar{display:block;height:clamp(46px,11vh,92px);width:auto}.insert-coin{margin:0;font-size:10px}.start-panel h2{font-size:clamp(18px,2.1vw,29px);line-height:1.2;margin:3px 0}.start-panel>p{font-size:12px;line-height:1.5;margin:0}.start-panel .level-story{font-size:11px!important;margin:0!important}.start-panel button{min-height:44px;padding:8px 24px;font-size:15px;margin-top:5px}
.power-controls{gap:6px;padding:8px 10px}.shop-label{width:100%;font-size:9px;letter-spacing:1px}.power-controls button{flex:1 1 0;min-width:0;min-height:34px;padding:6px;font-size:10px;letter-spacing:0;box-shadow:0 3px #0d0d0d}#inventory{width:100%;font-size:9px;margin:2px 0 0}.shortcut-strip{justify-content:center;gap:4px 12px;padding:6px 10px;font-size:9px}.shortcut-strip button{min-height:26px;padding:3px 6px;font-size:9px;letter-spacing:0}.status-bar{height:34px;padding:4px 12px}#status{font-size:9px;letter-spacing:.5px}.timer{font-size:22px}.time-track{bottom:4px;height:2px}
.sidebar{display:flex;flex-direction:column;gap:8px;min-height:0;overflow:visible;padding:0}.player-card{order:0;flex:0 0 46px;min-height:0;padding:5px 10px;gap:10px}.player-card img{height:36px;width:30px}.player-card small{font-size:8px}.player-card strong{font-size:15px}#mode-label{font-size:8px}.story-card{order:1;flex:none;padding:9px;gap:9px}.hunter-scene{width:40px;height:56px}.hunter-scene img{width:36px;height:48px}.story-copy>strong{font-size:10px}.story-copy>span{font-size:8px;margin:3px 0}.story-copy p{font-size:10px;line-height:1.35;margin:5px 0}.story-copy small,.story-copy #story-hint,.story-copy #story-catches{display:block;font-size:8px;line-height:1.35;margin-top:4px}.story-progress{height:4px;margin:4px 0}
.sidebar .score-card{order:2;flex:1;min-height:0;padding:14px;overflow:visible}#round-brief h2{font-size:24px;line-height:1.2;margin:9px 0}#round-brief h2 br{display:none}#round-brief h2 span{display:block;color:#ffe000}#round-brief>p{font-size:11px;line-height:1.5;margin:6px 0}.panel-label{font-size:9px;letter-spacing:1px}
.how-to{max-width:none;width:100%;padding:10px 0 0;margin:10px 0 0;border-bottom:0}#tracking-guide{grid-template-columns:1fr;gap:9px;text-align:left}#tracking-guide li{display:grid;grid-template-columns:28px 1fr;grid-template-rows:auto auto;column-gap:9px;padding:0}#tracking-guide .guide-symbol{grid-row:1/3;align-self:center;font-size:22px!important;line-height:1!important;margin:0}#tracking-guide b{font-size:11px;margin:0}#tracking-guide span:not(.guide-symbol){font-size:10px;line-height:1.5}.how-to #guide-footer{font-size:9px;line-height:1.5;margin:10px 0 0!important}
#result{display:grid;gap:8px}#result[hidden]{display:none}#result>.panel-label{display:block;font-size:9px}#verdict{font-size:20px;line-height:1.2;margin:0}.result-points{flex-direction:row;justify-content:space-between;align-items:baseline;padding:0 0 8px;gap:8px}.result-points>span{font-size:9px}.result-points #points{font-size:27px}.result-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;gap:6px}.result-grid>div{gap:4px;min-width:0}.result-grid span{font-size:8px;letter-spacing:0}.result-grid strong{font-size:18px}.ai-comparison{display:flex;align-items:center;gap:10px;padding:8px 0 0;margin:0}.ai-comparison .match-heading{flex-direction:row;justify-content:space-between;align-items:center;flex:1}.ai-comparison .match-meter{width:35%;height:9px}.ai-comparison span{font-size:8px}.ai-comparison strong{font-size:17px}#level-detail{display:block;font-size:10px;line-height:1.4;margin:0}.story-ai-note{font-size:8px;line-height:1.4;margin:0}.result-total{display:flex;padding-top:7px;font-size:9px}.result-total #total{font-size:16px}.result-actions{flex-direction:row;gap:6px;margin:2px 0 0}.result-actions button{flex:1;min-height:34px;padding:5px;font-size:9px;letter-spacing:0}.track-toggle{font-size:9px}.track-toggle input{width:14px;height:14px}#run-overview{min-height:30px;margin:0;padding:4px;font-size:9px}
.room-card.multiplayer{display:grid;grid-template-columns:auto auto 1fr auto;min-height:0;max-height:none;gap:6px 12px;padding:8px 12px;clip-path:none;border:0;border-top:1px solid #444444}.room-card .room-title strong{font-size:14px}.room-card .room-meta{font-size:8px;align-self:center}.room-card #room-status{font-size:9px;line-height:1.35;min-height:0;margin:0;align-self:center}.room-card .room-actions button{min-height:30px;padding:4px 8px;font-size:9px;letter-spacing:0}.room-card.multiplayer .players{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.room-card.multiplayer .player-row{grid-template-columns:23px minmax(0,1fr) auto;min-height:0;padding:4px;gap:2px 5px}.room-card.multiplayer .peer-name{font-size:10px}.room-card.multiplayer .peer-score{font-size:11px}.room-card.multiplayer .peer-status,.room-card.multiplayer .peer-detail{font-size:7px;line-height:1.3}
.story-ending{position:absolute;left:18px;right:18px;bottom:18px;z-index:6;margin:0;padding:14px;background:#151515f5}.story-ending button{width:auto;min-height:34px;font-size:11px;padding:6px 18px}.game-shell[data-replaying=true] .story-ending{display:none}
.game-shell::after,main::after{animation-play-state:paused}.game-shell[data-playing=true]::after,html[data-playing=true] main::after{animation-play-state:running}
@media(prefers-reduced-motion:reduce){.game-shell::after,main::after{animation:none!important}}
/* Keep the restored story and character windows in portrait format. */
dialog{padding:20px!important;max-height:calc(100dvh - 28px);overflow:auto}
#intro-dialog,#intro-dialog[data-step="-1"],.web-story,#achievement-dialog,.bed-story{width:min(560px,calc(100vw - 28px));max-width:560px;text-align:center}#intro-dialog[data-step="-1"]:not([open]){display:none}#intro-dialog[data-step="-1"][open]{display:block}#intro-dialog[data-step="-1"] h2{font-size:26px;line-height:1.25;margin:12px auto 18px}.intro-scene,#intro-dialog[data-step="-1"] .intro-scene{width:100%;max-height:24vh;margin:14px auto;aspect-ratio:240/112}#intro-prologue{max-width:440px;margin:18px auto 20px;text-align:left}#intro-prologue p{font-size:14px;line-height:1.55;margin:0 0 12px}#intro-prologue #prologue-call{font-size:13px}#intro-dialog[data-step="-1"] #intro-fiction{max-width:440px;margin:12px auto 0}
#player-dialog{width:min(520px,calc(100vw - 28px));max-width:520px}#profile-form{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.dialog-heading,#profile-title,.name-label,#name-input,.character-label,.avatar-grid,.track-color-choice,.debug-choice,.lan-hint,#profile-status,#profile-error{grid-column:1/-1}.dialog-heading,#profile-title,.name-label,.character-label,.track-color-choice,.difficulty-choice,.debug-choice,.mode-actions,.join-row,.lan-hint{margin:0}#profile-title{font-size:24px}#name-input{height:38px;font-size:15px}.avatar-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.character-choice{padding:5px}.character-choice img{height:60px}.track-color-choice{display:grid;grid-template-columns:120px minmax(0,1fr);gap:6px 10px;font-size:10px}.color-swatches{gap:7px}.color-swatches button{min-height:30px;padding:4px;font-size:9px}.track-color-choice>span{grid-column:2;font-size:8px}.difficulty-choice{justify-content:space-between;font-size:10px}.difficulty-choice select{max-width:100%;font-size:10px;padding:7px}.debug-choice{font-size:9px}.debug-choice input{width:17px;height:17px}.mode-actions button,.join-row button{min-height:34px;font-size:10px}.join-row input{min-width:0;height:34px;font-size:13px}.lan-hint{font-size:9px}#reset-settings{min-height:30px;font-size:9px}
.investment-modal{width:min(560px,calc(100vw - 28px));max-width:560px}.investment-items{grid-template-columns:1fr;gap:8px;margin:12px 0}.investment-items section{display:grid;grid-template-columns:90px 1fr;column-gap:12px;padding:8px}.investment-items img{grid-column:1;grid-row:1/4;width:90px;height:70px;object-fit:cover;align-self:center;margin:0}.investment-items strong,.investment-items p,.investment-items small{grid-column:2}.investment-items strong,.investment-items p{font-size:11px}.investment-items p{margin:5px 0}.investment-items small{font-size:8px;margin-top:4px}
.bed-story{border-color:#ffe000;background:radial-gradient(ellipse at 50% 10%,#30303066,transparent 70%),#151515}.bed-story h2{color:#ffe000;font-size:26px;line-height:1.2}.bed-badge{display:inline-block;padding:6px 10px;border:1px solid #ffe000;background:#212121;color:#efefef;font-size:9px;letter-spacing:1px}.bed-story .bed-scene{aspect-ratio:240/140;max-height:29vh}.bed-story .story-caption{font-size:14px;line-height:1.5;margin:13px 0 9px}.bed-story .bed-punchline{font-size:17px;line-height:1.45;color:#ffe000;margin:8px 0 14px;font-weight:bold}.bed-catches{display:block;font-size:14px;color:#ffe000;border-top:1px solid #3b3b3b;padding-top:12px;margin:10px 0 14px}.bed-story button{width:100%;min-height:40px;font-size:11px}
@media(max-height:800px) and (min-width:761px){
 main{padding:10px;gap:8px;grid-template-rows:56px 34px minmax(0,1fr)}.brand{font-size:22px}.brand .brand-wordmark small{font-size:10px}.brand-icon{width:40px;height:40px}.header-controls button{min-height:32px;font-size:9px;padding:5px 7px}.round-heading h1{font-size:16px}.round-heading p{font-size:10px}.play-layout{grid-template-columns:minmax(0,1fr) 304px;gap:12px}.game-shell{grid-template-rows:24px 46px minmax(0,1fr) auto auto auto 30px}.sidebar{gap:6px}.player-card{flex-basis:40px;padding:3px 9px}.player-card img{height:31px}.story-card{padding:7px;gap:7px}.story-copy p{font-size:9px;margin:4px 0}.story-copy small,.story-copy #story-hint,.story-copy #story-catches{font-size:7px;margin-top:3px}.hunter-scene{width:32px;height:44px}.hunter-scene img{width:30px;height:39px}.sidebar .score-card{padding:10px}#result{gap:6px}#verdict{font-size:18px}.result-points{padding-bottom:6px}.result-points #points{font-size:24px}.result-grid strong{font-size:17px}#level-detail{font-size:9px}.story-ai-note{font-size:7px}.result-actions button{min-height:30px;font-size:8px}#round-brief h2{font-size:21px;margin:7px 0}#round-brief>p{font-size:10px}.how-to{padding-top:8px;margin-top:8px}#tracking-guide{gap:7px}#tracking-guide b{font-size:10px}#tracking-guide span:not(.guide-symbol){font-size:9px}.how-to #guide-footer{font-size:8px}.power-controls{padding:6px 8px;gap:5px}.power-controls button{min-height:30px;font-size:9px}.shortcut-strip{font-size:8px;gap:3px 10px;padding:4px 8px}.shortcut-strip button{font-size:8px;min-height:24px}#inventory{font-size:8px}.status-bar{height:30px}#status{font-size:8px}
}
@media(max-width:1100px) and (min-width:761px){.brand{font-size:20px;gap:8px}.brand .brand-wordmark small{font-size:9px;letter-spacing:3px}.brand-icon{width:36px;height:36px}.header-controls{gap:5px}.header-controls button{font-size:8px;padding:5px 6px}.highscore strong{font-size:16px}.play-layout{grid-template-columns:minmax(0,1fr) 290px}.room-card.multiplayer{grid-template-columns:auto 1fr auto}.room-card .room-meta{grid-column:1}.room-card #room-status{grid-column:2}.room-card .room-actions{grid-column:3;grid-row:1/3}}
@media(max-width:760px){
 main{padding:8px;gap:7px;grid-template-rows:auto 34px minmax(0,1fr)}main>header{display:grid;grid-template-columns:1fr;gap:9px;padding-bottom:7px}.brand{font-size:20px;gap:9px}.brand .brand-wordmark{display:flex;align-items:baseline;gap:8px}.brand .brand-wordmark small{font-size:9px;letter-spacing:1px;margin:0}.brand-icon{width:30px;height:30px;font-size:20px}.brand-icon span{font-size:13px}.header-controls{justify-content:space-between;gap:4px;flex-wrap:nowrap}.header-controls button{min-height:28px;font-size:8px;letter-spacing:0;padding:4px}.coin-wallet,.highscore{min-height:28px;padding:3px 5px}.highscore span{display:none}.highscore strong{font-size:14px}.coin-wallet{font-size:12px}.arena-heading{padding:0;gap:6px}.contest{font-size:11px;gap:4px}.contest .versus{font-size:8px;padding:2px}.ai-gap-readout{padding-left:5px;margin:0}.ai-gap-readout>span{font-size:6px;letter-spacing:0}#ai-gap{font-size:13px}.round-heading h1{font-size:12px}.round-heading p{font-size:8px}
 .play-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1.2fr) minmax(0,1fr);gap:9px}.game-shell{grid-template-rows:20px 38px minmax(0,1fr) auto auto auto 24px}.camera-bar{font-size:8px;padding:3px 8px}.arcade-hud{padding:3px 6px}#live-points,#round-coins,.mice-hud strong{font-size:17px}#lives-label,.coin-hud>span,.mice-hud>span,.points-hud>span{font-size:7px}#shields{height:19px}#shields i{font-size:20px;width:18px;height:19px}.media-well{padding-left:38px;padding-right:4px}.distance-meter{width:30px;left:3px;gap:3px;font-size:6px}.distance-meter strong{font-size:6px}.start-avatar{display:none}.start-panel{padding:9px;gap:4px}.insert-coin{font-size:8px}.start-panel h2{font-size:17px;margin:0}.start-panel>p{font-size:9px;line-height:1.3}.start-panel .level-story{font-size:8px!important}.start-panel button{min-height:30px;padding:4px 14px;font-size:11px}.power-controls{padding:4px 6px;gap:4px}.shop-label{width:auto;flex:0 0 64px;font-size:7px;letter-spacing:0}.power-controls button{font-size:8px;min-height:26px;padding:3px}#inventory{font-size:7px}.shortcut-strip{gap:2px 6px;padding:3px 6px;font-size:7px;line-height:1.3}.shortcut-strip button{font-size:7px;min-height:20px;padding:2px 4px}.status-bar{height:24px;padding:3px 8px}#status{font-size:7px}.timer{font-size:17px}
 .sidebar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:34px minmax(0,1fr);gap:5px 8px}.player-card{grid-column:1;grid-row:1;padding:3px 6px;gap:6px;min-height:0}.player-card img{height:26px;width:23px}.player-card strong{font-size:11px}.player-card small{font-size:7px}.story-card{grid-column:1;grid-row:2;padding:6px;gap:5px;min-height:0}.hunter-scene{width:25px;height:36px}.hunter-scene img{height:32px;width:24px}.story-copy>strong{font-size:8px}.story-copy>span{font-size:6px}.story-copy p{font-size:8px;line-height:1.25;margin:3px 0}.story-copy small,.story-copy #story-hint,.story-copy #story-catches{font-size:6px;line-height:1.2;margin-top:3px}.sidebar .score-card{grid-column:2;grid-row:1/3;padding:8px;min-height:0}#round-brief .panel-label{font-size:8px}#round-brief h2{font-size:16px;margin:4px 0}#round-brief>p{font-size:8px;line-height:1.3;margin:3px 0}#round-brief>p br{display:none}.how-to{padding-top:5px;margin-top:5px}#tracking-guide{gap:4px}#tracking-guide li{grid-template-columns:18px 1fr;column-gap:4px}#tracking-guide .guide-symbol{font-size:15px!important}#tracking-guide b{font-size:8px}#tracking-guide span:not(.guide-symbol){font-size:7px;line-height:1.2}.how-to #guide-footer{font-size:7px;margin-top:5px!important}
 #result{gap:5px}#result>.panel-label{font-size:7px}#verdict{font-size:13px}.result-points{padding-bottom:4px}.result-points>span{font-size:7px}.result-points #points{font-size:18px}.result-grid span{font-size:6px}.result-grid strong{font-size:12px}.ai-comparison{padding-top:4px;gap:5px}.ai-comparison span{font-size:6px}.ai-comparison strong{font-size:12px}#level-detail{font-size:7px;line-height:1.25}.story-ai-note{font-size:6px;line-height:1.2}.result-total{font-size:7px;padding-top:4px}.result-total #total{font-size:11px}.result-actions{gap:4px;margin:0}.result-actions button{min-height:26px;font-size:7px;padding:3px}.track-toggle{font-size:7px}#run-overview{min-height:23px;font-size:7px}
 .story-ending{left:10px;right:10px;bottom:10px;padding:10px}.story-ending strong{font-size:11px}.story-ending p{font-size:9px}.story-ending small{font-size:8px}.story-ending button{min-height:26px;font-size:9px;padding:4px 10px}.room-card.multiplayer{grid-template-columns:auto 1fr auto;padding:4px 6px;gap:4px 6px}.room-card .room-title strong{font-size:10px}.room-card .room-meta{grid-column:1;font-size:6px}.room-card #room-status{grid-column:2;font-size:7px}.room-card .room-actions{grid-column:3;grid-row:1/3}.room-card .room-actions button{min-height:24px;font-size:7px;padding:3px}.room-card.multiplayer .players{gap:3px}.room-card.multiplayer .peer-name{font-size:7px}.room-card.multiplayer .peer-score{font-size:8px}.room-card.multiplayer .peer-status,.room-card.multiplayer .peer-detail{font-size:6px}
 #profile-form{gap:7px}#player-dialog .character-choice img{height:40px}.color-swatches button{font-size:8px}.track-color-choice{font-size:9px}.bed-story h2{font-size:23px}.bed-story .story-caption{font-size:12px}.bed-story .bed-punchline{font-size:14px}
}
@media(max-height:800px){#profile-form{gap:6px}.character-choice{padding:4px}.character-choice img{height:40px}.avatar-grid{gap:6px}#name-input{height:34px}.color-swatches button{min-height:27px}.mode-actions button,.join-row input,.join-row button{min-height:32px;height:32px}#intro-dialog[data-step="-1"] h2{font-size:23px;margin:8px auto 12px}#intro-dialog .intro-scene,#intro-dialog[data-step="-1"] .intro-scene{max-height:19vh;margin:10px auto}#intro-prologue{margin:12px auto 14px}#intro-prologue p{font-size:12px;line-height:1.4;margin-bottom:9px}.bed-story .bed-scene{max-height:25vh}.bed-story .bed-punchline{font-size:14px}}

/* Readable instructions before each patrol. */
.start-panel h2{font-size:clamp(22px,2.6vw,36px);overflow-wrap:anywhere}
.start-panel #start-hint{font-size:clamp(15px,1.5vw,21px);line-height:1.55;color:#ffe000;max-width:38em}
.start-panel .level-story{font-size:clamp(13px,1.2vw,17px)!important;line-height:1.5}
@media(max-width:600px){.start-panel h2{font-size:20px}.start-panel #start-hint{font-size:13px}.start-panel .level-story{font-size:11px!important}}

/* Chapters share a large illustration and a short heading. */
.start-panel #start-hint{color:#fff}
#intro-dialog,.web-story,.investment-modal,.bed-story{width:min(760px,calc(100vw - 28px));max-width:760px;padding:clamp(18px,3vw,32px)}
#intro-dialog .intro-scene,.web-story .intro-scene,.bed-story .bed-scene{max-height:none;width:100%;aspect-ratio:240/140;margin:18px auto}
.story-modal .panel-label{color:#ffe000;font-size:clamp(11px,1.5vw,15px);line-height:1.6}
#web-caption:empty{display:none}
#web-dialog .story-navigation>span{display:none}
.bed-story #bed-caption{font-size:16px;line-height:1.6}
.bed-story #bed-punchline{font-size:clamp(17px,2.5vw,23px);color:#ffe000;line-height:1.5}
#bed-catches{display:none}
@media(max-height:800px){#intro-dialog .intro-scene,.web-story .intro-scene,.bed-story .bed-scene{max-height:43vh;aspect-ratio:240/112}.story-modal{max-height:94dvh;overflow:auto}}

.investment-modal .investment-items{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0}
.investment-modal .investment-items section{display:flex;flex-direction:column;align-items:center;padding:10px;text-align:center;background:#151515;border:1px solid #393939}
.investment-modal .investment-items img{width:100%;height:auto;aspect-ratio:240/160;object-fit:contain;margin:0 0 14px}
.investment-modal .investment-items strong{font-size:clamp(10px,1.5vw,14px);line-height:1.7;color:#ffe000}
@media(max-width:480px){.investment-modal .investment-items{gap:5px}.investment-modal .investment-items section{padding:5px}.investment-modal .investment-items strong{font-size:9px}}

#intro-dialog[data-guide="true"] #intro-lines{color:#fff;font-size:clamp(16px,2vw,21px);line-height:1.7;max-width:36em;margin:16px auto}
#investment-guide .intro-scene{width:100%;aspect-ratio:240/112;margin:18px 0}
#investment-guide>p{color:#fff;font-size:16px;line-height:1.6}
.tool-instructions{display:grid;grid-template-columns:1fr 1fr;gap:14px;text-align:left;margin:20px 0}
.tool-instructions span{color:#fff;font-size:13px;line-height:1.6}
.tool-instructions b{display:block;color:#ffe000;font-size:12px;margin-bottom:4px}
#start-hint:empty{display:none}
@media(max-width:480px){.tool-instructions{grid-template-columns:1fr;gap:10px}}

/* One illustrated card style for chapter, instruction and menu screens. */
#intro-step,#investment-step{display:none}
#investment-lines{font-size:16px;line-height:1.6;color:#fff;margin:16px auto;max-width:34em}
#web-dialog #web-caption{font-size:clamp(16px,2vw,20px);line-height:1.6;min-height:0}
#shop-dialog,#scores-dialog,.summary-modal{width:min(680px,calc(100vw - 28px));max-width:680px;background:#151515;border:2px solid #393939}
#shop-dialog>.intro-scene,#scores-dialog>.intro-scene,.summary-modal>.intro-scene{width:100%;aspect-ratio:240/90;max-height:24vh;margin:16px auto}
.start-panel{inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(90%,560px);max-height:95%;overflow:auto;border:2px solid #393939;box-shadow:0 12px 60px #0009;background:#151515;padding:18px;gap:10px}
.start-picture{display:block;width:100%;max-height:22vh;aspect-ratio:240/100;object-fit:cover;image-rendering:pixelated}
.start-panel .start-avatar{display:none}
.start-panel .level-story{color:#fff!important;font-style:normal}
@media(max-width:760px){.start-panel{padding:10px;gap:5px}.start-picture{max-height:12vh}.start-panel h2{font-size:18px}.start-panel .level-story{font-size:12px!important}}

.panel-picture{display:block;width:100%;height:clamp(48px,10vh,110px);object-fit:cover;image-rendering:pixelated;border:1px solid #393939;margin:8px 0}
@media(max-width:760px){.panel-picture{height:44px;margin:4px 0}}

.chapter-modal{width:min(680px,calc(100vw - 28px));max-width:680px;text-align:center;background:#151515;border:2px solid #393939;padding:clamp(18px,3vw,32px)}
.chapter-modal .intro-scene{width:100%;aspect-ratio:240/112;max-height:43vh;margin:18px 0}
.chapter-modal .story-caption{color:#fff;font-size:clamp(16px,2vw,20px);line-height:1.6;margin:18px auto;max-width:34em}

#intro-dialog .story-navigation{display:flex;align-items:center;gap:12px;width:100%}
#intro-next{margin-left:auto}

/* Let the live camera use the full viewport; restore the menu layout for results. */
html[data-in-game="true"] main{max-width:none;padding:6px;grid-template-rows:minmax(0,1fr);gap:0}
html[data-in-game="true"] main>header,html[data-in-game="true"] .arena-heading,html[data-in-game="true"] .sidebar{display:none}
html[data-in-game="true"] .play-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
html[data-in-game="true"] .game-shell{width:100%;height:100%;min-height:0}
html[data-addons="false"] .power-controls,html[data-addons="false"] .addon-shortcut,html[data-addons="false"] #shop-open{display:none}
.addons-choice{display:flex;flex-direction:column;gap:8px;margin:12px 0;color:#ffe000;font-size:11px;text-align:left}
.addons-choice select{width:100%;min-height:38px;background:#151515;color:#ffffff;border:2px solid #ffe000;padding:8px;font:12px monospace}

html[data-addons="false"] .power-controls:has(#release-mouse:not([hidden])){display:flex}
html[data-addons="false"] .power-controls .shop-label,html[data-addons="false"] #use-zoom,html[data-addons="false"] #use-slowmo,html[data-addons="false"] #use-trap,html[data-addons="false"] #inventory{display:none}
html[data-in-game="true"] .game-shell{grid-template-rows:22px 44px minmax(0,1fr) auto auto auto 28px}
html[data-in-game="true"] .camera-bar{padding:3px 10px}
html[data-in-game="true"] .power-controls{padding:4px 8px}
html[data-in-game="true"] .power-controls .shop-label,html[data-in-game="true"] #inventory{display:none}
html[data-in-game="true"] .power-controls button{min-height:28px;padding:4px 8px}
html[data-in-game="true"] .shortcut-strip{padding:3px 8px}
html[data-in-game="true"] .shortcut-strip .addon-shortcut{display:none}
html[data-in-game="true"] .status-bar{height:28px}

/* Black / yellow cabinet: clear hierarchy, generous controls, fewer readouts. */
:root{--bg:#000;--panel:#111;--text:#fafafa;--muted:#bcbcbc;--human:#ffe000;--ai:#ffe000;--pink:#ff6571}
body{background:#000}
main>header{border-bottom:2px solid #ffe000}
.brand-icon{background:#ffe000;color:#000;border-color:#ffe000;box-shadow:4px 4px #625700}
.brand-icon span{color:#000}
.brand-wordmark{font-weight:900;letter-spacing:2px}
button{background:#ffe000;color:#000;border:2px solid #ffe000;box-shadow:0 4px #786a00;min-height:44px}
button:hover{background:#fff17a;filter:none}
button:active{box-shadow:0 1px #786a00}
button.secondary,.sound-button{background:#151515;color:#fafafa;border:1px solid #666;box-shadow:0 3px #000}
button.secondary:hover,.sound-button:hover{border-color:#ffe000;color:#ffe000;background:#222}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffe000;outline-offset:4px}
.header-controls button{min-height:40px;font-size:11px}
.coin-wallet,.highscore{border:1px solid #494949;background:#111;min-height:40px}
.highscore span{font-size:10px}
.game-shell{border:3px solid #ffe000;border-radius:0;background:#090909;box-shadow:0 0 0 2px #000,0 0 0 4px #514900,6px 8px #000}
.game-shell::before,.game-shell::after,main::before,main::after{display:none}
.camera-bar{background:#ffe000;color:#000;font-weight:900;letter-spacing:2px}
.arcade-hud{background:#111;padding:10px 14px;border-bottom:1px solid #444}
.arcade-hud>div:not([hidden]){border-color:#444}
#lives-label,.coin-hud>span,.mice-hud>span,.points-hud>span{font-size:11px;letter-spacing:1px;color:#bcbcbc}
#live-points,#round-coins,.mice-hud strong{font-size:30px;font-weight:900;font-variant-numeric:tabular-nums;color:#ffe000}
#shields i{color:#ffe000}
.ai-gap-readout,.distance-meter{display:none}
.media-well{padding:8px;background:#000}
.contest .versus{background:#ffe000;color:#000;border-color:#ffe000;box-shadow:none;transform:none}
.player-card,.score-card,.story-card,.room-card{background:#111;border-color:#444;box-shadow:none}
.player-card{border-left:4px solid #ffe000}
.story-copy p{font-size:12px;line-height:1.5}
.story-copy>strong{font-size:12px}
.story-copy small{font-size:10px}
.story-copy #story-workload,.story-copy #story-hint{display:none}
.score-card .panel-picture{display:none}
#round-brief h2{font-size:30px;line-height:1.3}
#round-brief>p{font-size:14px;line-height:1.7}
.start-panel{background:#0b0b0bf5;border:2px solid #ffe000;box-shadow:8px 8px 0 #000a;padding:22px}
.start-panel h2{color:#ffe000;font-weight:900;letter-spacing:1px}
.start-panel button{min-height:48px;font-size:17px}
.start-picture{max-height:18vh}
.power-controls{background:#111;gap:10px;padding:10px}
.power-controls .shop-label,#inventory,.shortcut-strip .addon-shortcut{display:none}
.power-controls button{min-height:44px;font-size:12px;padding:8px}
.shortcut-strip{background:#090909;gap:16px;font-size:12px;padding:8px}
.shortcut-strip button{min-height:40px;font-size:12px;padding:6px 14px}
kbd{background:#222;color:#ffe000;border-color:#666}
.status-bar{background:#171717;height:44px;padding:8px 14px;border-top:1px solid #444}
#status{font-size:13px;letter-spacing:1px}
.timer{font-size:28px;color:#ffe000;font-variant-numeric:tabular-nums}
.time-track{height:3px}
#verdict{font-size:24px;color:#ffe000}
.result-points #points{font-size:32px}
.result-grid span,.result-total,.ai-comparison span{font-size:11px}
.result-grid strong{font-size:21px}
#level-detail{font-size:12px;line-height:1.5}
.result-actions{flex-wrap:wrap;gap:10px}
.result-actions button{min-height:44px;font-size:12px;flex:1 1 100px}
.track-toggle{font-size:12px;min-height:36px}
.track-toggle input{width:20px;height:20px}
dialog,#shop-dialog,#scores-dialog,.summary-modal,.chapter-modal,.start-panel,.story-ending{background-color:#111;border-color:#ffe000}
dialog::backdrop{background:#000d}
input,select,.addons-choice select{background:#080808;color:#fafafa;border-color:#666;min-height:44px}
html[data-in-game="true"] .game-shell,.game-shell{grid-template-rows:26px 70px minmax(0,1fr) auto auto auto 44px}
html[data-in-game="true"] .power-controls button{min-height:44px;font-size:12px;padding:8px 12px}
html[data-in-game="true"] .status-bar{height:44px}
html[data-in-game="true"] .shortcut-strip{padding:6px 12px}
@media(max-width:1100px){.header-controls{flex-wrap:wrap;justify-content:flex-end}.header-controls button{font-size:10px;padding:5px 8px}main{grid-template-rows:auto 42px minmax(0,1fr)}}
@media(max-width:760px),(max-height:620px){
 body{height:auto;min-height:100dvh;overflow:auto}
 main{height:auto;min-height:100dvh;display:flex;flex-direction:column;padding:10px;gap:12px}
 main>header{flex-wrap:wrap}.header-controls{flex-wrap:wrap;justify-content:flex-start;gap:8px}
 .header-controls button{min-height:40px;font-size:11px}
 .play-layout{display:flex;flex-direction:column;gap:14px;flex:1}
 .game-shell{flex:none;min-height:560px;height:76dvh}
 .sidebar{display:flex;gap:12px}.sidebar .score-card{padding:18px}.story-card{padding:12px}
 .story-copy p{font-size:12px}.story-copy small{font-size:10px}
 .player-card{min-height:52px}.player-card strong{font-size:16px}
 .power-controls{flex-wrap:wrap}.power-controls button{flex:1 1 40%;font-size:11px}
 #status{font-size:11px;letter-spacing:0}
 #round-brief h2{font-size:26px}#round-brief>p{font-size:14px}
 #result{gap:12px}#verdict{font-size:24px}#level-detail{font-size:12px}
 .result-grid span,.ai-comparison span,.result-total{font-size:10px}.result-grid strong{font-size:20px}
 html[data-in-game="true"] main{height:100dvh;min-height:0}
 html[data-in-game="true"] .play-layout{min-height:0}
 html[data-in-game="true"] .game-shell{min-height:0;height:100%}
 html[data-in-game="true"] .game-shell{grid-template-rows:22px 60px minmax(0,1fr) auto auto auto 40px}
 html[data-in-game="true"] .status-bar{height:40px}
 #live-points,#round-coins,.mice-hud strong{font-size:25px}
 #lives-label,.coin-hud>span,.mice-hud>span,.points-hud>span{font-size:9px}
 .media-well{padding:4px}
}

/* Related story screens stay visible together. */
:root{--surface:#171717;--edge:#444;--muted:#bcbcbc;--pink:#ffe000}
#intro-dialog,.chapter-modal,.investment-modal{width:min(1240px,calc(100vw - 32px));max-width:1240px;text-align:left}
.story-panels{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0}
.story-panel{min-width:0;padding:14px;background:var(--surface);border:1px solid var(--edge);border-top:3px solid #ffe000}
.story-panel>img{display:block;width:100%;aspect-ratio:240/160;object-fit:cover;image-rendering:pixelated}
.story-panel h3{font-size:12px;line-height:1.5;color:#ffe000;margin:16px 0 10px;letter-spacing:1px}
.story-panel p{font-size:14px;line-height:1.7;color:#f2f2f2}
#chapter-panels{grid-template-columns:repeat(2,minmax(0,1fr))}
#intro-dialog .story-navigation{display:none}
#intro-dialog .intro-actions{justify-content:flex-end}
#intro-dialog #intro-fiction{display:block;margin-top:18px;font-size:10px;line-height:1.6;color:var(--muted)}
#investment-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 28px}
#investment-dialog>.panel-label,#investment-dialog>h2,#investment-lines,#investment-dialog>.intro-actions{grid-column:1/-1}
#investment-dialog>.story-navigation{display:none}
#investment-guide{padding:16px;background:var(--surface);border:1px solid var(--edge);margin:22px 0}
#investment-guide .intro-scene{margin:0 0 16px;max-height:22vh}
#investment-dialog .investment-items{grid-template-columns:1fr;align-content:start}
#investment-dialog .investment-items section{display:grid;grid-template-columns:100px 1fr;gap:16px;align-items:center;text-align:left;background:var(--surface);border-color:var(--edge)}
#investment-dialog .investment-items img{margin:0}
#investment-lines p{color:var(--muted)}
/* Neutral surfaces keep yellow accents separate from the original artwork. */
.player-card,.score-card,.story-card,.room-card,.power-controls,dialog{background-color:#111;border-color:var(--edge)}
button.secondary,.sound-button{background:#1b1b1b;border-color:#666;color:#f2f2f2}
button.secondary:hover,.sound-button:hover{background:#292929}
.intro-scene,.panel-picture,.investment-modal .investment-items section,.summary-grid>div{border-color:var(--edge);background:#1c1c1c}
#round-label,#level-source{color:#000}
.story-progress,.match-meter,.time-track{background:#333}
.story-progress i,#match-fill,#time-fill{background:#ffe000}
input[type=checkbox]{accent-color:#ffe000}
::selection{background:#ffe000;color:#000}
@media(max-width:1000px){.story-panels{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 .story-panels,#chapter-panels{grid-template-columns:1fr;gap:12px;margin:18px 0}
 .story-panel>img{aspect-ratio:240/112}
 #investment-dialog[open]{grid-template-columns:minmax(0,1fr)}
 #investment-guide{margin-top:0}
 #intro-dialog .intro-actions button{width:100%}
}

/* Story and instruction screens use almost the entire display. */
#intro-dialog,.chapter-modal,.investment-modal,.web-story,.bed-story,
#achievement-dialog,#shop-dialog,#scores-dialog,.summary-modal{
 width:calc(100vw - 40px);max-width:none;
 height:calc(100dvh - 40px);max-height:calc(100dvh - 40px);
 padding:clamp(20px,3vw,48px)!important;overflow:auto;
}
.story-modal h2,#intro-dialog h2,.web-story h2,.bed-story h2{
 font-size:clamp(26px,3.2vw,48px);line-height:1.2;margin:16px 0 24px;
}
.story-panels{gap:clamp(16px,2vw,32px);margin:28px 0}
.story-panel{padding:clamp(14px,1.5vw,26px)}
.story-panel h3{font-size:clamp(13px,1.1vw,18px)}
.story-panel p{font-size:clamp(16px,1.3vw,22px);line-height:1.65}
.story-panel>img{object-fit:contain}
#chapter-panels .story-panel>img{max-height:48dvh}
#investment-dialog[open]{align-content:start}
#investment-dialog .investment-items section{grid-template-columns:minmax(100px,34%) 1fr;padding:18px}
#investment-dialog .investment-items strong{font-size:clamp(14px,1.3vw,21px)}
#investment-guide .intro-scene{max-height:34dvh}
.tool-instructions span,#investment-guide>p{font-size:clamp(15px,1.2vw,20px)}
.web-story .intro-scene,.bed-story .bed-scene{width:min(100%,1100px);max-height:55dvh;aspect-ratio:240/112}
#shop-dialog>.intro-scene,#scores-dialog>.intro-scene,.summary-modal>.intro-scene{max-height:30dvh}
@media(max-width:600px){
 #intro-dialog,.chapter-modal,.investment-modal,.web-story,.bed-story,
 #achievement-dialog,#shop-dialog,#scores-dialog,.summary-modal{
  width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:18px!important;
 }
 .story-panel p{font-size:16px}
}

/* Pure black surfaces with yellow structure; artwork carries its own palette. */
:root{--bg:#000;--panel:#000;--surface:#000;--edge:#ffe000;--text:#fff;--muted:#bcbcbc}
body,main,.game-shell,.media-well,.arcade-hud,.status-bar,.shortcut-strip,
.player-card,.score-card,.story-card,.room-card,.power-controls,
dialog,#shop-dialog,#scores-dialog,.summary-modal,.chapter-modal,.start-panel,.story-ending,
.story-panel,#investment-guide,.intro-scene,.panel-picture,.summary-grid>div,
.investment-modal .investment-items section,#investment-dialog .investment-items section,
button.secondary,.sound-button,input,select,.addons-choice select,kbd{
 background:#000;border-color:#ffe000;
}
button.secondary:hover,.sound-button:hover{background:#ffe000;color:#000}
.story-panel>img,.story-picture,.start-picture,.panel-picture,.achievement-picture,
.shop-items img,.investment-items img{background:#000}
.story-panel p,.tool-instructions span,#investment-guide>p{color:#fff}
.story-progress,.match-meter,.time-track{background:#000;border:1px solid #ffe000}

/* A wide player setup with independent identity and settings panels. */
#player-dialog{
 width:calc(100vw - 40px);max-width:1600px;
 height:calc(100dvh - 40px);max-height:calc(100dvh - 40px);
 padding:clamp(20px,3vw,44px)!important;background:#000;border:2px solid #ffe000;
}
#profile-form{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px 28px;align-items:start}
#profile-form>.dialog-heading,#profile-form>#profile-title{grid-column:1/-1}
#profile-title{font-size:clamp(28px,3vw,46px);margin:0 0 8px;color:#ffe000}
.profile-panel{display:flex;flex-direction:column;gap:18px;min-width:0;padding:clamp(18px,2vw,32px);border:1px solid #ffe000;background:#000}
.profile-panel h3{margin:0 0 6px;color:#ffe000;font-size:clamp(15px,1.4vw,21px);letter-spacing:1px}
#player-dialog .name-label,#player-dialog .character-label{font-size:13px;color:#ffe000}
#player-dialog #name-input{width:100%;height:50px;font-size:18px}
#player-dialog .avatar-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
#player-dialog .character-choice{padding:12px;background:#000;min-height:120px;border:1px solid #ffe000}
#player-dialog .character-choice img{height:clamp(72px,13dvh,140px);max-width:100%;object-fit:contain}
#player-dialog .character-choice[aria-pressed=true]{background:#ffe000;outline:2px solid #ffe000;outline-offset:3px}
#player-dialog .track-color-choice{display:flex;flex-direction:column;gap:12px;font-size:13px}
#player-dialog .color-swatches{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#player-dialog .color-swatches button{min-height:44px;font-size:11px}
#player-dialog #color-hint{font-size:11px;line-height:1.5}
#player-dialog .difficulty-choice,#player-dialog .addons-choice{display:flex;flex-direction:column;align-items:stretch;gap:10px;font-size:13px;color:#ffe000;margin:0}
#player-dialog select{width:100%;max-width:none;min-height:50px;font-size:clamp(12px,1.1vw,16px);padding:10px}
#player-dialog .debug-choice{display:flex;align-items:center;gap:12px;font-size:12px;line-height:1.6}
#player-dialog .debug-choice input{flex:none;min-height:24px;width:24px;height:24px}
#player-dialog #reset-settings{min-height:44px;font-size:12px}
#player-dialog .mode-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}
#player-dialog .mode-actions button,#player-dialog .join-row button{min-height:50px;font-size:13px}
#player-dialog .join-row{display:grid;grid-template-columns:minmax(0,1fr) 1fr;gap:12px}
#player-dialog #code-input{width:100%;height:50px;font-size:16px}
#player-dialog .lan-hint{font-size:12px;line-height:1.6}
@media(max-width:800px){
 #player-dialog{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:18px!important}
 #profile-form{grid-template-columns:minmax(0,1fr);gap:18px}
 #player-dialog .character-choice{min-height:100px;padding:8px}
 #player-dialog .character-choice img{height:80px}
 #player-dialog .color-swatches{gap:6px}
 #player-dialog .color-swatches button{font-size:10px;padding:6px}
}

/* One compact workshop overview: illustration, effect and key in each card. */
#investment-dialog[open]{
 display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:auto auto auto minmax(0,1fr) auto auto;
 align-content:stretch;gap:12px;
 height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);
 padding:clamp(16px,2.5dvh,32px)!important;overflow:hidden;
}
#investment-dialog>h2{font-size:clamp(24px,4dvh,44px);margin:0;line-height:1.15}
#investment-dialog>.panel-label{font-size:12px}
#investment-dialog #investment-lines{margin:0;max-width:none}
#investment-dialog #investment-lines p{margin:0;font-size:clamp(12px,1.8dvh,17px);line-height:1.4;color:#bcbcbc}
#investment-dialog .investment-items{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 gap:clamp(12px,2vw,28px);margin:0;min-height:0;align-content:stretch;
}
#investment-dialog .investment-items section{
 display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:minmax(64px,1fr) auto auto auto;
 gap:clamp(8px,1.5dvh,16px);padding:clamp(12px,2vw,28px);
 align-items:start;align-self:stretch;text-align:left;min-height:0;height:100%;box-shadow:none;border:1px solid #ffe000;
}
#investment-dialog .investment-items img{
 width:100%;height:clamp(64px,28dvh,340px);max-height:100%;min-height:64px;aspect-ratio:auto;object-fit:contain;margin:0;align-self:center;
}
#investment-dialog .investment-items strong{font-size:clamp(14px,1.6vw,24px);line-height:1.3}
#investment-dialog .investment-items p{font-size:clamp(12px,1.2vw,18px);line-height:1.5;margin:0;color:#fff}
#investment-dialog .investment-items small{font-size:clamp(10px,1vw,14px);line-height:1.4;margin:0;color:#ffe000}
#investment-dialog #investment-guide{margin:0;padding:0;border:0;background:#000}
#investment-dialog #investment-guide>p{font-size:clamp(11px,1.6dvh,15px);line-height:1.4;margin:0;color:#bcbcbc}
#investment-dialog>.intro-actions{display:flex;flex-direction:row;justify-content:flex-end;gap:12px;margin:0}
#investment-dialog>.intro-actions button{flex:0 1 auto;min-height:44px;padding:10px 20px;font-size:12px}
@media(max-width:600px){
 #investment-dialog[open]{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:14px!important;gap:10px}
 #investment-dialog .investment-items{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:10px}
 #investment-dialog .investment-items section{grid-template-columns:28% minmax(0,1fr);grid-template-rows:auto auto auto;gap:4px 12px;padding:10px}
 #investment-dialog .investment-items img{grid-row:1/4;align-self:center}
 #investment-dialog .investment-items strong{font-size:14px}
 #investment-dialog .investment-items p{font-size:12px;line-height:1.35}
 #investment-dialog .investment-items small{font-size:10px}
 #investment-dialog>.intro-actions button{flex:1;padding:8px;font-size:10px}
}
@media(max-height:500px) and (min-width:601px){
 #investment-dialog[open]{gap:8px;padding:12px!important}
 #investment-dialog .investment-items section{padding:10px;gap:6px}
 #investment-dialog .investment-items strong{font-size:14px}
 #investment-dialog .investment-items p{font-size:12px;line-height:1.3}
 #investment-dialog .investment-items small{font-size:10px}
}

/* Reserve the flexible dialog row for all three illustrated cards. */
#investment-dialog>.investment-items{grid-row:4;align-self:stretch;align-items:stretch}
#investment-dialog>.investment-items>section>img{grid-column:1;grid-row:1}
@media(max-width:600px){
 #investment-dialog>.investment-items>section>img{grid-row:1/4;height:100%;min-height:48px;max-height:100%}
}

/* A focused solo patrol: story, player, instructions, then the camera. */
#intro-panels{grid-template-columns:repeat(3,minmax(0,1fr))}
.contest,.room-card,.shortcut-strip,#round-brief,#story-card,#story-ai-note,
#player-dialog .join-row,#player-dialog .addons-choice{display:none!important}
#player-dialog .mode-actions{grid-template-columns:1fr}
#player-dialog .character-choice[aria-pressed=true]{background:#000;border-color:#fff}
.power-controls>.shop-label,.power-controls>#inventory{display:none}
.power-controls{display:none}
.power-controls:has(#debug-skip:not([hidden])),.power-controls:has(#release-mouse:not([hidden])){display:flex}
.arena-heading{justify-content:flex-start}
.play-layout{grid-template-columns:minmax(0,1fr) 280px}
.sidebar{display:flex;flex-direction:column}
.sidebar .score-card:has(#result[hidden]){display:none}
.game-shell{grid-template-rows:26px 60px minmax(0,1fr) auto 36px}
html[data-in-game="true"] .game-shell{grid-template-rows:22px 44px minmax(0,1fr) auto 28px}
html[data-in-game="true"] .media-well{padding-top:0;padding-bottom:0}
#howto-dialog{width:min(850px,calc(100vw - 32px));max-width:850px;background:#000}
.howto-steps{display:grid;gap:20px;margin:28px 0}
.howto-steps section{border-left:3px solid #ffe000;padding-left:18px}
.howto-steps strong{color:#ffe000}
#howto-continue{width:100%;margin-top:20px}
/* Intrinsic artwork sizing keeps every tool visible, including short windows. */
#investment-dialog[open]{display:flex;flex-direction:column;width:min(1100px,calc(100vw - 32px));max-width:1100px;height:auto;max-height:calc(100dvh - 32px);overflow-y:auto;background:#000}
#investment-dialog .investment-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:none;gap:20px;margin:16px 0}
#investment-dialog .investment-items section{display:flex;flex-direction:column;height:auto;min-height:0;padding:18px;background:#000;gap:12px}
#investment-dialog .investment-items img{display:block;flex:none;width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:240/112;object-fit:contain;background:#000}
#investment-dialog .investment-items strong{font-size:18px}
#investment-dialog .investment-items p{font-size:14px;flex:1}
#investment-dialog .investment-items button{width:100%;font-size:12px}
#investment-dialog #investment-lines p{color:#fff}
#investment-dialog>.story-navigation:has(span:only-child){display:none}
@media(max-width:760px){
 #intro-panels{grid-template-columns:1fr}
 .play-layout{display:flex;flex-direction:column}
 .sidebar{display:flex}
 html[data-in-game="true"] .play-layout{display:grid;grid-template-rows:minmax(0,1fr)}
 #investment-dialog .investment-items{grid-template-columns:1fr;gap:12px}
 #investment-dialog .investment-items section{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px 14px}
 #investment-dialog .investment-items img{grid-column:1;grid-row:1/4;align-self:center}
 #investment-dialog .investment-items strong,#investment-dialog .investment-items p,#investment-dialog .investment-items button{grid-column:2}
}
#intro-panels .story-panel>img{object-fit:contain;background:#000}
#investment-dialog #shop-wallet{color:#ffe000;margin:4px 0;font-size:14px}
html[data-in-game="true"] .status-bar{height:28px}
html[data-in-game="true"] .arcade-hud{min-height:0;padding:4px 12px}

/* Explicit rows avoid the old hidden deck creating implicit grid tracks. */
.game-shell{grid-template-rows:26px 60px minmax(0,1fr) auto 36px}
.game-shell>.level-controls{grid-row:4}
.game-shell>.status-bar{grid-row:5}
.level-controls{display:flex;flex-wrap:wrap;gap:12px;padding:12px;background:#000;border-top:1px solid #ffe000}
.level-controls button{flex:1;min-height:48px;padding:12px 18px;font-size:14px;font-weight:700;line-height:1.4;box-shadow:none;border:2px solid #ffe000;white-space:normal}
#debug-skip{background:#000;color:#ffe000}
.level-controls button:disabled{opacity:1;color:#aaa;background:#151515;border-color:#666}
.level-controls button[hidden]{display:none}
html[data-in-game="true"] .game-shell{grid-template-rows:22px 44px minmax(0,1fr) auto 28px}
/* Results have one readable column, with independent scrolling on short displays. */
.play-layout{grid-template-columns:minmax(0,1fr) clamp(320px,29vw,420px)}
.sidebar{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto;gap:12px}
.sidebar>.player-card{flex:0 0 auto;min-height:60px;padding:12px;min-width:0}
.player-card>div{min-width:0}.player-card strong{overflow-wrap:anywhere}
.sidebar>.score-card{display:block;flex:0 0 auto;min-height:0;padding:20px;overflow:visible}
#result{display:flex;flex-direction:column;align-items:stretch;gap:16px;min-width:0}
#result[hidden]{display:none}
#result>.panel-label{font-size:12px}
#result #verdict{font-size:clamp(22px,2vw,30px);line-height:1.25;overflow-wrap:anywhere}
#result .result-points{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:14px;border-bottom:1px solid #555}
#result .result-points>span{font-size:12px}
#result .result-points #points{font-size:30px;white-space:normal;overflow-wrap:anywhere}
#result .result-grid{display:grid;grid-template-columns:1fr;gap:0;margin:0}
#result .result-grid>div{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid #333}
#result .result-grid span{font-size:11px;line-height:1.5}
#result .result-grid strong{font-size:18px;line-height:1.4;text-align:right}
#result .ai-comparison{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin:0;padding:0}
#result .match-heading{display:flex;justify-content:space-between;gap:12px}
#result .match-heading>span{font-size:12px}
#result .match-heading strong{font-size:20px}
#result .match-meter{width:100%;height:10px}
#result #level-detail{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#result .result-total{display:flex;justify-content:space-between;gap:12px;font-size:12px;padding-top:14px}
#result .result-total #total{font-size:20px}
#result .result-actions{display:flex;flex-direction:column;gap:12px;margin:0}
#result .result-actions button,#result #run-overview{flex:none;width:100%;min-height:48px;padding:12px;font-size:13px;line-height:1.4;box-shadow:none}
#result .result-actions button[hidden]{display:none}
#result .track-toggle{font-size:12px;line-height:1.5;min-height:32px}
@media(max-width:760px){
 .play-layout{display:flex;flex-direction:column}
 .sidebar{overflow:visible}
 .level-controls{padding:8px;gap:8px}
 .level-controls button{font-size:12px;min-height:46px;padding:10px}
 html[data-in-game="true"] .play-layout{display:grid;grid-template-columns:minmax(0,1fr)}
}

/* Large, visual instructions with one action per card. */
#howto-dialog{width:min(1400px,calc(100vw - 40px));max-width:1400px;padding:clamp(20px,3vw,48px)!important;background:#000;clip-path:none}
#howto-dialog h2{font-size:clamp(36px,5vw,72px);margin:12px 0 24px;line-height:1.1}
#howto-dialog .howto-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:24px 0 32px}
#howto-dialog .howto-steps section{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;border:1px solid #ffe000;padding:20px 14px;gap:16px;background:#000}
#howto-dialog .howto-visual{display:flex;align-items:center;justify-content:center;position:relative;width:100%;height:clamp(120px,24dvh,250px);flex:none;color:#ffe000}
#howto-dialog .follow-visual img{display:block;width:100%;height:100%;object-fit:contain;background:#000}
#howto-dialog .hold-key{position:absolute;bottom:0;background:#000;border:2px solid #ffe000;padding:8px 12px;font-size:clamp(14px,1.8vw,24px);font-weight:bold}
#howto-dialog .coin-visual{gap:24px}
#howto-dialog .coin-visual>span{font-size:clamp(64px,9vw,130px);line-height:1}
#howto-dialog .coin-visual>kbd{font-size:clamp(40px,5vw,70px);padding:12px 20px;border:3px solid #ffe000;box-shadow:5px 5px #514900}
#howto-dialog .hearts-visual>span{font-size:clamp(36px,5vw,72px);white-space:nowrap}
#howto-dialog .howto-steps strong{font-size:clamp(18px,2vw,28px);line-height:1.3}
#howto-dialog .howto-steps p{font-size:clamp(16px,1.6vw,23px);line-height:1.5;color:#fff;margin:0}
#howto-dialog .howto-goal{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:16px;font-size:clamp(16px,2vw,28px);line-height:1.5;color:#ffe000}
#howto-dialog #howto-continue{min-height:64px;font-size:clamp(20px,2.3vw,30px);margin-top:28px}
/* Keep the whole camera header inside the viewport with room for every HUD line. */
html[data-in-game="true"] body{height:100dvh;overflow:hidden}
html[data-in-game="true"] main{display:grid;height:100dvh;min-height:0;max-width:none;grid-template-rows:minmax(0,1fr);padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));gap:0}
html[data-in-game="true"] .play-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);width:100%;height:100%;min-height:0;margin:0}
html[data-in-game="true"] .game-shell{height:100%;min-height:0;clip-path:none;box-shadow:none;overflow:hidden;grid-template-rows:32px 76px minmax(0,1fr) auto 32px}
html[data-in-game="true"] .camera-bar{min-height:32px;padding:6px 14px;line-height:18px}
html[data-in-game="true"] .arcade-hud{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;min-height:76px;height:auto;padding:10px 14px;gap:8px}
html[data-in-game="true"] .arcade-hud>div:not([hidden]){height:auto;min-height:52px;gap:6px;overflow:visible}
html[data-in-game="true"] #shields{height:28px}
html[data-in-game="true"] #shields i{height:28px;line-height:28px;font-size:27px}
html[data-in-game="true"] #live-points,html[data-in-game="true"] #round-coins,html[data-in-game="true"] .mice-hud strong{font-size:24px;line-height:28px}
html[data-in-game="true"] #lives-label,html[data-in-game="true"] .coin-hud>span,html[data-in-game="true"] .mice-hud>span,html[data-in-game="true"] .points-hud>span{font-size:10px;line-height:14px}
html[data-in-game="true"] .status-bar{height:32px}
@media(max-width:700px){
 #howto-dialog .howto-steps{grid-template-columns:1fr;gap:14px}
 #howto-dialog .howto-steps section{display:grid;grid-template-columns:100px minmax(0,1fr);text-align:left;column-gap:18px;padding:14px}
 #howto-dialog .howto-visual{grid-row:1/3;height:100px}
 #howto-dialog .howto-steps strong,#howto-dialog .howto-steps p{grid-column:2}
 #howto-dialog .coin-visual{gap:8px}#howto-dialog .coin-visual>span{font-size:46px}#howto-dialog .coin-visual>kbd{font-size:24px;padding:5px}
 #howto-dialog .hearts-visual>span{font-size:24px}
 #howto-dialog .hold-key{font-size:10px;padding:4px}
}
@media(max-height:500px) and (min-width:701px){
 #howto-dialog .howto-steps{margin:12px 0;gap:12px}
 #howto-dialog .howto-visual{height:90px}
 #howto-dialog .howto-steps section{gap:8px;padding:12px}
 #howto-dialog h2{font-size:32px;margin:4px 0 12px}
 #howto-dialog #howto-continue{min-height:48px;margin-top:16px}
}

.tryagain-panel{position:fixed;inset:0;margin:auto;width:min(560px,calc(100vw - 32px));max-width:560px;height:fit-content;max-height:calc(100dvh - 32px);padding:32px!important;background:#000;border:2px solid #ffe000;clip-path:none;text-align:center;overflow:auto}
.tryagain-panel:not([open]){display:none}
.tryagain-panel[open]{display:flex;flex-direction:column;align-items:center;gap:18px}
.tryagain-panel::backdrop{background:#000b;backdrop-filter:blur(5px)}
.tryagain-panel h2{font-size:clamp(32px,5vw,64px);color:#ffe000;margin:0}
.tryagain-hearts{display:flex;gap:18px;font-size:clamp(40px,6vw,76px);line-height:1.2;color:#ffe000}
.tryagain-hearts .spent{color:#393939}
.tryagain-panel p{max-width:30em;font-size:clamp(15px,1.7vw,22px);line-height:1.5;color:#fff}
.tryagain-panel button{width:min(360px,100%);min-height:52px;font-size:18px;box-shadow:none}
.game-shell[data-replaying="true"] .tryagain-panel{display:none}
@media(max-height:600px){.tryagain-panel{gap:10px;padding:14px}.tryagain-panel h2{font-size:30px}.tryagain-hearts{font-size:40px}.tryagain-panel p{font-size:14px}.tryagain-panel button{min-height:44px;font-size:15px}}

/* Workshop follows the same three illustrated cards as the story screens. */
#investment-dialog[open]{display:flex;flex-direction:column;width:min(1240px,calc(100vw - 32px));max-width:1240px;height:auto;max-height:calc(100dvh - 32px);padding:clamp(20px,3vw,40px)!important;gap:12px;background:#000;clip-path:none;border:2px solid #ffe000;text-align:left}
#investment-dialog h2{font-size:clamp(28px,3.5vw,46px);margin:0;line-height:1.2}
#investment-dialog #investment-lines p{font-size:16px;line-height:1.6;max-width:60em}
#investment-dialog .investment-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto;gap:20px;margin:12px 0;align-items:stretch}
#investment-dialog .investment-items .tool-card{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 1fr auto auto;gap:14px;padding:18px;border:1px solid #ffe000;border-top:3px solid #ffe000;background:#000;height:auto;min-height:0;align-items:start;text-align:left}
#investment-dialog .tool-card img{grid-column:1;grid-row:1;display:block;width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:240/160;object-fit:contain;margin:0}
#investment-dialog .tool-card strong{font-size:20px;line-height:1.4;color:#ffe000}
#investment-dialog .tool-card p{font-size:15px;line-height:1.6;margin:0;color:#fff}
#investment-dialog .tool-card .tool-use{display:block;font-size:14px;line-height:1.6;color:#fff;border-top:1px solid #555;padding-top:12px;margin:0}
#investment-dialog .tool-card button{min-height:48px;width:100%;font-size:14px;white-space:normal;box-shadow:none}
#investment-dialog #investment-footer{display:block;font-size:13px;line-height:1.6;color:#bcbcbc;margin:0}
#investment-dialog #new-game{display:none}
#investment-dialog>.intro-actions{justify-content:flex-end;margin-top:12px}
#investment-dialog>.intro-actions button{min-height:48px;font-size:15px}
.pause-hint{font-size:clamp(15px,1.6vw,21px)!important;line-height:1.6;text-align:center;color:#fff!important;margin-top:18px!important}
.pause-hint kbd{color:#ffe000;padding:4px 10px;border:1px solid #ffe000}
#pause-dialog{width:min(480px,calc(100vw - 32px));max-width:480px;background:#000;border:2px solid #ffe000;clip-path:none;padding:32px!important;text-align:center}
#pause-dialog:not([open]){display:none}
#pause-dialog[open]{display:flex;flex-direction:column;gap:16px}
#pause-dialog h2{font-size:44px;margin:0 0 8px}
#pause-dialog button{min-height:54px;width:100%;font-size:18px;box-shadow:none}
#pause-dialog p{font-size:13px;line-height:1.6}
#pause-dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}
.game-shell .camera-bar #pause-open{min-height:24px;height:24px;padding:2px 8px;font-size:11px;line-height:16px;box-shadow:none;border:1px solid #ffe000;flex:none}
@media(max-width:760px){
 #investment-dialog .investment-items{grid-template-columns:1fr}
 #investment-dialog .investment-items .tool-card{grid-template-columns:90px minmax(0,1fr);grid-template-rows:auto auto auto auto;padding:14px;gap:10px 14px}
 #investment-dialog .tool-card img{grid-column:1;grid-row:1/5;align-self:center}
 #investment-dialog .tool-card strong,#investment-dialog .tool-card p,#investment-dialog .tool-card .tool-use,#investment-dialog .tool-card button{grid-column:2}
}

/* Compact Spot Smarter: icons, short effects, controls, then one start action. */
#investment-dialog[open]{width:min(1100px,calc(100vw - 32px));max-width:1100px;padding:clamp(20px,3vw,36px)!important;gap:12px}
#investment-dialog h2{font-size:clamp(28px,3.5vw,44px)}
#investment-dialog #investment-lines p{font-size:15px;line-height:1.5}
#investment-dialog .workshop-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;list-style:none;padding:16px 0;margin:4px 0;border-top:1px solid #555;border-bottom:1px solid #555}
.workshop-flow li{display:flex;align-items:center;gap:10px;font-size:12px;line-height:1.5;color:#fff}
.workshop-flow li>span{font-size:20px;font-weight:bold;color:#ffe000}
#investment-dialog .investment-items{gap:24px;margin:4px 0}
#investment-dialog .investment-items .tool-card{border:0;border-right:1px solid #444;padding:4px 24px 4px 0;gap:12px;grid-template-rows:auto auto auto 1fr auto}
#investment-dialog .investment-items .tool-card:last-child{border-right:0;padding-right:0}
#investment-dialog .tool-card img{aspect-ratio:240/112;max-height:150px;width:100%;height:auto}
#investment-dialog .tool-card strong{font-size:18px}
#investment-dialog .tool-card p{font-size:14px;line-height:1.5}
#investment-dialog .tool-card .tool-use{font-size:13px;line-height:1.6;border:0;padding:0;color:#ffe000}
#investment-dialog .workshop-selection{border-top:1px solid #555;padding-top:16px;margin:4px 0 0;color:#ffe000;font-size:15px;line-height:1.5;font-weight:bold}
#investment-dialog #investment-footer{font-size:12px}
#investment-dialog>.intro-actions{margin-top:4px}
#investment-dialog #investment-continue{min-width:260px;min-height:50px;font-size:16px}
@media(max-width:700px){
 #investment-dialog .workshop-flow{grid-template-columns:1fr;gap:8px;padding:12px 0}
 #investment-dialog .investment-items{grid-template-columns:1fr;gap:16px}
 #investment-dialog .investment-items .tool-card{grid-template-columns:80px minmax(0,1fr);grid-template-rows:auto auto auto auto;border:0;border-bottom:1px solid #444;padding:0 0 16px;gap:8px 14px}
 #investment-dialog .investment-items .tool-card:last-child{padding-bottom:0;border-bottom:0}
 #investment-dialog .tool-card img{grid-column:1;grid-row:1/5;align-self:center}
 #investment-dialog #investment-continue{min-width:0;width:100%}
}
#investment-dialog .tool-card img{grid-column:1;grid-row:1}
#investment-dialog .tool-card strong,#investment-dialog .tool-card p,#investment-dialog .tool-card .tool-use,#investment-dialog .tool-card button{grid-column:1}
@media(max-width:700px){
 #investment-dialog .tool-card img{grid-column:1;grid-row:1/5}
 #investment-dialog .tool-card strong,#investment-dialog .tool-card p,#investment-dialog .tool-card .tool-use,#investment-dialog .tool-card button{grid-column:2}
}
#player-dialog .newgame-note{font-size:12px;line-height:1.6;color:#ffe000;margin:0}
.tryagain-panel .tryagain-score{font-size:clamp(17px,2vw,24px);line-height:1.5;color:#ffe000}
.tryagain-panel .tryagain-score:empty{display:none}
/* Read results first; the explicitly opened retry dialog is a separate step. */
#tryagain-panel::backdrop{background:#000;backdrop-filter:none}

.level-controls:not(:has(button:not([hidden]))){display:none}

#tryagain-copy{font-size:14px;color:#ffe000;letter-spacing:1px}

/* Readable navigation and a shared ranking of finished games. */
main{grid-template-rows:auto 42px minmax(0,1fr)}
main>header{min-height:76px;flex-wrap:wrap;align-content:center;gap:14px}
.header-controls{flex-wrap:wrap;gap:10px}
.header-controls button{font-size:clamp(14px,1.15vw,18px);min-height:46px;padding:10px 14px;letter-spacing:.5px}
#scores-dialog{width:min(900px,calc(100vw - 32px));max-width:900px;background:#000;border:2px solid #ffe000;clip-path:none;padding:28px!important}
#scores-dialog #scores-title{font-size:clamp(30px,4vw,48px);color:#ffe000;margin:12px 0 20px}
#scores-current{font-size:15px;line-height:1.6;color:#fff}
#scores-you{display:block;margin:16px 0;padding:14px;border:1px solid #ffe000;font-size:clamp(15px,2vw,22px);line-height:1.5;color:#ffe000}
#scores-dialog .score-head{display:grid;grid-template-columns:68px minmax(0,1fr) auto;gap:14px;padding:12px 0;border-bottom:1px solid #ffe000;color:#ffe000;font-size:12px}
#scores-list>.score-row{display:grid;grid-template-columns:60px 34px minmax(0,1fr) auto;gap:14px;align-items:center;padding:16px 6px;border-bottom:1px solid #444;font-size:15px}
#scores-list .score-rank{color:#ffe000;font-size:20px;font-weight:bold}
#scores-list .score-player{min-width:0;overflow-wrap:anywhere;line-height:1.5;color:#fff}
#scores-list strong{margin:0;font-size:20px;color:#ffe000;white-space:nowrap}
#scores-list>.your-score{border:2px solid #ffe000;background:#ffe00012}
#scores-dialog .score-note,#scores-dialog .score-rules p{font-size:13px;line-height:1.7;margin:18px 0;color:#bcbcbc}
.score-rules summary{cursor:pointer;color:#ffe000;font-size:14px;padding:12px 0}
@media(max-width:760px){
 main>header{min-height:0}.header-controls{justify-content:flex-start;flex-wrap:wrap}.header-controls button{font-size:14px;min-height:44px}
 #scores-list>.score-row{grid-template-columns:42px 26px minmax(0,1fr) auto;gap:8px;font-size:12px}
 #scores-list .score-rank,#scores-list strong{font-size:16px}
 #scores-list img{width:26px}
}

/* Flat 2D surfaces throughout, including the named readiness panel. */
body,.camera-bar{background:#000}
button,button:hover,button:active,.game-shell,.viewport,.player-card,.score-card,.story-card,.brand-icon,.coin-wallet,.highscore,dialog,.start-panel,.round-reward{box-shadow:none!important;border-style:solid}
button:active{transform:none!important}
.start-panel{background:#000;border:2px solid #ffe000;backdrop-filter:none;box-shadow:none!important}
.start-avatar,.start-picture,.character-choice img{filter:none}
.feedback-button{position:fixed;right:18px;bottom:18px;z-index:30;min-height:48px;padding:12px 20px;border:2px solid #ffe000;background:#ffe000;color:#000;font-size:16px;font-weight:bold;box-shadow:none!important}
dialog.has-feedback{padding-bottom:84px!important}
#feedback-dialog{width:min(620px,calc(100vw - 28px));max-width:620px;clip-path:none;background:#000;border:2px solid #ffe000;padding:28px!important}
#feedback-title{font-size:30px;margin:12px 0 18px}
#feedback-context{font-size:12px;color:#ffe000;margin-bottom:20px;line-height:1.5}
#feedback-form{display:flex;flex-direction:column;gap:16px}
#feedback-form label{font-size:16px;line-height:1.5;color:#fff}
#feedback-message{width:100%;min-height:150px;resize:vertical;background:#000;color:#fff;border:1px solid #ffe000;padding:14px;font:16px/1.5 'DejaVu Sans Mono',monospace}
#feedback-submit{min-height:48px;font-size:16px}
#feedback-status{font-size:14px;line-height:1.6;color:#ffe000}
@media(max-width:600px){.feedback-button{font-size:13px;min-height:44px;padding:10px 14px}#feedback-dialog{padding:20px!important}}

/* In the pause menu, feedback belongs to the button stack, not the viewport. */
#pause-dialog.has-feedback{padding-bottom:32px!important}
#pause-dialog #feedback-open{position:static;inset:auto;width:100%;margin-top:8px;align-self:stretch;background:#000;color:#ffe000;border:1px solid #ffe000;z-index:auto}

/* Match the retry popup's centered action column. */
#tryagain-panel.has-feedback{padding-bottom:32px!important}
#tryagain-panel #feedback-open{position:static;inset:auto;align-self:center;width:min(360px,100%);margin-top:0;z-index:auto;background:#000;color:#ffe000;border:2px solid #ffe000}

/* Simplified three-level edition. */
html,body{background:#000;background-image:none}
.addons-choice,#intro-fiction{display:none!important}

/* Align the player panel with the camera bar and patrol counters. */
main{grid-template-rows:auto minmax(0,1fr)}
.arena-heading{display:none!important}
.game-shell{--camera-row-height:26px;--patrol-row-height:60px;grid-template-rows:var(--camera-row-height) var(--patrol-row-height) minmax(0,1fr) auto 36px}
@media(min-width:761px){
 .sidebar>.player-card{height:calc(3px + 26px + 60px);min-height:calc(3px + 26px + 60px);flex:0 0 calc(3px + 26px + 60px)}
}

.version-choice{display:flex;flex-direction:column;gap:10px;color:#ffe000;font-size:14px;font-weight:bold}
.version-choice select{width:100%;padding:12px;border:2px solid #ffe000;background:#000;color:#fff;font:inherit;min-height:48px}
#profile-form .version-description{margin:0 0 16px;color:#ddd;font-size:14px;line-height:1.6}
