body,.phone-stage{background:#07101d}.phone-stage{padding:0;height:100dvh}.phone-stage .phone-scale-box,.phone-stage .phone-device,.phone-stage .device-screen{width:min(100vw,600px)!important;height:100dvh!important;transform:none!important;inset:0!important;border-radius:0!important}.phone-bezel,.device-menu-bar,.device-camera,.status-bar,.home-indicator-svg,.keyboard-dock{display:none!important}.mobile-app-viewport{bottom:0!important}.battle-header{padding:calc(6px + env(safe-area-inset-top)) 12px 6px;background:linear-gradient(110deg,#173c62,#101a2c 52%,#482029);border-color:#a78958}.hand-panel{flex:0 0 auto;padding:5px 12px calc(6px + env(safe-area-inset-bottom));background:linear-gradient(#244572,#091b34 35%,#071424);border-top:2px solid #ae975f}.game-card{height:clamp(64px,11dvh,108px);background-size:cover!important;background-position:center 40%!important;border-color:#c79b54}.game-card strong{font:700 10px/16px system-ui;color:#fff6d8}.cost{border-radius:50%;background:linear-gradient(#df67fc,#8718c5 55%,#471178);border-color:#e4a5ff;width:24px;height:26px;font-size:18px}.energy-track i{background:linear-gradient(#f1a0ff,#a823e7 55%,#7823bb)}.energy-value{color:#eca8ff}.game-dialog{background:linear-gradient(155deg,#192b43,#081322);border-color:#d1ab69;max-height:94dvh;overflow:auto}.game-dialog:has(.online-battle) h1{background:url(/visual/brand/logo.webp) center/contain no-repeat;height:clamp(82px,22dvh,210px);font-size:0}.game-dialog:has(.online-battle) h1 em{font-size:0}.game-dialog .hero-creatures{display:none}.game-dialog .primary-btn{background:linear-gradient(#ffe5a0,#c28e43);color:#261a11!important;border-color:#fae0a5}.device-screen,.device-screen *{cursor:auto!important}.device-screen button{cursor:pointer!important}
[data-card="brasa"]{--portrait:url('/visual/portraits/brasa.webp')}
[data-card="marea"]{--portrait:url('/visual/portraits/marea.webp')}
[data-card="roca"]{--portrait:url('/visual/portraits/roca.webp')}
[data-card="cefiro"]{--portrait:url('/visual/portraits/cefiro.webp')}
[data-card="ascua"]{--portrait:url('/visual/portraits/ascua.webp')}
[data-card="glacial"]{--portrait:url('/visual/portraits/glacial.webp')}
[data-card="guijarros"]{--portrait:url('/visual/portraits/guijarros.webp')}
[data-card="vendaval"]{--portrait:url('/visual/portraits/vendaval.webp')}
[data-card="meteorito"]{--portrait:url('/visual/portraits/meteorito.webp')}
[data-card="manantial"]{--portrait:url('/visual/portraits/manantial.webp')}
[data-card="escarcha"]{--portrait:url('/visual/portraits/escarcha.webp')}
[data-card="tormenta"]{--portrait:url('/visual/portraits/tormenta.webp')}
[data-card="espora"]{--portrait:url('/visual/portraits/espora.webp')}
[data-card="salamandra"]{--portrait:url('/visual/portraits/salamandra.webp')}
[data-card="umbrala"]{--portrait:url('/visual/portraits/umbrala.webp')}
[data-card="coral"]{--portrait:url('/visual/portraits/coral.webp')}
.game-card[data-card],.collection .collection-art[data-card],.next-card i[data-card]{background-image:var(--portrait)!important;background-size:cover!important;background-position:center 35%!important;background-repeat:no-repeat}
.game-card .card-art,.collection-art[data-card] .card-art,.game-card .spell-label{display:none}
.game-card strong{background:linear-gradient(#101921db,#061323);line-height:1.12;padding:3px 0;text-shadow:0 1px 2px black}
.game-card strong small{display:block;color:#e3d4b4;font:500 clamp(8px,2.1vw,10px)/1.1 system-ui;text-transform:none;letter-spacing:0}
.game-card.selected{border-color:#fff1b6;outline:2px solid #64e5ff;outline-offset:1px;transform:translateY(-4px)}
.next-card i{display:block;width:25px;height:27px;border:1px solid #c6a56d;border-radius:4px;margin:auto}
.next-card span{margin:1px 0 0}.collection-art .deck-tag,.collection-art .cost{z-index:1}
.collection-art[data-card]{height:auto;aspect-ratio:1.25}.collection-card{background:linear-gradient(#182f46,#0a1728)}.collection-card.in-deck{border-color:#d8b572;box-shadow:inset 0 0 0 1px #a58b56}
.elemental-game[data-phase=playing] .range-legend,.elemental-game[data-phase=playing] .river-label,.elemental-game[data-phase=playing] .zone-label{display:none}
.deploy-zone{background:linear-gradient(0deg,#58d5ff22,#56ccff09);border:2px dashed #a4edffb0}

.hand .game-card{height:clamp(83px,12.6dvh,128px);border-radius:9px;border:1.5px solid #bc9456;box-shadow:inset 0 0 0 2px #251b14,0 2px 4px #0009}
.hand .game-card strong{font:800 clamp(10px,2.55vw,14px)/1.1 system-ui;padding:12px 1px 3px;background:linear-gradient(transparent,#061019ed 38%,#060d15);border:0;border-radius:0 0 8px 8px}
.hand .cost{top:2px;left:2px;width:20px;height:22px;font-size:15px;line-height:18px;z-index:2}
.hand .game-card.selected{border-color:#ffe19b;box-shadow:0 0 0 2px #56d9ef,0 4px 10px #0008}
.collection .collection-art[data-card]{aspect-ratio:1.35;background-position:50% 35%!important}
@media(max-height:540px){.hand .game-card{height:60px}.hand .game-card strong{padding-top:4px}.hand .game-card strong small{display:none}}

.ae-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0;color:#ffe2a2}.ae-presets>b,.ae-presets>small{grid-column:1/-1}.ae-presets>small{color:#c1d2df}.ae-presets button{min-height:50px;padding:7px;text-align:left;border:1px solid #96794e;border-radius:7px;background:#122439;color:#fff}.ae-presets button span{display:block;font-size:10px;color:#bfd1de}.ae-presets button[aria-pressed=true]{border-color:#82e6ff;background:#19425a}
/* The river objective reads as a crystal, distinct from the six towers. */
.relic{--gem:#b0a6f6}.relic.blue{--gem:#4ce5ff}.relic.red{--gem:#ff6b67}
.relic img{visibility:hidden}.relic:before{content:"";position:absolute;left:33%;top:0;width:34%;height:52%;background:conic-gradient(from 28deg at 47% 53%,#fff,var(--gem) 18%,#294765 31%,var(--gem) 54%,#efffff 77%,var(--gem));clip-path:polygon(50% 0,100% 43%,62% 94%,49% 100%,0 43%);pointer-events:none}
.unit .unit-band{display:none}.unit img{object-fit:contain;height:auto}.unit .health{height:4px}.relic span{white-space:nowrap}

.unit .ae-actor{display:block;width:100%;aspect-ratio:1;background-size:400% 300%;background-repeat:no-repeat;filter:drop-shadow(0 2px 1px #0a152088);pointer-events:none}
.unit.flying .ae-actor{filter:drop-shadow(0 6px 2px #10182b66)}.unit.hit .ae-actor{filter:brightness(1.35)}.unit.frozen .ae-actor{filter:grayscale(.6) drop-shadow(0 0 3px #a8edff)}
@media(prefers-reduced-motion:reduce){.unit .ae-actor{background-position:0 0!important;transform:none!important}}

.ae-lobby,.ae-tabs{position:absolute;left:0;right:0;z-index:80;color:#fff4da;font-family:system-ui,sans-serif}.ae-lobby{inset:0 0 calc(60px + env(safe-area-inset-bottom));overflow-y:auto;background:#091728}.ae-welcome{box-sizing:border-box;min-height:100%;padding:clamp(10px,4vh,36px) 7% 18px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;text-align:center;background:linear-gradient(180deg,#07142555,transparent 40%,#071528eb 78%),url('/art/arena.png') center/cover}.ae-crest{width:min(70%,250px);max-height:29dvh;object-fit:contain;border-radius:14px;box-shadow:0 4px 30px #040b17}.ae-home-actions{width:min(100%,400px);background:linear-gradient(#101e31ed,#071220f7);border:1px solid #91733d;border-radius:16px;padding:14px;box-sizing:border-box}.ae-home-actions h1,.ae-library h1{font:700 clamp(25px,5vw,38px)/1.1 Georgia,serif;margin:5px 0}.ae-home-actions p,.ae-library p{font-size:13px;color:#d0d9e4}.ae-lobby small{color:#f3c879;letter-spacing:.18em}.ae-lobby button,.ae-tabs button{cursor:pointer;color:#f4e6c8;background:#172a41;border:1px solid #50637b;border-radius:7px;padding:8px;font-weight:700}.ae-home-actions .ae-fight{display:block;width:100%;min-height:48px;font-size:20px;background:linear-gradient(#ffdf8b,#d69d43);color:#272014;border-color:#ffe7b3}.ae-equipped{display:flex;justify-content:center;gap:4px;margin:10px}.ae-equipped img{width:13%;aspect-ratio:1;object-fit:cover;border:1px solid #bb914e;border-radius:4px}.ae-tabs{bottom:0;z-index:1000;display:grid;grid-template-columns:repeat(4,1fr);padding:3px 4px calc(3px + env(safe-area-inset-bottom));background:#0a1524;border-top:1px solid #b69459}.ae-tabs button{min-height:52px;background:transparent;border-color:transparent;font-size:11px}.ae-tabs span{display:block;font-size:20px}.ae-tabs [aria-current]{border-color:#ab8749;background:#303347;color:#ffdc89}.ae-library{padding:24px 5%}.ae-filters{display:flex;flex-wrap:wrap;gap:4px;margin:12px 0}.ae-filters [aria-pressed=true]{background:#e1be76;color:#141e2b}.ae-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ae-grid button{position:relative;padding:0;overflow:hidden}.ae-grid img{width:100%;height:auto;display:block}.ae-grid b{display:block;padding:4px;font-size:12px}.ae-grid i{position:absolute;top:3px;left:4px;border-radius:50%;background:#76208e;padding:2px 6px}.ae-card-detail img{width:min(100%,280px);height:auto;border-radius:10px}.elemental-game:has(.ae-tabs) .panel-overlay,.elemental-game:has(.ae-tabs) .game-overlay{bottom:calc(60px + env(safe-area-inset-bottom))}.elemental-game:has(.ae-tabs) .detail-panel{max-height:100%}.elemental-game:has(.ae-tabs) .game-dialog{max-height:100%;box-sizing:border-box}.elemental-game:has(.ae-lobby)>.battle-header,.elemental-game:has(.ae-lobby)>.hand-panel{visibility:hidden}

.ae-glory{display:grid;gap:4px;margin:8px 0;padding:8px 10px;background:#0b1727;border:1px solid #846c40;border-radius:8px;color:#f3d99d}.ae-glory progress{width:100%;height:6px;accent-color:#efc36b}.ae-glory span{font-size:11px;color:#c3d7de}.ae-grid button small{display:block;color:#efd595;font:700 10px system-ui;letter-spacing:0}

.ae-trial{display:grid;grid-template-columns:30% 1fr;gap:12px;align-items:center;margin:16px 0;padding:12px;background:#14263a;border:1px solid #967949;border-radius:10px}.ae-trial img{width:100%;border-radius:8px}.ae-trial h2{font:700 21px Georgia;margin:5px 0}.ae-trial button{background:#e1bd74;color:#211b11}.ae-home-actions>button{margin:2px}

.ae-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.ae-trial button:disabled{opacity:.58}


/* Combat effects follow the simulation's release, flight and impact phases. */
.effect{color:#ff9c45;contain:layout style;box-shadow:none}
.effect.water{color:#61e9ff}.effect.earth{color:#d9a664}.effect.air{color:#c3eeff}
.effect.projectile{width:12px!important;height:7px!important;border:0;transform:translate(-50%,-50%) rotate(var(--angle));background:radial-gradient(ellipse at 75% 50%,#fff 0 15%,currentColor 35%,transparent 75%);filter:drop-shadow(0 0 4px currentColor);box-shadow:none}
.effect.projectile:after{width:25px;height:5px;right:50%;border-radius:50%;background:linear-gradient(90deg,transparent,currentColor);opacity:.8}
.effect.projectile.earth{height:10px!important;clip-path:polygon(10% 0,75% 0,100% 40%,80% 100%,0 75%);background:#a9977d}
.effect.projectile.air{border-top:2px solid #e9fbff;border-radius:50%;background:transparent}
.effect.warning{border:2px dashed currentColor;background:radial-gradient(ellipse,transparent 55%,currentColor 150%);box-shadow:inset 0 0 12px currentColor;transform:translate(-50%,-50%) scale(calc(.85 + (1 - var(--life))*.15))}
.effect.warning.red{border-color:#ff8a78}.effect.warning.heal{color:#68ffd9}
.effect.warning.blast:after{content:'';position:absolute;left:50%;top:50%;width:23px;height:23px;border-radius:45%;background:radial-gradient(circle at 70% 70%,#fff5a4,#ff8b22 35%,#873220 75%);box-shadow:-12px -20px 16px #ff7024;transform:translate(calc(-50% - var(--life)*70px),calc(-50% - var(--life)*180px));filter:drop-shadow(0 0 7px #ff8b24)}
.effect.spell{border:0;background:none;animation:none;transform:translate(-50%,-50%);isolation:isolate}
.effect.spell:before,.effect.spell:after{content:'';position:absolute;inset:0;pointer-events:none}
.effect.spell.blast:before{border:3px solid #ffc36c;border-radius:50%;background:radial-gradient(ellipse,#fff8c9 0 9%,#ffcc4ac9 16%,#ff652aa0 35%,#96301555 58%,transparent 70%);transform:scale(calc(.3 + (1 - var(--life))*.9));box-shadow:0 0 20px #ff681f,inset 0 0 20px #ffc36c}
.effect.spell.blast:after{background:repeating-conic-gradient(from 20deg,transparent 0 20deg,#ffcc9a 23deg 25deg,transparent 27deg 40deg);clip-path:polygon(50% 0,60% 30%,95% 15%,80% 45%,100% 65%,65% 65%,55% 100%,40% 70%,0 85%,25% 50%,5% 25%,40% 35%);transform:scale(calc(.3 + (1 - var(--life))*1.2))}
.effect.spell.freeze:before{border:2px solid #b8f6ff;border-radius:50%;background:repeating-conic-gradient(from 30deg,#aff5ff55 0 2deg,transparent 3deg 58deg),radial-gradient(ellipse,#d4ffffaa,transparent 68%);box-shadow:inset 0 0 18px #70dcff,0 0 14px #80deff;transform:scale(calc(.5 + (1 - var(--life))*.55))}
.effect.spell.freeze:after{inset:20%;background:#eaffff;clip-path:polygon(48% 0,53% 0,53% 40%,85% 20%,89% 25%,59% 47%,100% 47%,100% 53%,59% 53%,89% 75%,85% 80%,53% 60%,53% 100%,48% 100%,48% 60%,15% 80%,11% 75%,41% 53%,0 53%,0 47%,41% 47%,11% 25%,15% 20%,48% 40%)}
.effect.spell.storm:before{inset:-70% 5% 10%;background:linear-gradient(#a6ecff55,transparent);clip-path:polygon(46% 0,65% 0,50% 45%,72% 42%,42% 100%,50% 55%,28% 58%);background:#e1faff;filter:drop-shadow(0 0 6px #88d8ff)}
.effect.spell.storm:after{border:2px solid #c2f6ff;border-radius:50%;background:repeating-conic-gradient(from 15deg,transparent 0 36deg,#a3eaff99 40deg 42deg,transparent 46deg 60deg);box-shadow:0 0 18px #8fe0ff;transform:scale(calc(.4 + (1 - var(--life))*.7))}
.effect.spell.heal:before{border:2px solid #86ffde;border-radius:50%;background:radial-gradient(ellipse,#85ffd833,transparent 65%);box-shadow:inset 0 0 15px #61edc7,0 0 14px #61edc7;transform:scale(calc(.5 + (1 - var(--life))*.55))}
.effect.spell.heal:after{content:'+';color:#caffed;text-shadow:-25px 14px #8affcf,25px 5px #8affcf;display:grid;place-items:center;font:700 28px system-ui;transform:translateY(calc((var(--life) - 1)*24px))}
.effect.spell>span{display:none}.effect.heal:not(.spell){background:transparent;border:0;box-shadow:none}.effect.heal:not(.spell):after{content:none}
.effect.slash{border-color:currentColor;box-shadow:0 -3px 7px currentColor}
.effect.burst{border-color:currentColor;background:radial-gradient(ellipse,#fff9,currentColor 22%,transparent 70%);box-shadow:none}
.effect.death{border:0;background:repeating-conic-gradient(currentColor 0 7deg,transparent 8deg 45deg);clip-path:polygon(40% 0,60% 0,55% 35%,100% 15%,100% 35%,65% 50%,100% 80%,80% 100%,55% 65%,40% 100%,20% 90%,35% 60%,0 55%,0 35%,35% 40%);transform:translate(-50%,-50%) scale(calc(1.5 - var(--life)));filter:drop-shadow(0 0 3px currentColor)}
.effect.damage{height:auto!important}.unit.slowed .ae-actor{filter:drop-shadow(0 0 3px #85e6ff)}.unit.frozen .ae-actor{filter:sepia(.5) saturate(.7) hue-rotate(140deg) drop-shadow(0 0 4px #a8edff)}
.unit.frozen:before{background:#b5f6ff66;box-shadow:0 0 0 2px #c1ffff,0 0 10px #83dfff}.unit .ae-actor{transform-origin:50% 80%;will-change:transform}
@media(prefers-reduced-motion:reduce){.unit .ae-actor{will-change:auto}.effect{filter:none}.effect.damage{animation:none}}


/* Directional creature poses: grounded feet, quieter team markers and cast origin. */
.unit .ae-actor{backface-visibility:hidden;image-rendering:auto}
.unit .ae-actor[data-motion=windup]{filter:drop-shadow(0 2px 1px #071120aa) brightness(1.06)}
.unit .ae-actor[data-motion=frozen]{filter:grayscale(.25) drop-shadow(0 0 4px #b4efff)}
.unit:before,.unit.intent-engage:before,.unit.intent-bridge:before{background:#06142170;box-shadow:0 0 0 1px #5fe0ff88;left:25%;right:25%;height:10%}
.unit.red:before,.unit.red.intent-engage:before,.unit.red.intent-bridge:before{box-shadow:0 0 0 1px #ff857b99}
.unit.flying:before{background:#05152444;bottom:-6%;transform:scale(.7);box-shadow:0 0 0 1px #bceaff44}
.unit.flying:not(.player-target):after{display:none}.unit .target-lock{display:none}
.effect.muzzle{border:0;background:radial-gradient(ellipse,#fff 0 15%,currentColor 30%,transparent 70%);filter:drop-shadow(0 0 3px currentColor);transform:translate(-50%,-50%) scale(calc(.4 + var(--life)*.6))}
@media(prefers-reduced-motion:reduce){.unit .ae-actor{transform:none!important}.effect.muzzle{filter:none}}
.effect.footstep{z-index:8;border:0;background:radial-gradient(ellipse,#d7c49f44,transparent 70%);transform:translate(-50%,-20%) scale(calc(1.4 - var(--life)*.5));box-shadow:none}
/* Per-creature projectiles and contact effects retain a readable elemental silhouette. */
.effect.projectile[data-source=glacial]{width:16px!important;height:8px!important;background:linear-gradient(#f3ffff,#6edbff);clip-path:polygon(0 25%,72% 0,100% 50%,72% 100%,0 75%);border-radius:0}
.effect.projectile[data-source=vendaval]{width:16px!important;height:12px!important;border:2px solid #dbf8ff;border-right-color:transparent;border-radius:50%;background:radial-gradient(ellipse,transparent 25%,#83d7fa55 50%,transparent 65%);box-shadow:inset 0 0 3px #baf3ff}
.effect.burst[data-source=glacial]{border:2px solid #c7ffff;background:repeating-conic-gradient(#c8faffbb 0 3deg,transparent 4deg 58deg);box-shadow:0 0 9px #86e7ff77}
.effect.burst[data-source=vendaval]{border:2px solid #dffaff;border-left-color:transparent;border-radius:45% 55%;background:radial-gradient(ellipse,transparent 20%,#afebff44 45%,transparent 65%)}
.effect.slash[data-source=ascua]{border-color:#ffe3aa;box-shadow:0 -3px 7px #ff781b}
.effect.slash[data-source=guijarros]{border-color:#d9ddaa;box-shadow:0 -3px 5px #b0aa7a}
/* Expansion creatures keep distinct cast and impact silhouettes. */
.effect.projectile[data-source=espora]{width:10px!important;height:8px!important;background:radial-gradient(ellipse,#eaffba,#83c932 50%,transparent 75%);color:#91d54e}
.effect.projectile[data-source=salamandra]{width:17px!important;height:8px!important;background:radial-gradient(ellipse at 75% 50%,#fff6bd,#ff901c 35%,#ff3e1477 55%,transparent 75%)}
.effect.projectile[data-source=umbrala]{width:14px!important;height:8px!important;border:1px solid #e5bdff;border-radius:60% 35%;background:radial-gradient(ellipse,#fff0ff,#b063e7 45%,transparent 75%);color:#c285ff}
.effect.burst[data-source=espora]{border-color:#c7ef9c;background:radial-gradient(ellipse,#e7ffb9aa,#87bd5044 45%,transparent 70%)}
.effect.burst[data-source=salamandra]{border-color:#ffb13c;background:radial-gradient(ellipse,#fff1ae,#ff6c2677 35%,transparent 70%)}
.effect.burst[data-source=umbrala]{border-color:#e6c6ff;background:radial-gradient(ellipse,#ffe5ffcc,#a164df55 40%,transparent 70%)}
.effect.slash[data-source=coral]{border-color:#c9ffff;box-shadow:0 -4px 9px #63d9ed}
.effect.heal-wave{border:2px solid #99f5ef;background:radial-gradient(ellipse,transparent 50%,#78eadb33 65%,transparent 75%);box-shadow:none;transform:translate(-50%,-50%) scale(calc(.35 + (1 - var(--life))*.7))}
.effect.heal-wave[data-source=espora]{border-color:#c0ed8f;background:radial-gradient(ellipse,transparent 50%,#a3d86633 65%,transparent 75%)}
.effect.heal-wave:after{content:'+';position:absolute;inset:0;display:grid;place-items:center;color:#e2ffe1;font:700 18px system-ui;opacity:var(--life)}

/* Native game screens. */
.mobile-cursor,.android-navigation-bar{display:none!important}
.ae-ui{background:radial-gradient(ellipse at 80% 0,#1d416a77,transparent 55%),#081421;scrollbar-width:thin;scrollbar-color:#7c704f #081421;font-size:14px;overscroll-behavior:contain}
.ae-ui svg,.ae-tabs-v2 svg{width:24px;height:24px;flex-shrink:0}.ae-ui h1,.ae-ui h2,.ae-ui h3{font-family:Georgia,serif;color:#fff0d2}.ae-ui p{color:#b4c7d5;font:13px/1.5 system-ui;margin:0}.ae-ui small{letter-spacing:.1em}.ae-ui button:focus-visible,.ae-tabs-v2 button:focus-visible{outline:2px solid #8fe8ff;outline-offset:3px}.ae-ui button{font-family:system-ui}.ae-ui button:disabled{cursor:default;opacity:.5}
.ae-ui .ae-library{padding:22px 5% 26px}.ae-page-title{margin-bottom:20px}.ae-page-title>small{color:#d4b771;font:700 10px system-ui;letter-spacing:.18em}.ae-ui .ae-page-title h1{font:700 clamp(28px,7vw,38px)/1.15 Georgia,serif;margin:7px 0}.ae-page-title p{max-width:38em}
.ae-ui .ae-primary{display:flex;justify-content:center;align-items:center;width:100%;min-height:52px;padding:12px;border:1px solid #f5d69c;border-bottom:4px solid #90602b;border-radius:10px;color:#25190e;background:linear-gradient(#ffe5a0,#dfb160 70%,#d39c47);font:800 18px system-ui;box-shadow:inset 0 1px #fff8d0,0 4px 14px #0005;letter-spacing:.01em}.ae-primary>span{display:flex;gap:10px;align-items:center}.ae-ui .ae-secondary{background:linear-gradient(#263d54,#152a3f);border:1px solid #8a9ea9;border-bottom:3px solid #081b2c;border-radius:8px;padding:10px 14px;min-height:42px;color:#edf4f6;font-weight:700}.ae-ui .ae-text,.ae-ui .ae-back{border:0;background:transparent;color:#9fddf0;padding:6px 0;min-height:36px}.ae-ui .ae-back{margin-bottom:12px}.ae-ui .ae-loading{color:#bcd1dd;padding:10px 0;text-align:center}.ae-ui .ae-inline-error{color:#ffc9bd;padding:10px;border:1px solid #b96655;border-radius:7px;background:#54261d55}
.ae-home{min-height:100%;display:flex;flex-direction:column}.ae-profile{display:flex;align-items:center;gap:10px;padding:calc(12px + env(safe-area-inset-top)) 5% 10px;background:linear-gradient(110deg,#102c47,#102031);border-bottom:1px solid #64787e55;z-index:1}.ae-profile-crest{width:40px;height:44px;display:grid;place-items:center;background:linear-gradient(#285c86,#123550);color:#ffe3a3;border:1px solid #c5a773;clip-path:polygon(0 0,100% 0,100% 70%,50% 100%,0 70%)}.ae-profile>div{flex:1}.ae-profile>div small{font-size:8px;color:#b2c7d5;display:block}.ae-profile>div strong{display:block;font-size:16px;margin-top:3px}.ae-profile-glory{display:flex;flex-direction:column;align-items:center;font-size:20px;font-weight:800;color:#f0d395;line-height:1.1}.ae-profile-glory small{font-size:8px;font-weight:600;margin-top:3px}.ae-ui .ae-help{display:grid;place-items:center;width:34px;height:36px;padding:4px;border:1px solid #637786;border-radius:8px;background:#172e43;color:#dbe8ed}
.ae-home-hero{position:relative;min-height:clamp(225px,34dvh,360px);display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:18px 5% 18px;background:linear-gradient(180deg,#08142111,#08142111 40%,#081421 100%),url('/art/arena.png') center 42%/cover;isolation:isolate}.ae-home-hero:before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 50% 15%,#03101d11,#03101d66 85%);z-index:-1}.ae-home-logo{object-fit:contain;width:clamp(145px,45%,220px);max-height:22dvh;border-radius:9px;filter:drop-shadow(0 5px 10px #0006)}.ae-arena-label{text-align:center;text-shadow:0 2px 5px #000}.ae-arena-label small{font-size:9px;color:#f6d78f}.ae-ui .ae-arena-label h1{font:700 clamp(25px,6vw,34px)/1.15 Georgia,serif;margin:5px 0}.ae-ui .ae-arena-label p{font-size:11px;color:#d5e4e7}.ae-home-content{padding:0 5% 14px;margin-top:-5px;z-index:1}.ae-path{background:linear-gradient(120deg,#1a3043,#102031);border:1px solid #63727a77;border-radius:10px;padding:11px 12px;margin:0 0 12px}.ae-path>div{display:flex;justify-content:space-between;align-items:center;gap:8px}.ae-path b{font-size:13px;color:#f0d69c}.ae-path span{font-size:12px;color:#cadce7}.ae-path progress{width:100%;height:6px;accent-color:#d8b66c;margin:7px 0 3px;display:block}.ae-path small{font-size:10px;color:#a8becd;letter-spacing:0}.ae-home-modes{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ae-ui .ae-record{text-align:center;font-size:10px;color:#899eae;margin:11px 0 0}
.ae-ui .ae-deck-strip{display:block;width:100%;padding:10px;margin:12px 0;border:1px solid #4d6377;background:#102337;border-radius:10px;text-align:left}.ae-deck-strip>div{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}.ae-deck-strip img{display:block;width:100%;height:auto;aspect-ratio:.8;object-fit:cover;border:1px solid #aa8a55;border-radius:4px}.ae-deck-strip>span{display:flex;align-items:center;gap:8px;margin-top:7px;font-size:11px;color:#ebdfc5}.ae-deck-strip b{font-size:9px;font-weight:500;color:#b5c9d8}.ae-deck-strip em{font-size:11px;font-style:normal;color:#9addeb;margin-left:auto}
.ae-ui .ae-mode{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:linear-gradient(135deg,#1d334a,#102236);border:1px solid #52677a;border-radius:10px;padding:12px 10px;min-height:78px}.ae-mode-icon{display:grid;place-items:center;flex-shrink:0;width:35px;height:39px;background:#0c1c2e;border:1px solid #8a754a;border-radius:8px;color:#e2c27b}.ae-mode>span:nth-child(2){flex:1;min-width:0}.ae-mode strong{display:block;font:700 13px system-ui;color:#eee6d4}.ae-mode small{display:block;font:10px/1.35 system-ui;letter-spacing:0;color:#a7becd;margin-top:4px}.ae-mode>b{font:20px Georgia;color:#dac38a}.ae-home-modes .ae-mode{align-items:flex-start;gap:7px;flex-wrap:wrap;padding:11px}.ae-home-modes .ae-mode-icon{width:28px;height:31px}.ae-home-modes .ae-mode svg{width:20px;height:20px}.ae-home-modes .ae-mode>b{display:none}
.ae-battle-banner{display:flex;align-items:center;gap:12px;min-height:135px;background:radial-gradient(ellipse at 10% 90%,#77916b44,transparent 55%),linear-gradient(120deg,#17324e,#102030);border:1px solid #a78c57;border-radius:12px;padding:12px;margin-bottom:20px;overflow:hidden}.ae-battle-banner>img{width:34%;max-height:125px;object-fit:contain;filter:drop-shadow(0 4px 4px #0006)}.ae-battle-banner small{font-size:8px;color:#dcbf80}.ae-ui .ae-battle-banner h2{font-size:24px;margin:6px 0}.ae-difficulty{border:0;padding:0;margin:0 0 16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-width:0}.ae-difficulty legend{padding:0 0 9px;color:#d5e3e8;font-size:12px;font-weight:600}.ae-ui .ae-difficulty button{background:#10253a;border:1px solid #4d667b;border-radius:8px;padding:10px 3px;min-height:63px}.ae-difficulty strong{display:block;font-size:12px}.ae-difficulty small{display:block;font-size:9px;letter-spacing:0;font-weight:400;color:#a8becd;margin-top:4px}.ae-ui .ae-difficulty [aria-pressed=true]{background:#214861;border-color:#8ae7f1;box-shadow:inset 0 0 0 1px #66c0d055}.ae-mode-list{display:grid;gap:9px;margin-top:20px}
.ae-trial-progress{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;padding:13px;background:#172f43;border:1px solid #536979;border-radius:10px;margin-bottom:16px}.ae-trial-progress>b{font-size:22px;color:#f0d397;grid-row:span 2;align-self:center}.ae-trial-progress span{font-size:11px;color:#c2d2de}.ae-trial-progress progress{width:100%;height:6px;accent-color:#e4be70}.ae-trial-list{display:grid;gap:14px}.ae-trial-v2{border:1px solid #6e7780;border-radius:12px;overflow:hidden;background:linear-gradient(120deg,#1d344c,#0f2032);display:grid;grid-template-columns:32% 1fr}.ae-trial-v2.current{border-color:#ceac64}.ae-trial-v2.complete{border-color:#719b7d}.ae-trial-art{position:relative;min-height:170px;background:#142b3d}.ae-trial-art img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover;object-position:50% 35%;opacity:.9}.ae-trial-art>b{position:absolute;bottom:8px;left:9px;font:700 32px Georgia;color:#fff1cb;text-shadow:0 2px 5px #000}.ae-trial-body{padding:13px 12px}.ae-trial-body>small{font-size:8px;color:#e4c580}.ae-ui .ae-trial-body h2{font-size:19px;margin:6px 0}.ae-trial-body p{font-size:11px}.ae-trial-body button{margin-top:12px;font-size:11px;width:100%;padding:8px!important}.ae-trial-v2.locked .ae-trial-art img{filter:grayscale(.65);opacity:.45}.ae-trial-list+.ae-primary{margin-top:16px}
.ae-ui .ae-filters{gap:5px;margin:0 0 12px}.ae-ui .ae-filters button{font-size:10px;padding:8px 10px;min-height:33px;border-radius:7px}.ae-ui .ae-kind-filter{padding-bottom:10px;border-bottom:1px solid #56718455}.ae-ui .ae-kind-filter button{flex:1}.ae-ui .ae-filters [aria-pressed=true]{background:#e1c17b;color:#19232d;border-color:#e5ca91}.ae-ui .ae-collection-grid{gap:9px}.ae-ui .ae-collection-grid button{border:1px solid #8b754f;background:#102438;border-radius:9px;box-shadow:0 3px 6px #0004}.ae-collection-grid img{aspect-ratio:.9;object-fit:cover}.ae-ui .ae-collection-grid b{font-size:11px;padding:7px 3px 2px;line-height:1.15;color:#f2e7ce}.ae-ui .ae-collection-grid small{display:block;color:#9db7c8;font:9px system-ui;letter-spacing:0;padding-bottom:8px}.ae-ui .ae-collection-grid i{font:700 13px system-ui;background:linear-gradient(#ce62ea,#711795);border:1px solid #e9a5fa;padding:3px 6px;box-shadow:0 1px 4px #0006}
.ae-card-detail-v2{max-width:440px;margin:auto}.ae-card-preview{display:grid;place-items:center;height:210px;border:1px solid #7d8c93;border-radius:12px;overflow:hidden;position:relative;isolation:isolate;background:radial-gradient(ellipse at 50% 75%,#68c5ee33,transparent 70%),#10283d;margin-bottom:16px}.ae-card-preview.fire{background:radial-gradient(ellipse at 50% 75%,#d8844533,transparent 70%),#2a2028}.ae-card-preview.earth{background:radial-gradient(ellipse at 50% 75%,#9db57733,transparent 70%),#182a29}.ae-card-preview:before{content:'';position:absolute;width:100px;height:18px;border-radius:50%;background:#040d1680;bottom:25px;z-index:-1}.ae-card-preview>img{width:100%;height:100%;object-fit:cover}.ae-preview-sprite{width:185px;aspect-ratio:1;background-size:400% 400%;background-position:0 33.333333%;background-repeat:no-repeat;animation:ae-card-walk .9s step-end infinite;filter:drop-shadow(0 4px 2px #0004)}.ae-ui .ae-element-label{color:#e2c483;font-size:10px;letter-spacing:.04em}.ae-ui .ae-card-detail-v2 h2{font-size:28px;margin:6px 0 10px}.ae-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:15px 0}.ae-stat-grid>div{background:#152b3e;border:1px solid #496174;border-radius:7px;padding:8px 3px;text-align:center}.ae-stat-grid small{display:block;font-size:8px;color:#9fb7c8;letter-spacing:.03em}.ae-stat-grid b{display:block;margin-top:5px;font-size:16px;color:#eee4c9}.ae-card-traits{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:15px}.ae-card-traits span{font-size:10px;padding:5px 7px;background:#233b4c;border:1px solid #4d6674;border-radius:6px;color:#cfe0e8}.ae-card-detail-v2 .ae-path{margin-top:16px}.ae-card-detail-v2 .ae-path p{margin:7px 0;font-size:11px}
.ae-league-hero{border:1px solid #ad8f53;background:radial-gradient(ellipse at 50% 0,#41608b66,transparent 70%),#152b42;text-align:center;padding:20px 16px;border-radius:12px}.ae-league-hero>svg{width:48px;height:48px;color:#e5c47a;filter:drop-shadow(0 2px 5px #0005)}.ae-ui .ae-league-hero h2{font-size:22px;margin:9px 0}.ae-league-hero p{margin-bottom:16px}.ae-ranking-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:22px 0 5px}.ae-ui .ae-ranking-heading h2{font-size:20px}.ae-ranking-heading button{font-size:10px}.ae-ui .ae-rank-you{font-size:10px;color:#8db9d1;margin-bottom:10px}.ae-rank-list{list-style:none;padding:0;margin:12px 0;display:grid;gap:6px}.ae-rank-row{display:flex;gap:10px;align-items:center;min-height:63px;padding:10px;background:#142a3d;border:1px solid #354d60;border-radius:8px}.ae-rank-row.you{border-color:#e3bf70;background:#2f3b43}.ae-rank-position{font-size:18px;color:#a8bfce;width:26px;text-align:center}.ae-rank-row:nth-child(-n+3) .ae-rank-position{color:#efd18b}.ae-rank-row>div{flex:1;min-width:0}.ae-rank-row strong{font-size:11px;overflow-wrap:anywhere}.ae-rank-row small{display:block;font-size:9px;letter-spacing:0;color:#95aec0;margin-top:4px}.ae-rank-points{text-align:right;color:#e6cf94;font-size:17px}.ae-rank-points small{font-size:7px;letter-spacing:.08em}.ae-empty{text-align:center;padding:28px 14px;border:1px dashed #526d82;border-radius:10px;margin-top:14px}.ae-empty>svg{width:36px;height:36px;color:#bba374}.ae-ui .ae-empty h3{margin:12px 0 8px;font-size:20px}.ae-empty button{margin-top:14px}
.ae-tabs-v2{padding-top:4px;border-top:1px solid #aa8d56;box-shadow:0 -4px 12px #0004}.ae-tabs-v2 button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px 2px;min-height:52px;border-radius:8px;color:#9ab0c0}.ae-tabs-v2 button>span{font:600 9px system-ui;display:block}.ae-tabs-v2 svg{width:22px;height:22px}.ae-tabs-v2 [aria-current]{color:#f1d28e;background:linear-gradient(#3a4552,#25374a);border-color:#aa8b50}.elemental-game:has(.ae-tabs) .detail-panel>header{padding:calc(14px + env(safe-area-inset-top)) 5% 12px}.elemental-game:has(.ae-tabs) .detail-panel>footer{padding:10px 5% 12px}.elemental-game:has(.ae-tabs) .panel-content{padding:12px 5% 20px}.collection-card p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.collection-card .card-stats{font-size:9px;gap:3px}.hand-panel .hand-meta{height:auto;min-height:20px}.battle-header{padding-top:calc(7px + env(safe-area-inset-top))}.battle-header .clock strong{font-size:29px}.unit .ae-actor{transition:transform .07s linear}.unit.hit .ae-actor{filter:brightness(1.6) drop-shadow(0 0 2px #fff8)}.unit .ae-actor[data-motion=strike]{filter:brightness(1.12) drop-shadow(0 2px 1px #09132299)}
@keyframes ae-card-walk{0%,24%{background-position:0 33.333333%}25%,49%{background-position:33.333333% 33.333333%}50%,74%{background-position:66.666667% 33.333333%}75%,100%{background-position:100% 33.333333%}}
@media(max-width:360px){.ae-profile>div strong{font-size:14px}.ae-home-hero{min-height:220px}.ae-ui .ae-mode strong{font-size:11px}.ae-home-modes .ae-mode-icon{width:24px}.ae-home-modes .ae-mode{gap:5px;padding:9px}.ae-stat-grid{gap:4px}.ae-deck-strip b{font-size:8px}.ae-trial-body{padding:12px 9px}.ae-ui .ae-trial-body h2{font-size:17px}}
@media(max-height:700px){.ae-home-hero{min-height:205px;padding-top:12px}.ae-home-logo{max-height:140px}.ae-ui .ae-primary{min-height:47px}.ae-home-content{padding-bottom:10px}.ae-profile{padding-top:9px;padding-bottom:8px}.ae-card-preview{height:180px}.ae-preview-sprite{width:160px}}
@media(prefers-reduced-motion:reduce){.ae-preview-sprite{animation:none}.unit .ae-actor{transition:none}}


/* Compact battle framing keeps the arena and four-card hand in view. */
.battle-header.ae-combat-hud{display:grid;grid-template-columns:minmax(0,1fr) 90px minmax(0,1fr) 28px;gap:7px;align-items:center;min-height:69px;padding:calc(6px + env(safe-area-inset-top)) 10px 7px;background:linear-gradient(105deg,#163c60,#101c2e 48%,#44252f);border-bottom:1px solid #ad8f57;box-shadow:0 3px 12px #0006;z-index:30}
.ae-combat-player{display:flex;gap:7px;align-items:center;min-width:0}.ae-combat-player>div{min-width:0}.ae-combat-player strong{display:block;font:700 12px/1.25 system-ui;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff0d3}.ae-combat-player small{display:block;font:9px/1.3 system-ui;color:#b7cfdf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.ae-combat-crest{display:grid;place-items:center;flex:0 0 27px;height:34px;background:linear-gradient(135deg,#1e88bc,#0a2546);border:1px solid #d2b16b;clip-path:polygon(50% 0,100% 14%,92% 73%,50% 100%,8% 73%,0 14%);font:700 27px Georgia;color:#b7f6ff}.red .ae-combat-crest{background:linear-gradient(135deg,#b83e3d,#430c24);color:#ffe7ad}.ae-tower-score{display:flex;gap:3px;margin-top:4px}.ae-tower-score i{width:9px;height:7px;clip-path:polygon(0 0,30% 35%,50% 0,70% 35%,100% 0,90% 100%,10% 100%);background:#617a9080}.ae-tower-score .filled{background:#f5d58b;filter:drop-shadow(0 0 2px #edb444)}
.ae-combat-hud .clock{border:1px solid #a68a5a;border-radius:8px;background:linear-gradient(#172431,#060d18);padding:4px 2px;min-width:0;box-shadow:inset 0 1px #f3dfac22,0 2px 5px #0005;text-align:center}.ae-combat-hud .clock strong{font:800 27px/1.05 system-ui;font-variant-numeric:tabular-nums;color:#fff1d5}.ae-combat-hud .clock span{font:700 8px/1.5 system-ui;letter-spacing:.02em;display:block;color:#c3d2dc;white-space:normal}.ae-combat-hud .clock.overtime{border-color:#d58cea}.ae-combat-hud .clock.overtime span{color:#edb4ff}.ae-combat-hud .clock.urgent strong{color:#ffbd87}.ae-combat-menu{width:28px;height:35px;min-width:0;padding:0;color:#e6d5ac;background:#172a3f;border:1px solid #8b7957;border-radius:6px;font-size:15px}
.hand-panel{box-shadow:0 -5px 16px #02091588,inset 0 1px #efdaa633}.hand .game-card{overflow:visible;transition:transform .13s,border-color .13s,filter .13s}.hand .game-card:not(.unaffordable){border-color:#e2bf76}.hand .game-card.unaffordable{filter:saturate(.45) brightness(.65)}.hand .game-card.selected{filter:none;transform:translateY(-7px);box-shadow:0 0 0 2px #93e9ff,0 0 16px #62deff44}.hand .game-card strong{border-radius:0 0 7px 7px}.energy-row{gap:9px;align-items:center}.energy-value{border:1px solid #e6afff;border-radius:50%;width:38px;height:38px;display:grid;place-content:center;background:radial-gradient(circle at 30% 20%,#dc7ef6,#8924c1 60%,#451166);box-shadow:0 2px 0 #300a4b;font:800 24px/1 system-ui;color:white}.energy-value small{display:none}.energy-track{height:15px;border:1px solid #6b4286;background:#160e27;box-shadow:inset 0 2px 4px #0008;border-radius:4px;overflow:hidden}.energy-track span{border-right:1px solid #160b2a}.energy-track i{box-shadow:inset 0 2px 0 #f7b9ff88,inset 0 -3px 0 #53117b88}.next-card{position:relative;min-width:33px}.next-card:after{content:attr(data-cost);position:absolute;left:-4px;top:12px;font:700 10px/16px system-ui;width:16px;height:16px;border-radius:50%;color:white;background:#9529ba;border:1px solid #e6a9f5}.next-card span{font:700 7px system-ui;letter-spacing:.08em;color:#b1c9da}
.aim-marker{--cast:#7ee8ff;border:2px solid var(--cast);box-shadow:0 0 0 3px #06182a66,0 0 12px #7ee8ff55;background:#6bdfff22;z-index:22;pointer-events:none}.aim-marker[data-element=fire]{--cast:#ffba71}.aim-marker[data-element=earth]{--cast:#e1ce93}.aim-marker[data-element=air]{--cast:#d9f6ff}.aim-marker.invalid,.aim-marker[data-affordable=false]{--cast:#ff6d69;background:#ff505033;box-shadow:0 0 0 2px #600b1833}.ae-deploy-preview{position:absolute;left:50%;bottom:0;transform:translate(-50%,0);aspect-ratio:1;background-size:400% 400%;background-position:33.333333% 0;background-repeat:no-repeat;opacity:.68;filter:drop-shadow(0 0 4px var(--cast));pointer-events:none}.aim-marker.invalid .ae-deploy-preview,.aim-marker[data-affordable=false] .ae-deploy-preview{opacity:.3}
.game-overlay{background:#030b16b8;backdrop-filter:blur(5px)}.game-dialog{width:min(92%,420px);border:1px solid #ba9d63;border-radius:18px;padding:26px 22px 20px;box-shadow:0 20px 65px #0008,inset 0 1px #e9d5a144;background:radial-gradient(ellipse at 50% 0,#37557277,transparent 70%),#0c1b2c}.game-dialog h1{font-family:Georgia,serif;font-size:40px;margin:10px 0 14px;color:#f2d79f}.game-dialog .eyebrow{font:700 9px system-ui;letter-spacing:.18em;color:#a9c0d3}.game-dialog .primary-btn{min-height:48px;border-radius:9px;box-shadow:0 3px 0 #684519,inset 0 1px #fff2ca;font:800 14px system-ui}.game-dialog .dialog-actions button{min-height:40px;border-radius:8px}.game-dialog .text-btn{min-height:38px;color:#b5cadb}.ae-battle-summary{display:flex;gap:5px;margin:16px 0 22px;padding:14px 4px;border-block:1px solid #6c7a8544}.ae-battle-summary>div{flex:1;text-align:center}.ae-battle-summary b{display:block;font:800 23px system-ui;color:#f1d39b}.ae-battle-summary span{display:block;font:9px/1.4 system-ui;color:#a9c1d3;margin-top:4px}.elemental-game[data-result=blue] .game-dialog{border-color:#e2be72;background:radial-gradient(ellipse at 50% 0,#426b9555,transparent 65%),#0c1b2c}.elemental-game[data-result=red] .game-dialog{border-color:#a4776e}.game-dialog .ae-glory{display:inline-block;padding:7px 12px;border:1px solid #a38c4f55;border-radius:6px;background:#75642a22;color:#f3d893;font-size:12px}
/* Elemental arrival, contact shards and water ripples use the combat effect lifetime. */
.effect.spawn{border:2px solid currentColor;background:radial-gradient(ellipse,#fff7,transparent 58%);box-shadow:inset 0 0 13px currentColor;transform:translate(-50%,-50%) scale(calc(.45 + (1 - var(--life))*.65));isolation:isolate}.effect.spawn:before{content:'';position:absolute;inset:-120% 20% 10%;background:linear-gradient(0deg,currentColor,transparent);clip-path:polygon(40% 0,60% 0,100% 100%,0 100%);opacity:calc(var(--life)*.65)}.effect.spawn:after{content:'';position:absolute;inset:15%;border:1px solid #ffffffaa;border-radius:50%}
.effect.burst:after{content:'';position:absolute;inset:-20%;background:currentColor;clip-path:polygon(18% 8%,25% 5%,32% 22%,25% 25%,70% 0,78% 8%,65% 25%,60% 20%,95% 60%,100% 70%,78% 75%,75% 65%,55% 100%,45% 100%,48% 75%,55% 75%,0 65%,0 55%,25% 50%,25% 60%);transform:scale(calc(.25 + (1 - var(--life))*.9));opacity:var(--life)}
.effect.burst.water{background:radial-gradient(ellipse,#eaffffbb,#60e0ff44 30%,transparent 67%);border:2px solid #b2f4ff;border-radius:50%;transform:translate(-50%,-50%) scale(calc(.4 + (1 - var(--life))*.7))}.effect.slash:after{content:'';position:absolute;inset:10%;border-top:2px solid #fff3c3;border-radius:50%;transform:rotate(-25deg);opacity:var(--life)}.effect.projectile[data-source=marea]{width:15px!important;height:10px!important;border-radius:70% 35% 35% 70%;background:radial-gradient(ellipse at 70% 40%,#fff,#83efff 30%,#179bd8 65%,transparent 75%)}.effect.projectile[data-source=cefiro]{width:20px!important;height:7px!important;background:linear-gradient(0deg,transparent,#f2feff,transparent);border-top:1px solid #d8f9ff;border-radius:60%}
@media(max-width:380px){.battle-header.ae-combat-hud{grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr) 26px;gap:5px;padding-inline:7px}.ae-combat-player{gap:4px}.ae-combat-player strong{font-size:10px}.ae-combat-player small{font-size:8px}.ae-combat-crest{flex-basis:22px;height:29px;font-size:22px}.ae-combat-hud .clock strong{font-size:24px}.ae-combat-hud .clock span{font-size:7px}.game-dialog{padding:22px 16px}.hand-panel{padding-inline:8px}}
@media(max-height:600px){.battle-header.ae-combat-hud{min-height:53px;padding-block:4px}.ae-combat-player small{display:none}.ae-combat-hud .clock strong{font-size:22px}.energy-value{height:29px;width:29px;font-size:20px}.game-dialog{padding-block:15px}.game-dialog h1{font-size:30px}.ae-battle-summary{margin:10px 0;padding-block:9px}}
@media(prefers-reduced-motion:reduce){.hand .game-card{transition:none}.effect.spawn:before{display:none}.game-overlay{backdrop-filter:none}}
.ae-combat-hud .ae-combat-menu{position:relative;font-size:0}.ae-combat-menu:before,.ae-combat-menu:after{content:'';position:absolute;top:10px;width:3px;height:13px;border-radius:1px;background:#e7d3a7}.ae-combat-menu:before{left:8px}.ae-combat-menu:after{right:8px}


/* Battle readability: injured units, crowd control and selected-card guidance. */
.ae-selection-info{display:flex;align-items:center;gap:8px;min-width:0;flex:1}.ae-selection-info>span{min-width:0;flex:1}.ae-selection-info b{display:block;color:#fff0cb;font:700 12px/1.2 system-ui}.ae-selection-info small{display:block;font:10px/1.3 system-ui;margin-top:2px;color:#b9d3df;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ae-selection-info .needs-energy{color:#edb7f9}.ae-selection-info .ready-energy{color:#a4e6dc}.hand-meta:has(.ae-selection-info){min-height:36px;gap:8px}.ae-cancel-card{display:grid;place-items:center;flex:0 0 32px;min-width:32px;height:32px;border:1px solid #738d9d;border-radius:6px;background:#122b40;color:#e6edf2;font:22px/1 system-ui;padding:0}.ae-cancel-card:focus-visible{outline:2px solid #a4edff;outline-offset:2px}
.unit .health{height:5px;border:1px solid #071522;border-radius:3px;background:#07121fd9;box-shadow:0 1px 2px #0008;overflow:hidden}.health.blue i{background:linear-gradient(#a1f3ff,#2dbce9 50%,#1879af);box-shadow:inset 0 1px #ffffff66}.health.red i{background:linear-gradient(#ffc2ac,#ee675f 50%,#b72b41);box-shadow:inset 0 1px #ffffff55}.unit[data-critical=true] .health{border-color:#f3c876}.unit[data-critical=true] .health i{background:#ffd27a}.tower[data-critical=true] .health{box-shadow:0 0 0 1px #ffc56b,0 0 7px #ff9e4f77}.tower[data-critical=true] .tower-hp{color:#ffe0a0;border-color:#bd884f;background:#3f241ce6}.tower.destroyed .health{visibility:hidden}.tower.destroyed .tower-hp{font-size:8px;letter-spacing:.04em;color:#b7c4cc;background:#101a26cc;border:1px solid #566470}
.ae-unit-state{position:absolute;right:1px;top:-16px;display:grid;place-items:center;width:18px;height:18px;border:1px solid #a3e9ff;border-radius:5px;background:#0d2b44ed;color:#e3faff;font:12px/1 system-ui;z-index:4;box-shadow:0 1px 4px #0008;pointer-events:none}.unit.slowed:not(.frozen) .ae-unit-state{border-color:#bcb7ed;background:#242642ed}.unit.frozen:before{background:#afeaff44!important;box-shadow:0 0 0 1px #dbffff,0 0 7px #8be9ff!important}.unit.frozen .ae-actor{filter:brightness(1.1) saturate(.5) drop-shadow(0 0 3px #c4f7ff)!important}
@media(max-height:600px){.hand-meta:has(.ae-selection-info){min-height:28px}.ae-selection-info b{font-size:10px}.ae-selection-info small{font-size:9px}.ae-cancel-card{height:26px;min-width:26px;flex-basis:26px}.ae-unit-state{width:15px;height:15px;font-size:10px;top:-13px}}

.ae-deck-tools{margin:16px 0 20px;padding:14px;border:1px solid #6e7a82;border-radius:12px;background:linear-gradient(135deg,#1c354a,#102033)}.ae-ui .ae-deck-tools h2{font-size:19px;margin:0 0 5px}.ae-ui .ae-deck-tools>p{font-size:11px}.ae-deck-balance{display:flex;flex-wrap:wrap;gap:5px;margin:12px 0}.ae-deck-balance span{padding:5px 7px;border:1px solid #536b7b;border-radius:5px;font:10px system-ui;color:#c8dce5;background:#0c2031}.ae-ui .ae-deck-advice{color:#edd29a;margin-bottom:10px}.ae-saved-decks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.ae-saved-decks article{padding:10px 7px;border:1px solid #496277;border-radius:8px;background:#0a1b2c;display:flex;flex-direction:column;gap:8px;min-width:0}.ae-saved-decks article.equipped{border-color:#dcbb74;background:#263340}.ae-saved-decks strong{font:700 11px system-ui;color:#f2dfb8}.ae-saved-decks small{font:10px system-ui;color:#92aabd;min-height:55px;display:grid;place-items:center}.ae-saved-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;min-height:55px}.ae-saved-preview img{width:100%;height:auto;aspect-ratio:.85;object-fit:cover;border-radius:3px}.ae-ui .ae-saved-decks button{width:100%;font-size:10px;min-height:32px;padding:5px}.ae-saved-decks .ae-text{background:transparent;border-color:transparent;color:#b3c9db}.ae-ui .ae-deck-notice{margin-top:8px;color:#b5e5d9;min-height:15px;font-size:10px}@media(max-width:360px){.ae-deck-tools{padding:10px}.ae-saved-decks{gap:5px}.ae-saved-decks article{padding:8px 4px}}

/* Chosen six-screen art direction: sunlit ruins, sapphire panels and gold trim. */
.ae-ui{--gold:#e5bc63;--gold-light:#fff0b2;background:linear-gradient(#081929c9,#071422f2),url('/art/arena.png') center/cover fixed}.ae-ui h1,.ae-ui h2,.ae-ui h3{color:#fff1c7;text-shadow:0 2px 2px #0008}.ae-ui .ae-primary{color:#37210d!important;background:linear-gradient(#fff0b3 0%,#f8ce68 42%,#d69a32 52%,#efc366 100%);border:2px solid #ffe6a1;border-radius:9px;box-shadow:inset 0 0 0 2px #ad711b,0 4px 0 #795024,0 6px 12px #0006;font:800 18px Georgia;letter-spacing:.03em}.ae-ui .ae-primary:hover{filter:brightness(1.06)}.ae-ui .ae-primary:active{transform:translateY(2px);box-shadow:inset 0 0 0 2px #ad711b,0 2px 0 #795024}.ae-ui .ae-secondary,.ae-ui .ae-mode{border-color:#bc9c5c;background:linear-gradient(#28435e,#11243c);box-shadow:inset 0 1px #adc9e333,0 2px 4px #0004;color:#f6e5b9}.ae-tabs-v2{background:linear-gradient(#243748,#08182a);border-top:2px solid #d6b46b;padding-inline:8px}.ae-tabs-v2 button{border-radius:6px;min-height:54px}.ae-tabs-v2 svg{color:#e5d4aa;filter:drop-shadow(0 2px 1px #0007);stroke-width:2}.ae-tabs-v2 [aria-current]{background:linear-gradient(#f1d98e,#b57a28 55%,#765020);border:1px solid #ffedb0;color:#fff6cd;box-shadow:inset 0 0 0 2px #9a742f}.ae-tabs-v2 [aria-current] svg{color:#fff5ca}.ae-tabs-v2 button>span{font-size:10px}
.ae-home-v3{min-height:100%;display:flex;flex-direction:column;background:#0b1b2a}.ae-home-v3 .ae-profile{background:linear-gradient(100deg,#172d42,#122237);border-bottom:1px solid #b99655;padding:calc(9px + env(safe-area-inset-top)) 5% 9px;min-height:62px;flex-shrink:0}.ae-home-v3 .ae-profile-crest{color:#edcf86}.ae-home-v3 .ae-home-hero{flex:1;min-height:clamp(460px,69dvh,730px);padding:12px 4% 15px;background:url('/visual/scenes/guardians-home.webp') center 53%/cover;justify-content:space-between;isolation:isolate}.ae-home-v3 .ae-home-hero:before{background:linear-gradient(#03142422,transparent 30%,transparent 65%,#071726cf)}.ae-home-v3 .ae-home-logo{width:clamp(135px,36%,205px);max-height:155px;mix-blend-mode:normal;border-radius:9px;box-shadow:0 3px 12px #06122255}.ae-hero-actions{width:100%;margin-top:auto;padding-top:200px}.ae-home-v3 .ae-arena-label{margin-bottom:10px;text-shadow:0 2px 5px #000}.ae-home-v3 .ae-arena-label h1{font-size:23px;margin:3px 0}.ae-home-v3 .ae-arena-label small{font:800 9px system-ui;color:#fff2c8;letter-spacing:.16em}.ae-home-v3 .ae-primary{width:min(84%,370px);margin:0 auto 13px;display:block;min-height:56px;font-size:25px}.ae-home-v3 .ae-home-modes{gap:10px;margin:0;display:grid;grid-template-columns:1fr 1fr}.ae-home-v3 .ae-mode{min-height:53px;padding:8px;gap:7px}.ae-home-v3 .ae-mode strong{font-family:Georgia;font-size:14px}.ae-home-v3 .ae-mode small{font-size:9px;color:#d0dce5}.ae-home-v3 .ae-home-content{padding:10px 5% 12px;background:#0b1b2a}.ae-home-v3 .ae-path{padding:9px 12px;margin:0}.ae-home-v3 .ae-record{margin:8px 0 0;font-size:9px}
.ae-page-title{border-bottom:1px solid #bd9a5855;padding-bottom:14px;margin-bottom:17px}.ae-page-title>small{color:#e4c479}.ae-ui .ae-page-title h1{font-size:34px;margin:4px 0 8px}.ae-ui .ae-filters button{border:1px solid #9b855b;background:#152c42;color:#d6e0e5}.ae-ui .ae-filters [aria-pressed=true]{background:linear-gradient(#f2d990,#ba8431);color:#2d210f;border-color:#fff0b7;box-shadow:inset 0 0 0 1px #92702c}.ae-ui .ae-collection-grid{gap:13px 10px}.ae-ui .ae-collection-grid button{border:2px solid #d5ae60;border-radius:9px;box-shadow:inset 0 0 0 1px #fff2c666,0 4px 6px #0006;background:#0c2136;overflow:hidden}.ae-ui .ae-collection-grid img{aspect-ratio:.9;object-position:50% 30%;border-bottom:1px solid #b7985b}.ae-ui .ae-collection-grid b{font-family:Georgia;font-size:13px;color:#fff0ce;padding:7px 2px 3px}.ae-ui .ae-collection-grid i{border:1px solid #f2c4ff;box-shadow:0 2px 3px #0007;font-size:14px}.ae-ui .ae-collection-grid small{padding-bottom:9px;color:#9dc7df}.ae-card-preview{border:2px solid #c7a460}.ae-ui .ae-card-detail-v2 h2{color:#ffe5ab}.ae-stat-grid>div{border-color:#9b834e}.ae-ui .ae-trial-list{position:relative;padding:10px 0 10px 20px;gap:23px}.ae-trial-list:before{content:'';position:absolute;left:5px;top:15px;bottom:15px;width:3px;background:#bfa15e;box-shadow:0 0 7px #f7db7a44}.ae-trial-v2{border:2px solid #bba46b;box-shadow:0 4px 10px #0006;background:linear-gradient(120deg,#193c53,#0b2135);grid-template-columns:33% 1fr}.ae-trial-v2.current{border-color:#ffe6a1;box-shadow:0 0 0 2px #ba8a3266,0 5px 15px #0006}.ae-trial-art{min-height:160px}.ae-trial-art>b{color:#fff0ba;text-shadow:0 3px 4px #000}.ae-trial-v2.complete{border-color:#a2c691}.ae-trial-v2.complete .ae-trial-body>small{color:#b9eaa0}.ae-trial-v2.locked{border-color:#607488}.ae-trial-body .ae-secondary{color:#38240b;background:linear-gradient(#ffe8a4,#d4a246);border-color:#fbe3a0}.ae-league-hero{background:linear-gradient(#112c45aa,#0b1e32f2),url('/art/arena.png') center/cover;border:2px solid #d6b570;padding:24px 16px;border-radius:12px;box-shadow:inset 0 0 25px #66c1ff22}.ae-league-hero>svg{width:76px;height:76px;color:#f2d48a;stroke-width:1.6;filter:drop-shadow(0 0 12px #6ee0ff66)}.ae-rank-row{border-color:#a58c5a;background:linear-gradient(#1c334b,#102237);min-height:57px}.ae-rank-row.you{background:linear-gradient(#225e81,#154365);border-color:#a8e8ff}.ae-rank-points{color:#ffdf8a}.ae-battle-banner,.ae-deck-tools{border-color:#bd9f65}.collection-card{border-color:#b79a5e;border-width:2px;border-radius:9px;box-shadow:0 3px 6px #0005}.collection-card.in-deck{border-color:#f5d27a}.collection-art[data-card]{aspect-ratio:1!important}.deck-summary{border-color:#caac6d}.hand .game-card{border-width:2px;border-color:#daba72}.hand .game-card.selected{border-color:#fff1b3}.battle-header.ae-combat-hud{border-bottom:2px solid #c5a76c}.ae-combat-hud .clock{border-color:#d7b46d}
@media(max-width:380px){.ae-home-v3 .ae-home-hero{min-height:440px}.ae-home-v3 .ae-home-logo{max-height:120px}.ae-home-v3 .ae-arena-label h1{font-size:20px}.ae-home-v3 .ae-mode strong{font-size:12px}.ae-home-v3 .ae-mode small{font-size:8px}.ae-ui .ae-page-title h1{font-size:29px}.ae-ui .ae-collection-grid b{font-size:11px}}
@media(max-height:700px){.ae-home-v3 .ae-home-hero{min-height:430px}.ae-home-v3 .ae-home-logo{max-height:110px}.ae-hero-actions{padding-top:185px}.ae-home-v3 .ae-home-content{padding-top:7px}.ae-home-v3 .ae-arena-label h1{font-size:19px}.ae-home-v3 .ae-primary{min-height:48px;font-size:22px}}


/* Battle deck: eight equipped portraits, followed by a compact card library. */
.ae-equipped-stage{border:1px solid #bb9958;border-radius:12px;padding:12px;background:linear-gradient(145deg,#1a3449,#0b1d30);box-shadow:inset 0 1px #f6de9b33,0 4px 12px #0004;margin:12px 0 20px}.ae-equipped-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 8px}.ae-equipped-card{position:relative;padding:0!important;overflow:visible;border:2px solid #d9b36b!important;border-radius:8px!important;background:#0b2034!important;box-shadow:inset 0 0 0 1px #fff0ad44,0 3px 6px #0008;min-width:0;display:block;color:#fff1c5}.ae-equipped-card img{display:block;width:100%;height:auto;aspect-ratio:.88;object-fit:cover;border-radius:5px 5px 0 0}.ae-equipped-card strong{display:block;padding:6px 2px;font:700 clamp(9px,2.5vw,13px)/1.15 Georgia;text-align:center;min-height:26px}.ae-equipped-card i{position:absolute;top:-5px;left:-5px;display:grid;place-items:center;background:linear-gradient(#d75ef0,#7322ad);color:white;border:1px solid #f6b6ff;border-radius:50%;width:23px;height:25px;font:800 16px system-ui;font-style:normal;box-shadow:0 2px 3px #0007}.ae-equipped-card:hover{filter:brightness(1.08)}.ae-equipped-card:focus-visible{outline:2px solid #a9ebff;outline-offset:3px}.ae-empty-slot{aspect-ratio:.7;border:1px dashed #74909f;border-radius:8px;background:#07142388;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#9aafbc;gap:8px}.ae-empty-slot b{font:700 28px Georgia;opacity:.5}.ae-empty-slot small{font:9px system-ui}.ae-equipped-stage>p{margin:10px 0 0;font:10px/1.4 system-ui;color:#b3cad8}.ae-library-heading{font:700 20px Georgia;color:#f2d99d;margin:18px 0 12px}.collection.ae-deck-library{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ae-deck-library .collection-card{padding:0;overflow:hidden;min-width:0}.ae-deck-library .collection-art[data-card]{aspect-ratio:1!important}.ae-deck-library .collection-card>p,.ae-deck-library .card-stats{display:none}.ae-deck-library .collection-card>strong{display:block;font:700 12px Georgia;color:#ffedc9;padding:7px 3px 3px}.ae-deck-library .collection-card>span{display:block;font:9px/1.3 system-ui;color:#adc7d8;padding:0 3px 8px}.ae-deck-library .deck-tag{font:700 7px system-ui;padding:3px}.ae-deck-library .collection-card.in-deck{border-color:#9fe3e7;box-shadow:0 0 0 1px #77bfcf55}.ae-league-emblem{width:112px;height:112px;object-fit:cover;border-radius:24px;border:2px solid #d4b575;box-shadow:0 0 24px #3fcfff33,0 5px 15px #0005;margin-bottom:4px}.ae-home-v3 .ae-primary>span{display:flex;align-items:center;justify-content:center;gap:10px}.ae-home-v3 .ae-primary svg{flex-shrink:0}.ae-ui .ae-league-hero h2{font-size:25px}.ae-league-hero .ae-primary{margin-top:18px}.ae-ui .ae-ranking-heading h2{font-family:Georgia;color:#f3d99b}@media(max-width:360px){.ae-equipped-stage{padding:9px}.ae-equipped-grid{gap:10px 6px}.ae-equipped-card strong{font-size:9px;min-height:25px}.ae-equipped-card i{width:19px;height:21px;font-size:13px}.ae-deck-library .collection-card>strong{font-size:10px}}
/* Directional contact arcs and restrained impact flashes preserve unit silhouettes. */
.effect.slash{transform:translate(-50%,-50%) rotate(var(--impact-angle,0deg));border:0;background:transparent;box-shadow:none}.effect.slash:before{content:'';position:absolute;inset:12%;border-right:3px solid currentColor;border-radius:50%;transform:scale(calc(.55 + (1 - var(--life))*.6));box-shadow:3px 0 5px currentColor}.effect.slash:after{border-top:0;border-right:2px solid #fff3c3;inset:24%;transform:rotate(-20deg);box-shadow:none}.unit .ae-actor[data-motion=windup]{filter:brightness(1.07) drop-shadow(0 2px 2px #06122199)}.unit .ae-actor[data-motion=recovery]{filter:drop-shadow(0 2px 1px #06122199)}.unit.hit .health{border-color:#ffedc6}.effect.damage{font-weight:800;text-shadow:0 1px 1px #000,1px 0 #000,-1px 0 #000}.effect.damage.water{color:#a5f1ff}.effect.damage.fire{color:#ffd49a}.unit .health i{transition:width .08s linear}.unit.frozen .health i{background:#b9f1ff}.effect.projectile{z-index:130;pointer-events:none}.effect.slash,.effect.burst{pointer-events:none}@media(prefers-reduced-motion:reduce){.unit .health i{transition:none}.effect.slash:before{box-shadow:none}}
/* Lifetimes follow the simulation, so pause also freezes floating damage and debris. */
.effect.damage{transform:translate(-50%,calc(-50% - (1 - var(--life))*25px));opacity:clamp(0,var(--life)*2,1)}.effect.damage span{font-size:13px;color:#fff2cf}.effect.heal:not(.spell){transform:translate(-50%,calc(-50% - (1 - var(--life))*20px))}.effect.hit{transform:translate(-50%,-50%) scale(calc(.55 + (1 - var(--life))*.8));background:radial-gradient(circle,#fff 0 10%,currentColor 25%,transparent 65%);border-color:currentColor;box-shadow:none}.effect.tower-fall{z-index:145;border:2px solid currentColor;background:radial-gradient(ellipse,#eaffff88,currentColor 15%,transparent 60%);transform:translate(-50%,-50%) scale(calc(.25 + (1 - var(--life))*1.3));box-shadow:inset 0 0 12px currentColor;isolation:isolate}.effect.tower-fall:before{content:'';position:absolute;inset:-10%;background:repeating-conic-gradient(from 15deg,currentColor 0 7deg,transparent 9deg 43deg);clip-path:polygon(45% 0,55% 0,60% 35%,95% 10%,100% 25%,70% 50%,100% 75%,90% 90%,60% 65%,55% 100%,40% 100%,40% 70%,5% 95%,0 75%,30% 50%,0 25%,10% 5%,40% 35%);opacity:var(--life)}.effect.tower-fall:after{content:'';position:absolute;inset:25%;border:2px solid #f3fdff;border-radius:50%;opacity:var(--life)}.tower.destroyed img{filter:grayscale(.7) brightness(.45);opacity:.28;transform:translateY(6px) scale(.88);transform-origin:center bottom}.tower.hit:not(.destroyed) img{filter:brightness(1.22) drop-shadow(0 3px 2px #0007)}.unit .health{z-index:3}.unit.blue:not(.frozen) .ae-actor{filter:drop-shadow(0 2px 1px #061322aa) drop-shadow(0 0 .6px #a9edff55)}.unit.red:not(.frozen) .ae-actor{filter:drop-shadow(0 2px 1px #061322aa) drop-shadow(0 0 .6px #ffb9a955)}.unit.hit .ae-actor{filter:brightness(1.45) drop-shadow(0 2px 1px #061322aa)!important}@media(prefers-reduced-motion:reduce){.effect.damage,.effect.heal:not(.spell){transform:translate(-50%,-50%)}.effect.tower-fall:before{display:none}}

/* Cleaner battle view: larger creature silhouettes, quiet scenery, no combat numbers. */
.effect.damage,.effect.heal>span{display:none!important}.arena-background{filter:saturate(.72) brightness(.87);transition:filter .2s}.unit .ae-actor{transition:none!important;backface-visibility:hidden}.unit .health{width:52%;height:5px;left:24%;border-color:#061521;box-shadow:0 1px 3px #000b}.unit:before,.unit.intent-engage:before,.unit.intent-bridge:before{left:28%;right:28%;height:11%;background:#04111cb0;box-shadow:0 0 0 1px #91d9f577}.unit.red:before{box-shadow:0 0 0 1px #f3918177}.unit.blue:not(.frozen) .ae-actor,.unit.red:not(.frozen) .ae-actor{filter:drop-shadow(0 3px 2px #03101dc0) contrast(1.1) saturate(1.12)}.unit.summoning{opacity:.9}.unit.hit .ae-actor{filter:brightness(1.25) drop-shadow(0 3px 2px #03101dc0)!important}.unit.flying:before{bottom:0;transform:scale(.65);opacity:.6}.unit .ae-unit-state{right:15%;top:-13px}.tower:not(.destroyed) img{filter:drop-shadow(0 3px 2px #03101da0)}.tower.red:not(.destroyed) img{filter:hue-rotate(140deg) saturate(1.25) drop-shadow(0 3px 2px #03101da0)}.effect.hit{width:9px!important;height:9px!important;opacity:.8}.effect.footstep{opacity:.45}.relic span{font-size:7px;letter-spacing:.04em}.arena-message{background:#071726e6;font-size:10px}.deploy-zone{background:#53bce711}@media(prefers-reduced-motion:reduce){.arena-background{transition:none}}

.ae-ui .ae-history-link{display:block;margin:14px 0;width:100%;min-height:40px;background:#152e43;border:1px solid #b69a60;color:#f3deb2;border-radius:8px;font-size:12px}.ae-history-list{display:grid;gap:14px;margin-top:18px}.ae-history-row{padding:15px;border:1px solid #8b6a62;border-left:4px solid #cf7d70;background:#14283c;border-radius:10px}.ae-history-row.blue{border-left-color:#77d4e4}.ae-history-row.draw{border-left-color:#d8c58d}.ae-history-row header{display:flex;justify-content:space-between;align-items:center;font:700 22px Georgia;color:#f2d7a1}.ae-history-row.blue header strong{color:#a4e7ef}.ae-ui .ae-history-row p{font-size:11px;margin:8px 0 4px}.ae-history-row>small{font:10px system-ui;color:#93adbf;letter-spacing:0}.ae-history-deck{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;margin:13px 0}.ae-history-deck img{width:100%;height:auto;aspect-ratio:.85;object-fit:cover;border:1px solid #b49b69;border-radius:4px}.ae-history-row button{width:100%;min-height:39px;font-size:12px}

/* Combat art pass: complete silhouettes, substantial towers, readable health plaques. */
.hand-panel{padding-inline:12px;padding-bottom:calc(9px + env(safe-area-inset-bottom))}
.hand{gap:10px;padding-top:8px}
.hand .game-card{height:clamp(102px,15dvh,145px);isolation:isolate;border:2px solid #e0bc73;border-radius:10px;box-shadow:inset 0 0 0 2px #574323,0 4px 0 #030e1b,0 6px 8px #0007}
.hand .game-card[data-kind=creature]{background-image:url('/art/arena.png')!important;background-position:50% 70%!important;background-size:auto 280%!important;background-color:#10283d}
.ae-hand-body{position:absolute;inset:4% 1% 15%;width:98%;height:81%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 2px #02101dd9)}
.hand .game-card strong{position:absolute;z-index:2;bottom:0;left:0;right:0;padding:11px 2px 5px;font-size:clamp(10px,2.6vw,14px);text-shadow:0 2px 2px #000}
.hand .game-card strong small{font-size:clamp(8px,2vw,10px);margin-top:2px;color:#e1d5b5}
.hand .cost{width:27px;height:29px;top:-5px;left:-4px;font-size:20px;line-height:25px;border:1px solid #ffdcff;box-shadow:0 2px 4px #0009;z-index:3}
.hand .game-card.selected{transform:translateY(-9px);outline:1px solid #b4f4ff;outline-offset:2px}
.hand .game-card.unaffordable{filter:saturate(.65) brightness(.76)}
.energy-row{margin-top:10px}
.next-card{width:42px;flex-shrink:0}.next-card i{width:32px;height:35px}.next-card span{font-size:8px}
.arena .tower{width:clamp(82px,19%,114px);transform:translate(-50%,-60%)}
.arena .tower.main{width:clamp(110px,25%,150px)}
.arena .tower.red.main{transform:translate(-50%,-32%)}
.arena .tower.blue.main{transform:translate(-50%,-74%)}
.tower>.health{position:absolute;z-index:3;left:13%;top:8%;width:74%;height:12px;margin:0;border:1px solid #e2c58b;border-radius:3px;background:#0a1520;box-shadow:0 2px 3px #000b}
.tower>.tower-hp{z-index:4;top:calc(8% - 1px);bottom:auto;min-width:58%;background:none;border:0;padding:0;font:800 11px/14px system-ui;color:#fff7db;text-shadow:0 1px 2px #000,1px 0 2px #000}
.tower.main>.health{top:15%;height:14px}.tower.main>.tower-hp{top:15%;font-size:12px;line-height:14px}
.tower.destroyed>.tower-hp{top:65%;background:#0c1726dd;font-size:8px;padding:2px}
.tower.red:not(.destroyed)>img{filter:hue-rotate(155deg) saturate(1.05) drop-shadow(0 4px 3px #03101dbb)}
.tower.blue:not(.destroyed)>img{filter:saturate(1.12) drop-shadow(0 4px 3px #03101dbb)}
.tower.hit:not(.destroyed)>img{filter:brightness(1.55) drop-shadow(0 3px 3px #fff5)}
@media(max-width:380px){.hand-panel{padding-inline:9px}.hand{gap:7px}.hand .cost{width:24px;height:26px;font-size:18px;line-height:23px}.tower>.tower-hp{font-size:10px}}
@media(max-height:650px){.hand .game-card{height:clamp(68px,14dvh,95px)}.hand .cost{width:22px;height:24px;font-size:16px;line-height:21px}.hand .game-card strong{font-size:10px;padding-top:5px}.hand .game-card strong small{display:none}.hand-panel{padding-bottom:calc(5px + env(safe-area-inset-bottom))}.energy-row{margin-top:6px}.arena .tower{width:78px}.arena .tower.main{width:102px}}

/* Elevated projectiles keep a ground shadow while the payload crosses the arena. */
.ae-shot-shadow{position:absolute;z-index:7;width:12px;height:4px;border-radius:50%;background:#020b15;filter:blur(1px);transform:translate(-50%,-50%);pointer-events:none}
.effect.projectile:after{content:'';position:absolute;top:50%;right:45%;width:32px;height:5px;transform:translateY(-50%);pointer-events:none}
.effect.projectile.fire{width:18px!important;height:11px!important;filter:drop-shadow(0 0 4px #ff903c)}
.effect.projectile.fire:after{background:linear-gradient(90deg,transparent,#fc692666,#ffce70);width:34px;height:7px}
.effect.projectile.water:after{background:linear-gradient(90deg,transparent,#4fcdf866,#d4ffff);width:27px;height:4px}
.effect.projectile.air:after{background:linear-gradient(90deg,transparent,#bdedff88);height:2px;width:35px}
.effect.projectile.earth:after{background:#ae997599;filter:blur(2px);width:15px;height:6px}
.unit .ae-actor{transform-origin:50% 82%}
.unit[data-element=fire]:has([data-motion=windup]) .ae-actor{filter:brightness(1.15) drop-shadow(0 0 4px #fba95699)}
.unit[data-element=water]:has([data-motion=windup]) .ae-actor{filter:brightness(1.12) drop-shadow(0 0 4px #77dbff88)}
.unit[data-element=air]:has([data-motion=windup]) .ae-actor{filter:brightness(1.12) drop-shadow(0 0 3px #d9f4ff99)}
.unit:has([data-motion=windup]):before{opacity:.9;transform:scale(1.12,.85)}
.unit.flying:after{display:none}
.effect.muzzle{border:0!important;box-shadow:none!important;background:radial-gradient(ellipse,#fff2c4 5%,currentColor 30%,transparent 65%);transform:translate(-50%,-50%) scale(calc(.4 + var(--life)*.5));pointer-events:none}
@media(prefers-reduced-motion:reduce){.ae-shot-shadow{display:none}.effect.projectile:after{width:14px!important;filter:none}.unit:has([data-motion=windup]) .ae-actor{filter:brightness(1.08)}}

.ae-fallen-actor{position:absolute;aspect-ratio:1;background-size:400% 400%;background-repeat:no-repeat;transform-origin:50% 82%;pointer-events:none;filter:grayscale(.35) drop-shadow(0 3px 2px #03101da0)}
.hand .game-card[data-kind=creature]{background-color:#718a9d;background-blend-mode:multiply}
@media(prefers-reduced-motion:reduce){.ae-fallen-actor{transform:translate(-50%,-65%)!important}}


/* Reference V4: theatrical ruins, gilded frames and compact mobile composition.
   Presentation only: no arena coordinates, targeting or combat timing changes. */
.ae-ui{--ae-metal:#e8bd64;--ae-ink:#09172a;--ae-light:#fff2c4;--ae-panel:linear-gradient(155deg,#243e57,#0b1c31 75%);background:linear-gradient(180deg,#0616278a,#07172ce8 48%,#061323e8),url('/art/arena.png') center/cover}
.ae-ui .ae-library{padding:calc(10px + env(safe-area-inset-top)) 4% 22px;min-height:100%;box-sizing:border-box}
.ae-ui .ae-page-title{position:relative;margin:0 0 13px;padding:10px 13px 11px;border:1px solid #d9b66f;border-radius:5px;background:linear-gradient(120deg,#293e53,#101d30 65%);box-shadow:inset 0 0 0 2px #090f1d,inset 0 1px 0 3px #ffffff18,0 3px 7px #0008}
.ae-ui .ae-page-title h1{font-size:clamp(23px,6vw,32px);line-height:1.05;margin:3px 0 4px}
.ae-ui .ae-page-title>small{font-size:9px;letter-spacing:.13em}.ae-ui .ae-page-title p{font-size:11px;line-height:1.35}
.ae-ui .ae-primary{position:relative;min-height:49px;border-radius:7px;background:linear-gradient(180deg,#fff4bc 0%,#ffdb77 26%,#ebad43 48%,#c98b28 52%,#f3c467 85%,#ffe3a0 100%);border:2px solid #ffecb1;box-shadow:inset 0 0 0 2px #9c651d,inset 0 0 0 4px #fce3a86b,0 3px 0 #744a18,0 5px 9px #0009;text-shadow:0 1px #ffe7a7}
.ae-ui .ae-primary:disabled{filter:grayscale(.4)}
.ae-tabs-v2{gap:3px;padding-inline:4px;background:linear-gradient(180deg,#33475d,#14283f 20%,#091727 90%);border-top:2px solid #f1d18a;box-shadow:0 -2px 0 #735223,0 -5px 12px #0007}
.ae-tabs-v2 button{border:1px solid #b99c645c;border-radius:4px;min-width:0;gap:3px;background:linear-gradient(#243a50,#102236);color:#e8ddc4}
.ae-tabs-v2 [aria-current]{border-color:#fff2b5;background:linear-gradient(#f9e5a0,#ce983c 46%,#805218 95%);box-shadow:inset 0 0 0 2px #a5722d,0 0 8px #ffca6b55;color:#fff8dc}
.ae-tabs-v2 svg{filter:drop-shadow(0 2px 1px #0009);color:#f1da9e}
.ae-tabs-v2 button>span{font-size:clamp(9px,2.35vw,11px);white-space:nowrap}
/* Remove the tall empty spacer: the illustration is the actual home composition. */
.ae-home-v3{position:relative;isolation:isolate;min-height:100%;background:#081a2b}
.ae-home-v3 .ae-home-hero{position:relative;min-height:clamp(385px,calc(100dvh - 148px - env(safe-area-inset-bottom)),770px);padding:calc(10px + env(safe-area-inset-top)) 5% 15px;background-position:50% 48%;flex:1;box-sizing:border-box}
.ae-home-v3 .ae-home-hero:before{background:linear-gradient(180deg,#06132128,transparent 37%,transparent 56%,#061626bc 84%,#061626e8)}
.ae-home-v3 .ae-home-logo{width:clamp(170px,49%,240px);height:clamp(88px,15dvh,145px);max-height:none;border-radius:0;box-shadow:none;filter:drop-shadow(0 3px 5px #061527c0);object-fit:contain}
.ae-home-v3 .ae-profile{position:absolute;z-index:4;top:calc(clamp(88px,15dvh,145px) + 18px + env(safe-area-inset-top));left:5%;right:5%;min-height:49px;padding:5px 8px;border:1px solid #e5c47d;border-radius:6px;background:linear-gradient(100deg,#263b52f5,#0e2036f5);box-shadow:inset 0 0 0 2px #081322,0 3px 7px #0008}
.ae-home-v3 .ae-profile-crest{flex-shrink:0;color:#f8dd8d}.ae-home-v3 .ae-profile-glory{color:#ffe0a0}
.ae-home-v3 .ae-help{min-width:32px;height:32px}
.ae-home-v3 .ae-hero-actions{padding-top:clamp(105px,24dvh,260px);margin-top:auto}
.ae-home-v3 .ae-arena-label{display:inline-block;padding:4px 14px;margin-bottom:8px;background:#0b1e30b5;border:1px solid #dab66c70;border-radius:5px}
.ae-home-v3 .ae-arena-label h1{font-size:18px;margin:1px 0}
.ae-home-v3 .ae-primary{width:min(84%,390px);min-height:52px;font-size:25px;margin-bottom:10px}
.ae-home-v3 .ae-home-modes{gap:8px}.ae-home-v3 .ae-mode{flex-wrap:nowrap;align-items:center;justify-content:center;min-height:48px;border:1px solid #c7a265;border-radius:6px;background:linear-gradient(#344b65,#11283f);box-shadow:inset 0 0 0 2px #102139,0 3px 5px #0008}
.ae-home-v3 .ae-mode:first-child{background:linear-gradient(#514b84,#27284d)}.ae-home-v3 .ae-mode strong{font-size:13px}
.ae-home-v3 .ae-home-content{margin:0;padding:7px 5% 8px;background:#0b1c2d;border-top:1px solid #ba9858}
.ae-home-v3 .ae-path{padding:7px 10px}.ae-home-v3 .ae-record{margin-top:4px}
/* Illustrated cards share the same metal frame, readable nameplate and real mastery. */
.ae-ui .ae-filters{gap:4px;margin-bottom:8px}.ae-ui .ae-kind-filter{padding-bottom:6px}
.ae-ui .ae-filters button{flex:1 1 auto;min-height:32px;padding:6px 5px;white-space:nowrap;border-radius:4px;font-size:10px}
.ae-ui .ae-collection-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 8px}
.ae-ui .ae-collection-grid button,.ae-equipped-card,.ae-deck-library .collection-card{position:relative;border:2px solid #e2b96c!important;border-radius:7px!important;background:linear-gradient(#1c354c,#091a2f)!important;box-shadow:inset 0 0 0 1px #fff2b8,0 3px 5px #0008}
.ae-ui .ae-collection-grid img{aspect-ratio:.99;object-fit:cover;object-position:center 32%;border-bottom:1px solid #c19e58}
.ae-ui .ae-collection-grid b,.ae-equipped-card strong{background:linear-gradient(#24374b,#0c1c30);text-shadow:0 2px 2px #000;color:#fff1cd;letter-spacing:.025em;text-transform:uppercase;font-size:clamp(9px,2.6vw,13px);padding:5px 2px 2px;line-height:1.12}
.ae-ui .ae-collection-grid i,.ae-equipped-card i{background:radial-gradient(circle at 32% 22%,#f4a7ff,#a02bd0 48%,#53207f 85%);border:1px solid #ffe4ff;box-shadow:0 2px 3px #000a}
.ae-mastery-mini{display:block!important;padding:3px 5px 5px;background:#091b2e;color:#c3e9f8;text-align:left;font:600 9px/1.15 system-ui}
.ae-mastery-mini>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:3px}
.ae-mastery-mini progress{display:block;width:100%;height:6px;accent-color:#45bceb;border:0;background:#061321;border-radius:2px}
.ae-mastery-mini progress::-webkit-progress-bar{background:#061321;border-radius:2px}
.ae-mastery-mini progress::-webkit-progress-value{background:linear-gradient(#99eaff,#329bd3);border-radius:2px}
.ae-mastery-mini progress::-moz-progress-bar{background:#45bceb}
.ae-equipped-stage{padding:9px;margin:8px 0 13px;background:var(--ae-panel,linear-gradient(#234059,#0d2032));border-radius:6px}
.ae-equipped-grid{gap:9px 7px}.ae-equipped-card img{aspect-ratio:1;object-position:center 30%}.ae-equipped-card strong{min-height:24px}
.ae-equipped-stage>p{font-size:10px;margin-top:6px}.ae-library-heading{margin:10px 0 8px}
.collection.ae-deck-library{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.ae-deck-library .collection-card>strong{font-size:10px;text-align:center}.ae-deck-library .collection-card>span{font-size:8px;text-align:center}
/* Challenge journey: landscape chapter plaques, artwork on the right. */
.ae-ui .ae-library:has(.ae-trial-list){background:linear-gradient(#0a1d2d42,#06192bd4),url('/art/arena.png') center/cover}
.ae-ui .ae-trial-list{padding:8px 0 15px 16px;gap:15px}
.ae-ui .ae-trial-list:before{left:4px;width:3px;background:linear-gradient(#b0e9ef,#cfb06b,#6b5c43);box-shadow:0 0 6px #97e5ff}
.ae-trial-v2{position:relative;grid-template-columns:minmax(0,1fr) 34%;border-radius:6px;background:linear-gradient(110deg,#213e56,#0b2036);box-shadow:inset 0 0 0 2px #091724,0 4px 8px #0008}
.ae-trial-art{grid-column:2;grid-row:1;min-height:124px;background:#10283e;overflow:hidden}
.ae-trial-art img{object-position:50% 35%;opacity:1;mask-image:linear-gradient(90deg,transparent,black 24%)}
.ae-trial-art>b{left:auto;right:8px;bottom:7px;font-size:26px}
.ae-trial-body{grid-column:1;grid-row:1;padding:10px 6px 10px 12px;min-width:0}
.ae-ui .ae-trial-body h2{font-size:clamp(16px,4.4vw,21px);margin:4px 0;line-height:1.1}
.ae-trial-body p{font-size:10px;line-height:1.3}.ae-trial-body button{margin-top:7px;min-height:34px!important;font-size:10px}
.ae-trial-v2.current{border-color:#ffdd8d;box-shadow:0 0 0 1px #ffd27699,0 0 14px #ffc35c55,0 4px 8px #0009}
.ae-trial-v2.complete{border-color:#9cce96}.ae-trial-v2.complete .ae-secondary{background:linear-gradient(#326a42,#183e2a);color:#e8ffd9;border-color:#a1c68e}
.ae-trial-v2.locked .ae-secondary{color:#c2ccd5;background:#263849;border-color:#647388}
.ae-league-hero{padding:14px 12px 18px;background:linear-gradient(#12355033,#0a1c30ec 80%),url('/art/arena.png') center 25%/cover;border-radius:6px}
.ae-league-emblem{width:clamp(105px,32vw,155px);height:auto;aspect-ratio:1;border:0;border-radius:12px;box-shadow:none;filter:drop-shadow(0 2px 12px #64dcff55)}
.ae-ui .ae-league-hero h2{font-size:21px}.ae-league-hero .ae-primary{margin-top:12px}
.ae-rank-row{min-height:48px;border-radius:5px;border-color:#b39660;background:linear-gradient(#253b53,#101f30)}
.ae-rank-row.you{border-color:#a8e9ff;background:linear-gradient(#267ca0,#174161)}
/* Actual arena geometry stays intact; lift stone, vegetation, and water instead of darkening it. */
.arena-background{filter:saturate(.98) brightness(1.03) contrast(1.035)}
.battle-header.ae-combat-hud{background:linear-gradient(105deg,#204c78,#111f32 48%,#5b2528);border-bottom:2px solid #e7c47b;box-shadow:inset 0 -2px #5c4529,0 2px 5px #0007}
.ae-combat-hud .clock{background:linear-gradient(#26384a,#071321);border:1px solid #e1bd72;border-radius:5px;box-shadow:inset 0 0 0 1px #392d20}
.hand-panel{background:linear-gradient(#283f59,#11243c 25%,#08172b 85%);border-top:2px solid #d5b16b}
.hand .game-card[data-kind=creature]{background-image:var(--portrait)!important;background-size:cover!important;background-position:center 33%!important;background-blend-mode:normal}
.hand .game-card[data-kind=creature] .ae-hand-body{visibility:hidden}
.hand .game-card strong{font-family:Georgia,serif;font-size:clamp(9px,2.5vw,13px);text-transform:uppercase;padding:11px 2px 5px}
.hand .game-card strong small{font-family:system-ui;text-transform:none}
.energy-track i{background:linear-gradient(#f7b4ff,#d44ef2 48%,#8827bc 52%,#af38d5);box-shadow:inset 0 1px #ffffff8c}
.unit .health{height:5px;box-shadow:0 1px 2px #000e}.unit.blue .health{border-color:#18354d}.unit.red .health{border-color:#4e2121}
.effect.damage,.effect.heal>span{display:none!important}
@media(max-width:360px){.ae-ui .ae-library{padding-inline:3%}.ae-ui .ae-filters button{font-size:9px;padding-inline:4px}.ae-home-v3 .ae-mode strong{font-size:11px}.ae-home-v3 .ae-mode small{font-size:8px}.ae-ui .ae-collection-grid{gap:8px 6px}.ae-equipped-grid{gap:8px 5px}.collection.ae-deck-library{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-height:650px){.ae-home-v3 .ae-home-hero{min-height:385px}.ae-home-v3 .ae-home-logo{height:88px}.ae-home-v3 .ae-profile{top:calc(104px + env(safe-area-inset-top))}.ae-home-v3 .ae-hero-actions{padding-top:100px}.ae-home-v3 .ae-primary{min-height:45px;font-size:21px}.ae-home-v3 .ae-home-modes .ae-mode{min-height:42px}.ae-home-v3 .ae-arena-label h1{font-size:15px}}
@media(prefers-reduced-motion:reduce){.arena-background{transition:none}.ae-ui .ae-primary:active{transform:none}}


/* Combat V5: physically legible elemental payloads, contact shadows and impact debris. */
.effect.fire{color:#ffb461;--fx-core:#fff4b0;--fx-edge:#ff6c22}
.effect.water{color:#9eefff;--fx-core:#ecffff;--fx-edge:#1f9fda}
.effect.air{color:#e1f8ff;--fx-core:#fff;--fx-edge:#9fd3ed}
.effect.earth{color:#d6b780;--fx-core:#f3dbac;--fx-edge:#a0804b}
.effect[data-source=espora],.effect.spell.heal,.effect.heal-wave{color:#8aebaa;--fx-core:#e4ffb5;--fx-edge:#4bc477}
.effect[data-source=umbrala]{color:#c594ff;--fx-core:#fff0ff;--fx-edge:#9250d9}
.ae-fx-particle{position:absolute;display:block;pointer-events:none;z-index:1;width:clamp(2px,5%,6px);height:clamp(2px,8%,8px);border-radius:50%;background:var(--fx-core,#fff4d3);box-shadow:0 0 4px var(--fx-edge,currentColor);transform-origin:center;will-change:auto}
.effect.earth .ae-fx-particle,.effect.spell.freeze .ae-fx-particle,.effect.tower-fall .ae-fx-particle{border-radius:0;clip-path:polygon(50% 0,95% 35%,70% 100%,0 65%);width:clamp(3px,8%,9px);height:clamp(3px,10%,12px);background:linear-gradient(140deg,var(--fx-core),var(--fx-edge));box-shadow:none}
.effect.air .ae-fx-particle{width:clamp(4px,12%,13px);height:2px;border-radius:50%}
.effect.heal-wave .ae-fx-particle,.effect.spell.heal .ae-fx-particle{border-radius:2px;box-shadow:0 0 6px #7ffcbb}
.effect.footstep .ae-fx-particle{background:#d6c7a280;box-shadow:none;filter:blur(.5px)}
.effect.projectile.fire{width:22px!important;height:12px!important;background:radial-gradient(ellipse at 74% 46%,#fff 0 7%,#fff2a0 18%,#ffa329 42%,#ee4b18 60%,transparent 76%);border-radius:60% 45% 45% 60%;filter:drop-shadow(0 0 4px #fa8b22)}
.effect.projectile.fire:after{right:55%;width:clamp(20px,9vw,47px);height:10px;background:linear-gradient(90deg,transparent,#e64e1940 18%,#ff7b2eaa 60%,#fff19c);clip-path:polygon(0 50%,45% 30%,85% 0,100% 25%,100% 75%,85% 100%,45% 70%)}
.effect.projectile[data-source=brasa]{width:24px!important;height:13px!important}
.effect.projectile[data-source=salamandra]{width:19px!important;height:10px!important}
.effect.projectile.water:after{right:55%;width:34px;height:8px;border-radius:90% 20% 40% 90%;background:linear-gradient(90deg,transparent,#45b6e88c 45%,#e9ffff);clip-path:polygon(0 50%,50% 22%,100% 5%,100% 95%,40% 78%)}
.effect.projectile[data-source=marea]{width:20px!important;height:12px!important;background:radial-gradient(ellipse at 72% 35%,#fff 0 8%,#c2ffff 17%,#5de2f9 40%,#158bcc 67%,transparent 76%);filter:drop-shadow(0 0 3px #49d3ff)}
.effect.projectile[data-source=glacial]{width:20px!important;height:9px!important;background:linear-gradient(155deg,#f8ffff 0 22%,#71dbf7 35%,#d0ffff 50%,#2799d2 68%);filter:none}
.effect.projectile[data-source=cefiro]{width:25px!important;height:8px!important;background:linear-gradient(0deg,transparent,#dff8ff55 27%,#fff 50%,#dff8ff55 68%,transparent);border-top:1px solid #c5f1ff;box-shadow:none}
.effect.projectile.earth{width:13px!important;height:12px!important;background:linear-gradient(145deg,#f0d8a9,#94724c 45%,#53402e 80%);clip-path:polygon(17% 0,73% 9%,100% 44%,75% 100%,10% 75%,0 34%)}
.effect.burst{box-shadow:none;border-width:1px}.effect.burst.fire{border:1px solid #ffbc6d;background:radial-gradient(ellipse,#fff8be 0 8%,#ffb34eab 18%,#f46a2260 40%,transparent 68%);transform:translate(-50%,-50%) scale(calc(.45 + (1 - var(--life))*.7))}
.effect.burst.earth{border:0;background:radial-gradient(ellipse,#f5dfa780,#b39b6455 32%,transparent 70%)}
.effect.burst.air{border:1px solid #c5efff;background:radial-gradient(ellipse,transparent 30%,#d9faff4f 48%,transparent 68%)}
.effect.spell.blast:before{box-shadow:0 0 13px #ff681f99,inset 0 0 15px #ffc36c88;border-width:2px}
.effect.spell.freeze:after{opacity:calc(var(--life)*.75)}
.effect.spell.storm:before{filter:drop-shadow(0 0 3px #d8fbff)}
.effect.spawn{border:1px solid #baf6ff;background:radial-gradient(ellipse,#ddf8ff33,transparent 60%);box-shadow:0 0 8px #95ebff99;transform:translate(-50%,-50%) scale(calc(.6 + (1 - var(--life))*.5))}
.unit:before,.unit.intent-engage:before,.unit.intent-bridge:before{left:19%;right:19%;height:14%;bottom:2%;border-radius:50%;background:radial-gradient(ellipse,#11170fa8 0 23%,#17211269 46%,transparent 75%);box-shadow:none}
.unit.red:before,.unit.red.intent-engage:before{box-shadow:none}
.unit.flying:before{left:20%;right:20%;bottom:-4%;opacity:.72;transform:scale(.8);background:radial-gradient(ellipse,#0d1a2699,transparent 68%)}
.unit.blue:not(.frozen) .ae-actor,.unit.red:not(.frozen) .ae-actor{filter:drop-shadow(0 2px 1px #19221890) contrast(1.07) saturate(1.08)}
.unit.flying:not(.frozen):not(.hit) .ae-actor{filter:drop-shadow(0 5px 3px #0b202a80) contrast(1.07) saturate(1.08)}
.arena .tower:before{content:'';position:absolute;z-index:-1;left:8%;right:8%;bottom:6%;height:21%;background:radial-gradient(ellipse,#17291a99,transparent 70%);transform:skewX(-15deg);pointer-events:none}
.arena .tower.destroyed:before{opacity:.3}
.ae-shot-shadow{background:radial-gradient(ellipse,#08171ca0,transparent 70%);width:18px;height:7px;filter:none}
@media(prefers-reduced-motion:reduce){.ae-fx-particle{display:none}.effect.projectile.fire:after,.effect.projectile.water:after{width:14px;height:3px}}

/* V6: individual citadel / outpost art, matching team palettes and gentle ambient lighting. */
.arena .tower>img{aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 2px 2px #16251a80)!important}
.arena .tower.red:not(.destroyed)>img,.arena .tower.blue:not(.destroyed)>img{filter:drop-shadow(0 2px 2px #16251a99)!important}
.arena .tower.hit:not(.destroyed)>img{filter:brightness(1.35) drop-shadow(0 2px 3px #e6ecbd55)!important}
.arena .tower.destroyed>img{filter:grayscale(.8) brightness(.6)!important;opacity:.28}
.arena .tower>.health{top:0%;left:20%;width:60%;height:11px;border-color:#d4bc84;border-radius:3px}
.arena .tower>.tower-hp{top:0%;font-size:10px;line-height:11px}
.arena .tower.main>.health{top:0%;height:13px;left:24%;width:52%}
.arena .tower.main>.tower-hp{top:0%;line-height:13px}
.arena .tower[data-critical=true]>.tower-hp{color:#ffe1a2;background:transparent}
.arena .tower.destroyed>.tower-hp{top:67%;background:#0b1b27d9}
.ae-arena-light,.ae-river-light{position:absolute;inset:0;pointer-events:none;z-index:1}
.ae-arena-light{background:radial-gradient(ellipse at 14% 3%,#fff2b51c,transparent 52%),linear-gradient(90deg,#172b2322,transparent 15%,transparent 85%,#172b2322);box-shadow:inset 0 0 16px #182b2422}
.ae-river-light{inset:43% 0 44%;opacity:.38;background:repeating-linear-gradient(174deg,transparent 0 11px,#c9ffff30 13px,transparent 16px 28px);background-size:150% 140%;mask-image:linear-gradient(90deg,#000 0 14%,transparent 15% 37%,#000 39% 61%,transparent 63% 85%,#000 86% 100%);clip-path:polygon(0 20%,100% 14%,100% 85%,0 80%);animation:ae-river-flow 12s linear infinite;animation-play-state:paused}
.elemental-game[data-phase=playing] .ae-river-light{animation-play-state:running}
@keyframes ae-river-flow{from{background-position:0 0}to{background-position:100% 100%}}
@media(prefers-reduced-motion:reduce){.ae-river-light{animation:none;opacity:.2}}


.ae-upgrade-list{display:grid;gap:10px}.ae-upgrade-list article{display:flex;align-items:center;gap:10px;border:1px solid #b99757;border-radius:9px;background:#10283e;padding:8px}.ae-upgrade-list article>img{width:54px;height:68px;object-fit:cover;border-radius:5px}.ae-upgrade-list article>div{flex:1;min-width:0}.ae-upgrade-list small{display:block;font-size:10px;color:#b8d0dd;margin:4px 0}.ae-upgrade-list strong{font-size:12px}.ae-upgrade-list progress{width:100%;height:7px;accent-color:#82dcb1}.ae-upgrade-list button{font-size:10px;max-width:105px;min-height:40px}.ae-progression>p{font-size:12px;line-height:1.6}.ae-pack-list{display:flex;flex-wrap:wrap;gap:8px}.ae-pack-reveal{text-align:center;padding:20px;border:2px solid #d7b05b;background:#13344b;border-radius:14px}.ae-pack-reveal img{width:140px;border-radius:10px;animation:ae-reveal .3s ease-out}.ae-progression button:disabled{opacity:.5;cursor:default}@keyframes ae-reveal{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){.ae-pack-reveal img{animation:none}}

.unit[data-level]:after{content:'Nv. ' attr(data-level);position:absolute;left:50%;top:-11px;transform:translateX(-50%);font:700 8px system-ui;color:#e4faff;background:#0d2335d9;padding:1px 3px;border-radius:3px;white-space:nowrap}.hand .game-card:after{content:'Nv. ' attr(data-level);position:absolute;right:4px;top:4px;font:700 9px system-ui;color:#fff2bf;background:#071728cf;padding:2px 4px;border-radius:3px;z-index:3}

/* Native foil pack artwork and rewards share the collection art direction. */
.ae-pack-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ae-ui .ae-pack-item{display:flex;flex-direction:column;align-items:center;padding:10px 5px 12px;border:1px solid #b99757;border-radius:10px;background:#10283ee8;min-width:0}.ae-pack-item img{display:block;width:100%;height:auto;max-width:112px;filter:drop-shadow(0 4px 3px #0007)}.ae-pack-item strong{font:700 12px Georgia;color:#ffe9b3;text-transform:capitalize}.ae-pack-item span{font:9px/1.5 system-ui;color:#c1d3dd;margin:6px 0}.ae-pack-item>b{display:block;color:#f6d589;font:800 10px system-ui;letter-spacing:.12em;border-top:1px solid #a1854a66;width:85%;padding-top:8px}.ae-pack-reveal img.ae-open-pack{width:70px;display:block;margin:5px auto;animation:none}.ae-result-loot{border:1px solid #b9975766;border-radius:12px;background:#102940b0;padding:12px;margin:14px 0}.ae-result-loot h3{font:700 17px Georgia;color:#f8df9b;margin:3px}.ae-result-loot>div{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.ae-result-loot figure{margin:4px;text-align:center}.ae-result-loot img{display:block;margin:auto}.ae-result-loot figcaption{font:11px system-ui;text-transform:capitalize;color:#f5daa6}.ae-result-loot p{font-size:10px!important;line-height:1.5;color:#c8dbe7}.ae-collection-level{display:block;font:700 10px/1.5 system-ui;color:#e9c97d;padding:4px 1px}.ae-card-level-note{border-block:1px solid #af925455;padding:9px 0;color:#ebd598!important}@media(max-width:390px){.ae-pack-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

.ae-player-wallet{display:flex;justify-content:space-between;gap:8px;margin-bottom:12px;padding:10px;border:1px solid #9c855366;border-radius:7px;background:#0a1c2f;color:#f3dca2;font:700 11px system-ui}


/* Four-frame raster impact atlas, driven by simulation time rather than CSS timers. */
.ae-impact-atlas{position:absolute;z-index:132;aspect-ratio:1;transform:translate(-50%,-50%);background-image:url('/visual/fx/elemental-impacts-v1.webp');background-size:400% 400%;background-repeat:no-repeat;pointer-events:none;contain:layout style;isolation:isolate}.ae-impact-atlas[data-source=glacial]{filter:drop-shadow(0 0 3px #9cdfff44)}

/* Combat choreography: keep the battlefield focused on poses and contact. */
.unit[data-level]:after{display:none}.unit .ae-actor[data-motion=windup]{filter:brightness(1.12) drop-shadow(0 3px 2px #03101da0)}.unit .ae-actor[data-motion=strike]{filter:brightness(1.18) drop-shadow(0 3px 2px #03101da0)}.unit.hit .ae-actor{filter:brightness(1.42) contrast(1.08) drop-shadow(0 3px 2px #03101da0)!important}.unit .health{height:5px!important}.unit:has([data-motion=strike]):before{transform:scale(1.17,.8);opacity:.75}.unit:has([data-motion=recovery]):before{transform:scale(.95,1);opacity:.8}.effect.slash{z-index:133}.effect.slash:before{border-right-width:4px;inset:4%;box-shadow:4px 0 6px currentColor}.effect.slash:after{inset:15%;border-right-width:3px}.effect.slash[data-source=roca]:before,.effect.slash[data-source=coral]:before{border-right-width:6px;box-shadow:5px 0 8px currentColor}.effect.projectile:after{opacity:.85}.ae-impact-atlas{opacity:.95}@media(prefers-reduced-motion:reduce){.unit .ae-actor[data-motion=strike]{filter:brightness(1.1)}.effect.slash:before{box-shadow:none}}

/* Collection V7: real card rarity, upgrade availability and accessible inline forge. */
.ae-collection-controls{display:flex;align-items:end;justify-content:space-between;gap:8px;margin:8px 0;color:#f4dfab;font:600 11px system-ui}.ae-collection-controls label{display:flex;flex-direction:column;gap:4px;min-width:0}.ae-collection-controls select{color:#f4e7c5;background:#132b42;border:1px solid #af9059;border-radius:5px;padding:7px;min-height:34px;font:inherit;text-transform:capitalize}.ae-collection-controls .ae-upgrade-toggle{flex-direction:row;align-items:center;border:1px solid #769a86;border-radius:5px;background:#132e34;padding:8px;min-height:16px}.ae-upgrade-toggle input{accent-color:#58cba3}.ae-collection-count{display:flex;justify-content:space-between;font:600 10px system-ui;color:#b8cfdd;margin:8px 0 11px}.ae-collection-count span{color:#a1efbf}
.ae-ui .ae-collection-grid button[data-rarity=especial]{border-color:#80bde5!important}.ae-ui .ae-collection-grid button[data-rarity=épica]{border-color:#be9ce6!important}.ae-ui .ae-collection-grid button[data-rarity=legendaria]{border-color:#f3d78a!important;box-shadow:inset 0 0 0 1px #fff3b8,0 0 10px #e7bd5c30}.ae-ui .ae-collection-grid button[data-upgradable=true]{outline:1px solid #99e2ad;outline-offset:1px}.ae-mastery-mini .ae-ready-label{display:block;text-align:center;color:#aff8bf;background:#195039;border-radius:3px;padding:3px;margin-top:4px;font:800 9px system-ui;letter-spacing:.04em}
.ae-upgrade-detail{padding:12px;border:1px solid #d2ad67;border-radius:7px;background:linear-gradient(150deg,#29465c,#0b1c30 75%);box-shadow:inset 0 0 0 2px #0a1929,0 4px 8px #0005;margin:12px 0}.ae-upgrade-detail header{display:flex;justify-content:space-between;align-items:center;gap:8px}.ae-upgrade-detail header small{font-size:9px;color:#e6c67e}.ae-upgrade-detail header h3{margin:4px 0 8px;font-size:21px}.ae-upgrade-detail header>b{color:#ffe69e;font:700 11px system-ui;white-space:nowrap}.ae-upgrade-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:5px;margin:5px 0 14px}.ae-upgrade-preview>div{min-width:0;background:#0b2033;border:1px solid #6e8191;border-radius:5px;padding:8px}.ae-upgrade-preview span{display:block;font-size:10px;color:#bccfda}.ae-upgrade-preview strong{display:block;font:700 15px system-ui;color:#fff1c7;margin-top:4px;white-space:nowrap}.ae-upgrade-preview em{font-style:normal;color:#8ce9ae;font-size:12px}.ae-upgrade-meter span{font-size:11px;color:#daedf5}.ae-upgrade-meter progress{display:block;width:100%;height:8px;accent-color:#67c9ec;margin:6px 0 12px}.ae-upgrade-detail>p{font-size:11px!important;margin:8px 0;color:#f3cc9c}.ae-upgrade-detail>small{display:block;margin-top:8px;color:#c2d6e4;font-size:9px;letter-spacing:0}.ae-upgrade-notice{padding:8px;border:1px solid #91be9c;background:#1a423a;color:#e2f8df!important;border-radius:5px;margin-bottom:10px!important}

/* Campaign V8: chapter identity with existing portrait artwork and earned pack previews. */
.ae-trial-v2[data-element=water]{--chapter:#66cdeb;--chapter-bg:#163c53}.ae-trial-v2[data-element=earth]{--chapter:#cbb078;--chapter-bg:#39463a}.ae-trial-v2[data-element=fire]{--chapter:#f3a365;--chapter-bg:#613b34}.ae-trial-v2[data-element=air]{--chapter:#baaee9;--chapter-bg:#3c4268}
.ae-trial-v2[data-element]{background:linear-gradient(115deg,var(--chapter-bg),#0e2337);border-left:3px solid var(--chapter)}.ae-trial-v2[data-element] .ae-trial-art{min-height:168px}.ae-trial-v2[data-element] .ae-trial-art:after{position:absolute;inset:0;content:'';background:linear-gradient(0deg,#07132399,transparent 45%);pointer-events:none}.ae-trial-v2[data-element] .ae-trial-art>b{z-index:1;color:var(--chapter)}
.ae-chapter-label{display:block;margin:4px 0;color:var(--chapter,#f5d48f);font:700 9px system-ui;text-transform:uppercase;letter-spacing:.06em}.ae-trial-reward{display:flex;gap:5px;align-items:center;margin:6px 0 4px;color:#efd49a;font:600 10px/1.3 system-ui}.ae-trial-reward img{width:23px;height:auto;filter:drop-shadow(0 2px 2px #0007)}.ae-trial-v2.locked .ae-trial-reward{opacity:.65}.ae-trial-v2.complete .ae-chapter-label{color:#b7e3ad}.ae-trial-v2.current .ae-trial-body button{background:linear-gradient(#ffe7a3,#d3a44c);color:#261b08}

/* V9 optional campaign arenas: their painted geometry follows engine coordinates. */
.elemental-game[data-trial=bastion] .arena-background,.elemental-game[data-trial=tempestad] .arena-background{filter:none}
.elemental-game[data-trial=bastion] .ae-arena-light{background:radial-gradient(ellipse at 12% 10%,#ffb26f20,transparent 45%),radial-gradient(ellipse at 93% 90%,#ed995a19,transparent 45%);box-shadow:inset 0 0 18px #43251e45}
.elemental-game[data-trial=tempestad] .ae-arena-light{background:radial-gradient(ellipse at 8% 2%,#b8e1ff25,transparent 45%),radial-gradient(ellipse at 85% 90%,#99e2ee19,transparent 50%);box-shadow:inset 0 0 18px #19394d40}
.elemental-game:is([data-trial=bastion],[data-trial=tempestad]) .ae-river-light{inset:42.5% 0 42.5%;mask-image:linear-gradient(90deg,#000 0 17%,transparent 18% 34%,#000 35% 65%,transparent 66% 82%,#000 83% 100%);clip-path:none;opacity:.42}

/* V10 creature presentation: ground weight, airborne separation, and clear team health. */
.unit.ground:has(.ae-actor[data-motion=walk]):before{opacity:.86;transform:scale(1.06,.9)}
.unit.flying:before{bottom:-6%;left:24%;right:24%;height:12%;opacity:.54;transform:scale(.85,.72);background:radial-gradient(ellipse,#1020259e,transparent 69%)}
.unit.flying:has(.ae-actor[data-motion=windup]):before{transform:scale(.96,.75);opacity:.66}
.unit.flying:has(.ae-actor[data-motion=strike]):before{transform:scale(1.08,.8);opacity:.72}
.unit .health{border-radius:2px!important;box-shadow:0 1px 2px #081722cf!important}
.unit.frozen:before{opacity:.8;transform:none}

/* V11 adaptive layout. All positioning stays in the arena's own coordinate system. */
html,body,#root{background:#071421;min-width:0}
.phone-stage{width:100%;height:100dvh;overflow:hidden;place-items:center}
.phone-stage .phone-scale-box,.phone-stage .phone-device,.phone-stage .device-screen{width:100%!important;max-width:1600px;height:100dvh!important}
.phone-stage .phone-scale-box{margin-inline:auto}
.elemental-game{--nav-h:calc(65px + env(safe-area-inset-bottom));--nav-w:0px;min-width:0;min-height:0;touch-action:auto}
.elemental-game .ae-lobby{inset:0 0 var(--nav-h) var(--nav-w);overflow-x:hidden;touch-action:pan-y;overscroll-behavior-y:contain}
.elemental-game .ae-tabs{height:var(--nav-h);padding-bottom:calc(4px + env(safe-area-inset-bottom));padding-inline:max(4px,env(safe-area-inset-left)) max(4px,env(safe-area-inset-right))}
.elemental-game:has(.ae-tabs) .panel-overlay,.elemental-game:has(.ae-tabs) .game-overlay{bottom:var(--nav-h);left:var(--nav-w)}
.elemental-game .arena{container-type:inline-size;touch-action:none}
.elemental-game .arena .unit{width:clamp(19px,calc(var(--actor-size,70) * .168cqw),100px)!important}
.elemental-game .arena .tower{width:clamp(49px,20cqw,130px)}
.elemental-game .arena .tower.main{width:clamp(65px,26cqw,165px)}
.elemental-game .arena .relic{width:clamp(36px,12cqw,70px)}
.elemental-game .arena .ae-fallen-actor{max-width:24cqw}
.elemental-game .hand-panel{min-width:0;touch-action:none}
.elemental-game .hand .game-card{min-width:0;touch-action:none}
.elemental-game .hand-meta{min-width:0}
.elemental-game .game-overlay{padding:12px}
.elemental-game .game-dialog{max-height:100%;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
.elemental-game .detail-panel,.elemental-game .panel-content{min-height:0;min-width:0}
.elemental-game .panel-content{overflow:auto;touch-action:pan-y;overscroll-behavior:contain}
.ae-ui .ae-library{width:100%;max-width:1120px;margin-inline:auto;padding-inline:clamp(12px,3vw,32px)}
.ae-ui .ae-filters button{min-height:38px}
.ae-ui .ae-collection-grid button,.ae-deck-library .collection-card{min-width:0}
.ae-ui .ae-collection-grid b,.ae-equipped-card strong{overflow-wrap:anywhere}
.ae-ui .ae-collection-grid small{overflow-wrap:anywhere}
.ae-ui .ae-card-detail-v2{width:100%;max-width:680px}
.ae-ui .ae-home-content{display:grid;gap:9px}
.ae-home-v3 .ae-home-content>.ae-primary{width:100%;margin:0;font-size:16px;min-height:44px}
.ae-home-v3 .ae-player-wallet{margin:0}
@media(max-width:599px) and (orientation:portrait){
 .ae-home-v3 .ae-home-hero{min-height:clamp(345px,calc(100dvh - 190px - env(safe-area-inset-bottom)),680px)}
 .ae-home-v3 .ae-home-logo{height:clamp(80px,13dvh,130px)}
 .ae-home-v3 .ae-profile{top:calc(clamp(80px,13dvh,130px) + 16px + env(safe-area-inset-top))}
 .ae-home-v3 .ae-hero-actions{padding-top:clamp(92px,20dvh,180px)}
 .elemental-game .hand-panel{padding-inline:clamp(7px,2.4vw,13px)}
 .elemental-game .hand{gap:clamp(5px,2vw,10px)}
 .elemental-game .hand .game-card{height:clamp(66px,13dvh,112px)}
 .elemental-game .hand .game-card strong{font-size:clamp(9px,2.5vw,12px)}
}
@media(max-width:380px){
 .ae-tabs-v2 button>span{font-size:9px}
 .ae-ui .ae-collection-controls{flex-wrap:wrap}
 .ae-ui .ae-collection-grid{gap:7px 5px}
 .ae-upgrade-preview{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ae-upgrade-preview strong{white-space:normal}
 .ae-player-wallet{font-size:10px;gap:5px}
 .ae-upgrade-list article{gap:5px;padding:6px}
 .ae-upgrade-list article>img{width:43px;height:54px}
 .ae-upgrade-list button{max-width:91px}
}
@media(max-height:650px) and (orientation:portrait){
 .elemental-game .hand .game-card{height:clamp(57px,12dvh,78px)}
 .elemental-game .hand .game-card strong small{display:none}
 .elemental-game .energy-row{margin-top:5px}
 .elemental-game .hand-panel{padding-top:3px}
 .elemental-game .battle-header.ae-combat-hud{min-height:48px;padding-block:4px}
}
@media(min-width:600px){
 .ae-ui .ae-collection-grid,.collection.ae-deck-library{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
 .ae-ui .ae-library{padding-block:24px}
 .ae-ui .ae-page-title h1{font-size:34px}
 .ae-ui .ae-page-title p{font-size:14px}
 .ae-ui .ae-filters button{font-size:13px;min-height:42px}
 .ae-ui .ae-collection-grid b,.ae-equipped-card strong{font-size:14px}
 .ae-ui .ae-collection-grid small{font-size:11px}
 .ae-ui .ae-trial-list{grid-template-columns:repeat(2,minmax(0,1fr));padding-left:0;gap:16px}
 .ae-ui .ae-trial-list:before{display:none}
 .ae-trial-v2{grid-template-columns:35% minmax(0,1fr)}
 .ae-trial-body{min-width:0}
 .ae-ui .ae-trial-body h2{font-size:21px}
 .ae-ui .ae-trial-body p{font-size:13px}
 .ae-pack-list{grid-template-columns:repeat(auto-fit,minmax(135px,1fr))}
 .ae-ui .ae-upgrade-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ae-history-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ae-mode-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ae-equipped-grid{grid-template-columns:repeat(8,minmax(0,1fr))}
 .ae-home-v3 .ae-home-hero{min-height:clamp(410px,65dvh,780px);background-position:center 43%;background-size:cover}
 .ae-home-v3 .ae-profile{left:50%;right:auto;transform:translateX(-50%);width:min(90%,480px)}
 .ae-home-v3 .ae-hero-actions{max-width:520px}
 .ae-home-v3 .ae-home-content{width:100%;max-width:800px;align-self:center;padding:16px 24px;grid-template-columns:1fr 1fr}
 .ae-home-v3 .ae-home-content .ae-path,.ae-home-v3 .ae-home-content .ae-record{grid-column:1/-1}
 .elemental-game:not(:has(.ae-tabs)){align-items:center;background:radial-gradient(ellipse,#21394a,#081322 80%)}
 .elemental-game:not(:has(.ae-tabs))>.battle-header,.elemental-game:not(:has(.ae-tabs))>.arena,.elemental-game:not(:has(.ae-tabs))>.hand-panel{width:min(100%,calc(100dvh * .77),650px)}
 .elemental-game .hand .game-card{height:clamp(85px,13dvh,135px)}
 .elemental-game .hand .game-card strong{font-size:13px}
}
@media(min-width:960px) and (orientation:landscape){
 .elemental-game:has(.ae-tabs){--nav-w:184px;--nav-h:0px}
 .elemental-game .ae-tabs{inset:0 auto 0 0;width:var(--nav-w);height:100%;display:flex;flex-direction:column;justify-content:center;gap:10px;padding:20px 13px;border-top:0;border-right:1px solid #cba962}
 .ae-tabs-v2 button{flex-direction:row;justify-content:flex-start;gap:12px;padding:12px;min-height:58px}
 .ae-tabs-v2 button>span{font-size:14px}
 .ae-tabs-v2 svg{width:25px;height:25px}
 .ae-ui .ae-collection-grid,.collection.ae-deck-library{grid-template-columns:repeat(5,minmax(0,1fr))}
 .elemental-game:has(.ae-tabs) .detail-panel{width:min(100%,1120px);margin:auto}
 .ae-home-v3{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);align-items:stretch;min-height:100%}
 .ae-home-v3 .ae-home-hero{min-height:100%;background-position:48% center;padding:18px 24px 24px}
 .ae-home-v3 .ae-home-content{display:flex;flex-direction:column;align-self:center;max-width:none;padding:24px;gap:16px}
 .ae-home-v3 .ae-profile{position:absolute;left:2%;right:auto;transform:none;width:55%;max-width:420px;top:calc(clamp(88px,15dvh,145px) + 28px)}
 .ae-home-v3 .ae-home-logo{width:clamp(200px,33vw,290px)}
 .ae-home-v3 .ae-hero-actions{max-width:520px}
 .ae-home-v3 .ae-home-content .ae-path{padding:18px}
 .ae-home-v3 .ae-home-content .ae-record{font-size:12px}
}
@media(min-width:1250px) and (orientation:landscape){
 .ae-ui .ae-collection-grid,.collection.ae-deck-library{grid-template-columns:repeat(6,minmax(0,1fr))}
 .ae-ui .ae-trial-list{gap:22px}
}
@media(min-width:570px) and (orientation:landscape){
 .elemental-game:not(:has(.ae-tabs)){--battle-w:min(56vw,calc((100dvh - 60px) * .67),650px);--hand-w:clamp(190px,26vw,315px);display:grid;grid-template-columns:minmax(0,1fr) var(--battle-w) var(--hand-w) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);align-items:stretch;justify-items:stretch;column-gap:0;overflow:hidden}
 .elemental-game:not(:has(.ae-tabs))>.battle-header{grid-column:2/4;grid-row:1;width:100%;min-width:0}
 .elemental-game:not(:has(.ae-tabs))>.arena{grid-column:2;grid-row:2;width:100%;height:100%;min-height:0}
 .elemental-game:not(:has(.ae-tabs))>.hand-panel{grid-column:3;grid-row:2;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:8px;border-top:0;border-left:2px solid #c7a564;padding:12px}
 .elemental-game:not(:has(.ae-tabs)) .hand{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card{height:clamp(66px,20dvh,154px)}
 .elemental-game:not(:has(.ae-tabs)) .energy-row{margin-top:8px;flex-wrap:nowrap}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card strong{font-size:12px}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card strong small{display:block;font-size:9px}
}
@media(max-height:460px) and (orientation:landscape){
 .elemental-game:not(:has(.ae-tabs)){--battle-w:min(48vw,calc((100dvh - 50px)*.67));--hand-w:clamp(190px,37vw,300px)}
 .elemental-game .battle-header.ae-combat-hud{min-height:46px;padding-block:3px}
 .elemental-game:not(:has(.ae-tabs))>.hand-panel{padding:7px;gap:3px}
 .elemental-game:not(:has(.ae-tabs)) .hand{gap:5px;padding-top:3px}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card{height:clamp(44px,19dvh,82px)}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card strong small{display:none}
 .elemental-game .energy-row{margin-top:3px}
 .elemental-game .hand .cost{width:19px;height:21px;line-height:18px;font-size:14px}
 .elemental-game .hand .game-card:after{font-size:7px}
 .ae-home-v3 .ae-home-hero{min-height:420px}
}

/* Portrait tablets keep the intended arena proportions instead of stretching the field. */
@media(min-width:600px) and (orientation:portrait){
 .elemental-game:not(:has(.ae-tabs))>.battle-header,.elemental-game:not(:has(.ae-tabs))>.arena,.elemental-game:not(:has(.ae-tabs))>.hand-panel{width:min(100%,max(330px,calc((100dvh - 280px)*.67)),650px)}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card{height:clamp(82px,11dvh,117px)}
 .elemental-game:not(:has(.ae-tabs)) .hand-panel{padding-inline:14px}
}

/* V12: device-specific combat presentation and reliable pointer interaction. */
.ae-battle-guide{display:none}
@media(min-width:1200px) and (min-height:590px) and (orientation:landscape){
 .elemental-game:not(:has(.ae-tabs)){--guide-w:clamp(200px,19vw,270px);--battle-w:min(48vw,calc((100dvh - 68px)*.67),650px);--hand-w:clamp(220px,23vw,320px);grid-template-columns:minmax(0,1fr) var(--guide-w) var(--battle-w) var(--hand-w) minmax(0,1fr)}
 .elemental-game:not(:has(.ae-tabs))>.battle-header{grid-column:2/5}
 .elemental-game:not(:has(.ae-tabs))>.arena{grid-column:3}
 .elemental-game:not(:has(.ae-tabs))>.hand-panel{grid-column:4}
 .elemental-game:not(:has(.ae-tabs))>.ae-battle-guide{display:flex;flex-direction:column;grid-column:2;grid-row:2;min-height:0;overflow:auto;gap:12px;justify-content:center;padding:16px;background:linear-gradient(145deg,#223c51,#091a2e);border-right:2px solid #baa061;color:#ead9b3;font:12px/1.5 system-ui}
 .ae-battle-guide>small{letter-spacing:.14em;color:#d0ae6a;font-size:9px}.ae-battle-guide h2{font:700 23px Georgia;margin:0}.ae-battle-guide h3{font:700 15px Georgia;margin:0 0 5px}.ae-guide-team{padding:9px;border:1px solid #58758d;border-radius:7px;background:#091b2b}.ae-guide-team.red{border-color:#8f5c58}.ae-guide-team.blue h3{color:#9cdcea}.ae-guide-team.red h3{color:#efa69c}.ae-guide-tower{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:3px;margin:7px 0}.ae-guide-tower span{font-size:10px}.ae-guide-tower strong{font-size:10px;font-variant-numeric:tabular-nums}.ae-guide-tower progress{width:100%;height:5px;accent-color:#68c6f0}.ae-guide-team.red progress{accent-color:#e87f73}.ae-guide-controls p{margin:5px 0;color:#bdd0dc;font-size:10px}.ae-key-hint kbd{display:inline-block;padding:2px 4px;border:1px solid #877348;border-radius:4px;margin-right:3px;background:#0c1827;color:#ffe4a5;font:700 10px system-ui}
}
@media(hover:hover) and (pointer:fine){
 .elemental-game .hand .game-card[data-key]::before{content:attr(data-key);position:absolute;left:5px;bottom:26px;z-index:4;border:1px solid #d3b36d;background:#08192ddd;color:#fff2c7;border-radius:3px;padding:2px 5px;font:700 10px system-ui}
 .elemental-game .hand .game-card:not(.unaffordable):hover{outline:2px solid #e3cc85;outline-offset:1px}
}
@media(min-width:600px) and (max-width:1199px) and (orientation:landscape){
 .elemental-game:not(:has(.ae-tabs)){--battle-w:min(54vw,calc((100dvh - 70px)*.67),650px);--hand-w:clamp(220px,30vw,320px)}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card{height:clamp(62px,18dvh,138px)}
}
@media(max-height:460px) and (orientation:landscape){
 .elemental-game:not(:has(.ae-tabs)){--battle-w:min(48vw,calc((100dvh - 50px)*.67));--hand-w:clamp(190px,37vw,300px)}
 .elemental-game:not(:has(.ae-tabs)) .hand .game-card{height:clamp(44px,19dvh,82px)}
 .elemental-game:has(.ae-tabs){--nav-w:70px;--nav-h:0px}
 .elemental-game .ae-tabs{inset:0 auto 0 0;width:var(--nav-w);height:100%;display:flex;flex-direction:column;justify-content:center;padding:4px;gap:3px;border-top:0;border-right:1px solid #bba36d}
 .ae-tabs-v2 button{min-height:42px;gap:2px;padding:4px}.ae-tabs-v2 svg{width:19px;height:19px}.ae-tabs-v2 button>span{font-size:9px}
 .ae-home-v3{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(190px,1fr);min-height:100%}
 .ae-home-v3 .ae-home-hero{min-height:100%;padding:5px 10px 9px}
 .ae-home-v3 .ae-home-logo{height:65px;width:140px}
 .ae-home-v3 .ae-profile{top:76px;left:10px;right:auto;transform:none;width:calc(54.5% - 20px);min-height:38px;padding:3px 5px}
 .ae-home-v3 .ae-profile-crest{width:28px;height:30px}
 .ae-home-v3 .ae-hero-actions{padding-top:50px}
 .ae-home-v3 .ae-home-content{display:flex;flex-direction:column;justify-content:center;width:100%;padding:10px;gap:8px}
 .ae-home-v3 .ae-primary{font-size:19px;min-height:42px}
 .ae-home-v3 .ae-home-modes .ae-mode{min-height:38px;padding:4px;gap:4px}
}
@media(max-width:359px) and (orientation:portrait){
 .elemental-game .battle-header.ae-combat-hud{grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr) 26px;gap:3px;padding-inline:5px}
 .elemental-game .ae-combat-player strong{font-size:9px}
 .elemental-game .hand-panel{padding-inline:6px}.elemental-game .hand{gap:4px}
 .elemental-game .hand .game-card{height:clamp(54px,12dvh,74px)}
 .elemental-game .hand .game-card:after{font-size:7px;right:1px;top:2px}
 .ae-home-v3 .ae-hero-actions{padding-top:92px}
 .ae-ui .ae-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ae-ui .ae-collection-grid b{font-size:11px}
 .ae-ui .ae-trial-body{padding:9px}
 .ae-ui .ae-trial-body button{white-space:normal;overflow-wrap:anywhere}
}
@media(pointer:coarse){
 .ae-ui .ae-filters button,.ae-ui .ae-collection-controls select{min-height:44px}
 .ae-ui .ae-back{min-height:44px}
 .elemental-game .arena .ae-fx-particle:nth-of-type(n+7){display:none}
 .elemental-game .ae-impact-atlas{filter:none}
}

/* V13: elemental summoning glyphs, legible projectiles and bounded visual load. */
.effect.spawn{--sigil:#a4ebff;--sigil-edge:#64b4e5;border:0;background:radial-gradient(ellipse,var(--sigil) 0%,transparent 65%);box-shadow:none;isolation:isolate}
.effect.spawn.fire{--sigil:#ffd28f;--sigil-edge:#e56b37}
.effect.spawn.earth{--sigil:#e4d19a;--sigil-edge:#aa8751}
.effect.spawn.air{--sigil:#d9d8ff;--sigil-edge:#9991e7}
.effect.spawn.water{--sigil:#b9faff;--sigil-edge:#48bfe3}
.ae-summon-sigil{position:absolute;inset:4%;pointer-events:none;border:2px solid var(--sigil);border-radius:50%;box-shadow:0 0 7px var(--sigil-edge),inset 0 0 5px var(--sigil-edge);background:conic-gradient(from 45deg,transparent 0 10%,var(--sigil) 11% 12%,transparent 13% 36%,var(--sigil) 37% 38%,transparent 39% 60%,var(--sigil) 61% 62%,transparent 63% 86%,var(--sigil) 87% 88%,transparent 89%);transform:scaleY(.72) rotate(calc((1 - var(--life))*50deg))}
.ae-summon-sigil::before{content:'';position:absolute;inset:13%;border:1px dashed var(--sigil);border-radius:50%;box-shadow:0 0 4px var(--sigil-edge)}
.ae-summon-sigil::after{content:'';position:absolute;inset:28%;border:1px solid var(--sigil);transform:rotate(45deg);background:#ffffff15}
.effect.projectile.fire:after{width:clamp(14px,7cqw,40px)!important;height:clamp(4px,1.5cqw,9px)}
.effect.projectile.water:after{width:clamp(12px,6cqw,34px)!important;height:clamp(3px,1.2cqw,8px)}
.effect.projectile.air:after{width:clamp(13px,7cqw,40px)!important;height:3px}
.elemental-game .arena{border-inline:1px solid #ad9c6466;box-shadow:inset 0 0 20px #05172955}
.ae-arena-light{box-shadow:inset 0 0 22px #081c2855}
.elemental-game .unit .health{height:clamp(4px,1.1cqw,7px)!important}
@media(min-width:1200px) and (min-height:590px){
 .ae-battle-guide .ae-guide-team{background:linear-gradient(135deg,#1e364c,#0b1a2c);box-shadow:inset 0 1px #ffffff12}
 .ae-battle-guide .ae-guide-tower{border-bottom:1px solid #6d85922c;padding-bottom:5px}
 .elemental-game .hand-panel{box-shadow:inset 1px 0 #d9ba6d66,0 -4px 10px #10243b88}
}
@media(max-width:599px),(max-height:460px){
 .ae-summon-sigil{box-shadow:none;border-width:1px}
 .ae-summon-sigil::before{box-shadow:none}
 .elemental-game .arena{box-shadow:none;border-inline:0}
 .ae-arena-light{box-shadow:none}
}
@media(prefers-reduced-motion:reduce){
 .ae-summon-sigil{transform:scaleY(.72);box-shadow:none}
 .ae-summon-sigil::before{box-shadow:none}
 .effect.projectile.fire:after,.effect.projectile.water:after,.effect.projectile.air:after{width:14px!important;height:3px}
}

/* V14: physical damage stages and persistent ruins, sized to the arena. */
.arena .tower.destroyed>img{opacity:1;transform:none;filter:drop-shadow(0 2px 2px #13231d99)!important}
.arena .tower.destroyed:before{opacity:.46}
.arena .tower.destroyed>.tower-hp{top:79%;font-size:clamp(7px,1.55cqw,10px);line-height:1.1;white-space:nowrap}
.arena .tower.destroyed>.health{visibility:hidden}
.ae-collapse-ring{position:absolute;inset:9%;border:2px solid #e9d7af;border-radius:50%;transform:scaleY(.55) scale(calc(.45 + (1 - var(--life))*1.35));opacity:var(--life);box-shadow:0 0 7px #f9d5a580;pointer-events:none}
.effect.tower-fall{background:radial-gradient(ellipse,#fff1d477 0%,#c19b6b44 30%,transparent 68%);border-color:#e8caa4;box-shadow:none}
.effect.tower-fall .ae-fx-particle{background:linear-gradient(145deg,#e6d6af 0 35%,#a68e6c 36% 68%,#6b6154 69%);border:1px solid #786956}
.elemental-game .arena .ae-fallen-actor{width:clamp(27px,calc(var(--fallen-size,70)*.256cqw),150px)!important;max-width:24cqw}
.arena .unit.attacking .target-lock{opacity:.45}
@media(max-width:599px),(max-height:460px){.ae-collapse-ring{border-width:1px;box-shadow:none}}
@media(prefers-reduced-motion:reduce){.ae-collapse-ring{transform:scaleY(.55);box-shadow:none}}

/* V15: sanctuary artwork and lightweight ambient details. */
.ae-arena-ornaments{position:absolute;inset:0;z-index:2;background:url('/visual/arena/stone-rim.svg') center/100% 100% no-repeat;pointer-events:none;opacity:.70}
.arena .relic{isolation:isolate;--capture-glow:#b6c3ef}
.arena .relic.blue{--capture-glow:#6eeaff}
.arena .relic.red{--capture-glow:#ff9784}
.arena .relic.contested{--capture-glow:#ffe09c}
.arena .relic img{visibility:visible;display:block;object-fit:contain;width:100%;height:auto;filter:drop-shadow(0 2px 3px #152b3299)}
.arena .relic:before{content:'';position:absolute;width:98%;height:35%;top:53%;left:1%;border:1px solid var(--capture-glow);border-radius:50%;background:radial-gradient(ellipse,var(--capture-glow),transparent 70%);clip-path:none;opacity:.35;z-index:-1}
.arena .relic:after{content:'';position:absolute;left:9%;right:9%;height:26%;top:61%;border:1px dashed var(--capture-glow);border-radius:50%;opacity:.85;pointer-events:none}
.arena .relic span{background:#102432e8;border:1px solid var(--capture-glow);padding:2px 4px;border-radius:3px;font-size:clamp(7px,1.7cqw,11px);color:#fff1d3;white-space:nowrap;text-shadow:none}
.arena .relic progress{accent-color:var(--capture-glow)}
.elemental-game[data-phase=playing] .relic.contested:after{border-style:solid;opacity:1}
.ae-ui,.ae-ui .ae-library:has(.ae-trial-list),.ae-league-hero{background:radial-gradient(ellipse at 50% 0,#24435a66,transparent 68%),linear-gradient(155deg,#122b3f,#081624 72%)}
@media(max-width:599px),(max-height:460px){.ae-arena-ornaments{opacity:.45}.arena .relic img{filter:none}.arena .relic span{padding:1px 3px}}
@media(prefers-reduced-motion:reduce){.arena .relic:after{opacity:.65}}

/* V16 — Guardian hub: flow-based home, readable surfaces and distinct screen hierarchy. */
.ae-home-v16 .ae-home-hero{position:relative;min-height:0;flex:none;padding:calc(9px + env(safe-area-inset-top)) 4% 15px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;background-position:center 45%}
.ae-home-v16 .ae-home-logo{height:clamp(75px,12dvh,128px);width:auto;max-width:76%;max-height:none;object-fit:contain;box-shadow:none}
.ae-home-v16 .ae-profile{position:relative;inset:auto;transform:none;width:min(100%,470px);max-width:none;min-height:44px;padding:6px 9px;box-sizing:border-box;border-radius:8px;background:linear-gradient(110deg,#1b3c55ed,#0a2034f5);box-shadow:0 3px 10px #03101b88}
.ae-home-v16 .ae-hero-actions{margin-top:auto;padding-top:clamp(64px,18dvh,180px);max-width:540px}
.ae-home-v16 .ae-arena-label{background:#102a3ad9;border-color:#ddbc7e;border-radius:6px}
.ae-home-v16 .ae-home-modes .ae-mode{min-width:0;min-height:49px;padding:8px 6px;box-shadow:inset 0 1px #fff2b527,0 3px 7px #07121b99}
.ae-home-v16 .ae-home-content{padding:12px 4% 18px;background:linear-gradient(155deg,#182c42,#091a2a);gap:10px}
.ae-home-v16 .ae-home-content>.ae-primary{background:linear-gradient(#385578,#193049)!important;color:#f8ddb0!important;border-color:#c1a26b;box-shadow:inset 0 1px #fff2c033,0 3px 5px #0005}
.ae-home-next{border:1px solid #79684b;background:linear-gradient(120deg,#223d50,#0d2335);padding:11px 12px;border-radius:8px;min-width:0}
.ae-home-next>small{font:700 9px system-ui;letter-spacing:.11em;color:#eac98b}
.ae-home-next h2{font-size:18px;margin:5px 0}.ae-home-next p{font-size:11px;line-height:1.4;color:#c5d4df;margin:5px 0 9px}
.ae-home-next button{min-height:36px;width:100%}
.ae-ui .ae-page-title{position:relative;margin:0 0 18px;padding:14px 0 14px 12px;border-bottom:1px solid #9b875a55;border-left:3px solid #c4a66c}
.ae-ui .ae-page-title>small{letter-spacing:.13em;font:700 10px system-ui;color:#eacb87}
.ae-ui .ae-page-title h1{font-size:clamp(26px,4vw,38px);line-height:1.1}
.ae-ui .ae-page-title p{line-height:1.45;color:#c1d3e3}
.ae-battle-layout{display:grid;gap:16px;min-width:0}
.ae-battle-primary,.ae-battle-strategy{min-width:0}
.ae-battle-primary>.ae-primary{width:100%;min-height:50px;margin:0 0 10px}
.ae-battle-strategy{padding:12px;border:1px solid #88754e;border-radius:10px;background:linear-gradient(135deg,#263c51,#0d2134)}
.ae-battle-menu .ae-battle-banner{min-height:155px;background:radial-gradient(ellipse at 12% 85%,#87ba854d,transparent 56%),linear-gradient(120deg,#244b51,#101c31);border-radius:10px;box-shadow:inset 0 1px #e5d5b344}
.ae-battle-menu .ae-battle-banner>img{max-height:160px}
.ae-ui .ae-card-search{display:flex;flex-wrap:wrap;gap:5px 8px;align-items:center;margin:0 0 12px}
.ae-card-search>span{flex-basis:100%;font-size:11px;color:#e7ca91;font-weight:700}
.ae-card-search input{flex:1;min-width:0;min-height:44px;padding:8px 11px;border:1px solid #a28c64;border-radius:7px;background:#0c2034;color:#fff1ce;font:inherit;font-size:14px}
.ae-card-search input::placeholder{color:#a0b3c4}
.ae-collection-grid button[data-element=fire]{--card-accent:#e49c64}
.ae-collection-grid button[data-element=water]{--card-accent:#64c3e7}
.ae-collection-grid button[data-element=earth]{--card-accent:#b4c18d}
.ae-collection-grid button[data-element=air]{--card-accent:#c4b1f0}
.ae-ui .ae-collection-grid button[data-element] b{border-top:3px solid var(--card-accent);background:linear-gradient(180deg,#29435c,#0d2032)}
.ae-ui .ae-collection-grid button[data-element] img{border-bottom:0}
.ae-ui .ae-trial-v2{overflow:hidden;border-radius:10px}
.ae-ui .ae-league-hero{position:relative;border:1px solid #bfa46e;background:radial-gradient(ellipse at 50% 27%,#315d8a,#11283d 56%,#0a1b2b 85%);box-shadow:inset 0 0 0 3px #0b2233,0 6px 12px #06111d88}
.ae-league-hero .ae-league-emblem{width:clamp(120px,22vw,180px);height:auto;filter:drop-shadow(0 6px 10px #071427)}
.ae-tabs-v2 [aria-current]{background:linear-gradient(160deg,#405068,#19324c);border:1px solid #aa8b50;box-shadow:inset 0 1px #e8c78244}
.ae-ui button:focus-visible,.ae-tabs button:focus-visible,.ae-card-search input:focus-visible{outline:2px solid #a6eaff;outline-offset:2px}
@media(min-width:760px){.ae-battle-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start;gap:20px}.ae-home-v16 .ae-home-content{grid-template-columns:repeat(2,minmax(0,1fr))}.ae-home-v16 .ae-home-next{grid-column:1/-1}}
@media(min-width:960px) and (orientation:landscape){.ae-home-v16{grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr);align-items:stretch}.ae-home-v16 .ae-home-hero{min-height:100%;padding:18px 18px 24px}.ae-home-v16 .ae-home-logo{height:clamp(96px,16dvh,150px);max-width:74%}.ae-home-v16 .ae-profile{width:min(95%,460px)}.ae-home-v16 .ae-hero-actions{padding-top:clamp(52px,12dvh,140px)}.ae-home-v16 .ae-home-content{padding:22px 18px;align-self:center;max-width:550px}.ae-home-next h2{font-size:22px}}
@media(max-height:460px) and (orientation:landscape){.ae-home-v16 .ae-home-hero{padding:5px 8px 8px;gap:3px;min-height:100%}.ae-home-v16 .ae-home-logo{height:58px}.ae-home-v16 .ae-profile{min-height:35px;padding:3px 6px}.ae-home-v16 .ae-hero-actions{padding-top:36px}.ae-home-v16 .ae-home-content{padding:8px;gap:6px}.ae-home-next{padding:7px}.ae-home-next h2{font-size:15px}.ae-home-next p{display:none}.ae-home-next button{min-height:30px}.ae-home-v16 .ae-home-modes .ae-mode{min-height:36px;padding:4px}.ae-home-v16 .ae-home-hero .ae-primary{min-height:38px;margin-bottom:5px}}
@media(max-width:359px) and (orientation:portrait){.ae-home-v16 .ae-hero-actions{padding-top:55px}.ae-home-v16 .ae-home-logo{height:70px}.ae-home-v16 .ae-profile{min-height:40px}.ae-home-v16 .ae-home-modes .ae-mode{min-height:43px}.ae-home-v16 .ae-home-hero .ae-primary{min-height:43px}}

/* V18.1: preserve the collection studio without experimental battle filters. */
.ae-ui .ae-collection-grid button>.ae-card-crest{position:absolute;right:4px;top:4px;width:clamp(21px,5.5vw,34px);height:auto;aspect-ratio:1;object-fit:contain;z-index:2;border:0;pointer-events:none;filter:drop-shadow(0 1px 2px #0008)}
.ae-creature-studio{height:clamp(210px,29dvh,320px);background-image:radial-gradient(ellipse at 50% 64%,#7ac6d32c,transparent 65%),linear-gradient(155deg,#233d51,#0d2132)}
.ae-creature-studio .ae-preview-sprite{width:clamp(150px,32dvh,245px);filter:contrast(var(--creature-contrast,1.08)) saturate(var(--creature-saturation,1.08)) drop-shadow(0 3px 2px #04162599);margin-bottom:28px}
.ae-creature-studio .ae-preview-sprite[data-pose=walk]{animation:ae-studio-walk 1s step-end infinite}
.ae-creature-studio .ae-preview-sprite[data-pose=attack]{animation:ae-studio-attack 1.15s step-end infinite}
@keyframes ae-studio-walk{0%{background-position:0 33.333333%}25%{background-position:33.333333% 33.333333%}50%{background-position:66.666667% 33.333333%}75%,100%{background-position:100% 33.333333%}}
@keyframes ae-studio-attack{0%{background-position:0 100%}25%{background-position:33.333333% 100%}50%{background-position:66.666667% 100%}75%,100%{background-position:100% 100%}}
.ae-creature-studio .ae-creature-insignia{position:absolute;top:10px;left:10px;width:clamp(39px,10vw,62px);height:auto;object-fit:contain;z-index:1}
.ae-studio-title{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#08192de8 35%);padding:13px 10px 8px;text-align:center}
.ae-studio-title b{display:block;font:700 16px Georgia;color:#f4dfb1}.ae-studio-title small{font-size:10px;color:#b8d2df}
.ae-pose-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:-5px 0 13px}
.ae-ui .ae-pose-controls button{min-height:44px;border:1px solid #8b7854;border-radius:6px;color:#d6e4ef;background:#142c44;font-size:12px}
.ae-ui .ae-pose-controls button[aria-pressed=true]{background:linear-gradient(#e8cc91,#ac8148);color:#1d2130;font-weight:700;border-color:#ffe5af}
@media(prefers-reduced-motion:reduce){.ae-creature-studio .ae-preview-sprite[data-pose]{animation:none}.ae-creature-studio .ae-preview-sprite[data-pose=attack]{background-position:66.666667% 100%}.ae-creature-studio .ae-preview-sprite[data-pose=walk]{background-position:33.333333% 33.333333%}}

/* V19: compact local impact accents. No changes to the arena geometry, actors or controls. */
.ae-v19-accent{display:block;position:absolute;left:50%;top:50%;width:100%;aspect-ratio:1;max-width:42cqw;background-size:contain;background-position:center;background-repeat:no-repeat;pointer-events:none;transform-origin:center;z-index:1}
.effect.slash .ae-v19-accent[data-accent=heavy]{width:110%;max-width:22cqw}
.effect.heal-wave .ae-v19-accent,.effect.spell.heal .ae-v19-accent{width:100%}
@media(max-width:599px),(max-height:460px){.ae-v19-accent{max-width:37cqw}}
@media(prefers-reduced-motion:reduce){.ae-v19-accent{display:none}}

/* V21: prominent, immediately accessible victory rewards. Combat scene untouched. */
.game-dialog:has(.ae-victory-reward){max-height:calc(100% - 16px);overflow-y:auto;overscroll-behavior:contain}
.game-dialog .ae-victory-reward{margin:8px 0;padding:10px;border:1px solid #d7b56e;border-radius:10px;background:radial-gradient(ellipse at top,#4c5948,#102940 68%);box-shadow:inset 0 0 0 2px #0a2131}
.ae-victory-reward>small{font:800 10px system-ui;letter-spacing:.13em;color:#fbd589}
.ae-victory-reward .ae-result-packs{display:grid;grid-template-columns:repeat(auto-fit,minmax(82px,1fr));gap:6px}
.game-dialog .ae-result-pack{display:flex;flex-direction:column;align-items:center;background:linear-gradient(#2c4355,#11283b);border:1px solid #dfc28c;border-radius:8px;padding:4px;min-width:0;color:#ffe9b4;cursor:pointer}
.game-dialog .ae-result-pack img{width:clamp(48px,15vw,82px);height:auto;max-height:108px;object-fit:contain}
.game-dialog .ae-result-pack strong{font-size:12px;text-transform:capitalize}
.game-dialog .ae-result-pack span{font-size:11px;font-weight:800;background:linear-gradient(#f8df9b,#d4a658);color:#30220c;border-radius:4px;width:100%;margin-top:4px;min-height:32px;display:grid;place-items:center}
.game-dialog .ae-result-forge{margin-top:8px;min-height:44px;width:100%;font-size:12px}
@media(max-height:500px){.game-dialog .ae-result-pack img{max-height:70px}.game-dialog .ae-victory-reward{padding:6px}}


/* V22 home: independent composition, no arena or combat selectors changed. */
.ae-home-v22{max-width:1180px;margin:auto;min-height:100%;display:flex;flex-direction:column;background:#071728;color:#fbe9b9}.ae-v22-profile{display:flex;align-items:center;gap:10px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;border-bottom:1px solid #b69755;background:#10283f;flex-shrink:0}.ae-v22-profile>img{border:2px solid #d6b466;border-radius:50%;object-fit:cover}.ae-v22-profile>div:first-of-type{flex:1}.ae-v22-profile strong,.ae-v22-profile span{display:block}.ae-v22-profile span{font-size:10px;color:#bdd9e7}.ae-v22-profile progress{width:100%;max-width:170px;height:7px;accent-color:#4fd3ec;display:block;margin-top:5px}.ae-v22-currency{text-align:right;font-size:11px}.ae-v22-profile .ae-help{min-height:32px;min-width:30px}.ae-v22-hero{position:relative;flex:1;min-height:180px;overflow:hidden;background:#112b3b}.ae-v22-scene{display:block;width:100%;height:auto;max-height:53dvh;object-fit:contain}.ae-v22-logo{position:absolute;top:6px;left:50%;transform:translateX(-50%);width:clamp(100px,32%,190px);height:auto;max-height:23%;object-fit:contain}.ae-v22-actions{position:relative;margin-top:-22px;padding:0 5% 10px;z-index:1;text-align:center}.ae-v22-actions>small{display:block;width:max-content;margin:0 auto 7px;padding:5px 9px;background:#071727e8;border:1px solid #bc9a56;font-size:8px;color:#f7dfa2;letter-spacing:.1em}.ae-v22-actions>.ae-primary{width:84%;min-height:51px;font-size:23px;display:block;margin:auto auto 11px}.ae-v22-actions svg,.ae-v22-modes svg{height:22px;width:22px;vertical-align:middle;margin-right:8px}.ae-v22-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ae-v22-modes button{min-height:42px;font-family:Georgia;font-size:14px}.ae-v22-panels{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 4% 8px}.ae-v22-panels>button,.ae-v22-panels>section{border:1px solid #bfa366;border-radius:9px;padding:10px;background:#10263b;text-align:left;min-width:0}.ae-v22-panels strong{display:block;font:700 12px Georgia;color:#ffdf9e}.ae-v22-panels small,.ae-v22-panels span{display:block;font-size:10px;line-height:1.4;color:#b9cedb;margin-top:4px}.ae-v22-pack-strip{display:flex;gap:3px;height:45px}.ae-v22-pack-strip img{object-fit:contain}.ae-v22-mission progress{width:100%;height:7px;accent-color:#eccb70;margin-top:7px}.ae-v22-mission button{font-size:10px;margin-top:6px}.ae-v22-footer{text-align:center;font-size:8px;color:#90a8b9;padding:4px 4% 10px;letter-spacing:.02em}.ae-home-v22>p{font-size:11px;text-align:center}.ae-ui:has(.ae-home-v22){padding:0}
@media(max-height:700px) and (max-width:899px){.ae-v22-scene{max-height:43dvh}.ae-v22-actions>.ae-primary{min-height:43px;font-size:20px}.ae-v22-panels>button,.ae-v22-panels>section{padding:7px}.ae-v22-profile{padding-block:5px}.ae-v22-pack-strip{height:32px}.ae-v22-pack-strip img{height:32px}}
@media(min-width:900px){body:has(.ae-home-v22) .phone-stage .phone-scale-box,body:has(.ae-home-v22) .phone-stage .phone-device,body:has(.ae-home-v22) .phone-stage .device-screen{width:min(100vw,1200px)!important}}

/* V22: keep the guardians and the route into battle visible across orientations. */
.ae-home-v22 {
  --home-gold: #dfbb75;
  --home-ink: #091927;
  min-height: 100%;
  background: radial-gradient(ellipse at 75% 40%, #193b4d, var(--home-ink) 62%);
}
.ae-v22-profile {
  position: relative;
  z-index: 2;
  background: linear-gradient(110deg, #18344b, #0b1d2f);
  box-shadow: 0 6px 18px #020b1580;
}
.ae-v22-profile .ae-help {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
}
.ae-v22-profile .ae-help svg { width: 21px; height: 21px }
.ae-v22-hero {
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-height: 0;
  background: #112b3b;
}
.ae-v22-hero::before, .ae-v22-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ae-v22-hero::before {
  z-index: -1;
  background: linear-gradient(90deg, #0b2232ac, transparent 32% 68%, #0b2232ac),
    url('/visual/scenes/guardians-v22.webp') center 42% / cover;
  filter: blur(13px);
  transform: scale(1.05);
}
.ae-v22-hero::after {
  background: linear-gradient(0deg, var(--home-ink), transparent 24%);
}
.ae-v22-scene {
  width: auto;
  max-width: 100%;
  height: clamp(220px, 50dvh, 600px);
  max-height: none;
  object-fit: contain;
}
.ae-v22-logo { z-index: 1 }
.ae-v22-actions {
  margin-top: -33px;
  padding-bottom: 14px;
}
.ae-v22-arena { margin-bottom: 10px }
.ae-v22-arena small {
  color: var(--home-gold);
  font: 800 10px/1.2 system-ui;
  letter-spacing: .15em;
}
.ae-v22-arena h1 {
  margin: 2px 0 0;
  color: #fff1ce;
  font: 700 clamp(23px, 5vw, 38px)/1.1 Georgia, serif;
  text-shadow: 0 2px 8px #040b12;
}
.ae-v22-actions > .ae-primary { width: 100%; min-height: 50px }
.ae-v22-modes button { min-height: 44px; font-size: clamp(10px, 2.9vw, 14px) }
.ae-v22-modes svg { margin-right: 5px; width: 17px; height: 17px }
.ae-v22-panels { padding-bottom: 16px }
.ae-v22-panels > button, .ae-v22-panels > section {
  background: linear-gradient(145deg, #1d3950, #102437);
  box-shadow: inset 0 1px #ffeac323;
  border-color: #a38a5c;
}
.ae-v22-panels .ae-v22-pack-strip {
  display: flex;
  align-items: center;
}
.ae-v22-pack-strip img { flex: 0 1 36px; min-width: 0 }
.ae-v22-mission button { min-height: 44px }
.ae-home-v22 > [role=status] { grid-column: 2; padding-inline: 12px }

@media (min-width: 600px) and (orientation: portrait) {
  body:has(.ae-home-v22) .phone-stage .phone-scale-box,
  body:has(.ae-home-v22) .phone-stage .phone-device,
  body:has(.ae-home-v22) .phone-stage .device-screen { width: min(100vw, 900px) !important }
  .ae-v22-actions, .ae-v22-panels {
    width: min(100%, 570px);
    align-self: center;
  }
}
@media (min-width: 640px) and (orientation: landscape) {
  .ae-home-v22 {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(265px, 1fr);
    grid-template-rows: auto minmax(min-content, 1fr) auto;
  }
  .ae-v22-profile { grid-column: 1 / -1 }
  .ae-v22-hero { grid-column: 1; grid-row: 2 / 4 }
  .ae-v22-scene { height: clamp(215px, 68dvh, 690px) }
  .ae-v22-hero::after { background: linear-gradient(270deg, var(--home-ink), transparent 28%) }
  .ae-v22-actions {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: 14px 8%;
  }
  .ae-v22-panels {
    grid-column: 2;
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 8% clamp(12px, 5dvh, 54px);
  }
}
@media (orientation: landscape) and (min-width: 640px) and (max-height: 460px) {
  body:has(.ae-home-v22) .phone-stage .phone-scale-box,
  body:has(.ae-home-v22) .phone-stage .phone-device,
  body:has(.ae-home-v22) .phone-stage .device-screen { width: 100vw !important }
  .ae-v22-profile { padding-block: 4px }
  .ae-v22-actions { padding-block: 8px }
  .ae-v22-actions > .ae-primary { min-height: 44px; margin-bottom: 6px }
  .ae-v22-panels { padding-bottom: 8px }
}
@media (orientation: portrait) and (max-height: 700px) {
  .ae-v22-scene { height: clamp(180px, 44dvh, 305px) }
  .ae-v22-actions { margin-top: -26px; padding-bottom: 9px }
  .ae-v22-arena { margin-bottom: 6px }
  .ae-v22-actions > .ae-primary { min-height: 44px; margin-bottom: 6px }
}

/* Elemental interface across play, collection and rewards. */
.ae-ui[data-view]:not([data-view=home]) {
  background: radial-gradient(ellipse at 50% 0, #213d53, #0a1a29 55%);
}
.ae-ui[data-view] .ae-page-title {
  padding: clamp(14px, 2.5vw, 24px);
  border: 1px solid #ac8b54;
  border-radius: 12px;
  background: linear-gradient(120deg, #253f55, #101f32 70%);
  box-shadow: inset 0 1px #e6c58655, 0 5px 14px #02091264;
}
.ae-ui[data-view=trials] .ae-trial-progress,
.ae-ui[data-view=collection] .ae-collection-controls,
.ae-ui[data-view=history] .ae-history-row {
  border: 1px solid #887752;
  border-radius: 10px;
  background: linear-gradient(145deg, #21394e, #102438);
}
.ae-ui[data-view] .ae-battle-banner {
  min-height: clamp(150px, 26vw, 225px);
  background: linear-gradient(90deg, #0a1b2c30, #102132 75%),
    url('/visual/scenes/guardians-home.webp') center 43% / cover;
}
.ae-ui[data-view] .ae-battle-banner > img { filter: drop-shadow(0 4px 12px #05101b) }
.ae-ui[data-view] .ae-battle-banner > div { text-shadow: 0 2px 5px #030912 }
.ae-ui[data-view] .ae-battle-strategy,
.ae-ui[data-view] .ae-trial-v2,
.ae-ui[data-view] .ae-league-hero {
  border-radius: 12px;
  box-shadow: inset 0 1px #efd9a331, 0 6px 16px #03091466;
}
.ae-ui[data-view=collection] .ae-card-search,
.ae-ui[data-view=collection] .ae-collection-controls { padding: 10px }
.ae-ui[data-view] .ae-collection-grid button:focus-visible,
.ae-ui[data-view] .ae-pack-item:focus-visible { outline-offset: 3px }
.ae-ui .ae-forge-wallet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}
.ae-forge-wallet > span {
  min-width: 0;
  border: 1px solid #866e48;
  border-radius: 8px;
  padding: 8px 3px;
  text-align: center;
  color: #cfdeea;
  font: 600 11px system-ui;
  overflow-wrap: anywhere;
  background: linear-gradient(#263c51, #102035);
}
.ae-forge-wallet strong { display: block; color: #f7dc9d; font: 700 clamp(16px, 4vw, 24px) Georgia }
.ae-forge-rules { margin: 8px 0 14px; color: #c7dcea; font: 12px/1.55 system-ui }
.ae-forge-rules summary { cursor: pointer; min-height: 40px; padding-block: 10px }
.ae-forge-rules p { margin: 0 }
.ae-forge-upgrades {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 20px;
}
.ae-forge-upgrades label { display: flex; align-items: center; gap: 6px; min-height: 44px; font: 600 12px system-ui }
.ae-progression .ae-pack-reveal {
  background: radial-gradient(ellipse at 50% 18%, #386174, #152c41 55%, #101e2e);
  box-shadow: inset 0 0 0 3px #101f30, 0 5px 20px #040a1455;
}
.ae-progression .ae-pack-reveal button { min-height: 44px }
.elemental-game .battle-header.ae-combat-hud {
  background: linear-gradient(101deg, #255877, #111c2f 52%, #673338);
}
.elemental-game .hand-panel {
  background: linear-gradient(145deg, #213e57, #091a2b 72%);
  box-shadow: inset 0 1px #e9c68744;
}
@media (min-width: 760px) {
  .ae-ui[data-view=trials] .ae-trial-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
  .ae-upgrade-list { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (min-width: 900px) and (orientation: landscape) {
  .ae-v22-actions { align-self: center }
  .ae-v22-scene { mask-image: linear-gradient(90deg, transparent, #000 5% 95%, transparent) }
}

/* The main scene supplies the background behind the existing brand artwork. */
.ae-v22-logo {
  filter: drop-shadow(0 3px 5px #071323d9);
}
.ae-v22-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: inherit;
  object-fit: contain;
  clip-path: polygon(
      49.44% 1.48%, 52.78% 11.48%, 55.28% 15.19%, 61.67% 10.74%, 68.33% 13.70%,
      71.94% 20.00%, 73.33% 28.52%, 79.17% 31.11%, 75.56% 36.67%, 75.00% 45.56%,
      71.94% 51.11%, 76.67% 57.78%, 81.67% 61.85%, 78.06% 64.44%, 86.11% 71.85%,
      83.33% 76.67%, 84.44% 83.33%, 77.22% 86.30%, 55.28% 85.93%, 50.28% 91.48%,
      45.28% 86.67%, 21.39% 86.30%, 17.78% 83.70%, 18.89% 78.15%, 13.89% 72.96%,
      19.17% 65.19%, 16.94% 61.48%, 22.78% 55.93%, 27.50% 50.74%, 25.00% 43.70%,
      25.28% 37.78%, 21.11% 32.22%, 28.33% 29.63%, 29.17% 21.11%, 33.33% 10.37%,
      38.06% 5.19%, 43.06% 3.70%, 44.44% 11.11%, 47.50% 10.37%
  );
}
.ae-v22-hero .ae-v22-logo {
  width: min(56%, 230px);
  max-height: none;
  top: 1%;
}
@media (min-width: 900px) and (orientation: landscape) {
  .ae-v22-hero .ae-v22-logo { top: clamp(4px, calc(50% - 36dvh), 110px) }
}
@media (orientation: landscape) and (max-height: 460px) {
  .ae-v22-hero .ae-v22-logo { width: min(38%, 146px) }
}

/* Pack foil, card roles and elemental creature stages. */
.ae-progression [data-pack] { --pack-foil: #a0b7c8 }
.ae-progression [data-pack=especial] { --pack-foil: #78d2ff }
.ae-progression [data-pack=épico] { --pack-foil: #c9a3ff }
.ae-progression [data-pack=legendario] { --pack-foil: #ffd27b }
.ae-progression [data-pack=elemental] { --pack-foil: #80edbc }
.ae-ui .ae-pack-item[data-pack] {
  border-color: var(--pack-foil);
  background: radial-gradient(ellipse at 50% 36%, color-mix(in srgb, var(--pack-foil) 24%, #132939), #0a1b2a 78%);
}
.ae-pack-item[data-pack] > b { color: var(--pack-foil) }
.ae-progression .ae-pack-reveal[data-pack] { border-color: var(--pack-foil) }
.ae-pack-reveal > progress {
  display: block;
  width: min(76%, 220px);
  height: 8px;
  margin: 8px auto 16px;
  accent-color: var(--pack-foil);
}
.ae-reveal-card {
  --reward-frame: #aabfca;
  width: min(100%, 185px);
  margin: 0 auto 12px;
  overflow: hidden;
  border: 2px solid var(--reward-frame);
  border-radius: 10px;
  background: #0a1a2c;
}
.ae-reveal-card[data-rarity=especial] { --reward-frame: #78d2ff }
.ae-reveal-card[data-rarity=épica] { --reward-frame: #c9a3ff }
.ae-reveal-card[data-rarity=legendaria] { --reward-frame: #ffd27b }
.ae-pack-reveal .ae-reveal-card img { display: block; width: 100%; height: auto; border-radius: 0 }
.ae-reveal-card figcaption { display: grid; gap: 4px; padding: 8px; color: var(--reward-frame) }
.ae-reveal-card figcaption span { font-size: 12px }
.ae-reveal-coins { color: #ffe1a0 }
.ae-card-role {
  display: block;
  padding: 4px max(2px, 4%);
  background: #091b2e;
  color: #cee0ea;
  font: 600 10px/1.2 system-ui;
  overflow-wrap: anywhere;
}
.ae-creature-studio[data-element=fire] { --stage-light: #fc774f }
.ae-creature-studio[data-element=water] { --stage-light: #60d7ff }
.ae-creature-studio[data-element=earth] { --stage-light: #b9d578 }
.ae-creature-studio[data-element=air] { --stage-light: #c1adff }
.ae-creature-studio[data-creature=true] {
  background:
    radial-gradient(ellipse 42% 8% at 50% 72%, #050b14c9 22%, transparent 95%),
    radial-gradient(ellipse at 50% 53%, color-mix(in srgb, var(--stage-light) 29%, #17334a), #0b1b2b 74%);
}
.ae-creature-studio[data-creature=true] .ae-preview-sprite {
  filter: contrast(var(--creature-contrast,1.08)) saturate(var(--creature-saturation,1.08))
    drop-shadow(0 3px 2px #030b14b0);
}

.ae-pack-summary {
  padding: 14px;
  border: 1px solid var(--pack-foil);
  border-radius: 12px;
  background: radial-gradient(ellipse at top, #294658, #0b1b2b 75%);
}
.ae-pack-summary h3 { margin-top: 0; color: var(--pack-foil) }
.ae-pack-summary ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
}
.ae-pack-summary li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid #5b7589;
  border-radius: 7px;
  font-size: 12px;
}
.ae-pack-summary li img { border-radius: 4px }
.ae-pack-summary li span { color: var(--pack-foil); font-weight: 800 }
.ae-pack-summary button, .ae-ui .ae-empty button { min-height: 44px }
.arena .unit.blue { --team-ring: #82dcff }
.arena .unit.red { --team-ring: #ff9b86 }
.arena .unit.ground::before, .arena .unit.flying::before {
  background: radial-gradient(ellipse,
    #071a249a 0 38%, var(--team-ring) 53%, transparent 72%);
  opacity: .78;
}

/* Tactical readability when allied and rival creatures converge. */
.arena .unit[data-health=full]:not(.attacking):not(.frozen):not(.slowed) .health {
  opacity: .32;
}
.arena .unit[data-health=wounded] .health {
  border-color: #071522;
}
.arena .unit[data-health=critical] .health {
  outline: 1px solid #ffdc92;
  outline-offset: 1px;
}
.arena .unit[data-health=critical] .health i {
  background: linear-gradient(#ffe29a, #ee922e 60%, #ab5224);
}
.arena .unit.frozen::before {
  background: radial-gradient(ellipse, #101b2e 22%, #a8ebff 52%, transparent 74%);
}
.arena .unit .ae-unit-state {
  right: 0;
  top: auto;
  bottom: 5%;
}

.arena .deploy-zone {
  box-sizing: border-box;
  inset: 55% 13% 6%;
  width: auto;
  height: auto;
  pointer-events: none;
  border: 2px dashed #a8ecff;
  background: linear-gradient(0deg, #0952685c, #65dbff24);
}
.arena .deploy-zone[data-affordable=false] {
  border-color: #e6b981;
  background: #563b222b;
}
.arena .deploy-zone span {
  color: #fff5da;
  background: #0b2435eb;
  border: 1px solid #a9d9e2;
  border-radius: 5px;
  padding: 4px 6px;
  font: 750 clamp(9px, 2.5cqw, 13px)/1.25 system-ui;
  text-align: center;
}
.arena .aim-marker.invalid .ae-deploy-preview,
.arena .aim-marker[data-affordable=false] .ae-deploy-preview { opacity: .35 }
@media (pointer: coarse) {
  .ae-cancel-card { min-width: 44px; min-height: 44px }
}

/* Confirm a rejected tap at the point the player touched. */
.arena .aim-marker[data-rejected=true] {
  --cast: #ff857b;
  border-color: var(--cast);
  background: #541e29a6;
  box-shadow: 0 0 0 3px #140e1caa;
  z-index: 140;
}
.arena .aim-marker[data-rejected=true]::after {
  content: '×';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff2ee;
  font: 800 22px/1 system-ui;
  text-shadow: 0 1px 3px #44141a;
}
.arena .aim-marker[data-rejected=true] .ae-deploy-preview { opacity: .25 }
