/* ============================================================
   DonutDeal premium layer — loaded after app.css, refines the
   whole shell, the four game tables and the case battle room.
   ============================================================ */

:root {
  --p-blue: #2f6bff;
  --p-blue-hi: #4d8bff;
  --p-cyan: #3ad2ff;
  --p-green: #35d39a;
  --p-red: #ff5a6e;
  --p-gold: #ffcf5c;
  --p-panel-a: rgba(21, 27, 42, 0.94);
  --p-panel-b: rgba(8, 11, 18, 0.97);
  --p-edge: rgba(94, 138, 232, 0.16);
  --p-edge-hi: rgba(110, 168, 255, 0.42);
  --p-radius: 16px;
  --p-radius-sm: 11px;
  --p-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.95);
}

body {
  background:
    radial-gradient(1200px 620px at 12% -8%, rgba(47, 107, 255, 0.16), transparent 62%),
    radial-gradient(900px 520px at 96% 4%, rgba(58, 210, 255, 0.09), transparent 60%),
    radial-gradient(760px 620px at 50% 108%, rgba(53, 211, 154, 0.07), transparent 62%),
    #05070d;
}

::selection { background: rgba(47, 107, 255, 0.4); color: #fff; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
*::-webkit-scrollbar-thumb { background: rgba(120, 150, 220, 0.22); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(120, 150, 220, 0.4); background-clip: padding-box; }

/* ------------------------------------------------------------ top bar --- */
.topbar {
  background: linear-gradient(180deg, rgba(11, 15, 24, 0.94), rgba(9, 12, 19, 0.8));
  border-bottom: 1px solid rgba(92, 132, 220, 0.14);
  box-shadow: 0 12px 34px -26px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand-wordmark { filter: drop-shadow(0 6px 18px rgba(47, 107, 255, 0.35)); }

.topnav a {
  position: relative;
  letter-spacing: 0.01em;
  transition: color 0.18s ease;
}
.topnav a::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: -6px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--p-blue), var(--p-cyan));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.22s cubic-bezier(.2,.8,.2,1);
}
.topnav a:hover::after, .topnav a.active::after { transform: scaleX(1); }

.balance-pill {
  border: 1px solid rgba(94, 138, 232, 0.26);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.18), rgba(20, 28, 46, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px -16px rgba(47, 107, 255, 0.9);
}
.coin {
  background: radial-gradient(circle at 32% 28%, #ffeaa6, #ffc335 46%, #b98200 100%);
  box-shadow: 0 0 12px rgba(255, 197, 60, 0.45), inset 0 -1px 2px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------------------------ buttons --- */
.btn-primary, .btn-success, .btn-ghost {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.14s ease, box-shadow 0.22s ease, filter 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--p-blue-hi), #2453e0 62%, #1c3fb5);
  border: 1px solid rgba(120, 168, 255, 0.5);
  box-shadow: 0 14px 28px -18px rgba(47, 107, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px -18px rgba(47, 107, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.06);
}
.btn-primary:active:not(:disabled) { transform: translateY(1px) scale(0.995); }

.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.32) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.65s cubic-bezier(.2,.8,.2,1);
}
.btn-primary:hover::after { transform: translateX(120%); }

.btn-success {
  background: linear-gradient(180deg, #43e0a6, #22b07c 62%, #178a61);
  border: 1px solid rgba(108, 240, 190, 0.45);
  color: #04140d;
  box-shadow: 0 14px 28px -18px rgba(53, 211, 154, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-success:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }

.btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(120, 150, 215, 0.2);
  color: #d6deec;
}
.btn-ghost:hover:not(:disabled) {
  border-color: rgba(120, 168, 255, 0.5);
  color: #fff;
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.18), rgba(47, 107, 255, 0.06));
}
.btn-primary:disabled, .btn-success:disabled, .btn-ghost:disabled { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-sm { border-radius: 10px; }

/* -------------------------------------------------------------- panels --- */
.panel, .table {
  background: linear-gradient(158deg, var(--p-panel-a), var(--p-panel-b));
  border: 1px solid var(--p-edge);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(14px);
  position: relative;
}
.panel::before, .table::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(120, 170, 255, 0.28), transparent 42%, transparent 68%, rgba(58, 210, 255, 0.14));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ----------------------------------------------------------- game head --- */
.game-head { align-items: center; gap: 12px; }
.game-head h1 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff, #b9c9e8);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.head-pill {
  border: 1px solid rgba(94, 138, 232, 0.24);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.16), rgba(20, 28, 46, 0.45));
  color: #a9c0e8;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.7rem;
}
.round-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.09em;
  color: #7d8db0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(120, 150, 215, 0.14);
  border-radius: 8px;
  padding: 5px 9px;
}

/* ------------------------------------------------------------- controls --- */
.amount-field {
  display: flex; align-items: center; gap: 10px;
  background: rgba(4, 7, 13, 0.7);
  border: 1px solid rgba(96, 132, 214, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.amount-field:focus-within {
  border-color: rgba(120, 168, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.16);
}
.amount-field input {
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.quick-bets button {
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 150, 215, 0.14);
  color: #9dabc4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.16s ease;
}
.quick-bets button:hover {
  color: #fff;
  border-color: rgba(120, 168, 255, 0.5);
  background: rgba(47, 107, 255, 0.16);
}

.ctl-label { font-size: 0.66rem; letter-spacing: 0.14em; color: #8795ae; }

.ctl-foot {
  display: flex; justify-content: space-between; gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(120, 150, 215, 0.12);
  font-size: 0.72rem;
  color: #8795ae;
}
.ctl-foot b { color: #eaf1ff; font-size: 0.9rem; font-variant-numeric: tabular-nums; }

.segmented {
  display: grid; gap: 6px;
  background: rgba(4, 7, 13, 0.6);
  border: 1px solid rgba(96, 132, 214, 0.16);
  border-radius: 12px;
  padding: 5px;
}
.segmented button {
  border-radius: 9px;
  border: 1px solid transparent;
  color: #93a1ba;
  font-weight: 700;
  transition: all 0.18s ease;
}
.segmented button:hover { color: #dbe6f8; background: rgba(255, 255, 255, 0.04); }
.segmented button.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(77, 139, 255, 0.9), rgba(36, 83, 224, 0.9));
  border-color: rgba(140, 180, 255, 0.5);
  box-shadow: 0 10px 22px -14px rgba(47, 107, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.segmented button small { opacity: 0.7; font-weight: 600; }

/* ---------------------------------------------------------------- home --- */
.hero {
  border: 1px solid var(--p-edge);
  border-radius: 22px;
  background:
    radial-gradient(680px 320px at 84% 8%, rgba(58, 210, 255, 0.16), transparent 66%),
    radial-gradient(520px 320px at 8% 110%, rgba(47, 107, 255, 0.22), transparent 62%),
    linear-gradient(158deg, rgba(18, 24, 38, 0.96), rgba(7, 10, 16, 0.98));
  box-shadow: var(--p-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.hero h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.035em; }
.hero-sub { color: #93a3bf; }
.hero-art img { filter: drop-shadow(0 30px 50px rgba(47, 107, 255, 0.4)); }

.promo-card {
  border-radius: 16px;
  border: 1px solid var(--p-edge);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1), box-shadow 0.24s ease, border-color 0.24s ease;
}
.promo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 168, 255, 0.42);
  box-shadow: 0 26px 50px -30px rgba(47, 107, 255, 0.85);
}
.promo-art { transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.promo-card:hover .promo-art { transform: scale(1.04); }

.section-title { letter-spacing: 0.1em; color: #8b9ab6; }

.originals { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; }
.orig {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--p-edge);
  background: linear-gradient(160deg, rgba(20, 26, 40, 0.95), rgba(8, 11, 18, 0.98));
  box-shadow: var(--p-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  padding: 0;
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1), border-color 0.24s ease, box-shadow 0.26s ease;
}
.orig::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(420px 200px at 50% 0%, rgba(47, 107, 255, 0.22), transparent 70%);
  opacity: 0; transition: opacity 0.26s ease;
  pointer-events: none;
}
.orig:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 168, 255, 0.5);
  box-shadow: 0 30px 60px -34px rgba(47, 107, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.orig:hover::after { opacity: 1; }
.orig-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: 14px 14px 4px;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
}
.orig:hover .orig-img { transform: scale(1.05); }
.orig-name { font-size: 0.95rem; font-weight: 750; letter-spacing: -0.01em; }
.orig-brand { font-size: 0.6rem; letter-spacing: 0.16em; color: #6f7f9c; }

.strip {
  border-radius: 16px;
  border: 1px solid var(--p-edge);
  background: linear-gradient(158deg, rgba(18, 24, 38, 0.9), rgba(8, 11, 18, 0.96));
  box-shadow: var(--p-shadow);
}
.strip-value { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }

/* ----------------------------------------------------------------- dice --- */
.dice-stage {
  border-radius: var(--p-radius);
  background:
    radial-gradient(560px 240px at 50% -10%, rgba(47, 107, 255, 0.16), transparent 68%),
    linear-gradient(180deg, rgba(10, 14, 22, 0.6), rgba(6, 9, 15, 0.9));
  border: 1px solid rgba(96, 132, 214, 0.14);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.dice-stage.flash-win {
  border-color: rgba(53, 211, 154, 0.5);
  box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.35), 0 30px 70px -40px rgba(53, 211, 154, 0.9), inset 0 0 80px rgba(53, 211, 154, 0.08);
  animation: dd-win-pop 0.5s ease;
}
.dice-stage.flash-loss {
  border-color: rgba(255, 90, 110, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 90, 110, 0.3), 0 30px 70px -40px rgba(255, 90, 110, 0.8), inset 0 0 80px rgba(255, 90, 110, 0.08);
  animation: dd-loss-shake 0.45s ease;
}
@keyframes dd-win-pop { 0% { transform: scale(0.985); } 55% { transform: scale(1.008); } 100% { transform: scale(1); } }
@keyframes dd-loss-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }

.dice-readout { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dice-value {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 12px 40px rgba(47, 107, 255, 0.45);
  line-height: 1;
}
.dice-value.win { color: #6ff0bf; text-shadow: 0 12px 40px rgba(53, 211, 154, 0.55); }
.dice-value.loss { color: #ff8593; text-shadow: 0 12px 40px rgba(255, 90, 110, 0.45); }
.dice-multiplier {
  font-size: 1rem; font-weight: 800;
  color: #9ecbff;
  background: rgba(47, 107, 255, 0.14);
  border: 1px solid rgba(96, 132, 214, 0.28);
  border-radius: 10px;
  padding: 6px 11px;
}

.dice-scale { color: #6f7f9c; font-size: 0.66rem; letter-spacing: 0.08em; }
.dice-track {
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 90, 110, 0.28), rgba(255, 90, 110, 0.14));
  border: 1px solid rgba(120, 150, 215, 0.18);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  position: relative;
  touch-action: none;
}
.dice-zone-win {
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, rgba(53, 211, 154, 0.72), rgba(24, 160, 112, 0.85));
  box-shadow: 0 0 24px rgba(53, 211, 154, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: left 0.18s ease, width 0.18s ease, border-radius 0.18s ease;
}
.dice-thumb {
  width: 14px; height: 40px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffffff, #cfe0ff);
  box-shadow: 0 0 0 1px rgba(9, 12, 19, 0.6), 0 6px 18px rgba(47, 107, 255, 0.8);
  transform: translateX(-50%);
  transition: left 0.18s cubic-bezier(.2,.8,.2,1);
}
.dice-marker {
  width: 3px; height: 30px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
}
.dice-presets button {
  border-radius: 10px;
  border: 1px solid rgba(120, 150, 215, 0.16);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.16s ease;
}
.dice-presets button:hover { border-color: rgba(120, 168, 255, 0.5); background: rgba(47, 107, 255, 0.12); }
.dice-presets button.active { border-color: rgba(120, 168, 255, 0.6); background: rgba(47, 107, 255, 0.18); box-shadow: 0 8px 20px -14px rgba(47, 107, 255, 0.9); }
.dice-preset-bar { border-radius: 4px; overflow: hidden; }
.dice-preset-bar i.win { background: linear-gradient(90deg, #35d39a, #1fa97d); }
.dice-preset-bar i.loss { background: rgba(255, 90, 110, 0.35); }
.dice-fields label { font-size: 0.62rem; letter-spacing: 0.12em; color: #8391ab; }
.dice-fields input {
  background: rgba(4, 7, 13, 0.7);
  border: 1px solid rgba(96, 132, 214, 0.18);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.dice-profit {
  border-radius: 12px;
  border: 1px solid rgba(53, 211, 154, 0.22);
  background: linear-gradient(180deg, rgba(53, 211, 154, 0.12), rgba(53, 211, 154, 0.04));
  padding: 12px 14px;
}
.dice-profit b { color: #6ff0bf; font-size: 1.15rem; }
.dice-roll.is-rolling { filter: saturate(1.3) brightness(1.1); }

/* --------------------------------------------------------------- towers --- */
.tower { display: flex; flex-direction: column; gap: 8px; }
.tower-tile {
  border-radius: 12px;
  border: 1px solid rgba(96, 132, 214, 0.16);
  background: linear-gradient(180deg, rgba(30, 39, 60, 0.9), rgba(12, 17, 27, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 22px -20px #000;
  transition: transform 0.14s ease, border-color 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.tower-tile:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(120, 168, 255, 0.55);
  box-shadow: 0 16px 30px -18px rgba(47, 107, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.tower-tile:disabled { opacity: 0.55; }
.tower-tile.is-gem {
  background: linear-gradient(180deg, rgba(53, 211, 154, 0.32), rgba(18, 122, 88, 0.55));
  border-color: rgba(108, 240, 190, 0.6);
  box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.3), 0 18px 34px -20px rgba(53, 211, 154, 0.9);
  opacity: 1;
}
.tower-tile.is-bomb, .tower-tile.is-hit {
  background: linear-gradient(180deg, rgba(255, 90, 110, 0.34), rgba(140, 24, 40, 0.6));
  border-color: rgba(255, 130, 145, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 90, 110, 0.3), 0 18px 34px -20px rgba(255, 90, 110, 0.9);
  opacity: 1;
}

/* ---------------------------------------------------------------- mines --- */
.mines-grid { gap: 10px; }
.mine-tile {
  border-radius: 14px;
  border: 1px solid rgba(96, 132, 214, 0.16);
  background: linear-gradient(180deg, rgba(32, 41, 63, 0.92), rgba(11, 16, 26, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 26px -22px #000;
  transition: transform 0.14s ease, border-color 0.18s ease, box-shadow 0.2s ease;
}
.mine-tile:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(120, 168, 255, 0.55);
  box-shadow: 0 18px 32px -18px rgba(47, 107, 255, 0.85);
}
.mine-tile.is-gem {
  background: linear-gradient(180deg, rgba(53, 211, 154, 0.3), rgba(16, 112, 82, 0.55));
  border-color: rgba(108, 240, 190, 0.55);
  opacity: 1;
}
.mine-tile.is-mine, .mine-tile.is-hit {
  background: linear-gradient(180deg, rgba(255, 90, 110, 0.32), rgba(132, 22, 38, 0.6));
  border-color: rgba(255, 130, 145, 0.55);
  opacity: 1;
}

/* ------------------------------------------------------------ battles --- */
.battle-top h2 { font-size: 1.15rem; letter-spacing: -0.02em; }
.battle-sub { color: #8b9ab6; }
.battle-row {
  border-radius: 14px;
  border: 1px solid var(--p-edge);
  background: linear-gradient(158deg, rgba(20, 26, 40, 0.92), rgba(8, 11, 18, 0.97));
  box-shadow: 0 18px 40px -32px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.22s ease;
}
.battle-row:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 168, 255, 0.42);
  box-shadow: 0 26px 50px -30px rgba(47, 107, 255, 0.8);
}
.mode-pill {
  background: linear-gradient(180deg, rgba(58, 210, 255, 0.22), rgba(47, 107, 255, 0.18));
  border: 1px solid rgba(96, 168, 255, 0.34);
  color: #9fd8ff;
  border-radius: 9px;
}
.seat-chip { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(120, 150, 215, 0.12); }

.case-picker { gap: 14px; }
.case-tile {
  border-radius: 16px;
  border: 1px solid var(--p-edge);
  background: linear-gradient(160deg, rgba(21, 27, 42, 0.94), rgba(8, 11, 18, 0.98));
  box-shadow: var(--p-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.22s ease, transform 0.16s ease;
}
.case-tile:hover { border-color: rgba(120, 168, 255, 0.4); transform: translateY(-1px); }
.case-tile.is-open {
  border-color: rgba(120, 168, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(47, 107, 255, 0.28), 0 26px 54px -34px rgba(47, 107, 255, 0.9);
  background: linear-gradient(160deg, rgba(28, 38, 62, 0.96), rgba(10, 14, 22, 0.98));
}
.case-tile-head b { font-size: 0.95rem; letter-spacing: -0.01em; }
.case-tier { letter-spacing: 0.14em; font-weight: 800; }
.case-qty { background: rgba(4, 7, 13, 0.4); }
.case-qty button:hover { background: rgba(47, 107, 255, 0.18); color: #fff; }
.case-item { border-radius: 8px; transition: background 0.14s ease; }
.case-item:hover { background: rgba(255, 255, 255, 0.035); }

.battle-bar {
  border-radius: 14px;
  border: 1px solid rgba(96, 138, 232, 0.24);
  background: linear-gradient(180deg, rgba(16, 21, 33, 0.96), rgba(8, 11, 18, 0.97));
  box-shadow: 0 -18px 40px -30px #000, inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}
.battle-bar > b { color: #8fd2ff; }

.battle-room { gap: 16px; }
.room-seat {
  border-radius: 14px;
  border: 1px solid rgba(96, 132, 214, 0.18);
  background: linear-gradient(158deg, rgba(24, 31, 48, 0.94), rgba(9, 13, 21, 0.97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 34px -30px #000;
  transition: border-color 0.2s ease, box-shadow 0.24s ease;
  min-height: 74px;
}
.room-seat:hover { border-color: rgba(120, 168, 255, 0.4); }
.room-seat.is-winner {
  border-color: rgba(53, 211, 154, 0.55);
  background: linear-gradient(158deg, rgba(23, 60, 50, 0.9), rgba(9, 24, 19, 0.96));
  box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.25), 0 24px 44px -30px rgba(53, 211, 154, 0.85);
}
.room-seat img { border-radius: 9px; box-shadow: 0 6px 16px -10px #000; }
.room-name { font-weight: 750; }
.room-drop { color: #cfe6ff; font-weight: 800; }

/* the case opening reel */
.seat-reel {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(120, 168, 255, 0.3);
  background: linear-gradient(180deg, rgba(8, 11, 19, 0.95), rgba(14, 20, 32, 0.95));
  box-shadow: inset 0 0 18px rgba(47, 107, 255, 0.24);
  flex: none;
  margin-left: 6px;
}
.seat-reel::before, .seat-reel::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 14px;
  z-index: 2; pointer-events: none;
}
.seat-reel::before { top: 0; background: linear-gradient(180deg, rgba(8, 11, 19, 0.95), transparent); }
.seat-reel::after { bottom: 0; background: linear-gradient(0deg, rgba(8, 11, 19, 0.95), transparent); }
.reel-track {
  display: flex;
  height: 56px;
  animation: reel-spin 1.15s cubic-bezier(.14, .82, .22, 1) both;
  will-change: transform;
}
.reel-cell {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.reel-cell img { width: 34px; height: 34px; image-rendering: pixelated; object-fit: contain; }
.reel-cell.is-final { position: relative; }
.reel-cell.is-final::after {
  content: '';
  position: absolute; inset: 6px;
  border-radius: 8px;
  box-shadow: 0 0 22px rgba(58, 210, 255, 0.55);
  animation: reel-land 0.5s ease 1.05s both;
}
@keyframes reel-spin { from { transform: translateX(0); } to { transform: translateX(var(--shift, -504px)); } }
@keyframes reel-land { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

.open-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(96, 138, 232, 0.22);
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.16), rgba(58, 210, 255, 0.06));
  color: #bcd2f5;
  font-size: 0.8rem;
}
.open-banner b { color: #fff; }
.open-banner .open-progress {
  margin-left: auto;
  width: 120px; height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.open-banner .open-progress i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--p-blue), var(--p-cyan));
  transition: width 0.4s ease;
}

.room-stats > div {
  border-radius: 12px;
  border: 1px solid rgba(96, 132, 214, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.room-stats b { color: #eaf2ff; font-weight: 800; }
.watch-banner {
  border-radius: 12px;
  border: 1px solid rgba(58, 210, 255, 0.3);
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.16), rgba(58, 210, 255, 0.08));
  color: #a8d6ff;
}
.battle-empty { border-radius: 16px; }

/* ---------------------------------------------------------------- misc --- */
.toast {
  border-radius: 12px;
  border: 1px solid rgba(120, 150, 215, 0.22);
  background: linear-gradient(180deg, rgba(20, 26, 40, 0.98), rgba(8, 11, 18, 0.98));
  box-shadow: 0 22px 44px -28px #000;
  backdrop-filter: blur(12px);
}
.toast.ok { border-color: rgba(53, 211, 154, 0.45); }
.toast.err { border-color: rgba(255, 90, 110, 0.45); }

.modal {
  border-radius: 18px;
  border: 1px solid rgba(96, 138, 232, 0.24);
  background: linear-gradient(160deg, rgba(22, 29, 45, 0.98), rgba(8, 11, 18, 0.99));
  box-shadow: 0 40px 90px -40px #000, inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
  .originals { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .dice-value { font-size: 2.6rem; }
}
@media (max-width: 620px) {
  .case-picker { grid-template-columns: 1fr; }
  .room-seat { min-height: 66px; }
  .seat-reel { width: 46px; height: 46px; }
  .reel-cell, .reel-track { width: 46px; height: 46px; }
}

/* --- fitted reels and header details ----------------------------------- */
.game-head { flex-wrap: wrap; }
.game-head .round-tag { align-self: center; flex: 0 0 auto; white-space: nowrap; }
.room-seats { grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); }
.room-seat { min-width: 0; overflow: hidden; }
.room-name { min-width: 0; overflow: hidden; }
.room-name > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-drop { flex: none; }
.seat-reel { --cell: 56px; width: var(--cell); height: var(--cell); }
.seat-reel .reel-track, .seat-reel .reel-cell { width: var(--cell); height: var(--cell); }
.seat-reel .reel-track { --shift: calc(var(--cell) * -9); }
@media (max-width: 620px) {
  .seat-reel { --cell: 46px; }
  .room-seats { grid-template-columns: 1fr 1fr; }
}
.game-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.game-head .round-tag { margin-left: auto; }
@media (max-width: 560px) { .game-head .round-tag { margin-left: 0; } }
.view .game-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.view .game-head > * { flex: 0 0 auto; }
.view .game-head .round-tag { width: auto; margin-left: auto; }
/* compact room stats on small screens */
.room-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.room-stats > div { padding: 10px 12px; }
.room-seat { min-height: 66px; }
@media (max-width: 430px) {
  .room-stats { grid-template-columns: 1fr 1fr; }
  .room-stats > div:last-child { grid-column: span 2; }
}
.segmented button small { color: rgba(200, 216, 240, 0.62); }
.segmented button.active small { color: rgba(255, 255, 255, 0.86); }
.btn-success:disabled, .btn-primary:disabled { filter: grayscale(0.4) brightness(0.72); opacity: 0.55; }
.tower-tile:disabled { opacity: 0.5; }
.hero-art img { max-width: min(420px, 62vw); max-height: 320px; object-fit: contain; }
.hero { align-items: center; }
@media (max-width: 720px) { .hero-art img { max-height: 220px; } }

/* --- game thumbnails: the card hugs the artwork exactly --------------- */
.originals { align-items: start; }
.orig.has-art {
  aspect-ratio: auto;
  align-self: start;
  padding: 0;
  border: 1px solid rgba(120, 168, 255, 0.26);
  background: rgba(9, 13, 21, 0.92);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 44px -32px rgba(0, 0, 0, 0.95);
}
.orig.has-art .orig-img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  padding: 0;
  object-fit: initial;
  border-radius: inherit;
  transform: none;
}
.orig.has-art:hover .orig-img { transform: none; }
.orig.has-art .orig-name,
.orig.has-art .orig-brand { display: none; }
.orig.has-art::after { display: none; }
.orig.has-art:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 168, 255, 0.55);
  box-shadow: 0 28px 54px -30px rgba(47, 107, 255, 0.85);
}

/* --- uniform game tiles: full artwork over its own blurred backdrop --- */
.orig.has-art {
  aspect-ratio: 5 / 6;
  align-self: stretch;
  padding: 0;
  position: relative;
  background: #0a0e17;
  border: 1px solid rgba(120, 168, 255, 0.26);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 44px -32px rgba(0, 0, 0, 0.95);
}
.orig.has-art::before {
  content: '';
  position: absolute; inset: -10%;
  background-image: var(--art, none);
  background-size: cover;
  background-position: center;
  filter: blur(20px) saturate(1.25) brightness(0.6);
  transform: scale(1.12);
  z-index: 0;
}
.orig.has-art .orig-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  display: block;
  z-index: 1;
  border-radius: 0;
  aspect-ratio: auto;
  transform: none;
}
.orig.has-art:hover .orig-img { transform: none; }
.orig.has-art .orig-name,
.orig.has-art .orig-brand { display: none; }
.orig.has-art::after { display: none; }
.orig.has-art:hover {
  border-color: rgba(120, 168, 255, 0.55);
  box-shadow: 0 28px 54px -30px rgba(47, 107, 255, 0.85);
}

/* --- one reusable game card: all six identical ------------------------ */
.originals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
}
.orig { flex: 1 1 176px; max-width: 214px; min-width: 0; }
.orig.has-art {
  aspect-ratio: 250 / 308;
  align-self: auto;
  padding: 0;
  position: relative;
  background: #0a0e17;
  border: 1px solid rgba(120, 168, 255, 0.26);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 44px -32px rgba(0, 0, 0, 0.95);
}
.orig.has-art::before { content: none; display: none; background: none; filter: none; }
.orig.has-art::after { content: none; display: none; }
.orig.has-art .orig-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  padding: 0;
  margin: 0;
  border-radius: 0;
  transform: none;
  aspect-ratio: auto;
}
.orig.has-art .orig-name,
.orig.has-art .orig-brand { display: none; }
.orig.has-art:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 168, 255, 0.55);
  box-shadow: 0 28px 54px -30px rgba(47, 107, 255, 0.85);
}
.orig.has-art:hover .orig-img { transform: none; }

/* six equal cards: never an orphan card on its own row */
.originals {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.orig, .orig.has-art { flex: none; max-width: none; width: auto; }
@media (max-width: 1079px) { .originals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 719px) { .originals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 379px) { .originals { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------- case battle arena --- */
.promo-card { overflow: hidden; }
.promo-card, .promo-card:hover { transform: none; }
.promo-card:hover .promo-art { transform: none; }
.promo-card:hover {
  border-color: rgba(120, 168, 255, 0.5);
  box-shadow: 0 24px 48px -30px rgba(47, 107, 255, 0.9);
  filter: brightness(1.04);
}

.view[data-view="battles"] .view-inner,
#battlePage { width: 100%; }
.arena {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--p-edge, rgba(94, 138, 232, 0.16));
  background:
    radial-gradient(900px 320px at 50% -10%, rgba(47, 107, 255, 0.16), transparent 70%),
    linear-gradient(165deg, rgba(16, 22, 35, 0.96), rgba(6, 9, 15, 0.98));
  box-shadow: var(--p-shadow, 0 26px 60px -34px #000), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.arena-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(120, 150, 215, 0.12);
}
.arena-cost { display: flex; flex-direction: column; gap: 2px; }
.arena-cost span { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #7f8da7; }
.arena-cost b { font-size: 1rem; font-variant-numeric: tabular-nums; color: #eaf2ff; }
.arena-status {
  margin-left: auto;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.arena-status.is-waiting { color: #ffd88a; background: rgba(255, 200, 90, 0.12); border: 1px solid rgba(255, 200, 90, 0.3); }
.arena-status.is-live { color: #8fe4ff; background: rgba(58, 210, 255, 0.12); border: 1px solid rgba(58, 210, 255, 0.35); }
.arena-status.is-done { color: #86f0c4; background: rgba(53, 211, 154, 0.12); border: 1px solid rgba(53, 211, 154, 0.35); }
.arena-bar {
  width: 190px; height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.arena-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--p-blue, #2f6bff), var(--p-cyan, #3ad2ff));
  box-shadow: 0 0 14px rgba(58, 210, 255, 0.6);
  transition: width 0.4s ease;
}
.arena-count { font-size: 0.7rem; color: #7f8da7; font-variant-numeric: tabular-nums; }
.arena-fair {
  display: grid; gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(96, 138, 232, 0.2);
  background: rgba(8, 12, 20, 0.7);
  font-size: 0.72rem;
}
.arena-fair span { color: #7f8da7; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.58rem; }
.arena-fair code { color: #b9cdeb; overflow-wrap: anywhere; font-size: 0.68rem; }

.arena-players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.battle-player {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(96, 132, 214, 0.18);
  background: linear-gradient(165deg, rgba(22, 29, 45, 0.95), rgba(8, 12, 20, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.3s ease;
}
.battle-player.is-winner {
  border-color: rgba(53, 211, 154, 0.55);
  box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.25), 0 26px 50px -32px rgba(53, 211, 154, 0.9);
  animation: arena-win 2.4s ease-in-out infinite;
}
.battle-player.is-loser { border-color: rgba(255, 90, 110, 0.22); }
.battle-player.is-empty { align-items: center; justify-content: center; color: #6b7a95; border-style: dashed; min-height: 160px; }
.player-empty { font-weight: 700; font-size: 0.9rem; }
.battle-player.is-empty small { font-size: 0.7rem; color: #5f6d86; }
@keyframes arena-win {
  0%, 100% { box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.22), 0 26px 50px -32px rgba(53, 211, 154, 0.75); }
  50% { box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.45), 0 30px 60px -30px rgba(53, 211, 154, 1); }
}
.player-head { display: flex; align-items: center; gap: 12px; }
.player-avatar {
  width: 46px; height: 46px; border-radius: 12px;
  background: #10151f; border: 1px solid rgba(120, 168, 255, 0.25);
  box-shadow: 0 10px 22px -14px #000;
}
.player-id { display: flex; flex-direction: column; min-width: 0; }
.player-id b { font-size: 0.95rem; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-id small { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: #6f7f9c; }
.player-total { margin-left: auto; text-align: right; }
.player-total span { display: block; font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: #6f7f9c; }
.player-total b { font-size: 1rem; font-variant-numeric: tabular-nums; color: #cfe6ff; }
.player-verdict {
  align-self: flex-start;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 7px;
}
.player-verdict.win { color: #8bf3c9; background: rgba(53, 211, 154, 0.16); border: 1px solid rgba(53, 211, 154, 0.4); }
.player-verdict.lose { color: #ff9aa6; background: rgba(255, 90, 110, 0.12); border: 1px solid rgba(255, 90, 110, 0.32); }
.player-items { display: flex; flex-wrap: wrap; gap: 8px; min-height: 84px; align-content: flex-start; }
.player-waiting { font-size: 0.72rem; color: #6f7f9c; }
.item-card {
  width: 84px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 6px;
  border-radius: 11px;
  border: 1px solid var(--rarity, rgba(120, 150, 215, 0.3));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(8, 12, 20, 0.92));
  box-shadow: 0 0 18px -10px var(--rarity, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.item-card-art {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9px;
}
.item-card-art img { width: 30px; height: 30px; image-rendering: pixelated; object-fit: contain; }
.item-card-name { font-size: 0.6rem; line-height: 1.2; text-align: center; color: #dbe7f8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-value { font-size: 0.6rem; font-weight: 800; color: var(--rarity, #cfe6ff); font-variant-numeric: tabular-nums; }
.item-card.is-new { animation: item-pop 0.55s cubic-bezier(.2, .9, .2, 1) both; }
.item-card.is-new .item-card-art { animation: item-spin 0.7s ease-out both; }
@keyframes item-pop {
  0% { opacity: 0; transform: translateY(10px) scale(0.86); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes item-spin {
  0% { transform: rotateY(0deg) scale(0.7); filter: brightness(1.8); }
  70% { transform: rotateY(540deg) scale(1.08); }
  100% { transform: rotateY(720deg) scale(1); filter: brightness(1); }
}

.arena-opening {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(96, 138, 232, 0.22);
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.16), rgba(58, 210, 255, 0.06));
  font-size: 0.8rem; color: #b6c9ea;
}
.arena-opening b { color: #fff; }
.arena-opening small { margin-left: auto; color: #8fa3c4; font-variant-numeric: tabular-nums; }
.arena-result {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(53, 211, 154, 0.4);
  background: linear-gradient(90deg, rgba(53, 211, 154, 0.16), rgba(58, 210, 255, 0.06));
  animation: result-in 0.5s cubic-bezier(.2, .9, .2, 1) both;
}
.arena-result span { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8fe9c6; }
.arena-result b { font-size: 1.1rem; letter-spacing: -0.01em; }
.arena-result i { margin-left: auto; font-style: normal; font-size: 1.15rem; font-weight: 800; color: #8bf3c9; }
@keyframes result-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .arena { padding: 14px; }
  .arena-bar { width: 100%; order: 5; }
  .arena-count { order: 6; }
  .arena-players { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ case battle arena v2 --- */
.arena {
  min-height: calc(100vh - 240px);
  gap: 18px;
}
.arena-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(120, 150, 215, 0.12);
}
.arena-stat { display: flex; flex-direction: column; gap: 2px; }
.arena-stat span { font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: #7f8da7; }
.arena-stat b { font-size: 0.98rem; font-variant-numeric: tabular-nums; color: #eaf2ff; }
.arena-progress { flex: 1 1 240px; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }
.arena-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
.arena-track i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #3ad2ff);
  box-shadow: 0 0 18px rgba(58, 210, 255, 0.7);
  transition: width 0.45s cubic-bezier(.2, .8, .2, 1);
}
.arena-progress small { font-size: 0.7rem; color: #8b9ab6; }
.arena-stage { display: grid; gap: 16px; flex: 1 1 auto; }
.arena-stage[data-seats="1"] { grid-template-columns: minmax(0, 1fr); }
.arena-stage[data-seats="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.arena-stage[data-seats="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.arena-stage[data-seats="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.arena-lane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(96, 132, 214, 0.2);
  background:
    radial-gradient(320px 180px at 50% -20%, rgba(47, 107, 255, 0.16), transparent 70%),
    linear-gradient(170deg, rgba(20, 27, 43, 0.96), rgba(7, 10, 17, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 50px -40px #000;
  transition: border-color 0.25s ease, box-shadow 0.3s ease;
}
.arena-lane.is-winner {
  border-color: rgba(53, 211, 154, 0.6);
  background:
    radial-gradient(360px 200px at 50% -20%, rgba(53, 211, 154, 0.22), transparent 72%),
    linear-gradient(170deg, rgba(18, 44, 38, 0.96), rgba(7, 14, 12, 0.99));
  box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.3), 0 30px 60px -34px rgba(53, 211, 154, 0.95);
  animation: lane-win 2.6s ease-in-out infinite;
}
.arena-lane.is-loser { border-color: rgba(255, 90, 110, 0.26); }
.arena-lane.is-empty { align-items: center; justify-content: center; border-style: dashed; color: #6b7a95; }
.lane-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lane-empty span { font-weight: 700; font-size: 0.9rem; }
.lane-empty small { font-size: 0.68rem; color: #5f6d86; }
@keyframes lane-win {
  0%, 100% { box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.26), 0 30px 60px -36px rgba(53, 211, 154, 0.85); }
  50% { box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.5), 0 34px 70px -32px rgba(53, 211, 154, 1); }
}
.lane-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.lane-avatar {
  width: 44px; height: 44px; border-radius: 11px;
  background: #10151f; border: 1px solid rgba(120, 168, 255, 0.28);
  box-shadow: 0 10px 22px -16px #000;
}
.lane-id { display: flex; flex-direction: column; min-width: 0; }
.lane-id b { font-size: 0.94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-id small { font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.12em; color: #6f7f9c; }
.lane-verdict {
  margin-left: auto;
  font-size: 0.56rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 7px;
}
.lane-verdict.win { color: #8bf3c9; background: rgba(53, 211, 154, 0.16); border: 1px solid rgba(53, 211, 154, 0.45); }
.lane-verdict.lose { color: #ff9aa6; background: rgba(255, 90, 110, 0.12); border: 1px solid rgba(255, 90, 110, 0.34); }
.lane-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(96, 132, 214, 0.16);
  background: rgba(255, 255, 255, 0.03);
}
.lane-total span { font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: #7f8da7; }
.lane-total b { font-size: 1.02rem; font-variant-numeric: tabular-nums; color: #d8e8ff; }
.arena-lane.is-winner .lane-total b { color: #8bf3c9; }
.lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 9px;
  align-content: start;
}
.lane-waiting { grid-column: 1 / -1; font-size: 0.72rem; color: #6f7f9c; padding: 8px 0; }
.lane-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--rarity, rgba(120, 150, 215, 0.3));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(6, 10, 17, 0.92));
  box-shadow: 0 0 20px -12px var(--rarity, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.lane-item b {
  font-size: 0.6rem; line-height: 1.2; text-align: center; color: #e2ecfa;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lane-item-value { font-size: 0.62rem; font-weight: 800; color: var(--rarity, #cfe6ff); font-variant-numeric: tabular-nums; }
.lane-item-art { width: 44px; height: 44px; display: grid; place-items: center; }
.lane-item-art img { width: 38px; height: 38px; image-rendering: pixelated; object-fit: contain; }
.lane-item.is-hot {
  box-shadow: 0 0 0 1px var(--rarity, #fbbf24), 0 0 26px -6px var(--rarity, #fbbf24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(8, 12, 20, 0.92));
}
.lane-item.is-new { animation: item-pop 0.55s cubic-bezier(.2, .9, .2, 1) both; }
.lane-item.is-new .lane-item-art { animation: item-spin 0.7s ease-out both; }

.arena-result {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(53, 211, 154, 0.42);
  background: linear-gradient(90deg, rgba(53, 211, 154, 0.18), rgba(58, 210, 255, 0.07));
  box-shadow: 0 24px 60px -40px rgba(53, 211, 154, 0.9);
  animation: result-in 0.5s cubic-bezier(.2, .9, .2, 1) both;
}
.result-tag { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #8fe9c6; }
.result-name { font-size: 1.25rem; letter-spacing: -0.02em; }
.result-pot { margin-left: auto; font-style: normal; font-size: 1.3rem; font-weight: 800; color: #8bf3c9; font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
  .arena-stage[data-seats="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .arena-stage[data-seats="2"],
  .arena-stage[data-seats="3"],
  .arena-stage[data-seats="4"] { grid-template-columns: minmax(0, 1fr); }
  .arena { min-height: 0; padding: 14px; }
  .lane-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}

/* arena sizing: hug the content instead of reserving empty height */
.arena { min-height: 0; }
.arena-lane { min-height: 260px; }
.lane-item.is-pending {
  border-style: dashed;
  border-color: rgba(120, 150, 215, 0.18);
  background: rgba(255, 255, 255, 0.015);
  box-shadow: none;
  opacity: 0.55;
  min-height: 78px;
}

/* -------------------------------------------------- lane reels + teams --- */
.lane-reel {
  position: relative;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(120, 168, 255, 0.3);
  background:
    radial-gradient(280px 90px at 50% 50%, rgba(47, 107, 255, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(8, 12, 20, 0.96), rgba(12, 18, 30, 0.96));
  box-shadow: inset 0 0 22px rgba(47, 107, 255, 0.22);
}
.lane-reel-track {
  display: flex;
  height: 100%;
  padding-left: calc(50% - 34px);
  animation: lane-spin 1.2s cubic-bezier(.12, .85, .2, 1) both;
  will-change: transform;
}
.lane-reel-cell {
  width: 68px;
  height: 72px;
  flex: none;
  display: grid;
  place-items: center;
  opacity: 0.72;
}
.lane-reel-cell img {
  width: 40px; height: 40px;
  image-rendering: pixelated;
  object-fit: contain;
  filter: saturate(0.85);
}
.lane-reel-cell.is-final { opacity: 1; }
.lane-reel-cell.is-final img {
  width: 46px; height: 46px;
  filter: none;
  animation: reel-final 0.5s ease 0.95s both;
}
.lane-reel::before, .lane-reel::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 26px; z-index: 2; pointer-events: none;
}
.lane-reel::before { left: 0; background: linear-gradient(90deg, rgba(6, 9, 15, 0.95), transparent); }
.lane-reel::after { right: 0; background: linear-gradient(270deg, rgba(6, 9, 15, 0.95), transparent); }
.lane-reel-line {
  position: absolute;
  left: 50%; top: 6px; bottom: 6px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(58, 210, 255, 0.85), transparent);
  box-shadow: 0 0 12px rgba(58, 210, 255, 0.9);
  z-index: 3;
  pointer-events: none;
}
@keyframes lane-spin {
  from { transform: translateX(0); }
  to { transform: translateX(-476px); }
}
@keyframes reel-final {
  0% { opacity: 0; transform: scale(0.7); }
  60% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

.arena-stage.is-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.arena-team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.arena-vs {
  align-self: center;
  display: grid; place-items: center;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(120, 168, 255, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.18em;
  color: #8fa3c4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.arena-team.team-a .arena-lane { border-color: rgba(58, 210, 255, 0.26); }
.arena-team.team-b .arena-lane { border-color: rgba(168, 120, 255, 0.3); }
.arena-team.team-a .lane-total b { color: #9fe4ff; }
.arena-team.team-b .lane-total b { color: #cbb4ff; }
.arena-lane.is-team-winner {
  border-color: rgba(53, 211, 154, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.24), 0 26px 54px -34px rgba(53, 211, 154, 0.9);
}
.lane-verdict.team {
  color: #8bf3c9; background: rgba(53, 211, 154, 0.14); border: 1px solid rgba(53, 211, 154, 0.4);
}
.arena-result.win-a { border-color: rgba(58, 210, 255, 0.45); background: linear-gradient(90deg, rgba(58, 210, 255, 0.16), rgba(47, 107, 255, 0.08)); }
.arena-result.win-b { border-color: rgba(168, 120, 255, 0.5); background: linear-gradient(90deg, rgba(168, 120, 255, 0.18), rgba(120, 80, 220, 0.08)); }
.arena-result .result-note { margin-left: 6px; font-size: 0.68rem; color: #8fa3c4; }

@media (max-width: 1180px) {
  .arena-stage.is-teams { grid-template-columns: minmax(0, 1fr); }
  .arena-vs { height: 42px; }
}
@media (max-width: 620px) {
  .arena-team { grid-template-columns: minmax(0, 1fr); }
  .lane-reel-track { padding-left: calc(50% - 34px); }
}

/* item grids adapt to lane width instead of squeezing into fixed columns */
.lane-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
@media (min-width: 1181px) and (max-width: 1500px) {
  .arena-stage.is-teams { grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr); gap: 12px; }
  .lane-head .lane-avatar { width: 68px; height: 68px; }
}

/* keep full item names readable in narrow lanes */
.lane-item b {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  font-size: 0.72rem;
  display: block;
}
.lane-item { padding: 8px 6px 9px; }

/* promo hover: keep the art anchored. The old hover rule reset transform to
   none, which dropped the centring translate and made the artwork slide. */
.promo-card .promo-art { transition: none; }
.promo-card:hover .promo-art { transform: translateY(-50%); }
.promo-card:hover .promo-art img,
.promo-card:hover .promo-art picture,
.promo-card:hover .promo-art svg { transform: none; }

/* reel art paints from cached CSS backgrounds, so a cell is never blank */
.lane-reel-cell {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
  image-rendering: pixelated;
  opacity: 0.85;
}
.lane-reel-cell.is-final {
  background-size: 48px 48px;
  opacity: 1;
  filter: drop-shadow(0 0 14px var(--rarity));
  animation: reel-final 0.5s ease 0.95s both;
}

/* promo artwork slightly smaller so the copy has room */
.promo-art { width: 48%; max-width: 190px; }
@media (max-width: 900px) { .promo-art { width: 44%; max-width: 160px; } }

/* hero: the new banner artwork, blended onto the card so its black plate disappears */
.hero-art img {
  width: min(100%, 360px);
  max-width: none;
  mix-blend-mode: screen;
  filter: drop-shadow(0 24px 44px rgba(47, 107, 255, 0.45));
}

/* hero logo: plain cut-out artwork, no blend or mask tricks */
.hero-art img {
  width: min(100%, 340px);
  max-width: 340px;
  max-height: 340px;
  object-fit: contain;
  mix-blend-mode: normal;
  -webkit-mask-image: none;
  mask-image: none;
  filter: drop-shadow(0 22px 40px rgba(47, 107, 255, 0.4));
}

/* keep the whole wordmark visible: fit the artwork, never crop it */
.hero-art img {
  width: min(100%, 400px);
  max-width: 400px;
  max-height: none;
  aspect-ratio: 8 / 5;
  object-fit: contain;
}

/* extra pop so the blue reads as electric rather than washed out */
.hero-art img {
  filter: saturate(1.12) contrast(1.04) drop-shadow(0 24px 46px rgba(47, 107, 255, 0.5));
}
