:root{color-scheme:dark;--bg:#101923;--panel:#182430;--line:#2a3947;--ink:#e7edeb;--muted:#8c9caa;--green:#b4ef84}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Segoe UI,Arial,sans-serif;font-size:14px}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,a:focus-visible{outline:2px solid var(--green);outline-offset:4px}button{transition:background .15s,transform .15s}button:hover:not(:disabled){filter:brightness(1.12)}[hidden]{display:none!important}.topbar{height:88px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 5vw}.brand{display:flex;align-items:center;gap:9px;font-size:19px;font-weight:800;letter-spacing:1px;text-decoration:none;color:var(--ink)}.brand b{color:var(--green)}.pokeball{width:26px;height:26px;border:3px solid #d7dfdb;border-radius:50%;background:linear-gradient(#bded90 0 41%,#182430 41% 57%,#dbe5d8 57%);position:relative;margin-right:4px}.pokeball:after{content:'';position:absolute;width:7px;height:7px;border:2px solid #182430;border-radius:50%;background:#dbe5d8;left:5px;top:6px}.edition{font:10px monospace;color:var(--muted);padding-left:16px;margin-left:10px;border-left:1px solid var(--line);letter-spacing:2px}.header-right{display:flex;align-items:center;gap:10px;font:10px monospace;letter-spacing:1px;color:var(--muted)}.online-dot{width:6px;height:6px;background:var(--green);border-radius:50%;box-shadow:0 0 9px #b4ef8444}.small-button{background:#1b2835;color:#bbc9d1;border:1px solid #344351;padding:10px 13px;font:10px monospace;letter-spacing:.6px;margin-left:12px}main{max-width:1330px;margin:0 auto;padding:38px 40px 0}.eyebrow{font:10px monospace;letter-spacing:1.7px;color:#a7b6c3;display:flex;gap:14px;align-items:center;justify-content:space-between}.tag{font-size:9px;padding:6px 9px;border:1px solid #405138;color:#c4e6b0;background:#253729}.intro{display:flex;justify-content:space-between;align-items:center;margin:25px 0 38px}h1{font-size:clamp(30px,3.3vw,46px);line-height:1.15;letter-spacing:-1.8px;margin:0 0 18px;font-weight:750}h1 em{font-style:normal;color:var(--green)}p{color:var(--muted);line-height:1.8;font-size:13px;margin:0}.arena-stamp{display:flex;align-items:center;gap:17px;padding:22px 28px;border-left:1px solid var(--line);font:12px monospace;letter-spacing:2px}.arena-stamp>span{font-size:42px;color:var(--green)}.arena-stamp small{display:block;font-size:9px;color:var(--muted);letter-spacing:1px;margin-top:10px}.section-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.section-label h2{font:11px monospace;letter-spacing:1.4px;margin:0}.section-label h2 span{color:var(--green);margin-left:16px;letter-spacing:0}.section-label>span{font-size:11px;color:var(--muted)}.roster{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.pokemon-card{position:relative;text-align:left;color:var(--ink);background:var(--panel);border:1px solid var(--line);padding:0;overflow:hidden;border-radius:3px}.pokemon-card:hover{transform:translateY(-4px);border-color:#82957c}.pokemon-card.selected{border-color:var(--green);background:#223329;box-shadow:0 0 0 1px #b4ef8433}.card-top{padding:14px 14px 0;display:flex;justify-content:space-between;align-items:center;color:#8496a5;font:10px monospace}.pick-order{width:20px;height:20px;border:1px solid #475563;color:#91a4af;display:grid;place-items:center;border-radius:50%;font-size:10px}.selected .pick-order{background:var(--green);border-color:var(--green);color:#16201c}.sprite-stage{height:132px;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 65%,var(--tint),transparent 65%);position:relative}.sprite-stage:after{content:'';position:absolute;bottom:17px;width:78px;height:14px;border-radius:50%;background:#0b142750;z-index:0}.sprite-stage canvas{width:112px;height:112px;image-rendering:pixelated;z-index:1}.card-copy{padding:10px 15px 16px}.card-copy h3{font-size:16px;margin:0 0 9px;font-weight:650;letter-spacing:-.4px}.type{display:inline-block;font:8px monospace;letter-spacing:.7px;padding:4px 6px;background:var(--type);color:#10202c;border-radius:2px}.role{display:block;color:var(--muted);font-size:10px;margin-top:11px;height:25px;line-height:1.5}.stats{display:flex;gap:5px;margin-top:14px}.stats span{height:3px;flex:1;background:#34414a}.stats span.on{background:var(--type)}.prepare-footer{margin-top:25px;padding:23px 0;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.team-preview{display:flex;gap:9px;margin-top:12px}.team-slot{height:46px;min-width:135px;display:flex;align-items:center;gap:6px;border:1px dashed #394957;color:#637784;font:10px monospace;padding:0 10px}.team-slot.filled{border-style:solid;background:#1b2a33;color:#d2dfda}.team-slot canvas{height:40px;width:40px;image-rendering:pixelated}.team-slot b{color:var(--green);font-weight:400;margin-left:auto}.start-area{display:flex;align-items:flex-end;gap:8px;flex-direction:column}.start-area>span{font-size:10px;color:var(--muted)}.primary{background:var(--green);border:1px solid #bde99d;color:#16231a;font:700 12px monospace;letter-spacing:1.5px;padding:18px 24px;min-width:255px;box-shadow:0 3px 0 #62844c}.primary span{margin-left:30px;font-size:18px}.controls-strip{display:flex;justify-content:space-between;padding:18px 21px;background:#15222d;border:1px solid #263743;color:#8fa1af;font-size:10px}.controls-strip>span{display:flex;gap:9px;align-items:center}kbd{font:9px monospace;color:#c0cec9;padding:4px 6px;background:#24333e;border:1px solid #3a4b56;border-bottom-width:2px;border-radius:3px;white-space:nowrap}.menu-note{display:flex;justify-content:space-between;color:#607482;font:8px monospace;letter-spacing:1px;margin:17px 0 30px}footer{max-width:1250px;margin:0 auto;padding:25px 0;border-top:1px solid var(--line);font:9px monospace;letter-spacing:1px;color:#8496a4;display:flex;gap:30px;align-items:center}footer span{color:#586e7c;font:11px Segoe UI;letter-spacing:0}footer i{margin-left:auto;color:var(--green)}.battle-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.battle-title h2{font-size:22px;font-weight:600;margin:7px 0 0}.battle-title h2 span{font:8px monospace;letter-spacing:1px;color:#778d9b;margin-left:15px}#game-frame{position:relative;background:#416147;border:5px solid #31433f;box-shadow:0 0 0 1px #546558;border-radius:5px;overflow:hidden}#game{display:block;width:100%;aspect-ratio:12/7;image-rendering:pixelated;cursor:crosshair;outline:none}.arena-hud{position:absolute;pointer-events:none;left:22px;right:22px;top:18px;display:flex;justify-content:space-between;gap:20px}.fighter-hud{background:#12252bea;border:1px solid #516758;border-radius:3px;padding:11px 14px;width:245px;box-shadow:3px 3px #182f2a44}.hud-name{font-size:15px;font-weight:700;display:flex;justify-content:space-between;gap:15px}.hud-name small{font:10px monospace;color:#9fb3a9}.health-line{display:flex;align-items:center;gap:7px;margin:8px 0 5px;font:9px monospace;color:#bdd48a}.health-track{height:7px;flex:1;background:#0a1b22;padding:1px}.health-track i{display:block;height:100%;background:#b4ef84;transition:width .12s}.enemy .health-track i{background:#ffae79}.hud-detail{display:flex;justify-content:space-between;color:#98b4ac;font:9px monospace}.match-clock{text-align:center;background:#152a29ce;height:49px;padding:9px 18px;border:1px solid #8ca27a55}.match-clock>span{display:block;font:18px monospace}.match-clock small{display:block;font:7px monospace;margin-top:2px;letter-spacing:1.5px;color:#b8c5ac}#battle-message{position:absolute;top:115px;left:50%;transform:translateX(-50%);pointer-events:none;background:#152b2bdf;color:#e2f5ce;font:11px monospace;padding:9px 15px;border:1px solid #7c9865;opacity:0;text-align:center;max-width:80%;transition:opacity .2s}.field-label{position:absolute;bottom:17px;left:20px;font:8px monospace;letter-spacing:2px;color:#e3eccb;opacity:.6;pointer-events:none}.field-label span{padding-left:10px}.battle-bottom{display:flex;gap:18px;padding:20px 0;align-items:stretch}.squad{width:210px;flex-shrink:0}.squad .eyebrow{font-size:8px}.squad .eyebrow span{color:#6e8492;letter-spacing:0}#battle-team{display:flex;gap:7px;margin-top:9px}.team-button{width:63px;height:60px;background:#1c2b37;border:1px solid #344651;position:relative;padding:0;border-radius:3px}.team-button.active{border-color:var(--green);background:#2a3b30}.team-button:disabled{opacity:.28}.team-button canvas{width:48px;height:48px;image-rendering:pixelated}.mini-hp{position:absolute;bottom:4px;left:6px;right:6px;height:3px;background:#0c1820}.mini-hp i{display:block;height:100%;background:var(--green)}.abilities{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;flex:1}.ability{position:relative;background:#1b2a36;border:1px solid #344651;color:var(--ink);text-align:left;min-height:83px;padding:10px 10px 8px;overflow:hidden;border-radius:3px}.ability-top{display:flex;justify-content:space-between;align-items:center;position:relative;z-index:1}.ability-icon{font-size:20px;color:var(--accent)}.ability strong{display:block;font-size:10px;margin:7px 0 4px;position:relative;z-index:1}.ability small{color:#7f96a5;font:8px monospace;position:relative;z-index:1}.ability .cool-shade{position:absolute;inset:0;top:auto;background:#0a141acf;pointer-events:none}.ability .cool-number{position:absolute;right:10px;bottom:9px;color:#d2e8c9;font:12px monospace;z-index:2}.dash-panel{width:95px;text-align:center;border-left:1px solid var(--line);padding-left:16px;flex-shrink:0}.dash-panel strong{display:block;font:9px monospace;margin:11px 0 9px}.cool-track{height:3px;background:#2b3c46}.cool-track i{height:100%;display:block;background:#8cd6ed}.dash-panel small{font:8px monospace;color:#8a9fae}.battle-help{display:flex;justify-content:space-between;font-size:10px;color:#7d93a1;padding:0 0 24px;align-items:center}.battle-help b{margin:0 8px}.overlay{position:absolute;inset:0;background:#0e1d29d9;backdrop-filter:blur(3px);display:grid;place-items:center;text-align:center;z-index:5}.overlay h2{font-size:42px;letter-spacing:-1px;color:var(--green);margin:12px 0}.overlay p{margin:10px 0 25px}.overlay .result-icon{font-size:40px;color:var(--green)}.overlay .small-button{margin:20px 0 0}.result-stats{font:11px monospace;color:#b7c8ba;margin:15px 0 25px}.overlay .eyebrow{justify-content:center}@media(min-width:1500px){main{padding-top:48px}.intro{margin-bottom:42px}.sprite-stage{height:156px}.sprite-stage canvas{width:130px;height:130px}}@media(max-width:1050px){main{padding:25px 24px 0}.edition{display:none}.arena-stamp{padding:16px;font-size:10px}.roster{gap:7px}.card-copy{padding:9px}.card-copy h3{font-size:14px}.sprite-stage{height:110px}.sprite-stage canvas{width:100px;height:100px}.team-slot{min-width:110px}.controls-strip{padding:15px 10px;gap:7px}.controls-strip>span{font-size:9px;gap:5px}.battle-bottom{gap:10px}.squad{width:170px}.team-button{width:50px}.ability{padding:7px}.dash-panel{width:75px;padding-left:8px}.fighter-hud{width:205px}.arena-hud{left:15px;right:15px;top:12px}.battle-title h2 span{display:none}footer{margin:0 24px}.section-label>span{font-size:10px}.primary{min-width:220px;padding:15px}.battle-help>span:last-child{display:none}}@media(max-width:720px){.topbar{height:68px;padding:0 20px}.brand{font-size:15px}.header-right{font-size:0;gap:4px}.header-right .small-button{font-size:8px}.arena-stamp{display:none}.intro{margin:20px 0 28px}.section-label{align-items:flex-start;gap:10px;flex-direction:column}.roster{grid-template-columns:repeat(3,1fr);gap:9px}.sprite-stage{height:105px}.role{height:16px}.prepare-footer{gap:20px;flex-wrap:wrap}.team-slot{min-width:90px;font-size:9px;padding:0 5px}.team-slot canvas{width:30px;height:30px}.start-area{width:100%;align-items:stretch}.controls-strip{flex-wrap:wrap;gap:15px}.menu-note{line-height:1.8;font-size:7px}.menu-note span{display:none}footer span{display:none}.battle-bottom{flex-wrap:wrap}.squad{width:100%}#battle-team{display:inline-flex}.abilities{min-width:250px}.fighter-hud{width:155px;padding:6px}.hud-name{font-size:11px}.hud-name small{font-size:8px}.hud-detail{font-size:8px}.match-clock{padding:6px 10px}.match-clock>span{font-size:13px}.arena-hud{left:5px;right:5px;gap:5px;top:5px}.hud-detail .type{display:none}.battle-title .small-button{font-size:8px;padding:8px;margin-left:3px}.battle-title h2{font-size:18px}.overlay h2{font-size:26px}.overlay p{font-size:11px;margin:8px}.overlay .primary{padding:10px;font-size:10px}.overlay .result-icon{font-size:22px}.overlay .small-button{margin-top:8px}#battle-message{font-size:9px;top:75px}.battle-title{margin-bottom:12px}.field-label{font-size:6px;bottom:8px}.desktop{display:none}}
@media(min-width:721px){#battle{max-width:960px;margin-inline:auto}main:has(#battle:not([hidden])){padding-top:22px}#game-frame{width:min(100%,960px,calc((100dvh - 350px)*12/7));margin-inline:auto}.battle-help{font-size:9px}.fighter-hud{width:210px;padding:9px 11px}.arena-hud{left:15px;right:15px;top:12px}}
.visual-settings{display:flex;align-items:center;gap:12px;margin:-10px 0 24px;padding:12px 15px;background:#17242f;border:1px solid #2a3947}.visual-settings label{font:9px monospace;letter-spacing:1px;color:#a5b6ad}.visual-settings span{font-size:10px;color:#869ba7}select{background:#21323e;color:#d4e5cb;border:1px solid #42544d;font:10px monospace;padding:9px;max-width:100%}footer a{color:#a9c494;text-decoration:none}footer a:hover{text-decoration:underline}.sprite-stage canvas{width:128px!important;height:128px!important}@media(max-width:720px){.visual-settings{flex-wrap:wrap}.visual-settings span{width:100%}.battle-title select{font-size:8px;padding:6px}.battle-title .small-button{padding:6px;font-size:7px}}

.loadout-editor{margin-top:32px;padding:24px;border:1px solid #466354;border-radius:12px;background:#172d2b}.loadout-editor h3{margin:8px 0}.loadout-editor p{color:#adc2ae;font-size:12px}.loadout-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 24px}.loadout-tab{display:flex;align-items:center;gap:5px;background:#203c34;color:#dce8c7;border:1px solid #47614d;border-radius:7px;padding:4px 12px;cursor:pointer}.loadout-tab.active{background:#b7d88e;color:#203629}.loadout-layout{display:grid;grid-template-columns:270px 1fr;gap:24px}.equipped-slots{display:grid;gap:9px;margin:16px 0}.equip-slot{display:grid;grid-template-columns:30px 1fr;gap:6px;text-align:left;border:1px solid #4d6754;border-left:4px solid var(--accent);padding:12px;background:#213c35;color:#ecedc9;border-radius:5px;cursor:pointer;transition:transform .15s,background .15s}.equip-slot small{grid-column:2;font-size:10px;opacity:.7}.equip-slot.active{background:#446449;outline:2px solid #c4e298;transform:translateX(4px)}.move-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.move-option{display:block;text-align:left;background:#203a33;border:1px solid #3e5949;border-top:3px solid var(--accent);border-radius:7px;color:#e4e8c9;padding:13px;cursor:pointer;transition:transform .15s,border-color .15s}.move-option:hover{transform:translateY(-3px);border-color:#c4d590}.move-option>div{display:flex;gap:7px;align-items:center}.move-option strong{font-size:13px}.move-option div>span{margin-left:auto;font-size:8px;color:var(--accent)}.move-option small{font-size:9px;color:#a7bdab;display:block;margin-top:10px;line-height:1.7}.move-option p{font-size:11px;line-height:1.5;min-height:32px}.move-option em{font-size:9px;font-style:normal;color:#93ae99}.move-option.equipped{background:#29483a}.move-option.equipped em{color:#d2e49d}.move-icon{font-size:21px;color:var(--accent)}.just-equipped{animation:equip-pop .25s ease-out}@keyframes equip-pop{50%{transform:translateX(7px) scale(1.035);background:#77925a}}@media(max-width:800px){.loadout-layout{grid-template-columns:1fr}.equipped-slots{grid-template-columns:1fr 1fr}.loadout-editor{padding:14px}.loadout-tab{padding:4px 7px}.move-option{padding:10px}}@media(prefers-reduced-motion:reduce){.just-equipped{animation:none}.equip-slot,.move-option{transition:none}}

/* A wider view, retaining the approved 560 logical pixels of camera height.
   Width is measured in CSS pixels: sprites and movement keep their old scale. */
body.in-battle .topbar{height:64px;padding-inline:24px;gap:18px}
#battle-controls{display:flex;gap:10px;align-items:center;margin-left:auto}
#battle-controls .small-button{margin:0}
body.in-battle .edition{display:none}
body.in-battle main:has(#battle:not([hidden])){width:100%;max-width:none;padding:14px 22px 0}
body.in-battle #battle{max-width:none;margin:0}
body.in-battle .battle-title{margin-bottom:12px}
body.in-battle .battle-title>div{display:flex;gap:20px;align-items:center}
body.in-battle .battle-title h2{margin:0;font-size:20px}
body.in-battle #game-frame{width:100%;max-width:none;margin:0;border-width:4px}
body.in-battle #game{display:block;width:100%;height:560px;aspect-ratio:auto;image-rendering:pixelated}
body.in-battle .battle-bottom{padding:12px 0;margin:0}
body.in-battle .battle-help{padding-bottom:12px}
body.in-battle footer{display:none}
@media(max-width:1000px){body.in-battle .topbar{padding-inline:12px;gap:8px}body.in-battle .header-right{font-size:0}body.in-battle .brand{font-size:16px}body.in-battle main:has(#battle:not([hidden])){padding-inline:12px}}
@media(max-width:720px){body.in-battle .topbar{flex-wrap:wrap;height:auto;min-height:68px;padding-block:10px}#battle-controls{gap:6px}#battle-controls select{max-width:110px}#battle-controls .small-button{font-size:8px;padding:8px}body.in-battle #game{height:560px}}

/* Intro reserves the existing HUD space, preventing layout/canvas resize jumps. */
.battle-intro .arena-hud,.battle-intro .battle-bottom,.battle-intro #battle-message{visibility:hidden;pointer-events:none}

/* Expanded nine-species selection. */
.roster{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:480px){.roster{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* One integrated battle surface; canvas dimensions follow its actual viewport. */
body.in-battle{height:100dvh;overflow:hidden}
body.in-battle .topbar{height:44px;min-height:44px;padding:0 20px}
body.in-battle .brand{font-size:14px;gap:7px}
body.in-battle .pokeball{width:22px;height:22px;border-width:2px}
body.in-battle main:has(#battle:not([hidden])){height:calc(100dvh - 44px);padding:10px 16px 12px;max-width:none}
body.in-battle #battle{height:100%;width:100%;display:flex;flex-direction:column;position:relative;background:#14232e;border:1px solid #344a53;border-radius:9px;box-shadow:0 12px 40px #00000035;overflow:hidden;isolation:isolate}
body.in-battle .battle-title{flex:0 0 auto;min-height:52px;padding:10px 15px;margin:0;border-bottom:1px solid #2c424a;background:#13212ce8;gap:15px}
body.in-battle .battle-title>div:first-child{gap:14px;min-width:0}
body.in-battle .battle-title .eyebrow{font-size:8px;letter-spacing:1.3px;white-space:nowrap}
body.in-battle .battle-title h2{font-size:16px;white-space:nowrap}
body.in-battle .battle-title h2 span{font-size:8px;margin-left:12px;color:#91aaa9}
body.in-battle #battle-controls{gap:7px;margin-left:auto;flex-shrink:0}
body.in-battle #battle-controls .small-button,.battle-options summary{font:9px monospace;letter-spacing:.5px;padding:8px 10px;border:1px solid #36505c;border-radius:4px;background:#1a2c38;color:#c6d6da;white-space:nowrap;cursor:pointer}
.battle-options{position:relative}
.battle-options summary{list-style:none}
.battle-options summary::-webkit-details-marker{display:none}
.battle-options summary:after{content:'⌄';margin-left:8px;color:#94bba1}
.battle-options[open] summary{border-color:#8ab58b;background:#223c3d}
.battle-options-panel{position:absolute;top:calc(100% + 10px);right:0;width:290px;max-width:calc(100vw - 42px);padding:14px;border:1px solid #49606a;border-radius:7px;background:#132430;box-shadow:0 10px 30px #0006;z-index:8}
.battle-options-panel .mode-label{display:grid;gap:7px;font:9px monospace;color:#9db5b6;letter-spacing:1px;margin-bottom:12px}
.battle-options-panel select{width:100%;max-width:none;font-size:10px;padding:9px}
.battle-options-panel .header-right{display:grid;grid-template-columns:1fr 1fr;gap:8px;letter-spacing:0;font-size:0}
.battle-options-panel .header-right .online-dot{display:none}
.battle-options-panel .header-right>label{grid-column:1/-1;display:grid!important;gap:7px!important;font:10px monospace!important;color:#a9c0bb}
.battle-options-panel .header-right .small-button{margin:0;font-size:9px}
body.in-battle #game-frame{flex:1 1 auto;width:100%;min-height:260px;margin:0;border:0;border-radius:0;box-shadow:none;background:#13212a;overflow:hidden}
body.in-battle #game{height:100%;width:100%;aspect-ratio:auto;image-rendering:pixelated}
body.in-battle .arena-hud{top:12px;left:14px;right:14px;gap:12px;align-items:flex-start}
body.in-battle .fighter-hud{width:clamp(170px,19vw,230px);padding:9px 11px;background:#10232bea;border:1px solid #57716b80;box-shadow:0 3px 12px #0002;border-radius:5px}
body.in-battle .hud-name{font-size:13px;gap:10px;align-items:center}
body.in-battle .hud-name small{font-size:8px;white-space:nowrap}
body.in-battle .health-line{margin:7px 0 5px;font-size:8px}
body.in-battle .health-track{height:6px}
body.in-battle .hud-detail{font-size:8px}
body.in-battle .match-clock{height:auto;padding:7px 13px;min-width:78px;border-radius:5px;background:#11252be8}
body.in-battle .match-clock>span{font-size:19px;letter-spacing:1px}
body.in-battle .match-clock small{font-size:6px}
body.in-battle .field-label{left:14px;bottom:11px;font-size:7px;opacity:.55}
body.in-battle #battle-message{top:91px;font-size:10px;padding:7px 11px;border-radius:4px}
body.in-battle .battle-bottom{display:grid;grid-template-columns:170px minmax(0,1fr) 96px;gap:14px;flex:0 0 auto;padding:11px 14px;border-top:1px solid #35484b;background:#142530;align-items:center}
body.in-battle .squad{width:auto;min-width:0}
body.in-battle .squad .eyebrow{font-size:7px;letter-spacing:1px}
body.in-battle #battle-team{gap:5px;margin-top:6px}
body.in-battle .team-button{width:46px;height:43px;border-radius:4px}
body.in-battle .team-button canvas{width:36px;height:36px!important}
body.in-battle .mini-hp{left:5px;right:5px;bottom:3px;height:2px}
body.in-battle .abilities{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;min-width:0}
body.in-battle .ability{display:grid;grid-template-columns:24px minmax(0,1fr) 18px;grid-template-rows:auto auto;column-gap:8px;row-gap:4px;align-content:center;min-height:58px;height:58px;padding:8px 9px;border-color:#334c58;background:#192e3a;border-radius:5px}
body.in-battle .ability-top{display:contents}
body.in-battle .ability-top kbd{grid-column:1;grid-row:1/3;align-self:center;justify-self:start;padding:4px 6px;font-size:10px;z-index:1}
body.in-battle .ability-icon{grid-column:3;grid-row:1;font-size:16px;line-height:1;align-self:start;justify-self:end;z-index:1}
body.in-battle .ability strong{grid-column:2;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;margin:0;line-height:1.25}
body.in-battle .ability small{grid-column:2;grid-row:2;font-size:8px;white-space:nowrap;color:#94acb8}
body.in-battle .ability .cool-number{font-size:10px;right:7px;bottom:5px}
body.in-battle .dash-panel{width:auto;padding-left:12px;border-left:1px solid #344a53}
body.in-battle .dash-panel kbd{font-size:8px;padding:3px 6px}
body.in-battle .dash-panel strong{font-size:8px;margin:5px 0 6px}
body.in-battle .dash-panel small{font-size:7px;display:block;margin-top:4px}
body.in-battle .battle-help{flex:0 0 auto;gap:10px;min-height:29px;padding:6px 14px;border-top:1px solid #2c414a;background:#11202b;color:#849eab;font-size:9px}
body.in-battle .battle-help kbd{font-size:8px;padding:2px 4px;border-width:1px}
body.in-battle .battle-help b{margin:0 4px}
body.in-battle .overlay{inset:0;z-index:10;border-radius:8px;background:#0c1c29d6;backdrop-filter:blur(4px)}
body.in-battle #overlay-content{max-width:min(90%,600px);padding:22px}
body.in-battle .overlay h2{font-size:clamp(25px,3vw,42px)}
@media(max-width:1050px){body.in-battle .battle-title h2 span{display:none}body.in-battle .battle-bottom{grid-template-columns:145px minmax(0,1fr) 76px;gap:10px;padding:10px}body.in-battle .ability{column-gap:5px;padding:7px}body.in-battle .ability strong{font-size:10px}body.in-battle .battle-help>span:last-child{display:none}}
@media(max-width:720px){body.in-battle .topbar{height:40px;min-height:40px;padding:0 12px;flex-wrap:nowrap}body.in-battle main:has(#battle:not([hidden])){height:calc(100dvh - 40px);padding:7px}body.in-battle .battle-title{padding:9px 10px;min-height:49px;gap:8px}body.in-battle .battle-title>div:first-child{display:block}body.in-battle .battle-title h2{font-size:14px;margin-top:3px}body.in-battle .battle-title .eyebrow{font-size:7px}body.in-battle #battle-controls{gap:5px}body.in-battle #battle-controls .small-button,.battle-options summary{padding:7px;font-size:8px}body.in-battle .arena-hud{left:8px;right:8px;top:8px;gap:6px}body.in-battle .fighter-hud{width:clamp(120px,30vw,170px);padding:7px}body.in-battle .hud-name{font-size:11px;gap:5px}body.in-battle .hud-name small{font-size:7px}body.in-battle .match-clock{padding:6px 8px;min-width:58px}body.in-battle .match-clock>span{font-size:16px}body.in-battle .battle-bottom{grid-template-columns:1fr 85px;gap:10px;padding:9px 10px}body.in-battle .abilities{grid-column:1/-1;grid-row:1;grid-template-columns:repeat(4,minmax(0,1fr))}body.in-battle .squad{grid-column:1;grid-row:2;display:flex;align-items:center;gap:12px}body.in-battle .squad .eyebrow{display:block;line-height:1.8}body.in-battle #battle-team{margin:0}body.in-battle .team-button{width:40px;height:37px}body.in-battle .team-button canvas{width:31px;height:31px!important}body.in-battle .dash-panel{grid-row:2;grid-column:2}body.in-battle .battle-help{font-size:8px;padding:6px 10px}body.in-battle .ability{grid-template-columns:20px minmax(0,1fr);column-gap:4px;padding:6px;height:54px;min-height:54px}body.in-battle .ability-icon{display:none}body.in-battle .ability strong{font-size:9px}body.in-battle .ability small{font-size:7px}body.in-battle .ability-top kbd{padding:3px 4px;font-size:9px}}
@media(max-width:460px){body.in-battle .abilities{grid-template-columns:repeat(2,minmax(0,1fr))}body.in-battle .ability{height:48px;min-height:48px}body.in-battle .hud-name small{display:none}body.in-battle .fighter-hud{width:118px}body.in-battle .battle-help{line-height:1.6}body.in-battle .battle-help kbd{font-size:7px}body.in-battle #game-frame{min-height:240px}}
@media(max-height:650px) and (min-width:721px){body.in-battle .topbar{height:36px;min-height:36px}body.in-battle main:has(#battle:not([hidden])){height:calc(100dvh - 36px);padding:6px 10px}body.in-battle .battle-title{min-height:43px;padding-block:7px}body.in-battle .battle-bottom{padding-block:7px}body.in-battle .battle-help{min-height:25px;padding-block:4px}}
.battle-options-panel .network-label{display:none}
.battle-options-panel .header-right>label{grid-row:1}
.battle-options-panel #sound{grid-column:1;grid-row:2}
.battle-options-panel .header-right>.small-button:not(#sound){grid-column:2;grid-row:2}
@media(max-height:560px),(max-width:460px) and (max-height:720px){body.in-battle{height:auto;min-height:100dvh;overflow:auto}body.in-battle main:has(#battle:not([hidden])){height:auto;min-height:calc(100dvh - 44px)}body.in-battle #battle{height:auto;min-height:calc(100dvh - 64px)}body.in-battle #game-frame{flex:none;height:max(240px,55dvh)}}

/* Twelve cards, same approved card design. */
@media(min-width:1200px){.roster{grid-template-columns:repeat(4,minmax(0,1fr))}}

.map-picker{display:flex;gap:20px;align-items:center;padding:15px 20px;margin:0 0 30px;background:#172630;border:1px solid #40554d;border-radius:5px;position:relative}.map-picker>img{width:180px;height:104px;object-fit:cover;image-rendering:pixelated;border:1px solid #758575;border-radius:3px}.map-picker-copy{flex:1;min-width:0}.map-picker-copy label{display:block;font:10px monospace;letter-spacing:1.5px;color:#b4ef84;margin-bottom:8px}.map-picker-copy select{min-width:230px;max-width:100%;padding:9px 12px;background:#10202b;border:1px solid #64796c;border-radius:3px;color:#f0f1df;font:700 14px 'Segoe UI',sans-serif;cursor:pointer}.map-picker-copy p{color:#a9babb;font-size:12px;margin:8px 0}.map-picker-copy small{font:9px monospace;color:#8da197}.map-picker-mark{font-size:38px;color:#b4ef8470;margin:0 14px}.arena-stamp b{font:inherit}.battle-title h2>b,.field-label>b{font:inherit}@media(max-width:600px){.map-picker{padding:12px;gap:12px}.map-picker>img{width:95px;height:90px}.map-picker-copy select{min-width:0;width:100%}.map-picker-copy p{font-size:11px}.map-picker-mark{display:none}}
.battle-configuration{display:flex;gap:20px;flex-wrap:wrap;padding:18px;margin:0 0 18px;border:1px solid #3b5158;background:#182a30;border-radius:6px}.battle-configuration label{display:grid;gap:8px;min-width:180px;font:11px monospace;color:#b4ef84}.battle-configuration select{background:#101e29;color:#e7edeb;border:1px solid #647e77;padding:9px;font:13px Segoe UI,sans-serif}.battle-configuration p{width:100%;margin:0;font-size:12px;color:#a9bec2}.team-selector{margin:14px 0}.team-selector button[aria-pressed=true]{border-color:#b4ef84;color:#b4ef84}.team-selector p{font:12px monospace;color:#a9bec2;line-height:1.7}#battle-format{display:block;font:8px monospace;color:#c5d9b7;margin-top:4px;white-space:nowrap}
