/* Tokenstone — night-shift datacenter theme. Stage is a fixed 1600x900 canvas scaled to fit. */
:root {
  --bg: #070b14;
  --bg2: #0e1526;
  --ink: #e9eef7;
  --muted: #8d99b3;
  --gold: #ffd166;
  --red: #ff4d5e;
  --green: #3ddc84;
  --blue: #5ab0ff;
  --cream: #f3ead7;
  --cream-ink: #2a2116;
  --panel: rgba(14, 21, 38, .86);
  --line: rgba(120, 160, 255, .18);
  --head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: radial-gradient(1400px 900px at 50% 50%, #0d1730 0%, #060a13 80%); overflow: hidden; color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; user-select: none; }
button { font-family: var(--body); cursor: pointer; }

#stage { position: fixed; left: var(--stage-center-x, 50%); top: var(--stage-center-y, 50%); width: 1600px; height: 900px; transform-origin: 50% 50%; overflow: hidden;
  background: radial-gradient(1200px 700px at 50% 50%, #142142 0%, #0b1224 55%, #060a13 100%); }
#stage.in-game { overflow: clip; touch-action: none; }
#stage.in-game #hud { height: 900px; bottom: auto; }
#stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }

/* ---------------------------------------------------------------- board */
#board { position: absolute; inset: 0; }
.table { position: absolute; left: 150px; top: 252px; width: 1300px; height: 376px; border-radius: 48px;
  background: linear-gradient(180deg, rgba(40, 60, 110, .35), rgba(20, 30, 60, .55) 50%, rgba(40, 60, 110, .35));
  border: 1px solid rgba(140, 180, 255, .22); box-shadow: inset 0 0 80px rgba(0, 0, 0, .55), 0 30px 80px rgba(0, 0, 0, .5); }
.frontier { position: absolute; left: 40px; right: 40px; top: 50%; height: 2px; transform: translateY(-1px);
  background: linear-gradient(90deg, transparent, rgba(255, 209, 102, .9), rgba(90, 176, 255, .9), transparent); box-shadow: 0 0 18px rgba(120, 170, 255, .8); opacity: .55; }
.table-glow { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(600px 160px at 50% 50%, rgba(120, 170, 255, .14), transparent 70%); }
.hero-pad { position: absolute; width: 230px; height: 150px; left: 685px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 170, 255, .14), transparent); }
.hero-pad.me { top: 640px; }
.hero-pad.opp { top: 74px; }
#stage:not(.in-game) #board, #stage:not(.in-game) #hud, #stage:not(.in-game) #history { visibility: hidden; }

/* ---------------------------------------------------------------- actors */
#actors { position: absolute; inset: 0; }
.actor { position: absolute; left: 0; top: 0; transition: transform .38s cubic-bezier(.22, .9, .3, 1), opacity .3s; will-change: transform; }
.actor-body { transform-origin: 50% 50%; }
.a-hand, .a-handBack { transition-duration: .3s; }
.actor.hovered { transition: transform .15s cubic-bezier(.2, .9, .3, 1); }
.actor.held { transition: none; pointer-events: none; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .6)); }
.actor.parked { pointer-events: none; transition-duration: .25s; }
.actor.lifting { transition: transform .15s cubic-bezier(.2, .8, .3, 1); }
.actor.attacking { transition: transform .17s cubic-bezier(.6, 0, .9, .45); }

/* ---------------------------------------------------------------- card face */
.card { position: relative; width: 200px; height: 280px; border-radius: 16px; font-family: var(--body);
  background: linear-gradient(160deg, color-mix(in srgb, var(--cc) 75%, #fff 10%), color-mix(in srgb, var(--cc) 55%, #000 45%));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(255, 255, 255, .18); overflow: visible; }
.card .c-art { position: absolute; left: 14px; top: 14px; width: 172px; height: 128px; overflow: hidden; border-radius: 50% / 46%;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .35), inset 0 0 20px rgba(0, 0, 0, .5); background: #111; }
.card.t-spell .c-art { border-radius: 14px; }
.card.t-weapon .c-art { border-radius: 30px; }
.card.t-hero-power .c-art, .card.t-hero .c-art { border-radius: 50%; left: 36px; width: 128px; }
.card .c-art svg { width: 100%; height: 100%; display: block; font-family: var(--emoji); }
.card .c-frame { position: absolute; inset: 0; border-radius: 16px; pointer-events: none;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--cc) 60%, #fff 40%), inset 0 0 0 6px rgba(0, 0, 0, .25); }
.card.r-legendary .c-frame { box-shadow: inset 0 0 0 3px #ffd970, inset 0 0 0 6px rgba(120, 80, 0, .5), 0 0 22px rgba(255, 209, 102, .55); }
.card.r-epic .c-frame { box-shadow: inset 0 0 0 3px #c58bff, inset 0 0 0 6px rgba(60, 0, 90, .35); }
.c-cost { position: absolute; left: -12px; top: -12px; width: 52px; height: 52px; display: grid; place-items: center; z-index: 3;
  background: radial-gradient(circle at 35% 30%, #9ed2ff, #2c7be5 55%, #0b3d91); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.c-cost span { font: 800 30px/1 var(--head); color: #fff; text-shadow: 0 2px 0 #08306b, 0 0 6px rgba(0, 0, 0, .6); }
.c-cost.cheaper span { color: #7dffb0; }
.c-cost.pricier span { color: #ff8f8f; }
.c-name { position: absolute; left: 6px; right: 6px; top: 132px; height: 34px; display: grid; place-items: center; z-index: 2;
  background: linear-gradient(180deg, #2b3550, #161c2d); border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .15); }
.c-name span { font: 700 16px/1.05 var(--head); color: #fff; text-align: center; padding: 0 8px; text-shadow: 0 1px 2px #000; letter-spacing: .2px; }
.c-dragon { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 26px; color: #ffd166; text-shadow: 0 0 10px rgba(255, 200, 80, .9), 0 2px 0 #7a4b00; z-index: 4; }
.c-gem { position: absolute; left: 50%; top: 162px; transform: translateX(-50%) rotate(45deg); width: 10px; height: 10px; z-index: 3; border: 1px solid rgba(0, 0, 0, .5); }
.r-common .c-gem { background: #e6e6e6; }
.r-free .c-gem { display: none; }
.r-rare .c-gem { background: #3d8bff; }
.r-epic .c-gem { background: #b44dff; }
.r-legendary .c-gem { background: #ffb340; box-shadow: 0 0 8px #ffb340; }
.c-text { position: absolute; left: 14px; right: 14px; top: 170px; bottom: 30px; display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--cream); color: var(--cream-ink); border-radius: 10px; padding: 6px 8px 4px; font: 500 12.5px/1.25 var(--body);
  box-shadow: inset 0 0 12px rgba(120, 90, 40, .25); }
.c-text.smallish { font-size: 11.5px; }
.c-text.small { font-size: 10.5px; line-height: 1.18; }
.c-text b { font-weight: 800; }
.c-race { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); font: 700 10px/1 var(--head); color: #fff; background: rgba(0, 0, 0, .55);
  padding: 3px 9px; border-radius: 8px; letter-spacing: .5px; text-transform: uppercase; z-index: 2; }
.c-class { position: absolute; bottom: 9px; right: 12px; font: 600 8.5px/1 var(--body); color: rgba(255, 255, 255, .55); text-transform: uppercase; letter-spacing: .6px; }
.card .c-class { display: none; }
.c-atk, .c-hp { position: absolute; bottom: -12px; width: 46px; height: 46px; display: grid; place-items: center; font: 800 26px/1 var(--head); color: #fff; z-index: 3;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .65); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .55)); }
.c-atk { left: -10px; background: radial-gradient(circle at 35% 30%, #ffe08a, #f2a600 60%, #8c5a00); border-radius: 50%; }
.c-hp { right: -10px; background: radial-gradient(circle at 35% 30%, #ff9a9a, #e0303e 60%, #7b0b16); clip-path: path('M23 44 C8 34 0 25 0 14 C0 6 6 0 13 0 C18 0 21 3 23 6 C25 3 28 0 33 0 C40 0 46 6 46 14 C46 25 38 34 23 44 Z'); }
.c-atk.w { background: radial-gradient(circle at 35% 30%, #ffe08a, #e8a000 60%, #7a4b00); border-radius: 10px; transform: rotate(45deg); }
.c-atk.w { font-size: 0; }
.c-atk.w::after { content: attr(data-v); }
.c-hp.w { background: radial-gradient(circle at 35% 30%, #d5dbe6, #8792a8 60%, #3b4253); clip-path: none; border-radius: 50%; }
.buffed { color: #7dffb0 !important; }
.damaged { color: #ff7b7b !important; }
.nerfed { color: #ffb4b4 !important; }
.card.big { transform-origin: center; }

/* weapon attack diamond keeps the number upright */
.card .c-atk.w { font-size: 26px; }
.card .c-atk.w { transform: none; border-radius: 12px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* ---------------------------------------------------------------- hand */
.a-hand .card { box-shadow: 0 14px 26px rgba(0, 0, 0, .65); }
.a-hand.playable .card { box-shadow: 0 0 0 4px #3ddc84, 0 0 26px 6px rgba(61, 220, 132, .65), 0 14px 26px rgba(0, 0, 0, .65); }
.a-hand.combo-ready .card { box-shadow: 0 0 0 4px #ffd166, 0 0 30px 8px rgba(255, 209, 102, .7); }
/* Keep both original Health gems readable while a card follows the pointer.
   Pointer events pass through to the real hero, including legal spell targets. */
#hud > .hero-vitals { position: absolute; width: 150px; height: 170px; pointer-events: none; visibility: hidden; }
#stage.card-dragging .hero-vitals { visibility: visible; }
.hero-health-gem { position: absolute; overflow: hidden; }
.card-back { width: 200px; height: 280px; border-radius: 16px; padding: 10px; background: linear-gradient(145deg, #1b2850, #0c1328);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .6), inset 0 0 0 3px #3a4f8a; }
.cb-inner { width: 100%; height: 100%; border-radius: 10px; display: grid; place-items: center; border: 2px solid rgba(120, 160, 255, .35);
  background: repeating-linear-gradient(45deg, rgba(90, 140, 255, .1) 0 10px, transparent 10px 20px), radial-gradient(circle, rgba(255, 209, 102, .2), transparent 60%); }
.cb-inner span { font: 800 90px/1 var(--head); color: rgba(255, 209, 102, .85); text-shadow: 0 0 20px rgba(255, 209, 102, .6); }

/* ---------------------------------------------------------------- minions */
.minion { position: relative; width: 116px; height: 146px; }
.m-portrait { position: absolute; inset: 0; border-radius: 50% / 50%; overflow: hidden; background: #111;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc) 60%, #fff 25%), 0 10px 18px rgba(0, 0, 0, .65); }
.m-portrait svg { width: 100%; height: 100%; display: block; transform: scale(1.35); font-family: var(--emoji); }
.minion.legendary .m-portrait { box-shadow: 0 0 0 4px #ffd166, 0 0 0 7px rgba(120, 80, 0, .6), 0 0 22px rgba(255, 209, 102, .6), 0 10px 18px rgba(0, 0, 0, .65); }
.m-taunt { position: absolute; left: -16px; right: -16px; top: -14px; bottom: -10px; display: none;
  background: linear-gradient(180deg, #b9c3d6, #57627b); clip-path: polygon(50% 0, 100% 14%, 96% 62%, 50% 100%, 4% 62%, 0 14%); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); }
.minion.taunt .m-taunt { display: block; }
.m-shield { position: absolute; inset: -10px; border-radius: 50%; display: none; pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(255, 240, 170, .12), rgba(255, 214, 90, .38) 70%, rgba(255, 220, 120, .65) 72%, transparent 75%);
  animation: shimmer 2.6s ease-in-out infinite; }
.minion.shield .m-shield { display: block; }
@keyframes shimmer { 50% { filter: brightness(1.35); } }
.minion.stealth .m-portrait { filter: blur(.4px) brightness(.75) saturate(.5); opacity: .82; }
.minion.stealth::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(200, 200, 255, .12) 0 6px, transparent 6px 12px); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.m-ice { position: absolute; inset: -4px; border-radius: 50%; display: none; pointer-events: none;
  background: linear-gradient(135deg, rgba(190, 240, 255, .75), rgba(100, 190, 255, .35) 40%, rgba(220, 250, 255, .6)); mix-blend-mode: screen; box-shadow: inset 0 0 18px #fff; }
.minion.frozen .m-ice, .hero.frozen .m-ice { display: block; }
.minion.dormant .m-portrait { filter: grayscale(.85) brightness(.6); }
.m-zzz { position: absolute; top: 34px; left: 0; right: 0; text-align: center; font-size: 30px; animation: bob 2s ease-in-out infinite; text-shadow: 0 2px 6px #000; }
.m-zzz b { font: 800 22px var(--head); color: #fff; margin-left: 2px; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.m-evolve { position: absolute; top: -10px; right: -8px; background: linear-gradient(180deg, #ffd166, #d38b00); color: #2b1a00; font: 800 13px/1 var(--head);
  padding: 4px 6px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.minion.windfury::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 3px dashed rgba(170, 230, 255, .7); animation: spin 3s linear infinite; }
.m-icons { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; z-index: 3; }
.m-icons i { font-style: normal; font-size: 16px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 14, 28, .88); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.m-atk, .m-hp { position: absolute; bottom: -8px; width: 40px; height: 40px; display: grid; place-items: center; font: 800 23px/1 var(--head); color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .7); z-index: 4; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .6)); }
.m-atk { left: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, #f2a600 60%, #8c5a00); }
.m-hp { right: -10px; background: radial-gradient(circle at 35% 30%, #ff9a9a, #e0303e 60%, #7b0b16); clip-path: path('M20 39 C7 30 0 22 0 12 C0 5 5 0 11 0 C15 0 18 2 20 5 C22 2 25 0 29 0 C35 0 40 5 40 12 C40 22 33 30 20 39 Z'); }
.minion.silenced .m-portrait::after { content: '🔇'; }
.a-minion.can-attack .m-portrait { box-shadow: 0 0 0 4px #3ddc84, 0 0 26px 8px rgba(61, 220, 132, .7), 0 10px 18px rgba(0, 0, 0, .65); }
.a-minion.can-attack .m-taunt { filter: drop-shadow(0 0 14px rgba(61, 220, 132, .95)); }

/* ---------------------------------------------------------------- heroes */
.hero { position: relative; width: 150px; height: 170px; }
.h-frame { position: absolute; left: 5px; top: 0; width: 140px; height: 150px; border-radius: 46% 46% 40% 40%; overflow: hidden;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--cc) 70%, #fff 20%), 0 0 0 9px rgba(0, 0, 0, .5), 0 14px 30px rgba(0, 0, 0, .7); background: #111; }
.h-art { position: relative; width: 100%; height: 100%; }
.h-art svg { width: 100%; height: 100%; display: block; transform: scale(1.6); font-family: var(--emoji); }
.h-second { position: absolute; right: 12%; bottom: 10%; font-size: 30px; font-family: var(--emoji); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .7)); }
.h-name { position: absolute; left: 50%; top: 128px; transform: translateX(-50%); white-space: nowrap; font: 700 13px/1 var(--head); color: #fff;
  background: rgba(8, 12, 24, .9); padding: 5px 10px; border-radius: 10px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc) 60%, transparent); z-index: 3; }
.h-hp { position: absolute; right: -14px; bottom: 6px; width: 50px; height: 50px; display: grid; place-items: center; font: 800 26px/1 var(--head); color: #fff; z-index: 4;
  background: radial-gradient(circle at 35% 30%, #ff9a9a, #e0303e 60%, #7b0b16); clip-path: path('M25 48 C9 37 0 27 0 15 C0 6 6 0 14 0 C19 0 23 3 25 7 C27 3 31 0 36 0 C44 0 50 6 50 15 C50 27 41 37 25 48 Z');
  text-shadow: 0 2px 0 rgba(0, 0, 0, .7); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.h-armor { position: absolute; right: -12px; bottom: 54px; width: 44px; height: 46px; display: grid; place-items: center; font: 800 21px/1 var(--head); color: #fff; z-index: 4;
  background: linear-gradient(180deg, #c8d2e4, #66728c); clip-path: polygon(50% 0, 100% 15%, 92% 70%, 50% 100%, 8% 70%, 0 15%); text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.h-atk { position: absolute; left: -14px; bottom: 6px; width: 48px; height: 48px; display: grid; place-items: center; font: 800 25px/1 var(--head); color: #fff; z-index: 4;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, #f2a600 60%, #8c5a00); text-shadow: 0 2px 0 rgba(0, 0, 0, .7); }
.hero.immune .h-frame { box-shadow: 0 0 0 5px #ffd166, 0 0 40px rgba(255, 209, 102, .9); }
.a-hero.can-attack .h-frame { box-shadow: 0 0 0 5px #3ddc84, 0 0 30px 10px rgba(61, 220, 132, .7), 0 14px 30px rgba(0, 0, 0, .7); }
.a-hero { cursor: pointer; }

.hpower { position: relative; width: 86px; height: 86px; }
.hp-art { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc) 60%, #fff 30%), 0 0 0 7px rgba(0, 0, 0, .55), 0 8px 18px rgba(0, 0, 0, .7); }
.hp-art svg { width: 100%; height: 100%; transform: scale(1.4); font-family: var(--emoji); }
.hp-cost { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; display: grid; place-items: center; font: 800 20px/1 var(--head); color: #fff;
  background: radial-gradient(circle at 35% 30%, #9ed2ff, #2c7be5 55%, #0b3d91); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); text-shadow: 0 2px 0 #08306b; }
.hpower.used .hp-art { filter: grayscale(1) brightness(.45); transform: rotateY(180deg); transition: transform .4s; }
.hpower.used .hp-cost { opacity: .3; }
.a-heroPower.usable .hp-art { box-shadow: 0 0 0 4px #3ddc84, 0 0 24px 8px rgba(61, 220, 132, .7); }
.a-heroPower { cursor: pointer; }

.weapon { position: relative; width: 96px; height: 96px; }
.w-art { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px #9aa6bf, 0 0 0 7px rgba(0, 0, 0, .5), 0 8px 18px rgba(0, 0, 0, .7); }
.w-art svg { width: 100%; height: 100%; transform: scale(1.35); font-family: var(--emoji); }
.w-atk, .w-dur { position: absolute; bottom: -8px; width: 38px; height: 38px; display: grid; place-items: center; font: 800 21px/1 var(--head); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .7); }
.w-atk { left: -10px; background: radial-gradient(circle at 35% 30%, #ffe08a, #f2a600 60%, #8c5a00); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.w-dur { right: -10px; background: radial-gradient(circle at 35% 30%, #d5dbe6, #8792a8 60%, #3b4253); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }

.secret { width: 40px; height: 44px; display: grid; place-items: center; background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 70%, #fff 20%), color-mix(in srgb, var(--cc) 60%, #000 40%));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .7)); animation: pulse 2s ease-in-out infinite; }
.secret span { font: 800 20px/1 var(--head); color: #fff; text-shadow: 0 1px 2px #000; }
@keyframes pulse { 50% { filter: drop-shadow(0 0 12px rgba(200, 120, 255, .9)); } }

/* targeting */
.actor.targetable .m-portrait, .actor.targetable .h-frame { animation: target 1s ease-in-out infinite; }
@keyframes target { 50% { box-shadow: 0 0 0 5px #ff4d5e, 0 0 30px 10px rgba(255, 77, 94, .8); } }
.actor.target-hover { filter: brightness(1.25); }
.actor.target-hover .m-portrait, .actor.target-hover .h-frame { box-shadow: 0 0 0 6px #ff4d5e, 0 0 40px 16px rgba(255, 77, 94, .95) !important; }
#arrow { position: absolute; inset: 0; width: 1600px; height: 900px; pointer-events: none; z-index: 500; overflow: visible; }
.arrow-path { animation: march .6s linear infinite; filter: drop-shadow(0 0 8px rgba(0, 0, 0, .7)); }
@keyframes march { to { stroke-dashoffset: -24; } }

/* flashes */
.flash, .hit-flash { animation: hit .35s; }
@keyframes hit { 30% { filter: brightness(2.2) saturate(1.5); transform-origin: center; } }
.trigger-flash { animation: trig .45s; }
@keyframes trig { 40% { filter: brightness(1.8) drop-shadow(0 0 18px #ffd166); } }
.buff-flash { animation: buffa .5s; }
@keyframes buffa { 40% { filter: brightness(1.5) drop-shadow(0 0 16px #7dffb0); } }
.transform-flash { animation: transf .5s; }
@keyframes transf { 0% { filter: brightness(4) blur(4px); } 100% { filter: none; } }
.doom-flash { animation: doom .6s; }
@keyframes doom { 50% { filter: brightness(.4) sepia(1) hue-rotate(-50deg) saturate(4); } }
.hint-glow { animation: hintg 1.4s ease-in-out 2; }
@keyframes hintg { 50% { filter: drop-shadow(0 0 22px #ffd166) brightness(1.3); } }
.hint-target { animation: hintt 1.4s ease-in-out 2; }
@keyframes hintt { 50% { filter: drop-shadow(0 0 26px #ff4d5e) brightness(1.3); } }

/* ---------------------------------------------------------------- fx */
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 600; }
.fx { position: absolute; transform: translate(-50%, -50%); }
.fx-num span { display: block; font: 800 46px/1 var(--head); color: #fff; padding: 6px 12px; border-radius: 40px; text-shadow: 0 3px 0 rgba(0, 0, 0, .55); white-space: nowrap; }
.fx-num { animation: rise 1.1s ease-out forwards; }
.fx-num.dmg span { background: radial-gradient(circle, #ff5a5a 0%, #b3001b 70%); box-shadow: 0 0 24px rgba(255, 60, 60, .8); }
.fx-num.heal span { background: radial-gradient(circle, #5dffa0 0%, #0b8f48 70%); box-shadow: 0 0 24px rgba(60, 255, 140, .6); }
.fx-num.armor span { background: radial-gradient(circle, #d7e0f2 0%, #5c6a88 70%); font-size: 30px; }
.fx-num.buff span { background: radial-gradient(circle, #ffd166 0%, #c26a00 70%); font-size: 28px; }
@keyframes rise { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 70% { transform: translate(-50%, -90%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -120%) scale(.9); opacity: 0; } }
.fx-particle { width: 9px; height: 9px; border-radius: 50%; animation: part .8s ease-out forwards; box-shadow: 0 0 10px currentColor; }
@keyframes part { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; } }
.fx-ring { width: var(--s); height: var(--s); border-radius: 50%; border: 6px solid var(--c); animation: ring .6s ease-out forwards; }
@keyframes ring { from { transform: translate(-50%, -50%) scale(.2); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } }
.fx-bolt { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--c) 45%, transparent 70%); box-shadow: 0 0 30px 10px var(--c); }
.fx-banner { left: 800px; top: 450px; animation: banner 1.5s ease-out forwards; z-index: 700; }
.fx-banner span { display: block; font: 700 72px/1 var(--head); letter-spacing: 3px; color: #fff; padding: 22px 70px; white-space: nowrap;
  background: linear-gradient(90deg, transparent, rgba(10, 18, 40, .92) 15%, rgba(10, 18, 40, .92) 85%, transparent); text-shadow: 0 0 30px rgba(90, 176, 255, .9); }
.fx-banner.mine span { text-shadow: 0 0 30px rgba(255, 209, 102, .95); color: #ffe8a6; }
.fx-banner.secret span { font-size: 90px; color: #e2b6ff; text-shadow: 0 0 40px #a855f7; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.95); } }
.fx-ghost { z-index: 650; }
.fx-ghost.opp-play { filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .8)); }
.fx-ghost.secret-reveal { animation: reveal 1.1s ease-out forwards; }
@keyframes reveal { 0% { transform: translate(-50%, -50%) scale(.2) rotateY(90deg); } 25% { transform: translate(-50%, -50%) scale(1) rotateY(0); } 85% { opacity: 1; } 100% { opacity: 0; } }
.fx-confetti { width: 10px; height: 16px; animation: confetti linear forwards; }
@keyframes confetti { to { transform: translate(var(--dx), 950px) rotate(var(--rot)); } }

/* ---------------------------------------------------------------- big card & tips */
#bigcard { position: absolute; z-index: 800; pointer-events: none; display: none; transform: translate(0, -50%); }
#bigcard.tips-left { transform: translate(-100%, -50%); }
#bigcard.show { display: flex; gap: 12px; align-items: center; animation: bigin .14s ease-out; }
@keyframes bigin { from { opacity: 0; } }
#bigcard.tips-left { flex-direction: row-reverse; }
#bigcard .card { transform: scale(1.25); margin: 40px 30px; box-shadow: 0 30px 60px rgba(0, 0, 0, .8); }
.tips { display: flex; flex-direction: column; gap: 8px; max-width: 250px; }
.tip { background: var(--panel); border: 1px solid rgba(140, 180, 255, .3); border-radius: 12px; padding: 9px 12px; box-shadow: 0 10px 24px rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.tip b { display: block; font: 700 14px/1.2 var(--head); color: var(--gold); margin-bottom: 3px; }
.tip span { font: 500 12.5px/1.35 var(--body); color: #d8e1f2; }
.tips-alone { transform: none !important; }
#bigcard.hand-preview { width: 1600px; height: 900px; display: block; transform: none; }
.hand-preview-face { position: absolute; left: 0; top: 0; width: 200px; pointer-events: auto; cursor: grab; touch-action: none; }
#bigcard.hand-preview .card { margin: 0; transform: none; }
.hand-preview-tips { position: absolute; width: 250px; max-height: 868px; overflow: hidden; }
.evolve-preview { display: flex; align-items: center; gap: 6px; font-size: 26px; color: var(--gold); }
.evolve-preview .card { transform: scale(.78) !important; margin: -30px -20px !important; }

/* ---------------------------------------------------------------- HUD */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 400; }
#hud > * { pointer-events: auto; }
.mana { position: absolute; right: 30px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 30px; background: rgba(6, 10, 22, .78);
  box-shadow: inset 0 0 0 1px rgba(90, 176, 255, .35); }
.mana-me { bottom: 22px; }
.mana-opp { top: 22px; transform: scale(.85); transform-origin: right top; }
.mana b { font: 800 22px/1 var(--head); color: #cfe6ff; min-width: 50px; text-align: right; }
.gems { display: flex; gap: 5px; }
.gem { width: 18px; height: 18px; transform: rotate(45deg); border-radius: 4px; }
.gem.full { background: radial-gradient(circle at 30% 30%, #c9e6ff, #2c7be5 60%, #0b3d91); box-shadow: 0 0 10px rgba(90, 176, 255, .9); }
.gem.full.temp { background: radial-gradient(circle at 30% 30%, #fff3c7, #ffb800 60%, #8c5a00); box-shadow: 0 0 10px rgba(255, 200, 80, .9); }
.gem.empty { background: rgba(60, 90, 140, .35); box-shadow: inset 0 0 0 1px rgba(120, 170, 255, .4); }
.gem.locked { background: repeating-linear-gradient(45deg, #5a1f24 0 4px, #2a0c10 4px 8px); box-shadow: inset 0 0 0 1px #ff6b6b; }
.gem.none { background: rgba(255, 255, 255, .05); }
.owed { font: 700 14px var(--head); color: #ff9b9b; }
.end-turn { position: absolute; left: 1372px; top: 408px; width: 180px; height: 64px; border-radius: 34px; border: none; font: 700 20px/1 var(--head); letter-spacing: .5px;
  color: #3a2a00; background: linear-gradient(180deg, #ffe08a, #f2a600); box-shadow: 0 6px 0 #8c5a00, 0 12px 26px rgba(0, 0, 0, .6); transition: transform .1s, filter .2s; }
.end-turn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-2px); }
.end-turn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #8c5a00; }
.end-turn.done { color: #032b14; background: linear-gradient(180deg, #8dffb9, #22c55e); box-shadow: 0 6px 0 #0d6b33, 0 0 30px rgba(61, 220, 132, .7); animation: glowg 1.6s ease-in-out infinite; }
@keyframes glowg { 50% { box-shadow: 0 6px 0 #0d6b33, 0 0 46px rgba(61, 220, 132, 1); } }
.end-turn:disabled { color: #8d99b3; background: linear-gradient(180deg, #2c3750, #1c2438); box-shadow: 0 6px 0 #0d1220, 0 12px 26px rgba(0, 0, 0, .6); cursor: default; }
.deck { position: absolute; width: 74px; height: 100px; display: grid; place-items: center; }
.deck-me { left: 1460px; top: 536px; }
.deck-opp { left: 1460px; top: 246px; }
.deck-stack { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(145deg, #1b2850, #0c1328); box-shadow: 3px 3px 0 #0a1020, 6px 6px 0 #070b16, 0 10px 20px rgba(0, 0, 0, .6), inset 0 0 0 2px #3a4f8a; }
.deck span { position: relative; font: 800 26px/1 var(--head); color: #ffd166; text-shadow: 0 2px 6px #000; }
.res { position: absolute; display: flex; flex-direction: column; gap: 6px; }
.res-me { right: 30px; bottom: 76px; align-items: flex-end; }
.res-opp { right: 30px; top: 70px; align-items: flex-end; }
.meter { background: rgba(6, 10, 22, .82); border-radius: 14px; padding: 6px 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); min-width: 160px; }
.meter span { font: 700 13px/1 var(--head); color: #fff; }
.meter .bar { margin-top: 5px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.meter .bar div { height: 100%; background: linear-gradient(90deg, #ffb340, #ff4d5e); box-shadow: 0 0 10px #ff8a3d; transition: width .4s; }
.meter.hype { box-shadow: inset 0 0 0 1px rgba(16, 163, 127, .6); }
.thinking { position: absolute; left: 1010px; top: 196px; display: none; align-items: center; gap: 8px; background: rgba(6, 10, 22, .85); padding: 7px 14px; border-radius: 16px; font: 600 13px var(--body); color: var(--muted); }
.thinking.show { display: flex; }
.dots { display: flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .4; } }
.hud-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: none; font-size: 24px; background: rgba(10, 16, 34, .9); color: #fff; box-shadow: inset 0 0 0 1px rgba(140, 180, 255, .35), 0 6px 14px rgba(0, 0, 0, .5); }
.hud-btn:hover { filter: brightness(1.3); }
.menu-btn { right: 24px; top: 82px; }
.hint-btn { left: 1437px; top: 482px; }
.speech { position: absolute; left: 885px; max-width: 360px; padding: 12px 16px; border-radius: 16px; background: #fff; color: #10172a; font: 600 15px/1.3 var(--body);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6); opacity: 0; transform: scale(.6); transform-origin: left center; transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.3); pointer-events: none; }
.speech.show { opacity: 1; transform: scale(1); }
.speech-me { top: 630px; }
.speech-opp { top: 140px; }
.speech::before { content: ''; position: absolute; left: -10px; top: 50%; border: 10px solid transparent; border-right-color: #fff; border-left: 0; transform: translateY(-50%); }
.toast { position: absolute; left: 800px; top: 450px; transform: translate(-50%, -50%) scale(.8); opacity: 0; padding: 12px 22px; border-radius: 14px; background: rgba(8, 12, 24, .95);
  font: 700 18px/1.2 var(--head); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .15); transition: all .2s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast.error { color: #ffb4b4; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 90, 90, .6); }
.toast.hint { color: #ffe39e; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 209, 102, .6); }
.spectator-tag { position: absolute; left: 24px; top: 24px; font: 700 14px var(--head); color: var(--gold); }
.emote-wheel { position: absolute; display: none; transform: translate(-50%, -100%); flex-wrap: wrap; width: 340px; gap: 8px; justify-content: center; z-index: 50; }
.emote-wheel.open { display: flex; }
.emote-wheel button { border: none; padding: 9px 14px; border-radius: 20px; font: 700 14px var(--head); background: rgba(10, 16, 34, .95); color: #fff; box-shadow: inset 0 0 0 1px rgba(140, 180, 255, .4), 0 6px 14px rgba(0, 0, 0, .5); }
.emote-wheel button:hover { background: #22305a; }

/* history */
#history { position: absolute; left: 18px; top: 170px; display: flex; flex-direction: column; gap: 8px; z-index: 300; }
#history .tile { position: relative; width: 70px; height: 54px; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 2px var(--cc), 0 6px 12px rgba(0, 0, 0, .5); cursor: help; animation: slidein .3s ease-out; }
#history .tile.theirs { box-shadow: 0 0 0 2px var(--cc), 0 0 0 4px rgba(255, 77, 94, .55), 0 6px 12px rgba(0, 0, 0, .5); }
#history .tile.mine { box-shadow: 0 0 0 2px var(--cc), 0 0 0 4px rgba(61, 220, 132, .5), 0 6px 12px rgba(0, 0, 0, .5); }
#history .tile-art svg { width: 100%; height: 100%; display: block; transform: scale(1.3); font-family: var(--emoji); }
#history .tile-icon { position: absolute; right: 2px; bottom: 0; font-size: 18px; }
@keyframes slidein { from { transform: translateX(-30px); opacity: 0; } }
.history-preview { position: absolute; left: 110px; top: 300px; display: none; align-items: center; gap: 10px; z-index: 900; pointer-events: none; }
.history-preview.show { display: flex; }
.hp-arrow { font-size: 40px; }

/* ---------------------------------------------------------------- overlays */
#overlay { position: absolute; inset: 0; z-index: 900; display: none; align-items: center; justify-content: center; background: rgba(4, 7, 15, .72); backdrop-filter: blur(4px); }
#overlay.show { display: flex; animation: ovin .22s ease-out; }
#overlay.closing { pointer-events: none; animation: ovout .18s ease-in forwards; }
@keyframes ovin { from { opacity: 0; } }
@keyframes ovout { to { opacity: 0; } }
#overlay.peeking { background: transparent; backdrop-filter: none; }
#overlay.peeking .picks, #overlay.peeking h2 { visibility: hidden; }
#overlay h2 { font: 700 40px/1.1 var(--head); text-align: center; margin: 0 0 8px; text-shadow: 0 0 30px rgba(90, 176, 255, .6); }
#overlay .sub { text-align: center; color: var(--muted); margin: 0 0 18px; }
.picks { display: flex; gap: 34px; justify-content: center; margin: 24px 0 28px; }
.pick { position: relative; cursor: pointer; transition: transform .2s; animation: dealin .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.pick:nth-child(2) { animation-delay: .08s; }
.pick:nth-child(3) { animation-delay: .16s; }
.pick:nth-child(4) { animation-delay: .24s; }
@keyframes dealin { from { transform: translateY(120px) scale(.6) rotate(-6deg); opacity: 0; } }
.pick:hover { transform: translateY(-10px) scale(1.04); }
.pick .card.big { transform: scale(1.2); margin: 30px 20px; }
.discover .pick .card { transform: scale(1.18); margin: 28px 20px; }
.discover .pick:hover .card { box-shadow: 0 0 0 4px var(--gold), 0 0 40px rgba(255, 209, 102, .8); }
.abtest .pick:hover .card { box-shadow: 0 0 0 4px var(--gold), 0 0 40px rgba(255, 209, 102, .8); }
.pick .x { position: absolute; inset: 0; display: none; place-items: center; font: 800 120px/1 var(--head); color: #ff4d5e; text-shadow: 0 0 20px #000; }
.pick.replace .x { display: grid; }
.pick.replace .card { filter: grayscale(.8) brightness(.6); }
.mull .picks .card { transform: scale(1.05); margin: 10px; }
.versus { display: flex; align-items: center; justify-content: center; gap: 40px; margin-bottom: 18px; }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vs-side .h-art { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px rgba(255, 255, 255, .3), 0 10px 30px rgba(0, 0, 0, .6); }
.vs-side .h-art svg { transform: scale(1.6); }
.vs-side b { font: 700 20px var(--head); }
.vs-side span { color: var(--muted); font-size: 13px; }
.vs-mid { font: 800 44px var(--head); color: var(--gold); text-shadow: 0 0 20px rgba(255, 209, 102, .6); }
button.primary { border: none; padding: 14px 34px; border-radius: 30px; font: 700 20px/1 var(--head); color: #2b1d00; background: linear-gradient(180deg, #ffe08a, #f2a600); box-shadow: 0 5px 0 #8c5a00, 0 10px 24px rgba(0, 0, 0, .55); }
button.primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
button.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #8c5a00; }
button.primary.big { font-size: 26px; padding: 18px 48px; }
button.ghost { border: none; padding: 12px 26px; border-radius: 26px; font: 700 17px/1 var(--head); color: #dfe8ff; background: rgba(20, 30, 60, .8); box-shadow: inset 0 0 0 1px rgba(140, 180, 255, .4); }
button.ghost:hover { background: rgba(40, 60, 110, .9); }
.mull, .choice, .pause, .gameover { display: flex; flex-direction: column; align-items: center; }
.choice .cancel, .choice .peek { margin-top: 6px; }
.gameover h1 { font: 700 84px/1 var(--head); margin: 16px 0 6px; letter-spacing: 2px; }
.gameover.win h1 { color: #ffe08a; text-shadow: 0 0 40px rgba(255, 209, 102, .9); }
.gameover.lose h1 { color: #ffb4b4; text-shadow: 0 0 40px rgba(255, 77, 94, .8); }
.gameover p { color: #c9d4ea; font-size: 18px; margin: 0 0 26px; }
.go-portrait .h-art { width: 210px; height: 210px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25), 0 0 80px rgba(255, 209, 102, .4); animation: dealin .6s both; }
.go-portrait .h-art svg { transform: scale(1.6); }
.gameover.lose .go-portrait .h-art { filter: grayscale(.6); }
.buttons { display: flex; gap: 14px; }
.pause { background: var(--panel); padding: 30px 46px; border-radius: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(140, 180, 255, .3); }
.settings { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 24px; min-width: 340px; }
.settings label { display: flex; justify-content: space-between; align-items: center; font: 600 16px var(--body); }
.settings button { border: none; padding: 8px 16px; border-radius: 16px; font: 700 14px var(--head); color: #fff; background: #22305a; min-width: 110px; }

/* ---------------------------------------------------------------- menus */
#menu { position: absolute; inset: 0; z-index: 1000; display: none; }
#menu.show { display: block; }
.menu-screen { position: absolute; inset: 0; background: radial-gradient(1000px 600px at 50% 40%, #1a2a55 0%, #0a1124 60%, #05080f 100%); overflow: hidden; }
.menu-screen::before { content: ''; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 50px 50px; }
.floaters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.floater { position: absolute; font-size: 64px; font-family: var(--emoji); left: var(--x); margin-left: -46px; top: 110%; opacity: .55; filter: drop-shadow(0 0 20px var(--cc));
  animation: ceo-rise var(--rise-time) linear var(--phase) infinite, ceo-sway var(--sway-time) ease-in-out var(--phase) infinite alternate; }
.floater.photo { width: 92px; height: 92px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 3px var(--cc), 0 0 26px var(--cc); filter: saturate(.8); }
#menu.motion-paused .floater { animation-play-state: paused; }
@keyframes ceo-rise {
  0% { translate: 0 0; opacity: 0; }
  8%, 88% { opacity: .55; }
  100% { translate: 0 calc(-1.1 * var(--stage-source-height, 900px) - 120px); opacity: 0; }
}
@keyframes ceo-sway {
  from { transform: translateX(calc(-1 * var(--sway))) rotate(calc(-1 * var(--tilt))); }
  to { transform: translateX(var(--sway)) rotate(var(--tilt)); }
}
@media (prefers-reduced-motion: reduce) { .floaters { display: none; } }
.logo { position: absolute; left: 50%; top: 170px; transform: translateX(-50%); text-align: center; }
.logo-mark { font: 800 70px/1 var(--head); color: var(--gold); text-shadow: 0 0 40px rgba(255, 209, 102, .9); animation: spin 12s linear infinite; display: inline-block; }
.logo h1 { margin: 10px 0 0; font: 700 118px/1 var(--head); letter-spacing: 10px;
  background: linear-gradient(180deg, #fff, #9fc2ff 60%, #5a7bd8); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgba(90, 140, 255, .55)); }
.logo h2 { margin: 6px 0 0; font: 600 30px/1 var(--head); color: var(--gold); letter-spacing: 8px; text-transform: uppercase; }
.tagline { color: #b9c6e2; font-size: 19px; margin: 22px auto 0; max-width: 760px; }
.title-buttons { position: absolute; left: 50%; top: 560px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.title-buttons .ghost { min-width: 260px; }
.corner { position: absolute; right: 24px; top: 24px; display: flex; gap: 10px; }
.chip { border: none; padding: 10px 16px; border-radius: 20px; font: 700 16px var(--head); color: #fff; background: rgba(20, 30, 60, .85); box-shadow: inset 0 0 0 1px rgba(140, 180, 255, .4); }
.credits { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #5f6c88; font-size: 13px; }
.back { position: absolute; left: 26px; top: 24px; z-index: 5; }
.screen-title { position: relative; text-align: center; font: 700 48px/1 var(--head); margin: 34px 0 20px; }
.screen-title small { font-size: 18px; color: var(--muted); }
.select-wrap { position: relative; display: grid; grid-template-columns: 576px minmax(0, 1fr); align-items: start; gap: 26px; width: min(1280px, calc(100% - 80px)); height: 780px; margin-inline: auto; }
.ceo-grid { display: grid; grid-template-columns: repeat(3, 180px); gap: 18px; align-content: start; }
.ceo { position: relative; border: none; border-radius: 22px; padding: 14px 10px 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 35%, #0d1630), #0b1226);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--cc) 50%, transparent), 0 10px 26px rgba(0, 0, 0, .5); color: #fff; transition: transform .15s; }
.ceo:hover { transform: translateY(-4px); }
.ceo.selected { box-shadow: inset 0 0 0 3px var(--gold), 0 0 34px color-mix(in srgb, var(--cc) 80%, transparent); transform: translateY(-4px) scale(1.03); }
.ceo-art .h-art { width: 136px; height: 136px; margin: 0 auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc) 70%, #fff 20%); }
.ceo-art .h-art svg { transform: scale(1.6); }
.ceo-name { font: 700 18px var(--head); margin-top: 10px; }
.ceo-co { font-size: 13px; color: #b9c6e2; }
.side { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ceo-detail { background: var(--panel); border-radius: 22px; padding: 20px 24px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 60%, transparent), 0 20px 50px rgba(0, 0, 0, .5); }
.cd-head { display: flex; gap: 18px; align-items: center; }
.menu-screen.select .cd-head .h-art { margin: 0; }
.menu-screen.select .cd-head > div { min-width: 0; }
.cd-head .h-art { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc) 70%, #fff 20%); }
.cd-head .h-art svg { transform: scale(1.6); }
.cd-head h3 { margin: 0; font: 700 30px var(--head); }
.cd-co { color: var(--cc); font-weight: 700; filter: brightness(1.4); }
.cd-flavor { color: #9fb0d0; font-style: italic; margin-top: 4px; }
.cd-style { margin: 14px 0; font-size: 16px; line-height: 1.4; color: #dfe7f7; }
.cd-power { display: flex; gap: 14px; align-items: center; background: rgba(255, 255, 255, .05); border-radius: 16px; padding: 10px 14px; font-size: 15px; }
.cd-power b { color: var(--gold); }
.hp-chip { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 3px var(--cc); font-family: var(--emoji); }
.hp-chip span { position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border-radius: 50%; background: #2c7be5; font: 800 15px/26px var(--head); text-align: center; font-family: var(--head); }
.cd-sig { display: flex; gap: 0; height: 190px; margin-top: 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; scrollbar-width: thin; scrollbar-color: #a8834a #21160d; }
.cd-sig .mini { flex: none; transform: scale(.66); transform-origin: top left; width: 136px; }
.setup { background: var(--panel); border-radius: 22px; padding: 18px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: inset 0 0 0 1px rgba(140, 180, 255, .25); }
.setup label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 16px var(--head); }
.setup select { font: 600 15px var(--body); padding: 8px 12px; border-radius: 12px; background: #13203f; color: #fff; border: 1px solid rgba(140, 180, 255, .4); min-width: 300px; }
.segs { display: flex; gap: 6px; }
.seg { border: none; padding: 9px 14px; border-radius: 14px; font: 700 14px var(--head); color: #c9d4ea; background: #13203f; }
.seg.on { color: #2b1d00; background: linear-gradient(180deg, #ffe08a, #f2a600); }
.setup .start { align-self: flex-end; }
.tabs { position: relative; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0 40px; }
.tab { border: none; padding: 8px 14px; border-radius: 16px; font: 700 14px var(--head); color: #fff; background: rgba(20, 30, 60, .85); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--cc) 50%, transparent); }
.tab.on { background: color-mix(in srgb, var(--cc) 45%, #0b1226); box-shadow: inset 0 0 0 2px var(--cc); }
.tok { font: 600 14px var(--body); color: var(--muted); display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.gallery { position: absolute; left: 30px; right: 30px; top: 190px; bottom: 20px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, 150px); gap: 18px 14px; justify-content: center; padding: 20px 10px 60px; }
.g-card { width: 150px; height: 210px; cursor: zoom-in; }
.g-card .card { transform: scale(.75); transform-origin: top left; transition: transform .15s; }
.g-card:hover .card { transform: scale(.79); }
.zoom { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(4, 7, 15, .8); backdrop-filter: blur(5px); z-index: 10; cursor: zoom-out; }
.zoom.show { display: flex; }
.zoom-inner { display: flex; align-items: center; gap: 40px; }
.zoom-inner > .card { transform: scale(1.7); margin: 0 90px; }
.zoom-side { max-width: 340px; display: flex; flex-direction: column; gap: 12px; }
.flavor { font-style: italic; color: #c9d4ea; font-size: 17px; line-height: 1.4; }
.howto { position: relative; display: flex; gap: 30px; padding: 0 60px; height: 760px; }
.rules { flex: 1.1; font-size: 17px; line-height: 1.5; color: #dfe7f7; background: var(--panel); border-radius: 20px; padding: 10px 26px; overflow-y: auto; }
.rules b { color: var(--gold); }
.glossary { flex: 1; overflow-y: auto; max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; padding-bottom: 20px; }

/* Boot lives outside the scaled board so its type stays readable on a phone. */
@font-face { font-family: 'Tokenstone Belwe'; src: url('./hs/Belwe.ttf') format('truetype'); font-display: swap; }
#loading {
  position: fixed; inset: 0; z-index: 2000; height: 100%; height: 100dvh;
  display: grid; place-items: center; overflow: auto; overscroll-behavior: contain;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 40%, rgba(20, 13, 8, .12), rgba(12, 8, 5, .78)), #21150d url('./hs/table.webp') center / cover;
  color: #f1dfb8; text-align: center; color-scheme: dark;
  opacity: 1; transition: opacity .24s ease-out;
}
.loading-content { width: min(100%, 600px); margin: auto; padding: 12px 0; }
.loading-deck { position: relative; width: 260px; height: 236px; margin: 0 auto; }
.loading-card {
  position: absolute; left: 50%; top: 0; width: 144px; height: auto;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55));
  transform: translateX(-50%); transform-origin: 50% 85%;
  animation: loading-deal .8s cubic-bezier(.16, 1, .3, 1) both;
}
.loading-card.left { --deal-x: -54px; --deal-angle: -16deg; --deal-y: 12px; transform: translateX(calc(-50% - 54px)) translateY(12px) rotate(-16deg); }
.loading-card.right { --deal-x: 54px; --deal-angle: 16deg; --deal-y: 12px; transform: translateX(calc(-50% + 54px)) translateY(12px) rotate(16deg); }
.loading-card.center { --deal-x: 0px; --deal-angle: 0deg; --deal-y: 0px; }
.loading-wordmark {
  margin: 20px 0 6px; font: 400 clamp(42px, 7vw, 80px)/1.12 'Tokenstone Belwe', Georgia, serif;
  letter-spacing: -.025em; color: #f8d486; -webkit-text-stroke: 1px #513112;
  text-shadow: 0 2px 0 #9b6227, 0 6px 12px rgba(0, 0, 0, .7);
}
.loading-subtitle { margin: 0; font: 400 16px/1.4 'Tokenstone Belwe', Georgia, serif; letter-spacing: .24em; text-transform: uppercase; color: #e8c999; }
.loading-track { position: relative; width: 144px; height: 3px; margin: 30px auto 18px; overflow: hidden; border-radius: 2px; background: #5e462a; }
.loading-track::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 45%; background: #f4cd7b; transform: translateX(-110%); animation: loading-pass 1.8s ease-in-out infinite; }
#loading-status { min-height: 24px; margin: 0; font: 400 16px/1.5 Georgia, serif; color: #f1dfb8; }
#loading-recovery { margin-top: 12px; }
#loading-recovery p { max-width: 32ch; margin: 0 auto 22px; font: 400 16px/1.5 Georgia, serif; color: #e8c999; }
#loading-reload {
  min-width: 150px; min-height: 48px; padding: 11px 24px; border: 1px solid #bc9255; border-radius: 7px;
  background: linear-gradient(#74502a, #3c2815); color: #fff1cd; font: 400 18px/1.3 'Tokenstone Belwe', Georgia, serif;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35); touch-action: manipulation;
}
#loading-reload:hover { background: linear-gradient(#896036, #4f351b); }
#loading-reload:active { transform: translateY(1px); }
#loading-reload:focus-visible { outline: 3px solid #ffe3a1; outline-offset: 5px; }
#loading.is-ready { opacity: 0; pointer-events: none; }
#loading.is-error .loading-track { display: none; }
#loading.is-error #loading-status { margin-top: 26px; }
#loading.is-error .loading-card { animation: none; }
@keyframes loading-deal {
  from { transform: translateX(-50%) translateY(18px) rotate(0deg); }
  to { transform: translateX(calc(-50% + var(--deal-x))) translateY(var(--deal-y)) rotate(var(--deal-angle)); }
}
@keyframes loading-pass { 0% { transform: translateX(-110%); } 70%, 100% { transform: translateX(330%); } }
@media (max-height: 540px) and (min-width: 600px) {
  .loading-content { width: min(100%, 640px); display: grid; grid-template-columns: 220px 1fr; column-gap: 38px; align-items: center; padding: 0; }
  .loading-deck { grid-column: 1; grid-row: 1 / 6; width: 220px; height: 216px; }
  .loading-card { width: 128px; }
  .loading-wordmark { margin-top: 0; font-size: clamp(42px, 7vw, 64px); align-self: end; }
  .loading-subtitle { align-self: start; font-size: 14px; }
  .loading-track { margin-top: 22px; margin-bottom: 14px; }
  #loading-recovery { margin-top: 8px; }
  #loading-recovery p { margin-bottom: 14px; }
  #loading.is-error #loading-status { margin-top: 16px; }
}
@media (max-width: 599px) {
  .loading-deck { width: 230px; height: 212px; }
  .loading-card { width: 128px; }
  .loading-wordmark { margin-top: 14px; }
  .loading-subtitle { font-size: 14px; }
  .loading-track { margin-top: 26px; }
}
@media (max-height: 540px) and (min-width: 480px) and (max-width: 599px) {
  .loading-content { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 20px; align-items: center; padding: 0; }
  .loading-deck { grid-column: 1; grid-row: 1 / 6; width: 200px; height: 180px; }
  .loading-card { width: 108px; }
  .loading-card.left { --deal-x: -36px; transform: translateX(calc(-50% - 36px)) translateY(12px) rotate(-16deg); }
  .loading-card.right { --deal-x: 36px; transform: translateX(calc(-50% + 36px)) translateY(12px) rotate(16deg); }
  .loading-wordmark { margin-top: 0; font-size: clamp(32px, 7.4vw, 44px); align-self: end; }
  .loading-subtitle { align-self: start; font-size: 12px; }
  .loading-track { margin-top: 22px; margin-bottom: 14px; }
  #loading-recovery { margin-top: 8px; }
  #loading-recovery p { margin-bottom: 12px; font-size: 15px; }
  #loading.is-error #loading-status { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #loading { transition: none; }
  .loading-card, .loading-track::after { animation: none; }
  .loading-track::after { transform: translateX(65%); }
}

/* Photo credits */
.art-credit { color: #8d9bb8; font-size: 13px; line-height: 1.4; }
.art-credit a { color: #b9c7e6; }
.credits-screen .cr-intro { color: #9aa8c4; margin: 0 60px 14px; font-size: 15px; }
.cr-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 60px 30px; height: 720px; overflow-y: auto; align-content: start; }
.cr-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .04); border-left: 4px solid var(--cc); color: inherit; text-decoration: none; }
.cr-row:hover { background: rgba(255, 255, 255, .09); }
.cr-row img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; flex: none; }
.cr-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-row b { font-size: 15px; }
.cr-row span, .cr-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-row span { color: #c9d4ea; font-size: 13px; }
.cr-row small { color: #7f8cab; font-size: 12px; }

/* ===== Hearthstone skin (layers from the installed client; see re/hs-assets/build_skin.py) ===== */
.hs { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.hs-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; user-select: none; }
.hs-art { position: absolute; background-size: cover; background-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; overflow: hidden; }
.hs-art svg { width: 100%; height: 100%; display: block; font-family: var(--emoji); }
.hs-name { position: absolute; left: 0; top: 0; overflow: visible; }
.hs-name text { font-family: 'HS Belwe', Georgia, serif; fill: #fff; stroke: #000; stroke-width: 8px; paint-order: stroke; stroke-linejoin: round; }
.hs-text { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; padding: 7% 10%;
  font-family: 'HS FranklinGothic', 'Franklin Gothic Medium', 'Arial Narrow', sans-serif; color: #1a1209; line-height: 1.13; }
.hs-text > div { max-height: 100%; }
/* the race plate covers the bottom of the minion text box: centre the text on what stays visible */
.k-minion .hs-text { padding: 4% 9% 12%; }
.hs-text.light { color: #fff; }
.hs-text b { font-weight: 700; }
.hs-race { position: absolute; display: grid; place-items: center; font: 34px 'HS Belwe', Georgia, serif; color: #fff;
  -webkit-text-stroke: 6px #000; paint-order: stroke fill; letter-spacing: .5px; }
.hs-num { position: absolute; display: grid; place-items: center; font-family: 'HS BelweNumbers', 'HS Belwe', Georgia, serif; color: #fff; line-height: 1; }
.hs-num span { -webkit-text-stroke: .1em #000; paint-order: stroke fill; transform: translateY(.04em); }
.hs-num.buffed, .hs-num.cheaper { color: #2dff3a; }
.hs-num.damaged, .hs-num.nerfed, .hs-num.pricier { color: #ff3b3b; }

.hs-skin .card.hs-card { background: none; box-shadow: none; border-radius: 0; }
.hs-skin .a-hand .card.hs-card { box-shadow: none; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .6)); transition: filter .25s; }
.hs-skin .a-hand.hovered .card.hs-card { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .7)); }
.hs-skin .a-hand.hovered.playable .card.hs-card { filter: drop-shadow(0 0 5px #4dff6a) drop-shadow(0 0 18px rgba(61, 220, 132, .9)); }
.hs-skin .a-hand.playable .card.hs-card { box-shadow: none; filter: drop-shadow(0 0 4px #4dff6a) drop-shadow(0 0 14px rgba(61, 220, 132, .85)); }
.hs-skin .a-hand.combo-ready .card.hs-card { box-shadow: none; filter: drop-shadow(0 0 4px #ffd166) drop-shadow(0 0 16px rgba(255, 209, 102, .9)); }
.hs-skin .card-back.hs-back { background: none; padding: 0; box-shadow: none; position: relative; width: 200px; height: 280px; }
.hs-skin .hs-wrap { background: none !important; overflow: visible !important; border-radius: 0 !important; box-shadow: none !important; }
.hs-skin .m-portrait.hs-wrap { inset: 0; }
.hs-skin .h-frame.hs-wrap { left: -13px; top: -16px; width: 176px; height: 200px; }
.hs-skin .hp-art.hs-wrap, .hs-skin .w-art.hs-wrap { inset: 0; }
.hs-skin .a-minion.can-attack .m-portrait .hs { filter: drop-shadow(0 0 5px #4dff6a) drop-shadow(0 0 14px rgba(61, 220, 132, .9)); }
.hs-skin .a-hero.can-attack .h-frame .hs { filter: drop-shadow(0 0 6px #4dff6a) drop-shadow(0 0 18px rgba(61, 220, 132, .9)); }
.hs-skin .a-heroPower.usable .hp-art .hs { filter: drop-shadow(0 0 5px #4dff6a) drop-shadow(0 0 14px rgba(61, 220, 132, .9)); }
.hs-skin .actor.targetable .m-portrait, .hs-skin .actor.targetable .h-frame { animation: none; }
.hs-skin .actor.targetable .hs { filter: drop-shadow(0 0 5px #ff5a5a) drop-shadow(0 0 12px rgba(255, 70, 70, .8)); }
.hs-skin .actor.target-hover .hs { filter: drop-shadow(0 0 7px #ff3030) drop-shadow(0 0 22px rgba(255, 40, 40, 1)); }
.hs-skin .hpower.used .hp-art { filter: grayscale(1) brightness(.5); }
.hs-skin .h-name { display: none; }
.hs-armor { position: absolute; right: -6px; bottom: 44px; width: 50px; height: 56px; display: grid; place-items: center; z-index: 4;
  background: url(hs/armor.webp) center / contain no-repeat; font: 28px 'HS BelweNumbers', 'HS Belwe', serif; color: #fff; }
.hs-armor span { -webkit-text-stroke: 4px #000; paint-order: stroke fill; }
.hs-board-root { background: #1b120b url(hs/table.webp) center / cover; }
.hs-board { position: absolute; pointer-events: none; user-select: none; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .55)); }
.hs-skin .table, .hs-skin .hero-pad { display: none; }
/* HUD in the skin */
.hs-skin .end-turn { left: 1352px; top: 383px; width: 150px; height: 84px; border-radius: 40%; box-shadow: none; background: url(hs/endturn_yellow.webp) center / 100% 100% no-repeat;
  font: 19px/1 'HS Belwe', Georgia, serif; text-transform: uppercase; color: #3a2400; text-shadow: 0 1px 0 rgba(255, 240, 200, .6); letter-spacing: .3px; padding-top: 2px; animation: none; }
.hs-skin .end-turn.done { background-image: url(hs/endturn_green.webp); color: #062b0c; text-shadow: 0 1px 0 rgba(220, 255, 220, .5); box-shadow: none;
  filter: drop-shadow(0 0 10px rgba(80, 255, 120, .8)); animation: hsglow 1.4s ease-in-out infinite; }
.hs-skin .end-turn:disabled { background-image: url(hs/endturn_gray.webp); color: #d9d2c3; text-shadow: 0 1px 2px #000; box-shadow: none; font-size: 16px; }
.hs-skin .end-turn:hover:not(:disabled) { transform: none; filter: brightness(1.12); }
.hs-skin .end-turn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
@keyframes hsglow { 50% { filter: drop-shadow(0 0 16px rgba(80, 255, 120, 1)); } }
.hs-skin .mana { background: none; box-shadow: none; padding: 0; gap: 4px; right: auto; }
.hs-skin .mana-me { left: 1088px; top: 846px; bottom: auto; }
.hs-skin .mana-opp { transform: none; }
.hs-skin .mana b { min-width: 0; text-align: center; font: 22px/1 'HS BelweNumbers', 'HS Belwe', serif; color: #fff; -webkit-text-stroke: 4px #000; paint-order: stroke fill; }
.hs-skin .mana-opp .mana-count b { font-size: 20px; }
.hs-skin .mana .gems { display: flex; gap: 1px; }
.hs-skin .mana .gem { width: 26px; height: 28px; background: url(hs/crystal.webp) center / contain no-repeat; border: 0; transform: none; box-shadow: none; clip-path: none; }
.hs-skin .mana .gem.empty { filter: grayscale(1) brightness(.4); }
.hs-skin .mana .gem.locked { filter: hue-rotate(150deg) saturate(2.2) brightness(.8); }
.hs-skin .mana .gem.none { display: none; }
.hs-skin .mana .gem.temp { filter: brightness(1.35) drop-shadow(0 0 6px #7fd4ff); }
.hs-skin .deck { width: 72px; height: 104px; }
.hs-skin .deck-me { left: 1474px; top: 518px; }
.hs-skin .deck-opp { left: 1474px; top: 240px; }
.hs-skin .deck-stack { border-radius: 6px; background: url(hs/cardback_frame_neutral.webp) center / 108% auto no-repeat; box-shadow: 2px 2px 0 #2b1b0c, 4px 4px 0 #1f1309, 6px 6px 0 #160d06, 0 10px 18px rgba(0, 0, 0, .6); }
.hs-skin .deck span { font: 26px/1 'HS BelweNumbers', 'HS Belwe', serif; color: #fff; -webkit-text-stroke: 5px #000; paint-order: stroke fill; text-shadow: none; }
.hs-skin .m-taunt { left: -32px; top: -43px; right: auto; bottom: auto; width: 180px; height: 225px; clip-path: none;
  background: url(hs/taunt_frame_neutral.webp) center / 100% 100% no-repeat; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .6)); }
.hs-skin .m-shield { inset: -12px -8px -6px; border-radius: 50%; background: radial-gradient(ellipse at 50% 45%, rgba(255, 245, 190, .08), rgba(255, 220, 110, .32) 66%, rgba(255, 236, 160, .75) 70%, transparent 74%); }
.hs-skin .m-ice { inset: 2px 6px 8px; }
/* Menus and overlays in the skin */
.hs-skin .h-art.hs-heroart { position: relative; border-radius: 0 !important; overflow: visible !important; box-shadow: none !important; margin: 0 auto; flex: none;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .6)); }
.hs-skin .h-art.hs-heroart .h-second { display: none; }
.hs-skin .menu-screen { background: #1b120b url(hs/table.webp) center / cover; }
.hs-skin .menu-screen::before { opacity: 1; background: radial-gradient(1100px 700px at 50% 45%, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55) 75%, rgba(0, 0, 0, .85)); }
.hs-skin #overlay { background: rgba(10, 6, 2, .62); }
.hs-skin .logo-mark { display: none; }
.hs-skin .logo h1 { font: 136px/1 'HS Belwe', Georgia, serif; letter-spacing: 3px; background: linear-gradient(180deg, #fffbe6 8%, #ffd66b 46%, #c27a14 74%, #ffe29a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 3px #2b1704; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .8)); }
.hs-skin .logo h2 { font: 34px/1 'HS Belwe', Georgia, serif; letter-spacing: 10px; color: #f4e3b4; -webkit-text-stroke: 1px #2b1704; text-shadow: 0 3px 8px #000; }
.hs-skin .tagline { color: #f1e6cc; text-shadow: 0 2px 6px #000; }
.hs-skin .screen-title, .hs-skin #overlay h2, .hs-skin .gameover h1 { font-family: 'HS Belwe', Georgia, serif; font-weight: 400; color: #ffe3a1; -webkit-text-stroke: 1.5px #2b1704; text-shadow: 0 4px 10px #000; }
.hs-skin button.primary { background: url(hs/endturn_yellow.webp) center / 100% 100% no-repeat; box-shadow: none; border-radius: 40%; color: #3a2400;
  font: 22px/1 'HS Belwe', Georgia, serif; padding: 20px 48px; text-shadow: 0 1px 0 rgba(255, 240, 200, .6); }
.hs-skin button.primary.big { font-size: 30px; padding: 28px 70px; }
.hs-skin button.primary:active { box-shadow: none; }
.hs-skin button.ghost, .hs-skin .chip, .hs-skin .tab, .hs-skin .seg { background: url(hs/endturn_gray.webp) center / 100% 100% no-repeat; box-shadow: none; border-radius: 40%;
  color: #f6ecd6; font-family: 'HS Belwe', Georgia, serif; font-weight: 400; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.hs-skin button.ghost { padding: 16px 34px; font-size: 18px; }
.hs-skin button.ghost:hover, .hs-skin .chip:hover, .hs-skin .tab:hover { filter: brightness(1.2); background-color: transparent; }
.hs-skin .tab.on, .hs-skin .seg.on { background-image: url(hs/endturn_green.webp); color: #062b0c; text-shadow: 0 1px 0 rgba(220, 255, 220, .5); }
.hs-skin .ceo-detail, .hs-skin .setup, .hs-skin .rules, .hs-skin .tip, .hs-skin .cr-row, .hs-skin .cd-power {
  background: linear-gradient(180deg, rgba(58, 36, 16, .92), rgba(30, 18, 8, .94)); border: 2px solid #a8834a; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .5), 0 14px 30px rgba(0, 0, 0, .6); }
.hs-skin .ceo { background: linear-gradient(180deg, rgba(58, 36, 16, .85), rgba(26, 16, 7, .9)); border: 2px solid #8b6a39; }
.hs-skin .ceo.selected, .hs-skin .ceo:hover { border-color: #ffd36b; box-shadow: 0 0 22px rgba(255, 200, 80, .55); }
.hs-skin .ceo-name, .hs-skin .cd-head h3, .hs-skin .vs-side b, .hs-skin .tip b, .hs-skin .cd-power b, .hs-skin .rules b { font-family: 'HS Belwe', Georgia, serif; font-weight: 400; color: #ffe3a1; }
.hs-skin .vs-mid { font: 54px 'HS Belwe', Georgia, serif; color: #ffd66b; -webkit-text-stroke: 2px #2b1704; }
.hs-skin .setup select { background: #2a1a0b; border-color: #a8834a; }

/* Menu controls are panels. The board's End Sprint alone uses its original
   420x233 artwork; putting that texture on wide labels deformed every frame. */
.hs-skin button.primary,
.hs-skin button.ghost,
.hs-skin .chip,
.hs-skin .tab,
.hs-skin .seg {
  background-image: none;
  border-radius: 9px;
  border: 1px solid #a8834a;
  min-height: 44px;
  padding: 10px 20px;
  color: #f5e6c5;
  font-family: 'HS Belwe', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 1px 2px #160c03;
  background-color: #342313;
  background-image: linear-gradient(180deg, #4e351d, #2b1c0f);
  box-shadow: inset 0 0 0 2px rgba(12,7,2,.35), 0 4px 9px rgba(0,0,0,.35);
}
.hs-skin button.primary {
  border-color: #f0cf82;
  background-image: linear-gradient(180deg, #e6bf68, #b98730);
  color: #291908;
  text-shadow: 0 1px 0 rgba(255,242,196,.65);
  font-size: 22px;
  padding: 12px 26px;
}
.hs-skin button.primary.big { font-size: 26px; padding: 14px 32px; }
.hs-skin button.ghost { font-size: 18px; padding: 10px 22px; }
.hs-skin button.ghost:hover,
.hs-skin .chip:hover,
.hs-skin .tab:hover { background-color: #4b321a; filter: brightness(1.12); }
.hs-skin .tab.on,
.hs-skin .seg.on { background-image: linear-gradient(180deg, #6a4d25, #443016); border-color: #f0cf82; color: #ffe3a1; text-shadow: 0 1px 2px #160c03; }
.hs-skin button:focus-visible { outline: 3px solid #ffe3a1; outline-offset: 4px; }
.hs-skin button:disabled { cursor: default; }
.hs-skin .end-turn,
.hs-skin .end-turn.done,
.hs-skin .end-turn:disabled { background-size: contain; background-repeat: no-repeat; border-radius: 0; }
.hs-skin .end-turn:focus-visible { outline-offset: -5px; border-radius: 18px; }
.setup-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; font: 700 16px/1.4 var(--body); }
.setup-row > span { flex: none; }
.rival-picker { position: relative; width: min(330px, 100%); min-width: 0; z-index: 6; }
.rival-trigger { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border: 1px solid #a8834a; border-radius: 8px; background: #21160d; color: #f6ecd6; font: 600 16px/1.4 var(--body); text-align: start; }
.rival-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rival-trigger svg,
.rival-option svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rival-trigger:hover { border-color: #f0cf82; background: #302011; }
.rival-trigger:focus-visible,
.rival-option:focus-visible { outline: 2px solid #ffe3a1; outline-offset: -3px; }
.rival-options { position: absolute; inset-inline: 0; top: calc(100% + 8px); max-height: min(320px, 50dvh); overflow-y: auto; padding: 6px; border: 1px solid #b38d51; border-radius: 10px; background: #21160d; box-shadow: 0 12px 28px rgba(0,0,0,.6); scrollbar-color: #a8834a #21160d; }
.rival-options[hidden] { display: none; }
.rival-picker.opens-up .rival-options { top: auto; bottom: calc(100% + 8px); }
.rival-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: #f6ecd6; text-align: start; font: 600 15px/1.4 var(--body); }
.rival-option:hover,
.rival-option:focus-visible { background: #483019; }
.rival-option[aria-selected="true"] { background: #59401e; }
.rival-option > span:nth-child(2) { flex: 1; min-width: 0; }
.rival-option small { display: block; font: 400 13px/1.4 var(--body); color: #ddc9a5; }
.rival-portrait { flex: none; width: 38px; min-height: 42px; display: grid; place-items: center; }
.rival-portrait .h-art { width: 34px; height: 40px; }
.rival-portrait .h-art svg { display: block; width: 100%; height: 100%; }
.rival-check { opacity: 0; color: #ffe3a1; }
.rival-option[aria-selected="true"] .rival-check { opacity: 1; }
.segs .seg { min-height: 44px; padding: 9px 13px; font-size: 15px; }
.hud-btn svg { width: 25px; height: 25px; display: block; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hs-skin .hud-btn { width: 54px; height: 54px; border: 1px solid #c09a58; background: #332213; color: #ffe3a1; box-shadow: inset 0 0 0 3px #1c1209, 0 5px 12px rgba(0,0,0,.45); }
.hs-skin .menu-btn { right: 24px; top: 24px; }
.hs-skin .hint-btn { left: 1400px; top: 490px; }
.hs-skin .res-me { right: 24px; bottom: 28px; }
.hs-skin .res-opp { right: 24px; top: 96px; }
.resource-plate { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; width: 142px; padding: 6px 10px; border-radius: 8px; border: 1px solid #9f7a40; background: #2b1c10; color: #f4d992; box-shadow: 0 4px 9px rgba(0,0,0,.35); }
.resource-plate svg { width: 20px; height: 24px; flex: none; fill: none; stroke: #e5b755; stroke-width: 1.6; stroke-linejoin: round; }
.resource-plate span { font: 18px/1.2 'HS Belwe', var(--head); }
.resource-plate strong { min-width: 24px; color: #fff1c9; font: 24px/1 'HS BelweNumbers', 'HS Belwe', var(--head); text-align: center; font-variant-numeric: tabular-nums; }
.resource-plate.resource-control { cursor: help; }
.resource-question { width: 15px; color: #d9bd83; font: 15px/1 var(--body) !important; }
.mana-count { display: grid; place-items: center; flex: none; width: var(--compute-width, 66px); height: var(--compute-height, 28px); margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: help; }
.resource-help-wrap { position: relative; }
.resource-help { position: absolute; z-index: 900; right: 0; bottom: calc(100% + 12px); width: 360px; padding: 16px 18px; border: 1px solid #a8834a; border-radius: 10px; background: #281a0e; color: #f6e5c5; box-shadow: 0 12px 28px rgba(0,0,0,.6); font: 16px/1.4 var(--body); text-align: left; display: none; pointer-events: none; }
.resource-help > b { display: block; margin-bottom: 8px; color: #ffe3a1; font: 23px/1.2 'HS Belwe', var(--head); }
.resource-help p { margin: 0 0 10px; }
.resource-help p:last-child { margin-bottom: 0; }
.resource-help strong { color: #ffe3a1; }
.resource-help-wrap:hover > .resource-help,
.resource-help-wrap:focus-within > .resource-help,
.mana:hover > .resource-help,
.mana:focus-within > .resource-help { display: block; }
.deck:hover > .resource-help,
.deck:focus-within > .resource-help { display: block; }
.deck-count { position: absolute; inset: 0; padding: 0; border: 0; border-radius: inherit; background: none; color: inherit; cursor: help; }
.deck .resource-help { right: calc(100% + 16px); bottom: auto; top: 50%; transform: translateY(-50%); }
.empty-deck .deck-stack { opacity: .38; filter: grayscale(1); }
.turn-rope { position: absolute; inset: 0; width: 1600px; height: 900px; pointer-events: none !important; }
.turn-rope[hidden] { display: none; }
.turn-rope-particles { z-index: 1; }
.fatigue-card { position: absolute; z-index: 700; pointer-events: none; perspective: 1000px; }
.fatigue-card img { display: block; width: 100%; height: 100%; }
.fatigue-face { position: absolute; inset: 0; transform-origin: 50% 50%; }
.fatigue-title, .fatigue-description { position: absolute; display: grid; place-content: center; text-align: center; color: #251d14; }
.fatigue-title { color: #fff5db; text-shadow: 0 1px 3px #000; }
.res-opp .resource-help,
.mana-opp .resource-help { bottom: auto; top: calc(100% + 12px); }
.mana .resource-help { right: auto; left: 0; }
.ceo-tooltip { width: 360px; padding: 18px; border: 1px solid #a8834a; border-radius: 12px; background: #281a0e; color: #f6e5c5; box-shadow: 0 14px 30px rgba(0,0,0,.6); font: 17px/1.4 var(--body); }
.ceo-tooltip-head { display: flex; align-items: center; gap: 16px; }
.ceo-tooltip-head .h-art { flex: none; margin: 0 !important; }
.ceo-tooltip h3 { margin: 0 0 4px; color: #ffe3a1; font: 27px/1.1 'HS Belwe', var(--head); }
.ceo-tooltip p { margin: 0; }
.ceo-company { color: #ffe3a1; }
.ceo-vitals { margin-top: 6px !important; font-size: 14px; color: #ddc9a5; }
.ceo-style { padding: 16px 0; }
.ceo-tooltip-power { padding-top: 14px; border-top: 1px solid #75572e; }
.ceo-tooltip h4 { margin: 0 0 8px; color: #ffe3a1; font: 22px/1.2 'HS Belwe', var(--head); }
.ceo-tooltip h4 span { display: block; margin-top: 4px; color: #cfe6ff; font: 15px/1.4 var(--body); }
.ceo-tooltip-power > p { margin-top: 10px; color: #ddc9a5; font-size: 14px; }
.a-hero:focus { outline: none; }
.a-hero:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; border-radius: 48% 48% 12px 12px; }
.hs-skin .emote-wheel button { background: #342313; color: #ffe3a1; border: 1px solid #a8834a; font-family: 'HS Belwe', Georgia, serif; }
.title-social { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 40px); }
.title-footer { position: absolute; left: 24px; right: 24px; bottom: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; align-items: center; }
.menu-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.menu-footer-actions > button { min-width: 0; min-height: 44px; }
.hs-skin .title-footer .menu-support { border-color: #c39c57; color: #ffe3a1; background: linear-gradient(180deg, #5a3c1a, #34200d); }
.title .title-footer .title-social { position: static; transform: none; margin: 0; padding: 0; max-width: 100%; }
.title .title-footer .menu-guide-links { position: static; margin: 0; justify-content: end; }
.title .corner [data-go="account"] { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 20px; width: max-content; max-width: 100%; margin-inline: auto; padding-top: 8px; border-top: 1px solid rgba(168,131,74,.45); }
.creator-links a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 6px; border-radius: 4px; color: #e3d2b1; font: 400 17px/1.4 var(--body); text-decoration: none; text-shadow: 0 1px 3px #160c03; }
.creator-links svg { flex: none; width: 14px; height: 14px; fill: #d9b974; }
.creator-links a:hover { color: #ffe3a1; text-decoration: underline; text-underline-offset: 5px; }
.creator-links a:focus-visible { outline: 3px solid #ffe3a1; outline-offset: 2px; }
.online-footer .creator-links { margin-top: 18px; }
@media (max-width: 900px), (max-height: 520px) {
  .menu-screen.select .select-wrap { display: block; width: 100%; max-width: 700px; height: auto; padding-inline: 20px; }
  .menu-screen.select .ceo-grid { width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .title .title-footer { position: relative; inset: auto; width: 100%; max-width: 700px; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: auto; padding-top: 28px; flex: none; }
  .title-footer .menu-footer-actions { justify-content: center; }
  .title .title-footer .menu-guide-links { justify-content: center; }
  .title .title-social { position: relative; bottom: auto; left: auto; transform: none; flex: none; margin-top: auto; padding-top: 28px; max-width: 100%; }
  .setup-row { align-items: start; flex-direction: column; gap: 10px; }
  .rival-picker { width: 100%; }
  .setup-row .segs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .segs .seg { min-width: 0; font-size: 15px; padding: 10px 8px; }
}
@media (max-width: 540px) {
  .menu-screen.select .ceo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 520px) {
  .resource-help { width: 600px; padding: 20px 24px; font-size: 26px; }
  .resource-help > b { font-size: 32px; }
  .ceo-tooltip { width: 580px; padding: 22px; font-size: 26px; }
  .ceo-tooltip h3 { font-size: 34px; }
  .ceo-tooltip h4 { font-size: 30px; }
  .ceo-tooltip h4 span, .ceo-vitals, .ceo-tooltip-power > p { font-size: 22px; }
}

/* Hearthstone battle overlays (src/ui/HsBattle.ts, public/hs-battle): damage splats, YOUR TURN, Victory / Defeat */
.hsb-splat { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, -50%) scale(0); }
.hsb-splat img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hsb-splat b { position: absolute; inset: 0; display: grid; place-items: center; font: 400 var(--fs)/1 'HS Belwe_Outline', 'HS Belwe', Georgia, serif;
  color: #fff; -webkit-text-stroke: calc(var(--fs) * .14) #000; paint-order: stroke fill; white-space: nowrap; }
.hsb-label { position: relative; display: grid; place-items: center; font-family: 'HS Belwe_Outline', 'HS Belwe', Georgia, serif; font-weight: 400;
  line-height: 1; text-transform: uppercase; white-space: nowrap; }
.hsb-label span { grid-area: 1 / 1; position: relative; }
.hsb-turn { position: absolute; z-index: 20; pointer-events: none; transform: translate(-50%, -50%) scale(.1); opacity: 0; }
.hsb-turn img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hsb-turn .hsb-plaque { width: 100%; }
.hsb-turn .hsb-rays { animation: hsb-glow 1.2s ease-in-out infinite alternate; }
.hsb-turn-text, .hsb-end-text { position: absolute; display: grid; place-items: center; transform: translate(-50%, -50%); }
.hsb-end { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.hsb-end-dim { position: absolute; inset: -60px; background: rgba(0, 0, 0, .45); animation: hsb-fade .4s ease-out both; }
.hsb-end-body { position: absolute; inset: 0; transform-origin: 50% 45%; animation: hsb-scoop .6s cubic-bezier(.2, 1.35, .4, 1) both; }
.hsb-end-body > img, .hsb-end-body > .hsb-hero { position: absolute; transform: translate(-50%, -50%); }
.hsb-end .hsb-rays { animation: hsb-glow 2.4s ease-in-out infinite alternate; }
.hsb-end.defeat .hsb-hero { filter: saturate(.55) brightness(.85); }
.hsb-end-text .hsb-label span { color: #fff; }
@keyframes hsb-glow { from { opacity: .75; } to { opacity: 1; } }
@keyframes hsb-fade { from { opacity: 0; } }
@keyframes hsb-scoop { from { transform: scale(.55); opacity: 0; } 40% { opacity: 1; } }
/* The result screen sits over the board (in #fx); the overlay keeps only its buttons, along the bottom. */
#overlay.gameover-wrap.hs-end { align-items: flex-end; background: transparent; backdrop-filter: none; }
#overlay.hs-end .gameover { position: absolute; top: auto; left: 50%; bottom: 3%; height: auto; max-height: none; transform: translateX(-50%); padding: 0; justify-content: flex-end; }
#overlay.hs-end .gameover .match-rating { margin: 0 0 10px; color: #ffe3a1; text-shadow: 0 2px 4px #000; }
/* Hearthstone mulligan (desktop with hs-battle): VS face-off, the opening hand dealt large, X marks, floating Confirm */
#overlay.mulligan.hs-mull { background: rgba(0, 0, 0, .3); backdrop-filter: none; }
.mull.hs-mulligan { position: relative; width: 100%; height: 100%; justify-content: center; }
.mull.hs-mulligan .hs-vs { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3vw; pointer-events: none;
  animation: hsm-vs-out .4s ease-in calc(var(--intro) - 400ms) forwards; }
.mull.hs-mulligan .vs-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: hsm-in-left .5s cubic-bezier(.2, 1, .3, 1) both; }
.mull.hs-mulligan .vs-hero.opp { animation-name: hsm-in-right; }
.mull.hs-mulligan .vs-hero b { font: 34px/1 'HS Belwe_Outline', 'HS Belwe', Georgia, serif; color: #fff; -webkit-text-stroke: 6px #000; paint-order: stroke fill; }
.mull.hs-mulligan .vs-hero span { font: 20px/1 'HS Belwe', Georgia, serif; color: #ffd66b; -webkit-text-stroke: 4px #000; paint-order: stroke fill; }
.mull.hs-mulligan .vs-letters { width: 180px; animation: hsm-vs-pop .5s cubic-bezier(.2, 1.5, .4, 1) .25s both; }
.mull.hs-mulligan .choice-head { display: flex; flex-direction: column; align-items: center; animation: hsm-fade .4s ease-out var(--intro) both; }
.hs-skin .mull.hs-mulligan .choice-head h2 { margin: 0; font: 44px/1.1 'HS Belwe_Outline', 'HS Belwe', Georgia, serif; color: #fff; -webkit-text-stroke: 7px #000;
  paint-order: stroke fill; text-shadow: 0 4px 10px rgba(0, 0, 0, .6); }
.mull.hs-mulligan .choice-head .sub { margin: 8px 0 0; font: 22px/1.2 'HS Belwe', Georgia, serif; color: #ffd66b; -webkit-text-stroke: 4px #000; paint-order: stroke fill; }
.mull.hs-mulligan .picks { margin: 10px 0 0; gap: 26px; }
.mull.hs-mulligan .pick { animation-name: hsm-deal; animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .9, .3, 1.1); }
.mull.hs-mulligan .picks .card { transform: scale(1.32); margin: 62px 48px; }
.mull.hs-mulligan .pick:hover { transform: translateY(-8px); }
.mull.hs-mulligan .pick .x { position: absolute; left: 50%; top: 50%; right: auto; bottom: auto; width: 78%; display: block; transform: translate(-50%, -50%) scale(.5);
  opacity: 0; pointer-events: none; transition: transform .18s cubic-bezier(.2, 1.6, .4, 1), opacity .12s; }
.mull.hs-mulligan .pick.replace .x { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.mull.hs-mulligan .pick.replace .card { filter: brightness(.82); }
.hs-floaty { position: relative; display: grid; place-items: center; width: 200px; height: 114px; margin-top: 6px; padding: 0; border: 0; background: none;
  cursor: pointer; animation: hsm-float-in .55s cubic-bezier(.2, 1.4, .4, 1) calc(var(--dealt) + 450ms) both; }
.hs-floaty img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.hs-floaty .face { width: 100%; }
.hs-floaty .glow { width: 160%; opacity: .5; transition: opacity .2s; }
.hs-floaty:hover .glow, .hs-floaty:focus-visible .glow { opacity: 1; }
.hs-floaty span { position: relative; font: 30px/1 'HS Belwe_Outline', 'HS Belwe', Georgia, serif; color: #fff; -webkit-text-stroke: 5px #000; paint-order: stroke fill; }
@keyframes hsm-in-left { from { opacity: 0; transform: translateX(-38vw) scale(.8); } }
@keyframes hsm-in-right { from { opacity: 0; transform: translateX(38vw) scale(.8); } }
@keyframes hsm-vs-pop { from { opacity: 0; transform: scale(2.4); } }
@keyframes hsm-vs-out { to { opacity: 0; transform: scale(.9); visibility: hidden; } }
@keyframes hsm-fade { from { opacity: 0; transform: translateY(-14px); } }
@keyframes hsm-deal { from { opacity: 0; transform: translate(34vw, -18vh) rotate(24deg) scale(.35); } }
@keyframes hsm-float-in { from { opacity: 0; transform: translateY(70px) scale(.6); } }
body.mulligan-open #stage .a-hand { opacity: 0; pointer-events: none; }
/* Hearthstone keeps the deck count in its tooltip and the turn time in the rope */
.hs-skin .deck .deck-count span { opacity: 0; }
.sprint-clock.hs-rope-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hs-skin .thinking { display: none !important; }
/* HistoryCard tiles (hs-battle): portrait masked to the tile, the side-tinted frame over it */
#history .tile.hs-tile { border-radius: 0; overflow: visible; box-shadow: none; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .55)); }
#history .tile.hs-tile .tile-art { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
#history .tile.hs-tile .tile-art > div { position: absolute; overflow: hidden; }
#history .tile.hs-tile .tile-photo { width: 100%; height: 100%; background: center 30% / cover no-repeat; }
#history .tile.hs-tile .tile-art svg { transform: none; }
#history .tile.hs-tile .tile-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#history .tile.hs-tile.attack { margin-bottom: -2px; }
/* Hearthstone's body face for the battle's small text (emotes, tooltips, toasts, game overlays) */
.hs-skin #stage.in-game, .hs-skin #overlay { --body: 'HS FranklinGothic', 'Franklin Gothic Medium', 'Arial Narrow', sans-serif; }
