/* Light and shadow are scene layers, built from the standalone transparent sprites. */
.arena .actor-art:has(>img) {
  --ground: 94%;
  --contact-x: 61%;
  --contact-width: 66%;
  position: relative;
  isolation: isolate;
  filter: none;
}
.arena .actor-art:has(>img)::before,
.arena .actor-art:has(>img)::after,
.actor-light {
  content: "";
  position: absolute;
  pointer-events: none;
}
.arena .actor-art:has(>img)::before {
  left: var(--contact-x);
  top: var(--ground);
  width: var(--contact-width);
  height: 13%;
  transform: translate(-50%, -40%) rotate(-4deg);
  background: radial-gradient(ellipse, #08090ae0 8%, #08090a94 39%, transparent 72%);
}
.arena .actor-art:has(>img)::after {
  inset: auto 0 var(--shadow-bottom, 6%) 0;
  height: 100%;
  transform-origin: center bottom;
  transform: skewX(-44deg) scaleY(.21) translateX(-13%);
  background: #10131b;
  mask: var(--actor-silhouette) center / contain no-repeat;
  filter: blur(2px);
  opacity: .52;
}
.arena .actor-art > img {z-index: 2}
.arena .hero .actor-art:has(>img) {
  --ground: 92%;
  --contact-width: 76%;
}
.arena .hero[data-character="lamplighter"] .actor-art:has(>img) .actor-light {
  inset: 0 -20% -9% 0;
  background:
    radial-gradient(ellipse 10% 2.1% at 33% 85%, #090b10c0, transparent 100%),
    radial-gradient(ellipse 10% 2.1% at 69% 82%, #090b10bb, transparent 100%),
    radial-gradient(ellipse 22% 27% at 74% 36%, #ffc06969, #f5853030 49%, transparent 100%),
    radial-gradient(ellipse 39% 8% at 60% 85%, #ffb15b43, transparent 100%);
}
.arena [data-enemy-id="fr_slag_hound"] .actor-art {
  --ground: 75%;
  --shadow-bottom: 25%;
  --contact-x: 49%;
  --contact-width: 91%;
}
.arena [data-enemy-id="fr_ash_moth"] .actor-art {
  --ground: 148%;
  --contact-x: 52%;
  --contact-width: 73%;
}
.arena [data-enemy-id="fr_ash_moth"] .actor-art::before {opacity: .38; filter: blur(5px)}
.arena [data-enemy-id="fr_ash_moth"] .actor-art::after {display: none}
.actor .hp-track {border-radius: 99px; border-color: #a88866; background: #141719; box-shadow: 0 0 0 2px #171619cc}
.actor .hp-track > i {border-radius: inherit; background: linear-gradient(#cf6849, #a73629 55%, #671d17)}
.intention.offensive {background: linear-gradient(#4c2421, #1d1619); border-color: #aa583d; border-radius: 12px}
.intention.offensive .icon {color: #e67c53}

@media (orientation: landscape) {
  .topbar {
    background: linear-gradient(115deg, #151d22, #0d1114 68%, #1a2124);
    gap: clamp(6px, 1vw, 20px);
    padding-inline: clamp(8px, 1.5vw, 28px);
    border-color: #686357;
  }
  .topbar .brand {display: none}
  .topbar .run-stats {display: contents}
  .topbar .hud-identity {order: 0}
  .topbar .top-health {order: 1}
  .topbar .top-gold {order: 2}
  .topbar .relic-hotbar {order: 3; justify-content: safe center}
  .topbar .potion {order: 4}
  .topbar .topnav {order: 5; margin-left: auto}
  .topbar .relic-hotbar, .topbar .potion-hotbar {
    border: 1px solid #706b5d;
    border-radius: 5px;
    background: #070c10a6;
  }
  .topbar .top-health-line {height: 5px; border-radius: 5px; overflow: hidden; background: #352723}
  .topbar .top-health-line i {background: linear-gradient(#cb6347,#862920)}

  .battle-controls {
    --tray-height: 75%;
    --dock-inset: max(12px, 2%);
    --dock-center: 36%;
    background: transparent;
  }
  .battle-controls::before {
    display: block;
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: var(--tray-height);
    width: auto;
    background: linear-gradient(120deg, #1d272d, #111b23 48%, #101619);
    border-top: 3px double #777469;
    box-shadow: 0 -9px 18px #070b0e42, inset 0 5px 14px #080c10bb;
    pointer-events: none;
  }
  .battle-controls .energy-area,
  .battle-controls .draw-control,
  .battle-controls .turn-actions {
    position: absolute;
    bottom: var(--dock-center);
    transform: translateY(50%);
    z-index: 15;
  }
  .battle-controls .energy-area {left: var(--dock-inset); width: auto}
  .battle-controls .energy-area > b {display: none}
  .battle-controls .energy-orb > span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #190f07;
    text-shadow: 0 1px 2px #ffdc88;
    white-space: nowrap;
  }
  .battle-controls .energy-orb > span small {display: inline; font-size: .66em; color: inherit}
  .battle-controls .draw-control {left: 10%; }
  .battle-controls .draw-control,
  .battle-controls .piles button {
    min-height: 28px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    background: url('../assets/batch1/ui/button-dark.png') center / 100% 100% no-repeat;
    color: #eadbc5;
    font-size: clamp(9px, 1vw, 16px);
    white-space: nowrap;
  }
  .draw-control .icon {width: 15px;}
  .battle-controls .draw-control b {margin-inline-start: 3px;}
  .battle-controls .turn-actions {right: var(--dock-inset); flex-direction: row-reverse; width: auto}
  .battle-controls .piles {width: auto; height: auto; margin: 0!important}
  .battle-controls .piles button > span {flex-direction: row; gap: 4px}
  .battle-controls .piles:has(>.portrait-exhaust) > button {max-width: none}
  .battle-controls .end-turn {color: #211508; font-weight: 800; text-shadow: 0 1px 0 #ffe4ac; white-space: nowrap}
  .battle-controls .hand .card-cost {
    --gem-fill: #5c3028;
    --gem-edge: #d49a81;
    background: none;
    text-shadow: 0 1px 2px #111;
    isolation: isolate;
  }
  .battle-controls .hand .card-cost::before {
    content: "";
    position: absolute;
    inset: 16%;
    z-index: -1;
    transform: rotate(45deg);
    background: linear-gradient(130deg, var(--gem-fill), #17171b);
    border: 2px solid var(--gem-edge);
    box-shadow: 0 0 0 2px var(--gem-fill), 0 2px 5px #0009;
  }
  .battle-controls .hand .card.skill .card-cost {--gem-fill: #28494d; --gem-edge: #92b6bb}
  .battle-controls .hand .card.power .card-cost {--gem-fill: #49324e; --gem-edge: #c69bc4}
}
@media (orientation: landscape) and (min-width: 1050px) and (min-height: 551px) {
  .game-shell {grid-template-rows: clamp(64px, 11dvh, 95px) minmax(0, 1fr) clamp(170px, 27dvh, 235px)!important}
  .scene-background {inset: 0 0 calc(-1 * clamp(170px, 27dvh, 235px))}
  .topbar .hud-identity {height: 82%; width: auto; flex: 0 0 auto; flex-direction: row; gap: 9px}
  .topbar .hud-identity small {font-size: clamp(12px, 1.35vw, 24px); font-weight: 700}
  .hero-mini {width: clamp(38px, 4vw, 76px); height: auto; aspect-ratio: 1; border-radius: 6px}
  .hero-mini img {width: 278%; height: auto; left: -114%; top: -7%}
  .topbar .relic-hotbar {max-width: 38%; padding-inline: 8px}
  .topbar .relic-hotbar > span, .topbar .potion-slot {width: clamp(30px, 4vw, 68px); height: clamp(38px, 7.8dvh, 78px); flex-basis: auto}
  .topbar .potion {height: auto}
  .replacement-bg {object-position: center bottom}
  /* Wider cards need more clearance; taller battlefields have room for the feet farther forward. */
  .combatants {inset: 16px 8.5% clamp(-9px, calc(17vw - 25dvh), 112px)}
  .arena .hero {width: clamp(185px, 20vw, 350px)}
  .arena .hero .actor-name {display: none!important}
  .arena .hero .hp-track {margin-top: -3%}
  .arena .enemy, .arena .enemy.wisp {width: clamp(118px, 15vw, 270px)}
  .arena [data-enemy-id="fr_ash_moth"] {transform: translateY(-43%)}
  .arena [data-enemy-id="fr_ash_moth"] .intention {top: clamp(28px, 5dvh, 47px)}
  .arena [data-enemy-id="fr_slag_hound"] {transform: translateY(-4%)}
  .arena [data-enemy-id="fr_slag_hound"] .actor-name {margin-top: -16%}
  .arena [data-enemy-id="fr_ash_moth"] .actor-name {margin-top: -12%}
  .arena .actor-name {font-size: clamp(12px, 1.3vw, 23px)}
  .arena .hp-track {width: clamp(88px, 10vw, 175px); height: clamp(14px, 2.1dvh, 20px)!important}
  .arena .hp-track > span {font-size: clamp(10px, 1.12vw, 17px); line-height: 1.2}
  .arena .enemy-side:has(>.actor:nth-child(3)) > .actor {width: calc((100% - 18px)/var(--enemy-count))}
  .battle-controls {--card-size: clamp(138px, 11.4vw, 212px); --card-height: calc(var(--card-size) * 1.45); --hand-visible: calc(var(--card-height) + 25px); --hand-raise: 38px}
  .battle-controls .hand-scroll {left: 20%; right: 20%; top: -185px}
  .battle-controls .hand .card {width: var(--card-size)!important; height: var(--card-height)!important}
  .battle-controls .hand .card-name {font-size: clamp(13px, 1.35vw, 24px)!important}
  .battle-controls .hand .card-description {font-size: clamp(10px, 1.03vw, 18px)!important}
  .battle-controls .hand .card-type {font-size: clamp(9px, .9vw, 16px)}
  .battle-controls .hand .card-cost {width: 22%; height: 18%; display: grid; place-content: center; font-size: clamp(19px, 1.8vw, 33px)}
  .battle-controls .energy-orb {width: clamp(66px, 8vw, 145px); height: auto; aspect-ratio: 1}
  .battle-controls .energy-orb > span {font-size: clamp(26px, 3.7vw, 61px)}
  .battle-controls .end-turn {width: clamp(115px, 12.4vw, 225px); height: clamp(42px, 9dvh, 80px); font-size: clamp(15px, 1.75vw, 30px)}
  .battle-controls .draw-control, .battle-controls .piles button {
    min-height: clamp(34px, 6dvh, 67px);
    padding-inline: clamp(10px, 1.1vw, 20px);
  }
  .battle-controls .draw-control b, .battle-controls .piles b {font-size: 1.2em}
  .battle-controls .draw-control .icon, .battle-controls .piles .icon {width: clamp(15px, 1.6vw, 28px); height: auto}
}
@media (orientation: landscape) and (min-width: 1400px) and (min-height: 780px) {
  .arena .hero {transform: translateY(16px)}
  .arena [data-enemy-id="fr_slag_hound"] {transform: translateY(3%)}
}
@media (orientation: landscape) and (max-width: 1049px) {
  .battle-controls {--tray-height: 100%; --dock-center: 50%}
  .battle-controls .draw-control {left: 76px}
  .battle-controls .hand-scroll {left: 131px; right: 156px}
  .battle-controls .draw-control .icon, .battle-controls .piles .icon, .battle-controls .end-turn .icon {display: none}
  .battle-controls .end-turn {width: auto; min-width: 68px; font-size: 11px; padding-inline: 10px}
}
@media (orientation: landscape) and (max-width: 650px) {
  .battle-controls .draw-control {left: var(--dock-inset); bottom: 12px; transform: none}
  .battle-controls .energy-area {bottom: 52px}
  .battle-controls .turn-actions {flex-direction: column}
  .battle-controls .hand-scroll {left: 80px; right: 124px}
}
@media (orientation: landscape) and (min-height: 351px) and (max-height: 550px) {
  .battle-controls {--hand-visible: 151px}
  .battle-controls .hand .card {height: 145px!important}
}
@media (orientation: portrait) {
  .battle-controls .draw-control {position: absolute; z-index: 15; left: 66px; bottom: 172px; font-size: 10px; color: #e6d5bb}
  .draw-control .icon {width: 15px; vertical-align: middle}
}
@media (orientation: portrait) and (max-height:680px) {
  .battle-controls .draw-control {bottom: 113px}
}

/* Resolve all fan positions before enabling hover and selection transitions. */
.battle-controls .hand:not(.fan-ready) .card {transition: none !important}
.dragging .battle-controls .hand .card.drag-source {pointer-events: none}

/* Match the native painted card frame aspect ratio at every hand size. */
.battle-controls .hand .card {width:auto!important; aspect-ratio:192 / 248!important}
.card:after {background-size:contain}
.end-turn,.topnav button,.log-button,.battle-controls .draw-control,.battle-controls .piles button {
  border:6px solid transparent;
  border-image:url('../assets/batch1/ui/button-dark.png') 30 66 fill / 7px 12px / 0 round;
  background:none;
}
.battle-controls .end-turn {
  border:0;
  border-image:none;
  background: url('../assets/batch1/ui/button-gold.png') center / contain no-repeat;
}
.room-illustration {display:block;width:100%;height:clamp(54px,14dvh,122px);object-fit:cover;object-position:center;border-radius:4px}
.catalog-thumbnail {float:right;width:clamp(44px,10vw,90px);height:60px;margin:0 0 3px 5px;object-fit:contain}
.character-thumbnail {width:38px;height:42px;object-fit:contain;float:right}
.detail-illustration,.offer-art {display:block;max-width:100%;width:auto;height:clamp(60px,13dvh,140px);margin:0 auto;object-fit:contain}
.status-art {width:1.3em;height:1.3em;object-fit:contain;vertical-align:middle}
.arena [data-enemy-id="wisp"] .actor-art::before {opacity:.35;filter:blur(4px)}
.arena [data-enemy-id="wisp"] .actor-art::after {display:none}
.scene-background picture {display:contents}
.menu-illustration {display:block;width:100%;height:clamp(56px,13dvh,130px);object-fit:cover}
@media (orientation:portrait) {
  .scene-background {left:0;right:0}
  .replacement-bg {object-position:center}
  .arena .arena-bottom {top:55px;bottom:auto;left:8px;right:auto;width:auto;pointer-events:none}
  .arena-bottom .log-button {pointer-events:auto;margin:0;transform:none}
}
@media (orientation:landscape) and (min-width:1050px) {
  .battle-controls .hand .card-description {font-size:clamp(10px,.83vw,15px)!important;line-height:1.2;top:71%;left:10%;right:10%}
}
.enemy[style*="--painted-top"] .intention {top:calc(var(--painted-top) - 26px)}
.topnav .icon-button {
  border:1px solid #8d806d;border-image:none;border-radius:5px;background:linear-gradient(#20252a,#12171c);
}
@media (orientation:portrait),(orientation:landscape) and (max-height:550px) {
  .topnav button {border:1px solid #796e5d;border-image:none;border-radius:5px;background:linear-gradient(#20252a,#12171c)}
}

/* Shared brass edges and dark enamel for live controls. */
.game-shell,.modal,.product-root {--metal-line:#867456;--metal-highlight:#c3a47a;--enamel:linear-gradient(160deg,#313b40,#182127 52%,#10171b)}
.topbar .top-health {display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px;min-width:0;isolation:isolate}
.topbar .top-health>.icon {width:clamp(15px,1.7vw,23px);height:auto;color:#e18467;fill:#ad493a;filter:drop-shadow(0 1px 1px #120d0b)}
.topbar .top-health b,.topbar .top-health-line {grid-area:1 / 2}
.topbar .top-health b {z-index:1;padding:1px 7px;line-height:1.25;color:#fff2e3;text-shadow:0 1px 2px #210c0a;text-align:center;font-size:clamp(13px,1.35vw,19px);font-variant-numeric:tabular-nums;white-space:nowrap}
.topbar .top-health em {font-size:.86em;font-style:normal;color:inherit}
.topbar .top-health-line {position:static;height:100%;min-height:16px;display:block;border:1px solid #947253;border-radius:6px;background:#241c1d;overflow:hidden}
.topbar .top-health-line i {height:100%;background:linear-gradient(#b45742,#862c27);box-shadow:inset 0 1px #e7815d}
.topbar .topnav button,.arena .log-button,.battle-controls .draw-control,.battle-controls .piles button {
  border:1px solid var(--metal-line);border-image:none;border-radius:5px;
  background:var(--enamel);box-shadow:inset 0 0 0 2px #161d20,inset 0 3px #9e8964,0 2px 3px #0007;
  color:#f0dfc2;line-height:1.1;font-weight:600;letter-spacing:0;align-items:center;justify-content:center;
}
.topbar .topnav button .icon {flex:none}
.topbar .topnav small {border:0;background:#141a1e;padding:2px 4px;border-radius:3px;font-variant-numeric:tabular-nums}
.topbar .potion {position:relative}
.topbar .potion small {position:absolute;bottom:0;right:1px;background:#1d2022;color:#ecd9b7;border-radius:4px;padding:0 2px;line-height:1}
@media(orientation:portrait){.topbar .potion{position:absolute}}
.arena .intention {display:inline-flex;align-items:center;justify-content:center;gap:4px;width:max-content;max-width:100%;padding:2px 8px;border-radius:14px;box-shadow:inset 0 0 0 2px #151b20,0 2px 4px #0008}
.arena .intention.defensive {color:#e0eef4;border:1px solid #8da7b3;background:linear-gradient(#3a4f5a,#19242c)}
.arena .intention.defensive .icon {color:#a7d8ee}
.arena .intention strong {line-height:1;font-weight:700;font-variant-numeric:tabular-nums}
.hero-side>.character-resource {width:max-content;max-width:clamp(80px,12vw,152px);padding:5px 8px;font-size:clamp(11px,.95vw,14px);line-height:1.2;color:#e5d7bc;background:var(--enamel);border:1px solid var(--metal-line);border-radius:6px;box-shadow:inset 0 1px #baa57b50,0 2px 5px #0007}
.hero-side>.advanced-resource {display:grid;justify-items:center;gap:3px;overflow:auto}
.hero-side>.advanced-resource:empty {display:none}
.advanced-resource .orb-slots {display:flex;justify-content:center;gap:4px}
.orb-slot {display:block;width:9px;aspect-ratio:1;border-radius:50%;border:1px solid #9c947f;background:#10171c;box-shadow:inset 0 1px 2px #000}
.orb-slot.charged {--orb:#f7ba58;background:radial-gradient(circle at 32% 28%,white,var(--orb) 43%,#242329);border-color:var(--orb)}
.orb-frost.charged {--orb:#8ed5f1}.orb-dark.charged {--orb:#aa86dd}.orb-plasma.charged {--orb:#ea897c}.orb-glass.charged {--orb:#a2d4be}
.battle-controls .energy-orb {container-type:inline-size}
.battle-controls .energy-orb>span {display:flex;align-items:center;justify-content:center;gap:0;font:700 28cqw/1 var(--sans);letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.battle-controls .energy-orb>span small {font-size:.78em;line-height:1;color:inherit;letter-spacing:0}
.battle-controls .end-turn {display:inline-grid;place-items:center;line-height:1.1;text-align:center;padding:0;letter-spacing:0;font-size:clamp(13px,1.48vw,25px);font-weight:720;color:#281a0c;text-shadow:0 1px #f4d294}
.battle-controls .end-turn .icon {display:none}
.battle-controls .end-turn>span {display:block;line-height:1.1}
.battle-controls .hand .card {container-type:inline-size}
.battle-controls .hand .card-type {display:grid;place-items:center;line-height:1;font-size:clamp(10px,7cqw,15px);letter-spacing:0}
.battle-controls .hand .card-description {
  top:70%;bottom:6%;left:10%;right:10%;height:auto;min-height:0;align-content:center;
  font-size:clamp(11px,7.8cqw,16px)!important;line-height:1.22!important;letter-spacing:0;overflow:hidden;overflow-wrap:anywhere;text-align:center;color:#251d19;
}
.battle-controls .hand .card.long-rules:is(.desktop-preview,.selected) .card-description {
  top:auto;bottom:5%;height:auto;min-height:23%!important;max-height:62%;padding:3px!important;
  background:#ddcfb9;border-radius:2px;font-size:clamp(12px,8cqw,17px)!important;
}
.hand .card-bottom {display:none}
.card-peek {max-height:calc(100dvh - var(--ad-space) - 22px);overflow:auto}
.card-peek .peek-rules {font-size:15px;line-height:1.45;color:#fff0d7;margin:8px 0;overflow-wrap:anywhere}
.product-root .product-dialog,dialog.modal {border-radius:8px;border:1px solid #887250;background:linear-gradient(140deg,#2a3234,#1c2429 48%,#141a1e);box-shadow:inset 0 0 0 3px #13191d,inset 0 0 0 4px #695d49,0 14px 48px #0009;color:#f2e5d0}
.product-root .product-dialog header {background:#1b2328f8;border-bottom:1px solid #77664c}
.product-root .product-menu button,.modal .choices button {background:linear-gradient(150deg,#333c3e,#1c2428);border:1px solid #78694e;color:#efe2cb;border-radius:5px;line-height:1.4;overflow-wrap:anywhere}
.product-root .product-menu .product-primary {background:linear-gradient(#c2a071,#9e7848);color:#1a1815;border-color:#d4b17b}
.modal .choices button b {font-size:clamp(14px,1.5vw,19px)}
.modal .choices button span,.modal .muted {font-size:clamp(12px,1.16vw,15px);line-height:1.45}
.modal .deck-grid,.modal .reward-cards {min-width:0}
.game-shell button:focus-visible,.modal button:focus-visible,.product-dialog button:focus-visible {outline:2px solid #ebc17f;outline-offset:2px}
@media(orientation:landscape) and (max-width:1049px){.battle-controls .end-turn {min-width:82px}}
@media(orientation:landscape) and (min-width:1050px){.topbar .topnav button,.battle-controls .piles button,.battle-controls .draw-control {font-size:clamp(12px,1.05vw,17px)}}
.hero-side>.advanced-resource>.orb-slots {display:flex;flex-direction:row;align-items:center;gap:4px}
.character-resource .orb-slot {width:9px;height:9px}
.character-resource .orb-slot.charged {background:radial-gradient(circle at 32% 28%,white,var(--orb) 43%,#242329)}
.map-modal .map-node strong,.map-modal .map-node small {max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
.compact-reward .reward-gold {display:flex;align-items:center;justify-content:center;gap:6px;color:#e5c58c;font-size:18px;margin:0 auto 6px}
.compact-reward .reward-gold .icon {width:22px;height:22px}
.modal .compact-reward {margin:12px auto}
.modal .compact-reward>.item-art {width:64px;height:64px;margin:0 auto;object-fit:contain}
.modal .compact-reward .reward-cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr));align-items:stretch;max-width:660px;gap:12px;padding:6px 2px;margin:12px auto;overflow:visible}
.compact-reward .reward-cards .card {
 display:grid;grid-template-columns:28px minmax(0,1fr);grid-template-rows:auto auto auto 1fr;align-content:start;align-items:center;
 width:100%;height:auto;max-width:240px;min-width:0;margin:auto;align-self:stretch;
 background:linear-gradient(#362b25,#201d1b 55%,#cabca5 55%)!important;border:2px solid #86745f!important;border-radius:5px;overflow:hidden;
}
.compact-reward .reward-cards .card:after {display:none}
.compact-reward .reward-cards .card-cost {position:static;width:28px;height:30px;display:grid;place-content:center;font-size:16px;line-height:1}
.compact-reward .reward-cards .card-name {position:static;margin:0 6px 0 0;letter-spacing:0;overflow-wrap:anywhere;font-size:14px!important}
.compact-reward .reward-cards .card-art {position:relative;inset:auto;width:100%;height:auto!important;aspect-ratio:360 / 234;grid-column:1/-1}
.compact-reward .reward-cards .card-art img {display:block;width:100%;height:100%;object-fit:cover}
.compact-reward .reward-cards .card-type {position:static;grid-column:1/-1;background:#332b25;color:#ead6ae;font-size:12px;line-height:20px;height:20px}
.compact-reward .reward-cards .card-description {position:static;grid-column:1/-1;align-self:stretch;align-content:center;background:#d4c5ad;padding:8px!important;font-size:14px!important;line-height:1.35!important;overflow-wrap:anywhere}
.compact-reward .card-bottom {display:none}
.modal .choices:has(>article),.modal .deck-grid:has(>article) {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));align-items:start}
.modal .choices>article,.modal .deck-grid>article {min-width:0;padding:12px;border:1px solid #716249;border-radius:6px;background:linear-gradient(150deg,#31383a,#192227);overflow-wrap:anywhere}
.modal article>.item-art,.modal .choices>button>.item-art {display:block;width:58px;height:58px;object-fit:contain;margin:0 auto 6px}
.modal article .primary {min-width:0;padding:8px 12px;margin-top:5px}
.modal .compact-reward .primary,.modal article .primary {background:linear-gradient(#675640,#41392e);border-color:#ae9164;border-radius:5px;letter-spacing:.03em}
.compact-reward .reward-cards .card {--reward-rim:#ad785e;--reward-band:#482e28;border-color:var(--reward-rim)!important;margin-block:0;background:var(--reward-band)!important;box-shadow:inset 0 0 0 2px #150f0c,0 3px 8px #0007!important}
.compact-reward .reward-cards .card.skill {--reward-rim:#809d99;--reward-band:#263d40}
.compact-reward .reward-cards .card.power {--reward-rim:#a48aa0;--reward-band:#40303f}
.compact-reward .reward-cards .card-type {background:var(--reward-band);border-block:1px solid var(--reward-rim)}
.compact-reward .reward-cards .card-description {justify-self:stretch;background:linear-gradient(120deg,#e6d8c0,#c6b7a2)}
#overlay-root .modal {inset:0 0 var(--ad-space);margin:auto;max-height:calc(100dvh - var(--ad-space) - 16px);overscroll-behavior:contain}
.modal .modal-heading h2 {margin:6px 0;line-height:1.25;letter-spacing:.04em}
.modal .modal-heading p {margin:6px auto 0;font-size:13px;line-height:1.45}
.modal .compact-reward>.primary {margin-top:5px;min-width:110px;padding:8px 16px}
@media(max-width:600px),(max-height:500px){
 #overlay-root .modal:has(.compact-reward) {padding:16px 14px}
 .modal .compact-reward h3 {margin:8px 0}
 .modal .compact-reward .reward-cards {gap:8px;margin:6px auto}
}
/* Let the painted frame and silhouette carry the selection treatment. */
.hand .card .card-type,.card-peek .card .card-type,.deck-grid .card .card-type {background:transparent;border:0;box-shadow:none}
.actor.enemy:is(.targetable,.drag-target,.drag-hover,.locked-target)::after {content:none}
.drag-guide .aim-filament {fill:none;stroke:#bc813e;stroke-width:1.2;opacity:.68;filter:drop-shadow(0 0 3px #e89641)}
.drag-guide .aim-path {stroke:#ffda89;stroke-width:2.4;stroke-dasharray:9 4 1 6;filter:drop-shadow(0 1px 1px #573918)}
.drag-guide.ready .aim-path {stroke:#fff0b9}
.icon.currency-coin {object-fit:contain;aspect-ratio:1;flex-shrink:0}
.topbar .top-gold .currency-coin {display:block;width:clamp(18px,2vw,26px);height:auto}
.topbar .emblem,.intention .emblem,.page-shell .emblem {filter:drop-shadow(0 1px 1px #101514)}
.arena .intention .emblem {width:18px;height:18px}
.page-shell .map-node:not(.current,.available,.visited) {opacity:.83;color:#b8c0ad}
.page-shell .map-node small {font:10px/1.2 system-ui;color:#b2bca9}
@media (max-width:900px){
 .topbar .topnav button {min-width:44px;min-height:44px}
 .topbar .topnav .emblem {width:20px;height:20px}
}
@media (max-width:1100px) {
 .battle-controls .end-turn {box-sizing:border-box;min-width:104px;width:auto;min-height:48px;height:auto;padding:7px 10px;border:1px solid #dcb374;border-radius:6px;background:linear-gradient(#f3d191,#be9252);box-shadow:inset 0 0 0 2px #9e753c,0 2px 5px #0009;font:700 16px/1.15 system-ui}
 .battle-controls .draw-control,.battle-controls .piles button,.arena .log-button {box-sizing:border-box;min-height:44px;height:auto;min-width:48px;font:600 13px/1.2 system-ui;padding:4px 6px}
 .battle-controls .piles button>span {line-height:1.2}
 .battle-controls .piles button b,.battle-controls .draw-control b {font-size:13px}
 .battle-controls .draw-control .icon,.battle-controls .piles .icon {display:none}
 .battle-controls .turn-actions {gap:5px;width:auto;align-items:flex-end}
 .battle-controls .piles {height:auto;min-height:0;width:auto;gap:4px}
 .battle-controls .piles:has(.portrait-exhaust) button {max-width:none}
}
@media (orientation:landscape) and (max-width:1100px){
 .battle-controls .turn-actions {display:flex;flex-direction:column;right:5px;bottom:4px;top:auto;transform:none}
 .battle-controls .draw-control {left:6px;bottom:4px;top:auto;transform:none}
 .battle-controls .energy-area {left:6px;bottom:53px;top:auto;transform:none}
 .arena-bottom .log-button {right:6px}
}
@media (orientation:landscape) and (max-width:1100px){
 .arena .arena-bottom {bottom:42px}
}
@media (orientation:portrait) and (max-width:1100px){
 .battle-controls .turn-actions {flex-direction:row-reverse;align-items:center}
 .battle-controls .turn-actions:has(.portrait-exhaust) .piles {flex-direction:column}
}
@media (max-height:520px) {
 .page-shell .shop-offer .offer-art {height:34px}
 .page-flow .shop-offer p {margin-block:3px}
}

.arena .actor-art>img {transform-origin:50% var(--ground,92%)}
@media(prefers-reduced-motion:no-preference){
 body:not(.reduce-motion) .actor:not(.dead) .actor-art>img {animation:actor-breath 3.2s ease-in-out infinite}
 body:not(.reduce-motion) .enemy:not(.dead) .actor-art>img {animation-duration:2.65s;animation-delay:-1s}
 body:not(.reduce-motion) [data-enemy-id=fr_ash_moth]:not(.dead) .actor-art>img {animation:wing-hover 1.8s ease-in-out infinite}
 @keyframes actor-breath {0%,100%{scale:1 1;transform:rotate(-.45deg)}50%{scale:1.009 1.022;transform:rotate(.65deg)}}
 @keyframes wing-hover {0%,100%{transform:translateY(1%) rotate(-2deg);scale:.98 1}50%{transform:translateY(-4%) rotate(2deg);scale:1.025 .96}}
}
.foil-glint {position:absolute;z-index:4;inset:18% 8% 37%;overflow:hidden;pointer-events:none}
.foil-glint:after,.forge-result:after {content:"";position:absolute;inset:-60% -85%;background:linear-gradient(112deg,transparent 41%,#71cae829 47%,#fff2b488 50%,#b5c5f450 52%,transparent 59%);transform:translateX(-80%);pointer-events:none}
.card.upgraded .card-name,.offer-option.tempered .offer-copy strong {color:#ffe4a1;text-shadow:0 0 5px #c18c39}
.page-flow .offer-option.tempered {border-color:#bb9659}
.forge-result {position:absolute;z-index:120;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:12px;max-width:85%;width:max-content;overflow:hidden;pointer-events:none;padding:12px;background:linear-gradient(120deg,#3b3328,#172126);border:1px solid #e1b46a;border-radius:6px;box-shadow:0 0 20px #daa95859,0 4px 20px #080b0cd9}
.forge-result .card{width:clamp(104px,25dvh,154px);height:auto;aspect-ratio:192/248;margin:0;pointer-events:none}.forge-result .card-name{height:auto;padding:0;font:600 12px/1.1 system-ui}.forge-result .card-description{min-height:0;height:auto;padding:0;font:11px/1.2 system-ui}.forge-result>span{display:grid;gap:4px}.forge-result>span>small{color:#ddc18f;font:14px system-ui}.forge-result>span>strong{color:#ffe2a1;font:650 18px system-ui}
@media(prefers-reduced-motion:no-preference){
 body:not(.reduce-motion) .foil-glint:after {animation:tempered-sheen 5.4s ease-in-out infinite}
 body:not(.reduce-motion) .forge-result:after {animation:forge-sweep 1s ease-out both}
 @keyframes tempered-sheen {0%,67%{transform:translateX(-80%)}90%,100%{transform:translateX(80%)}}
 @keyframes forge-sweep {from{transform:translateX(-65%)}to{transform:translateX(65%)}}
}
.strike-trail{position:absolute;z-index:3;pointer-events:none;right:-10%;top:32%;width:48%;height:32%;border-radius:50%;border-right:3px solid #ffdf9b;box-shadow:3px 1px 5px -3px #fc8e43;rotate:-32deg}
.enemy .strike-trail{right:auto;left:-8%;rotate:32deg;scale:-1 1;border-right:0;border-left:3px solid #edaa72;box-shadow:-3px 1px 5px -3px #ed7842}
.combat-fx{position:absolute;z-index:6;pointer-events:none;color:var(--tint);filter:drop-shadow(0 0 3px currentColor)}
.fx-shot{width:36px;height:6px;background:linear-gradient(90deg,transparent,currentColor 66%,#fff4cc);clip-path:polygon(0 43%,75% 28%,69% 0,100% 50%,69% 100%,75% 72%,0 60%)}
.fx-cast,.fx-channel,.fx-star{width:clamp(27px,5vmin,48px);aspect-ratio:1;border:2px solid currentColor;border-radius:50%;box-shadow:0 0 9px currentColor,inset 0 0 8px currentColor}
.fx-cast:before,.fx-channel:before,.fx-star:before{content:"";position:absolute;inset:15%;border:1px solid currentColor;transform:rotate(45deg)}
.fx-star:before{inset:0;background:#ffdc83;clip-path:polygon(50% 0,60% 37%,100% 50%,60% 62%,50% 100%,40% 62%,0 50%,40% 37%)}
.fx-spirit{width:40px;height:24px;border-radius:80% 20% 60% 20%;background:radial-gradient(ellipse at 78% 38%,white 5%,#caa8ff 12%,#8666b6 38%,transparent 70%)}
@media(prefers-reduced-motion:no-preference){
 body:not(.reduce-motion) .actor:not(.dead):is([data-stance=hover]) .actor-art>img{animation:wing-hover 3.1s ease-in-out infinite}
 body:not(.reduce-motion) .actor:not(.dead):is([data-stance=weight],[data-character=starforger]) .actor-art>img{animation:weight-shift 3.8s ease-in-out infinite}
 body:not(.reduce-motion) .actor:not(.dead):is([data-stance=stalk],[data-character=bladeRunner]) .actor-art>img{animation:stalk 2.4s ease-in-out infinite}
 body:not(.reduce-motion) .actor:not(.dead)[data-character=spiritbinder] .actor-art>img{animation:actor-breath 4.2s ease-in-out infinite}
 body:not(.reduce-motion) .actor:not(.dead):is([data-stance=ritual],[data-character=orbweaver]) .actor-art>img{animation:ritual-sway 3.6s ease-in-out infinite}
 @keyframes ritual-sway{50%{transform:rotate(-1.4deg);scale:1 1.025}}
 @keyframes weight-shift{50%{scale:1.014 .978;transform:rotate(-.8deg)}}
 @keyframes stalk{50%{transform:skewX(-1.6deg) rotate(.8deg);scale:1.012 .986}}
}
.enemy-aura{position:absolute;z-index:3;pointer-events:none;inset:8% 5%;border:3px double currentColor;border-radius:50%;color:#a6ffe0;box-shadow:0 0 14px currentColor,inset 0 0 11px currentColor;background:repeating-conic-gradient(from 9deg,transparent 0deg 27deg,currentColor 28deg 29deg,transparent 30deg) center/100% 100%;mask-image:radial-gradient(ellipse,transparent 46%,black 66%)}
.enemy-aura.shift{color:#ffa461;inset:0 -6%;border-width:5px}
.floating-number.absorbed{color:#a3e9ff}

.fx-chain{height:7px;transform-origin:left center;background:radial-gradient(ellipse at center,transparent 28%,#fff1bf 35%,#a26b42 58%,transparent 69%) 0 0/12px 7px repeat-x;filter:drop-shadow(0 1px 2px #491f0e)}
.fx-chain:after{content:"";position:absolute;right:-4px;top:-4px;width:16px;height:16px;background:#fff0ba;clip-path:polygon(50% 0,60% 38%,100% 50%,63% 60%,50% 100%,40% 62%,0 50%,39% 39%);filter:drop-shadow(0 0 4px #ff8e38)}
.class-fx{--light:#ffdb83;position:absolute;z-index:5;left:48%;top:25%;width:clamp(39px,7vmin,68px);aspect-ratio:1;color:var(--light);pointer-events:none;filter:drop-shadow(0 0 5px var(--light))}
.class-fx>b,.class-fx:before,.class-fx:after{position:absolute;content:"";pointer-events:none}
.class-fx>b{inset:12%;border-radius:50%;background:radial-gradient(circle at 38% 30%,white 2%,var(--light) 22%,#20263e 68%,transparent 74%);box-shadow:inset 0 0 4px white}
.class-fx:before{inset:-10%;border:2px solid;border-radius:50%;transform:rotate(-30deg) scaleY(.56)}
.class-fx:after{inset:-16%;background:repeating-conic-gradient(transparent 0 38deg,currentColor 39deg 42deg,transparent 44deg 60deg);mask-image:radial-gradient(circle,transparent 40%,black 49%,transparent 71%)}
.class-fx em{position:absolute;top:78%;left:50%;transform:translateX(-50%);font:700 clamp(16px,3.5vmin,24px)/1 system-ui;color:white;text-shadow:0 1px 4px #151019}
.class-fx.orb-pulse{left:30%;top:35%}.orb-pulse>b{inset:0;clip-path:polygon(55% 0,47% 34%,84% 17%,65% 45%,100% 55%,62% 61%,43% 100%,43% 71%,5% 79%,33% 53%,6% 37%,38% 33%);background:linear-gradient(135deg,white,var(--light) 70%)}
.class-fx:is(.summon,.ward){--light:#d6aaff;top:30%}.class-fx.ward>b,.class-fx.lantern>b{inset:0;background:linear-gradient(135deg,white,var(--light) 27%,#362a4c 65%,var(--light));clip-path:polygon(50% 0,93% 17%,85% 65%,50% 100%,15% 65%,7% 17%)}
.class-fx:is(.star-spend,.star-gain)>b{inset:0;background:linear-gradient(130deg,white,#ffcd68 55%,#d18842);clip-path:polygon(50% 0,61% 36%,99% 38%,69% 60%,80% 98%,50% 76%,18% 98%,30% 61%,0 38%,39% 35%)}
.class-fx.blade>b,.class-fx.momentum>b{inset:-13% 12%;border-radius:0;background:linear-gradient(90deg,#734932,white 47%,#efb954 51%,#794c34);clip-path:polygon(50% 0,69% 18%,56% 65%,91% 59%,93% 71%,57% 77%,55% 99%,41% 99%,39% 77%,4% 70%,6% 59%,39% 65%,36% 18%)}
.arena .boss-actor .actor-art{scale:1.45;transform-origin:50% var(--ground,94%)}
.arena .boss-actor .intention{translate:0 clamp(-68px,-8vh,-24px);z-index:5}
@media(orientation:portrait){.arena .boss-actor .actor-art{scale:1.32;transform-origin:64% var(--ground,94%)}.arena .boss-actor .intention{translate:0 -35px}}
.arena .enemy-side:has(>.enemy:nth-child(2)) .boss-actor .actor-art{scale:1.17}
.arena .enemy-side:has(>.enemy:nth-child(2)) .boss-actor .intention{translate:0 -17px}
@media(orientation:landscape) and (max-height:550px){.arena .enemy-side>.boss-actor:only-child .intention{translate:clamp(40px,6vw,78px) -8px}}
.orb-pulse[data-orb=lightning]>b{inset:-25% 4%;background:linear-gradient(120deg,#fff 28%,#93dfff 72%);clip-path:polygon(65% 0,26% 46%,46% 44%,20% 100%,84% 37%,58% 39%)}
.orb-pulse[data-orb=frost]>b{background:conic-gradient(#c6f5ff,#5393ae,#fff,#7298c4,#c6f5ff);clip-path:polygon(50% 0,85% 28%,82% 72%,50% 100%,16% 71%,15% 29%)}
.orb-pulse[data-orb=dark]>b{clip-path:none;background:radial-gradient(circle,#171026 32%,#8871bf 58%,#e0cbff 66%,transparent 72%)}
.orb-pulse[data-orb=glass]>b{clip-path:polygon(17% 8%,44% 38%,28% 85%,10% 46%,17% 8%,61% 35%,95% 4%,79% 59%,57% 77%,61% 35%,47% 60%,66% 77%,37% 100%,47% 60%);background:linear-gradient(120deg,#8df0cf,#fff,#69cfa5)}
@media(orientation:portrait){
 .arena .enemy-side>.boss-actor:only-child .actor-art{scale:1.55;transform-origin:78% var(--ground,94%)}
 .arena .enemy-side>.boss-actor:only-child .intention{translate:25px -48px}
 .arena .enemy-side:has(>.boss-actor:nth-child(2)):not(:has(>.enemy:nth-child(3)))>.enemy:first-child{translate:0 min(9dvh,78px)}
 .arena .enemy-side:has(>.boss-actor:nth-child(2))>.enemy:first-child .intention{translate:42px -32px}
}
/* The painted title and type plaques share the card's horizontal centre. */
:is(.battle-controls .hand,.card-peek,.deck-grid,.forge-result) .card:not(.compact-reward .card) .card-name{
 inset:7% 9% auto;height:12%!important;min-height:0!important;margin:0;padding:0!important;display:flex!important;align-items:center;justify-content:center;text-align:center;gap:.15em;line-height:1.02!important;letter-spacing:0;box-sizing:border-box
}
:is(.battle-controls .hand,.card-peek,.deck-grid,.forge-result) .card:not(.compact-reward .card) .card-type{
 inset:59.4% 26% auto;height:8.6%;min-height:0!important;margin:0;padding:0!important;display:flex;align-items:center;justify-content:center;line-height:1!important;text-align:center;box-sizing:border-box
}
.card .card-cost,.hp-track>span,.page-shell .page-turn,.page-footer button,.reward-ad-button{align-items:center;justify-content:center;text-align:center}
.page-shell .page-turn,.page-footer button,.reward-ad-button{display:inline-flex;line-height:1.15}
.reward-ad-button{min-height:44px;padding:8px 16px;font:600 15px/1.2 system-ui;color:#ffe2ae;border:1px solid #ac834f;border-radius:6px;background:linear-gradient(#403529,#25282a)}
#banner-ad-root>.adsbygoogle{align-self:start;min-width:0}

.run-results>span{display:grid;justify-items:center;align-content:center;text-align:center;gap:.2em}
[data-action=ad-finish],[data-action=ad-revive]{min-height:44px;text-align:center;line-height:1.25}
.reward-ad-status{margin:0;color:#f6dda9;font:600 14px/1.35 system-ui;text-align:center}
