.demo-profile .combat-options>:not(#fire-weapons):not(.demo-options){display:none!important}.demo-profile .combat-lab,.demo-profile #combat-commandbar,.demo-profile .clock-panel,.demo-profile #stage-result,.demo-profile #action-notices,.demo-profile #open-guide,.demo-profile #open-store,.demo-profile #open-notifications,.demo-profile .asset-credits{display:none!important}.demo-profile .resource-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.demo-profile .resource-strip article{display:flex;flex-direction:column;justify-content:center;gap:0}.demo-profile .resource-strip article span{font-size:10px}.demo-profile .resource-strip article strong{font-size:15px}.demo-options{display:flex;gap:8px;align-items:center;margin-left:auto}.demo-profile #combat-message{overflow-y:auto}.demo-profile #combat-message p{margin:4px 0}.demo-profile #combat-message h2{margin:4px 0}.demo-profile #combat-message[hidden]{display:none!important}.demo-profile #demo-results{width:min(600px,calc(100% - 24px))}.demo-profile #demo-loadout{width:min(980px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow-y:auto}.demo-loadout-grid{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px}.demo-slot{display:flex;align-items:center;gap:8px;margin-bottom:8px}.demo-slot label{font-size:13px;min-width:76px}.demo-slot select{width:160px;min-height:34px}.demo-catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}.demo-item{border:1px solid #b888ef;padding:10px;min-height:120px;display:grid;gap:4px;align-content:start}.demo-item strong{font-size:14px}.demo-item small{font-size:12px;line-height:1.4}.demo-item .module-icon{width:48px;height:48px}.demo-results-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.demo-results-list div{padding:8px;border-bottom:1px solid var(--line)}.demo-results-list strong{display:block;font-size:22px}.demo-profile .combat-footer{grid-template-columns:1.3fr 1.3fr 1fr 1fr}.demo-profile .hud-repair{display:none!important}@media(max-width:620px){.demo-loadout-grid{grid-template-columns:1fr}.demo-slots{display:grid;grid-template-columns:1fr 1fr;gap:5px}.demo-slot{display:grid;gap:2px}.demo-slot select{width:100%}.demo-profile .combat-footer{grid-template-columns:1fr 1fr}.demo-profile .resource-strip article strong{font-size:13px}.demo-profile #combat-message{max-height:calc(100% - 190px)}.demo-results-list strong{font-size:18px}.demo-options{font-size:11px}.demo-item{min-height:110px}.demo-profile .boss-hud{top:145px}}
.demo-profile #combat-commandbar{display:flex!important;justify-content:flex-end}.demo-profile #combat-commandbar[hidden],.demo-profile #combat-pulse{display:none!important}.demo-profile .combat-controls button{min-width:44px;min-height:44px}.demo-body{padding:12px;overflow-wrap:anywhere}.demo-body p{font-size:14px;line-height:1.5}.demo-board-row{display:flex;justify-content:space-between;gap:12px;padding:8px;border-bottom:1px solid var(--line)}.demo-profile dialog{max-height:calc(100dvh - 24px);overflow-y:auto}.demo-profile .asset-attribution{display:none!important}@media(max-width:620px){.demo-profile .boss-hud{top:165px;left:12px;right:auto;transform:none;width:calc(100% - 24px)}.demo-profile .manual-guide{max-width:calc(100% - 24px)}}

/* Welcome dialog (Claude, Oct15) */
#demo-welcome{max-width:560px}
#demo-welcome .demo-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
#demo-welcome .demo-actions button{min-height:44px;padding:0 16px}
#demo-welcome .demo-actions button:first-child{font-weight:700}
#demo-welcome .demo-results-list strong{font-size:17px}
/* Fire slot keeps its space in AUTO so the battlefield never resizes (Claude, Oct15) */
.demo-profile .combat-options>span.disabled-action:has(>#fire-weapons){display:inline-flex!important;visibility:hidden}

/* Portrait battlefield + simulated earnings (Claude, Oct16; owner: "portrait mode ... not overwhelming").
   body.demo-portrait = the run uses the portrait world; body.demo-desk = wide screen (>=900px) with side panels. */
.demo-portrait .combat-frame{flex:none!important;margin-inline:auto!important;aspect-ratio:auto!important;min-height:0!important;max-height:none!important;border:1px solid var(--line);background:#000}
.demo-portrait #combat-canvas{object-fit:fill}
.demo-portrait .combat-identity,.demo-portrait .combat-score,.demo-portrait .target-hud,.demo-portrait #combat-season{display:none!important}
.demo-portrait .combat-top-hud{top:8px;left:8px;right:8px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.demo-portrait .stage-hud{grid-column:2;gap:3px}
.demo-portrait .wave-readout{min-width:64px;padding:0 10px;border-width:4px}
.demo-portrait .wave-readout strong{font-size:20px;line-height:24px}
.demo-portrait #combat-mode{width:96px;height:28px;min-height:28px}
.demo-portrait .combat-side-hud{top:86px;left:8px;right:8px;width:auto;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:4px;opacity:.92}
.demo-portrait .combat-meter{grid-template-columns:18px minmax(0,1fr);gap:4px}
.demo-portrait .combat-meter .hud-icon{width:18px;height:18px;grid-column:1;grid-row:1}
.demo-portrait .combat-meter strong{grid-column:2;grid-row:1;font-size:10px;white-space:nowrap}
.demo-portrait .combat-meter .meter-track{grid-column:1/-1;grid-row:2;height:10px;padding:2px}
.demo-portrait .boss-hud{top:146px!important;left:8px!important;right:8px!important;width:auto!important;transform:none!important}
.demo-portrait .combat-message{width:calc(100% - 24px);max-width:340px;left:50%;transform:translateX(-50%);top:auto!important;bottom:calc(var(--weapon-hud-band) + 120px)!important}
.demo-portrait .manual-guide{left:8px;right:8px;justify-content:center;flex-wrap:wrap}
/* desktop: three columns, field in the middle */
.demo-desk.demo-portrait #view-combat{display:grid!important;grid-template-columns:minmax(220px,280px) auto minmax(260px,320px);grid-template-areas:"left frame right" ". cmd .";justify-content:center;align-items:start;column-gap:16px;padding-top:8px;overflow:visible}
.demo-desk.demo-portrait #view-combat>.combat-options{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.demo-desk.demo-portrait .combat-frame{grid-area:frame}
.demo-desk.demo-portrait .combat-commandbar{grid-area:cmd}
.demo-side{display:none}
.demo-desk.demo-portrait .demo-side{display:grid;gap:10px;align-content:start;min-width:0}
.demo-desk.demo-portrait #demo-left{grid-area:left}
.demo-desk.demo-portrait #demo-earnings{grid-area:right}
#demo-left .demo-options{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
#demo-left .demo-options button{min-height:40px}
#demo-left .combat-information{display:block}
#demo-left .combat-footer{display:grid;grid-template-columns:1fr!important;gap:0;border:1px solid var(--line);background:#06141b}
#demo-left .combat-footer>div{padding:10px 12px;border-bottom:1px solid var(--line);border-right:0}
#demo-left .combat-footer>div:last-child{border-bottom:0}
.demo-desk.demo-portrait .layout>.combat-information,.demo-desk.demo-portrait #view-combat>.combat-information{display:none}
/* phone: field only (ship info lives in the header strip; earnings open from the bottom bar) */
body:not(.demo-desk).demo-portrait #view-combat>.combat-information{display:none}
.demo-earn-tab{display:none!important}
body:not(.demo-desk) .demo-earn-tab{display:flex!important}
/* earnings card */
.demo-earnings{border:1px solid var(--line);background:#06141b;padding:12px}
dialog .demo-earnings{border:0;background:none;padding:12px}
.earn-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.earn-head .hud-icon{width:22px;height:22px}
.earn-head strong{font-size:14px;letter-spacing:.06em}
.earn-pill{margin-left:auto;font-size:11px;font-weight:700;color:#64f2c7;border:1px solid #64f2c7;border-radius:999px;padding:2px 10px}
.earn-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.earn-tile{border:1px solid var(--line);background:#0a1a22;padding:8px 10px;display:grid;gap:2px;min-width:0}
.earn-tile span,.earn-sub span{font-size:11px;color:var(--muted);font-weight:600}
.earn-tile strong{font-size:18px;color:#f4f7fb;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.earn-tile small{font-size:11px;color:var(--muted);line-height:1.3}
.earn-amber{color:#ffb35c!important}.earn-green{color:#64f2c7!important}
.earn-sub{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:12px 0 6px}
.earn-sub small{font-size:11px;color:var(--muted)}
.earn-days{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.earn-day{border:1px solid var(--line);background:#0a1a22;padding:6px 8px;display:grid;gap:1px;min-width:0}
.earn-day span,.earn-day small{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.earn-day strong{font-size:14px;color:#f4f7fb}
.earn-mode{display:inline-block;margin:12px 0 4px;font-size:12px;font-weight:700;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:3px 10px}
.earn-mode.is-manual{color:#ffb35c;border-color:#ffb35c}
.earn-rate{margin:4px 0;font-size:13px;font-weight:700;color:#64f2c7}
.demo-earnings .fine{font-size:11px;line-height:1.4;color:var(--muted);margin:8px 0 0}
@media(max-width:899px){.demo-portrait .combat-meter strong{font-size:9px;letter-spacing:-.2px;overflow:hidden;text-overflow:ellipsis}}
/* Slim two-row in-field HUD so hostiles enter below it (portrait world spawnY 170) */
.demo-portrait .stage-hud{display:flex;align-items:center;gap:6px}
.demo-portrait .wave-readout{display:flex;align-items:baseline;gap:6px;min-width:0;padding:0 10px;height:28px;border-width:3px}
.demo-portrait .wave-readout span{display:inline;line-height:22px}
.demo-portrait .wave-readout strong{font-size:17px;line-height:22px}
.demo-portrait .combat-side-hud{top:42px;padding:3px 4px}
.demo-portrait .combat-meter .meter-track{height:7px;padding:1px}
.demo-portrait .boss-hud{top:84px!important}
.demo-portrait .stage-hud .wave-readout{width:auto;min-width:0;white-space:nowrap;flex-wrap:nowrap}
.demo-portrait .stage-hud .wave-readout strong{display:inline}
/* Earnings v2: taxed PWR pool with cap + carry-over (Claude Oct16) */
.earn-pool{margin-top:10px;border:1px solid var(--line);background:#0a1a22;padding:10px}
.earn-pool-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.earn-pool-top span{font-size:11px;color:var(--muted);font-weight:600}
.earn-pool-top strong{font-size:22px;font-variant-numeric:tabular-nums}
.earn-bar{position:relative;display:flex;height:8px;margin:8px 0;background:#04121a;border:1px solid var(--line);overflow:hidden}
.earn-bar i{display:block;height:100%;background:#64f2c7;transition:width .8s}
.earn-bar b{display:block;height:100%;background:#ffb35c;transition:width .8s}
.earn-pool-rows{display:grid;grid-template-columns:1fr auto;gap:3px 10px;font-size:12px}
.earn-pool-rows span{color:var(--muted)}.earn-pool-rows strong{text-align:right;font-variant-numeric:tabular-nums}
.earn-close{display:block;margin-top:6px;font-size:11px;color:var(--muted);line-height:1.35}
.earn-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
.earn-foot .earn-mode{margin:0}.earn-foot small{font-size:11px;color:var(--muted)}
.demo-earnings .fine b{color:#cfe6ef}
/* Guide + start card: highlight commands instead of paragraphs */
.guide{display:grid;gap:12px}
.guide section{border:1px solid var(--line);background:#0a1a22;padding:10px 12px}
.guide h3{margin:0 0 8px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#7fe7ff}
.guide h3 small{font-size:10px;color:var(--muted);letter-spacing:0;text-transform:none;margin-left:6px}
.guide p{margin:0;font-size:14px;line-height:1.45}.guide b{color:#fff}
.guide-keys{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:6px 14px}
.guide-keys li{display:flex;align-items:center;gap:8px;font-size:13px}
.guide-keys li>span{color:#d6e4ea}
.guide kbd,.start-keys kbd{display:inline-block;min-width:24px;padding:2px 7px;margin-right:2px;border:1px solid #64f2c7;border-bottom-width:3px;border-radius:4px;background:#06232b;color:#64f2c7;font:700 12px/1.3 system-ui,sans-serif;text-align:center}
.guide-note{margin-top:8px!important;font-size:12px!important;color:var(--muted)}
.guide-chips{display:flex;flex-wrap:wrap;gap:6px}
.guide-chips span{border:1px solid var(--line);border-radius:999px;padding:3px 10px;font-size:12px;color:#d6e4ea}
.guide-chips span.hot{border-color:#ffb35c;color:#ffb35c}.guide-chips span.hot b{color:#ffb35c}
.guide details{font-size:12px;color:var(--muted)}.guide summary{cursor:pointer;color:#9fb4bf}
.guide details p{font-size:12px;margin-top:6px;color:var(--muted)}
.start-keys{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;font-size:12px;color:#c8d8df;margin-top:6px!important}
.start-keys kbd{margin-left:4px}.start-keys kbd:first-child{margin-left:0}
@media(hover:none){.start-keys{display:none}}
.start-keys{gap:4px 12px}.start-keys span{white-space:nowrap}.start-keys kbd{margin:0 4px 0 0!important}
/* MANUAL hint bar: keys + dash cooldown (Oct16) */
.demo-profile .manual-guide kbd{display:inline-block;min-width:20px;padding:0 6px;border:1px solid #64f2c7;border-bottom-width:2px;border-radius:3px;background:#06232b;color:#64f2c7;font:700 11px/1.5 system-ui,sans-serif;text-align:center}
.demo-profile .manual-guide span{white-space:nowrap}
#demo-dash-chip.cooling{color:#8aa3ae}#demo-dash-chip.cooling kbd{border-color:#3b5561;color:#8aa3ae}
/* compact MANUAL hint: full for 6 s after switching, then only the dash chip in the corner */
.demo-portrait .manual-guide{bottom:calc(var(--weapon-hud-band) + 6px);left:50%;right:auto;transform:translateX(-50%);display:flex;flex-wrap:nowrap;gap:8px;align-items:center;padding:3px 8px;font-size:11px;pointer-events:none;background:#06141bcc;max-width:calc(100% - 16px)}
.demo-portrait .manual-guide #manual-bonus{font-size:10px;white-space:nowrap}
.demo-portrait .manual-guide.hint-mini{left:auto;right:8px;transform:none;padding:2px 6px;background:#06141b99}
.demo-portrait .manual-guide.hint-mini>:not(#demo-dash-chip){display:none}

/* ===== Main game (online) portrait layout (Claude, Oct16; owner: "portrait, keep all buttons") =====
   Reuses the demo's in-field portrait HUD rules (.demo-portrait); these add the main game's side panels. */
.online-portrait .combat-message{max-height:calc(100% - var(--weapon-hud-band) - 96px)!important;overflow-y:auto!important;bottom:calc(var(--weapon-hud-band) + 12px)!important;max-width:min(420px,calc(100% - 16px))!important;width:calc(100% - 16px)}
.online-portrait .combat-message .sector-picker select{width:100%}
.online-portrait .manual-guide kbd{display:inline-block;min-width:20px;padding:0 6px;border:1px solid #64f2c7;border-bottom-width:2px;border-radius:3px;background:#06232b;color:#64f2c7;font:700 11px/1.5 system-ui,sans-serif;text-align:center}
.online-portrait .manual-guide{bottom:calc(var(--weapon-hud-band) + 6px);left:50%;right:auto;transform:translateX(-50%);display:flex;flex-wrap:nowrap;gap:8px;align-items:center;padding:3px 8px;font-size:11px;pointer-events:none;background:#06141bcc;max-width:calc(100% - 16px)}
.online-portrait .manual-guide span{white-space:nowrap}.online-portrait .manual-guide #manual-bonus{font-size:10px;white-space:nowrap}
