:root{--bg:#14232b;--panel:#1a3038;--text:#eee5d1;--muted:#9aafa9;--gold:#e1c48b;--teal:#aad0bc;--line:#b2cab129}
body[data-view=pixel]{background:radial-gradient(ellipse at 60% 15%,#23424a 0,#12232b 70%);min-height:100vh}
body[data-view=pixel] #app{max-width:1840px;margin:auto}

/* One information column keeps the scene wide and centered in its play column. */
.layout{display:grid;grid-template-columns:208px minmax(0,1fr);gap:16px;padding:12px 16px;align-items:stretch}
.play-column{display:flex;flex-direction:column;gap:12px;min-width:0}
.left-sidebar{display:flex;flex-direction:column;grid-column:auto;align-items:stretch;gap:10px;padding:0;border:0;min-width:0;min-height:0;max-height:calc(100dvh - 24px);overflow:hidden}
.left-sidebar .brand{display:grid;grid-template-columns:28px minmax(0,1fr);gap:2px 9px;padding:9px 10px;border:1px solid var(--line);background:#10282db3;flex-shrink:0}
.brand-mark{grid-row:1/3;align-self:center;font-size:29px;line-height:1}
.brand h1{font-size:18px;line-height:1.25;letter-spacing:2px;white-space:nowrap}
.brand p{font-size:7px;line-height:1.2;letter-spacing:2px;margin-top:3px}
.version{grid-column:2;justify-self:start;margin:1px 0 0;padding:1px 5px;font-size:8px;line-height:1.3;border-radius:0}
.formation-panel,.match-panel,.sidebar-nav,.log-panel{border:1px solid var(--line);padding:10px;background:#17343bc9;border-radius:0;min-width:0}
.formation-panel,.match-panel,.sidebar-nav{flex-shrink:0}
.section-label{font-size:10px;line-height:1.3;letter-spacing:1.5px;color:#c0d2c6}
.formation-row{font-size:11px;line-height:1.3;margin-top:7px}
.formation-row strong{font-size:18px;line-height:1.1;color:var(--gold)}
.formation-row small{font-size:10px}
.formation-panel>p{font-size:9px;line-height:1.4;margin-top:7px}
.match-hero{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:8px;margin-top:8px;border-top:1px solid var(--line)}
.match-hero-name{display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:12px;line-height:1.25}
.match-hero-name>span{color:var(--teal);font-size:9px;line-height:1.2;letter-spacing:1px}
.match-hero-name>b{font-weight:500;color:#e8e6d6}
.match-hero.enemy .match-hero-name>span{color:#e2a49a}
.match-hero-vitals{display:flex;gap:10px;margin:0;font-size:11px;line-height:1.2;color:#d6a1a3;white-space:nowrap}
.match-hero-vitals>span:last-child{color:#a8c1d3}
.match-hero-vitals strong{font-size:16px;line-height:1.1;font-weight:500;margin-left:3px;font-variant-numeric:tabular-nums}
.sidebar-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;align-items:stretch}
.sidebar-nav>.section-label{grid-column:1/-1}
.sidebar-nav>.mode-link,.sidebar-nav>.text-button{grid-column:auto;text-align:center}
.mode-link{display:block;padding:5px 0;color:#b9d4c7;text-decoration:none;border-bottom:1px solid #adc9be28;font-size:10px;line-height:1.4}
.mode-link:hover{color:#f1dfad;border-bottom-color:#dec68b99}
.sidebar-nav .mode-link{padding:4px 1px;font-size:9px;line-height:1.4}
.sidebar-nav .icon-button{width:100%;height:27px;border-radius:0;background:#10272e80}
.sidebar-nav .text-button{padding:3px 1px;font-size:9px;line-height:1.3;border:1px solid var(--line);background:#10272e80}
.log-panel{display:flex;flex-direction:column;flex:1 1 0;min-height:96px;overflow:hidden;grid-column:auto;grid-row:auto}
#battle-log{flex:1;min-height:0;max-height:none;margin-top:8px;overflow:auto}
#battle-log li{font-size:9px;line-height:1.65;padding:5px 0 5px 8px}
.bottom-bar{display:none}

/* Five whole-body recruits and a tightly grouped resource/upgrade/lock/refresh square. */
.recruitment{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:14px;padding:6px 10px;margin:0;border-radius:0;border:1px solid #a4b9aa50;background:linear-gradient(120deg,#24454bd9,#132c34e8);min-width:0}
.recruit-display{min-width:0}
.shop-heading{margin:0 0 2px;gap:6px;align-items:center;min-width:0}
.shop-heading h2{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 9px;font-size:16px;line-height:1.2;margin:0;letter-spacing:2px}
.shop-heading .eyebrow{display:none}
.shop-heading h2 small{font-size:8px;letter-spacing:0;margin:0}
.shop-tier{font-size:9px;letter-spacing:0;margin:0}
.shop-odds{font-size:8px;line-height:1.25;margin:0 0 3px;color:#a9c0b7}
.shop{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;align-items:end;position:relative;min-width:0}
.recruit-figure,.recruit-card.sold{--market-height:80px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;min-height:126px;padding:1px 3px 2px;border:0;border-radius:0;background:transparent;text-align:center;overflow:visible}
.recruit-figure.unaffordable{opacity:.75}
.recruit-figure:hover:enabled{transform:none;border:0;background:radial-gradient(ellipse at 50% 65%,#adc9be18,transparent 68%)}
.recruit-figure:focus-visible{outline:1px solid var(--gold);outline-offset:-2px}
.market-stage{position:relative;display:block;width:100%;height:88px;padding-bottom:8px;isolation:isolate}
.market-stage::after{content:'';position:absolute;width:58px;height:12px;bottom:1px;left:50%;transform:translateX(-50%);border:2px solid var(--tier-color);border-radius:50%;filter:drop-shadow(0 0 4px var(--tier-color));z-index:0}
.market-stage>.pixel-card-art{position:relative;z-index:1;display:grid;place-items:end center;height:var(--market-height);width:100%;margin:0}
.market-stage .pixel-card-image{width:min(100%,calc(var(--pixel-aspect,1)*var(--market-height)));height:auto;aspect-ratio:var(--pixel-aspect,1);max-width:none;max-height:none}
.recruit-figure.owned-match .pixel-card-image{filter:drop-shadow(0 0 2px #e6f8ca80) drop-shadow(0 0 5px #b8ead23d)}
.market-name{font-size:10px;line-height:14px;font-weight:500;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.market-stats{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:2px;width:100%;min-height:20px}
.market-keyword{font-size:8px;color:#b3cdbd}
.market-copies{position:absolute;bottom:31px;right:4px;font-size:7px;color:var(--teal);background:#122b34bd;padding:1px 3px;z-index:3}
.recruit-card.sold{color:#9ab6ab66;font-size:9px;letter-spacing:2px;border:0;background:transparent}
.recruit-card.sold::before{content:'◌';font-size:24px;color:#91b6a34d;margin-bottom:25px}
.recruit-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(70px,1fr));gap:5px;min-width:0;align-self:stretch}
.recruit-tools .shop-controls{display:contents}
.recruit-tools .resource-panel,.recruit-tools .small-button{min-width:0;min-height:70px;margin:0;padding:5px 4px;border:1px solid #a7c7b65c;border-radius:0;background:#16383bd9;box-shadow:inset 0 1px #d6eedb0c}
.recruit-tools .resource-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-color:#d3b97770;background:#6d5c2829}
.resource-panel>.eyebrow{font-size:6px;letter-spacing:1px;color:#d4c191}
.resource-amount{justify-content:center;gap:5px;margin:3px 0 0}
.resource-amount>span{font-size:27px;color:#edcc7e}
.resource-amount>strong{font-size:32px;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;color:#f6e6bd}
.resource-amount small{font-size:8px;margin:0;color:#c4c6aa}
.resource-panel p{font-size:7px;line-height:1.4;margin-top:5px;color:#bfc5af;max-width:100%}
.recruit-tools .small-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;white-space:normal;color:#d5e8d9}
.recruit-tools .small-button span{margin:0}
.control-symbol{display:grid;place-items:center;width:28px;height:28px;font-family:var(--sans);font-size:27px;font-weight:500;line-height:1;color:var(--gold);flex:none}
.control-symbol svg{display:block;width:100%;height:100%}
.control-label{display:block;font-size:11px;font-weight:600;letter-spacing:1px;line-height:1.35;color:inherit}
.control-value{display:block;font-size:12px;line-height:1.3;font-variant-numeric:tabular-nums;color:#ebd298}
.recruit-tools .small-button[aria-pressed=true]{border-color:#f0d38a;background:#80652c40;color:#f3ddb1}
.recruit-tools .small-button:disabled{opacity:.45}
.recruit-tools .small-button:hover:enabled{background:#32605b94;transform:none}
.recruit-tools .small-button:focus-visible{outline-offset:2px}

/* Console overlays occupy the upper-left margin without moving the board. */
.arena{height:clamp(448px,calc(100dvh - 216px),820px);min-height:448px;border:1px solid #b4a07788;background:#415364;border-radius:0;isolation:isolate;overflow:hidden}
.arena canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
.arena::before,.arena::after,.arena-title,.pixel-team-caption{display:none}
.board-ui{z-index:2}
.arena-corner{z-index:1}
.round-console{position:absolute;top:14px;left:14px;z-index:6;width:224px;padding:11px;border:1px solid #d1b77880;background:linear-gradient(145deg,#173c418c,#102a3280);backdrop-filter:blur(2px);box-shadow:0 4px 18px #071e2766}
.round-console .round-block{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:10px;letter-spacing:0;padding-bottom:9px;border-bottom:1px solid #d4c18b3b}
.round-console .round-block i{display:none}
.round-console .prep-clock{display:flex;flex-direction:row;align-items:baseline;gap:8px;width:100%;min-width:0;color:#f3d991}
.round-console .prep-clock b{font-size:30px;line-height:1.1;letter-spacing:1px}
.round-console .prep-clock small{font-size:8px;line-height:1.4;color:#b3c7b7}
.round-console .prep-clock.urgent{color:#ffac91}
.round-console .status-dot{display:inline-block;width:5px;height:5px}
.round-console #phase-label{flex:1;color:#d4e7d7}
.round-console #round-label{font-size:11px;color:#ead29d;white-space:nowrap}
.round-console .battle-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 6px;padding:9px 0 0;margin:0;border:0;background:transparent;min-width:0}
.round-console #ready-status{grid-column:1;font-size:8px;line-height:1.4;margin:0;align-self:center;text-align:left;color:#bbd8c8}
.round-console .speed-control{grid-column:2;display:flex;align-items:center;gap:4px;font-size:8px;margin:0;white-space:nowrap}
.round-console .speed-control select{padding:3px 4px;font-size:10px;background:#173037;border-radius:0;border-color:#aecbb64d}
.round-console .primary-button{grid-column:1/-1;display:grid;grid-template-columns:28px minmax(0,1fr);gap:2px 8px;min-height:57px;padding:9px 11px;border:1px solid #efd69a;border-radius:0;background:linear-gradient(125deg,#e3cb9b80,#b59a6470);color:#fff3ce;text-shadow:0 1px 3px #14292f;box-shadow:0 2px 9px #0003;letter-spacing:1px;text-align:left}
.round-console .primary-button .control-symbol{grid-row:1/3;width:28px;height:28px;font-size:26px;color:#fff3ce}
.round-console .primary-button .control-label{align-self:end;font-size:15px;line-height:1.3}
.round-console .primary-button .control-value{align-self:start;font-size:8px;line-height:1.3;letter-spacing:0;color:#ede4c8}
.round-console .primary-button:disabled{opacity:.6}
.round-console #battle-note{display:none}
.board-caption{bottom:28px;left:12px;right:12px;padding:4px 7px;font-size:7px;background:#1029319c;z-index:3}
.hero-action{width:44px;height:54px;bottom:auto;right:auto;z-index:5;transform:translate(-50%,-50%);border-width:1px}
.hero-action .power-symbol{font-size:23px}
.power-cost{font-size:9px}
.hero-action.passive{border-color:#adc9beaa;cursor:help}
.slot-target{border-radius:30%;z-index:2}
.slot-target.selected{background:#f7db9b12}
.unit-hud{width:56px;z-index:3}
.unit-hud .stat,.market-stats .stat{width:22px;height:24px;font-size:14px;border-radius:3px;clip-path:none;background:rgba(244,191,47,.46);border:1px solid #ffe49c88;color:#fff3c7;text-shadow:0 1px 3px #000}
.unit-hud .stat.hp,.market-stats .stat.hp{background:rgba(206,53,72,.48);border-color:#ffacb780;color:#ffe9ed}
.market-stats .stat{width:20px;height:20px;font-size:12px}
.unit-stats{transform:translateY(-9px)}
.unit-name{visibility:hidden;font-size:8px;color:#f7e7c7;text-shadow:0 2px 3px #05151c}
.slot-target:hover+.unit-hud .unit-name,.slot-target:focus-visible+.unit-hud .unit-name{visibility:visible}
.status-icons{top:-30px;font-size:9px}
.hero-piece-target{width:65px;height:70px}
.hero-piece-label{font-size:10px;top:91%;text-shadow:0 2px 3px #07151a}
.hero-piece-label small{font-size:9px}
.tier-legend{position:absolute;bottom:6px;left:16px;right:16px;z-index:3;font-size:8px;padding:0;gap:11px;pointer-events:none}
.tier-legend small{font-size:7px}

/* Reserve hit targets retain the geometry module's projected positions. */
.arena-reserves{position:absolute;inset:0;z-index:4;pointer-events:none}
.arena-reserves .bench-title{position:absolute;transform:translate(-50%,-50%);width:auto;display:flex;align-items:center;gap:8px;color:#e9dec6;font-size:9px;letter-spacing:2px;padding:4px 9px;background:#10252dba;border:1px solid #b3c3ad55;white-space:nowrap}
.arena-reserves .bench-title small{font-size:9px;letter-spacing:0;margin:0;color:#b8d3c6}
.arena-reserves .bench{position:absolute;inset:0;display:block}
.arena-reserves .bench-card{position:absolute;transform:none;width:auto;height:auto;border:1px solid transparent;background:transparent;border-radius:30%;padding:0;pointer-events:auto}
.arena-reserves .bench-card.empty{font-size:15px;color:#c4dbcfb3;align-items:flex-end;padding-bottom:6px}
.arena-reserves .bench-card.filled{background:transparent;box-shadow:none}
.arena-reserves .bench-card::after{display:none}
.arena-reserves .bench-card:hover,.arena-reserves .bench-card:focus-visible{border-color:#c4dbcf88;background:#bde7d20c}
.arena-reserves .bench-card.selected{border-color:var(--gold)}
.arena-reserves .mini-icon{display:none}
.arena-reserves .mini-name{visibility:hidden;white-space:nowrap;font-size:8px;background:#102b32e0;padding:1px 4px;bottom:-16px}
.arena-reserves .bench-card:hover .mini-name,.arena-reserves .bench-card:focus-visible .mini-name{visibility:visible}
.arena-reserves .mini-stats{font-size:8px;top:auto;bottom:-5px;right:1px;color:#efdfc0;text-shadow:0 1px 3px #000}
.arena-reserves .mini-tier{font-size:8px;top:auto;bottom:-5px;left:1px}
.position-preview{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:hidden}
.position-preview polygon{fill:#7cf2c32b;stroke:#b3ffe4;stroke-width:2;stroke-dasharray:5 3}
.slot-target.range-beneficiary{border:2px solid #a0ffcf;background:#7affe317;box-shadow:0 0 15px #72f6ba60}
.slot-target.range-source{border:2px solid #ffe0a1;background:#ffe4aa13}
.position-hint{position:absolute;right:14px;left:auto;top:14px;max-width:calc(100% - 266px);z-index:5;pointer-events:none;background:#102832dc;border:1px solid #8fd3b88c;padding:7px 10px;font-size:10px;line-height:1.5;color:#d8ffeb}
.event-banner{font-size:10px;line-height:1.5;background:#163039ed;top:14px;left:auto;right:14px;transform:none;max-width:calc(100% - 266px);white-space:normal;text-align:right;z-index:7}
.pixel-load-notice{position:absolute;inset:0;z-index:9;display:grid;place-content:center;text-align:center;background:#122630e8;color:#e9d3a4;font-size:13px;padding:20px}
.pixel-load-notice[hidden]{display:none}

.pixel-card-art{display:grid;place-items:center;width:100%;height:100%;transform:scaleX(var(--pixel-flip,1));pointer-events:none}
.pixel-card-image{display:block;width:calc(var(--pixel-aspect,1)*100%);height:auto;aspect-ratio:var(--pixel-aspect,1);max-width:100%;max-height:100%;background-repeat:no-repeat;image-rendering:pixelated}
.drag-ghost>.pixel-card-art{width:105px;height:105px;margin:auto}
.drag-ghost{background:#19363bf2;width:128px;border-radius:0}
.drag-ghost>span:not(.pixel-card-art){font-size:9px}
.ability-tooltip.tooltip-skill-only,.ability-tooltip:has(.tooltip-skill-only){width:250px;padding:12px 14px;border-radius:2px;border-color:#c0d6bc70;background:#142b31ed}
.tooltip-skill-only .detail-effect,.tooltip-skill-only>p{margin:0;font-size:12px;line-height:1.75;color:#e0e6d3}
.tooltip-skill-only b{color:#ead29c}
.hero-choice>.hero-portrait{height:90px;width:90px;margin:0 auto 8px;border:0;background:none;clip-path:none;overflow:visible}
.hero-portrait>.pixel-card-art{width:100%;height:100%}
.hero-choice .pixel-card-art{place-items:end center}
.hero-choice .pixel-card-image{width:calc(var(--pixel-aspect,1)*var(--hero-display-height,54px));max-width:none;max-height:none}
.hero-choices{gap:10px}
.hero-choice{padding:9px 10px;display:flex;flex-direction:column;align-items:flex-start}
.hero-choice>p{font-size:9px}
.hero-choice>small{font-size:8px}
.modal-intro{margin:9px 0 15px}
.modal-footnote{font-size:9px}
.welcome-rules{margin:16px 0}
dialog{max-width:680px;padding:25px 30px;border-radius:0}
dialog h2{font-size:27px}
.welcome-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.welcome-roster{display:flex;align-items:center;justify-content:center;gap:18px;padding:12px 20px;border:1px solid #adc9be66;color:var(--teal);background:#aad0bc0a;text-decoration:none;font-size:12px;letter-spacing:2px;min-height:48px}
.welcome-roster:hover{background:#aad0bc18;border-color:var(--teal)}
.welcome-roster:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

@media(min-width:1500px){
  .layout{grid-template-columns:224px minmax(0,1fr);gap:18px;padding:14px 20px}
  .recruitment{grid-template-columns:minmax(0,1fr) 236px;padding:6px 12px}
  .arena{height:clamp(500px,calc(100dvh - 216px),820px)}
}
@media(max-width:1180px){
  .layout{grid-template-columns:180px minmax(0,1fr);gap:10px;padding:10px}
  .left-sidebar{gap:10px}
  .left-sidebar .brand{grid-template-columns:23px minmax(0,1fr);gap:4px 7px;padding:11px 8px}
  .brand h1{font-size:16px;letter-spacing:1px}
  .brand-mark{font-size:24px}
  .brand p{font-size:6px;letter-spacing:1.5px}
  .formation-panel,.match-panel,.sidebar-nav,.log-panel{padding:10px}
  .recruitment{grid-template-columns:minmax(0,1fr) 184px;gap:9px;padding:6px 8px}
  .shop-heading h2 small{display:none}
  .shop-odds{font-size:7px}
  .recruit-figure,.recruit-card.sold{padding-inline:1px}
  .market-name{font-size:9px}
  .market-keyword{font-size:7px}
  .market-stats{gap:4px}
  .control-label{font-size:10px}
  .control-value{font-size:11px}
  .resource-amount>strong{font-size:29px}
  .resource-amount>span{font-size:23px}
  .unit-hud{width:50px}
  .unit-hud .stat{width:20px;height:22px;font-size:12px}
}
@media(max-width:900px){
  .layout{grid-template-columns:minmax(0,1fr);padding:10px;gap:12px}
  .play-column{grid-row:1;width:100%}
  .left-sidebar{grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;max-height:none;overflow:visible}
  .left-sidebar .brand{grid-column:1/-1;grid-template-columns:28px minmax(0,1fr) auto;align-items:center}
  .brand-mark{grid-row:1}
  .version{grid-column:3;grid-row:1;margin:0;display:block}
  .sidebar-nav{align-content:start}
  .log-panel{min-height:150px}
  #battle-log{max-height:180px}
  .arena{height:clamp(500px,66dvh,690px)}
  .recruitment{grid-template-columns:minmax(0,1fr) 194px}
}
@media(max-width:680px){
  .layout{padding:8px;gap:10px}
  .play-column{gap:9px}
  .recruitment{grid-template-columns:minmax(0,1fr);gap:6px;padding:6px}
  .recruit-tools{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:auto;gap:5px}
  .recruit-tools .resource-panel,.recruit-tools .small-button{min-height:72px;padding:5px 3px}
  .resource-panel>.eyebrow{display:none}
  .resource-amount>strong{font-size:27px}
  .resource-amount>span{font-size:20px}
  .resource-panel p{font-size:6px;margin-top:3px}
  .control-symbol{width:25px;height:25px;font-size:24px}
  .control-label{font-size:10px;letter-spacing:0}
  .control-value{font-size:10px}
  .shop-heading h2{font-size:15px}
  .shop-tier{font-size:8px}
  .shop-odds{font-size:7px;margin-bottom:3px}
  .shop{gap:2px}
  .recruit-figure,.recruit-card.sold{--market-height:64px;min-height:109px;padding:1px 1px 2px}
  .market-stage{height:72px}
  .market-stage::after{width:42px;height:10px;bottom:4px;border-width:1px}
  .market-name{font-size:8px}
  .market-keyword{display:none}
  .market-stats{gap:5px;min-height:19px}
  .market-stats .stat{font-size:10px;width:17px;height:18px}
  .market-copies{font-size:6px;right:0;bottom:28px}
  .round-console{width:192px;top:10px;left:10px;padding:9px}
  .round-console .prep-clock b{font-size:26px}
  .round-console .prep-clock small{font-size:7px}
  .round-console #ready-status{font-size:7px}
  .round-console .speed-control{font-size:7px;gap:3px}
  .round-console .speed-control select{padding:2px 3px;font-size:9px}
  .round-console .primary-button{min-height:53px;padding:8px 9px;gap:2px 6px}
  .round-console .primary-button .control-label{font-size:14px}
  .round-console #battle-note{font-size:7px}
  .position-hint,.event-banner{right:10px;top:10px;max-width:calc(100% - 222px);font-size:9px;padding:6px 8px}
  .unit-hud{width:44px}
  .unit-hud .stat{width:18px;height:20px;font-size:11px}
  .unit-name{font-size:7px}
  .hero-piece-target{width:44px;height:52px}
  .hero-piece-label{font-size:8px}
  .hero-piece-label small{font-size:7px}
  .hero-action{width:36px;height:44px}
  .hero-action .power-symbol{font-size:19px}
  .power-cost{font-size:8px}
  .board-caption{font-size:6px;left:8px;right:8px}
  .tier-legend{left:10px;right:10px;font-size:7px}
  .tier-legend small{font-size:6px}
  .arena-reserves .bench-title{font-size:8px;padding:3px 6px}
  .arena-reserves .bench-title small{font-size:8px}
  .hero-choice>.hero-portrait{width:70px;height:70px}
  dialog{padding:22px 18px}
  .hero-choice{padding:7px}
  .modal-intro{font-size:10px}
  .hero-choice>p{font-size:8px}
}
@media(max-width:420px){
  .arena{height:480px;min-height:460px}
  .round-console{width:174px;padding:8px}
  .round-console .round-block{font-size:9px;gap:4px}
  .round-console #round-label{font-size:10px}
  .round-console .battle-controls{gap:7px 4px}
  .round-console .speed-control{flex-direction:column;gap:1px}
  .round-console .primary-button .control-label{font-size:13px}
  .position-hint,.event-banner{max-width:calc(100% - 204px);font-size:8px}
  .market-name{max-width:65px}
  .welcome-actions{grid-template-columns:1fr}
  .welcome-roster{min-height:44px}
}
/* Whole connected sprites breathe around their planted feet, with staggered phases. */
.recruit-figure .pixel-card-image,.hero-portrait .pixel-card-image{transform-origin:50% 100%;animation:pixel-breathe var(--idle-period,1600ms) steps(1,end) infinite;animation-delay:var(--idle-delay,0s)}
@keyframes pixel-breathe{0%,100%{transform:scale(1,1)}25%,75%{transform:scale(calc(1 - var(--idle-rise,.06)*.11),calc(1 + var(--idle-rise,.06)*.5))}50%{transform:scale(calc(1 - var(--idle-rise,.06)*.22),calc(1 + var(--idle-rise,.06)))}}
.power-symbol svg{display:block;width:30px;height:30px;margin:auto}.choice-power-icon{display:inline-block;vertical-align:middle;margin-right:4px}.choice-power-icon svg{width:18px;height:18px}
.hero-choices{grid-template-columns:repeat(3,minmax(0,1fr))}#welcome{max-height:92vh;overflow:auto;width:min(1000px,94vw)}
.lobby-panel{padding:10px;border:1px solid var(--line);background:#152c32}.lobby-player{display:flex;justify-content:space-between;gap:5px;padding:5px 0;font-size:10px;border-bottom:1px solid #ffffff0b}.lobby-player small{display:block;color:var(--muted);font-size:9px}.lobby-player b{white-space:nowrap;color:#f2b5ab;font-size:10px}.lobby-player.eliminated{opacity:.45}.lobby-player.current-opponent{border-left:2px solid var(--gold);padding-left:5px}
@media(max-width:680px){.hero-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.lobby-panel{max-height:210px;overflow:auto}}
@media(prefers-reduced-motion:reduce){.recruit-figure .pixel-card-image,.hero-portrait .pixel-card-image{animation:none}}
#welcome{max-width:min(1000px,94vw);padding:20px 30px}
#welcome h2{font-size:28px;margin:8px 0}#welcome h2 br,#welcome .modal-intro br{display:none}
#welcome .modal-intro{margin:6px 0 10px}#welcome .choose-label{margin:10px 0}
#welcome .hero-choice>.hero-portrait{width:80px;height:72px;flex:none;align-self:center}#welcome .hero-choice>p{line-height:1.6}
#welcome .welcome-rules{margin:8px 0}#welcome .modal-footnote{margin-top:8px}
.left-sidebar{overflow-y:auto;scrollbar-width:thin}
@media(max-width:680px){#welcome{padding:16px}}

/* Resource readout sits above three equal action targets. */
.recruit-tools{display:flex;flex-direction:column;gap:5px;justify-content:space-between}
.recruit-tools .resource-panel{min-height:0;padding:2px 4px 6px;align-items:flex-start;text-align:left;background:none;border:0;border-bottom:1px solid #d9c38f40;box-shadow:none}
.recruit-tools .resource-panel>.eyebrow{display:block;font-size:9px;letter-spacing:1px}
.recruit-tools .resource-amount{justify-content:flex-start;gap:7px;line-height:1}
.recruit-tools .resource-amount>strong{font-size:30px}
.recruit-tools .resource-amount>small{font-size:13px;color:var(--gold)}
.recruit-tools .resource-panel p{margin-top:3px;font-size:7px}
.resource-coins{display:flex;gap:4px;width:100%;margin-top:4px}
.resource-coin{display:block;flex:1;max-width:17px;aspect-ratio:1;border:1px solid #aeb7a860;border-radius:50%;background:#12282e}
.resource-coin.filled{background:#efd18a;border-color:#fff0be;box-shadow:inset 0 0 0 2px #b18d4b55,0 0 3px #f2d48b33}
.recruit-tools .shop-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.recruit-tools .small-button{min-height:70px;padding:5px 2px}
.recruit-tools .control-symbol{width:27px;height:27px}
.recruit-tools .control-label{font-size:10px;letter-spacing:0}
.recruit-tools .control-value{font-size:10px}
.recruit-display{position:relative;outline:1px solid transparent;outline-offset:3px}
.shop-locked .recruit-display{outline-color:#f0d28ca6;box-shadow:inset 0 0 15px #e4c5800a,0 0 6px #e4c58020}
.shop-locked .recruit-display::after{content:'';position:absolute;inset:-4px;pointer-events:none;background:linear-gradient(135deg,#ffe8a7 0 2px,transparent 3px) top left/12px 12px no-repeat,linear-gradient(225deg,#ffe8a7 0 2px,transparent 3px) top right/12px 12px no-repeat,linear-gradient(45deg,#ffe8a7 0 2px,transparent 3px) bottom left/12px 12px no-repeat,linear-gradient(315deg,#ffe8a7 0 2px,transparent 3px) bottom right/12px 12px no-repeat}
#shop-lock-state{font-size:10px;color:#f4d895;letter-spacing:0}
@media(max-width:680px){.recruit-tools{display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,2fr);align-items:stretch;gap:8px}.recruit-tools .resource-panel{border-bottom:0;border-right:1px solid #d9c38f40;padding-right:8px;justify-content:center}.resource-coins{gap:2px}.recruit-tools .small-button{min-height:76px}.recruit-tools .resource-amount>strong{font-size:27px}}
