@charset "UTF-8";
/* Layout da referência: recursos, dois exércitos e mão em uma arena inteira. */
body.playing-match{--game-header-height:32px;overflow:hidden}
.battle-topbar{height:32px;min-height:32px;align-items:center;padding:0 14px;gap:12px;background:#060d15;border-bottom:1px solid #695336;box-shadow:none}
.battle-brand{padding:0;border:0;background:transparent;font:600 15px Georgia,serif;letter-spacing:3px;color:#e9d6ad}
.battle-version{font:11px var(--font);color:#a1b2c2}
.battle-top-tools{display:flex;align-items:center;gap:7px;margin-left:auto}
.battle-top-tools .icon-btn{position:relative;width:29px;height:27px;font-size:20px;color:#9bb5c8}
.battle-top-tools .nav-icon{width:18px;height:18px}
.battle-effect-count{position:absolute;right:0;top:0;min-width:14px;height:14px;padding:1px 3px;border-radius:50%;background:#a4e5fa;color:#0a1824;font:700 9px var(--font)}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.clean-battle{
 --scene-height:calc(100dvh - 32px);
 --battle-unit-size:clamp(64px,calc(var(--scene-height)*.137),140px);
 --battle-domain-width:clamp(66px,calc(var(--scene-height)*.145),136px);
 --battle-domain-height:clamp(60px,calc(var(--scene-height)*.125),120px);
 --battle-hand-height:clamp(64px,calc(var(--scene-height)*.26 - 56px),202px);
 --battle-hand-width:calc(var(--battle-hand-height)*.82);
 --battle-hand-gap:clamp(6px,1vw,15px);
 --battle-portrait-size:calc(var(--battle-unit-size)*1.12);
 --battle-core-size:clamp(40px,4.35vw,72px);
 height:var(--scene-height);min-height:0;min-width:0;overflow:hidden;
}
.clean-battle .battle-body{position:relative;display:block;height:100%;min-height:0}
.clean-battle .battle-board{height:100%;width:100%;display:grid;grid-template-rows:21% 38% 15% 26%;position:relative;isolation:isolate;overflow:hidden;background:#111a24 url('/assets/images/battlefield-clean.png') center/100% 100% no-repeat}
.clean-battle .battle-board:before{box-shadow:inset 0 0 28px #03080d33;z-index:-1}
.clean-battle .opponent-row,.clean-battle .player-resources,.clean-battle .hand-row{display:grid;grid-template-columns:22% minmax(0,56%) 22%;gap:0;min-height:0;min-width:0;position:relative;padding:0;background:transparent;align-items:center}
.clean-battle .opponent-row{z-index:4;overflow:visible}
.clean-battle .opponent-row>.hero-profile{align-self:start;margin-top:10px}
.clean-battle .hero-profile{display:grid;grid-template-columns:var(--battle-portrait-size) minmax(0,1fr);grid-template-rows:var(--battle-portrait-size) auto;gap:8px 0;margin-left:clamp(10px,1.2vw,20px);min-width:0;position:relative}
.clean-battle .hero-avatar,.clean-battle .player-profile .hero-avatar{width:var(--battle-portrait-size);height:var(--battle-portrait-size);border:2px solid #bba16c;border-radius:0;background-color:#111a25;box-shadow:0 0 0 3px #070a0dbb,0 3px 10px #0008;overflow:visible}
.clean-battle .hero-avatar:after{inset:4px;border-radius:0;border-color:#c7af7666}
.clean-battle .hero-info{position:absolute;left:calc(var(--battle-portrait-size) + 12px);right:0;top:7px;padding:6px 7px;background:linear-gradient(90deg,#040b12d9,transparent);border-top:1px solid #ad895b66;border-bottom:1px solid #ad895b33}
.clean-battle .hero-info h3,.clean-battle .player-profile .hero-info h3{font:700 clamp(15px,1.55vw,26px)/1.15 var(--title);color:#f5f4f1;max-height:none;white-space:nowrap;text-shadow:0 2px 3px #000}
.clean-battle .core-badge,.clean-battle .core-badge.large-core{position:absolute;right:calc(var(--battle-core-size)*-.84);bottom:-2px;width:var(--battle-core-size);min-width:0;height:var(--battle-core-size);padding:0;border:2px solid #a3dcf5;clip-path:none;border-radius:50%;font:700 clamp(25px,2.9vw,47px)/1 var(--title);color:#f7fcff;background:radial-gradient(circle at 40% 30%,#135b91,#06213c 65%,#071725);text-shadow:0 2px 4px #000;box-shadow:0 0 0 3px #052037aa,inset 0 0 0 3px #0a6faf55,0 0 14px #21aef26b;font-variant-numeric:tabular-nums}
.clean-battle .core-badge.large-core{font-size:clamp(12px,calc((var(--battle-core-size) - 8px)/(var(--core-digits,4)*.65)),29px)}
.clean-battle .opponent .core-badge{border-color:#e5aa7b;background:radial-gradient(circle at 40% 30%,#8d251f,#390d14 65%,#180d12);box-shadow:0 0 0 3px #321519aa,inset 0 0 0 3px #d8492855,0 0 14px #f765416b}
.clean-battle .has-priority .hero-avatar{border-color:#d9bf87;box-shadow:0 0 0 3px #070a0dbb,0 0 12px #c5b06b55}
.clean-battle .hero-avatar.legal-core{outline:3px solid #99eaff;outline-offset:4px;box-shadow:0 0 24px #58d2ff}
.clean-battle .mana-row{grid-column:1/-1;display:flex;align-items:center;gap:clamp(7px,.85vw,14px);padding:3px 9px;background:linear-gradient(90deg,#040b12de,transparent);color:#aacfe3;font:700 clamp(12px,1.15vw,19px) var(--title);border-top:1px solid #b0925d44;min-width:0;white-space:nowrap;width:max-content;max-width:100%}
.clean-battle .mana-orbs{display:flex;gap:clamp(4px,.6vw,9px)}
.clean-battle .mana-orb{width:clamp(13px,1.65vw,27px);height:clamp(13px,1.65vw,27px);border:1px solid #8a98a3;border-radius:50%;background:radial-gradient(circle at 40% 30%,#1a222b,#060d14);box-shadow:0 0 0 2px #050a10,inset 0 0 4px #0008}
.clean-battle .mana-orb.available{border-color:#b5e2ff;background:radial-gradient(circle at 35% 25%,#b1e4ff,#3d9cde 50%,#20548d);box-shadow:0 0 0 2px #0b1b29,0 0 5px #5cbcf355}
.clean-battle .opponent .mana-orb.available{border-color:#c0dfbc;background:radial-gradient(circle at 35% 25%,#c8f2b3,#6eb668 50%,#376849)}
.clean-battle .mana-total{color:#c1dce9;font:10px var(--font)}
.clean-battle .domain-row{--domain-display-size:min(var(--battle-domain-width),calc(var(--scene-height)*.15 - 12px));display:flex;align-items:center;justify-content:safe center;gap:clamp(7px,.85vw,15px);min-width:0;height:100%;padding:4px 12px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#81653d66 transparent;overscroll-behavior:contain}
.clean-battle .enemy-domains{align-items:flex-end;padding-bottom:7px}
.clean-battle .domain-slot{display:grid;place-items:center;flex:0 0 auto;width:var(--domain-display-size);height:var(--domain-display-size)}
.clean-battle .domain-card{position:relative;width:var(--domain-display-size);height:min(var(--battle-domain-height),calc(var(--domain-display-size)*.862));padding:0;border:3px solid color-mix(in srgb,var(--faction) 40%,#17212a);border-radius:6px;background:#10181d;box-shadow:0 0 0 2px #020708,0 4px 7px #000b;overflow:hidden;transform:none;transition:transform .16s,border-color .16s}
.clean-battle .domain-art{position:absolute;inset:3px 3px 29%;background-color:#1c2b2c;background-repeat:no-repeat}
.clean-battle .domain-symbol{position:absolute;left:3px;right:3px;bottom:3px;height:27%;display:grid;place-items:center;background:color-mix(in srgb,var(--faction) 58%,#b7c2bd);color:#102a25;font:bold clamp(12px,calc(var(--battle-domain-height)*.26),30px)/1 var(--title);border-top:1px solid #0f1e20}
.clean-battle .faction-volkar .domain-symbol{color:#8b160e}
.clean-battle .faction-aetherion .domain-symbol{color:#0c4c77}
.clean-battle .faction-solaris .domain-symbol{color:#6c4d20}
.clean-battle .faction-umbra .domain-symbol{color:#4b265f}
.clean-battle .domain-card:hover{transform:translateY(-3px);border-color:var(--faction)}
.clean-battle .domain-card.used-domain{transform:rotate(90deg)}
.clean-battle .domain-card.used-domain:hover{transform:translateY(-3px) rotate(90deg)}
.clean-battle .used-domain .domain-art{filter:saturate(.65) brightness(.78)}
.clean-battle .battle-piles{display:flex;justify-content:flex-end;gap:clamp(9px,1.1vw,20px);padding:0 clamp(12px,1.5vw,25px) 0 0;min-width:0;position:relative;z-index:5}
.clean-battle .opponent-row .battle-piles{align-self:start;padding-top:10px}
.clean-battle .pile{display:grid;grid-template-rows:auto minmax(0,1fr) auto;align-items:center;justify-items:center;gap:3px;position:relative;flex:0 0 auto;width:clamp(61px,5.85vw,100px);height:clamp(72px,calc(var(--scene-height)*.14),134px);padding:7px 5px;border:1px solid #c5a567;border-radius:4px;background:linear-gradient(155deg,#0d1620ef,#040a11f2);box-shadow:0 0 0 3px #03080dbb,inset 0 0 0 4px #aa8a5422,0 4px 9px #0008;color:#f5f3ed}
.clean-battle .pile-label{font:700 clamp(10px,1vw,17px) var(--title);color:#f3f2eb}
.clean-battle .pile strong{font:700 clamp(18px,1.7vw,28px)/1 var(--title);color:#f9f8f2}
.clean-battle .deck-back{display:grid;place-items:center;width:auto;max-width:clamp(23px,2.6vw,43px);height:100%;max-height:60px;aspect-ratio:.69;font:clamp(15px,calc(var(--scene-height)*.028),24px) var(--title);color:#947746;background:linear-gradient(120deg,#30281f,#161b1e);border:1px solid #9e865e;outline:1px solid #705b3b;outline-offset:-4px;box-shadow:-3px 1px #1e231fcc,-4px 1px #aa905555}
.clean-battle .graveyard-icon{display:block;width:clamp(24px,2.55vw,42px);height:clamp(27px,2.8vw,47px);color:#7d8798}
.clean-battle .graveyard-icon svg{display:block;width:100%;height:100%}
.clean-battle .graveyard-pile:hover{border-color:#f3d69e;background:linear-gradient(155deg,#20262a,#060d15)}
.clean-battle .battlefield.open-battlefield{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:0;min-height:0;padding:0 20%;z-index:2}
.clean-battle .open-battlefield .open-field{display:flex;flex-wrap:nowrap;align-items:center;justify-content:safe center;gap:clamp(13px,1.65vw,28px);min-height:0;padding:12px 16px;overflow-x:auto;overflow-y:hidden;border:0;background:none;box-shadow:none;scrollbar-width:thin;scrollbar-color:#8e764955 transparent;overscroll-behavior:contain}
.clean-battle .open-battlefield .player-lane:before{display:none}
.clean-battle .open-battlefield .open-field.legal-zone{background:radial-gradient(ellipse,#71cfff17,transparent 70%);box-shadow:inset 0 0 0 1px #8ae4ff33;cursor:pointer}
.clean-battle .open-field .unit-slot{width:var(--battle-unit-size);max-width:none;flex:0 0 auto;position:relative;container-type:inline-size}
.clean-battle .unit-slot .unit-button{--unit-display-height:var(--battle-unit-size);display:block;width:100%;max-width:none;padding:0;background:none}
.clean-battle .unit-card-space{width:100%;height:var(--battle-unit-size)}
.clean-battle .unit-card-space .game-card.compact{--field-card-height:var(--battle-unit-size);width:var(--battle-unit-size);height:var(--battle-unit-size);border:3px solid color-mix(in srgb,var(--faction) 66%,#332b22);border-radius:6px;background:#101b22;box-shadow:0 0 0 2px #030709,0 5px 10px #000a}
.clean-battle .compact .card-art{inset:3px;background-repeat:no-repeat}
.clean-battle .compact .art-vignette,.clean-battle .compact .unit-name,.clean-battle .compact .card-stats,.clean-battle .compact .card-seal,.clean-battle .compact .enhancement-badge,.clean-battle .compact .exhausted-mark{display:none}
.clean-battle .compact.exhausted .card-art{filter:saturate(.7) brightness(.82)}
.clean-battle .field-stat-pair,.clean-battle .hand-stat-pair{position:absolute;right:3px;bottom:3px;z-index:6;min-width:36%;padding:1px 5px;border:2px solid #38291c;border-radius:4px;background:linear-gradient(#fff8e3,#dddfd0);color:#171814;font:700 clamp(14px,calc(var(--battle-unit-size)*.21),30px)/1 var(--title);font-variant-numeric:tabular-nums;white-space:nowrap;box-shadow:0 1px 3px #0009;pointer-events:none}
.clean-battle .field-stat-pair.wounded{color:#9c281b;border-color:#a6503a}
.clean-battle .unit-button.can-attack .game-card{box-shadow:0 0 0 2px #030709,0 5px 10px #000a;border-bottom-color:#b4daa7}
.clean-battle .unit-button.legal-target .game-card{outline:2px solid #98e7ff;outline-offset:2px;box-shadow:0 0 20px #4bc8ff88}
.clean-battle .unit-button.selected .game-card{border-color:#d4f4ff;box-shadow:0 0 19px #47cfff88}
.clean-battle .unit-button.declared-attack .game-card{border-color:#ffc393;box-shadow:0 0 0 1px #f98150,0 0 17px #f2694880}
.clean-battle .unit-button.declared-block .game-card{border-color:#a4e6ff;box-shadow:0 0 0 1px #66ccf6,0 0 17px #4bb7ed80}
.clean-battle .unit-status{display:none;font:10px var(--font);color:#d2e8ee;bottom:-15px;pointer-events:none}
.clean-battle .declared-attack .unit-status,.clean-battle .declared-block .unit-status{display:block}
.clean-battle .unit-details{position:absolute;top:5px;right:5px;bottom:auto;left:auto;width:22px;height:22px;display:grid;place-items:center;padding:0;border:1px solid #c0c9bc99;border-radius:50%;color:#e3f4fa;background:#07111be6;font:14px var(--font);opacity:0;z-index:8;transition:opacity .15s}
.clean-battle .unit-slot:hover .unit-details,.clean-battle .unit-slot:focus-within .unit-details{opacity:1}
.clean-battle .player-resources{z-index:4}
.clean-battle .player-resources .battle-piles{align-self:end;transform:translateY(20%)}
.clean-battle .hand-row{z-index:5;align-items:stretch}
.clean-battle .player-profile{display:block;padding:0;margin-top:calc(var(--battle-unit-size)*-.26);align-self:start;min-width:0}
.clean-battle .hand-area{--hand-count:5;container-type:inline-size;position:relative;display:grid;grid-template-rows:30px minmax(0,1fr);height:100%;min-height:0;min-width:0;padding:0 10px 5px;border:1px solid #86704488;border-radius:18px 18px 3px 3px;background:linear-gradient(180deg,#06121be6,#040b12ef);box-shadow:inset 0 0 0 5px #50718c0d,0 -3px 14px #03070bb0}
.clean-battle .hand-area:before{content:"";position:absolute;inset:5px;border:1px solid #47657844;border-radius:13px 13px 0 0;pointer-events:none}
.clean-battle .hand-heading{align-self:center;z-index:2;padding-left:18px;font:clamp(12px,1.1vw,18px) var(--title);color:#d4d9dc}
.clean-battle .hand-area:has(.hand-limit-alert){grid-template-rows:26px 25px minmax(0,1fr)}
.clean-battle .hand-limit-alert{padding:4px 6px;border:0;border-radius:3px;font-size:11px}
.clean-battle .hand-container{display:flex;align-items:flex-end;justify-content:safe center;gap:var(--battle-hand-gap);padding:10px 9px 9px;min-height:0;overflow-x:auto;overflow-y:hidden;perspective:none;scrollbar-width:thin;scrollbar-color:#806a4466 transparent}
.clean-battle .hand-card{--visible-card-width:min(var(--battle-hand-width),calc((100cqw - 42px - (var(--hand-count) - 1)*var(--battle-hand-gap))/var(--hand-count)));position:relative;flex:0 0 auto;transition:transform .15s;min-width:0}
.clean-battle .hand-card .game-card{--value-footer-height:0px;width:var(--visible-card-width);height:calc(var(--visible-card-width)/.82);max-height:calc(var(--battle-hand-height));transform:none;border:3px solid color-mix(in srgb,var(--faction) 64%,#473824);border-radius:6px;box-shadow:0 0 0 2px #02070a,0 4px 9px #0009;overflow:visible;background:#161d23;opacity:1}
.clean-battle .hand-card .card-art{inset:25px 4px 4px;background-repeat:no-repeat}
.clean-battle .hand-card .card-name{position:absolute;top:4px;left:4px;right:4px;padding:2px 5px;background:linear-gradient(#f5e6bd,#d4d2ba);border:1px solid #6a5940;border-radius:2px;color:#151b1b;font:700 clamp(8px,.76vw,13px)/1.2 var(--title);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:none;text-shadow:none}
.clean-battle .hand-card .card-paper,.clean-battle .hand-card .art-vignette,.clean-battle .hand-card .card-stats,.clean-battle .hand-card .card-seal{display:none}
.clean-battle .hand-card .cost-gem{position:absolute;left:auto;right:-6px;top:-9px;width:clamp(22px,1.9vw,33px);height:clamp(22px,1.9vw,33px);display:grid;place-items:center;border:2px solid #726248;border-radius:50%;clip-path:none;padding:0;background:linear-gradient(#e3e9e6,#b5c7d0);box-shadow:0 1px 3px #0009;font:700 clamp(16px,1.55vw,27px)/1 var(--title);color:#10191e;text-shadow:none;z-index:8}
.clean-battle .hand-card .cost-gem .badge-number{font-size:inherit;color:inherit;text-shadow:none}
.clean-battle .hand-card .hand-stat-pair{right:4px;bottom:4px;font-size:clamp(13px,1.2vw,20px);min-width:0}
.clean-battle .hand-card.unplayable .card-art{filter:saturate(.88) brightness(.88)}
.clean-battle .hand-card .game-card.playable{border-color:color-mix(in srgb,var(--faction) 76%,#433728);box-shadow:0 0 0 2px #02070a,0 4px 9px #0009}
.clean-battle .hand-card:hover{transform:translateY(-6px)}
.clean-battle .hand-card:hover .game-card{transform:none;border-color:#d5e9de}
.clean-battle .hand-card.selected .game-card{transform:none;outline:2px solid #b9f0ff;outline-offset:2px;box-shadow:0 0 20px #4bd6ff88}.clean-battle .hand-card[aria-pressed="true"]::after{content:attr(data-bottom-order);position:absolute;left:50%;top:-10px;transform:translateX(-50%);z-index:15;width:22px;height:22px;display:grid;place-items:center;border:1px solid #d4f4ff;border-radius:50%;background:#083451;color:#fff;font:700 12px var(--title);box-shadow:0 1px 5px #000b;pointer-events:none}
.clean-battle .hand-placeholder{font:clamp(12px,1.1vw,17px) var(--title);color:#a3bac7}
.clean-battle .turn-area{display:flex;align-items:center;justify-content:center;padding:0 clamp(12px,1.7vw,30px);border:0;min-width:0}
.clean-battle .end-turn{width:100%;height:clamp(41px,calc(var(--scene-height)*.078),77px);padding:0 8px;border:2px solid #78dbff;border-radius:10px;clip-path:none;font:700 clamp(14px,1.6vw,28px) var(--title);white-space:normal;color:#edfaff;background:radial-gradient(ellipse at center,#10527be6,#06253b 70%);box-shadow:inset 0 0 0 3px #1987c9,inset 0 0 15px #25aaff80,0 0 0 5px #09263c,0 0 14px #30bdff77;filter:none;text-shadow:0 2px 3px #001323;transition:background .15s,box-shadow .15s}
.clean-battle .end-turn:hover:not(:disabled){background:radial-gradient(ellipse,#2074a2,#08314b);box-shadow:inset 0 0 0 3px #46bdff,inset 0 0 18px #59cfff99,0 0 0 5px #09263c,0 0 20px #30bdff99}
.clean-battle .end-turn:disabled{opacity:.55}
.clean-battle .end-turn.decline-action{height:clamp(54px,calc(var(--scene-height)*.09),84px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px 8px;white-space:normal}
.clean-battle .end-turn.decline-action>span{font:700 clamp(13px,1.3vw,20px)/1.05 var(--title);white-space:nowrap}
.clean-battle .end-turn.decline-action>small{color:#bfeaff;font:500 clamp(9px,.7vw,11px)/1.2 var(--font);letter-spacing:.02em;text-shadow:0 1px 2px #001323}
.clean-battle .end-turn.decline-action:hover>small{color:#edfbff}
.clean-battle .end-turn.decline-action:focus-visible{outline:2px solid #e9faff;outline-offset:4px}
.clean-battle .battle-divider{position:absolute;top:40%;left:0;right:0;height:1px;background:linear-gradient(90deg,#b28346aa,#e0ad6855,#b28346aa);pointer-events:none;z-index:3}
.clean-battle .battle-divider>span{position:absolute;left:50%;top:0;transform:translate(-50%,-50%);font-size:clamp(26px,3vw,48px);color:#c69551;text-shadow:0 2px 3px #000;opacity:.6}
.clean-battle .battle-turn{position:absolute;right:0;top:40%;transform:translateY(-50%);display:flex;align-items:center;gap:clamp(12px,1.3vw,22px);width:clamp(186px,17.1vw,294px);height:clamp(49px,calc(var(--scene-height)*.081),78px);padding:8px 13px 8px 24px;border:1px solid #b99556;border-right:0;border-radius:0;clip-path:polygon(7% 0,100% 0,100% 100%,7% 100%,0 50%);background:linear-gradient(110deg,#07131eef,#020b13f5);color:#acd9f2;box-shadow:none;z-index:8;letter-spacing:0;font-family:var(--title)}
.clean-battle .battle-turn strong{display:block;font:700 clamp(12px,1.1vw,19px)/1.25 var(--title);color:#afdafa}
.clean-battle .current-phase{display:block;margin-top:5px;font:clamp(11px,1vw,17px)/1.2 var(--title);color:#9fc6df}
.clean-battle .battle-turn .turn-beacon{width:clamp(27px,3vw,48px);height:clamp(27px,3vw,48px);border:2px solid #87ddff;border-radius:50%;flex:0 0 auto;background:radial-gradient(circle,#092a47 45%,#0a547e 75%,#70daff);box-shadow:0 0 0 3px #1074b566,inset 0 0 9px #46bcff99,0 0 15px #22afffb3;animation:none}
.clean-battle .finished .turn-beacon{border-color:#dabb86;box-shadow:0 0 0 3px #76532166,inset 0 0 8px #d2b87777,0 0 12px #d2b87788;background:radial-gradient(circle,#29271a,#71592a)}
.clean-battle .battle-active-effect{position:absolute;right:14px;top:calc(40% + 48px);width:clamp(170px,17vw,280px);padding:10px 13px;border:1px solid #58798e;border-radius:5px;background:#071722ef;color:#d8ecf5;font:12px/1.35 var(--font);z-index:9;text-align:left;box-shadow:0 5px 14px #0008}
.clean-battle .battle-active-effect small{display:block;margin-top:5px;color:#99cce0;font-size:10px}
.clean-battle .battle-context{position:absolute;right:12px;top:calc(40% + 44px);width:clamp(240px,22vw,360px);max-height:30%;overflow-y:auto;border:1px solid #4389a6;border-left:3px solid #71d4ee;border-radius:6px;background:#132b3bed;box-shadow:0 5px 19px #0008;z-index:12;scrollbar-width:thin}
.clean-battle .battle-context .priority-bar{margin:0;border:0;padding:9px 10px;border-radius:0;background:none;display:flex;align-items:center;gap:10px}
.clean-battle .battle-context .priority-copy{flex:1;min-width:0}
.clean-battle .battle-context .priority-title{font-size:12px;color:#c4f0ff}
.clean-battle .battle-context .priority-bar p{margin-top:5px;font-size:11px;line-height:1.45;color:#bde3f7}
.clean-battle .battle-context .priority-bar>button{padding:8px 10px;font-size:11px}
.clean-battle .battle-context .cancel-attack{font-size:11px;padding:6px;margin:0 8px 8px;width:calc(100% - 16px)}
.clean-battle .battle-context .cancel-attack small{display:none}
.clean-battle .battle-context .raid-panel{margin-top:9px}
.clean-battle .battle-context .raid-row{gap:7px}
.clean-battle .battle-context .raid-pick{white-space:normal;text-align:left;font-size:11px}
.clean-battle .battle-context .raid-btns,.clean-battle .priority-selection{display:flex;flex-wrap:wrap;gap:6px}
.clean-battle .priority-selection{padding:0 10px 10px}
.clean-battle .priority-selection button{font-size:11px;padding:6px 8px}
.clean-battle .battle-context-effect{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:7px 10px;border:0;border-top:1px solid #4389a655;background:#0a1c2955;color:#cee8f3;font:11px/1.4 var(--font);text-align:left}
.clean-battle .battle-context-effect span{flex-shrink:0;font-size:10px;color:#99ccdf}
.clean-battle .battle-context-effect:hover{background:#24638155}
.clean-battle .battle-panel{position:absolute;right:12px;top:12px;bottom:12px;z-index:18;width:min(355px,calc(100% - 24px));display:flex;flex-direction:column;overflow-y:auto;border:1px solid #9c8054;border-radius:8px;box-shadow:0 10px 35px #000b;background:linear-gradient(150deg,#14283a,#060f18 80%);scrollbar-width:thin}
.clean-battle .battle-panel[hidden]{display:none!important}
.clean-battle .battle-panel-heading{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;gap:10px;border-bottom:1px solid #5c5849;flex-shrink:0}
.clean-battle .battle-panel-heading h2{font:18px var(--title);color:#e5d5b7;outline:none}
.clean-battle .battle-panel-heading .icon-btn{flex:0 0 auto}
.clean-battle .battle-panel .stack-content{flex:1;max-height:42%;min-height:105px}
.clean-battle .battle-panel .stack-content.is-empty{max-height:120px;min-height:90px;flex:0 0 auto}
.clean-battle .battle-panel .priority-bar{flex:0 0 auto;margin:8px 10px}
.clean-battle .battle-panel .side-modes{margin-top:auto;flex:0 0 auto}
.clean-battle .battle-panel .coach-panel{flex:1;min-height:160px}
@media(max-height:650px){
 .clean-battle .hero-profile{gap:5px 0;margin-left:10px}
 .clean-battle .opponent-row>.hero-profile{margin-top:7px}
 .clean-battle .hero-info{top:3px;left:calc(var(--battle-portrait-size) + 8px);padding:4px}
 .clean-battle .mana-row{padding:2px 5px;font-size:12px;gap:7px}
 .clean-battle .mana-orb{width:16px;height:16px}
 .clean-battle .mana-orbs{gap:5px}
 .clean-battle .hand-area{grid-template-rows:24px minmax(0,1fr);padding-bottom:2px}
 .clean-battle .hand-area:has(.hand-limit-alert){grid-template-rows:21px 21px minmax(0,1fr)}
 .clean-battle .hand-container{padding-top:9px;padding-bottom:6px}
 .clean-battle .pile{padding:5px}
 .clean-battle .battle-turn .current-phase{margin-top:3px}
 .clean-battle .battle-context{max-height:34%}
}
@media(max-width:1000px){
 .clean-battle .opponent-row,.clean-battle .player-resources,.clean-battle .hand-row{grid-template-columns:21% minmax(0,58%) 21%}
 .clean-battle .hero-info{left:calc(var(--battle-portrait-size) + 5px)}
 .clean-battle .hero-info h3,.clean-battle .player-profile .hero-info h3{font-size:14px}
 .clean-battle .battle-piles{gap:7px;padding-right:9px}
 .clean-battle .pile{width:clamp(46px,6.1vw,65px)}
 .clean-battle .pile-label{font-size:10px}
 .clean-battle .battle-turn{width:180px;padding-left:20px;gap:10px}
 .clean-battle .battle-turn strong{font-size:12px}
 .clean-battle .current-phase{font-size:11px}
 .clean-battle .end-turn{font-size:15px}
 .clean-battle .turn-area{padding:0 13px}
 .clean-battle .battlefield.open-battlefield{padding:0 18%}
 .clean-battle .mana-row{gap:5px;padding-left:2px}
 .clean-battle .mana-orbs{gap:4px}
 .clean-battle .mana-orb{width:14px;height:14px}
}
@media(max-width:650px){
 body.playing-match{overflow:auto}
 .clean-battle{min-width:640px}
 .battle-topbar{min-width:640px}
 .clean-battle .hero-info{left:calc(var(--battle-portrait-size) + 3px)}
 .clean-battle .hero-info h3,.clean-battle .player-profile .hero-info h3{font-size:12px}
 .clean-battle .mana-row{font-size:10px}
 .clean-battle .mana-orb{width:11px;height:11px}
 .clean-battle .mana-orbs{gap:3px}
 .clean-battle .battle-turn{width:158px;gap:8px;padding:6px 9px 6px 17px}
 .clean-battle .battle-turn strong{font-size:11px}
 .clean-battle .current-phase{font-size:10px}
 .clean-battle .field-stat-pair{font-size:14px}
 .clean-battle .end-turn{font-size:13px}
}
.reduced-motion .clean-battle *{transition:none!important}
@media(prefers-reduced-motion:reduce){.clean-battle *{transition:none!important}}

.clean-battle .blood-row{margin-top:3px;color:#f0a9c2;font:700 clamp(11px,1vw,15px) var(--title);text-shadow:0 1px 3px #000}

/* Reutiliza o retrato, os emblemas e a moldura da referência do jogo. */
.clean-battle{--battle-profile-height:clamp(150px,calc(var(--scene-height)*.33),275px);--battle-profile-width:calc(var(--battle-profile-height)*1.190635);--battle-hand-height:clamp(128px,calc(var(--scene-height)*.315),249px);--battle-hand-width:calc(var(--battle-hand-height)*.684685);--battle-hand-gap:clamp(3px,.4vw,7px)}
.clean-battle .battle-board{grid-template-rows:21% 36% 9% 34%}
.clean-battle .opponent-row,.clean-battle .player-resources{grid-template-columns:var(--battle-profile-width) minmax(0,1fr) 22%}
.clean-battle .hand-row{grid-template-columns:var(--battle-profile-width) minmax(0,1fr) 22%;align-items:end;isolation:isolate}
.clean-battle .hand-row:before{content:"";position:absolute;inset:-9% 0 0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#10213200,#07142322),url('/assets/images/battlefield.png') center bottom/100% 225% no-repeat;mask-image:linear-gradient(transparent,#000 15%)}
.clean-battle .hero-profile{display:block;position:relative;width:var(--battle-profile-width);height:var(--battle-profile-height);margin:0;min-width:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;container-type:inline-size;z-index:5}
.clean-battle .player-profile{align-self:end;margin:0;padding:0}
.clean-battle .hero-avatar,.clean-battle .player-profile .hero-avatar{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
.clean-battle .hero-avatar:after{display:none}
.clean-battle .has-priority .hero-avatar{border:0;box-shadow:none}
.clean-battle .hero-reference{display:block;width:100%;height:100%;overflow:hidden;pointer-events:none}
.clean-battle .hero-avatar.legal-core{outline:0;filter:drop-shadow(0 0 5px #7ce3ff) drop-shadow(0 0 9px #45bdfb)}
.clean-battle .hero-avatar:focus-visible{outline:0;filter:drop-shadow(0 0 5px #7ce3ff)}
.clean-battle .hero-info{background:none;border:0;padding:0}
.clean-battle .core-badge,.clean-battle .core-badge.large-core{position:absolute;left:23.8764%;top:52.5084%;right:auto;bottom:auto;display:block;width:21.3483%;height:26.7559%;padding:0;transform:none;border:0;border-radius:0;clip-path:none;background:none;box-shadow:none;filter:none;z-index:6;pointer-events:none}
.clean-battle .core-badge .hero-life-frame{display:block;position:absolute;inset:0;width:100%;height:100%}
.clean-battle .core-number{position:absolute;left:13%;right:13%;top:16%;height:58%;display:grid;place-items:center;color:#fffaf0;font:700 9.55cqw/1 Georgia,serif;letter-spacing:-.035em;text-shadow:0 2px 2px #000,0 0 2px #000;font-variant-numeric:lining-nums tabular-nums}
.clean-battle .large-core .core-number{font-size:calc(15.2cqw/var(--core-digits,3))}
.clean-battle .hero-emblems{position:absolute;left:46.5%;top:47.1%;width:35.1%;height:13.4%;display:flex;gap:2.5%;z-index:6}
.clean-battle .hero-emblems>span{display:block;flex:1;min-width:0;border-radius:50%}
.clean-battle .hero-essence-total{position:absolute;left:70.8%;top:64.8%;width:12.6%;height:7.4%;display:grid;place-items:center;background:linear-gradient(110deg,#07131ceb,#06131ef7);color:#7995af;font:4cqw/1 Georgia,serif;white-space:nowrap;z-index:6}
.clean-battle .mana-row{position:absolute;left:37.36%;top:72.24%;right:auto;bottom:auto;width:58.99%;height:11.37%;display:block;padding:0;border:0;border-radius:0;background:linear-gradient(90deg,#050d17f7,#04121cf2);box-shadow:none;z-index:6}
.clean-battle .mana-orbs{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%;gap:0}
.clean-battle .mana-orb,.clean-battle .mana-orb.available,.clean-battle .opponent .mana-orb.available{width:11.9%;height:100%;flex:0 1 auto;border:0;border-radius:0;clip-path:none;background:none;box-shadow:none;filter:none}
.clean-battle .mana-orb svg{display:block;width:100%;height:100%}
.clean-battle .opponent-row>.hero-profile{align-self:start;margin:6px 0 0}
.clean-battle .hero-profile.opponent{height:calc(var(--battle-profile-width)*.488764)}
.clean-battle .opponent .core-badge{left:22.4719%;top:46.5517%;width:21.3483%;height:45.977%;border:0;background:none;box-shadow:none}
.clean-battle .opponent .hero-emblems{left:44.5%;top:46%;width:32%;height:23%}
.clean-battle .opponent .mana-row,.clean-battle .opponent .hero-essence-total{display:none}

/* Cartas alinhadas sobre a arena, com arte e moldura do modelo original. */
.clean-battle .hand-area{container-type:inline-size;display:block;align-self:end;height:100%;padding:0 4px 9px;min-width:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
.clean-battle .hand-area:before{display:none}
.clean-battle .hand-heading{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0}
.clean-battle .hand-area:has(.hand-limit-alert){display:flex;flex-direction:column;grid-template-rows:none}
.clean-battle .hand-limit-alert{position:absolute;left:0;right:0;top:0;z-index:12;background:#381516ef;border:1px solid #b1754e}
.clean-battle .hand-container{display:flex;align-items:flex-end;justify-content:safe flex-start;gap:var(--battle-hand-gap);width:100%;height:100%;padding:10px 7px;overflow-x:auto;overflow-y:hidden;perspective:1000px;scrollbar-width:thin}
.clean-battle .hand-card{--visible-card-width:min(var(--battle-hand-width),calc((100cqw - 24px - (var(--hand-count) - 1)*var(--battle-hand-gap))/var(--hand-count)));display:block;flex:0 0 auto;position:relative;padding:0;border:0;background:none;min-width:0;transform-origin:center bottom;transform:rotate(var(--hand-tilt,0deg));transition:transform .16s}
.clean-battle .hand-card:nth-child(6n+1){--hand-tilt:-3deg}
.clean-battle .hand-card:nth-child(6n+2){--hand-tilt:-1.5deg}
.clean-battle .hand-card:nth-child(6n+3){--hand-tilt:0deg}
.clean-battle .hand-card:nth-child(6n+4){--hand-tilt:1.25deg}
.clean-battle .hand-card:nth-child(6n+5){--hand-tilt:2.5deg}
.clean-battle .hand-card:nth-child(6n){--hand-tilt:4deg}
.clean-battle .hand-card .game-card{--value-footer-height:0px;position:relative;width:var(--visible-card-width);height:calc(var(--visible-card-width)/.684685);max-height:none;border:2px solid #806440;border-radius:5px;background:linear-gradient(120deg,#6d5333,#0c1217 20%,#172028 80%,#9e784b);box-shadow:0 0 0 1px #03080c,0 3px 6px #000c;transform:none;opacity:1;overflow:visible;container-type:inline-size}
.clean-battle .hand-card .game-card:before,.clean-battle .hand-card .game-card:after{display:none}
.clean-battle .hand-card .card-art{inset:12.5% 4% 45%;z-index:0;border-radius:1px;background-repeat:no-repeat}
.clean-battle .hand-card .art-vignette{display:block;inset:3% 4% 43.5%;box-shadow:inset 0 -4px 7px #0006;z-index:1}
.clean-battle .hand-card .card-name{position:absolute;left:18%;right:4%;top:2%;height:9%;display:grid;place-items:center;padding:0 2%;border:1px solid #9b7b47aa;border-radius:2px;background:linear-gradient(#11212cf2,#040c13f5);color:#fff5dd;font:700 clamp(5px,7.6cqw,11px)/1.1 Georgia,serif;white-space:normal;overflow:hidden;text-overflow:clip;text-align:center;text-shadow:0 1px 2px #000;z-index:3}
.clean-battle .hand-card .card-paper{display:block;position:absolute;left:4%;right:4%;top:55.5%;bottom:3.4%;height:auto;margin:0;border:1px solid #958f7e;border-radius:0 0 2px 2px;background:linear-gradient(110deg,#ede9dd,#d5d4ca);color:#151a1b;z-index:2;overflow:hidden}
.clean-battle .hand-card .card-type{position:relative;padding:2% 4%;min-height:15%;border:0;border-bottom:1px solid #aaa28b;background:linear-gradient(#f4efdf,#d3d0c2);color:#1b211e;font:700 clamp(5px,6.7cqw,9px)/1.05 Georgia,serif;text-align:center;text-shadow:none}
.clean-battle .hand-card .card-type>span{display:none}
.clean-battle .hand-card .card-rules{padding:5% 6%;height:80%;overflow:hidden;color:#151a1b;font:clamp(4px,6.5cqw,9px)/1.17 'Arial Narrow',Arial,sans-serif;letter-spacing:-.015em}
.clean-battle .hand-card .card-rules b{font-size:inherit;font-weight:600}
.clean-battle .hand-card .card-rarity{display:none}
.clean-battle .hand-card .cost-gem{position:absolute;left:-8%;right:auto;top:-6%;width:30%;height:21%;padding:3% 1% 4%;border:0;border-radius:0;clip-path:none;background-color:transparent;background-image:url('/assets/images/ui/value-cost.svg?v=2.0.322');background-size:100% 100%;box-shadow:none;color:#f4fcff;font:700 clamp(11px,22cqw,29px)/1 Georgia,serif;text-shadow:0 1px 2px #001827;filter:drop-shadow(0 1px 2px #000);z-index:7}
.clean-battle .hand-card .cost-gem .badge-number{color:inherit;font-size:inherit;text-shadow:inherit}
.clean-battle .hand-card .card-stats{position:absolute;left:-7%;right:-7%;bottom:-5.5%;height:18%;display:flex;justify-content:space-between;align-items:center;z-index:7}
.clean-battle .hand-card .card-stats .stat{position:relative;display:grid;place-items:center;width:27%;height:100%;padding:0 2% 6%;border:1px solid #c7a466;border-radius:50%;clip-path:none;background:radial-gradient(ellipse at 35% 22%,#8a713d,#332916 45%,#090e10 75%);box-shadow:0 0 0 1px #070b0e,inset 0 0 0 2px #1b1a14,inset 0 0 0 3px #b9965899;color:#fff9e6;font:700 clamp(11px,22cqw,29px)/1 Georgia,serif;filter:drop-shadow(0 1px 2px #000);text-shadow:0 1px 2px #000}
.clean-battle .hand-card .card-stats .defense{background:radial-gradient(ellipse at 35% 20%,#ae5654,#661923 50%,#230810 80%);box-shadow:0 0 0 1px #070b0e,inset 0 0 0 2px #31161b,inset 0 0 0 3px #b9965899}
.clean-battle .hand-card .faction-seal,.clean-battle .hand-card .card-seal,.clean-battle .hand-card .frame-corner,.clean-battle .hand-card .hand-stat-pair{display:none}
.clean-battle .hand-card.unplayable .card-art{filter:none}
.clean-battle .hand-card .game-card.playable{border-color:#a9d8e7;box-shadow:0 0 0 1px #04111c,0 0 7px #26bbf788,0 3px 6px #000c}
.clean-battle .hand-card:hover{transform:translateY(-9px) rotate(0deg);z-index:10}
.clean-battle .hand-card:hover .game-card{border-color:#e8cf98;transform:none}
.clean-battle .hand-card.selected .game-card{transform:none;outline:2px solid #b2edff;outline-offset:1px;box-shadow:0 0 13px #38c9ff}
.clean-battle .hand-card.discardable .game-card{outline:2px solid #ff9765}
.clean-battle .turn-area{align-self:end;padding-bottom:20px}
.clean-battle .player-resources .battle-piles{transform:none}
.clean-battle .domain-row{--domain-display-size:min(var(--battle-domain-width),calc(var(--scene-height)*.09 - 7px))}
.clean-battle .compact .card-stats{display:flex;left:-5px;right:-5px;bottom:-7px;height:30%;align-items:end;z-index:6}
.clean-battle .compact .card-stats .stat{width:30%;height:100%;font-size:clamp(12px,calc(var(--battle-unit-size)*.22),26px);padding:14% 0 0}
.clean-battle .compact .card-stats .faction-seal{display:grid;width:25%;height:85%;font-size:clamp(9px,calc(var(--battle-unit-size)*.15),20px);transform:translateY(3px)}
.clean-battle .field-stat-pair{display:none}
@media(max-width:1000px){
 .clean-battle{--battle-profile-height:clamp(136px,calc(var(--scene-height)*.33),230px)}
 .clean-battle .hand-row{grid-template-columns:var(--battle-profile-width) minmax(0,1fr) 19%}
 .clean-battle .hand-container{padding-left:5px;padding-right:5px}
}
@media(max-width:650px){
 .clean-battle{--battle-profile-height:136px;--battle-hand-height:132px}
 .clean-battle .hand-row{grid-template-columns:162px minmax(0,1fr) 18%}
}

.clean-battle .mana-orb{width:11.9%;height:80%;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);border:1px solid #8195a1;background:linear-gradient(145deg,#303c45,#08131d 70%);box-shadow:0 0 0 1px #03080c}
.clean-battle .mana-orb.available,.clean-battle .opponent .mana-orb.available{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);border:1px solid #d8f4ff;background:linear-gradient(145deg,#d9fbff,#42b9ef 48%,#095293);box-shadow:0 0 0 1px #071321,0 0 5px #32b8ffb3}
.clean-battle .mana-orb svg{display:none}
/* Unidades maiores para a arte e os valores ficarem legíveis no campo. */
.clean-battle{--battle-unit-size:clamp(68px,calc(var(--scene-height)*.18),140px)}
.clean-battle .battle-board{grid-template-rows:21% 39% 8% 32%}
.clean-battle .open-battlefield{grid-template-rows:repeat(2,minmax(0,1fr))}
.clean-battle .open-battlefield .open-field{padding:0 14px;overflow-y:visible}
.clean-battle .unit-card-space{height:var(--battle-unit-size)}
.clean-battle .unit-card-space .game-card.compact{width:var(--battle-unit-size);height:var(--battle-unit-size)}
.clean-battle .player-profile{transform:scale(.94);transform-origin:left bottom}
@media(max-height:650px){
 .clean-battle{--battle-unit-size:clamp(66px,calc(var(--scene-height)*.18),114px)}
 .clean-battle .battle-board{grid-template-rows:20% 42% 6% 32%}
}

/* Composição em três faixas, com a mão e os montes sempre dentro da mesa. */
.clean-battle{--battle-unit-size:clamp(62px,calc(var(--scene-height)*.15),110px)}
.clean-battle .battle-board{grid-template-rows:19% 36% 13% 32%}
.clean-battle .battlefield.open-battlefield{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));padding:0 1.5%}
.clean-battle .open-battlefield .open-field{display:grid;grid-template-columns:repeat(var(--field-zone-count,3),minmax(0,1fr));gap:0;padding:0 4px;overflow-x:hidden;overflow-y:hidden}
.clean-battle .battle-zone{position:relative;display:flex;align-items:center;justify-content:center;gap:clamp(5px,.7vw,12px);min-width:0;padding:0 3px;overflow-x:auto;overflow-y:visible;scrollbar-width:none;overscroll-behavior:contain}
.clean-battle .battle-zone::-webkit-scrollbar{display:none}
.clean-battle .battle-zone:not(:last-child)::after{content:"";position:absolute;top:14%;right:0;bottom:14%;width:1px;background:linear-gradient(transparent,#c49b5a66 20%,#f0d39488 50%,#c49b5a66 80%,transparent);pointer-events:none}
.clean-battle .open-field .unit-slot{width:calc(var(--battle-unit-size)*.8);max-width:none;flex:0 0 auto}
.clean-battle .unit-card-space{width:100%;height:var(--battle-unit-size)}
.clean-battle .unit-card-space .game-card.compact{width:100%;height:var(--battle-unit-size)}
.clean-battle .player-resources>div:first-child{display:none}
.clean-battle .player-resources .domain-row{grid-column:2}
.clean-battle .player-resources .battle-piles{grid-column:1;align-self:end;justify-content:flex-start;transform:none;padding:0 0 0 clamp(10px,1.2vw,18px)}
.clean-battle .battle-context{top:55%;right:0;width:clamp(180px,22vw,300px);max-height:15%;z-index:12}
.clean-battle .battle-turn{top:auto;right:0;bottom:calc(13% + 12px);transform:none}
.clean-battle .battle-context .priority-bar{padding:7px 9px}
.clean-battle .battle-context .priority-bar p{font-size:10px;line-height:1.3}
@media(max-height:450px){
 .clean-battle{--battle-unit-size:clamp(50px,calc(var(--scene-height)*.14),68px);--battle-hand-height:clamp(86px,calc(var(--scene-height)*.245),110px);--battle-hand-width:calc(var(--battle-hand-height)*.684685)}
 .clean-battle .battle-board{grid-template-rows:18% 37% 10% 35%}
 .clean-battle .player-profile{transform:scale(.78);transform-origin:left bottom}
}
.clean-battle .player-resources{grid-template-rows:minmax(0,1fr)}
.clean-battle .player-resources .domain-row,.clean-battle .player-resources .battle-piles{grid-row:1}
.clean-battle .hand-container{overflow:visible}
.clean-battle{--battle-unit-size:clamp(60px,calc(var(--scene-height)*.145),102px)}
.clean-battle .open-battlefield .open-field.player-lane{box-sizing:border-box;padding:17px 4px 0}
.clean-battle .compact .card-stats{left:2px;right:2px;bottom:4px;height:28%;align-items:flex-end;z-index:7;padding:1px 2px 0;box-sizing:border-box;border-radius:0 0 3px 3px;background:linear-gradient(180deg,transparent,#07101bdc 58%)}
.clean-battle .compact .card-stats .stat{font-size:clamp(13px,calc(var(--battle-unit-size)*.22),26px);padding:0 0 1px}
.clean-battle .compact .card-stats .faction-seal{transform:none}
/* HUD do oponente usa os mesmos marcadores e alinhamento inferior do HUD do jogador. */
.clean-battle .opponent .mana-row,.clean-battle .opponent .hero-essence-total{display:block}
.clean-battle .opponent-row .battle-piles{align-self:end;padding-top:0;padding-bottom:0;transform:translateY(-16px)}
/* Os dois lados compartilham a mesma coluna de Deck e Cemitério. */
.clean-battle .player-resources .battle-piles{grid-column:3;justify-content:flex-end;padding:0 clamp(12px,1.5vw,25px) 0 0;transform:translateY(-16px)}
.clean-battle .opponent-row{grid-template-rows:minmax(0,1fr)}
/* O aviso de prioridade fica logo acima do indicador de turno. */
.clean-battle .battle-context{left:auto;right:0;top:auto;bottom:calc(13% + 12px + clamp(49px,calc(var(--scene-height)*.081),78px) + 4px);transform:none}
.clean-battle .battle-context .priority-bar{min-height:0;padding:6px 9px;gap:8px}
.clean-battle .battle-context .priority-title{font-size:11px;line-height:1.1}
.clean-battle .battle-context .priority-bar p{margin-top:3px;font-size:10px;line-height:1.2}
.clean-battle .battle-context.expanded-context{left:auto;right:8px;top:auto;bottom:calc(13% + 12px + clamp(49px,calc(var(--scene-height)*.081),78px) + 8px);transform:none;width:min(clamp(280px,24vw,360px),calc(100% - 16px));max-height:min(38%,240px);z-index:20}
.clean-battle .battle-context.expanded-context .priority-bar{padding:9px 11px;gap:9px}
.clean-battle .battle-context.expanded-context .priority-title{font-size:12px;line-height:1.15}
.clean-battle .battle-context.expanded-context .priority-bar p{margin-top:4px;font-size:11px;line-height:1.35}
/* Pilhas ficam junto ao avatar de cada lado da mesa. */
.clean-battle .opponent-row>.battle-piles{position:absolute;left:6px;top:calc(10px + var(--battle-portrait-size) + clamp(26px,3.5vh,38px));align-self:auto;justify-content:flex-start;gap:6px;padding:0;transform:none;z-index:6}
.clean-battle .player-resources .battle-piles{grid-column:1;grid-row:1;align-self:end;justify-content:flex-start;padding:0 0 0 clamp(10px,1.2vw,18px);transform:none}
@media(max-width:650px){
 .clean-battle .opponent-row>.battle-piles{left:10px;gap:6px}
 .clean-battle .player-resources .battle-piles{padding-left:10px;gap:6px}
}/* Reserva a coluna dos montes para que as unidades nunca fiquem sob Deck ou Cemitério. */
.clean-battle .battlefield.open-battlefield{padding-left:clamp(154px,14vw,200px);padding-right:1.5%}
/* Deck e Cemitério: HUD translúcido com acentos próprios para cada jogador. */
.clean-battle .battle-piles{gap:clamp(6px,.6vw,9px)}
.clean-battle .opponent-row>.battle-piles .pile{--pile-accent:#e69a7d}
.clean-battle .player-resources .battle-piles .pile{--pile-accent:#65c7ee}
.clean-battle .pile{width:clamp(64px,5.6vw,90px);height:clamp(70px,calc(var(--scene-height)*.13),104px);gap:3px;padding:7px 5px;border:1px solid color-mix(in srgb,var(--pile-accent) 58%,#34404a);border-radius:8px;background:radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--pile-accent) 14%,transparent),transparent 75%),linear-gradient(155deg,#142335f0,#08111fee 65%,#050b13f7);box-shadow:0 7px 17px #0009,inset 0 1px #ffffff1c,inset 0 0 0 1px #ffffff09;backdrop-filter:blur(7px) saturate(125%);overflow:hidden;transition:transform .16s,border-color .16s,box-shadow .16s,background .16s}
.clean-battle .pile::before{content:"";position:absolute;inset:3px;border:1px solid #ffffff12;border-radius:5px;pointer-events:none}
.clean-battle .pile::after{content:"";position:absolute;top:0;left:14%;right:14%;height:1px;background:linear-gradient(90deg,transparent,var(--pile-accent),transparent);box-shadow:0 0 8px color-mix(in srgb,var(--pile-accent) 60%,transparent);pointer-events:none}
.clean-battle .pile>*{position:relative;z-index:1}
.clean-battle .pile-label{font:700 clamp(8px,.68vw,10px)/1 var(--font);letter-spacing:.08em;text-transform:uppercase;color:#d2dce5;text-shadow:0 1px 3px #000}
.clean-battle .pile strong{font:700 clamp(20px,1.55vw,26px)/1 var(--title);font-variant-numeric:tabular-nums;color:#f7fbff;text-shadow:0 1px 4px #000,0 0 10px color-mix(in srgb,var(--pile-accent) 24%,transparent)}
.clean-battle .deck-back{width:22px;max-width:none;height:27px;max-height:none;aspect-ratio:auto;border:1px solid color-mix(in srgb,var(--pile-accent) 64%,#82909b);border-radius:3px;outline:0;background:linear-gradient(145deg,#25445a,#0b1b29);box-shadow:inset 0 0 0 2px #ffffff13,0 2px 4px #0009;color:var(--pile-accent);font:14px var(--title)}
.clean-battle .graveyard-icon{display:grid;place-items:center;width:30px;height:30px;padding:3px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#344659,#101a27 72%);box-shadow:inset 0 0 0 1px #ffffff17;color:#bdc9d6;filter:drop-shadow(0 2px 3px #0008)}
.clean-battle .graveyard-icon svg{width:100%;height:100%}
.clean-battle button.pile{cursor:pointer}
.clean-battle button.pile:hover{transform:translateY(-2px);border-color:var(--pile-accent);background:radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--pile-accent) 22%,transparent),transparent 76%),linear-gradient(155deg,#1a2d40f5,#0a1420f7 68%,#050b13fa);box-shadow:0 10px 22px #000a,0 0 12px color-mix(in srgb,var(--pile-accent) 28%,transparent),inset 0 1px #ffffff26}
.clean-battle button.pile:focus-visible{outline:2px solid var(--pile-accent);outline-offset:3px}
@media(max-width:650px){
 .clean-battle .pile{width:64px;height:70px;padding:6px 4px}
 .clean-battle .pile-label{font-size:8px}
 .clean-battle .graveyard-icon{width:27px;height:27px}
}
/* Com 13 a 20 marcadores, organiza dez por linha sem reduzir a área do avatar. */
.clean-battle .mana-orbs.many-orbs{display:flex;flex-wrap:wrap;justify-content:space-between;align-content:space-evenly;align-items:center;column-gap:1.2%;row-gap:1px;overflow:hidden}
.clean-battle .mana-orbs.many-orbs .mana-orb{width:8.2%;height:42%;min-height:6px;flex:0 0 8.2%}
/* Barra da partida alinhada ao cabeçalho global de MYTHIC LEGACY. */
body.playing-match{--game-header-height:46px}
.clean-battle{--scene-height:calc(100dvh - var(--game-header-height))}
.battle-topbar{height:var(--game-header-height);min-height:var(--game-header-height);align-items:stretch;padding:0 8px;gap:4px;background:linear-gradient(180deg,#111a26,#070d15);border-bottom:1px solid #6b593c;box-shadow:0 4px 14px #0008}
.battle-topbar .brand{height:100%;padding:2px 12px;border:0;border-right:1px solid #51442e;background:transparent;box-shadow:none}
.battle-topbar .brand:after{top:50%;right:-6px;transform:translateY(-50%)}
.battle-topbar .brand .wordmark{font-size:17px;letter-spacing:.8px}
.battle-topbar .brand .submark{margin-top:1px;font-size:6px;letter-spacing:.7px}
.battle-topbar .top-main{gap:5px;padding:3px 8px}
.battle-topbar .top-main .nav-btn{height:36px;padding:0 8px;gap:5px;font-size:11px}
.battle-topbar .top-main .top-btn-icon{width:22px;height:22px}
.battle-topbar .top-main .top-btn-icon .nav-icon{width:17px;height:17px}
.battle-topbar .top-main .segmented{height:36px;padding:2px;gap:2px}
.battle-topbar .top-main .segmented button{padding:0 7px;font-size:10px}
.battle-topbar .top-right{gap:4px;padding:4px 6px 4px 8px;border-left:1px solid #263140}
.battle-topbar .top-right .icon-btn{width:30px;height:32px;border:1px solid #3c4c60;border-radius:6px;background:linear-gradient(145deg,#202d3c,#0c1521);font-size:18px}
.battle-topbar .top-right .icon-btn .nav-icon{width:19px;height:19px}
.battle-topbar .top-right .connection{padding:4px 7px;margin:0 0 0 2px;border:1px solid #2b4051;border-radius:6px;background:#0a152080;font-size:9px}
.battle-topbar .top-right .connection small{margin-top:2px;font-size:8px}
.battle-topbar .battle-effect-count{right:-2px;top:-2px}
@media(max-width:1250px){.battle-topbar .top-right .connection{display:none}}
@media(max-width:1000px){.battle-topbar{min-width:640px}.battle-topbar .top-main{padding-left:5px;padding-right:5px}}
@media(max-width:650px){.battle-topbar .brand{width:178px;padding:2px 8px}.battle-topbar .top-right{gap:3px;padding-left:5px;padding-right:5px}}.battle-topbar .battle-version{align-self:center;margin:0 3px;padding:4px 6px;border:1px solid #3b5062;border-radius:999px;background:#0b1520;color:#a9bfce;font:8px var(--font);white-space:nowrap}.battle-topbar .battle-details-toggle{position:relative}
.battle-topbar .battle-details-toggle .battle-effect-count{right:-4px;top:-4px;z-index:2}
/* Ações ativadas aparecem dentro da carta e não somem no recorte da faixa. */
.clean-battle .unit-slot .unit-ability{top:4px;bottom:auto;left:50%;transform:translateX(-50%);width:calc(100% + 8px);max-width:calc(var(--battle-unit-size) - 8px);height:22px;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:2px 5px;border:1px solid #df9b66;border-radius:5px;background:linear-gradient(145deg,#50301d,#20130f 70%);box-shadow:0 2px 6px #000c,inset 0 1px #fff2;color:#ffe1bd;font:700 clamp(7px,.6vw,9px)/1 var(--font);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.clean-battle .unit-slot .unit-ability:hover,.clean-battle .unit-slot .unit-ability:focus-visible{border-color:#ffd0a8;background:linear-gradient(145deg,#704324,#321c13);color:#fff7eb;outline:2px solid #ffbe91;outline-offset:1px}
.clean-battle .unit-slot.artifact-ability .unit-ability{top:auto;bottom:4px;z-index:9}
/* As cartas fluem por toda a largura do campo e continuam em novas fileiras. */
.clean-battle .open-battlefield .open-field{display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start;justify-content:center;gap:clamp(6px,.8vw,12px) clamp(4px,.45vw,8px);padding:5px 12px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#8e764955 transparent}
.clean-battle .open-field .battle-zone{display:contents}
.clean-battle .battle-zone:not(:last-child)::after{display:none}
.clean-battle .open-field .unit-slot{width:var(--battle-unit-size);height:var(--battle-unit-size);max-width:none;flex:0 0 var(--battle-unit-size)}
/* Mantém as instruções no alto da mesa e desocupa a área das cartas. */
.clean-battle .battle-context,.clean-battle .battle-context.expanded-context{left:auto;right:12px;top:10px;bottom:auto;transform:none;max-height:min(42%,240px);z-index:20}
/* Celular: mesa na largura da tela; a orientação horizontal usa mais espaço para o campo. */
@media (max-width:650px), (max-width:1000px) and (max-height:500px) and (hover:none) and (pointer:coarse){
 body.playing-match{--game-header-height:78px;overflow:hidden}
 body.playing-match .card-preview{display:none}
 .battle-topbar button,.clean-battle button{touch-action:manipulation}
 .battle-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:34px 40px;gap:4px;min-width:0;width:100%;padding:0 8px}
 .battle-topbar .brand{grid-column:1/-1;grid-row:1;justify-self:start;width:calc(100% - 64px);min-width:0;padding:2px 4px;align-items:flex-start;border:0}
 .battle-topbar .brand:after{display:none}
 .battle-topbar .brand .wordmark{font-size:clamp(16px,4.8vw,19px);letter-spacing:.5px}
 .battle-topbar .brand .submark{font-size:6px;letter-spacing:.5px}
 .battle-topbar .battle-version{grid-column:2;grid-row:1;justify-self:end;margin:0;font-size:9px}
 .battle-topbar .top-main{grid-column:1;grid-row:2;padding:0;gap:0}
 .battle-topbar .top-main .segmented,.battle-topbar .top-main .nav-online,.battle-topbar .top-main .top-room,.battle-topbar .top-main .top-spacer{display:none}
 .battle-topbar .top-main .nav-btn{height:34px;padding:0 6px;font-size:10px;gap:4px}
 .battle-topbar .top-main .top-btn-icon{width:18px;height:18px}
 .battle-topbar .top-right{grid-column:2;grid-row:2;gap:3px;padding:0;border:0;min-width:0}
 .battle-topbar .top-right .icon-btn{width:30px;height:34px;flex:0 0 30px}
 .battle-topbar .top-right .connection{display:none}
 .clean-battle{
  --scene-height:calc(100dvh - var(--game-header-height) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  --mobile-opponent-height:100px;
  --mobile-hand-row-height:clamp(112px,calc(var(--scene-height)*.23),166px);
  --mobile-footer-height:clamp(84px,calc(var(--scene-height)*.165),112px);
  --battle-unit-size:clamp(42px,calc(var(--scene-height)*.087),68px);
  --battle-profile-height:calc(var(--mobile-footer-height) - 2px);
  --battle-profile-width:calc(var(--battle-profile-height)*1.190635);
  --battle-hand-height:calc(var(--mobile-hand-row-height) - 38px);
  --battle-hand-width:calc(var(--battle-hand-height)*.684685);
  width:100%;max-width:100%;min-width:0;height:var(--scene-height);overflow:hidden;
 }
 .clean-battle .battle-body{width:100%;min-width:0}
 .clean-battle .battle-board{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:var(--mobile-opponent-height) auto minmax(0,1fr) 44px var(--mobile-hand-row-height) var(--mobile-footer-height)}
 .clean-battle .opponent-row{grid-column:1/-1;grid-row:1;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:66px 34px;padding:0 8px}
 .clean-battle .opponent-row>.hero-profile{grid-column:1;grid-row:1;width:136px;height:calc(136px*.488764);margin:0;align-self:start}
 .clean-battle .opponent-row>.battle-piles{position:static;grid-column:2;grid-row:1;align-self:center;justify-content:flex-end;gap:5px;padding:0;transform:none}
 .clean-battle .opponent-row>.domain-row{grid-column:1/-1;grid-row:2;align-items:center}
 .clean-battle .battle-piles{gap:5px;padding:0}
 .clean-battle .pile{width:60px;height:44px;grid-template-columns:20px minmax(0,1fr);grid-template-rows:12px 22px;gap:0 4px;padding:4px}
 .clean-battle .pile-label{grid-column:1/-1;grid-row:1;font-size:8px;letter-spacing:.02em}
 .clean-battle .pile strong{grid-column:2;grid-row:2;font-size:19px}
 .clean-battle .deck-back{grid-column:1;grid-row:2;width:16px;height:20px;font-size:11px}
 .clean-battle .graveyard-icon{grid-column:1;grid-row:2;width:22px;height:22px;padding:2px}
 .clean-battle .domain-row{--domain-display-size:30px;gap:5px;padding:1px 5px;justify-content:safe flex-start;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;touch-action:pan-x}
 .clean-battle .domain-row::-webkit-scrollbar{display:none}
 .clean-battle .domain-card{height:var(--domain-display-size);border-width:2px}
 .clean-battle .domain-symbol{font-size:12px}
 .clean-battle .battlefield.open-battlefield{grid-column:1/-1;grid-row:3;padding:0 4px;min-width:0;min-height:0}
 .clean-battle .open-battlefield .open-field,.clean-battle .open-battlefield .open-field.player-lane{padding:2px 8px 8px;gap:7px 6px;align-content:flex-start;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;touch-action:pan-y}
 .clean-battle .open-battlefield .enemy-lane{border-bottom:1px solid #bba56c66}
 .clean-battle .open-field .unit-slot{width:var(--battle-unit-size);height:var(--battle-unit-size);flex-basis:var(--battle-unit-size)}
 .clean-battle .unit-details{width:24px;height:24px;top:2px;right:2px;opacity:1}
 .clean-battle .unit-slot .unit-ability{height:26px;font-size:8px}
 .clean-battle .player-resources{grid-column:1/-1;grid-row:4;grid-template-columns:130px minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:0 8px}
 .clean-battle .player-resources .battle-piles{grid-column:1;grid-row:1;padding:0;justify-content:flex-start;align-self:center;transform:none}
 .clean-battle .player-resources .domain-row{grid-column:2;grid-row:1}
 .clean-battle .hand-row{display:contents}
 .clean-battle .hand-row:before{display:none}
 .clean-battle .hand-area,.clean-battle .hand-area:has(.hand-limit-alert){grid-column:1/-1;grid-row:5;display:block;height:100%;padding:2px 8px 0;background:linear-gradient(180deg,#07142288,#040b12bb);border-top:1px solid #71604466;overflow:hidden}
 .clean-battle .hand-heading{position:static!important;width:auto;height:18px;clip-path:none;padding:0 2px;overflow:visible;font:11px/18px var(--font);color:#c7d6df}
 .clean-battle .hand-heading:after{content:" · Gire o celular para ampliar o campo";font-size:10px;color:#9db4c5}
 .clean-battle .hand-container{height:calc(100% - 18px);width:100%;gap:0;justify-content:safe center;padding:10px 10px;overflow-x:auto;overflow-y:hidden;perspective:none;scrollbar-width:none;touch-action:pan-x}
 .clean-battle .hand-container::-webkit-scrollbar{display:none}
 .clean-battle .hand-card{--visible-card-width:var(--battle-hand-width);flex:0 0 var(--visible-card-width);margin-right:min(0px,calc((100cqw - 20px - var(--visible-card-width))/(var(--hand-count) - 1) - var(--visible-card-width)));transform:none}
 .clean-battle .hand-card:last-child{margin-right:0}
 .clean-battle .hand-card:hover{transform:none}
 .clean-battle .hand-card.selected{transform:translateY(-3px);z-index:10}
 .clean-battle .hand-limit-alert{left:8px;right:8px;top:0;font-size:10px;line-height:1.2;padding:4px}
 .clean-battle .player-profile{grid-column:1;grid-row:6;display:flex;align-items:flex-start;justify-content:flex-end;align-self:stretch;width:auto;height:100%;margin:0;padding:0;transform:none}
 .clean-battle .player-profile .hero-profile{max-width:100%}
 .clean-battle .core-number{font-size:14px}
 .clean-battle .large-core .core-number{font-size:calc(40px/var(--core-digits,3))}
 .clean-battle .turn-area{grid-column:2;grid-row:6;align-self:end;padding:0 8px 8px 4px}
 .clean-battle .end-turn,.clean-battle .end-turn.decline-action{height:40px;min-height:40px;font-size:13px;padding:3px 6px;border-radius:7px;box-shadow:inset 0 0 0 2px #1987c9,0 0 8px #30bdff55}
 .clean-battle .end-turn.decline-action>span{font-size:12px}
 .clean-battle .end-turn.decline-action>small{font-size:9px;white-space:normal}
 .clean-battle .battle-turn{grid-column:2;grid-row:6;position:static;align-self:start;width:auto;height:34px;min-width:0;margin:4px 8px 0 4px;padding:4px 7px;gap:7px;transform:none;clip-path:none;border:1px solid #8b754b;border-radius:5px}
 .clean-battle .battle-turn .turn-beacon{width:15px;height:15px;border-width:1px;box-shadow:0 0 7px #22afff88}
 .clean-battle .battle-turn strong{font-size:11px;line-height:1.1}
 .clean-battle .battle-turn .current-phase{font-size:10px;line-height:1.1;margin-top:2px}
 .clean-battle .battle-context,.clean-battle .battle-context.expanded-context,.clean-battle .battle-active-effect{grid-column:1/-1;grid-row:2;position:static;width:auto;min-width:0;min-height:0;max-height:min(104px,16vh);margin:4px 8px;transform:none;overflow-x:hidden;overflow-y:auto;overflow-wrap:anywhere}
 .clean-battle .battle-context .priority-bar,.clean-battle .battle-context.expanded-context .priority-bar{padding:7px 9px;gap:8px}
 .clean-battle .battle-context .priority-title,.clean-battle .battle-context.expanded-context .priority-title{font-size:12px;line-height:1.2}
 .clean-battle .battle-context .priority-bar p,.clean-battle .battle-context.expanded-context .priority-bar p{font-size:11px;line-height:1.35;margin-top:3px}
 .clean-battle .battle-context .priority-bar>button{min-height:40px;padding:6px 10px}
 .clean-battle .battle-context .priority-selection button,.clean-battle .battle-context .raid-btns button,.clean-battle .battle-context .raid-pick,.clean-battle .battle-context .cancel-attack{min-height:38px}
  .clean-battle .battle-context .battle-context-effect{min-height:38px;padding:8px 10px;font-size:11px}
 .clean-battle .priority-selection{padding:0 8px 4px}
 .clean-battle .priority-selection button,.clean-battle .raid-btns button{min-height:32px;white-space:normal}
 .clean-battle .battle-active-effect{padding:6px 9px;font-size:11px}
 .clean-battle .battle-active-effect small{margin-top:2px}
 .clean-battle .battle-divider{display:none}
 .clean-battle .battle-panel{left:4px;right:4px;top:4px;bottom:4px;width:auto;max-width:100%;min-width:0}
}

/* Ao girar um celular, avatares e ações ocupam as laterais da mão. */
@media (orientation:landscape) and (max-width:1000px) and (max-height:500px) and (hover:none) and (pointer:coarse){
 body.playing-match{--game-header-height:42px}
 .battle-topbar{display:flex;align-items:center;height:42px;min-height:42px;padding:0 6px;gap:4px}
 .battle-topbar .brand{width:auto;flex:0 0 auto;padding:2px 4px}
 .battle-topbar .brand .wordmark{font-size:14px}
 .battle-topbar .brand .submark{font-size:5px}
 .battle-topbar .battle-version{font-size:8px;padding:3px 4px}
 .battle-topbar .top-main{flex:1}
 .battle-topbar .top-right{gap:3px}
 .clean-battle{
  --mobile-hand-row-height:clamp(88px,calc(var(--scene-height)*.29),108px);
  --battle-profile-height:calc(var(--mobile-hand-row-height) - 8px);
  --battle-unit-size:clamp(32px,calc(var(--scene-height)*.13),48px);
  --battle-hand-height:calc(var(--mobile-hand-row-height) - 22px);
 }
 .clean-battle .battle-board{grid-template-columns:116px minmax(0,1fr) 136px;grid-template-rows:58px minmax(0,1fr) 32px var(--mobile-hand-row-height)}
 .clean-battle .opponent-row{grid-template-columns:126px minmax(0,1fr) 125px;grid-template-rows:minmax(0,1fr);padding:0 6px}
 .clean-battle .opponent-row>.hero-profile{width:118px;height:calc(118px*.488764);align-self:center}
 .clean-battle .opponent-row>.domain-row{grid-column:2;grid-row:1}
 .clean-battle .opponent-row>.battle-piles{grid-column:3;grid-row:1}
 .clean-battle .battlefield.open-battlefield{grid-column:1/3;grid-row:2;padding:0 2px}
 .clean-battle .open-battlefield .open-field,.clean-battle .open-battlefield .open-field.player-lane{padding:2px 6px 6px;gap:6px}
 .clean-battle .player-resources{grid-column:1/3;grid-row:3;grid-template-columns:126px minmax(0,1fr);padding:0 6px}
 .clean-battle .pile{height:32px;grid-template-columns:minmax(0,1fr) 22px;grid-template-rows:minmax(0,1fr);gap:2px;padding:3px}
 .clean-battle .pile-label{grid-column:1;grid-row:1;font-size:7px}
 .clean-battle .pile strong{grid-column:2;grid-row:1;font-size:18px}
 .clean-battle .pile .deck-back,.clean-battle .pile .graveyard-icon{display:none}
 .clean-battle .hand-area,.clean-battle .hand-area:has(.hand-limit-alert){grid-column:2;grid-row:4;padding:0 4px}
 .clean-battle .hand-heading{position:absolute!important;top:0;left:6px;height:14px;font-size:9px;line-height:14px}
 .clean-battle .hand-heading:after{content:none}
 .clean-battle .hand-container{height:100%;padding:12px 10px 8px}
 .clean-battle .player-profile{grid-column:1;grid-row:4}
 .clean-battle .battle-turn{grid-column:3;grid-row:3;height:28px;margin:2px 6px 0 4px;padding:3px 5px;gap:5px}
 .clean-battle .battle-turn strong{font-size:10px}
 .clean-battle .battle-turn .current-phase{font-size:9px}
 .clean-battle .turn-area{grid-column:3;grid-row:4;padding:0 6px 8px 4px}
 .clean-battle .end-turn,.clean-battle .end-turn.decline-action{font-size:12px}
 .clean-battle .battle-context,.clean-battle .battle-context.expanded-context,.clean-battle .battle-active-effect{grid-column:3;grid-row:2;align-self:start;max-height:calc(100% - 4px);margin:2px 6px 2px 4px;border-left-width:1px}
 .clean-battle .battle-context .priority-bar,.clean-battle .battle-context.expanded-context .priority-bar{display:block;padding:5px}
 .clean-battle .battle-context .priority-bar>button{width:100%;margin-top:4px}
}
/* Detalhes da mão no celular: dados roláveis e confirmação sempre visível. */
@media (max-width:650px), (max-width:1000px) and (max-height:500px) and (hover:none) and (pointer:coarse){
 /* Marcadores decorativos deixam o toque alcançar o retrato usado como alvo. */
 .clean-battle .hero-emblems,.clean-battle .hero-essence-total,.clean-battle .mana-row{pointer-events:none}
 body.playing-match .hand-card-dialog{display:flex;flex-direction:column;max-height:100%;overflow:hidden}
 .hand-card-dialog .modal-header{flex:0 0 auto;gap:10px;padding:10px 14px}
 .hand-card-dialog .modal-header h2{font-size:19px;min-width:0;overflow-wrap:anywhere}
 .hand-card-dialog .modal-header .icon-btn{flex:0 0 36px;height:36px}
 .hand-card-dialog .modal-body{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;padding:16px 14px;overscroll-behavior:contain}
 .hand-card-dialog .card-detail{gap:18px;min-width:0}
 .hand-card-dialog .card-detail>div:last-child{min-width:0;overflow-wrap:anywhere}
 .hand-card-dialog .card-detail h3{font-size:19px}
 .hand-card-dialog .modal-footer{flex:0 0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 14px;background:#0b1724}
 .hand-card-dialog .modal-footer .metal-btn{min-height:44px;padding:8px 5px;white-space:normal;touch-action:manipulation}
 .hand-card-dialog .hand-card-status{grid-column:1/-1;max-height:96px;overflow-y:auto;margin:0;padding:8px 10px;border:1px solid #3a637c;border-radius:5px;background:#112a3a;color:#c3e9fa;font:12px/1.4 var(--font)}
 .hand-card-dialog .hand-card-status.blocked{border-color:#94594f;background:#341d23;color:#ffe0d2}
 .hand-card-dialog .hand-card-status strong{color:inherit}
}
@media (orientation:landscape) and (max-width:1000px) and (max-height:500px) and (hover:none) and (pointer:coarse){
 .hand-card-dialog .modal-header{padding:6px 12px}
 .hand-card-dialog .modal-header h2{font-size:17px}
 .hand-card-dialog .modal-body{padding:12px}
 .hand-card-dialog .card-detail{grid-template-columns:184px minmax(0,1fr);align-items:start;justify-items:stretch;gap:16px}
 .hand-card-dialog .modal-footer{padding:6px 12px}
 .hand-card-dialog .hand-card-status{max-height:70px;padding:5px 8px;font-size:11px}
}
/* In-combat focus cards keep the full battlefield visible behind the exchange. */
.clean-battle .open-battlefield{position:relative}
.clean-battle .combat-showcase{position:absolute;inset:0;z-index:9;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:clamp(4px,.7vh,9px);padding:clamp(5px,.8vw,12px);overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at center,#071522e8 0,#071522d9 58%,#07152299 83%,transparent 100%);backdrop-filter:blur(1px)}
.clean-battle .combat-showcase-heading{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;text-align:center;color:#eaf8ff;text-shadow:0 1px 4px #000;font:700 clamp(10px,1vw,15px)/1.2 var(--title)}
.clean-battle .combat-showcase-heading span{color:#b4d5e6;font:500 clamp(8px,.7vw,11px)/1.25 var(--font)}
.clean-battle .combat-pairs{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:4px;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#8cc8df77 transparent}
.clean-battle .combat-pair{display:grid;grid-template-columns:minmax(0,.95fr) auto minmax(0,1.05fr);grid-template-rows:minmax(0,1fr) auto;align-items:center;gap:2px clamp(4px,1vw,12px);min-height:0;padding:4px 7px;border:1px solid #96bad344;border-radius:7px;background:linear-gradient(100deg,#1c1512d9,#10202bd9 48%,#101b23e8);box-shadow:0 2px 8px #0008}
.clean-battle .combat-team{display:flex;align-items:center;justify-content:center;gap:clamp(3px,.65vw,8px);min-width:0;min-height:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.clean-battle .combat-direction{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#f8d49a;text-shadow:0 1px 4px #000}
.clean-battle .combat-direction span{font:700 clamp(17px,2.5vh,31px)/1 var(--title)}
.clean-battle .combat-direction small{font:700 clamp(7px,.65vw,10px)/1 var(--font);text-transform:uppercase;letter-spacing:.06em}
.clean-battle .combat-piece{display:grid;grid-template-rows:auto auto auto auto;justify-items:center;align-content:center;gap:2px;flex:0 0 clamp(48px,7.4vh,86px);width:clamp(48px,7.4vh,86px);min-width:0;color:#edf8fc;text-align:center}
.clean-battle .combat-piece-role{font:700 clamp(7px,.65vw,10px)/1.1 var(--title);text-transform:uppercase;letter-spacing:.04em;color:#ffc894}
.clean-battle .combat-defender .combat-piece-role{color:#a9e4ff}
.clean-battle .combat-piece-card{width:100%;aspect-ratio:1;min-height:0;container-type:inline-size}
.clean-battle .combat-piece-card .game-card.compact{--field-card-height:100%;position:relative;width:100%;height:100%;border:2px solid color-mix(in srgb,var(--faction) 70%,#d5c7a2);border-radius:5px;overflow:hidden;box-shadow:0 2px 8px #000c}
.clean-battle .combat-attacker .combat-piece-card .game-card.compact{border-color:#ffc393;box-shadow:0 0 0 1px #f98150,0 0 10px #f2694880}
.clean-battle .combat-defender .combat-piece-card .game-card.compact{border-color:#a4e6ff;box-shadow:0 0 0 1px #66ccf6,0 0 10px #4bb7ed80}
.clean-battle .combat-piece-card .card-art{inset:0;background-repeat:no-repeat}
.clean-battle .combat-piece-card .game-card.compact .unit-name{display:none}
.clean-battle .combat-piece-card .game-card.compact .card-stats{display:flex;position:absolute;left:2px;right:2px;bottom:2px;justify-content:space-between;gap:2px;pointer-events:none}
.clean-battle .combat-piece-card .game-card.compact .stat{min-width:35%;padding:1px 3px;border:1px solid #493824;border-radius:3px;background:#f0e6cc;color:#172027;font:700 clamp(10px,1.2vh,14px)/1.05 var(--title);text-shadow:none}
.clean-battle .combat-piece-name{display:block;width:100%;overflow:hidden;color:#e7f5fc;font:700 clamp(7px,.68vw,10px)/1.1 var(--font);text-overflow:ellipsis;white-space:nowrap}
.clean-battle .combat-piece-damage{display:block;width:100%;overflow:hidden;color:#ffb6a6;font:700 clamp(7px,.63vw,9px)/1.15 var(--font);text-overflow:ellipsis;white-space:nowrap}
.clean-battle .combat-piece-damage.no-combat-damage{color:#c4d6df}
.clean-battle .combat-empty-defenders{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:46px;padding:4px;border:1px dashed #83c5e466;border-radius:5px;color:#c2dfed;text-align:center;font:clamp(8px,.7vw,10px)/1.25 var(--font)}
.clean-battle .combat-empty-defenders strong{color:#a9e4ff;font:700 clamp(8px,.7vw,10px)/1 var(--title);text-transform:uppercase}
.clean-battle .combat-outcome{grid-column:1/-1;margin:0;color:#f4d7a9;text-align:center;font:700 clamp(8px,.68vw,10px)/1.2 var(--font)}
.clean-battle .combat-showcase-note{margin:0;color:#c1d6e0;text-align:center;font:clamp(7px,.62vw,9px)/1.2 var(--font);text-shadow:0 1px 3px #000}
.clean-battle .combat-selection-cards{display:flex;align-items:center;justify-content:center;gap:clamp(5px,1vw,12px);min-height:0;overflow:auto}
.clean-battle .combat-selection-cards .combat-piece{flex-basis:clamp(52px,8vh,92px);width:clamp(52px,8vh,92px)}
.clean-battle .combat-selection-showcase .combat-piece-damage{display:none}
.clean-battle .combat-selection-showcase .combat-piece-name{font-size:clamp(8px,.75vw,11px)}
@media(max-width:600px){
 .clean-battle .combat-showcase{gap:3px;padding:4px;background:radial-gradient(ellipse at center,#071522ee 0,#071522df 72%,#071522a6 100%)}
 .clean-battle .combat-showcase-heading{flex-direction:column;gap:1px}
 .clean-battle .combat-showcase-heading span{font-size:8px}
 .clean-battle .combat-pair{grid-template-columns:minmax(0,.9fr) auto minmax(0,1.1fr);gap:2px 3px;padding:3px}
 .clean-battle .combat-piece{flex-basis:48px;width:48px;gap:1px}
 .clean-battle .combat-piece-card .game-card.compact .stat{font-size:10px}
 .clean-battle .combat-piece-role,.clean-battle .combat-piece-name,.clean-battle .combat-piece-damage{font-size:7px}
 .clean-battle .combat-direction span{font-size:16px}
 .clean-battle .combat-direction small{font-size:6px}
 .clean-battle .combat-empty-defenders{font-size:7px}
 .clean-battle .combat-outcome,.clean-battle .combat-showcase-note{font-size:7px}
}
@media(max-height:430px){
 .clean-battle .combat-showcase{gap:2px;padding:3px}
 .clean-battle .combat-showcase-heading span{display:none}
 .clean-battle .combat-piece{flex-basis:46px;width:46px}
 .clean-battle .combat-piece-name{font-size:6px}
 .clean-battle .combat-pair{padding:2px}
}
/* Combat cards use the normal portrait card face at a readable physical proportion. */
.clean-battle .combat-showcase{inset:-22% 0;overflow:visible}
.clean-battle .combat-pairs{overflow-y:auto;overflow-x:hidden}
.clean-battle .combat-pair{overflow:visible}
.clean-battle .combat-piece{grid-template-rows:auto auto auto;flex:0 0 clamp(90px,14vh,160px);width:clamp(90px,14vh,160px);gap:3px}
.clean-battle .combat-piece-card{width:100%;height:auto;aspect-ratio:5 / 7;container-type:inline-size}
.clean-battle .combat-piece-card .game-card.realm-frame:not(.compact){display:block;width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:5 / 7;overflow:visible}
.clean-battle .combat-attacker .combat-piece-card .game-card.realm-frame:not(.compact){filter:drop-shadow(0 0 5px #f26948aa) drop-shadow(0 3px 5px #000a)}
.clean-battle .combat-defender .combat-piece-card .game-card.realm-frame:not(.compact){filter:drop-shadow(0 0 5px #4bb7edaa) drop-shadow(0 3px 5px #000a)}
.clean-battle .combat-piece-name{display:none}
@media(max-width:600px){
 .clean-battle .combat-piece{flex-basis:clamp(90px,14vh,150px);width:clamp(90px,14vh,150px);gap:2px}
}
@media(max-height:430px){
 .clean-battle .combat-piece{flex-basis:clamp(88px,16vh,120px);width:clamp(88px,16vh,120px)}
 .clean-battle .combat-showcase-heading span{display:block}
}

/* Refined combat presentation: textured metal, portrait cards, and clear damage callouts. */
.clean-battle .combat-showcase{
 inset:-28% 0;
 gap:clamp(5px,.8vh,10px);
 padding:clamp(7px,1vw,14px);
 overflow:hidden;
 isolation:isolate;
 border:1px solid #c5a87455;
 border-radius:11px;
 background:
  radial-gradient(ellipse at 50% 45%,#19314455 0,transparent 68%),
  linear-gradient(105deg,#08131eeF 0%,#101c27eb 48%,#0b1721f2 100%),
  repeating-linear-gradient(135deg,#ffffff0a 0 1px,transparent 1px 8px);
 box-shadow:0 18px 42px #000c,inset 0 1px #ffffff20,inset 0 -1px #000b;
 backdrop-filter:blur(5px) saturate(1.12);
}
.clean-battle .combat-showcase::before{
 content:"";
 position:absolute;
 inset:0;
 z-index:0;
 border:1px solid #ead5a022;
 border-radius:inherit;
 background:repeating-linear-gradient(135deg,#ffffff05 0 1px,transparent 1px 9px);
 box-shadow:inset 0 0 0 1px #0005,inset 0 0 30px #030a10a8;
 pointer-events:none;
}
.clean-battle .combat-showcase-heading,
.clean-battle .combat-pairs,
.clean-battle .combat-showcase-note{position:relative;z-index:1}
.clean-battle .combat-showcase-heading{
 width:max-content;
 max-width:100%;
 margin-inline:auto;
 padding:5px 13px;
 border:1px solid #d1b77d55;
 border-radius:999px;
 background:linear-gradient(180deg,#1c2a33e8,#0b151de8);
 box-shadow:0 3px 10px #0008,inset 0 1px #ffffff18;
}
.clean-battle .combat-pair{
 min-height:clamp(216px,30vh,318px);
 padding:7px clamp(8px,1vw,14px);
 border-color:#cbb17c55;
 border-radius:9px;
 background:
  linear-gradient(100deg,#251914d9,#13212bdc 48%,#10202bdd),
  repeating-linear-gradient(135deg,#ffffff08 0 1px,transparent 1px 8px);
 box-shadow:0 8px 20px #0009,inset 0 1px #ffffff12,inset 0 -1px #0009;
}
.clean-battle .combat-piece{
 grid-template-rows:auto auto auto;
 flex:0 0 clamp(112px,11.5vw,166px);
 width:clamp(112px,11.5vw,166px);
 gap:3px;
}
.clean-battle .combat-piece-card{
 position:relative;
 width:100%;
 height:auto;
 aspect-ratio:5 / 7;
 container-type:inline-size;
 isolation:isolate;
}
.clean-battle .combat-piece-card .game-card.realm-frame:not(.compact){
 width:100%;
 height:auto;
 min-height:0;
 max-height:none;
 aspect-ratio:5 / 7;
}
.clean-battle .combat-attacker .combat-piece-card .game-card.realm-frame:not(.compact){
 filter:drop-shadow(0 0 7px #f26948bb) drop-shadow(0 4px 7px #000b);
}
.clean-battle .combat-defender .combat-piece-card .game-card.realm-frame:not(.compact){
 filter:drop-shadow(0 0 7px #4bb7edbb) drop-shadow(0 4px 7px #000b);
}
.clean-battle .combat-damage-impact{
 position:absolute;
 z-index:15;
 top:15%;
 right:4px;
 display:inline-flex;
 align-items:center;
 gap:5px;
 padding:5px 8px;
 border:1px solid #ffd094;
 border-radius:5px 5px 2px 5px;
 color:#fff8eb;
 background:linear-gradient(135deg,#8b2029f5,#e95135f5 58%,#f18a42f5);
 box-shadow:0 3px 12px #000c,0 0 14px #f05c3f99,inset 0 1px #ffffff55;
 transform:rotate(-3deg);
 animation:combat-damage-pulse 1.65s ease-in-out infinite;
 text-shadow:0 1px 2px #45130f;
}
.clean-battle .combat-damage-impact b{
 font:800 clamp(16px,1.7vw,24px)/.9 var(--title);
}
.clean-battle .combat-damage-impact span{
 font:800 clamp(7px,.66vw,10px)/1 var(--font);
 letter-spacing:.09em;
}
.clean-battle .combat-piece-damage{
 width:max-content;
 max-width:100%;
 padding:3px 8px;
 border:1px solid #ffffff22;
 border-radius:999px;
 background:#08131ccc;
 box-shadow:0 2px 7px #0006;
 color:#d6e4ec;
 font-size:clamp(8px,.72vw,11px);
}
.clean-battle .combat-piece-damage.takes-damage{
 border-color:#ff987966;
 background:linear-gradient(90deg,#541b21ed,#752821ed);
 color:#ffe0ca;
 box-shadow:0 2px 9px #0008,0 0 12px #ec593b33;
}
.clean-battle .combat-piece-damage.no-combat-damage{
 border-color:#96c8df30;
 background:#10202bbd;
}
.clean-battle .combat-outcome{
 padding-top:3px;
 color:#ffe3b5;
 text-shadow:0 1px 4px #000;
}
.clean-battle .combat-showcase-note{
 color:#d2e1e8;
 text-shadow:0 1px 4px #000;
}
.clean-battle .combat-selection-cards .combat-piece{
 flex-basis:clamp(96px,10vw,136px);
 width:clamp(96px,10vw,136px);
}
@keyframes combat-damage-pulse{
 0%,100%{filter:brightness(1);box-shadow:0 3px 12px #000c,0 0 12px #f05c3f77,inset 0 1px #ffffff55}
 50%{filter:brightness(1.12);box-shadow:0 4px 15px #000d,0 0 19px #ff704cbb,inset 0 1px #ffffff77}
}
@media(max-width:600px){
 .clean-battle .combat-piece{
  flex-basis:clamp(102px,28vw,128px);
  width:clamp(102px,28vw,128px);
 }
 .clean-battle .combat-pair{min-height:clamp(202px,35vh,280px);padding:5px}
 .clean-battle .combat-damage-impact{top:14%;right:3px;padding:4px 6px}
 .clean-battle .combat-showcase-heading{padding:4px 9px}
}
@media(max-height:430px){
 .clean-battle .combat-showcase{inset:-25% 0;gap:3px;padding:5px}
 .clean-battle .combat-piece{
  flex-basis:clamp(108px,35vh,148px);
  width:clamp(108px,35vh,148px);
 }
 .clean-battle .combat-pair{min-height:clamp(198px,58vh,250px);padding:4px 7px}
 .clean-battle .combat-showcase-heading{padding:3px 10px}
}
@media(prefers-reduced-motion:reduce){
 .clean-battle .combat-damage-impact{animation:none}
}


/* Portuguese damage callout: say what the amount means for this card. */
.clean-battle .combat-damage-impact{
 flex-direction:column;
 min-width:72px;
 gap:2px;
 padding:5px 7px;
 text-align:center;
 transform:rotate(-2deg);
}
.clean-battle .combat-damage-impact b{font-size:clamp(17px,1.8vw,25px)}
.clean-battle .combat-damage-impact span{
 font-size:clamp(7px,.68vw,9px);
 letter-spacing:.08em;
 white-space:nowrap;
}
.clean-battle .combat-piece-damage{
 overflow:visible;
 text-align:center;
 white-space:normal;
 line-height:1.15;
}
@media(max-width:600px){
 .clean-battle .combat-damage-impact{min-width:68px;padding:4px 6px}
}

/* Card-from-hand preview actions on desktop and mobile. */
.hand-card-dialog .modal-footer{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:10px;
}
.hand-card-dialog .modal-footer .metal-btn{
 min-height:44px;
 white-space:normal;
 line-height:1.25;
}
.hand-card-dialog .hand-card-status{
 grid-column:1/-1;
 margin:0;
 padding:9px 11px;
 border:1px solid #3a637c;
 border-radius:5px;
 background:#112a3a;
 color:#c3e9fa;
 font:12px/1.4 var(--font);
}
.hand-card-dialog .hand-card-status.blocked{
 border-color:#94594f;
 background:#341d23;
 color:#ffe0d2;
}
.hand-card-dialog .hand-card-status strong{color:inherit}
@media(min-width:651px){
 body.playing-match .hand-card-dialog{
  display:flex;
  flex-direction:column;
  max-height:90vh;
  overflow:hidden;
 }
 .hand-card-dialog .modal-header{flex:0 0 auto}
 .hand-card-dialog .modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
 }
 .hand-card-dialog .modal-footer{flex:0 0 auto}
}

/* One confirmed duel at a time, with pointer-enabled navigation inside the overlay. */
.clean-battle .combat-showcase-heading{
 width:min(100%,560px);
 max-width:calc(100% - 14px);
 gap:clamp(7px,1vw,14px);
}
.clean-battle .combat-showcase-title{
 min-width:0;
 display:flex;
 flex:1 1 auto;
 flex-direction:column;
 align-items:center;
 gap:2px;
}
.clean-battle .combat-showcase-title strong{white-space:nowrap}
.clean-battle .combat-showcase-title span{white-space:nowrap}
.clean-battle .combat-duel-nav{
 pointer-events:auto;
 z-index:2;
 flex:0 0 auto;
 display:grid;
 place-items:center;
 width:34px;
 min-width:34px;
 height:34px;
 padding:0;
 border:1px solid #e1c27b88;
 border-radius:50%;
 color:#fff1c8;
 background:linear-gradient(145deg,#553921,#182833 72%);
 box-shadow:0 3px 9px #0009,inset 0 1px #ffffff2b;
 cursor:pointer;
 font:800 24px/1 var(--title);
 text-shadow:0 1px 4px #000;
 transition:filter .16s ease,transform .16s ease,border-color .16s ease;
}
.clean-battle .combat-duel-nav:hover:not(:disabled){
 filter:brightness(1.22);
 transform:scale(1.06);
 border-color:#ffe0a8;
}
.clean-battle .combat-duel-nav:focus-visible{outline:2px solid #ffe3a2;outline-offset:2px}
.clean-battle .combat-duel-nav:disabled{opacity:.38;cursor:default;box-shadow:none}
.clean-battle .combat-pairs{display:flex;overflow:hidden}
@media(max-width:600px){
 .clean-battle .combat-showcase-heading{flex-direction:row;gap:5px;padding:3px 7px}
 .clean-battle .combat-showcase-title strong{font-size:10px}
 .clean-battle .combat-showcase-title span{font-size:7px;display:block}
 .clean-battle .combat-duel-nav{width:29px;min-width:29px;height:29px;font-size:21px}
}
@media(max-height:430px){
 .clean-battle .combat-showcase-heading{gap:6px}
 .clean-battle .combat-duel-nav{width:29px;min-width:29px;height:29px;font-size:21px}
}

.mobile-raid-picks,.mobile-raid-alternative,.mobile-raid-prompt{display:none}
/* Batalha direta: campo livre e decisões acessíveis no rodapé. */
.clean-battle .battle-context,.clean-battle .battle-context.expanded-context,.clean-battle .battle-active-effect,.clean-battle .battle-turn,.clean-battle .combat-showcase,.clean-battle .end-turn.desktop-primary{display:none}
.clean-battle .battle-turn-controls{display:flex;flex:1;min-width:0;flex-direction:column;gap:9px}
.clean-battle .battle-turn-label{display:flex;align-items:center;justify-content:space-between;gap:6px;color:#d1e4ef;font:700 clamp(12px,1.1vw,17px)/1.2 var(--font)}
.clean-battle .battle-primary{width:100%;min-height:44px;white-space:normal}
.clean-battle .battle-primary.response-ready{border-color:#e5bb70;box-shadow:inset 0 0 0 1px #c8994a;background:linear-gradient(#594326,#211a12);color:#fff0d0}
.clean-battle .battle-selection-cancel{padding:4px 5px;border:0;background:transparent;color:#ffcfb9;font:13px var(--font);text-decoration:underline}
.battle-response-dialog,.field-unit-dialog{display:flex;flex-direction:column;max-height:calc(100dvh - 32px);overflow:hidden}
.battle-response-dialog .modal-header,.field-unit-dialog .modal-header{flex:0 0 auto}
.battle-response-dialog .modal-body,.field-unit-dialog .modal-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.battle-response-dialog .modal-footer,.field-unit-dialog .modal-footer{flex:0 0 auto}
.battle-response-dialog .modal-footer .metal-btn{min-height:44px}
.battle-response-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}
.battle-response-card{padding:0;border:0;background:transparent}
.battle-response-card .game-card{width:100%}
@media (max-width:650px), (max-width:1000px) and (max-height:500px) and (hover:none) and (pointer:coarse){
 .clean-battle .battle-context,.clean-battle .battle-context.expanded-context,.clean-battle .battle-active-effect,.clean-battle .battle-turn,.clean-battle .combat-showcase,.clean-battle .end-turn.desktop-primary{display:none}
 .clean-battle .battle-board{grid-template-rows:var(--mobile-opponent-height) 0 minmax(0,1fr) 44px var(--mobile-hand-row-height) var(--mobile-footer-height)}
 .clean-battle .turn-area{display:flex;align-self:stretch;align-items:center;min-width:0}
 .clean-battle .battle-turn-controls{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
 .clean-battle .battle-turn-label{display:flex;align-items:center;justify-content:space-between;gap:3px;min-height:22px;color:#d1e4ef;font:700 11px/1.15 var(--font)}
 .clean-battle .battle-primary{width:100%;height:48px;min-height:48px;padding:5px 8px;white-space:normal;touch-action:manipulation}
 .clean-battle .battle-primary.response-ready{border-color:#e5bb70;box-shadow:inset 0 0 0 1px #c8994a;background:linear-gradient(#594326,#211a12);color:#fff0d0}
 .clean-battle .battle-selection-cancel{padding:4px 5px;border:0;background:transparent;color:#ffcfb9;font:11px var(--font);text-decoration:underline;touch-action:manipulation}
 .battle-response-dialog,.field-unit-dialog{display:flex;flex-direction:column;max-height:100%;overflow:hidden}
 .battle-response-dialog .modal-header,.field-unit-dialog .modal-header{flex:0 0 auto}
 .battle-response-dialog .modal-body,.field-unit-dialog .modal-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
 .field-unit-dialog .modal-footer{flex:0 0 auto;padding:10px 12px}
 .field-unit-dialog .field-unit-menu{gap:7px}
 .field-unit-dialog .field-unit-menu h3{font-size:12px}
 .field-unit-dialog .field-unit-actions .metal-btn{min-height:44px}
 .battle-response-dialog .modal-footer{display:flex;flex-wrap:wrap;gap:7px;flex:0 0 auto;padding:10px 12px}
 .battle-response-dialog .modal-footer .metal-btn{flex:1 1 120px;min-height:44px;padding:8px;white-space:normal}
 .battle-response-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:12px}
 .battle-response-card{padding:0;border:0;background:transparent;touch-action:manipulation}
 .battle-response-card .game-card{width:100%}
}
@media (orientation:landscape) and (max-width:1000px) and (max-height:500px) and (hover:none) and (pointer:coarse){
 .clean-battle .battle-board{grid-template-rows:58px minmax(0,1fr) 32px var(--mobile-hand-row-height)}
 .clean-battle .battlefield.open-battlefield{grid-column:1/-1}
 .clean-battle .battle-turn-label{font-size:10px}
 .battle-response-dialog .modal-footer{padding:6px 10px}
}

.clean-battle .battle-sideboard-button{width:100%;min-height:33px;padding:5px 7px;border:1px solid #8d7549;border-radius:4px;background:linear-gradient(#332b1e,#17140f);color:#f0d8a0;font:600 10px var(--font);cursor:pointer}.clean-battle .battle-sideboard-button:hover:not(:disabled){border-color:#c5a66c;background:linear-gradient(#4b3b21,#211a10);color:#fff0c7}.clean-battle .battle-sideboard-button:disabled{opacity:.45;cursor:not-allowed}.clean-battle .battle-mulligan-button{border-color:#6ab7df;background:linear-gradient(#124d70,#0a2339);color:#e3f6ff}.clean-battle .battle-primary:disabled{opacity:.45;cursor:not-allowed}
