:root {
  --bg: #08080b;
  --ink: #f4efe4;
  --mute: #9a9284;
  --line: rgba(244, 239, 228, 0.1);
  --gold: #d7b056;
  --gold-2: #f3dd9a;
  --panel: #121218;
  --danger: #e35a3c;
  --font-d: "Fraunces", Georgia, "Times New Roman", serif;
  --font-u: "Outfit", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --header-h: 118px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
body {
  font-family: var(--font-u);
  overflow-x: hidden;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% -10%, #2a211088, transparent 42%),
    radial-gradient(ellipse at 80% 120%, #1a0c0888, transparent 40%),
    var(--bg);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
input { font-size: 16px; }
.hidden, [hidden] { display: none !important; }

.grain,
.vignette,
.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}
.grain {
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette {
  z-index: 39;
  background: radial-gradient(ellipse at center, transparent 46%, #000 100%);
}
.fx { z-index: 50; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 12px 28px 10px;
  background: linear-gradient(#08080bf5, #08080bd8 78%, transparent);
  backdrop-filter: blur(12px);
}
.hud {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
  align-items: end;
  min-width: 0;
}
.hud-col { min-width: 0; }
.hud-col.pot { text-align: left; }
.hud-col.spins, .hud-col.take { text-align: left; }
.hud-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.hud-num {
  display: block;
  font-family: var(--font-d);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  line-height: 0.95;
  letter-spacing: 0;
}
.hud-col.pot .hud-num {
  font-size: clamp(44px, 6vw, 96px);
  color: var(--gold-2);
  text-shadow: 0 0 28px #d7b05655;
}
.hud-col.take .hud-num {
  font-size: clamp(28px, 3.2vw, 44px);
  color: var(--gold-2);
}
.hud-sub {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.hud-sub.net.up { color: #7dce8a; }
.hud-sub.net.down { color: #f0b2a4; }
.hud-sub.pending { color: var(--gold-2); }
.pips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
  margin: 8px 0 4px;
}
.pips i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), #d7b056;
  box-shadow: 0 0 8px #d7b05666;
}
.pips i.off { background: #2a2a30; box-shadow: none; }
.pips i.fall { animation: pipFall 180ms ease forwards; }
@keyframes pipFall {
  to { transform: translateY(10px); opacity: 0; }
}
.pips .many { font-family: var(--font-d); color: var(--gold-2); font-size: 22px; }
.brand-kicker {
  display: block;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mute);
}
.brand-name {
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: 0.2em;
  font-size: 16px;
}
.pot-readout { text-align: center; min-width: 280px; }
.pot-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.pot-value {
  display: block;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 72px);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--gold-2);
  text-shadow: 0 0 28px #d7b05655;
  line-height: 0.95;
}
.pot-readout.pulse .pot-value { animation: potPulse 0.7s ease; }
@keyframes potPulse {
  0% { transform: scale(1.08); filter: brightness(1.4); }
  100% { transform: none; filter: none; }
}
.drain {
  width: min(280px, 70vw);
  height: 4px;
  margin: 8px auto 6px;
  border-radius: 99px;
  background: #ffffff10;
  overflow: hidden;
}
.drain i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8a5a14, var(--gold-2));
  transition: width 0.45s ease;
}
.max-win {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.top-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.you-chip {
  display: flex;
  gap: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101016cc;
  font-size: 12px;
  color: var(--mute);
}
.you-chip b {
  color: var(--gold-2);
  font-family: var(--font-d);
  font-size: 16px;
  font-weight: 700;
}
.ghost {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--mute);
}
.link-dot {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.link-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #5a5348;
}
.link-dot[data-state="up"]::before { background: #7dce8a; box-shadow: 0 0 10px #7dce8a; }

main { width: min(1280px, calc(100% - 56px)); margin: 0 auto 80px; position: relative; z-index: 2; }

.gate { padding: 56px 0 80px; max-width: 680px; }
.gate-eyebrow {
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
}
.gate h1 {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(42px, 6.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 12px 0 20px;
}
.gate-copy { color: var(--mute); font-size: 17px; line-height: 1.55; max-width: 46ch; }
.join, .add {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  align-items: end;
}
.join label { display: grid; gap: 6px; }
.join span, .stake-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}
.join input, .add input {
  background: #0c0c10;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px;
  min-width: 160px;
  outline: none;
}
.join input:focus, .add input:focus { border-color: var(--gold); }
.enter, .add button, .spin, .stake button, .back { border: 0; }
.enter, .add button {
  background: linear-gradient(180deg, #f2d98a, #b8892a);
  color: #1a1204;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 22px;
  border-radius: 10px;
}

.you-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.you-name { margin: 0; font-family: var(--font-d); font-size: 26px; font-weight: 800; }
.you-meta { margin: 4px 0 0; color: var(--mute); font-size: 13px; }
.you-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: flex-end; }
.end, .dry-end {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--danger) 70%, var(--line));
  color: #f0b2a4;
  border-radius: 10px;
  padding: 15px 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.floor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

.machines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.machines li { grid-column: span 2; }
.machines li:nth-child(4) { grid-column: 2 / span 2; }
.machines li:nth-child(5) { grid-column: 4 / span 2; }

.machine-card {
  position: relative;
  min-height: 320px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 22px;
  padding: 22px 18px 18px;
  background:
    radial-gradient(circle at 50% 120%, var(--glow) 0%, transparent 58%),
    linear-gradient(180deg, #18181f, #0b0b10);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.machine-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.machine-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px #0008, 0 0 24px var(--glow);
}
.machine-card .preview {
  display: flex;
  justify-content: center;
  gap: 8px;
  height: 96px;
  align-items: center;
  margin: 8px 0 4px;
  filter: drop-shadow(0 10px 18px var(--glow));
}
.machine-card .preview img,
.machine-card .preview svg {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.machine-card h3 {
  font-family: var(--font-d);
  margin: 10px 0 4px;
  letter-spacing: 0.12em;
  font-size: 22px;
  font-weight: 800;
}
.machine-card p { margin: 0; color: var(--mute); font-size: 13px; line-height: 1.4; }
.machine-card .tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.machine-card.live::after {
  content: "LIVE";
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #fff;
}
.machine-card[data-id="velvet"] { --accent: #e2b04a; --glow: #6b1c2a66; }
.machine-card[data-id="crown"] { --accent: #f0d78c; --glow: #8a6a2066; }
.machine-card[data-id="relic"] { --accent: #d4a24a; --glow: #4a2a1066; }
.machine-card[data-id="aurora"] { --accent: #8fd4ee; --glow: #1a4a6a66; }
.machine-card[data-id="ember"] { --accent: #ff7a3a; --glow: #6a1c1066; }

.rail { display: grid; gap: 28px; }
.rail h2 {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  margin: 0 0 8px;
}
.players, .feed { list-style: none; margin: 0; padding: 0; }
.players li, .feed li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.players .off { color: var(--mute); }
.feed li { color: var(--mute); }

.machine {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1080px, calc(100% - 48px));
  margin: 8px auto 48px;
  padding: 8px 0 32px;
}
.machine[data-id="velvet"] { --accent: #e2b04a; --cabinet: #2a1016; --metal: #8a2a38; }
.machine[data-id="crown"] { --accent: #f0d78c; --cabinet: #1b160c; --metal: #c4a056; }
.machine[data-id="relic"] { --accent: #d4a24a; --cabinet: #1a140c; --metal: #8a6230; }
.machine[data-id="aurora"] { --accent: #8fd4ee; --cabinet: #07141c; --metal: #3d7a96; }
.machine[data-id="ember"] { --accent: #ff7a3a; --cabinet: #1a0b08; --metal: #c24a22; }

.back {
  align-self: flex-start;
  background: none;
  color: var(--mute);
  font-size: 13px;
  padding: 8px 0 12px;
}
.machine-head { text-align: center; margin-bottom: 12px; }
.machine-kicker {
  margin: 0;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--accent);
}
.machine-head h2 {
  font-family: var(--font-d);
  letter-spacing: 0.18em;
  margin: 6px 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
}
.machine-copy { margin: 0; color: var(--mute); font-size: 14px; }

.cabinet {
  width: min(980px, 100%);
  background:
    radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 50%),
    var(--cabinet);
  border: 1px solid color-mix(in srgb, var(--metal) 70%, #000);
  box-shadow: 0 30px 80px #000c, inset 0 1px 0 #fff2;
  border-radius: 28px;
  padding: 26px 22px 20px;
}
.cabinet.slam { animation: slam 0.45s ease; }
@keyframes slam {
  0% { transform: translateY(0); }
  35% { transform: translateY(6px) scale(1.01); }
  100% { transform: none; }
}
.window {
  position: relative;
  background: #070709;
  border-radius: 16px;
  overflow: hidden;
  height: 336px;
  box-shadow: inset 0 0 0 1px #ffffff0f, inset 0 40px 80px #0008;
}
.reels {
  display: grid;
  height: 100%;
  gap: 3px;
  background: #000;
}
.reel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(#1a1a20, #0a0a0c 12%, #0a0a0c 88%, #1a1a20);
}
.strip { will-change: transform; }
.cell {
  height: 112px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #ffffff08;
}
.cell img.sym,
.cell svg {
  width: 78px;
  height: 78px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px #0008);
}
.cell.hit img.sym,
.cell.hit svg { animation: hitPop 0.55s ease; }
@keyframes hitPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); filter: brightness(1.4) drop-shadow(0 0 16px var(--accent)); }
  100% { transform: scale(1); }
}
.payline {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 112px;
  transform: translateY(-50%);
  border-top: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: inset 0 0 40px color-mix(in srgb, var(--accent) 18%, transparent);
  pointer-events: none;
  z-index: 2;
}
.shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fff2, transparent 22%, transparent 78%, #0006);
  pointer-events: none;
  z-index: 3;
}
.window.win .payline { animation: lineWin 0.55s ease; }
@keyframes lineWin {
  0%, 100% { box-shadow: inset 0 0 40px color-mix(in srgb, var(--accent) 18%, transparent); }
  50% { box-shadow: inset 0 0 80px color-mix(in srgb, var(--accent) 70%, transparent); }
}

.machine-wallet {
  margin: 12px 0 0;
  color: var(--gold-2);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-align: center;
}
.spin-status {
  min-height: 28px;
  margin: 10px 0 0;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  text-align: center;
}
.console {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
}
.stake {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0c0c10;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
}
.stake button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #18181f;
  color: var(--ink);
}
.stake-value {
  display: block;
  font-family: var(--font-d);
  font-size: 22px;
  min-width: 72px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.spin {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff6, transparent 40%),
    linear-gradient(180deg, #f6de96, #8a5a14);
  color: #1a1204;
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: 0.16em;
  box-shadow: 0 12px 30px #0008, inset 0 1px 0 #fff8;
  transition: transform 0.12s ease;
}
.spin:hover { transform: scale(1.04); }
.spin:active { transform: scale(0.96); }
.spin:disabled { opacity: 0.45; transform: none; cursor: default; }
.spin span { font-size: 11px; letter-spacing: 0.06em; line-height: 1.15; padding: 0 10px; }
img.sym.cast {
  filter: drop-shadow(2px 3px 0 #0008) drop-shadow(-1px -1px 0 #f3dd9a44) drop-shadow(0 8px 10px #0008);
}

.dry {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  text-align: center;
  background: #070708;
  padding: 24px;
}
.dry-kicker {
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--danger);
  font-size: 11px;
}
.dry h2 {
  font-family: var(--font-d);
  font-size: clamp(36px, 7vw, 72px);
  margin: 8px 0 12px;
  font-weight: 800;
}
.dry p { color: var(--mute); max-width: 42ch; }
.dry-add { justify-content: center; }
.dry-end { margin-top: 16px; }

.settle {
  position: fixed;
  inset: 0;
  z-index: 61;
  overflow-y: auto;
  padding: 28px 16px calc(32px + var(--safe-b));
  background: #070708;
}
.settle-kicker {
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 11px;
  text-align: center;
}
.settle h2 {
  font-family: var(--font-d);
  font-size: clamp(32px, 7vw, 64px);
  margin: 8px 0 12px;
  text-align: center;
  font-weight: 800;
}
.settle-sum { color: var(--mute); text-align: center; max-width: 42ch; margin: 0 auto 20px; }
.give {
  list-style: none;
  margin: 0 auto 24px;
  padding: 0;
  max-width: 560px;
}
.give li {
  font-family: var(--font-d);
  font-size: clamp(20px, 4vw, 28px);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.sheet {
  width: min(640px, 100%);
  margin: 0 auto 28px;
  border-collapse: collapse;
  font-size: 14px;
}
.sheet th, .sheet td {
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.sheet th:first-child, .sheet td:first-child { text-align: left; }
.sheet .up { color: #7dce8a; }
.sheet .down { color: #f0b2a4; }
.settle .enter { display: block; margin: 0 auto; }
.cards { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 80;
  background: #16161c;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .floor-grid { grid-template-columns: 1fr; }
  .machines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .machines li,
  .machines li:nth-child(4),
  .machines li:nth-child(5) { grid-column: auto; }
  .machines li:last-child { grid-column: 1 / -1; }
  .rail { grid-template-columns: 1fr 1fr; display: grid; }
}

.table-strip {
  position: sticky;
  top: auto;
  z-index: 18;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 10px;
  scrollbar-width: none;
}
.table-strip::-webkit-scrollbar { display: none; }
.seat {
  flex: 0 0 220px;
  background: #101016cc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
}
.seat b { display: block; font-family: var(--font-d); font-size: 15px; }
.seat .seat-meta { color: var(--mute); font-size: 12px; }
.seat .seat-net.up { color: #7dce8a; }
.seat .seat-net.down { color: #f0b2a4; }
.seat.you { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.seat.spinning { box-shadow: 0 0 0 1px var(--gold), 0 0 16px #d7b05655; animation: seatPulse 1.1s ease infinite; }
.seat.out { opacity: 0.55; }
.seat.dropped { opacity: 0.45; }
@keyframes seatPulse {
  50% { box-shadow: 0 0 0 1px var(--gold-2), 0 0 22px #d7b05688; }
}
@media (min-width: 1101px) {
  .table-strip {
    position: fixed;
    top: 148px;
    right: 16px;
    width: 240px;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100dvh - 180px);
    padding: 0;
  }
  .seat { flex: none; width: 240px; }
  .machine { margin-right: 268px; }
}

.gate-once { color: var(--gold-2); font-size: 15px; line-height: 1.5; max-width: 48ch; }

.cell.row-off { opacity: 0.55; filter: blur(1px); }
.cell.row-pay { opacity: 1; filter: none; }
.cell .coin-pip {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #d7b056);
  box-shadow: 0 0 8px #d7b056;
}
.cell { position: relative; }

.spin { position: relative; }
.spin .ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #1a1204;
  opacity: 0;
}
.spin.waiting .ring { opacity: 1; animation: spinWait 1s linear infinite; }
@keyframes spinWait { to { transform: rotate(360deg); } }

.celebrate {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  text-align: center;
  background: #000000e0;
  padding: 24px;
}
.celebrate.small { background: #00000099; }
.celebrate.small .cele-amount { font-size: clamp(56px, 10vw, 96px); }
.celebrate.big { background: #000000cc; }
.celebrate.huge, .celebrate.kill { background: #000000f0; }
.cele-kicker {
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 14px;
  margin: 0;
}
.cele-name { margin: 8px 0 0; color: var(--mute); letter-spacing: 0.16em; text-transform: uppercase; }
.cele-amount {
  font-family: var(--font-d);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: clamp(72px, 14vw, 160px);
  line-height: 0.9;
  margin: 8px 0;
  color: var(--gold-2);
  text-shadow: 0 0 40px #d7b05688;
}
.cele-line { color: var(--ink); letter-spacing: 0.08em; text-transform: uppercase; max-width: 28ch; }

.bonus {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  background: #070708f0;
  padding: 20px;
  text-align: center;
}
.bonus-cap {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 13px;
}
.bonus-body { width: min(560px, 100%); }
.cards-row { display: flex; justify-content: center; gap: 16px; margin: 20px 0; }
.pick {
  min-width: 120px;
  min-height: 72px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #3a1018, #1a080c);
  color: #f4efe4;
  font-family: var(--font-d);
  font-size: 22px;
  letter-spacing: 0.12em;
}
.pick.black { background: linear-gradient(180deg, #1a1a22, #08080c); }
.card-stage {
  perspective: 800px;
  height: 220px;
  display: grid;
  place-items: center;
  margin: 12px 0 4px;
}
.playing-card {
  width: 128px;
  height: 180px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.playing-card.flipped { transform: rotateY(180deg); }
.playing-card .face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px #000a;
}
.playing-card .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playing-card .front { transform: rotateY(180deg); }
.rain-coin {
  position: absolute;
  top: -40px;
  width: 36px;
  height: 36px;
  pointer-events: none;
  animation: coinFall 1.1s ease-in forwards;
}
@keyframes coinFall {
  to { transform: translateY(110vh) rotate(220deg); opacity: 0.2; }
}
.thaw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px auto;
  width: min(360px, 100%);
}
.thaw-grid button {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #123044;
  color: #dff;
  font-family: var(--font-d);
  font-size: 18px;
}
.thaw-grid button.open { background: #0c0c10; }
.hold-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 16px auto;
  width: min(420px, 100%);
}
.hold-grid span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #1a160c;
  border: 1px solid #c4a05666;
  font-size: 12px;
}
.hold-grid .locked { background: #3a2a10; color: var(--gold-2); }
.forge-mult {
  font-family: var(--font-d);
  font-size: 72px;
  color: #ff7a3a;
  margin: 0;
}

body.shake-small { animation: shakeS 0.25s ease; }
body.shake-big { animation: shakeB 0.45s ease; }
body.shake-huge { animation: shakeH 0.7s ease; }
@keyframes shakeS {
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
}
@keyframes shakeB {
  15% { transform: translate(-4px, 2px); }
  35% { transform: translate(5px, -2px); }
  55% { transform: translate(-3px, 2px); }
  75% { transform: translate(3px, -1px); }
}
@keyframes shakeH {
  10% { transform: translate(-8px, 3px) rotate(-0.4deg); }
  25% { transform: translate(9px, -4px) rotate(0.4deg); }
  40% { transform: translate(-7px, 3px); }
  60% { transform: translate(6px, -2px); }
  80% { transform: translate(-3px, 1px); }
}

@media (max-width: 720px) {
  .grain, .vignette { display: none; }
  .top { backdrop-filter: none; background: #08080bf2; }
  .cell.row-off { filter: none; opacity: 0.5; }
  .cabinet { box-shadow: 0 8px 20px #0008; }
  img.sym.cast { filter: none; }
  main { width: calc(100% - 20px); margin-bottom: 28px; }
  .top {
    grid-template-columns: 1fr;
    padding: 10px 12px 8px;
    gap: 8px;
  }
  .hud { grid-template-columns: 1fr 1fr; }
  .hud-col.pot { grid-column: 1 / -1; }
  .hud-col.pot .hud-num { font-size: 44px; }
  .pips { gap: 3px; }
  .pips i { width: 9px; height: 9px; }
  .top-tools { justify-content: space-between; }
  .you-chip { display: none; }
  .brand-kicker { display: none; }
  .brand-name { font-size: 12px; letter-spacing: 0.14em; }
  .ghost { padding: 8px 10px; }
  .gate { padding: 16px 0 40px; }
  .gate h1 { font-size: 34px; letter-spacing: 0; }
  .gate-copy { font-size: 15px; }
  .join, .add, .you-actions { flex-direction: column; align-items: stretch; }
  .join input, .add input { min-width: 0; width: 100%; }
  .enter, .add button, .end { width: 100%; min-height: 48px; }
  .you-bar { flex-direction: column; align-items: stretch; padding-bottom: 16px; margin-bottom: 16px; }
  .machines { grid-template-columns: 1fr; gap: 10px; }
  .machines li:last-child { grid-column: auto; }
  .machine-card { min-height: 0; padding: 14px 14px 12px; }
  .machine-card .preview { height: 64px; }
  .machine-card .preview img,
  .machine-card .preview svg { width: 44px; height: 44px; }
  .machine-card p { display: none; }
  .machine-card h3 { font-size: 18px; margin-top: 4px; }
  .rail { grid-template-columns: 1fr; }
  .machine {
    position: relative;
    width: calc(100% - 16px);
    margin: 0 auto 24px;
    padding: 4px 0 24px;
  }
  .back { min-height: 40px; padding: 8px 0; }
  .machine-head { margin-bottom: 4px; }
  .machine-head h2 { font-size: 26px; letter-spacing: 0.08em; }
  .machine-copy { display: none; }
  .cabinet { padding: 12px 8px; border-radius: 18px; }
  .window { height: 210px; }
  .cell { height: 70px; }
  .cell img.sym, .cell svg { width: 46px; height: 46px; }
  .payline { height: 70px; }
  .console {
    position: sticky;
    bottom: 0;
    z-index: 12;
    margin: 12px 0 0;
    padding: 10px 8px calc(10px + var(--safe-b));
    gap: 12px;
    background: linear-gradient(180deg, transparent, #08080b 24%);
  }
  .spin { width: 80px; height: 80px; }
  .stake { padding: 6px 8px; }
  .stake button { width: 44px; height: 44px; }
  .dry, .settle { padding: 20px 14px calc(28px + var(--safe-b)); }
  .sheet { font-size: 12px; display: none; }
  .give { display: none; }
  .cards { display: grid; gap: 10px; margin: 0 0 24px; }
  .card {
    background: #101014;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
  }
  .card b { display: block; font-family: var(--font-d); font-size: 20px; margin-bottom: 6px; }
  .card span { color: var(--mute); font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .machine-card:hover { transform: none; }
  .cabinet.slam, .pot-readout.pulse .pot-value, .cell.hit img.sym { animation: none; }
}
