/* High-level commands share the arena with clear tactical detail and feedback. */
/* Recovery is a scarce choice. Keep its exact debit beside the action. */
body.game-mode .recovery-bag .capture-card{height:auto;min-height:44px;align-items:flex-start;gap:0;padding:10px;white-space:normal}
body.game-mode .recovery-bag .capture-card>span{min-width:0;display:block}
body.game-mode .recovery-bag .capture-card strong{font:700 16px/1.3 var(--body);color:#173643;overflow-wrap:anywhere}
body.game-mode .recovery-bag .capture-card small{display:block;font:500 14px/1.4 var(--body);color:#284a55;white-space:normal;margin-top:4px;overflow-wrap:anywhere}
body.game-mode .recovery-bag .capture-card:disabled{opacity:1;background:#e3e8e2;border-color:#839892}
body.game-mode .recovery-bag .bag-hint{display:block;font:500 14px/1.4 var(--body);color:#284a55;margin:0;min-width:0}
body.game-mode .recovery-bag .bag-hint strong,body.game-mode .recovery-bag .bag-hint span{display:block;margin-bottom:6px}
body.game-mode .recovery-bag .controls-heading{flex:none;position:sticky;top:-9px;z-index:2;background:#fff9e9}
@media(max-width:700px){
 body.game-mode .recovery-bag .capture-options{grid-template-columns:1fr}
 body.game-mode .recovery-bag .bag-hint{padding-bottom:4px}
}
@media(min-width:701px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles]:has(.recovery-bag){--game-dock-height:160px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .action-area.recovery-bag{height:160px;min-height:0;max-height:160px;overflow-y:auto;gap:8px;padding:9px}
 body.game-mode .recovery-bag .capture-options{flex:none;align-items:start}
}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-commands{
 display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:12px;padding:14px;
}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading{display:flex;align-items:baseline;gap:10px;color:#173643}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading strong{font:700 18px/1.2 var(--body)}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading>span{font:500 14px/1.3 var(--body)}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:9px;min-height:0}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command{display:flex;align-items:center;gap:14px;min-height:44px;min-width:0;padding:10px 15px;background:#edf2e9;border:1px solid #839f99;border-radius:7px;box-shadow:0 2px 0 #b4c1b4;color:#193d48;text-align:left}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command:not(:disabled):hover{background:#e2efe5;border-color:#356f6c}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command--fight{background:#ffce78;border-color:#a67b3e;box-shadow:0 2px 0 #b18a4f}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command .icon{width:25px;height:25px;flex:none}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command>span{min-width:0}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command strong{display:block;font:700 22px/1.2 var(--body)}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command small{display:block;font:500 13px/1.35 var(--body);margin-top:3px;color:#35555b}
body.game-mode[data-screen=battle][data-battle-format=singles] .command-area.battle-fight{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:44px minmax(0,1fr);gap:8px;padding:10px 12px;overflow:auto}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .controls-heading{position:static;height:44px;min-height:44px;margin:0;padding:0;border:0;align-items:center;gap:9px;background:transparent}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .controls-heading strong{font:700 16px/1.25 var(--body);color:#173643}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .controls-heading>div>span{font:500 12px/1.3 var(--body);color:#35565b;margin-top:2px}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .controls-heading .text-button{min-height:44px;min-width:56px;font:700 13px/1.2 var(--body);color:#244e56;background:#e7eee6;border:1px solid #96aba3;border-radius:5px;padding:7px}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-grid{min-height:0;gap:8px;grid-row:auto;grid-column:auto;grid-template-rows:repeat(2,minmax(0,1fr))}
/* The cost is always visible above. The damage caveat stays available to each
   move's aria-describedby; its tooltip also contains accuracy and effects. */
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .forecast-note{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-commands{gap:9px;padding:10px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading{gap:7px;flex-wrap:wrap}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading strong{font-size:17px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading>span{font-size:12px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-grid{gap:8px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command{padding:8px;gap:8px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command .icon{width:21px;height:21px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command strong{font-size:19px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command small{font-size:12px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .command-area.battle-fight{padding:8px;gap:6px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-button{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;align-content:center;gap:3px;padding:5px;min-height:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-info{display:contents}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-info strong{grid-column:1/-1;grid-row:1;font-size:14px;line-height:1.15;white-space:normal}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-info>small{grid-column:1/-1;grid-row:2;display:flex;justify-content:space-between;gap:3px;margin:0;line-height:1.15}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-info>small>span{font-size:11px;line-height:1.15}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-info>small>b{font-size:12px;line-height:1.15}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-hint{grid-column:1;grid-row:3;line-height:1.15;margin:0;min-width:0;font-size:12px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-pp{grid-column:2;grid-row:3;display:flex;align-items:baseline;justify-content:flex-end;gap:1px;font-size:12px;line-height:1.15;align-self:end}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-pp small{font-size:10px;line-height:1.15;margin:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-uses{display:none}
}
/* Commands share their lower footprint with the lasting exchange: 188 + 85
   equals the existing 218 + 55. Move detail keeps its original dock dimensions. */
@media(max-width:700px) and (min-height:501px) and (max-height:700px){
 body.game-mode[data-screen=battle][data-battle-format=singles]:has(.battle-commands){--game-dock-height:188px;--compact-message-height:85px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command small{white-space:nowrap}
}
@media(max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-commands{gap:7px;padding:9px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading strong{font-size:16px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-heading>span{font-size:12px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command-grid{gap:6px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command{padding:5px 10px;gap:9px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command strong{font-size:18px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command small{font-size:11px;margin-top:1px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-command .icon{width:20px;height:20px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .command-area.battle-fight{left:var(--game-gutter);right:var(--game-gutter);width:auto;grid-template-rows:44px minmax(0,1fr);padding:8px;gap:5px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell:has(.battle-fight) .battle-message{visibility:hidden}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-button{padding:6px;min-height:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .controls-heading strong{font-size:14px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .controls-heading>div{display:flex;align-items:center;gap:14px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .controls-heading>div>span{font-size:12px;margin:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-info strong{font-size:14px}
}

/* Ownership and lasting exchange feedback complement the four command choices. */
body.game-mode[data-battle-format=singles] .plate-types{align-items:center;flex-wrap:wrap}
body.game-mode[data-battle-format=singles] .plate-owner{display:inline-block;flex:none;font:750 12px/1.1 var(--body);letter-spacing:.2px;color:#173e4c;padding-right:5px;border-right:1px solid #819894}
body.game-mode[data-battle-format=singles] .health-plate.enemy .plate-owner{color:#69450d}
/* The same owner/type row uses the space below the level; no extra HUD row. */
body.game-mode[data-screen=battle][data-battle-format=singles] .health-plate.enemy:has(.trainer-team-count) .plate-top{display:grid;grid-template-columns:minmax(0,1fr) auto;row-gap:0}
body.game-mode[data-screen=battle][data-battle-format=singles] .health-plate.enemy:has(.trainer-team-count) .plate-top>div{display:contents}
body.game-mode[data-screen=battle][data-battle-format=singles] .health-plate.enemy:has(.trainer-team-count) .plate-top strong{grid-column:1;grid-row:1}
body.game-mode[data-screen=battle][data-battle-format=singles] .health-plate.enemy:has(.trainer-team-count) .plate-top .level{grid-column:2;grid-row:1}
body.game-mode[data-screen=battle][data-battle-format=singles] .health-plate.enemy:has(.trainer-team-count) .plate-types{grid-column:1/-1;grid-row:2}
body.game-mode[data-screen=battle][data-battle-format=singles] .health-plate.enemy .trainer-team-count{font:700 14px/1.1 var(--body);letter-spacing:0;white-space:nowrap}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-message:has(.battle-recap){align-items:center;padding-top:8px;padding-bottom:8px}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-message p.battle-recap{display:flex;flex-direction:column;gap:7px;font:500 clamp(14px,1.25vw,18px)/1.4 var(--body);max-height:100%;overflow:auto;overscroll-behavior:contain;align-self:stretch;justify-content:safe center;scrollbar-width:thin;padding:0}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-recap>span{display:block;flex:none}
body.game-mode .game-loot .loot-summary p>small{font-size:13px;line-height:1.55}
body.game-mode .reward-commitment{font-size:13px;line-height:1.5;color:#36535c;margin:0 0 12px}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-message:has(.battle-objective-message){padding-top:6px;padding-bottom:6px}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-message p.battle-objective-message{font:500 clamp(13px,1.2vw,17px)/1.3 var(--body);max-height:100%;overflow:auto;overscroll-behavior:contain}
body.game-mode .battle-objective-details{padding:14px;margin-bottom:16px;background:#1b3a46;border:1px solid #829c9e;border-radius:6px;color:#eff5ee}
body.game-mode .battle-objective-details h3{font:700 18px/1.3 var(--body);margin:0 0 8px;color:#ffe0a0}
body.game-mode .battle-objective-details p{font:500 14px/1.55 var(--body);margin:0 0 9px}
body.game-mode .battle-objective-details>strong{font:700 13px/1.4 var(--body)}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-heading>div:first-child:has(.battle-trial-place){min-width:110px}
body.game-mode .battle-trial-place{display:block;text-align:left;font:600 11.5px/1.2 var(--body);white-space:nowrap}
body.game-mode .battle-trial-place small{display:block;font:500 10.5px/1.2 var(--body);color:#ffe0a0;margin-top:2px}
@media(max-width:700px) and (min-height:501px) and (max-height:700px){
 body.game-mode[data-screen=battle][data-battle-format=singles]:has(.tactical-switch):has(.battle-recap){--game-dock-height:188px;--compact-message-height:85px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-message p.battle-recap{font:600 12.5px/1.25 var(--body);gap:4px}
}
@media(max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-message p.battle-recap{font:500 14px/1.4 var(--body);gap:8px}
}

/* Keep the throw decision below the combatants on landscape phones. Target
   HP/status and ball odds already appear in the visible plates and cards. */
@media (min-width:701px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles]:has(.capture-area){--game-dock-height:160px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area{left:var(--game-gutter);right:var(--game-gutter);width:auto;height:160px;min-height:160px;max-height:160px;display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,1.5fr);grid-template-rows:auto minmax(0,1fr);gap:8px 14px;padding:10px;overflow:hidden}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .controls-heading{grid-column:1;grid-row:1;min-width:0;gap:7px;align-items:start;margin:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .controls-heading strong{font:700 16px/1.25 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .controls-heading>div>span{font:500 12px/1.35 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .controls-heading .text-button{font:600 12px/1.25 var(--body);min-height:44px;min-width:72px;padding:5px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-readiness{display:none}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice{grid-column:1;grid-row:2;min-height:0;overflow:auto;padding:6px;margin:0;font:500 12px/1.4 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-options{grid-column:2;grid-row:1/3;min-height:0;overflow:auto;overscroll-behavior:contain;align-content:start;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-card{min-height:118px;padding:8px;gap:7px;align-items:center}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-card strong{font:700 16px/1.3 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-card small{font:500 12px/1.35 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-card>b{font:700 22px/1.3 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell:has(.capture-area) :is(.battle-message,.battle-bottom,.wild-label){visibility:hidden}
}
@media (min-width:701px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice{display:grid;grid-template-columns:minmax(0,1fr) 140px;gap:8px;align-items:start}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice p{font:500 12px/1.4 var(--body);color:#244b50;margin:0;min-width:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice .text-button{display:block;min-width:0;width:140px;min-height:44px;padding:6px;font:700 14px/1.3 var(--body);white-space:normal;color:#173e4c;background:#fff9e9;border:1px solid #819d94;border-radius:5px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice .text-button small{display:block;font:600 11px/1.3 var(--body);color:#244b50;margin-top:3px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice .text-button .icon{display:none}
}
@media (min-width:701px) and (max-height:500px){
 /* The existing boss-shield explanation is an extra row. Keep it reachable
    without collapsing advice or covering the health panels. */
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area:has(.capture-shield-note){grid-template-rows:auto 80px auto;overflow-y:auto}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-shield-note{grid-column:1/-1;grid-row:3;margin:0;font:600 12px/1.4 var(--body);color:#244b50}
}
/* Preparation is a real turn-spending action on every viewport. */
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice .text-button{min-height:44px;padding:6px;font:700 14px/1.3 var(--body);color:#173e4c;background:#fff9e9;border:1px solid #819d94;border-radius:5px}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice .text-button small{font:600 11px/1.3 var(--body);color:#244b50}
/* Protected visitors need their actual requirements at the throw decision. */
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .controls-heading strong{font:700 16px/1.3 var(--body)}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .controls-heading>div>span{font:500 14px/1.35 var(--body);color:#284a55}
body.game-mode[data-screen=battle][data-battle-format=singles] .visitor-requirements{padding:7px;background:#e6eee0;border:1px solid #819d94;border-radius:4px}
body.game-mode[data-screen=battle][data-battle-format=singles] .visitor-requirements p{font:600 14px/1.4 var(--body);color:#173e4c;margin:0}
body.game-mode[data-screen=battle][data-battle-format=singles] .visitor-requirements p+p{margin-top:4px}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-advice{display:block;margin:7px 0 0;padding:7px}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-advice p{font:500 14px/1.4 var(--body);color:#244b50;margin:0}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-advice .text-button{width:100%;margin-top:7px}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-advice .text-button small{font-size:14px}
@media(min-width:701px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture{grid-template-columns:minmax(300px,1fr) minmax(0,1.2fr)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .visitor-decision{grid-column:1;grid-row:2;min-height:0;overflow:auto;overscroll-behavior:contain}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-advice{overflow:visible}
}
@media(max-width:700px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice p{font-size:12px;line-height:1.45}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice .text-button{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;width:100%;max-width:100%;margin-top:7px;white-space:normal}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice .text-button small{flex-basis:100%}
}
@media (min-width:701px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area .capture-advice:not(:has([data-action=prepare-catch])){grid-template-columns:minmax(0,1fr)}
}

/* Keep visitor return text readable through the later compact-phone rules. */
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .controls-heading .text-button{font:600 14px/1.3 var(--body);min-height:44px}
@media(max-width:700px) and (min-height:501px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture{height:var(--game-dock-height);min-height:0;max-height:var(--game-dock-height);overflow:auto}
 body.game-mode[data-screen=battle][data-battle-format=singles] .visitor-capture :is(.visitor-decision,.capture-options,.controls-heading){flex:none}
 body.game-mode[data-screen=battle][data-battle-format=singles] .visitor-capture .controls-heading{position:sticky;top:-9px;z-index:2;background:#fff9e9}
}
/* Keep both requirements beside the throw after scrolling, and reserve the
   established arena/HP lane on desktop as well as portrait phones. */
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture{height:var(--game-dock-height);min-height:0;max-height:var(--game-dock-height);overflow:auto}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture :is(.visitor-decision,.capture-options,.controls-heading){flex:none}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .controls-heading{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:5px 8px;position:sticky;top:-14px;z-index:2;background:#fff9e9;align-items:start;margin:0;padding:0 0 5px}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .controls-heading>div:first-child{display:block;min-width:0}
body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .visitor-requirements{grid-column:1/-1}
@media(max-width:700px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .controls-heading{top:-9px}
}
@media(min-width:701px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture{overflow:hidden;grid-template-columns:minmax(260px,1fr) minmax(150px,.7fr) minmax(210px,1fr);grid-template-rows:minmax(0,1fr)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .controls-heading{grid-column:1;grid-row:1;position:static}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .visitor-decision{grid-column:2;grid-row:1;min-height:0;overflow:auto}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-options{grid-column:3;grid-row:1}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-advice{margin:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-options{grid-template-columns:minmax(0,1fr);gap:7px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-card{display:grid;grid-template-columns:minmax(0,1fr) 100px;min-height:64px;padding:6px;gap:6px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-card>.capture-orb{display:none}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-card>span{min-width:0}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-card strong{font:700 16px/1.2 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-card small{font:500 14px/1.2 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-card>b{font:700 20px/1 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .capture-area.visitor-capture .capture-card>b small{font:500 12px/1.1 var(--body);white-space:normal;display:block}
}

/* A live inclusive ward countdown shares the existing field control; it never
   adds an overlay over the combatants or consumes the turn recap. */
body.game-mode[data-screen=battle][data-battle-format=singles] .ward-field-strip button{font:600 14px/1.25 var(--body);min-height:44px;white-space:normal;color:#ffe0a0}
body.game-mode .ward-objective-details>strong{font:600 14px/1.4 var(--body)}
body.game-mode .ward-objective-details .ward-timing-rules{margin-top:12px}
body.game-mode .ward-objective-details .ward-return{font:700 14px/1.3 var(--body);min-height:44px;width:100%;color:#173643;background:#edf2e9}
/* Specialist shield counts share the ownership/type rows inside the HP plate,
   so the toolbar cannot cover an external badge. Ordinary plates are unchanged. */
body.game-mode[data-screen=battle][data-battle-format=singles] .boss-shield-count{position:static;display:inline-block;flex:none;font:600 14px/1.05 var(--body);color:#ffe0a0;white-space:nowrap}
body.game-mode .boss-shield-details{margin-top:12px;padding-top:10px;border-top:1px solid #829c9e}

body.game-mode[data-screen=battle][data-battle-format=singles] .ward-support-move .move-hint{font-size:14px;line-height:1.2;color:#dbe6e9}
body.game-mode[data-screen=battle][data-battle-format=singles] .ward-support-move .move-info>small>b{font-size:14px;line-height:1.2;white-space:normal}

/* A known full-HP survival effect belongs beside the selected attack. */
body.game-mode[data-screen=battle][data-battle-format=singles] .survival-move .move-hint{font-size:14px;line-height:1.2;color:#ffe0a0;white-space:normal}

@media(max-width:700px){
 /* Give a complete survival/accuracy warning the full row. Remaining PP sits
    beside the move name, keeping all four choices in the existing dock. */
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-button.survival-move{padding-top:3px;padding-bottom:3px;row-gap:1px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-button.survival-move .move-info strong{grid-column:1;grid-row:1}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-button.survival-move .move-pp{grid-column:2;grid-row:1;align-self:center}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-button.survival-move .move-hint{grid-column:1/-1;grid-row:3}
}

/* Disabled choices still need a readable reason on touch screens. */
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move:disabled{opacity:1;filter:none;border-style:dashed;cursor:not-allowed}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight.choice-locked-fight .controls-heading>div>span{font-size:14px;line-height:1.2}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move .move-hint{font-size:14px;line-height:1.2;color:#ffe0a0;white-space:normal}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move .move-info>small>b{font-size:14px;line-height:1.2}
@media(max-width:700px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight.choice-locked-fight .move-grid{grid-template-rows:repeat(2,minmax(min-content,1fr))}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move{padding-top:3px;padding-bottom:3px;row-gap:1px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move .move-info strong{grid-column:1/-1;grid-row:1;font:700 14px/1.2 var(--body)}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move .move-info>small{grid-column:1;grid-row:2}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move .move-info>small>span{display:none}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move .move-pp{grid-column:2;grid-row:2;align-self:center}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .choice-locked-move .move-hint{grid-column:1/-1;grid-row:3}
}

/* Choice moves share the established single-row compact landscape grid. */
@media(min-width:480px) and (max-width:700px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight.choice-locked-fight .move-grid{grid-template-rows:minmax(0,1fr)}
}

/* Move order must be readable without a hover. Keep the existing damage,
   status and PP information beside it rather than replacing a warning. */
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-order{display:block;font:600 14px/1.2 var(--body);color:#ffe0a0;margin-top:3px;white-space:normal}
@media(max-width:700px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-button{grid-template-rows:auto auto auto auto;row-gap:1px;padding-top:3px;padding-bottom:3px}
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-fight .move-order{grid-column:1/-1;grid-row:4;margin-top:0}
}
@media(max-width:700px) and (min-height:501px) and (max-height:700px){
 /* The move decision uses the prompt's space while the HP and arena stay put. */
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell:has(.battle-fight) .battle-message{visibility:hidden}
 body.game-mode[data-screen=battle][data-battle-format=singles] .action-area.battle-fight{height:calc(var(--game-dock-height) + 36px);min-height:calc(var(--game-dock-height) + 36px)}
}
