:root{color-scheme:dark;--ink:#e3ecf7;--muted:#93a7c1;--mint:#71bedd;--gold:#e9b863;--paper:#0d1524;--line:#304359}
body{background:radial-gradient(ellipse at 30% 0,#203449 0,#101a2a 45%,#0b1220 100%);color:var(--ink)}
.shell{width:min(1540px,100%);padding:16px 22px;gap:10px}.brand{font-size:25px;font-weight:950;letter-spacing:-1.1px}.edition{font-size:10px;letter-spacing:2px;color:#8aacbf}.quiet{border-radius:7px;background:#1c2a3d;color:#d6e7f8;border-color:#3b536b;box-shadow:none}.quiet:hover:not(:disabled){background:#2c4560}.stats{gap:8px}.stat{background:#162337;border-color:#304359;border-radius:8px;min-width:110px;padding:7px 16px}.stat b{font-variant-numeric:tabular-nums;letter-spacing:.3px}.stat small{font-size:9px;letter-spacing:1.6px}
.world-area{background:#142138;border:1px solid #42566d;border-radius:10px;box-shadow:0 20px 55px #0004}.stage-note{background:#101a2bdf;border:1px solid #425f78;border-radius:7px;box-shadow:0 4px 15px #0003}.stage-note strong{font-size:14px;letter-spacing:.3px}.stage-note small{color:#aec4d8}.side{gap:10px}.card{background:linear-gradient(155deg,#1d2b40,#152136);border-color:#344b63;border-radius:10px}.card p{color:#a7bbd1}.card h2{font-size:17px}.eyebrow{color:#8fc7df;letter-spacing:1.7px;font-size:10px}.enemy-chip{background:#273445;color:#e9c990;border-color:#c9924d}.ability{color:#a9cfeb!important}.roadmap i{background:#344359;border-radius:1px}.roadmap i.on{background:#679bac}.roadmap i.now{background:#e9b863}.main-btn{background:#428dad;border-radius:8px;box-shadow:0 3px 0 #24516c;letter-spacing:.3px}.main-btn.gold{background:#e9b863;color:#242231;box-shadow:0 3px 0 #926d31}#battleStart.battle{background:#233b54;color:#cee7f5;box-shadow:0 3px 0 #17283b}#mergePreview{color:#e7be78}.hintline{color:#7894af}.field-tools{position:absolute;right:10px;bottom:10px;display:flex;gap:5px}#zoom{position:static;background:#172538dc;backdrop-filter:none}.field-tools .quiet{min-height:36px;padding:7px 10px;font-size:12px}
.cover,.finish{background:#0d1724d9}.cover .card,.finish .card{border-radius:12px;box-shadow:0 20px 90px #0008}.cover h1,.finish h1{font-size:32px}.cover p,.finish p{font-size:14px;color:#b0c3d7}.load{background:#152136;color:#abc8e5}#fallback{background:#152136}.toast{border:1px solid #55738c;background:#101c2ff5;border-radius:8px}.seed-label{display:flex;gap:12px;align-items:center;font-size:12px;color:#99b2ca;text-align:left;margin-top:17px}.seed-label input{width:100%;min-width:0;padding:10px;border:1px solid #42566d;border-radius:5px;background:#0d192b;color:#e4edf7}.seed-label input::placeholder{color:#89a2b8}.augments[hidden],[hidden]{display:none!important}.augment-actions{display:flex;gap:5px;margin-top:9px}.augment-actions button{flex:1;min-width:0;min-height:48px;padding:8px 4px;background:#253b53;border:1px solid #5d7895;border-radius:6px;color:#dfedf8;font-size:12px;font-weight:800}.augment-actions small{display:block;color:#e4bd79;font-size:10px}.actions .quiet{min-width:0}#enhance{font-size:13px;white-space:nowrap}
body[data-game=sports]{--mint:#efa968;background:radial-gradient(ellipse at 30% 0,#353544 0,#171b2b 45%,#0d1120 100%)}body[data-game=sports] .edition,body[data-game=sports] .eyebrow{color:#eab581}body[data-game=sports] .main-btn{background:#cd8850;box-shadow:0 3px 0 #7c532f}body[data-game=sports] .world-area{border-color:#596173}body[data-game=sports] .choices button{background:#19273b;border:1px solid #415571;color:#b3c6db;border-radius:6px}body[data-game=sports] .choices button[aria-pressed=true]{background:#533e30;border:2px solid #d9a471;color:#fff0da}body[data-game=sports] .sentence{background:#2e2c36;border-radius:6px;color:#efd2b0}body[data-game=sports] #feedback{color:#a9c8dd}body[data-game=sports] #feedback[data-ok=false]{color:#efab89}body[data-game=sports] .choice-note{color:#8b9db2}body[data-game=sports] .finish .stars{color:#efb76b;letter-spacing:3px}.clock{display:inline-block;font-size:11px;margin-top:7px;color:#edc58d;font-variant-numeric:tabular-nums}.clock[data-urgent=true]{color:#ff8c8c}#styleRow,#leadRow{grid-column:1/-1}#lead{width:100%;min-height:34px;padding:5px;font-size:11px}#lead[aria-pressed=true]{border-color:#e0af76;color:#ffe2af;background:#483e39}
@media(max-width:800px){.shell{padding:9px 10px;gap:7px}.brand{font-size:20px}.edition{font-size:8px;letter-spacing:1.4px}.top{gap:6px}.top .quiet{font-size:10px;padding:7px 9px;min-height:36px}.stat{min-width:0;padding:5px 10px}.stat small{font-size:8px}.stat b{font-size:17px}.layout{gap:7px;grid-template-rows:minmax(160px,1fr) auto}.world-area{border-radius:8px}.stage-note{top:9px;left:9px;padding:7px 10px}.stage-note strong{font-size:12px}.stage-note small{font-size:9px}.card{padding:9px 11px;border-radius:8px}.card h2{font-size:13px}.card p{font-size:10px;line-height:1.35}.enemy-chip{font-size:10px;padding:4px 5px}.eyebrow{font-size:8px;letter-spacing:1px}.side{gap:6px}.main-btn,.actions .quiet{min-height:48px;padding:8px;font-size:13px;border-radius:7px}#enhance{font-size:10px;padding:5px}.actions{gap:5px}body[data-game=defense] footer #merge{min-width:38px}.hintline{font-size:9px}.augments{grid-column:1/-1}.augment-actions{margin-top:5px}.augment-actions button{min-height:36px;padding:5px;font-size:10px}.augment-actions small{font-size:9px}.cover .card,.finish .card{padding:22px}.cover h1,.finish h1{font-size:25px}.clock{margin-top:4px;font-size:10px}body[data-game=sports] .layout{grid-template-rows:minmax(150px,1fr) auto}body[data-game=sports] .commands{padding:8px 10px;gap:5px}body[data-game=sports] .choices button{min-height:32px;font-size:10px}body[data-game=sports] .choices button[aria-pressed=true]{padding:3px}body[data-game=sports] .sentence{font-size:10px;padding:6px 8px}body[data-game=sports] #compare{min-height:32px;font-size:11px;padding:5px}body[data-game=sports] #feedback{font-size:10px}body[data-game=sports] .choice-note{display:none}#lead{min-height:29px}.command-row strong{margin-bottom:3px!important}.hintline{display:none}}
@media(max-height:600px) and (min-width:650px){.shell{padding:7px 12px;gap:5px}.layout,body[data-game=sports] .layout{grid-template-columns:minmax(0,1fr) 270px;grid-template-rows:1fr}.stats{right:294px}.top{padding-right:280px}.side{overflow:auto}.side .card{flex-shrink:0}.side .goal-card{display:none}.actions{max-width:none;width:100%}.main-btn,.actions .quiet{min-height:39px}body[data-game=sports] .commands{display:flex;gap:6px}.cover .card{padding:15px}.cover h1{font-size:20px}.cover p{font-size:12px;margin:8px 0}.cover .main-btn{margin-top:6px;min-height:40px}.cover .actions{margin-top:4px}.seed-label{margin-top:7px}.seed-label input{padding:6px}.side h2{font-size:13px}}

.field-tools{white-space:nowrap}.field-tools button{flex-shrink:0}#zoom{min-width:88px;white-space:nowrap}.side .augments{min-height:0}

.continue-btn{width:100%;margin-top:12px}.field-tools #quality{font-size:10px;min-width:84px}.side .card p{overflow-wrap:anywhere}

#unitPortrait{float:left;width:100px;height:136px;margin:3px 12px 5px 0;border-radius:7px;border:1px solid #4a6682;background:#21354d}.unit-info:after{content:"";display:block;clear:both}.unit-info #mergePreview{clear:both;padding-top:5px}.mode-choice{margin-bottom:14px}.mode-choice button[aria-pressed=true]{border-color:#f0be83;background:#4a3b30;color:#fff0dd}body[data-mode=match] #stars{color:#f5ce97}
@media(max-width:800px){#unitPortrait{width:64px;height:87px;margin-right:7px}.unit-info #unitStats{line-height:1.5}.unit-info #ability{font-size:9px}.unit-info #mergePreview{font-size:9px;margin-top:2px}}

.cover .card{max-height:100%;overflow:auto}@media(max-height:600px) and (min-width:650px){.mode-choice{margin:3px 0 7px}.mode-choice button{min-height:32px}.cover .card>p{font-size:11px;line-height:1.4;margin:6px 0}}

#coverageHint{color:#8edcd5;font-variant-numeric:tabular-nums}#coverageHint[data-empty=true]{color:#edb279}.coverage-key{font-size:9px;display:flex;gap:6px;align-items:center;margin-top:4px;color:#9fb5c9}.coverage-key i{width:6px;height:6px;border-radius:50%;background:#80d4cf}.coverage-key i:last-of-type{background:#e5ae68}#match-track{display:flex;gap:4px;margin-top:4px}#match-track i{height:3px;flex:1;min-width:8px;background:#3b4659;border-radius:2px}#match-track i.current{background:#d9ac79}#match-track i.scored{background:#85c8ab}#match-track i.missed{background:#cf887d}#match-context{font-size:9px;display:block;margin-top:3px;color:#c9b094;white-space:nowrap}@media(max-width:500px){#match-context{font-size:8px}.coverage-key{font-size:8px}}

#battle-summary{margin-top:7px;border-top:1px solid #3a5368;padding-top:6px;font-size:11px}#battle-summary summary{cursor:pointer;color:#d8c394;font-weight:700}#battle-roles{margin:9px 0 5px}.contribution{display:grid;grid-template-columns:30px 1fr 90px;gap:6px;align-items:center;margin:5px 0}.contribution span{color:#bdd0df}.contribution i{height:6px;background:linear-gradient(to right,var(--role) var(--share),#31475b var(--share));border-radius:3px}.contribution b{text-align:right;font-size:10px;color:#c4d8e6}#battle-report-note{display:block;font-size:9px;color:#8daab9;line-height:1.5}#selected-receiver{font-size:12px;color:#9bcedc;padding:8px 9px;border:1px solid #527482;border-radius:6px}#advanced-command{margin:0}#advanced-command summary{font-size:10px;color:#9eafc1;cursor:pointer}#advanced-command .command-row{margin-top:10px}body[data-mode=practice] #advanced-command summary,body[data-mode=practice] #selected-receiver{display:none}body[data-mode=practice] #advanced-command{display:contents}@media(max-width:800px){#selected-receiver,#advanced-command{grid-column:1/-1}#selected-receiver{font-size:10px;padding:5px 8px}.contribution{grid-template-columns:24px 1fr 77px;margin:3px 0}#battle-summary{font-size:9px}#advanced-command[open]{display:grid;grid-template-columns:1fr 1fr;gap:5px}#advanced-command summary{grid-column:1/-1}#advanced-command .command-row{margin-top:3px}}

/* Clear play surface: header, viewport and controls are distinct grid rows. */
.world-area{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.field-viewport{position:relative;min-width:0;min-height:0;overflow:hidden}
.world-area .stage-note{position:static;max-width:none;border:0;border-bottom:1px solid #354d65;border-radius:0;box-shadow:none;padding:8px 12px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px 12px;min-width:0}
.stage-note strong{font-size:12px;white-space:nowrap}.stage-note small{font-size:11px;line-height:1.4;overflow-wrap:anywhere}.stage-note .coverage-key,.stage-note .clock{margin:0;white-space:nowrap}
.world-area .field-tools{position:static;justify-content:flex-end;align-items:center;padding:5px 7px;background:#142034;border-top:1px solid #30475d;gap:5px}
.field-tools .quiet{min-height:32px;padding:5px 9px;font-size:11px}
@media(max-width:800px){.layout{grid-template-rows:minmax(236px,1fr) auto}body[data-game=sports] .layout{grid-template-rows:minmax(236px,1fr) auto}.world-area .stage-note{padding:6px 8px;gap:2px 8px;grid-template-columns:1fr auto}.stage-note strong{font-size:11px}.stage-note small{grid-column:1/-1;font-size:10px}.stage-note .coverage-key{display:none}.stage-note .clock{grid-column:2;grid-row:1;font-size:10px}.field-tools .quiet{min-height:30px;font-size:10px}}
@media(max-height:600px) and (min-width:650px){.layout,body[data-game=sports] .layout{grid-template-rows:1fr;grid-template-columns:minmax(0,1fr) 240px}.stats{right:264px}.top{padding-right:250px}.world-area .stage-note{grid-template-columns:auto minmax(0,1fr) auto;padding:5px 9px;gap:6px;min-height:30px}.stage-note strong{font-size:11px}.stage-note small{grid-column:auto;font-size:10px}.stage-note .clock{grid-column:auto;grid-row:auto}.stage-note .coverage-key{display:none}.field-tools .quiet{min-height:29px;padding:4px 8px}}

@media(max-height:600px) and (min-width:650px){
 .world-area{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr)}
 .world-area .stage-note{grid-column:1;grid-row:1;grid-template-columns:1fr auto;padding:5px 9px;gap:0 6px}
 .stage-note strong{font-size:10px}.stage-note small{grid-column:1/-1;font-size:10px}.stage-note .clock{grid-column:2;grid-row:1;font-size:9px}
 .field-viewport{grid-column:1/-1;grid-row:2}
 .world-area .field-tools{grid-column:2;grid-row:1;padding:4px;border-top:0;border-bottom:1px solid #354d65}
 .field-tools .quiet{min-height:30px;padding:4px 7px;font-size:9px}.field-tools #quality{font-size:9px;min-width:74px}#zoom{min-width:75px}
}

@media(max-height:600px) and (min-width:650px){.top{min-height:64px}}

/* Compact silhouettes and a motion-linked sequence stay outside the field. */
#enemyPreview{display:flex;gap:8px;flex-wrap:wrap;padding:6px 8px}.enemy-card{display:flex;align-items:center;gap:5px;white-space:nowrap}.enemy-card svg{width:35px;height:31px;fill:#334d68;stroke:#7196a8;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.enemy-card .lens{fill:#ddbc73;stroke:none}.enemy-card b{color:#b98451}.court-flow{display:flex;gap:5px;grid-column:1/-1;min-height:28px;align-items:center;justify-content:space-between}.court-flow>span{display:flex;align-items:center;gap:4px;font-size:11px;color:#6d8496;white-space:nowrap}.court-flow b{display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#263b51;color:#8ea4b6;font-size:10px}.court-flow .flow-done{color:#78b5a1}.court-flow .flow-done b{background:#355a52;color:#b5d3bc}.court-flow .flow-now{color:#efd2a5;font-weight:800}.court-flow .flow-now b{background:#9c754c;color:#fff1d9}.court-flow[data-failed=true] .flow-now{color:#e49a86}.court-flow[data-failed=true] .flow-now b{background:#8d5046}
@media(max-width:800px){#enemyPreview{gap:6px;padding:3px 5px}.enemy-card{gap:3px;font-size:10px}.enemy-card svg{width:25px;height:23px}.court-flow{min-height:25px;gap:5px}.court-flow>span{font-size:10px}.court-flow b{width:16px;height:16px;font-size:9px}}
@media(max-height:600px) and (min-width:650px){.court-flow>span{font-size:9px;gap:3px}.court-flow{gap:3px;min-height:24px}.court-flow b{width:15px;height:15px}.enemy-card svg{width:25px;height:23px}}
.field-tools .court-flow{flex:1;max-width:330px;margin-right:auto;min-height:25px}.field-tools .court-flow>span{font-size:10px}.field-tools .court-flow b{width:16px;height:16px}@media(max-height:600px) and (min-width:650px){.field-tools .court-flow{max-width:230px}.field-tools .court-flow>span{font-size:9px}}

/* Give the objective and current action their own space, outside the field. */
.game-purpose{display:block;color:#aec7dc;font-size:11px;margin-top:2px;letter-spacing:0}
.start-steps{display:flex;gap:8px;margin:14px 0;list-style:none;padding:0;text-align:left}
.start-steps li{flex:1;background:#26384c;border:1px solid #435871;border-radius:9px;padding:9px;font-size:12px;line-height:1.5}
.start-steps b{display:block;color:#f0c777;font-size:16px;margin-bottom:2px}
.cover .card{max-height:100%;overflow-y:auto}.cover{align-items:safe center;overflow:auto}
.cover .intro-goal{color:#e7eef6;font-size:16px;margin:8px 0}
.cover details{text-align:left;font-size:12px;margin:9px 0;color:#afc4d8}.cover details summary{cursor:pointer;padding:6px}
.cover .seed-label{margin:4px 0}.cover .start-note{font-size:11px;margin:8px 0 0;color:#a8bbce}
.next-action{outline:3px solid #f0bf66!important;outline-offset:2px;box-shadow:0 0 0 5px #eab45a24!important}
.world-area .stage-note small{font-size:13px;color:#e7d6b4}
[data-game=sports] .commands .command-row strong{color:#adbed2;font-size:11px}
[data-game=sports] .commands>.command-row .choices button{min-height:42px}
.cover .mode-choice{justify-content:center}.cover .mode-choice button{flex:1}
.match-shortcut{display:block;font-size:12px;font-weight:800;color:#aacee1}
@media(max-width:800px){
 .game-purpose{font-size:10px}.top-actions a{font-size:10px}
 .cover .card{padding:16px}.cover h1{font-size:23px;margin:5px 0}.cover .intro-goal{font-size:14px;line-height:1.5}
 .start-steps{gap:5px;margin:10px 0}.start-steps li{font-size:10px;padding:7px}.start-steps b{font-size:14px}
 .world-area .stage-note small{font-size:12px;line-height:1.4}
 [data-game=sports] .commands{gap:6px;grid-template-columns:1fr 1fr}
 [data-game=sports] .commands>[data-command-block=receiver]{grid-column:1/-1}
 [data-game=sports] .commands>.command-row .choices button{font-size:11px;min-height:39px;padding:5px}
 [data-game=sports] #advanced-command{grid-column:1/-1}
 [data-game=sports] #advanced-command:not([open])~.sentence{display:none}
}
@media(max-height:600px) and (min-width:650px){
 .game-purpose{font-size:10px}.cover .card{padding:12px 20px}.start-steps{margin:7px 0}.start-steps li{padding:5px;font-size:10px}
 .cover h1{font-size:22px;margin:2px 0}.cover .intro-goal{font-size:13px;margin:4px 0}.cover .actions .quiet{min-height:36px}
 .cover .main-btn{min-height:40px;margin-top:7px}.cover details{margin:3px 0}.cover .start-note{margin-top:5px}
 .world-area .stage-note small{font-size:11px}
 [data-game=sports] .commands>.command-row .choices button{min-height:36px}
}

/* field-selection-v22: one marker follows the chosen player, outside the head. */
.receiver-cue{position:absolute;z-index:2;transform:translate(-50%,-100%);width:100px;height:30px;display:grid;place-items:center;border:1px solid #f4d298;border-radius:9px;background:#283448f2;color:#fff2cb;box-shadow:0 2px 7px #0c142b66;pointer-events:none;font-size:13px;font-weight:800;white-space:nowrap}
.receiver-cue::after{content:"";position:absolute;left:var(--tail-x,50%);top:100%;transform:translateX(-50%);border:5px solid transparent;border-top-color:#f4d298}
.receiver-cue[hidden]{display:none!important}
@media(max-height:600px) and (min-width:650px){.receiver-cue{height:25px;width:92px;font-size:12px}}

/* direct-actor-v23: the label names the selected real model without intercepting taps. */
.unit-selection-cue{position:absolute;z-index:4;transform:translate(-50%,-100%);padding:5px 10px;border:1px solid #eebc73;border-radius:9px;background:#263448f2;color:#ffe4af;font-size:12px;font-weight:800;line-height:1.25;white-space:nowrap;pointer-events:none;box-shadow:0 3px 10px #0005}
.unit-selection-cue::after{content:"";position:absolute;left:var(--tail-x,50%);bottom:-5px;width:7px;height:7px;background:#263448;transform:translateX(-50%) rotate(45deg);border-right:1px solid #eebc73;border-bottom:1px solid #eebc73}
.unit-selection-cue[hidden]{display:none!important}

/* First-play map: directions remain outside the game field. */
.world-area{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto}
.world-area .stage-note{grid-row:1;grid-column:1}
.world-area .play-steps{grid-row:2;grid-column:1/-1}
.world-area .field-viewport{grid-row:3;grid-column:1/-1}
.world-area .field-tools{grid-row:4;grid-column:1}
.play-steps{display:flex;list-style:none;gap:5px;margin:0;padding:6px 9px;background:#101c2d;border-bottom:1px solid #344c62}
.play-steps li{flex:1;min-width:0;text-align:center;padding:5px 3px;border-radius:5px;color:#9baec4;font-size:11px;font-weight:700;white-space:nowrap}
.play-steps li.current{background:#384430;color:#ffdf8e;box-shadow:inset 0 -2px #ebc278}
.play-steps small{font-size:8px;font-weight:400}
body[data-game=sports] .play-steps li.current{background:#4b392c;color:#ffe0b8}
body[data-game=sports] .command-row.current-command strong{color:#ffcb88}
body[data-game=sports] .finish .stars{font-size:20px;letter-spacing:0;line-height:1.5}
@media(max-width:800px){.play-steps{padding:4px 7px}.play-steps li{font-size:10px;padding:4px 2px}body[data-game=defense] footer #merge{font-size:10px;min-width:63px}}
@media(max-height:600px) and (min-width:650px){.world-area{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto minmax(0,1fr)}.world-area .field-tools{grid-row:1;grid-column:2}.play-steps{padding:3px 6px}.play-steps li{font-size:9px;padding:3px}}
@media(max-width:800px){body[data-game=sports][data-challenge=pressure] .play-steps{display:none}}

/* v26: optional tactical detail, with the actual field and core actions first. */
body[data-game=defense] .layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
body[data-game=defense] .side{display:flex;flex-direction:column;min-width:0;overflow:visible}
.tactical-panel{min-width:0;border:1px solid #385169;border-radius:8px;background:#172638}
.tactical-panel>summary{cursor:pointer;min-height:38px;padding:8px 12px;color:#b7cedd;font-size:12px;font-weight:700}
.tactical-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:0 8px 8px;max-height:min(24dvh,170px);overflow:auto;overscroll-behavior:contain}
.tactical-content .card{min-width:0}.tactical-upgrade{grid-column:1/-1;display:flex;justify-content:space-between;gap:12px;align-items:center;color:#b1c6d9;font-size:12px;padding:4px 6px}
.tactical-upgrade #enhance{min-height:42px;background:#243b52;color:#dfedf8;border:1px solid #587791;border-radius:7px;padding:8px 12px}
body[data-game=defense] footer #summon,body[data-game=defense] footer #battleStart{flex:1}
body[data-game=defense] footer #merge{flex:.8;font-size:12px}
body[data-game=sports][data-mode=practice] #advanced-command{display:block}
body[data-game=sports][data-mode=practice] #advanced-command summary{display:list-item}
#advanced-command>summary{min-height:32px;padding:7px 3px;font-size:11px;font-weight:700}
.advanced-body{max-height:110px;overflow:auto;overscroll-behavior:contain;padding:2px 0 5px}
.advanced-body #compare{margin-top:7px}.advanced-body .choice-note{display:block;margin-top:5px}
body[data-game=sports] footer{position:relative}
body[data-game=sports] footer #advanced-command{display:block;flex:0 0 auto}
body[data-game=sports] footer #advanced-command>summary{display:block;cursor:pointer;min-height:48px;padding:13px 10px;border:1px solid #415571;border-radius:7px;background:#1c2a3d;color:#cbdced;white-space:nowrap;font-size:11px}
body[data-game=sports] footer #advanced-command[open]>summary{border-color:#d9a471;color:#ffe0b8}
body[data-game=sports] footer .advanced-body{position:absolute;z-index:20;bottom:calc(100% + 10px);right:0;width:min(380px,92vw);max-height:150px;overflow:auto;padding:12px;border:1px solid #5b718c;border-radius:9px;background:#172638;box-shadow:0 6px 30px #0007}
body[data-game=sports] footer .advanced-body #compare{min-height:42px;background:#243b52;color:#dcecf9;border:1px solid #587791;border-radius:7px}
body[data-game=sports] .command-row.current-command{border-left:3px solid #e7b77c;padding-left:7px}
@media(max-width:800px){
 .tactical-panel>summary{min-height:35px;padding:7px 10px;font-size:11px}.tactical-content{gap:6px;padding:0 6px 6px}
 .tactical-upgrade{font-size:10px}.tactical-upgrade #enhance{font-size:11px;min-height:38px}
 body[data-game=sports] .commands{max-height:min(34dvh,240px);overflow:auto;overscroll-behavior:contain}
 #advanced-command .advanced-body{display:block;grid-column:1/-1}
 #advanced-command[open]{display:block!important}
 body[data-game=sports] #feedback{min-height:0;padding:6px 7px;border-radius:5px;background:#3c2d2b;color:#f0be9b}
}

/* v27: captions follow observed actions and never intercept field input. */
.field-outcome{position:absolute;z-index:5;pointer-events:none;transform:translate(-50%,-100%);width:max-content;max-width:calc(100% - 12px);padding:8px 10px;border:1px solid #dba977;border-radius:9px;background:#253343f2;color:#fff0d5;box-shadow:0 4px 14px #07101d66;text-align:center}
.field-outcome strong,.field-outcome small{display:block}.field-outcome strong{font-size:13px;font-weight:800;line-height:1.3}.field-outcome small{font-size:10px;line-height:1.45;margin-top:3px;color:#d0deea}
.field-outcome:after{content:'';position:absolute;top:100%;left:var(--tail-x,50%);margin-left:-4px;border:4px solid transparent;border-top-color:#dba977}
.field-outcome[data-kind=merge]{border-color:#e6c36d;animation:field-result-rise .18s ease-out}.field-outcome[data-kind=merge]:after{border-top-color:#e6c36d}
@keyframes field-result-rise{from{opacity:0;transform:translate(-50%,calc(-100% + 8px))}to{opacity:1;transform:translate(-50%,-100%)}}
@media(prefers-reduced-motion:reduce){.field-outcome[data-kind=merge]{animation:none}}
@media(max-width:340px){.field-outcome{padding:6px 8px}.field-outcome strong{font-size:12px}.field-outcome small{font-size:9px}}
@media(max-height:600px) and (min-width:650px){
 body[data-game=defense] .layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 body[data-game=defense] .side{position:fixed;z-index:6;top:7px;right:12px;width:240px;max-height:calc(100dvh - 110px);overflow:auto;min-height:0}.tactical-content{grid-template-columns:minmax(0,1fr);max-height:calc(100dvh - 160px)}
 .tactical-content .card{min-height:0}.tactical-upgrade{flex-direction:column;align-items:stretch;font-size:10px}
 body[data-game=sports] .commands{max-height:none;overflow:visible}
 body[data-game=sports] footer #advanced-command>summary{min-height:39px;padding:10px}
}
.field-tools #autoMerge{margin-right:auto;color:#c2e7dc;border:1px solid #476b62;white-space:nowrap}
.field-tools #autoMerge[aria-pressed=true]{background:#26483f;color:#ddf9ec}
body[data-game=defense] .world-area .field-tools{flex-wrap:wrap}
