/* The battlefield keeps its place while the hand gives way to resolution. */
.has-battle-layout .arena-background { background-attachment:scroll; }
.has-battle-layout .arena-play-space { max-width:1120px; padding:12px 24px 16px; }
.battle-scoreboard { display:grid; grid-template-columns:minmax(0,1fr) 45px minmax(0,1fr); gap:22px; align-items:center; max-width:820px; width:100%; margin:0 auto; }
.battle-scoreboard .commander { position:relative; padding:9px 12px; border:1px solid #8ca9c43d; border-radius:9px; background:linear-gradient(115deg,#102235ed,#142034bb); }
.battle-scoreboard .commander-opponent { background:linear-gradient(245deg,#35222ded,#142034bb); border-color:#c48c933d; }
.battle-scoreboard .commander-crest { width:28px; height:34px; flex:none; }
.battle-scoreboard .commander-crest>.icon { width:18px; height:18px; }
.battle-scoreboard .commander-name>strong { display:block; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; font-size:13px; }
.battle-scoreboard .commander-name>small { font-size:7px; margin:3px 0 6px; }
.battle-scoreboard .life-track { min-width:0; }
.battle-scoreboard .life-value>b { font-size:37px; }
.battle-scoreboard .life-value>small { font-size:9px; }
.battle-scoreboard .virus-status { position:absolute; bottom:-10px; left:12px; z-index:3; padding:3px 6px; border:1px solid #c886d750; border-radius:3px; background:#2c1939; font-size:8px; }
.score-versus { text-align:center; color:#bca57e; font:italic 16px Georgia,serif; }
.game-arena.has-battle-layout .enemy-zone { height:auto; display:flex; justify-content:space-between; align-items:center; min-height:38px; gap:12px; width:100%; max-width:820px; margin:0 auto; position:relative; z-index:8; }
.opponent-scout { position:relative; max-width:calc(100% - 95px); min-width:0; }
.opponent-scout>summary { display:flex; align-items:center; gap:13px; list-style:none; cursor:pointer; min-height:36px; font-size:10px; color:#c0cee0; }
.opponent-scout>summary::-webkit-details-marker { display:none; }
.opponent-scout>summary>span:first-child { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.opponent-scout>summary>.icon { width:13px; height:13px; flex:none; transform:rotate(90deg); }
.opponent-scout[open]>summary>.icon { transform:rotate(-90deg); }
.opponent-scout>summary>span>.icon { width:13px; height:13px; }
.has-battle-layout .opponent-scout .racial-core { margin:0; font-size:10px; gap:5px; }
.has-battle-layout .opponent-scout .racial-core>span { display:none; }
.has-battle-layout.has-combined-effects .opponent-scout .enemy-roster { display:block; width:380px; max-width:calc(100vw - 32px); position:absolute; left:0; top:100%; padding:12px; border:1px solid #778daa; border-radius:9px; background:#0e1b2af5; box-shadow:0 15px 35px #0008; z-index:15; }
.has-battle-layout .enemy-hand { display:flex; align-items:center; gap:5px; font-size:11px; }
.has-battle-layout .enemy-hand>.icon { width:17px; height:17px; color:#aabdd4; }
.has-battle-layout .enemy-hand>small { margin:0; font-size:7px; letter-spacing:0; }
.has-battle-layout .arena-phase-announcement { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:6px; min-height:30px; margin:2px 0 7px; }
.has-battle-layout .arena-phase-announcement>h1, .has-battle-layout .arena-phase-announcement>p, .has-battle-layout .stats-help { position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip-path:inset(50%); }
.has-battle-layout .stats-help:focus-visible { position:static; width:auto; height:auto; margin:0; padding:6px; clip-path:none; }
.battle-phase-cue { display:inline-flex; align-items:center; gap:8px; color:#e8e3d8; font-size:12px; font-weight:600; letter-spacing:.25px; }
.battle-phase-cue:before { content:''; width:5px; height:5px; border-radius:50%; background:#b9d7ed; box-shadow:0 0 9px #b9d7ed5c; }
.battle-phase-cue[data-phase="waiting"] { color:#d8c292; }
.has-battle-layout .arena-phase-announcement .online-readiness { margin:0; font-size:9px; }
.has-battle-layout .battlefield { margin:0 auto 9px; width:100%; }
.game-arena .shared-field.field-brief { display:block; width:100%; padding:0; border-radius:7px; background:#101e30d9; margin:0; }
.game-arena .field-brief .field-inspect { display:flex; align-items:center; gap:10px; width:100%; min-height:50px; padding:7px 12px; }
.game-arena .field-brief .field-thumbnail { width:36px; height:36px; border-radius:4px; object-fit:cover; flex:none; }
.game-arena .field-brief .field-brief-name { min-width:0; flex:1; }
.game-arena .field-brief .field-brief-name>small { display:block; font-size:7px; color:#aabed1; letter-spacing:.8px; margin:0 0 3px; }
.game-arena .field-brief .field-brief-name>strong { display:block; font:400 17px/1.2 Georgia,serif; color:#eee5d2; }
.game-arena .field-brief .keyword-list { flex:none; max-width:44%; }
.game-arena .field-brief .keyword { font-size:10px; }
.field-brief-info>.icon { width:14px; height:14px; color:#b2c4d6; }
.has-battle-layout .player-dock { max-width:900px; width:100%; margin:0 auto; }
.has-battle-layout .own-roster>.zone-title { margin-bottom:5px; }
.has-battle-layout .own-roster>.racial-core { margin:0 0 8px; }
.has-battle-layout .own-roster>.racial-core>span { display:none; }
.has-battle-layout .own-roster .bench-row { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.has-battle-layout .own-roster .bench-card { width:100%; }
.has-battle-layout .action-plan { min-width:0; }
.has-battle-layout .action-plan>strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.has-battle-layout .action-plan>small { line-height:1.4; }
.has-battle-layout .duel-button:disabled { filter:saturate(.25); cursor:default; }
.has-battle-layout.phase-reveal .battlefield { margin-top:4px; }
.has-battle-layout.phase-finished .battle-phase-cue { display:none; }
.has-battle-layout.phase-finished .enemy-zone { display:none; }
@media(min-width:701px) {
  .has-battle-layout.has-automatic-field .battlefield { grid-template-columns:minmax(0,1fr) 165px; gap:10px 18px; max-width:980px; }
  .has-battle-layout.has-automatic-field .field-brief { grid-column:1/-1; }
  .has-battle-layout .duel-stage { min-height:320px; }
  .has-battle-layout.phase-reveal .duel-stage { min-height:350px; }
  .game-arena.has-battle-layout.has-combined-effects .duel-card { width:208px; height:300px; }
  .has-battle-layout.has-combined-effects .duel-card-caption { padding:11px; }
  .has-battle-layout .player-dock { grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:30px; }
  .has-battle-layout .own-roster .bench-card { height:85px; }
  .has-battle-layout .arena-action-bar { padding-block:12px; }
}
@media(max-width:700px) {
  .game-arena.has-battle-layout { min-height:100svh; min-height:100dvh; padding-bottom:0; }
  .has-battle-layout .arena-topbar { min-height:48px; padding:env(safe-area-inset-top,0px) max(8px,env(safe-area-inset-right,0px)) 0 max(8px,env(safe-area-inset-left,0px)); gap:4px; flex-wrap:nowrap; }
  .has-battle-layout.is-online .arena-brand { display:none; }
  .has-battle-layout .arena-brand { font-size:12px; letter-spacing:2px; padding-left:7px; }
  .has-battle-layout .arena-exit { min-width:44px; min-height:44px; font-size:0; gap:0; }
  .has-battle-layout .arena-exit>span { display:none; }
  .has-battle-layout .arena-utilities { gap:0; }
  .has-battle-layout .arena-icon-button { width:44px; min-width:44px; min-height:44px; padding:10px; }
  .has-battle-layout .arena-icon-button>.icon { width:16px; height:16px; }
  .has-battle-layout .arena-clock:not(.has-timer) { display:none; }
  .has-battle-layout .duel-progress { gap:6px; margin-left:auto; }
  .has-battle-layout .duel-progress>span { width:17px; height:17px; font-size:8px; }
  .has-battle-layout .duel-progress>small { display:none; }
  .has-battle-layout .arena-play-space { display:flex; gap:0; padding:6px max(12px,env(safe-area-inset-right,0px)) 12px max(12px,env(safe-area-inset-left,0px)); }
  .battle-scoreboard { grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr); gap:5px; position:sticky; top:max(6px,env(safe-area-inset-top)); z-index:12; }
  .battle-scoreboard .commander { padding:7px 8px; gap:6px; min-height:53px; border-radius:7px; }
  .battle-scoreboard .commander-crest { display:none; }
  .battle-scoreboard .commander-name>strong { font-size:10px; letter-spacing:0; }
  .battle-scoreboard .commander-name>small { font-size:6px; letter-spacing:.4px; margin:3px 0 5px; }
  .battle-scoreboard .life-value { gap:3px; margin-left:0; }
  .battle-scoreboard .life-value>b { font-size:32px; }
  .battle-scoreboard .life-value>.icon { width:11px; height:11px; }
  .battle-scoreboard .life-value>small { display:none; }
  .battle-scoreboard .life-track { height:5px; }
  .score-versus { font-size:10px; }
  .game-arena.has-battle-layout .enemy-zone { min-height:32px; gap:7px; margin:1px 0; }
  .opponent-scout { max-width:calc(100% - 52px); }
  .opponent-scout>summary { font-size:10px; min-height:44px; gap:7px; }
  .has-battle-layout .opponent-scout .racial-core { font-size:9px; gap:4px; }
  .has-battle-layout .opponent-scout .racial-core>.icon { width:13px; height:13px; }
  .has-battle-layout .enemy-hand { font-size:10px; padding-right:3px; }
  .has-battle-layout .enemy-hand>small { display:none; }
  .has-battle-layout.has-combined-effects .opponent-scout .enemy-roster { width:calc(100vw - 24px); max-width:calc(100vw - 24px); padding:9px; }
  .has-battle-layout .arena-phase-announcement { min-height:24px; margin:1px 0 5px; }
  .battle-phase-cue { font-size:11px; letter-spacing:0; }
  .has-battle-layout .arena-phase-announcement .online-readiness { font-size:8px; gap:8px; width:100%; justify-content:center; }
  .has-battle-layout.has-automatic-field .battlefield { display:flex; flex-direction:column; gap:6px; min-height:0; margin:0 0 8px; }
  .game-arena .field-brief .field-inspect { min-height:46px; gap:7px; padding:5px 7px; }
  .game-arena .field-brief .field-thumbnail { width:29px; height:29px; }
  .game-arena .field-brief .field-brief-name>small { font-size:6px; letter-spacing:.7px; margin-bottom:2px; }
  .game-arena .field-brief .field-brief-name>strong { font-size:14px; line-height:1.15; }
  .game-arena .field-brief .keyword { font-size:9px; padding:3px 4px; }
  .game-arena .field-brief .keyword-list { max-width:42%; }
  .field-brief-info { display:none; }
  .game-arena.has-battle-layout.has-combined-effects .duel-stage { display:grid; grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr); gap:5px; width:100%; min-height:0; height:auto; padding:5px 0 0; align-items:stretch; }
  .game-arena.has-battle-layout.has-combined-effects .duel-position { min-width:0; width:100%; padding:0; display:flex; flex-direction:column; }
  .game-arena.has-battle-layout.has-combined-effects .duel-card { width:100%; max-width:210px; height:auto; min-height:252px; margin:0 auto; flex:1; }
  .game-arena.has-battle-layout.has-combined-effects .duel-card.face-up { display:flex; flex-direction:column; justify-content:flex-end; padding-top:72px; }
  .game-arena.has-battle-layout.has-combined-effects .duel-card-caption { position:relative; padding:8px; inset:auto; width:100%; margin-top:auto; }
  .game-arena.has-battle-layout.has-combined-effects .duel-card-caption h2 { font-size:clamp(16px,3.95vw,19px); min-height:0; line-height:1.13; margin:0 0 7px; text-wrap:balance; overflow-wrap:break-word; }
  .has-battle-layout .duel-side-label { font-size:6px; margin:0 0 5px; }
  .has-battle-layout .duel-divider { align-self:center; width:22px; gap:5px; margin-top:12px; }
  .has-battle-layout .duel-divider>span { font-size:15px; }
  .has-battle-layout .duel-divider>span>.icon { width:18px; height:18px; }
  .has-battle-layout .duel-divider>small, .has-battle-layout .duel-divider>i { display:none; }
  .has-battle-layout .combat-channels { gap:4px; margin-top:4px; }
  .has-battle-layout .combat-channel { padding:4px; }
  .has-battle-layout .combat-channel-heading { gap:3px; flex-wrap:wrap; }
  .has-battle-layout .combat-channel-label { font-size:8px; }
  .has-battle-layout .combat-channel-state { font-size:7px; }
  .has-battle-layout .combat-channel-keywords { margin-top:3px; }
  .has-battle-layout .combat-channel-keywords .keyword { font-size:9px; }
  .has-battle-layout .duel-card-stats { padding-top:6px; margin-top:6px; gap:3px; }
  .has-battle-layout .duel-card-stats b { font-size:23px; line-height:1; }
  .has-battle-layout .duel-card-stats small { font-size:6px; margin-bottom:4px; letter-spacing:0; }
  .has-battle-layout .duel-card-stats small .icon { width:8px; height:8px; }
  .has-battle-layout .duel-card-inspect { top:29px; right:3px; width:44px; height:44px; padding:11px; background:transparent; border-color:transparent; }
  .has-battle-layout .duel-equipment { font-size:8px; min-height:0; margin-top:4px; }
  .has-battle-layout.phase-plan .duel-equipment { display:none; }
  .has-battle-layout .duel-equipment .equipped-token { width:44px; height:44px; flex:0 0 44px; padding:4px; }
  .has-battle-layout .duel-equipment .equipped-token>span { display:none; }
  .has-battle-layout .battle-insight { display:none; }
  .has-battle-layout .player-dock { display:flex; flex-direction:column; gap:9px; padding:0; width:100%; }
  .has-battle-layout .own-roster { min-width:0; width:100%; position:relative; }
  .has-battle-layout .own-roster>.zone-title { display:flex; font-size:7px; margin:0 0 7px; min-height:14px; }
  .has-battle-layout .own-roster>.zone-title>small { display:none; }
  .has-battle-layout .own-roster>.racial-core { position:absolute; right:0; top:-1px; margin:0; font-size:9px; line-height:14px; }
  .has-battle-layout .own-roster>.racial-core>.icon { width:12px; height:12px; }
  .has-battle-layout .own-roster .bench-row { gap:6px; overflow:visible; padding:0; }
  .game-arena.has-battle-layout .own-roster .bench-card { width:100%; height:72px; min-width:0; }
  .game-arena.has-battle-layout .own-roster .bench-name { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:8px; line-height:1.15; bottom:17px; left:4px; right:4px; }
  .game-arena.has-battle-layout .bench-bonus, .game-arena.has-battle-layout .bench-card.selected .bench-bonus { top:22px; height:10px; width:10px; }
  .game-arena.has-battle-layout .bench-state { font-size:8px; left:4px; bottom:4px; gap:4px; }
  .game-arena.has-battle-layout .bench-state .icon { width:8px; height:8px; }
  .has-battle-layout .hand-zone { min-width:0; width:100%; }
  .has-battle-layout .hand-zone>.zone-title { font-size:7px; margin:0 0 4px; min-height:18px; gap:7px; }
  .has-battle-layout .hand-zone>.zone-title>small { font-size:8px; margin-left:auto; }
  .has-battle-layout .hand-info { min-height:44px; min-width:44px; border-color:transparent; padding:12px; margin-block:-6px; }
  .has-battle-layout .card-hand { display:flex; align-items:flex-end; justify-content:center; gap:7px; padding:6px 3px 0; min-height:0; }
  .game-arena.has-battle-layout .hand-card:not(.mulligan-card) { width:calc((100% - 14px)/3); min-width:0; max-width:136px; height:142px; margin:0; transform:rotate(0); border-radius:7px; }
  .game-arena.has-battle-layout .hand-card.selected:not(.mulligan-card) { transform:translateY(-5px); }
  .has-battle-layout .hand-description { left:0; right:0; bottom:20px; padding:5px 6px 6px; }
  .has-battle-layout .hand-description h3, .has-battle-layout .hand-description p { min-height:0; }
  .has-battle-layout .hand-description h3 { font-size:15px; line-height:1.05; margin-bottom:4px; }
  .has-battle-layout .hand-description .keyword { font-size:8px; padding:2px 3px; }
  .has-battle-layout .hand-description .keyword>.icon { width:10px; height:10px; flex-basis:10px; }
  .has-battle-layout .hand-selection { min-height:20px; font-size:7px; padding:4px; }
  .has-battle-layout .hand-cost { top:5px; left:5px; width:auto; min-width:24px; height:23px; font-size:10px; }
  .has-battle-layout .hand-cost>.icon { width:10px; height:10px; }
  .has-battle-layout .hand-type { top:8px; right:4px; font-size:6px; }
  .has-battle-layout .arena-action-bar { position:sticky; bottom:0; z-index:20; min-height:58px; padding:8px max(12px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px)); gap:9px; margin-top:auto; }
  .has-battle-layout .action-plan { max-width:none; flex:1; }
  .has-battle-layout .action-plan>strong { font-size:10px; }
  .has-battle-layout .action-plan>small { font-size:8px; }
  .has-battle-layout .mobile-attack { font-size:23px; margin:0; min-height:44px; min-width:44px; padding:0; border:0; background:none; cursor:pointer; }
  .has-battle-layout .mobile-attack>small { font-size:6px; letter-spacing:0; }
  .has-battle-layout .duel-button { min-height:48px; height:auto; width:auto; min-width:125px; max-width:52%; padding:9px 13px; font-size:10px; }
  .has-battle-layout .duel-button>.icon { width:16px; height:16px; }
  .has-battle-layout.phase-reveal .arena-play-space { padding-bottom:15px; }
  .has-battle-layout.phase-reveal .battlefield { gap:10px; }
  .game-arena.has-battle-layout.has-combined-effects.phase-reveal .duel-card { height:auto; min-height:304px; padding-top:112px; }
  .has-battle-layout.phase-reveal .duel-equipment { min-height:44px; display:flex; align-items:center; justify-content:center; gap:5px; }
  .has-battle-layout.phase-reveal .combat-fx { top:35px; min-height:67px; }
  .has-battle-layout .combat-playback button { min-width:44px; min-height:44px; padding:8px 10px; }
  .has-battle-layout.phase-reveal .duel-card-caption h2 { font-size:19px; }
  .has-battle-layout.phase-reveal .duel-card-stats b { font-size:30px; }
  .has-battle-layout.phase-reveal .combat-playback { margin:12px 0 0; width:100%; }
  .has-battle-layout.phase-reveal .duel-multiplier { margin-top:7px; }
  .has-battle-layout.phase-reveal .action-plan>small { max-width:170px; }
  .has-battle-layout .round-events { margin:2px 0 7px; font-size:9px; }
  .has-battle-layout .teleport-choice { margin-top:6px; font-size:10px; }
}
@media(max-width:365px) {
  .has-battle-layout .arena-brand { display:none; }
  .has-battle-layout .arena-play-space { padding-inline:9px; }
  .has-battle-layout .opponent-scout .racial-core { font-size:8px; }
  .game-arena.has-battle-layout.has-combined-effects .duel-card { min-height:245px; }
  .game-arena.has-battle-layout.has-combined-effects .duel-card-caption { padding:6px; }
  .game-arena.has-battle-layout .own-roster .bench-name { font-size:7px; }
  .game-arena.has-battle-layout .own-roster .bench-stars .symbol-star { width:6px; height:6px; }
  .has-battle-layout .hand-description h3 { font-size:14px; }
  .has-battle-layout .duel-button { min-width:115px; }
}
@media(max-width:700px) and (max-height:760px) {
  .game-arena.has-battle-layout.has-combined-effects.phase-plan .duel-card { min-height:240px; }
  .game-arena.has-battle-layout .hand-card:not(.mulligan-card) { height:133px; }
}
/* Compact landscape windows keep the hand beside the formation. */
@media(min-width:701px) and (max-height:850px) {
  .game-arena.has-battle-layout .arena-topbar { min-height:44px; }
  .game-arena.has-battle-layout .arena-play-space { padding-top:6px; padding-bottom:6px; }
  .game-arena.has-battle-layout .enemy-zone { height:30px; min-height:30px; }
  .game-arena.has-battle-layout .arena-phase-announcement { min-height:24px; margin:0 0 4px; }
  .game-arena.has-battle-layout .battlefield { height:auto; min-height:0; gap:6px 18px; margin-bottom:6px; }
  .game-arena.has-battle-layout .field-brief .field-inspect { min-height:40px; padding:4px 9px; }
  .game-arena.has-battle-layout .field-thumbnail { width:28px; height:28px; }
  .game-arena.has-battle-layout.has-combined-effects.phase-plan .duel-stage { height:auto; min-height:269px; }
  .game-arena.has-battle-layout.has-combined-effects.phase-plan .duel-card { height:255px; width:180px; }
  .game-arena.has-battle-layout.phase-plan .duel-card-caption { padding:8px; }
  .game-arena.has-battle-layout.phase-plan .duel-card-caption h2 { min-height:0; font-size:16px; line-height:1.1; margin-bottom:4px; }
  .game-arena.has-battle-layout.phase-plan .combat-channel { padding:4px; }
  .game-arena.has-battle-layout.phase-plan .combat-channel-label { font-size:8px; }
  .game-arena.has-battle-layout.phase-plan .combat-channel-keywords { margin-top:2px; }
  .game-arena.has-battle-layout.phase-plan .combat-channel-keywords .keyword { font-size:9px; }
  .game-arena.has-battle-layout.phase-plan .duel-equipment { display:none; }
  .game-arena.has-battle-layout .hand-card { height:124px; width:112px; }
  .game-arena.has-battle-layout .hand-description { bottom:20px; left:6px; right:6px; }
  .game-arena.has-battle-layout .hand-description h3 { min-height:0; font-size:13px; }
  .game-arena.has-battle-layout .hand-description p { min-height:0; font-size:9px; }
  .game-arena.has-battle-layout .card-hand { min-height:0; padding-top:6px; }
  .game-arena.has-battle-layout .hand-zone>.zone-title { margin-bottom:0; }
  .game-arena.has-battle-layout .hand-info { min-height:24px; }
  .game-arena.has-battle-layout .own-roster .bench-card { height:75px; }
  .game-arena.has-battle-layout .arena-action-bar { min-height:58px; padding-block:7px; }
}

/* Browser chrome, the home indicator and the keyboard must not cover controls. */
@media(max-width:700px) {
  html { -webkit-text-size-adjust:100%; text-size-adjust:100%; scroll-padding-block:78px 96px; }
  .game-arena button, .game-arena summary { touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .game-arena.has-battle-layout .arena-brand { font-size:11px; letter-spacing:1.5px; padding-left:3px; }
  .game-arena.has-battle-layout .commander-name { flex:1; min-width:0; }
  .game-arena.has-battle-layout .commander-name>strong { overflow:hidden; text-overflow:ellipsis; }
  .game-arena.has-battle-layout .life-value { flex-shrink:0; }
  .game-arena.has-battle-layout .own-roster .bench-stars { top:4px; right:4px; }
  .game-arena.has-battle-layout .bench-race { top:4px; left:4px; }
  .game-arena.has-battle-layout .bench-check { bottom:auto; top:26px; right:3px; }
  .game-arena.has-battle-layout .hand-type { max-width:calc(100% - 36px); text-align:right; }
  .game-arena.has-battle-layout .hand-description h3 { text-wrap:balance; overflow-wrap:break-word; }
  .game-arena.has-battle-layout .duel-button { line-height:1.3; letter-spacing:.4px; white-space:normal; flex-shrink:0; }
  .game-arena.has-battle-layout.phase-reveal .action-plan>strong { white-space:normal; }
  .game-arena.has-battle-layout .stat-damage[data-damage-applies="false"] { opacity:.5; }
  .game-arena.has-battle-layout .duel-equipment .equipped-token { overflow:hidden; border-radius:6px; }
  .game-arena.has-battle-layout .duel-equipment .equipped-art { width:100%; height:100%; object-fit:cover; }
  .game-arena.has-battle-layout .opponent-scout .enemy-roster { max-width:calc(100vw - max(12px,env(safe-area-inset-left,0px)) - max(12px,env(safe-area-inset-right,0px))); }
  .game-arena.mulligan-screen { min-height:100svh; min-height:100dvh; padding-bottom:0; }
  .game-arena.mulligan-screen .mulligan-topbar { padding-top:env(safe-area-inset-top,0px); padding-left:max(12px,env(safe-area-inset-left,0px)); padding-right:max(12px,env(safe-area-inset-right,0px)); }
  .mulligan-content { padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)); }
  .mulligan-actions { padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)); padding-bottom:max(12px,env(safe-area-inset-bottom,0px)); }
  .game-header { padding-top:env(safe-area-inset-top,0px); padding-left:max(17px,env(safe-area-inset-left,0px)); padding-right:max(17px,env(safe-area-inset-right,0px)); }
  .game-main { padding-bottom:max(35px,env(safe-area-inset-bottom,0px)); }
  .game-settings { min-width:44px; min-height:44px; }
}
@media(max-width:700px), (pointer:coarse) and (max-height:500px) {
  .dialog-backdrop { top:var(--visible-viewport-top,0px); bottom:auto; height:var(--visible-viewport-height,100dvh); padding:max(12px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px)); align-items:flex-start; overflow-y:auto; overscroll-behavior:contain; }
  .dialog { margin-block:auto; min-height:0; max-height:calc(var(--visible-viewport-height,100dvh) - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px))); overscroll-behavior:contain; }
  .dialog>header { position:sticky; top:0; z-index:5; background:#142132; padding:12px 14px; }
  .dialog>header .icon-button { min-width:44px; min-height:44px; flex-shrink:0; }
  .dialog h2 { font-size:21px; line-height:1.2; text-wrap:balance; }
  :is(input:not([type="range"]):not([type="checkbox"]), select, textarea) { font-size:16px; }
}
@media(max-width:405px) {
  .game-arena.has-battle-layout .arena-brand { display:none; }
}
@media(hover:none), (pointer:coarse) {
  .game-arena .hand-card:not(.mulligan-card):hover:not(:disabled) { transform:rotate(0deg); }
  .game-arena .hand-card.selected:not(.mulligan-card):hover:not(:disabled) { transform:translateY(-5px); }
  .game-arena .bench-card:hover:not(:disabled) { transform:none; }
}
@media(pointer:coarse) and (orientation:landscape) and (max-height:500px) {
  .game-arena .arena-topbar, .game-arena .arena-action-bar, .game-arena .arena-play-space, .mulligan-content, .mulligan-actions { padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)); }
  .game-arena .arena-action-bar, .mulligan-actions { padding-bottom:max(8px,env(safe-area-inset-bottom,0px)); }
}
