/* The encounter is a viewport, not a dashboard. Price geometry remains still. */
body[data-screen="game"]{--battle-paper:#f7e8c8;--battle-line:#bea47c38;--battle-night:#0e1718;background:#0e1718;color:var(--battle-paper);height:100vh;height:100dvh;min-height:0;overflow:hidden}
body[data-screen="game"]::before{display:none}
body[data-screen="game"] #app{height:100%;min-height:0;overflow:hidden}
body[data-screen="game"] .modal{color:#172b39}
body[data-screen="game"] .modal-backdrop{background:#060e11b8}
body[data-screen="game"] .save-warning{color:#352c18}
body[data-screen="game"] .market-shell{display:flex;flex-direction:column;width:100%;max-width:none;height:100%;min-height:0;margin:0;padding:0;overflow:hidden}
body[data-screen="game"] .market-shell .topbar{position:relative;z-index:5;flex:0 0 48px;min-height:48px;height:48px;gap:16px;padding:0 22px;border-bottom:1px solid #ddc89b27;background:#0c1517;color:#ede0c4;flex-wrap:nowrap}
body[data-screen="game"] .market-shell .brand{min-height:44px;gap:8px;padding:0;color:#eee1c2}
body[data-screen="game"] .market-shell .brand-mark{width:27px;height:27px;border-radius:6px;background:#dabc80;color:#142326;transform:rotate(-5deg)}
body[data-screen="game"] .market-shell .brand-mark .icon{width:19px;height:19px}
body[data-screen="game"] .market-shell .brand-copy strong{font-size:15px;letter-spacing:-.5px}
body[data-screen="game"] .market-shell .brand-copy small{display:none}
body[data-screen="game"] .market-shell .nav-actions{width:auto;gap:5px;flex-wrap:nowrap}
body[data-screen="game"] .market-shell .nav-actions .button{min-height:40px;padding:8px 11px;font-size:10px;color:#ddceb3;background:transparent;border-color:transparent;box-shadow:none;gap:6px}
body[data-screen="game"] .market-shell .nav-actions .button:hover{color:#fff3d7;background:#ffffff0c;transform:none}
body[data-screen="game"] .market-shell .nav-actions .icon{width:16px;height:16px;flex-basis:16px}
body[data-screen="game"] .market-shell>main{flex:1;min-height:0;min-width:0;padding:0;position:relative;overflow:hidden}
body[data-screen="game"] .market-shell>.site-footer{display:none}
body[data-screen="game"] .market-shell>.save-warning{flex-shrink:0;max-height:105px;overflow:auto;margin:0;border-radius:0;font-size:12px}
body[data-screen="game"] .button:focus-visible,body[data-screen="game"] .battle-card:focus-visible{outline:3px solid #ffdb82;outline-offset:3px}

body[data-screen="game"] .battle-screen{--card-height:218px;display:grid;grid-template-rows:minmax(190px,1fr) auto;width:100%;height:100%;min-height:0;overflow:hidden;background:radial-gradient(ellipse at 50% 20%,#38524a,#111d20 80%);isolation:isolate}
body[data-screen="game"] .battle-screen>.boss-arena{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden;--boss-stage:#162e2b;--boss-glow:#527559}
body[data-screen="game"] .battle-screen>.boss-arena[data-mood="selloff"]{--boss-stage:#301c20;--boss-glow:#a14a38}
body[data-screen="game"] .battle-screen>.boss-arena[data-mood="storm"]{--boss-stage:#252237;--boss-glow:#66517e}
body[data-screen="game"] .battle-screen>.boss-arena[data-mood="range"]{--boss-stage:#232f2b;--boss-glow:#696b40}
body[data-screen="game"] .battle-screen>.boss-arena::before{background:radial-gradient(ellipse at 50% 25%,var(--boss-glow),transparent 75%),linear-gradient(90deg,#060f16b3,transparent 22%,transparent 78%,#060f16b3),var(--boss-stage)}
body[data-screen="game"] .battle-screen>.boss-arena::after{content:"";pointer-events:none;position:absolute;inset:0;z-index:2;box-shadow:inset 0 -45px 55px #0b181773,inset 0 12px 22px #0b181740;border-top:1px solid #ffffff09}
body[data-screen="game"] .battle-screen .boss-hud{position:relative;flex:0 0 auto;align-items:flex-start;gap:24px;padding:17px 32px 0;min-height:0;background:linear-gradient(#081416a6,transparent);z-index:3}
body[data-screen="game"] .battle-screen .boss-hud>div:first-child{min-width:0;flex:1}
body[data-screen="game"] .battle-screen .boss-eyebrow{font-size:9px;line-height:1.3;letter-spacing:1.4px;color:#e9c997}
body[data-screen="game"] .battle-screen .boss-title{font-family:Georgia,'Times New Roman',serif;font-size:clamp(26px,3.4vw,48px);line-height:1;margin:5px 0 6px;letter-spacing:-1.5px;color:#fff0cf;text-shadow:2px 3px #142421}
body[data-screen="game"] .battle-screen .boss-subtitle{max-width:none;font-size:11px;line-height:1.35;color:#e1ceb0}
body[data-screen="game"] .battle-screen .boss-wallet{display:block;flex:0 0 250px;min-width:0;max-width:290px;width:auto;text-align:right;padding:9px 14px;background:#0c1a1bd1;color:#f5e7c5;border:1px solid #dbc09361;box-shadow:0 4px 15px #00000022;border-radius:8px;rotate:0;margin:0}
body[data-screen="game"] .battle-screen .boss-wallet>span{font:700 8px/1.3 ui-monospace,monospace;letter-spacing:1px;max-width:none;color:#d5c5a6}
body[data-screen="game"] .battle-screen .boss-wallet>strong{font-size:29px;letter-spacing:-1px;line-height:1.2;white-space:nowrap;color:#ffefcd}
body[data-screen="game"] .battle-screen .boss-wallet small{font-size:9px;line-height:1.35;color:#d5c5a6;margin-top:5px}
body[data-screen="game"] .battle-screen .boss-health{height:6px;margin:5px 0 0;border:0;border-radius:3px;background:#061410}
body[data-screen="game"] .battle-screen .boss-health>i{background:linear-gradient(90deg,#8a432e,#d8b36c,#f5e1a4);box-shadow:0 0 10px #e9c47f2b}
body[data-screen="game"] .battle-screen .boss-stage{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;padding:64px clamp(16px,5vw,88px) 20px;margin:-6px 0 0;isolation:isolate}
body[data-screen="game"] .battle-screen .boss-stage::after{height:12px;border-top:1px solid #ceae7840;background:repeating-linear-gradient(90deg,#172a25 0 95px,#0f231e 96px 99px);box-shadow:0 -15px 30px #08141244}
body[data-screen="game"] .battle-screen .boss-character{inset:-20px 0 -30px;overflow:hidden}
body[data-screen="game"] .battle-screen .boss-character>.chart-boss-art{min-width:0;width:100%;height:100%;max-width:none;overflow:visible}
body[data-screen="game"] .battle-screen .boss-chart-layer{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;padding:4px 8px 0;background:linear-gradient(#0b202011,#07191b66);border:0;border-radius:0;box-shadow:none}
body[data-screen="game"] .battle-screen .boss-chart-layer .chart-heading{padding:0 16px 2px;gap:10px;flex:0 0 auto;align-items:center;flex-wrap:nowrap}
body[data-screen="game"] .battle-screen .boss-chart-layer .chart-heading>div{display:flex;align-items:baseline;gap:10px}
body[data-screen="game"] .battle-screen .chart-heading .eyebrow{font-size:9px;letter-spacing:1px;color:#e1d5b8;white-space:nowrap}
body[data-screen="game"] .battle-screen .chart-heading .market-price{font-size:25px;line-height:1.2;color:#f4e8c9;white-space:nowrap}
body[data-screen="game"] .battle-screen .chart-heading .tag{font-size:8px;letter-spacing:.9px;padding:5px 8px;border:1px solid #d5bd8c55;background:#0a181945;color:#e8d6b0}
body[data-screen="game"] .battle-screen .boss-chart-plot{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden}
body[data-screen="game"] .battle-screen .boss-chart-layer .boss-price-chart{display:block;flex:1 1 0;min-height:0;min-width:0;width:100%;height:100%;max-height:none;margin:0;overflow:visible}
body[data-screen="game"] .battle-screen .boss-rsi-chart{flex:0 0 56px;min-height:56px;width:100%;height:56px;max-height:56px;margin:0;border-top-color:#fff0d21a}
body[data-screen="game"] .battle-screen .boss-rsi-chart .boss-axis{font-size:10px}
body[data-screen="game"] .battle-screen .boss-indicator-readings{flex:0 0 auto;gap:3px 14px;padding:3px 16px 0;font-size:9px;line-height:1.4;min-height:0}
body[data-screen="game"] .battle-screen .boss-indicator-readings:empty{display:none}
body[data-screen="game"] .battle-screen .indicator-warmup{flex:0 0 auto;font-size:9px;line-height:1.35;padding:3px 16px 0;margin:0;max-height:28px;overflow:auto;color:#e2d1ae}
body[data-screen="game"] .battle-screen .boss-stage-caption{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:15px;font:8px/1.35 ui-monospace,monospace;letter-spacing:.4px;padding:5px 23px 0;color:#d3c0a0}
body[data-screen="game"] .battle-screen .boss-taunt{top:4%;left:65%;max-width:200px}

/* A compact control desk floats in front of the stage. */
body[data-screen="game"] .battle-dock{position:relative;z-index:4;flex:0 0 auto;min-width:0;padding:12px 28px 0;background:linear-gradient(#1f2a26,#111d1b);border-top:1px solid #d1b07655;box-shadow:0 -16px 36px #06131273}
body[data-screen="game"] .battle-actionbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
body[data-screen="game"] .battle-primary-actions,body[data-screen="game"] .battle-actionbar>.decision-actions{display:flex;gap:7px;align-items:center;width:auto;flex-wrap:nowrap}
body[data-screen="game"] .battle-actionbar .button{min-height:42px;padding:10px 14px;font-size:11px;line-height:1.2;border:1px solid #ccbb983b;background:#344039;color:#f3e5c6;border-radius:6px;box-shadow:0 2px #08140d;white-space:nowrap}
body[data-screen="game"] .battle-actionbar .button.primary{background:#e0ae5a;border-color:#eed097;color:#1a251f;font-size:12px;padding-inline:22px;box-shadow:0 2px #897041,0 0 18px #e0ae5a0c}
body[data-screen="game"] .battle-actionbar .button:hover:not(:disabled){background:#435346;transform:translateY(-1px)}
body[data-screen="game"] .battle-actionbar .button.primary:hover:not(:disabled){background:#f0c473}
body[data-screen="game"] .battle-actionbar .button:disabled{opacity:.5}
body[data-screen="game"] .battle-utilities{display:flex;gap:5px;align-items:center;flex-wrap:nowrap}
body[data-screen="game"] .battle-utilities .button{background:transparent;border-color:#bda37b35;color:#deceac;font-size:10px;min-height:39px;padding:8px 12px;box-shadow:none}
body[data-screen="game"] .battle-readout{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:24px;font:10px/1.4 ui-monospace,monospace;padding:6px 1px 0;color:#d2c5a8}
body[data-screen="game"] .battle-readout p{margin:0;font:inherit;color:inherit}
body[data-screen="game"] .battle-readout strong{font-weight:400;color:#eddbb3}
body[data-screen="game"] .battle-readout span{min-width:0}
body[data-screen="game"] .fixed-strategies{min-width:0;margin:0}
body[data-screen="game"] .fixed-strategies .strategy-deck-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:5px 0 0;min-height:28px}
body[data-screen="game"] .fixed-strategies .strategy-deck-heading .eyebrow{font:700 8px/1.4 ui-monospace,monospace;color:#c7ae84;letter-spacing:1px;margin:0}
body[data-screen="game"] .fixed-strategies .strategy-deck-heading h2{display:none}
body[data-screen="game"] .fixed-strategies .strategy-deck-heading p:not(.eyebrow){font-size:10px;color:#baa98b;line-height:1.3;margin:0}
body[data-screen="game"] .fixed-strategies .strategy-deck-heading>div:first-child{display:flex;align-items:center;gap:16px;min-width:0}
body[data-screen="game"] .strategy-deck-nav{margin:0;gap:6px}
body[data-screen="game"] .strategy-deck-nav .button{min-height:30px;min-width:38px;border:1px solid #b8a27a45;border-radius:5px;padding:5px 10px;background:#344038;color:#e8d8b6;font:10px ui-monospace,monospace;box-shadow:none}
body[data-screen="game"] .strategy-deck-nav .button:hover{background:#4c5a49;transform:none}
body[data-screen="game"] .strategy-hand{display:flex;gap:12px;margin:0 -6px;padding:8px 6px 12px;height:calc(var(--card-height) + 30px);overflow-x:auto;overflow-y:hidden;scrollbar-color:#94794c #17231d;scrollbar-width:thin;scroll-padding-inline:6px;align-items:stretch}
body[data-screen="game"] .strategy-hand .battle-card{flex:0 0 clamp(172px,15.2vw,216px);width:clamp(172px,15.2vw,216px);height:var(--card-height);min-height:0;margin:0;border:1px solid #bea572;border-radius:9px;background:#e8ddbf;box-shadow:0 4px 0 #050d09;overflow:hidden}
body[data-screen="game"] .strategy-hand .battle-card:hover:not(:disabled){translate:0 -4px;box-shadow:0 7px 0 #050d09}
body[data-screen="game"] .strategy-hand .battle-card:focus-visible{outline-offset:2px;translate:0 -2px}
body[data-screen="game"] .strategy-hand .battle-card .strategy-art{height:51px;min-height:51px;border-bottom:1px solid #26352b;padding:0;flex-shrink:0}
body[data-screen="game"] .strategy-hand .battle-card .strategy-glyph{width:64px;height:58px}
body[data-screen="game"] .strategy-hand .battle-card .battle-card-number{font-size:8px;width:22px;min-width:22px;height:22px;top:6px;left:7px}
body[data-screen="game"] .strategy-hand .battle-card .eyebrow{font-size:7px;line-height:1.3;margin:8px 11px 4px;letter-spacing:.8px;color:#655132}
body[data-screen="game"] .strategy-hand .battle-card .battle-card-name{font-size:22px;line-height:1;letter-spacing:-.5px;min-height:22px;margin:0 11px 7px;color:#223629}
body[data-screen="game"] .strategy-hand .battle-card .battle-card-description{font-size:10px;line-height:1.4;margin:0 11px 7px;color:#46513a;flex:1}
body[data-screen="game"] .strategy-hand .battle-card .battle-card-cost{font-size:10px;line-height:1.35;padding-top:6px;margin:0 11px 6px;border-color:#bfae85;color:#253d2b}
body[data-screen="game"] .strategy-hand .battle-card .card-link{font-size:9px;line-height:1.35;min-height:26px;padding:6px 11px;border-top:1px solid #bfa470;background:#d4b575;color:#2c3b2b;margin-top:auto}
body[data-screen="game"] .strategy-hand .battle-card.is-locked{background:#bcbcaf;border-color:#6f7c68;box-shadow:0 4px #07100b}
body[data-screen="game"] .strategy-hand .battle-card.is-locked .strategy-art{filter:saturate(.18) brightness(.8)}
body[data-screen="game"] .strategy-hand .battle-card.is-locked .battle-card-name,body[data-screen="game"] .strategy-hand .battle-card.is-locked .battle-card-cost{color:#394d3d}
body[data-screen="game"] .strategy-hand .battle-card.is-locked .card-link{background:#a0aa94;border-color:#71836b;color:#293c2c}
body[data-screen="game"] .strategy-hand .card-lock-overlay{width:24px;height:24px;top:6px;right:6px;background:#e3dfc9;border-color:#495c43}
body[data-screen="game"] .strategy-hand .card-lock-reason{font-size:11px;line-height:1.45;padding:11px;border-radius:5px;inset:5px;max-height:calc(100% - 10px);overflow:auto;background:#13261bf8}
body[data-screen="game"] .strategy-hand .card-lock-reason::before{font-size:8px}

/* Between encounters, the theatre stays open while the content may scroll. */
body[data-screen="game"] .journey-screen{position:relative;height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;padding:30px clamp(20px,5vw,80px) 60px;background:radial-gradient(ellipse at 50% 0,#38473d,transparent 65%),#142321;color:#f2e3c4;scrollbar-color:#a28c60 #13211d}
body[data-screen="game"] .journey-screen>*{max-width:1400px;margin-inline:auto}
body[data-screen="game"] .journey-screen .run-heading h1{font-family:Georgia,serif;font-size:clamp(28px,3.5vw,47px);color:#f7e7c1}
body[data-screen="game"] .journey-screen .eyebrow,body[data-screen="game"] .journey-screen .bankroll small{color:#c8b68e}
body[data-screen="game"] .journey-screen .cash-health,body[data-screen="game"] .journey-screen .decision-coach,body[data-screen="game"] .journey-screen .branch-map,body[data-screen="game"] .journey-screen .challenge-panel,body[data-screen="game"] .journey-screen .market-panel,body[data-screen="game"] .journey-screen .route-note,body[data-screen="game"] .journey-screen .encounter-reflection{background:#21352de8;border-color:#c4ad7942;color:#efe0be;box-shadow:none}
body[data-screen="game"] .journey-screen .market-panel .small-note,body[data-screen="game"] .journey-screen .branch-future,body[data-screen="game"] .journey-screen .journal-row p,body[data-screen="game"] .journey-screen .small-note{color:#cabb9d}
body[data-screen="game"] .journey-screen .button{background:#e0c48e;border-color:#dac18b;color:#182f23;box-shadow:0 2px #08160e}
body[data-screen="game"] .journey-screen .button.primary{background:#deac5b;border-color:#edc675;color:#17291e}
body[data-screen="game"] .journey-screen .situation-card{border-color:#bfa67480;box-shadow:0 6px 0 #091710;background:#e7dbb9;color:#20352a}
body[data-screen="game"] .journey-screen .situation-card .eyebrow{color:#755233}
body[data-screen="game"] .journey-screen .branch-node{background:#15271f;border-color:#91a07a;color:#eaddb6}
body[data-screen="game"] .journey-screen .branch-node:hover{background:#3a4d33}
body[data-screen="game"] .journey-screen .market-route li span{background:#24392d;color:#e9d9b0;border-color:#6e8264}
body[data-screen="game"] .journey-screen .market-route li.current span{background:#e5b566;color:#213626;border-color:#edd3a3;box-shadow:0 0 0 3px #15251e,0 0 0 4px #c9b788}
body[data-screen="game"] .journey-screen .market-route li.visited span{background:#647e56;color:#fff3d0}
body[data-screen="game"] .journey-screen .debrief blockquote,body[data-screen="game"] .journey-screen .reflection-answer{color:#e6ddbc;background:#344a31;border-color:#9daa77}
body[data-screen="game"] .journey-screen .reflection-options .button{background:#263e2e;color:#f5e7c6;border-color:#a9b28c;box-shadow:none}
body[data-screen="game"] .journey-screen .positive{color:#b6e0a6}
body[data-screen="game"] .journey-screen .negative{color:#ffb599}

/* An immediate, operable loss screen: theatrical, never a forced waiting period. */
body[data-screen="game"] .defeat-screen{position:relative;isolation:isolate;display:grid;place-items:center;width:100%;height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;text-align:center;padding:45px 24px;background:radial-gradient(ellipse at 50% 42%,#421b1e66,transparent 63%),#070c0c;color:#ccbab0}
body[data-screen="game"] .defeat-screen::after{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background:linear-gradient(transparent 20%,#09080ba8 52%,#050909 93%);box-shadow:inset 0 0 150px #000000b3}
body[data-screen="game"] .defeat-vignette{position:absolute;z-index:-2;inset:0;overflow:hidden;pointer-events:none;color:#864f43;opacity:.3;filter:saturate(.45)}
body[data-screen="game"] .defeat-vignette .chart-boss-art{position:absolute;width:100%;max-width:none;height:100%;left:50%;top:0;transform:translateX(-50%);min-width:850px}
body[data-screen="game"] .defeat-copy{position:relative;max-width:1000px;width:100%;padding:20px 0;animation:battle-defeat-arrive 1.5s ease-out both}
body[data-screen="game"] .defeat-copy>.eyebrow{font:10px/1.5 ui-monospace,monospace;letter-spacing:3px;color:#977a69;margin-bottom:26px}
body[data-screen="game"] .defeat-screen .defeat-title{font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(45px,7.8vw,116px);letter-spacing:.09em;line-height:1.15;margin:0 -10px 20px;color:#aa493d;text-shadow:0 0 28px #aa3d2844;animation:battle-defeat-title 1.9s ease-out both}
body[data-screen="game"] .defeat-copy>p:not(.eyebrow){font-size:14px;line-height:1.8;max-width:560px;margin:0 auto;color:#bbaaa0}
body[data-screen="game"] .defeat-stats{display:flex;justify-content:center;align-items:center;gap:35px;flex-wrap:wrap;max-width:640px;margin:30px auto;padding:20px 0;border-block:1px solid #8e55412b}
body[data-screen="game"] .defeat-stats>div{display:flex;flex-direction:column;gap:5px}
body[data-screen="game"] .defeat-stats strong{font:400 28px/1.2 Georgia,serif;color:#d3baaa}
body[data-screen="game"] .defeat-stats small,body[data-screen="game"] .defeat-stats span{font:9px/1.5 ui-monospace,monospace;text-transform:uppercase;letter-spacing:1px;color:#947e6c}
body[data-screen="game"] .defeat-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:28px}
body[data-screen="game"] .defeat-actions .button{min-height:46px;background:#1c1c18;border:1px solid #987c5666;color:#d1bea0;box-shadow:none;padding:12px 23px;font-size:12px;font-weight:400;letter-spacing:.5px}
body[data-screen="game"] .defeat-actions .button.primary{background:#75603b;color:#fff0ca;border-color:#aa8858}
body[data-screen="game"] .defeat-actions .button:hover{background:#443b2e;transform:none;border-color:#bfa27d}
body[data-screen="game"] .defeat-actions .button.primary:hover{background:#8c7146}
@keyframes battle-defeat-arrive{from{opacity:.15}to{opacity:1}}
@keyframes battle-defeat-title{from{opacity:.12;letter-spacing:.16em}to{opacity:1;letter-spacing:.09em}}

@media(min-width:761px) and (max-height:820px){
 body[data-screen="game"] .battle-screen{--card-height:168px}
 body[data-screen="game"] .battle-screen .boss-hud{padding-top:12px;padding-inline:27px}
 body[data-screen="game"] .battle-screen .boss-title{font-size:35px;margin-bottom:4px}
 body[data-screen="game"] .battle-screen .boss-subtitle{font-size:10px}
 body[data-screen="game"] .battle-screen .boss-wallet{padding:7px 12px;flex-basis:245px}
 body[data-screen="game"] .battle-screen .boss-wallet>strong{font-size:25px}
 body[data-screen="game"] .battle-screen .boss-stage{padding-top:51px;padding-bottom:16px}
 body[data-screen="game"] .battle-dock{padding-top:9px}
 body[data-screen="game"] .battle-readout{font-size:9px;min-height:22px}
 body[data-screen="game"] .fixed-strategies .strategy-deck-heading{margin-top:2px;min-height:28px}
 body[data-screen="game"] .strategy-hand .battle-card .strategy-art{height:43px;min-height:43px}
 body[data-screen="game"] .strategy-hand .battle-card .strategy-glyph{height:49px;width:55px}
 body[data-screen="game"] .strategy-hand .battle-card .battle-card-description{display:none}
 body[data-screen="game"] .strategy-hand .battle-card .battle-card-name{font-size:21px;min-height:22px;margin-bottom:auto}
 body[data-screen="game"] .strategy-hand .battle-card .battle-card-cost{margin-top:7px;white-space:nowrap;font-size:9px}
}
@media(max-width:1050px) and (min-width:761px){
 body[data-screen="game"] .battle-dock{padding-inline:18px}
 body[data-screen="game"] .battle-actionbar{gap:8px}
 body[data-screen="game"] .battle-actionbar .button{font-size:10px;padding-inline:10px}
 body[data-screen="game"] .battle-actionbar .button.primary{font-size:11px;padding-inline:12px}
 body[data-screen="game"] .battle-utilities{gap:4px}
 body[data-screen="game"] .battle-utilities .button{padding-inline:8px;font-size:9px}
 body[data-screen="game"] .battle-screen .boss-stage{padding-inline:22px}
 body[data-screen="game"] .fixed-strategies .strategy-deck-heading p:not(.eyebrow){display:none}
}
@media(max-width:760px){
 body[data-screen="game"] .market-shell .topbar{padding-inline:12px;gap:8px}
 body[data-screen="game"] .market-shell .brand-copy strong{font-size:13px;letter-spacing:-.4px}
 body[data-screen="game"] .market-shell .brand-mark{width:25px;height:25px}
 body[data-screen="game"] .market-shell .nav-actions{gap:1px}
 body[data-screen="game"] .market-shell .nav-actions .button{width:39px;min-width:39px;min-height:44px;padding:10px 7px}
 body[data-screen="game"] .market-shell .nav-actions .button span{position:absolute;display:block;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 body[data-screen="game"] .market-shell .nav-actions .icon{width:18px;height:18px;flex-basis:18px}
 body[data-screen="game"] .battle-screen{--card-height:162px;grid-template-rows:minmax(205px,1fr) auto}
 body[data-screen="game"] .battle-screen .boss-hud{display:flex;flex-wrap:nowrap;gap:10px;padding:13px 14px 0;align-items:flex-start}
 body[data-screen="game"] .battle-screen .boss-eyebrow{font-size:7px;letter-spacing:.7px;line-height:1.55}
 body[data-screen="game"] .battle-screen .boss-title{font-size:29px;letter-spacing:-1px;line-height:.99;margin:5px 0 0;max-width:240px}
 body[data-screen="game"] .battle-screen .boss-subtitle{display:none}
 body[data-screen="game"] .battle-screen .boss-wallet{flex:0 0 142px;max-width:142px;padding:7px 9px;border-radius:6px;text-align:right}
 body[data-screen="game"] .battle-screen .boss-wallet>span{font-size:6px;letter-spacing:.6px;line-height:1.3}
 body[data-screen="game"] .battle-screen .boss-wallet>strong{font-size:22px;line-height:1.3;letter-spacing:-.6px}
 body[data-screen="game"] .battle-screen .boss-wallet small{font-size:7px;line-height:1.4;margin-top:3px}
 body[data-screen="game"] .battle-screen .boss-health{height:5px;margin-top:3px}
 body[data-screen="game"] .battle-screen .boss-stage{padding:70px 0 16px;margin-top:-1px}
 body[data-screen="game"] .battle-screen .boss-character{inset:-20px 0 -15px}
 body[data-screen="game"] .battle-screen .boss-character>.chart-boss-art{min-width:570px;height:100%;width:100%;max-width:none}
 body[data-screen="game"] .battle-screen .boss-arms,body[data-screen="game"] .battle-screen .boss-glove,body[data-screen="game"] .battle-screen .boss-boots{opacity:.65}
 body[data-screen="game"] .battle-screen .boss-chart-layer{padding:0 2px;background:linear-gradient(transparent,#07171c80)}
 body[data-screen="game"] .battle-screen .boss-chart-layer .chart-heading{padding:0 14px 1px;gap:5px;align-items:center}
 body[data-screen="game"] .battle-screen .boss-chart-layer .chart-heading>div{gap:6px;align-items:baseline}
 body[data-screen="game"] .battle-screen .chart-heading .eyebrow{font-size:7px;letter-spacing:0}
 body[data-screen="game"] .battle-screen .chart-heading .market-price{display:none}
 body[data-screen="game"] .battle-screen .chart-heading .tag{font-size:6px;letter-spacing:.3px;padding:4px 5px}
 body[data-screen="game"] .battle-screen .boss-rsi-chart{height:56px;min-height:56px;max-height:56px;flex-basis:56px}
 body[data-screen="game"] .battle-screen .boss-indicator-readings{font-size:8px;gap:2px 10px;padding:2px 14px 0;line-height:1.5}
 body[data-screen="game"] .battle-screen .indicator-warmup{font-size:8px;padding:3px 14px 0;max-height:28px}
 body[data-screen="game"] .battle-screen .boss-stage-caption{padding:4px 14px 0;font-size:6px;line-height:1.3;gap:5px;letter-spacing:.1px;flex-wrap:nowrap}
 body[data-screen="game"] .battle-screen .boss-stage-caption>span:last-child{max-width:47%;text-align:right}
 body[data-screen="game"] .battle-screen .boss-taunt{top:5px;left:auto;right:13px;max-width:140px;font-size:10px}
 body[data-screen="game"] .battle-dock{padding:8px 12px 0}
 body[data-screen="game"] .battle-actionbar{display:flex;flex-direction:column;gap:6px;align-items:stretch}
 body[data-screen="game"] .battle-primary-actions,body[data-screen="game"] .battle-actionbar>.decision-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%}
 body[data-screen="game"] .battle-actionbar .button{min-height:36px;padding:8px 7px;font-size:10px;white-space:normal;box-shadow:none;line-height:1.2}
 body[data-screen="game"] .battle-actionbar .button.primary{grid-column:1 / -1;min-height:42px;font-size:12px;padding:10px 15px}
 body[data-screen="game"] .battle-utilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 body[data-screen="game"] .battle-utilities .button{min-height:33px;font-size:9px;padding:7px 5px;border-color:#ccbc9842}
 body[data-screen="game"] .battle-readout{font-size:8px;line-height:1.4;min-height:24px;padding:5px 0 0;gap:7px}
 body[data-screen="game"] .battle-readout>span:last-child{max-width:45%;text-align:right}
 body[data-screen="game"] .fixed-strategies .strategy-deck-heading{min-height:33px;margin:0;gap:5px}
 body[data-screen="game"] .fixed-strategies .strategy-deck-heading>div:first-child{display:block}
 body[data-screen="game"] .fixed-strategies .strategy-deck-heading .eyebrow{font-size:7px;letter-spacing:.6px}
 body[data-screen="game"] .fixed-strategies .strategy-deck-heading p:not(.eyebrow){display:none}
 body[data-screen="game"] .strategy-deck-nav{gap:4px}
 body[data-screen="game"] .strategy-deck-nav .button{min-height:32px;font-size:9px;padding:5px 7px;min-width:42px}
 body[data-screen="game"] .strategy-hand{gap:9px;padding-top:7px;padding-bottom:9px;height:calc(var(--card-height) + 26px);margin-inline:-4px}
 body[data-screen="game"] .strategy-hand .battle-card{width:160px;flex-basis:160px;border-radius:8px}
 body[data-screen="game"] .strategy-hand .battle-card .strategy-art{height:41px;min-height:41px}
 body[data-screen="game"] .strategy-hand .battle-card .strategy-glyph{height:45px;width:53px}
 body[data-screen="game"] .strategy-hand .battle-card .eyebrow{font-size:7px;margin:7px 9px 3px;letter-spacing:.5px}
 body[data-screen="game"] .strategy-hand .battle-card .battle-card-name{font-size:21px;min-height:22px;line-height:1;letter-spacing:-.4px;margin:0 9px auto}
 body[data-screen="game"] .strategy-hand .battle-card .battle-card-description{display:none}
 body[data-screen="game"] .strategy-hand .battle-card .battle-card-cost{font-size:9px;line-height:1.35;margin:5px 9px 6px;padding-top:5px}
 body[data-screen="game"] .strategy-hand .battle-card .card-link{font-size:9px;padding:6px 9px;min-height:25px}
 body[data-screen="game"] .strategy-hand .card-lock-reason{font-size:10px;line-height:1.4;padding:8px}
 body[data-screen="game"] .journey-screen{padding:22px 16px 35px}
 body[data-screen="game"] .journey-screen .run-heading{align-items:flex-start;gap:12px;margin-top:0}
 body[data-screen="game"] .journey-screen .run-heading h1{font-size:29px}
 body[data-screen="game"] .journey-screen .bankroll strong{font-size:26px}
 body[data-screen="game"] .defeat-screen{padding:25px 19px}
 body[data-screen="game"] .defeat-screen .defeat-title{font-size:clamp(34px,8vw,61px);letter-spacing:.05em;margin:0 -6px 20px}
 body[data-screen="game"] .defeat-copy>.eyebrow{font-size:8px;letter-spacing:2px;margin-bottom:25px}
 body[data-screen="game"] .defeat-copy>p:not(.eyebrow){font-size:12px;max-width:335px}
 body[data-screen="game"] .defeat-stats{gap:18px;margin:25px auto;padding-block:18px}
 body[data-screen="game"] .defeat-stats strong{font-size:24px}
 body[data-screen="game"] .defeat-stats small,body[data-screen="game"] .defeat-stats span{font-size:8px;letter-spacing:.5px}
 body[data-screen="game"] .defeat-actions{gap:8px;margin-top:22px}
 body[data-screen="game"] .defeat-actions .button{font-size:11px;padding:12px 15px;min-height:45px}
}
/* Compact screens retain an internal arena scroll area instead of clipping controls. */
@media(max-height:650px){
 body[data-screen="game"] .battle-screen{overflow-y:auto;grid-template-rows:minmax(260px,1fr) auto;scrollbar-color:#94794c #17231d}
 body[data-screen="game"] .battle-screen>.boss-arena{min-height:260px}
 body[data-screen="game"] .battle-screen .boss-stage{padding-top:40px}
 body[data-screen="game"] .battle-screen .boss-subtitle{display:none}
 body[data-screen="game"] .battle-screen .boss-wallet small{display:none}
 body[data-screen="game"] .defeat-screen{place-items:start center;padding-top:30px}
}
@media(prefers-reduced-motion:reduce){
 body[data-screen="game"] .battle-screen *,body[data-screen="game"] .defeat-screen *,body[data-screen="game"] .journey-screen *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
body[data-screen="game"].motion-off .battle-screen *,body[data-screen="game"].motion-off .defeat-screen *,body[data-screen="game"].motion-off .journey-screen *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
