:root {
  color-scheme: dark;
  --ink: #fbf7ec;
  --muted: #b9a991;
  --line: rgba(255, 255, 255, .15);
  --panel: rgba(16, 12, 15, .82);
  --panel-strong: rgba(28, 18, 22, .94);
  --gold: #f0c96a;
  --gold-deep: #9f6f25;
  --red: #d64352;
  --black: #11131b;
  --green: #22b978;
  --felt: #0f7656;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 14%, rgba(240, 201, 106, .18), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(214, 67, 82, .16), transparent 26%),
    linear-gradient(145deg, #050507, #171018 48%, #07090d);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
}

.is-hidden {
  display: none !important;
}

.gate {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(240, 201, 106, .06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(240, 201, 106, .05) 1px, transparent 1px),
    radial-gradient(circle at 50% 36%, #2b1722, #09090d 70%);
  background-size: 46px 46px, 46px 46px, auto;
}

.marquee {
  display: flex;
  justify-content: center;
  gap: 34px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(240, 201, 106, .24);
  background: rgba(0, 0, 0, .34);
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.gate-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 30px;
}

.gate-glow {
  position: absolute;
  width: min(760px, 82vw);
  aspect-ratio: 1.7;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 201, 106, .24), transparent 68%);
  filter: blur(6px);
}

.sign {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  width: min(780px, 100%);
  padding: clamp(24px, 6vw, 52px);
  border: 1px solid rgba(240, 201, 106, .34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)),
    rgba(10, 8, 12, .72);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.eyebrow {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.sign h1 {
  color: #fff4ca;
  font-size: clamp(58px, 12vw, 126px);
  line-height: .96;
  text-shadow:
    0 0 12px rgba(240, 201, 106, .58),
    0 10px 24px rgba(0, 0, 0, .6);
}

.sign p {
  color: var(--muted);
  font-size: clamp(16px, 2.8vw, 22px);
}

.door {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 16px;
  margin-top: -14px;
}

.door-light {
  width: 190px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(240, 201, 106, .8), transparent 68%);
  filter: blur(8px);
}

#enter-button {
  min-width: 220px;
  min-height: 60px;
  padding: 0 24px;
  border-color: rgba(240, 201, 106, .72);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe08a, #b57d28);
  color: #190f05;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .38);
}

.gate-people {
  position: absolute;
  inset: auto 0 34px;
  display: flex;
  justify-content: center;
  gap: clamp(24px, 8vw, 110px);
  opacity: .9;
}

.tiny-person,
.guest {
  position: relative;
  width: 58px;
  height: 92px;
}

.tiny-person::before,
.guest::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d7ad84;
  transform: translateX(-50%);
}

.tiny-person::after,
.guest::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 52px;
  height: 62px;
  border-radius: 22px 22px 8px 8px;
  background: #392532;
  transform: translateX(-50%);
}

.p2::after,
.g2::after,
.g6::after {
  background: #263858;
}

.p3::after,
.g4::after {
  background: #5b2630;
}

.p4::after,
.g5::after {
  background: #214937;
}

.app {
  display: grid;
  grid-template-columns: minmax(680px, 1fr) 374px;
  gap: 18px;
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.casino-floor,
.topbar,
.stage,
.controls,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.casino-floor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100vh - 36px);
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(circle at 50% 35%, rgba(34, 185, 120, .22), rgba(7, 9, 13, .84));
  background-size: 42px 42px, 42px 42px, auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(240, 201, 106, .54);
  border-radius: 50%;
  background: radial-gradient(circle, #4a2815, #100a08);
  color: var(--gold);
  font-weight: 950;
}

.topbar p,
.bankroll-card span,
.zero-rule,
.warning-panel p,
.sim-output span,
.stats span {
  color: var(--muted);
  font-size: 13px;
}

.bankroll-card {
  display: grid;
  gap: 3px;
  min-width: 170px;
  padding: 10px 12px;
  border: 1px solid rgba(240, 201, 106, .45);
  border-radius: 8px;
  background: rgba(0, 0, 0, .25);
  text-align: right;
}

.bankroll-card strong {
  color: var(--gold);
  font-size: 25px;
}

.sound-toggle {
  display: inline-grid;
  grid-template-columns: 22px auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-color: rgba(240, 201, 106, .38);
  border-radius: 8px;
  background: rgba(0, 0, 0, .25);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.sound-toggle.is-on {
  border-color: rgba(240, 201, 106, .68);
  color: var(--gold);
  background: rgba(240, 201, 106, .12);
}

.sound-icon {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 18px;
}

.sound-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 7px;
  height: 8px;
  border-radius: 2px 0 0 2px;
  background: currentColor;
  box-shadow: 6px -4px 0 -1px currentColor, 6px 4px 0 -1px currentColor;
}

.sound-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 2px;
  width: 10px;
  height: 12px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 0 999px 999px 0;
  opacity: .85;
}

.sound-toggle:not(.is-on) .sound-icon::after {
  top: 8px;
  right: 0;
  width: 16px;
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-42deg);
}

.evidence-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(240, 201, 106, .34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 201, 106, .13), rgba(34, 185, 120, .07)),
    rgba(5, 8, 10, .62);
  box-shadow: inset 0 0 28px rgba(240, 201, 106, .06);
}

.evidence-strip span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
}

.evidence-strip strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.evidence-strip p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.evidence-strip a {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(240, 201, 106, .54);
  border-radius: 8px;
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(240, 201, 106, .1);
}

.stage {
  position: relative;
  display: grid;
  grid-template-rows: 92px auto;
  flex: 1;
  min-height: 540px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(240, 201, 106, .2), transparent 36%),
    linear-gradient(180deg, rgba(92, 32, 48, .44), rgba(7, 12, 16, .86));
}

.audience {
  display: flex;
  align-items: end;
  justify-content: space-around;
  padding: 18px 24px 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .28), transparent);
}

.guest {
  width: 50px;
  height: 76px;
  opacity: .82;
}

.guest::before {
  width: 28px;
  height: 28px;
}

.guest::after {
  width: 46px;
  height: 48px;
}

.guest span {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 13px;
  width: 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  box-shadow: 13px 0 0 rgba(0, 0, 0, .55);
}

.dealer-zone {
  position: absolute;
  z-index: 5;
  top: 74px;
  left: 50%;
  display: grid;
  place-items: center;
  gap: 10px;
  width: 260px;
  transform: translateX(-50%);
  pointer-events: none;
}

.dealer {
  position: relative;
  width: 120px;
  height: 156px;
  --dealer-scale: 1;
  --dealer-talk-scale: 1.02;
  --skin: #d7ad84;
  --skin-shadow: #bd855e;
  --hair: #151018;
  --eye: #1b1715;
  --mouth: #64252b;
  --jacket: #171921;
  --lapel: rgba(255, 255, 255, .1);
  --shirt: #f6efe1;
  --bow: var(--red);
  --dealer-glow: rgba(240, 201, 106, .18);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .32));
  transform: scale(var(--dealer-scale));
  transform-origin: top center;
  transition: filter .22s ease, transform .22s ease;
}

.dealer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 112px;
  height: 128px;
  border-radius: 999px 999px 28px 28px;
  background: radial-gradient(circle at 50% 12%, var(--dealer-glow), transparent 64%);
  transform: translateX(-50%);
  opacity: .85;
}

.dealer::after {
  content: "";
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 42px;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, .56);
  border-radius: 50%;
  background: var(--bow);
  box-shadow: 0 0 12px var(--dealer-glow);
}

.dealer-head {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  width: 72px;
  height: 78px;
  transform: translateX(-50%);
}

.dealer-head .face {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60px;
  height: 62px;
  border-radius: 42% 42% 48% 48%;
  background: linear-gradient(145deg, var(--skin) 0%, var(--skin-shadow) 100%);
  box-shadow: inset 8px -10px 0 rgba(0, 0, 0, .08);
  transform: translateX(-50%);
}

.dealer-head .face::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 27px;
  width: 7px;
  height: 4px;
  border-radius: 999px;
  background: var(--eye);
  box-shadow: 20px 0 0 var(--eye);
  transition: all .18s ease;
}

.dealer-head .face::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 20px;
  height: 7px;
  border-bottom: 3px solid var(--mouth);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: all .18s ease;
}

.dealer-head .hair {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  width: 68px;
  height: 28px;
  border-radius: 28px 28px 10px 10px;
  background: var(--hair);
  box-shadow: inset -10px -6px 0 rgba(255, 255, 255, .07);
  transform: translateX(-50%);
}

.dealer-body {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: 112px;
  height: 92px;
  border-radius: 32px 32px 12px 12px;
  background:
    linear-gradient(115deg, transparent 0 45%, var(--shirt) 46% 54%, transparent 55%),
    linear-gradient(90deg, var(--lapel) 0 20%, transparent 21% 79%, var(--lapel) 80%),
    var(--jacket);
  box-shadow: inset 0 -16px 0 rgba(0, 0, 0, .16), 0 0 18px var(--dealer-glow);
  transform: translateX(-50%);
}

.bowtie {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 34px;
  height: 16px;
  background: var(--bow);
  clip-path: polygon(0 0, 43% 50%, 0 100%, 100% 100%, 57% 50%, 100% 0);
  transform: translateX(-50%);
}

.dealer-hands {
  position: absolute;
  left: 14px;
  bottom: 22px;
  width: 92px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--skin-shadow), var(--skin), var(--skin-shadow));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1);
}

.dealer-classic {
  --skin: #d7ad84;
  --skin-shadow: #bd855e;
  --hair: #151018;
  --jacket: #171921;
  --shirt: #f6efe1;
  --bow: #cf2935;
  --dealer-glow: rgba(240, 201, 106, .18);
}

.dealer-gold {
  --skin: #c99569;
  --skin-shadow: #a87048;
  --hair: #2a1a0f;
  --jacket: #5f4215;
  --shirt: #fff0bd;
  --bow: #f0c96a;
  --dealer-glow: rgba(240, 201, 106, .35);
}

.dealer-red {
  --skin: #e2b28b;
  --skin-shadow: #c68b65;
  --hair: #211018;
  --jacket: #7d1824;
  --shirt: #fff3ec;
  --bow: #111827;
  --dealer-glow: rgba(207, 41, 53, .35);
}

.dealer-blue {
  --skin: #cf9f79;
  --skin-shadow: #ad7657;
  --hair: #0f172a;
  --jacket: #123a63;
  --shirt: #eef7ff;
  --bow: #57c7ff;
  --dealer-glow: rgba(87, 199, 255, .3);
}

.dealer-green {
  --skin: #d9a37a;
  --skin-shadow: #b87953;
  --hair: #182116;
  --jacket: #174c34;
  --shirt: #f3ffe9;
  --bow: #8bdc65;
  --dealer-glow: rgba(139, 220, 101, .27);
}

.dealer-purple {
  --skin: #d0a07f;
  --skin-shadow: #a9785d;
  --hair: #1f1531;
  --jacket: #4b286d;
  --shirt: #fff1fb;
  --bow: #ff77c8;
  --dealer-glow: rgba(255, 119, 200, .26);
}

.dealer-white {
  --skin: #e4b890;
  --skin-shadow: #c8946f;
  --hair: #2e2a2a;
  --jacket: #e7e2d7;
  --lapel: rgba(0, 0, 0, .08);
  --shirt: #141414;
  --bow: #f0c96a;
  --dealer-glow: rgba(255, 255, 255, .28);
}

.dealer-shadow {
  --skin: #b58b72;
  --skin-shadow: #80604f;
  --hair: #050505;
  --jacket: #090b10;
  --shirt: #cbd5e1;
  --bow: #cf2935;
  --dealer-glow: rgba(148, 163, 184, .22);
  filter: saturate(.75) drop-shadow(0 15px 20px rgba(0, 0, 0, .48));
}

.dealer-royal {
  --skin: #d8aa80;
  --skin-shadow: #b47b55;
  --hair: #3a2617;
  --jacket: #24306f;
  --shirt: #fdf2d2;
  --bow: #d8b44b;
  --dealer-glow: rgba(107, 126, 255, .3);
}

.dealer-neon {
  --skin: #d29c78;
  --skin-shadow: #9f6d51;
  --hair: #101022;
  --jacket: #102338;
  --shirt: #f1fbff;
  --bow: #36f1cf;
  --dealer-glow: rgba(54, 241, 207, .34);
}

.dealer-velvet {
  --skin: #c88e70;
  --skin-shadow: #9f6650;
  --hair: #261011;
  --jacket: #5b1321;
  --shirt: #ffe9d5;
  --bow: #f08a5d;
  --dealer-glow: rgba(240, 138, 93, .28);
}

.dealer-mint {
  --skin: #d6aa86;
  --skin-shadow: #b47d5d;
  --hair: #24352d;
  --jacket: #1f5d55;
  --shirt: #effff9;
  --bow: #a7f3d0;
  --dealer-glow: rgba(167, 243, 208, .3);
}

.dealer-midnight {
  --skin: #b98d76;
  --skin-shadow: #876252;
  --hair: #111827;
  --jacket: #101827;
  --shirt: #dbeafe;
  --bow: #93c5fd;
  --dealer-glow: rgba(147, 197, 253, .25);
}

.dealer-sunset {
  --skin: #e0a47a;
  --skin-shadow: #ba704f;
  --hair: #351c17;
  --jacket: #8d3b25;
  --shirt: #fff7dc;
  --bow: #f6ad55;
  --dealer-glow: rgba(246, 173, 85, .29);
}

.dealer-ice {
  --skin: #d6b39d;
  --skin-shadow: #af8974;
  --hair: #d9f3ff;
  --eye: #0f172a;
  --jacket: #dceeff;
  --lapel: rgba(15, 23, 42, .08);
  --shirt: #102033;
  --bow: #38bdf8;
  --dealer-glow: rgba(125, 211, 252, .33);
}

.dealer-lime {
  --skin: #d8a477;
  --skin-shadow: #ad744f;
  --hair: #202414;
  --jacket: #4d6f18;
  --shirt: #fbffe8;
  --bow: #bef264;
  --dealer-glow: rgba(190, 242, 100, .32);
}

.dealer-pink {
  --skin: #ddb092;
  --skin-shadow: #bf846a;
  --hair: #321827;
  --jacket: #7a285c;
  --shirt: #fff0f7;
  --bow: #ff9ccf;
  --dealer-glow: rgba(255, 156, 207, .3);
}

.dealer-copper {
  --skin: #c98e68;
  --skin-shadow: #945a3f;
  --hair: #301b12;
  --jacket: #6b3c20;
  --shirt: #fff3df;
  --bow: #e87936;
  --dealer-glow: rgba(232, 121, 54, .28);
}

.dealer-silver {
  --skin: #cfad96;
  --skin-shadow: #9f7a65;
  --hair: #c8ced6;
  --eye: #111827;
  --jacket: #4b5563;
  --shirt: #f8fafc;
  --bow: #d1d5db;
  --dealer-glow: rgba(209, 213, 219, .3);
}

.dealer-cyan {
  --skin: #d19d7c;
  --skin-shadow: #a97054;
  --hair: #0f2933;
  --jacket: #075466;
  --shirt: #ecfeff;
  --bow: #22d3ee;
  --dealer-glow: rgba(34, 211, 238, .32);
}

.dealer-blackjack {
  --skin: #d3a17e;
  --skin-shadow: #a9785a;
  --hair: #17120d;
  --jacket: #16120f;
  --shirt: #fef3c7;
  --bow: #facc15;
  --dealer-glow: rgba(250, 204, 21, .28);
}

.dealer-gold .dealer-head .hair,
.dealer-royal .dealer-head .hair,
.dealer-silver .dealer-head .hair {
  height: 32px;
  border-radius: 24px 24px 14px 14px;
}

.dealer-neon .dealer-body,
.dealer-cyan .dealer-body {
  outline: 1px solid rgba(255, 255, 255, .18);
}

.dealer-white .dealer-body,
.dealer-ice .dealer-body {
  color: #111827;
}

.dealer.is-talking {
  transform: translateY(-2px) scale(var(--dealer-talk-scale));
}

.face-smug .dealer-head .face::after {
  width: 22px;
  height: 8px;
  border-bottom-width: 3px;
  transform: translateX(-50%) rotate(-7deg);
}

.face-neutral .dealer-head .face::after {
  bottom: 16px;
  width: 18px;
  height: 3px;
  border-bottom: 0;
  border-radius: 999px;
  background: var(--mouth);
}

.face-half .dealer-head .face::before {
  top: 28px;
  width: 10px;
  height: 3px;
  box-shadow: 18px 1px 0 var(--eye);
}

.face-half .dealer-head .face::after {
  width: 18px;
  transform: translateX(-50%) rotate(4deg);
}

.face-focus .dealer-head .face::before {
  top: 25px;
  width: 9px;
  height: 5px;
  box-shadow: 20px 0 0 var(--eye);
}

.face-focus .dealer-head .face::after {
  bottom: 14px;
  width: 17px;
  height: 3px;
  border-bottom: 0;
  border-radius: 999px;
  background: var(--mouth);
}

.face-shock .dealer-head .face::before {
  top: 25px;
  width: 7px;
  height: 7px;
  box-shadow: 20px 0 0 var(--eye);
}

.face-shock .dealer-head .face::after {
  bottom: 10px;
  width: 12px;
  height: 14px;
  border: 3px solid var(--mouth);
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.face-grin .dealer-head .face::after {
  bottom: 11px;
  width: 28px;
  height: 13px;
  border-bottom: 4px solid var(--mouth);
  border-radius: 0 0 999px 999px;
}

.face-deadpan .dealer-head .face::before {
  top: 29px;
  width: 11px;
  height: 2px;
  box-shadow: 18px 0 0 var(--eye);
}

.face-deadpan .dealer-head .face::after {
  bottom: 16px;
  width: 22px;
  height: 2px;
  border-bottom: 0;
  border-radius: 999px;
  background: var(--mouth);
}

.dealer-bubble {
  max-width: 260px;
  padding: 9px 12px;
  border: 1px solid rgba(240, 201, 106, .36);
  border-radius: 8px;
  background: rgba(0, 0, 0, .45);
  color: #fff2c4;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.table {
  align-self: end;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) 300px;
  gap: 18px;
  align-items: center;
  min-height: 420px;
  margin: 128px 22px 22px;
  padding: 26px;
  border: 8px solid #4f2c16;
  border-radius: 48% 48% 8px 8px / 34% 34% 8px 8px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .13), transparent 28%),
    linear-gradient(180deg, #14916a, #0c5d45);
  box-shadow:
    inset 0 0 0 2px rgba(240, 201, 106, .28),
    0 28px 70px rgba(0, 0, 0, .5);
}

.wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 350px;
}

.pointer {
  position: absolute;
  top: 0;
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-bottom: 34px solid var(--gold);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .45));
}

.wheel {
  position: relative;
  display: grid;
  place-items: center;
  width: min(350px, 62vw);
  aspect-ratio: 1;
  border: 14px solid #21160a;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      #0ca66c 0 9.73deg,
      #bf3042 9.73deg 19.46deg,
      #111721 19.46deg 29.19deg,
      #bf3042 29.19deg 38.92deg,
      #111721 38.92deg 48.65deg,
      #bf3042 48.65deg 58.38deg,
      #111721 58.38deg 68.11deg,
      #bf3042 68.11deg 77.84deg,
      #111721 77.84deg 87.57deg,
      #bf3042 87.57deg 97.3deg,
      #111721 97.3deg 107.03deg,
      #bf3042 107.03deg 116.76deg,
      #111721 116.76deg 126.49deg,
      #bf3042 126.49deg 136.22deg,
      #111721 136.22deg 145.95deg,
      #bf3042 145.95deg 155.68deg,
      #111721 155.68deg 165.41deg,
      #bf3042 165.41deg 175.14deg,
      #111721 175.14deg 184.87deg,
      #bf3042 184.87deg 194.6deg,
      #111721 194.6deg 204.33deg,
      #bf3042 204.33deg 214.06deg,
      #111721 214.06deg 223.79deg,
      #bf3042 223.79deg 233.52deg,
      #111721 233.52deg 243.25deg,
      #bf3042 243.25deg 252.98deg,
      #111721 252.98deg 262.71deg,
      #bf3042 262.71deg 272.44deg,
      #111721 272.44deg 282.17deg,
      #bf3042 282.17deg 291.9deg,
      #111721 291.9deg 301.63deg,
      #bf3042 301.63deg 311.36deg,
      #111721 311.36deg 321.09deg,
      #bf3042 321.09deg 330.82deg,
      #111721 330.82deg 340.55deg,
      #bf3042 340.55deg 350.28deg,
      #111721 350.28deg 360deg
    );
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, .08),
    inset 0 0 38px rgba(0, 0, 0, .58),
    0 28px 60px rgba(0, 0, 0, .45);
  transition: transform 1.7s cubic-bezier(.13, .74, .16, 1);
}

.wheel-ring {
  position: absolute;
  inset: 42px;
  border: 2px dashed rgba(255, 255, 255, .32);
  border-radius: 50%;
}

.ball-track {
  position: absolute;
  z-index: 4;
  inset: 18px;
  border-radius: 50%;
  transition: transform 1.85s cubic-bezier(.08, .84, .13, 1);
  transform: rotate(0deg);
}

.roulette-ball {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0 22%, #e7e0cd 36%, #9d9282 100%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .28),
    0 7px 12px rgba(0, 0, 0, .58);
  transform: translateX(-50%);
}

.wheel.is-spinning .roulette-ball {
  animation: ball-bounce .22s linear infinite;
}

@keyframes ball-bounce {
  0%,
  100% {
    top: 8px;
  }
  50% {
    top: 14px;
  }
}

.wheel-center {
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 43%;
  aspect-ratio: 1;
  border: 8px solid rgba(240, 201, 106, .82);
  border-radius: 50%;
  background: radial-gradient(circle, #2b3340, #080b10 72%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .5);
}

.wheel-center span {
  font-size: clamp(52px, 8vw, 78px);
  line-height: 1;
  font-weight: 950;
}

.wheel-center strong {
  color: var(--gold);
  font-size: 15px;
}

.spin-panel {
  display: grid;
  gap: 12px;
}

.result-card {
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid rgba(240, 201, 106, .42);
  border-radius: 8px;
  background: rgba(13, 8, 6, .42);
}

.result-card span {
  color: var(--muted);
  font-size: 13px;
}

.result-card strong {
  align-self: center;
  color: var(--gold);
  font-size: 21px;
}

.spin-button,
.primary {
  border-color: rgba(240, 201, 106, .72);
  background: linear-gradient(180deg, #ffe08a, #a86f21);
  color: #170e04;
  font-weight: 950;
}

.spin-button {
  min-height: 66px;
  border-radius: 8px;
  font-size: 24px;
}

.zero-rule {
  line-height: 1.5;
}

.bet-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bet-spot {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
}

.bet-spot span {
  font-weight: 950;
  font-size: 28px;
}

.bet-spot strong {
  color: var(--muted);
  font-size: 14px;
}

.bet-spot em {
  align-self: end;
  font-style: normal;
  color: var(--gold);
  font-weight: 950;
  font-size: 22px;
}

.bet-spot.odd {
  border-color: rgba(214, 67, 82, .7);
}

.bet-spot.even {
  border-color: rgba(255, 255, 255, .28);
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.affiliate-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(240, 201, 106, .28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 201, 106, .12), rgba(255, 255, 255, .03)),
    rgba(10, 8, 12, .72);
}

.affiliate-copy {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.affiliate-copy span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.affiliate-copy strong {
  font-size: 16px;
}

.coupang-banner {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.affiliate-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chips,
.action-row,
.strategy-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips button,
.action-row button,
.strategy-row button,
.wide {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 850;
}

.chips button {
  position: relative;
  min-width: 72px;
  border-color: rgba(240, 201, 106, .42);
  background:
    radial-gradient(circle, rgba(255, 255, 255, .22) 0 28%, transparent 29%),
    linear-gradient(180deg, #412923, #160d0b);
}

.chips button.active,
.strategy-row button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240, 201, 106, .14);
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--panel-strong);
}

.warning-panel {
  border-color: rgba(214, 67, 82, .35);
  background:
    linear-gradient(135deg, rgba(214, 67, 82, .14), transparent),
    var(--panel-strong);
}

.warning-panel p {
  line-height: 1.55;
}

.panel-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(0, 0, 0, .32);
}

.wide {
  width: 100%;
}

.sim-output,
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sim-output > div,
.stats div {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
}

.sim-output strong,
.stats strong {
  color: var(--gold);
  font-size: 18px;
}

.strategy-guide {
  display: grid;
  gap: 8px;
}

.strategy-guide div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(240, 201, 106, .24);
  border-radius: 8px;
  background: rgba(240, 201, 106, .07);
}

.strategy-guide span,
.sim-tape span,
.method-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.strategy-guide strong {
  color: var(--ink);
  font-size: 13px;
}

.compare-output {
  grid-template-columns: 1fr;
}

.sim-output > .sim-arena {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.sim-race-head {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(240, 201, 106, .24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 201, 106, .1), rgba(255, 255, 255, .03)),
    rgba(0, 0, 0, .2);
}

.sim-race-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sim-race-head strong {
  color: var(--gold);
  font-size: 22px;
}

.sim-race-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.sim-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.sim-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width .08s linear;
}

.sim-live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sim-live-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
}

.sim-live-card.running {
  border-color: rgba(240, 201, 106, .38);
  box-shadow: inset 0 0 0 1px rgba(240, 201, 106, .06);
}

.sim-live-card.failed {
  border-color: rgba(214, 67, 82, .48);
}

.sim-live-card.survived {
  border-color: rgba(34, 185, 120, .48);
}

.sim-live-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.sim-live-card header span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.sim-live-card header strong {
  color: var(--gold);
  font-size: 12px;
  text-align: right;
}

.sim-ladder {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sim-chip {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, .22);
  font-size: 11px;
  font-weight: 900;
}

.sim-chip.active {
  border-color: rgba(240, 201, 106, .86);
  color: #1b1003;
  background: linear-gradient(180deg, #ffe08a, #b87b24);
  box-shadow: 0 0 18px rgba(240, 201, 106, .22);
}

.sim-chip.danger {
  border-color: rgba(214, 67, 82, .9);
  background: linear-gradient(180deg, #ffd1d7, #d64352);
}

.sim-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.sim-kpi-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: rgba(0, 0, 0, .18);
}

.sim-kpi-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.sim-kpi-grid strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-feed {
  display: grid;
  gap: 6px;
  max-height: 210px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.sim-feed li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(0, 0, 0, .16);
  color: var(--muted);
  font-size: 12px;
}

.sim-feed strong {
  color: var(--gold);
}

.sim-feed span {
  display: block;
  line-height: 1.4;
}

.sim-feed .win {
  color: #8ee0b6;
}

.sim-feed .lose {
  color: #ff9ca8;
}

.sim-feed .stop {
  color: #d7e2ef;
}

.sim-final-note {
  padding: 11px;
  border: 1px solid rgba(240, 201, 106, .2);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(240, 201, 106, .06);
  font-size: 13px;
  line-height: 1.55;
}

.sim-tape {
  grid-column: 1 / -1;
}

.sim-tape em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.method-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
}

.method-card.failed {
  border-color: rgba(214, 67, 82, .42);
}

.method-card.survived {
  border-color: rgba(34, 185, 120, .42);
}

.method-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.method-card header strong {
  color: var(--gold);
  font-size: 13px;
  text-align: right;
}

.method-card p,
.method-card small {
  color: var(--muted);
  line-height: 1.45;
}

.method-card small {
  font-size: 12px;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.method-grid div {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(0, 0, 0, .18);
}

.method-grid strong {
  font-size: 15px;
}

.history {
  display: grid;
  gap: 8px;
  max-height: 300px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.history li {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  font-size: 13px;
}

.history strong {
  color: var(--ink);
}

.history span {
  color: var(--muted);
}

.bankrupt-ending {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 620px);
  align-items: center;
  gap: clamp(18px, 4vw, 48px);
  padding: clamp(18px, 5vw, 56px);
  background:
    radial-gradient(circle at 30% 22%, rgba(125, 211, 252, .2), transparent 25%),
    radial-gradient(circle at 78% 18%, rgba(240, 201, 106, .12), transparent 28%),
    linear-gradient(180deg, rgba(3, 7, 18, .88), rgba(0, 2, 8, .97));
  backdrop-filter: blur(8px);
}

.ending-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.river-sky {
  position: absolute;
  inset: 0 0 43%;
  background:
    radial-gradient(circle at 18% 18%, rgba(191, 219, 254, .22), transparent 19%),
    linear-gradient(180deg, #061323, #0f1b2f 58%, #07111d);
}

.river-moon {
  position: absolute;
  left: clamp(22px, 9vw, 118px);
  top: clamp(30px, 9vh, 86px);
  width: clamp(58px, 9vw, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #eff6ff, #94a3b8 68%, rgba(148, 163, 184, .2));
  box-shadow:
    0 0 34px rgba(191, 219, 254, .36),
    0 0 110px rgba(125, 211, 252, .2);
}

.river-city {
  position: absolute;
  left: 0;
  right: 0;
  top: 30%;
  display: flex;
  align-items: end;
  gap: clamp(10px, 2vw, 24px);
  height: 126px;
  padding-inline: clamp(20px, 7vw, 110px);
  opacity: .82;
}

.river-city span {
  display: block;
  flex: 1;
  min-width: 28px;
  height: 52%;
  border-radius: 5px 5px 0 0;
  background:
    repeating-linear-gradient(180deg, rgba(250, 204, 21, .58) 0 3px, transparent 3px 14px),
    linear-gradient(180deg, #1e293b, #020617);
  box-shadow: 0 0 22px rgba(59, 130, 246, .13);
}

.river-city span:nth-child(2) {
  height: 82%;
}

.river-city span:nth-child(3) {
  height: 64%;
}

.river-city span:nth-child(4) {
  height: 96%;
}

.river-city span:nth-child(5) {
  height: 58%;
}

.river-city span:nth-child(6) {
  height: 74%;
}

.river-bridge {
  position: absolute;
  left: -8%;
  right: -8%;
  top: 42%;
  height: 88px;
  border-top: 5px solid rgba(191, 219, 254, .42);
  border-bottom: 10px solid rgba(15, 23, 42, .92);
  background:
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(191, 219, 254, .28) 41px 44px),
    radial-gradient(circle at 20% 0, rgba(250, 204, 21, .22), transparent 12%),
    rgba(10, 18, 31, .68);
  transform: rotate(-2deg);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .35);
}

.river-warning-sign {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 8vw, 128px);
  top: 55%;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(250, 204, 21, .58);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, .18), rgba(15, 23, 42, .76)),
    rgba(2, 6, 23, .82);
  color: #fef3c7;
  box-shadow: 0 0 28px rgba(250, 204, 21, .13);
}

.river-warning-sign span {
  color: #fde68a;
  font-size: 12px;
  font-weight: 950;
}

.river-warning-sign strong {
  font-size: clamp(18px, 3vw, 30px);
}

.river-water {
  position: absolute;
  z-index: 1;
  inset: 51% 0 0;
  background:
    radial-gradient(ellipse at 22% 18%, rgba(125, 211, 252, .26), transparent 34%),
    linear-gradient(180deg, rgba(14, 91, 135, .88), rgba(3, 13, 28, .98)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 16px);
}

.river-water span {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(203, 232, 255, .7), transparent);
  animation: river-line 5s linear infinite;
}

.river-water span:nth-child(1) {
  top: 18%;
}

.river-water span:nth-child(2) {
  top: 42%;
  animation-delay: -1.7s;
  opacity: .7;
}

.river-water span:nth-child(3) {
  top: 68%;
  animation-delay: -3.2s;
  opacity: .5;
}

@keyframes river-line {
  from {
    transform: translateX(-18%);
  }
  to {
    transform: translateX(18%);
  }
}

.ending-thermometer {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 8vw, 128px);
  bottom: clamp(24px, 8vw, 92px);
  padding: 13px 16px;
  border: 1px solid rgba(125, 211, 252, .62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, .18), rgba(3, 7, 18, .74)),
    rgba(3, 7, 18, .76);
  color: #dbeafe;
  font-size: clamp(15px, 2.2vw, 22px);
  font-weight: 900;
  box-shadow: 0 0 32px rgba(125, 211, 252, .16);
}

.ending-card {
  position: relative;
  z-index: 2;
  grid-column: 2;
  justify-self: end;
  display: grid;
  gap: 14px;
  width: min(620px, 100%);
  padding: clamp(20px, 5vw, 34px);
  border: 1px solid rgba(191, 219, 254, .38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(10, 14, 25, .78)),
    rgba(0, 0, 0, .78);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, .65),
    inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.ending-kicker {
  width: fit-content;
  padding: 6px 9px;
  border: 1px solid rgba(125, 211, 252, .4);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 12px;
  font-weight: 950;
}

.ending-card h2 {
  color: #eff6ff;
  font-size: clamp(31px, 7vw, 56px);
  line-height: 1.02;
}

.ending-card p {
  color: #d7e2ef;
  line-height: 1.65;
}

.ending-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ending-stats div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(191, 219, 254, .22);
  border-radius: 8px;
  background: rgba(15, 23, 42, .62);
}

.ending-stats span {
  color: #93a4b8;
  font-size: 12px;
}

.ending-stats strong {
  color: #f8fafc;
  font-size: 18px;
}

#ending-unlock {
  color: var(--gold);
}

.ending-warning {
  padding-top: 12px;
  border-top: 1px solid rgba(191, 219, 254, .22);
  font-weight: 850;
}

.ending-reset-note {
  color: #9fb3c8 !important;
  font-size: 13px;
}

.sponsor-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 22%, rgba(240, 201, 106, .16), transparent 28%),
    rgba(3, 7, 18, .78);
  backdrop-filter: blur(9px);
}

.sponsor-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid rgba(240, 201, 106, .42);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(36, 21, 13, .95), rgba(7, 10, 18, .96)),
    rgba(0, 0, 0, .88);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .58),
    inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.sponsor-card > span {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(240, 201, 106, .36);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
}

.sponsor-card h2 {
  font-size: 28px;
  line-height: 1.08;
}

.sponsor-card p,
.sponsor-card small {
  color: var(--muted);
  line-height: 1.55;
}

.sponsor-card small {
  font-size: 12px;
}

.sponsor-count {
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(240, 201, 106, .45);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(240, 201, 106, .2), transparent 68%),
    rgba(255, 255, 255, .04);
  color: var(--gold);
  font-size: 48px;
  font-weight: 1000;
}

@media (max-width: 1120px) {
  .app {
    grid-template-columns: 1fr;
  }

  .casino-floor {
    min-height: auto;
  }
}

@media (max-width: 820px) {
  .app {
    padding: 10px;
  }

  .evidence-strip {
    grid-template-columns: 1fr;
  }

  .evidence-strip a {
    width: 100%;
  }

  .topbar,
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .table {
    grid-template-columns: 1fr;
    margin-inline: 10px;
    padding: 18px;
  }

  .stage {
    min-height: auto;
  }

  .audience {
    gap: 8px;
    padding-inline: 8px;
  }

  .guest:nth-child(n+6) {
    display: none;
  }

  .dealer-zone {
    top: 64px;
  }

  .bet-board,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-copy {
    display: grid;
    gap: 4px;
  }

  .marquee {
    gap: 14px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .app {
    display: block;
    min-height: 100svh;
    padding: 6px;
  }

  .casino-floor {
    gap: 8px;
    min-height: calc(100svh - 12px);
    padding: 8px;
  }

  .evidence-strip {
    padding: 10px;
  }

  .evidence-strip strong {
    font-size: 15px;
  }

  .evidence-strip p {
    font-size: 12px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand h1 {
    overflow: hidden;
    font-size: 20px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .brand p {
    display: none;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 16px;
    flex: 0 0 34px;
  }

  .topbar-actions {
    gap: 6px;
    margin-left: auto;
  }

  .sound-toggle {
    grid-template-columns: 1fr;
    place-items: center;
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .sound-toggle #sound-label {
    display: none;
  }

  .bankroll-card {
    min-width: 108px;
    padding: 6px 8px;
  }

  .bankroll-card span {
    font-size: 10px;
  }

  .bankroll-card strong {
    font-size: 17px;
  }

  .stage {
    grid-template-rows: auto;
    flex: 0 0 auto;
    min-height: 0;
  }

  .audience {
    display: none;
  }

  .dealer-zone {
    top: 6px;
    gap: 2px;
    width: calc(100% - 16px);
  }

  .dealer {
    --dealer-scale: .54;
    --dealer-talk-scale: .57;
    height: 80px;
  }

  .dealer-bubble {
    max-width: calc(100vw - 36px);
    min-height: 28px;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.25;
  }

  .table {
    grid-template-columns: minmax(168px, 1fr) minmax(112px, 126px);
    gap: 8px;
    align-items: center;
    min-height: 0;
    margin: 76px 0 0;
    padding: 9px;
    border-width: 5px;
    border-radius: 30px 30px 8px 8px / 22px 22px 8px 8px;
  }

  .wheel-wrap {
    min-height: 205px;
  }

  .pointer {
    border-left-width: 12px;
    border-right-width: 12px;
    border-bottom-width: 24px;
  }

  .wheel {
    width: min(205px, 52vw);
    border-width: 8px;
  }

  .wheel-ring {
    inset: 26px;
  }

  .ball-track {
    inset: 10px;
  }

  .roulette-ball {
    top: 5px;
    width: 14px;
    height: 14px;
  }

  .wheel.is-spinning .roulette-ball {
    animation-duration: .18s;
  }

  .wheel-center {
    border-width: 5px;
  }

  .wheel-center span {
    font-size: 40px;
  }

  .wheel-center strong {
    font-size: 11px;
  }

  .spin-panel {
    align-content: center;
    gap: 8px;
  }

  .result-card {
    min-height: 76px;
    padding: 9px;
  }

  .result-card span {
    font-size: 11px;
  }

  .result-card strong {
    font-size: 14px;
    line-height: 1.25;
    word-break: keep-all;
  }

  .spin-button {
    min-height: 52px;
    font-size: 19px;
  }

  .zero-rule {
    font-size: 11px;
  }

  .bet-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .bet-spot {
    min-height: 68px;
    padding: 8px;
    gap: 2px;
  }

  .bet-spot span {
    font-size: 22px;
  }

  .bet-spot strong {
    font-size: 11px;
  }

  .bet-spot em {
    font-size: 17px;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
  }

  .chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .chips button,
  .action-row button {
    min-width: 0;
    min-height: 36px;
    padding: 0 4px;
    font-size: 12px;
  }

  .chips button {
    font-size: 13px;
  }

  .side-panel {
    display: grid;
    gap: 8px;
    margin-top: 8px;
  }

  .sim-live-grid,
  .sim-kpi-grid {
    grid-template-columns: 1fr;
  }

  .sim-race-head strong {
    font-size: 18px;
  }

  .sim-feed {
    max-height: 170px;
  }

  .sim-feed li {
    grid-template-columns: 1fr;
  }

  .side-panel .panel:last-child {
    display: none;
  }

  .affiliate-panel {
    gap: 6px;
    padding: 8px;
  }

  .affiliate-copy strong {
    font-size: 13px;
  }

  .affiliate-panel p {
    font-size: 10px;
    line-height: 1.25;
  }

  .bankrupt-ending {
    grid-template-columns: 1fr;
    align-content: end;
    padding: 12px;
  }

  .river-sky {
    inset: 0 0 50%;
  }

  .river-moon {
    left: 18px;
    top: 28px;
    width: 58px;
  }

  .river-city {
    top: 25%;
    height: 92px;
    gap: 7px;
    padding-inline: 14px;
  }

  .river-bridge {
    top: 36%;
    height: 58px;
  }

  .river-water {
    inset: 42% 0 0;
  }

  .river-warning-sign {
    left: 12px;
    top: 47%;
    padding: 9px 10px;
  }

  .river-warning-sign strong {
    font-size: 17px;
  }

  .ending-thermometer {
    left: 12px;
    bottom: auto;
    top: 58%;
    padding: 10px 12px;
    font-size: 14px;
  }

  .ending-card {
    grid-column: auto;
    align-self: end;
    max-height: 62vh;
    overflow: auto;
    padding: 18px;
  }

  .ending-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .brand h1 {
    font-size: 18px;
  }

  .bankroll-card {
    min-width: 96px;
    padding-inline: 6px;
  }

  .bankroll-card strong {
    font-size: 15px;
  }

  .table {
    grid-template-columns: minmax(154px, 1fr) minmax(104px, 116px);
    gap: 6px;
    padding: 8px;
  }

  .wheel-wrap {
    min-height: 188px;
  }

  .wheel {
    width: min(188px, 50vw);
  }

  .dealer-bubble {
    font-size: 10px;
  }

  .spin-button {
    min-height: 48px;
  }
}
