/* Approved prototype art, composed inside the complete game's existing shell. */
body[data-screen=battle] .battle-scene{display:grid;grid-template-columns:minmax(0,1fr) clamp(136px,17vw,216px);gap:12px;padding:10px;height:100%;box-sizing:border-box}
.battle-arena{position:relative;min-width:0;min-height:0;height:100%}
body[data-screen=battle] .battle-top{inset:4px 7px auto;gap:12px}
body[data-screen=battle] .combat-card{width:44%;padding:8px 11px;border-radius:12px}
body[data-screen=battle] .combat-card h2{font-size:clamp(17px,2vw,26px)}
body[data-screen=battle] .hp-readout strong{font-size:clamp(15px,1.7vw,23px)}
body[data-screen=battle] .battle-art{inset:88px 0 0}
body[data-screen=battle] .battle-art .ally-sprite,body[data-screen=battle] .battle-art .enemy-sprite{width:44%;height:100%;object-fit:contain;max-height:100%}
body[data-screen=battle] .move-caption{top:0;max-width:50%;font-size:10px}
.active-pawn-card{position:relative;z-index:9;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:6px;align-items:center;min-width:0;min-height:0;padding:8px;background:rgb(var(--theme-paper-rgb) / 0.9373);border:1px solid var(--theme-accent);border-radius:10px;box-shadow:0 6px 18px rgb(var(--theme-shadow-rgb) / 0.2510);color:var(--theme-ink);text-align:center}
.active-pawn-card>span{font:700 10px/1.3 system-ui;letter-spacing:1px;overflow-wrap:anywhere}
.active-pawn-card small{font:10px/1.3 system-ui}
.active-card-art{display:block;width:100%;height:100%;min-height:0;padding:0;border:0;background:transparent;cursor:zoom-in}
.active-card-art img{display:block;width:100%;height:100%;object-fit:contain}
.active-pawn-card>canvas{width:100%;max-height:100%;object-fit:contain}
.owned-card>button.owned-card-art{display:block;width:100%;min-height:0;padding:6px;border:0;background:var(--theme-paper);cursor:zoom-in}
.owned-card-art .original-pawn-card{width:100%;height:clamp(180px,calc(100dvh - 370px),390px);object-fit:contain;margin:0}
.owned-card .card-run-details{padding:6px 10px}
.card-rules{font:11px/1.4 system-ui;margin-top:5px}
.card-rules>summary{cursor:pointer;color:var(--theme-ink)}
.card-inspection{max-width:95vw;max-height:94dvh;padding:12px;border:1px solid var(--theme-line);border-radius:12px;background:var(--theme-paper);box-shadow:0 20px 70px rgb(var(--theme-shadow-rgb) / 0.5020);overflow:auto}
.card-inspection::backdrop{background:rgb(var(--theme-accent-rgb) / 0.8000)}
.card-inspection form{display:flex;justify-content:flex-end;margin:0 0 6px}
.card-close{padding:6px 14px;border:1px solid var(--theme-line);border-radius:6px;background:var(--theme-paper);color:var(--theme-ink);cursor:pointer}
.card-inspection>img{display:block;max-width:calc(95vw - 30px);width:auto;height:calc(94dvh - 78px);object-fit:contain;margin:auto}
button:focus-visible,summary:focus-visible{outline:3px solid var(--theme-accent);outline-offset:3px}
@media(max-height:700px) and (min-width:801px){body[data-screen=battle] .battle-scene{gap:8px;padding:7px}body[data-screen=battle] .battle-art{inset:75px 0 0}body[data-screen=battle] .combat-card h2{font-size:19px}body[data-screen=battle] .combat-card p{font-size:9px}body[data-screen=battle] .combat-card .bar{height:8px;margin-top:6px}body[data-screen=battle] .attack-result{top:25px;min-width:76px;padding:6px 12px}body[data-screen=battle] .attack-result strong{font-size:25px}.active-pawn-card{padding:5px;gap:4px}.active-pawn-card small{font-size:9px}}
@media(max-width:800px){body[data-screen=battle] .battle-scene{grid-template-columns:minmax(0,1fr) 128px;gap:7px;padding:7px}body[data-screen=battle] .battle-art{inset:82px 0 0}body[data-screen=battle] .combat-card{padding:7px;width:45%}body[data-screen=battle] .combat-card h2{font-size:17px}body[data-screen=battle] .hp-readout strong{font-size:15px}}

/* Review candidate: the approved prototype's wide, quiet action stage. */
body[data-screen=battle]{overflow-y:auto;overflow-x:hidden;background:var(--theme-bg)}
body[data-screen=battle] .shell{height:auto;min-height:100dvh;overflow:visible;padding:10px 18px;gap:7px}
body[data-screen=battle] .masthead{min-height:32px}
body[data-screen=battle] .brand-logo{width:160px;height:auto}
body[data-screen=battle] .masthead h1{font-size:19px}
body[data-screen=battle] .edition{font-size:8px}
body[data-screen=battle] .run-hud{padding:5px 13px;background:var(--theme-surface);border-color:var(--theme-line);box-shadow:none}
body[data-screen=battle] #run-time{font-size:21px}
body[data-screen=battle] .run-objective small{display:none}
body[data-screen=battle] .console{flex:none;display:block;overflow:visible;border-radius:16px;background:var(--theme-paper)}
body[data-screen=battle] .play-column{display:block;overflow:visible}
body[data-screen=battle] .screen-top{height:24px;padding:6px 16px;background:var(--theme-paper);color:var(--theme-ink);font-size:9px}
body[data-screen=battle] .viewport{height:clamp(400px,calc(100dvh - 340px),570px)!important;min-height:400px;overflow:hidden;background:var(--theme-surface)}
body[data-screen=battle] .battle-scene{display:block;grid-template:none;padding:0;background-image:none;background:linear-gradient(#d9e8d9,#f1efd4 85%,#d5d8c3 85%);color:#294f42}
body[data-screen=battle] .battle-scene[data-region=Beach]{background:linear-gradient(#dceceb,#f3e4bd 85%,#d6c59e 85%)}
body[data-screen=battle] .battle-scene[data-region=IceCAPS]{background:linear-gradient(#e5eff0,#f1f6ef 85%,#d0dee0 85%)}
body[data-screen=battle] .battle-scene:after{display:none}
body[data-screen=battle] .battle-arena{container-type:size;position:relative;width:100%;height:100%}
/* Uniform stage scale: 1200 x 480, source cells 576 x 512 at 0.75,
   feet at y=420 and centers x=278 / 938, exactly as the battle prototype. */
body[data-screen=battle] .battle-art{position:absolute;inset:auto;left:50%;bottom:0;transform:translateX(-50%);width:min(100cqw,calc(100cqh * 2.5));height:auto;aspect-ratio:2.5;max-height:100%;overflow:visible}
body[data-screen=battle] .battle-art .ally-sprite,body[data-screen=battle] .battle-art .enemy-sprite{position:absolute;width:36%;height:auto;aspect-ratio:1;max-height:none;bottom:7.5%;object-fit:fill;filter:none}
body[data-screen=battle] .battle-art .ally-sprite{left:5.1666667%;right:auto}
body[data-screen=battle] .battle-art .enemy-sprite{left:auto;right:3.8333333%}
body[data-screen=battle] .battle-art:before,body[data-screen=battle] .battle-art:after{content:'';display:block;position:absolute;bottom:11.3%;width:21.3%;height:5.8%;border:0;border-radius:50%;background:#283f3420;box-shadow:none;z-index:0}
body[data-screen=battle] .battle-art:before{left:12.5%}
body[data-screen=battle] .battle-art:after{right:13.5%;width:16.7%}
body[data-screen=battle] .combat-effects{z-index:4}
body[data-screen=battle] .battle-top{inset:18px 28px auto;gap:28px;z-index:6}
body[data-screen=battle] .combat-card{width:30%;max-width:300px;min-height:0;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
body[data-screen=battle] .combat-card.enemy{text-align:right}
body[data-screen=battle] .combat-card .pawn-heading{gap:12px;align-items:center}
body[data-screen=battle] .combat-card h2{font:700 24px/1.1 Georgia,serif;color:var(--theme-ink);margin:0 0 4px}
body[data-screen=battle] .combat-card p{font:10px/1.2 system-ui;color:var(--theme-muted)}
body[data-screen=battle] .hp-readout strong{font:700 15px/1.2 system-ui;color:var(--theme-ink)}
body[data-screen=battle] .hp-readout span{font-size:8px;color:var(--theme-muted)}
body[data-screen=battle] .combat-card .bar{height:7px;margin:10px 0 0;border:0;background:#7e927328;border-radius:8px}
body[data-screen=battle] .combat-card .bar>span{background:#457d67}
body[data-screen=battle] .combat-card.enemy .bar>span{background:#a57855}
body[data-screen=battle] .move-caption{top:auto;bottom:2%;border:0;background:transparent;color:var(--theme-ink);max-width:70%;font:600 12px/1.3 system-ui;padding:0;letter-spacing:0}
/* Keep the multiplier above the action and the can's flight lane. */
body[data-screen=battle] .attack-result{top:8px;min-width:74px;padding:5px 13px;border:1px solid var(--theme-line);border-radius:10px;background:rgb(var(--theme-paper-rgb) / 0.9294);box-shadow:0 3px 12px rgb(var(--theme-shadow-rgb) / 0.0627);color:var(--theme-ink)}
body[data-screen=battle] .attack-result strong{font:800 26px/1 Georgia,serif}
body[data-screen=battle] .attack-result span{font-size:9px}
#active-card-holder{display:none}
body[data-screen=battle] .dialog{display:grid;grid-template-columns:minmax(0,1fr) 122px;gap:14px;padding:12px 18px;background:var(--theme-paper);border-top:1px solid var(--theme-line);border-radius:0 0 16px 16px;color:var(--theme-ink);align-items:stretch}
body[data-screen=battle] #active-card-holder{display:block;min-width:0;grid-column:2;grid-row:1}
body[data-screen=battle] #dialog-content{grid-column:1;grid-row:1;min-width:0}
body[data-screen=battle] .active-pawn-card{height:100%;padding:5px;border:1px solid var(--theme-accent);border-radius:10px;background:var(--theme-paper);box-shadow:none;gap:4px}
body[data-screen=battle] .active-card-art{height:140px}
body[data-screen=battle] .active-pawn-card>canvas{display:block;width:100%;height:140px;object-fit:contain}
body[data-screen=battle] .active-pawn-card>span{font-size:9px;letter-spacing:.4px}
body[data-screen=battle] .active-pawn-card small{font-size:8px}
body[data-screen=battle] .battle-dock{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(240px,1fr);grid-template-rows:auto;gap:8px 18px;align-items:start}
body[data-screen=battle] .typing-bubble{grid-column:1;grid-row:1;border:0;border-radius:0;padding:0;background:transparent;box-shadow:none}
body[data-screen=battle] .bubble-heading{margin:0 0 3px}
body[data-screen=battle] .bubble-heading h2{font-size:9px;letter-spacing:1px;margin:0;color:var(--theme-muted)}
body[data-screen=battle] .send-button{padding:4px 10px;border-radius:7px;background:var(--theme-accent);border-color:var(--theme-line);font-size:11px}
body[data-screen=battle] .attack-context{display:none}
body[data-screen=battle] .typing-prompt{font:18px/1.4 Georgia,serif;max-height:52px;min-height:25px;padding:0;margin:2px 0 6px;background:transparent;border:0;color:var(--theme-ink)}
body[data-screen=battle] .typing-prompt.story{font:15px/1.45 system-ui;max-height:88px}
body[data-screen=battle] .input-display{height:32px;padding:6px 10px;font:13px/1.3 system-ui;border:1px solid var(--theme-line);border-radius:8px;background:var(--theme-paper);color:var(--theme-ink)}
body[data-screen=battle] .notice{font:9px/1.3 system-ui;margin:4px 0 0;min-height:12px;color:var(--theme-muted)}
body[data-screen=battle] .opponent-moves{grid-column:2;grid-row:1;display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:0;padding:0;min-width:0}
body[data-screen=battle] .opponent-moves>h2{flex-basis:100%;font-size:9px;letter-spacing:0;margin:0;color:var(--theme-muted)}
body[data-screen=battle] .opponent-move{margin:0;display:flex;gap:5px;font-size:10px;border:0;padding:0}
body[data-screen=battle] .opponent-move strong{font-size:10px}
body[data-screen=battle] .opponent-move span{font-size:9px}
body[data-screen=battle] .battle-actions{flex-basis:100%;display:flex;gap:5px;margin:4px 0 0;flex-wrap:wrap}
body[data-screen=battle] .battle-actions button{font-size:10px;padding:4px 7px;border:1px solid var(--theme-line);background:var(--theme-paper);border-radius:6px;color:var(--theme-ink)}
body[data-screen=battle] #capture-status{flex-basis:100%;margin:0}
body[data-screen=battle] .footer{min-height:12px}
@media(max-width:1000px){body[data-screen=battle] .shell{padding:8px}body[data-screen=battle] .battle-top{inset:16px 20px auto}body[data-screen=battle] .combat-card{width:34%}body[data-screen=battle] .combat-card h2{font-size:21px}body[data-screen=battle] .hp-readout strong{font-size:13px}}
@media(max-height:750px){body[data-screen=battle] .viewport{height:400px!important}body[data-screen=battle] .shell{overflow:visible}body[data-screen=battle] .dialog{padding:9px 16px}}

.compact-move-picker{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 8px}.compact-move-picker button{padding:6px 10px;font:14px system-ui;border:1px solid var(--theme-line);border-radius:6px;background:var(--theme-paper);color:var(--theme-ink)}.compact-move-picker [aria-pressed=true]{outline:2px solid var(--theme-accent)}

/* Two full cards frame one continuous battle console. */
body[data-screen=battle] .dialog{display:grid;grid-template-columns:minmax(120px,170px) minmax(0,1fr) minmax(120px,170px);gap:24px;align-items:start;padding:20px 24px;background:var(--theme-paper)}
body[data-screen=battle] #active-card-holder{display:contents}
body[data-screen=battle] #dialog-content{grid-column:2;grid-row:1;align-self:center}
body[data-screen=battle] .dialog>.dialog-label{display:none}
body[data-screen=battle] .active-pawn-card,body[data-screen=battle] .opponent-pawn-card{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;height:auto;min-width:0;padding:0;border:0;background:transparent;box-shadow:none;text-align:center;color:var(--theme-ink)}
body[data-screen=battle] .active-pawn-card{grid-column:1;grid-row:1}
body[data-screen=battle] .opponent-pawn-card{grid-column:3;grid-row:1}
body[data-screen=battle] .active-pawn-card>span,body[data-screen=battle] .opponent-pawn-card>span{font:700 13px/1.3 system-ui;letter-spacing:.4px;overflow-wrap:anywhere}
body[data-screen=battle] .active-pawn-card small,body[data-screen=battle] .opponent-pawn-card small{font:12px/1.4 system-ui;color:var(--theme-muted)}
body[data-screen=battle] .active-card-art{width:100%;height:auto;aspect-ratio:2/3;display:block;padding:0;background:transparent;border:0;cursor:zoom-in}
body[data-screen=battle] .active-card-art img{display:block;width:100%;height:100%;object-fit:contain;border-radius:9px}
body[data-screen=battle] .active-pawn-card>canvas,body[data-screen=battle] .opponent-pawn-card>canvas{width:100%;height:auto;aspect-ratio:2/3;object-fit:contain}
body[data-screen=battle] .battle-dock{display:block}
body[data-screen=battle] .typing-bubble{display:block;min-width:0}
body[data-screen=battle] .bubble-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
body[data-screen=battle] .bubble-heading h2{font:700 14px/1.3 system-ui;letter-spacing:.3px;text-transform:none}
body[data-screen=battle] .send-button{min-height:40px;padding:8px 16px;font:600 15px/1.3 system-ui}
body[data-screen=battle] .typing-prompt{font:20px/1.5 Georgia,serif;max-height:120px;min-height:30px;margin:0 0 12px;padding:0;overflow:auto}
body[data-screen=battle] .typing-prompt.story{font:16px/1.5 system-ui;max-height:160px}
body[data-screen=battle] .input-display{width:100%;height:44px;font:16px/1.4 system-ui;padding:10px 12px;box-sizing:border-box}
body[data-screen=battle] .notice{font:13px/1.5 system-ui;margin:10px 0 0;color:var(--theme-ink);overflow-wrap:anywhere}
body[data-screen=battle] .battle-controls{margin-top:14px;padding-top:12px;border-top:1px solid var(--theme-line)}
body[data-screen=battle] .battle-actions{margin:0;gap:8px;display:flex;flex-wrap:wrap}
body[data-screen=battle] .battle-actions button{font:14px/1.3 system-ui;min-height:40px;padding:8px 12px}
body[data-screen=battle] #capture-status{font:12px/1.45 system-ui;margin-top:8px}
body[data-screen=battle] .capture-progress,body[data-screen=battle] .capture-full-story{font:14px/1.45 system-ui;margin-bottom:8px}
@media(max-width:760px){
 body[data-screen=battle] .dialog{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:16px}
 body[data-screen=battle] .active-pawn-card{grid-column:1;grid-row:1}
 body[data-screen=battle] .opponent-pawn-card{grid-column:2;grid-row:1}
 body[data-screen=battle] #dialog-content{grid-column:1 / -1;grid-row:2}
 body[data-screen=battle] .active-card-art{max-width:145px;margin:auto}
 body[data-screen=battle] .active-pawn-card>canvas,body[data-screen=battle] .opponent-pawn-card>canvas{max-width:145px;margin:auto}
 body[data-screen=battle] .typing-prompt{font-size:18px;max-height:135px}
 body[data-screen=battle] .viewport{height:300px!important;min-height:300px}
 body[data-screen=battle] .battle-top{inset:12px 14px auto}
 body[data-screen=battle] .combat-card{width:42%}
 body[data-screen=battle] .combat-card h2{font-size:18px}
 body[data-screen=battle] .attack-result{top:58px}
}
/* Verified desktop QA: clear submit contrast, no leftover speech tail. */
body[data-screen=battle] .bubble-heading .send-button{color:var(--theme-paper)}
body[data-screen=battle] .typing-bubble::before{display:none}
/* Calm City streets: backdrop only; silhouettes and the throw lane stay clear. */
body[data-screen=battle] .battle-scene[data-region=City]{
 background-color:#ece9d9;
 background-image:linear-gradient(to bottom,rgba(247,248,236,.88) 0%,rgba(247,248,236,.58) 22%,rgba(247,248,236,.22) 48%,rgba(247,248,236,.12) 100%),url('assets/battle-city-quiet-v1.webp')!important;
 background-size:cover;
 background-position:center bottom;
 background-repeat:no-repeat;
}

/* Non-atlas pawns share the approved feet line and stay beneath the HP band. */
body[data-screen=battle] .battle-art .ally-sprite[data-stage-fit=bounded],body[data-screen=battle] .battle-art .enemy-sprite[data-stage-fit=bounded]{width:23%;bottom:12.5%}
body[data-screen=battle] .battle-art .ally-sprite[data-stage-fit=bounded]{left:11.6666667%;right:auto}
body[data-screen=battle] .battle-art .enemy-sprite[data-stage-fit=bounded]{left:auto;right:10.3333333%}
.battle-team-order{padding-left:0;list-style:none;display:grid;gap:8px}.battle-team-order li{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px;background:var(--theme-paper);border-radius:8px}.battle-team-order strong{flex:1;min-width:150px}.team-status{font-weight:800;color:var(--theme-ink)}.team-swap{padding:12px;border:2px solid var(--theme-line);border-radius:10px}.team-swap button{margin:5px}
body[data-screen=battle] .battle-art .ally-sprite[data-stage-fit=gaffwidget],body[data-screen=battle] .battle-art .enemy-sprite[data-stage-fit=gaffwidget]{width:30%;bottom:10%;height:auto;aspect-ratio:1;filter:drop-shadow(0 8px 7px #24483c35)}body[data-screen=battle] .battle-art .ally-sprite[data-stage-fit=gaffwidget]{left:8.16%;right:auto}body[data-screen=battle] .battle-art .enemy-sprite[data-stage-fit=gaffwidget]{right:6.83%;left:auto}.combat-card[data-pawn=gaffwidget] h2{font-size:clamp(20px,3vw,38px)!important;letter-spacing:.03em;text-transform:uppercase}.combat-card[data-pawn=gaffwidget] .pawn-heading p{display:inline-block;border-radius:20px;background:var(--theme-surface);color:var(--theme-ink);padding:5px 10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
body[data-screen=battle] .combat-card[data-pawn=gaffwidget] .pawn-heading{display:block}body[data-screen=battle] .combat-card[data-pawn=gaffwidget] .hp-readout{margin-top:4px;display:flex;justify-content:inherit;gap:8px;align-items:center}body[data-screen=battle] .combat-card.enemy[data-pawn=gaffwidget] .hp-readout{justify-content:flex-end}body[data-screen=battle] .combat-card[data-pawn=gaffwidget] h2{font-size:clamp(18px,2.6vw,32px)!important;overflow-wrap:normal}

/* Original transparent poses share one portrait geometry at both sides. */
body[data-screen=battle] .battle-art .ally-sprite[data-stage-fit=transparent],body[data-screen=battle] .battle-art .enemy-sprite[data-stage-fit=transparent]{width:30%;height:auto;aspect-ratio:1;bottom:10%;filter:drop-shadow(0 5px 4px #24483c30)}
body[data-screen=battle] .battle-art .ally-sprite[data-stage-fit=transparent]{left:8.1666667%;right:auto}
body[data-screen=battle] .battle-art .enemy-sprite[data-stage-fit=transparent]{right:6.8333333%;left:auto}

/* Approved October 15 v2 regional battle backdrops. Original bytes reused.
   Match the existing City veil and crop treatment; keep all stage geometry. */
body[data-screen=battle] .battle-scene[data-region=Beach]{
 background-image:linear-gradient(to bottom,rgba(247,248,236,.88) 0%,rgba(247,248,236,.58) 22%,rgba(247,248,236,.22) 48%,rgba(247,248,236,.12) 100%),url('assets/QWERTY-QUEST-Beach-Battle-Backdrop-v2.webp')!important;
 background-size:cover;
 background-position:center bottom;
 background-repeat:no-repeat;
}
body[data-screen=battle] .battle-scene[data-region=Jungle]{
 background-image:linear-gradient(to bottom,rgba(247,248,236,.88) 0%,rgba(247,248,236,.58) 22%,rgba(247,248,236,.22) 48%,rgba(247,248,236,.12) 100%),url('assets/QWERTY-QUEST-Forest-Jungle-Battle-Backdrop-v2.webp')!important;
 background-size:cover;
 background-position:center bottom;
 background-repeat:no-repeat;
}
body[data-screen=battle] .battle-scene[data-region=IceCAPS]{
 background-image:linear-gradient(to bottom,rgba(247,248,236,.88) 0%,rgba(247,248,236,.58) 22%,rgba(247,248,236,.22) 48%,rgba(247,248,236,.12) 100%),url('assets/QWERTY-QUEST-Mountains-Battle-Backdrop-v2.webp')!important;
 background-size:cover;
 background-position:center bottom;
 background-repeat:no-repeat;
}
/* Region/rarity metadata remains readable over the newly illustrated scenes. */
body[data-screen=battle] .battle-scene:is([data-region=Beach],[data-region=Jungle],[data-region=IceCAPS]) .combat-card p{color:var(--theme-ink)}
