:root {
  color-scheme: dark;
  --bg: #080b10;
  --surface: #0d1016;
  --surface-2: #111620;
  --surface-3: #151b27;
  --table: #080b10;
  --table-2: #101722;
  --line: rgba(232, 236, 243, 0.12);
  --line-2: rgba(232, 236, 243, 0.22);
  --text: #f3f5f8;
  --muted: #88919f;
  --soft: #c2c8d1;
  --gold: #c9ad69;
  --gold-2: #e3cc8f;
  --red: #9d3538;
  --red-2: #c04a4f;
  --green: #167048;
  --green-2: #2da56f;
  --blue: #87b7e8;
  --bad: #d16060;
  --play-w: 780px;
  --stats-w: 172px;
  --table-size: 1;
  --table-scale: 1;
  --table-scale-inverse: 1;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-fine: 0 1px 1px rgba(0, 0, 0, 0.34);
  --shadow-low: 0 6px 16px rgba(0, 0, 0, 0.28);
  --shadow-mid: 0 12px 28px rgba(0, 0, 0, 0.34);
  --shadow-high: 0 22px 54px rgba(0, 0, 0, 0.46);
  --shadow-chip: inset 0 0 0 6px rgba(0, 0, 0, 0.16), inset 0 0 0 9px rgba(255, 255, 255, 0.045), 0 9px 20px rgba(0, 0, 0, 0.34), 0 2px 4px rgba(0, 0, 0, 0.28);
  --shadow-chip-hover: inset 0 0 0 6px rgba(0, 0, 0, 0.14), inset 0 0 0 9px rgba(255, 255, 255, 0.06), 0 15px 28px rgba(0, 0, 0, 0.42), 0 5px 10px rgba(0, 0, 0, 0.3);
  --shadow-control: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 8px 18px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-control-hover: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 12px 24px rgba(0, 0, 0, 0.34), 0 3px 7px rgba(0, 0, 0, 0.26);
  --text-depth: 0 1px 1px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

html:fullscreen,
html:fullscreen body,
body.is-fullscreen {
  background: var(--bg);
}

html:fullscreen .shell {
  min-height: 100vh;
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  display: grid;
  align-content: center;
  width: 100%;
  min-height: 100svh;
  margin: 0 auto;
  padding: 8px 0;
}

.play-layout {
  position: relative;
  display: block;
  align-self: center;
  justify-self: center;
  width: min(calc(var(--play-w) * var(--table-size) * var(--table-scale)), calc(100% - 24px - (var(--stats-w) * var(--table-scale) * 2)));
  height: min(calc(790px * var(--table-size) * var(--table-scale)), calc(100svh - 16px));
  min-height: min(calc(690px * var(--table-size) * var(--table-scale)), calc(100svh - 16px));
}

.table-shell {
  position: relative;
  width: calc(100% * var(--table-scale-inverse));
  height: calc(100% * var(--table-scale-inverse));
  min-width: 0;
  min-height: 0;
  overflow: visible;
  isolation: isolate;
  transform: scale(var(--table-scale));
  transform-origin: top left;
}

.table-brand {
  position: absolute;
  top: 13px;
  left: 18px;
  z-index: 9;
  display: block;
  width: 96px;
  line-height: 1;
  text-decoration: none;
  opacity: 0.58;
  transition: opacity 130ms var(--ease);
}

.table-brand:hover,
.table-brand:focus-visible {
  outline: 0;
  opacity: 0.86;
}

.table-brand picture,
.table-brand-logo {
  display: block;
  width: 100%;
}

.table-brand-logo {
  height: auto;
}

.table-shell::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: min(620px, 86%);
  aspect-ratio: 1;
  background: url("assets/chip-sword-template-20260710a.webp") center / cover no-repeat;
  filter: grayscale(1) saturate(0) contrast(1.52) brightness(0.34);
  mix-blend-mode: screen;
  opacity: 0.048;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.88) 0 30%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.1) 62%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.88) 0 30%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.1) 62%, transparent 76%);
}

.felt {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 276px 16px minmax(218px, 1fr) 168px;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 14px 18px;
  background: transparent;
  overflow: visible;
}

.felt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}

.felt.result-win::after {
  animation: tableFlashGold 720ms var(--ease);
}

.felt.result-lose::after {
  animation: tableFlashRed 620ms var(--ease);
}

.felt.result-push::after {
  animation: tableFlashNeutral 620ms var(--ease);
}

.wheel-zone,
.table-center,
.betting-zone,
.controls {
  position: relative;
  z-index: 1;
}

.wheel-zone {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  justify-items: center;
  gap: 0;
  min-width: 0;
  overflow: visible;
}

.wheel-cluster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 18px;
}

.wheel-stage {
  position: relative;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: min(100%, 380px);
  min-height: 0;
  isolation: isolate;
}

.wheel-stats {
  grid-column: 3;
  justify-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  width: min(166px, 100%);
  min-width: 126px;
  padding-left: 16px;
  border-left: 1px solid rgba(232, 236, 243, 0.1);
  color: var(--text);
}

.wheel-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wheel-stat span {
  color: rgba(136, 145, 159, 0.78);
  font-size: 0.56rem;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.wheel-number-row,
.wheel-number-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.wheel-number-grid {
  display: grid;
  grid-template-columns: repeat(5, 22px);
  align-items: center;
}

.wheel-number {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  aspect-ratio: 1;
  border: 1px solid rgba(232, 236, 243, 0.08);
  border-radius: 999px;
  color: rgba(243, 245, 248, 0.84);
  background: rgba(16, 22, 32, 0.72);
  box-shadow: var(--shadow-low);
  font-size: 0.58rem;
  font-weight: 860;
  line-height: 1;
  text-shadow: var(--text-depth);
}

.wheel-number.red {
  border-color: rgba(224, 104, 116, 0.24);
  background: rgba(157, 53, 56, 0.76);
}

.wheel-number.black {
  border-color: rgba(232, 236, 243, 0.13);
  background: rgba(8, 10, 14, 0.9);
}

.wheel-number.green {
  border-color: rgba(112, 204, 145, 0.28);
  background: rgba(22, 112, 72, 0.82);
}

.wheel-number[data-count]::after {
  content: attr(data-count);
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  min-width: 12px;
  height: 12px;
  padding: 0 2px;
  border-radius: 999px;
  color: rgba(8, 11, 16, 0.92);
  background: rgba(227, 204, 143, 0.88);
  font-size: 0.42rem;
  font-weight: 900;
  text-shadow: none;
}

.wheel-empty {
  color: rgba(136, 145, 159, 0.5);
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 1;
}

.wheel-heat {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.heat-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wheel-stat .heat-label {
  color: rgba(136, 145, 159, 0.62);
  font-size: 0.48rem;
  font-weight: 840;
  line-height: 1;
  text-transform: uppercase;
}

.heat-track {
  display: flex;
  gap: 2px;
  min-width: 0;
  height: 17px;
  padding: 2px;
  border: 1px solid rgba(232, 236, 243, 0.07);
  border-radius: 4px;
  background: rgba(8, 11, 16, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.wheel-stat .heat-segment {
  display: grid;
  place-items: center;
  flex: calc(var(--heat, 0) * 1000) 1 0;
  min-width: 15px;
  border-radius: 3px;
  color: rgba(243, 245, 248, 0.9);
  font-size: 0.44rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: var(--text-depth);
  text-transform: uppercase;
  overflow: hidden;
}

.heat-red {
  background: rgba(157, 53, 56, 0.86);
}

.heat-black {
  background: rgba(8, 10, 14, 0.92);
}

.heat-odd,
.heat-low,
.heat-dozen-1 {
  background: rgba(103, 117, 137, 0.64);
}

.heat-even,
.heat-high,
.heat-dozen-3,
.heat-column-3 {
  background: rgba(32, 70, 88, 0.72);
}

.heat-dozen-2,
.heat-column-2 {
  background: rgba(139, 117, 66, 0.78);
}

.heat-column-1 {
  background: rgba(103, 117, 137, 0.64);
}

.heat-zero,
.heat-double-zero {
  background: rgba(22, 112, 72, 0.86);
}

.roulette-wheel {
  --wheel-size: min(236px, 64vw);
  position: relative;
  width: var(--wheel-size);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(8, 11, 16, 1) 0 27%, transparent 28%),
    radial-gradient(circle at center, transparent 0 61%, rgba(232, 236, 243, 0.18) 62% 63%, transparent 64%),
    #080b10;
  box-shadow:
    inset 0 0 0 2px rgba(232, 236, 243, 0.08),
    inset 0 0 0 11px rgba(8, 11, 16, 0.9),
    inset 0 0 0 14px rgba(201, 173, 105, 0.28),
    0 24px 54px rgba(0, 0, 0, 0.48),
    0 7px 16px rgba(0, 0, 0, 0.32);
  transform: translateZ(0) scale(1);
  transform-origin: center;
  transition: transform 190ms var(--ease), filter 190ms var(--ease), box-shadow 190ms var(--ease);
  will-change: transform;
}

.wheel-stage:hover .roulette-wheel,
.wheel-stage:focus-within .roulette-wheel {
  filter: brightness(1.08);
  transform: translate3d(0, 8px, 0) scale(1.08);
  box-shadow:
    inset 0 0 0 2px rgba(232, 236, 243, 0.1),
    inset 0 0 0 11px rgba(8, 11, 16, 0.9),
    inset 0 0 0 14px rgba(201, 173, 105, 0.34),
    0 34px 72px rgba(0, 0, 0, 0.54),
    0 12px 24px rgba(0, 0, 0, 0.36);
}

.roulette-wheel.is-spinning {
  filter: brightness(1.05);
}

.roulette-wheel.is-spinning .wheel-track {
  filter: saturate(var(--wheel-spin-saturation, 1.08)) brightness(var(--wheel-spin-brightness, 1.06));
}

.roulette-wheel.is-idle-drifting .wheel-track,
.roulette-wheel.is-idle-drifting .ball-orbit {
  transition: none;
}

.roulette-wheel.is-spinning .pocket span {
  opacity: 0.92;
  filter: none;
  transform: translateX(-50%);
}

.wheel-track {
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background-color: #0c1118;
  box-shadow:
    inset 0 0 0 1px rgba(232, 236, 243, 0.18),
    inset 0 0 0 16px rgba(7, 9, 13, 0.5),
    inset 0 0 28px rgba(0, 0, 0, 0.7);
  transition: transform var(--wheel-spin-duration, 5600ms) var(--wheel-spin-ease, cubic-bezier(.07, .72, .08, 1));
  will-change: transform;
}

.fast-spin .wheel-track {
  transition-duration: var(--wheel-spin-duration, 3900ms);
}

.wheel-track::before,
.wheel-track::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.wheel-track::before {
  inset: 22px;
  background:
    radial-gradient(circle at center, rgba(201, 173, 105, 0.18), transparent 50%),
    #101620;
  box-shadow: inset 0 0 0 1px rgba(232, 236, 243, 0.08);
}

.wheel-track::after {
  inset: 35%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 34%),
    #0b0f16;
  box-shadow: inset 0 0 0 1px rgba(232, 236, 243, 0.1), 0 6px 18px rgba(0, 0, 0, 0.42);
}

.pocket {
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  color: rgba(255, 250, 232, 0.96);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.95), 0 0 5px rgba(0, 0, 0, 0.92), 0 0 8px rgba(227, 204, 143, 0.14);
  transform: rotate(var(--a));
}

.pocket span {
  position: absolute;
  top: 3px;
  left: 50%;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 16px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: translateX(-50%);
  -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.88);
  transition: color 160ms var(--ease), opacity 160ms var(--ease), transform 160ms var(--ease), text-shadow 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.pocket.green span {
  color: #f0fff5;
}

.pocket.red span {
  color: #fff1dc;
}

.pocket.black span {
  color: rgba(250, 253, 255, 0.98);
}

.pocket.is-hit span {
  z-index: 5;
  color: #fff7db;
  text-shadow: 0 0 9px rgba(227, 204, 143, 0.65), 0 1px 2px rgba(0, 0, 0, 0.9);
  transform: translateX(-50%) scale(1.12);
}

.wheel-track.has-coverage .pocket:not(.is-covered):not(.is-hit) span {
  opacity: 0.44;
}

.wheel-track.has-preview .pocket:not(.is-previewed):not(.is-covered):not(.is-hit) span {
  opacity: 0.3;
}

.pocket.is-covered span {
  z-index: 4;
  color: #fff7db;
  background: rgba(227, 204, 143, 0.16);
  box-shadow: 0 0 0 1px rgba(227, 204, 143, 0.2), 0 0 12px rgba(227, 204, 143, 0.14);
  text-shadow: 0 0 7px rgba(227, 204, 143, 0.38), 0 1px 2px rgba(0, 0, 0, 0.92);
  opacity: 1;
}

.pocket.is-covered-strong span {
  background: rgba(227, 204, 143, 0.23);
  box-shadow: 0 0 0 1px rgba(227, 204, 143, 0.34), 0 0 16px rgba(227, 204, 143, 0.24);
}

.pocket.is-hit.is-covered span {
  background: rgba(227, 204, 143, 0.28);
}

.pocket.is-previewed::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  z-index: 5;
  width: 19px;
  height: 3px;
  border-radius: 999px;
  background: rgba(173, 225, 255, 0.88);
  box-shadow: 0 0 9px rgba(129, 192, 235, 0.68), 0 0 16px rgba(129, 192, 235, 0.28);
  pointer-events: none;
  transform: translateX(-50%);
}

.pocket.is-previewed span {
  z-index: 6;
  color: #e8f6ff;
  background: rgba(129, 192, 235, 0.23);
  box-shadow: 0 0 0 1px rgba(129, 192, 235, 0.54), 0 0 16px rgba(129, 192, 235, 0.34);
  text-shadow: 0 0 9px rgba(129, 192, 235, 0.62), 0 1px 2px rgba(0, 0, 0, 0.95);
  opacity: 1;
  transform: translateX(-50%) scale(1.08);
}

.pocket.is-covered.is-previewed span {
  background: linear-gradient(135deg, rgba(129, 192, 235, 0.25), rgba(227, 204, 143, 0.16));
  box-shadow: 0 0 0 1px rgba(129, 192, 235, 0.58), 0 0 17px rgba(129, 192, 235, 0.3), 0 0 18px rgba(227, 204, 143, 0.14);
}

.pocket.is-hit.is-previewed span {
  transform: translateX(-50%) scale(1.14);
}

.pocket.is-wheel-hovered::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 7;
  width: 24px;
  height: 18px;
  border: 1px solid rgba(227, 204, 143, 0.5);
  border-radius: 5px;
  background: rgba(21, 29, 42, 0.92);
  box-shadow: var(--shadow-control-hover), 0 0 0 1px rgba(227, 204, 143, 0.08);
  pointer-events: none;
  transform: translateX(-50%);
}

.pocket.is-wheel-hovered span {
  z-index: 8;
  color: #fff;
  opacity: 1;
  text-shadow: var(--text-depth);
  -webkit-text-stroke: 0;
  transform: translateX(-50%) translateY(-1px) scale(1.06);
}

.wheel-hover-card {
  position: absolute;
  top: 57%;
  left: 50%;
  z-index: 11;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-width: 98px;
  max-width: 138px;
  padding: 7px 9px;
  border: 1px solid rgba(232, 236, 243, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(7, 10, 15, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) scale(0.96);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease), border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.roulette-wheel.has-pocket-hover .wheel-hover-card {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.wheel-hover-number {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border: 1px solid rgba(232, 236, 243, 0.16);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.wheel-hover-number.is-green {
  color: #eaffef;
  background: rgba(22, 112, 72, 0.78);
  border-color: rgba(133, 222, 172, 0.34);
}

.wheel-hover-number.is-red {
  color: #fff1dc;
  background: rgba(143, 47, 52, 0.82);
  border-color: rgba(224, 104, 116, 0.35);
}

.wheel-hover-number.is-black {
  color: #f8fbff;
  background: rgba(8, 10, 14, 0.9);
  border-color: rgba(232, 236, 243, 0.2);
}

.wheel-hover-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.wheel-hover-label {
  color: rgba(166, 172, 184, 0.88);
  font-size: 0.48rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.wheel-hover-net {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: var(--text-depth);
}

.wheel-hover-card.is-positive {
  border-color: rgba(111, 216, 161, 0.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), 0 0 20px rgba(76, 191, 130, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wheel-hover-card.is-positive .wheel-hover-net {
  color: var(--positive);
}

.wheel-hover-card.is-negative {
  border-color: rgba(255, 118, 118, 0.34);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), 0 0 18px rgba(214, 73, 73, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wheel-hover-card.is-negative .wheel-hover-net {
  color: var(--negative);
}

.wheel-hover-card.is-zero .wheel-hover-net {
  color: rgba(232, 236, 243, 0.88);
}

.ball-orbit {
  position: absolute;
  inset: 27px;
  z-index: 8;
  border-radius: 999px;
  transform: rotate(0deg);
  transition: transform var(--ball-spin-duration, 5780ms) var(--ball-spin-ease, cubic-bezier(.03, .69, .06, 1));
  will-change: transform;
}

.fast-spin .ball-orbit {
  transition-duration: var(--ball-spin-duration, 4080ms);
}

.ball {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 30%, #ffffff 0 18%, #f3eee2 19% 52%, #b9afa1 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.56), 0 0 12px rgba(255, 255, 255, 0.26);
  transform: translateX(-50%);
}

.ball::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 62%);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.roulette-wheel.is-spinning .ball {
  animation: ballRattle var(--ball-rattle-duration, 440ms) var(--ball-rattle-ease, cubic-bezier(.32, .02, .36, 1)) infinite;
}

.roulette-wheel.is-spinning .ball::after {
  opacity: 0.58;
  animation: ballTrail var(--ball-trail-duration, 520ms) linear infinite;
}

.roulette-wheel.is-settling .ball {
  animation: ballSettle var(--ball-settle-duration, 920ms) var(--ball-settle-ease, cubic-bezier(.16, .84, .22, 1));
}

.wheel-center {
  position: absolute;
  inset: 36%;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 236, 243, 0.13);
  border-radius: 999px;
  color: var(--text);
  background: rgba(8, 11, 16, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.44);
  text-shadow: var(--text-depth);
  transition: background 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.wheel-center strong {
  color: rgba(243, 245, 248, 0.94);
  font-size: clamp(1.25rem, 4.3vw, 1.75rem);
  font-weight: 900;
  line-height: 1;
}

.wheel-center.is-red {
  border-color: rgba(255, 205, 205, 0.24);
  background: rgba(157, 53, 56, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.44), 0 0 22px rgba(157, 53, 56, 0.18);
}

.wheel-center.is-black {
  border-color: rgba(232, 236, 243, 0.18);
  background: rgba(5, 7, 11, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(232, 236, 243, 0.03);
}

.wheel-center.is-green {
  border-color: rgba(183, 245, 205, 0.26);
  background: rgba(22, 112, 72, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.44), 0 0 22px rgba(22, 112, 72, 0.18);
}

.table-center {
  display: grid;
  place-items: center;
  min-height: 0;
}

.status-pill {
  width: min(420px, 100%);
  min-height: 22px;
  padding: 0 8px;
  color: rgba(227, 204, 143, 0.62);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 760;
  text-align: center;
  text-shadow: var(--text-depth);
}

.status-pill:empty {
  visibility: hidden;
}

.betting-zone {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 46px;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  align-content: center;
}

.board-scroller {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 236, 243, 0.16) transparent;
}

.roulette-board {
  position: relative;
  display: grid;
  grid-template-columns: 44px repeat(12, minmax(42px, 1fr)) 44px;
  grid-template-rows: repeat(3, 35px) 10px 33px repeat(2, 33px);
  gap: 3px;
  width: min(100%, 720px);
  min-width: 620px;
  margin: 0 auto;
  padding: 1px;
}

.roulette-board.is-american {
  grid-template-rows: repeat(6, 15.5px) 10px 33px repeat(2, 33px);
}

.bet-cell {
  position: relative;
  display: grid;
  place-items: center;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(232, 236, 243, 0.11);
  border-radius: 5px;
  color: rgba(243, 245, 248, 0.82);
  background: rgba(16, 22, 32, 0.66);
  box-shadow: var(--shadow-control);
  cursor: pointer;
  overflow: visible;
  text-shadow: var(--text-depth);
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease), filter 130ms var(--ease);
}

.inside-lane {
  z-index: 1;
  align-self: stretch;
  justify-self: stretch;
  pointer-events: none;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0, rgba(227, 204, 143, 0.16) 5%, rgba(227, 204, 143, 0.12) 50%, rgba(227, 204, 143, 0.16) 95%, transparent 100%);
  box-shadow: inset 0 0 0 1px rgba(227, 204, 143, 0.08);
  opacity: 0.72;
}

.roulette-board.has-inside-preview {
  cursor: pointer;
}

.inside-bet {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(227, 204, 143, 0.76);
  background: transparent;
  cursor: default;
  pointer-events: none;
  text-shadow: var(--text-depth);
  transform: translateZ(0);
  transition: transform 130ms var(--ease), filter 130ms var(--ease), opacity 130ms var(--ease);
}

.inside-dot {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(227, 204, 143, 0.16);
  border-radius: 999px;
  color: transparent;
  background: rgba(8, 11, 16, 0.34);
  box-shadow: none;
  font-size: 0.48rem;
  font-weight: 860;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: border-color 130ms var(--ease), background 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
}

.split-bet .inside-dot {
  width: 100%;
  min-width: 0;
  min-height: 0;
  font-size: 0.58rem;
}

.split-horizontal-bet .inside-dot {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

.split-vertical-bet .inside-dot {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

.corner-bet .inside-dot,
.trio-bet .inside-dot,
.first-four-bet .inside-dot {
  width: 100%;
  min-width: 0;
}

.street-bet .inside-dot,
.line-bet .inside-dot,
.top-line-bet .inside-dot {
  min-width: 0;
  min-height: 0;
  border-radius: 999px;
}

.line-bet .inside-dot,
.top-line-bet .inside-dot {
  min-width: 0;
}

.inside-bet:hover,
.inside-bet:focus-visible,
.inside-bet.is-preview,
.inside-bet.has-wager {
  z-index: 14;
  filter: brightness(1.12);
  outline: 0;
  transform: translateZ(0);
}

.inside-bet:hover .inside-dot,
.inside-bet:focus-visible .inside-dot,
.inside-bet.is-preview .inside-dot,
.inside-bet.has-wager .inside-dot {
  border-color: rgba(227, 204, 143, 0.72);
  color: #fff7db;
  background: rgba(21, 29, 42, 0.9);
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(227, 204, 143, 0.12);
  opacity: 0;
}

.inside-bet.has-wager .inside-dot {
  opacity: 0.32;
}

.inside-bet.is-preview .inside-dot {
  background: rgba(227, 204, 143, 0.48);
  box-shadow: 0 0 0 1px rgba(8, 11, 16, 0.62), 0 0 18px rgba(227, 204, 143, 0.28);
  opacity: 0.86;
}

.inside-bet:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.inside-bet .spot-stack {
  bottom: 50%;
  transform: translate(-50%, 50%);
  pointer-events: none;
}

.inside-bet .spot-chip {
  width: 15px;
  margin-left: -5px;
  font-size: 0.24rem;
}

.bet-cell:hover:not(:disabled),
.bet-cell:focus-visible {
  z-index: 3;
  border-color: rgba(227, 204, 143, 0.38);
  color: #fff;
  background: rgba(21, 29, 42, 0.86);
  box-shadow: var(--shadow-control-hover);
  outline: 0;
  transform: translateY(-1px);
}

.bet-cell:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.bet-cell:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.bet-cell.red-cell {
  border-color: rgba(224, 104, 116, 0.24);
  background: rgba(157, 53, 56, 0.76);
}

.bet-cell.black-cell {
  border-color: rgba(232, 236, 243, 0.12);
  background: rgba(8, 10, 14, 0.86);
}

.bet-cell.green-cell {
  border-color: rgba(112, 204, 145, 0.28);
  background: rgba(22, 112, 72, 0.82);
}

.bet-cell.outside-cell {
  color: rgba(194, 200, 209, 0.76);
  background: rgba(12, 17, 25, 0.82);
  font-size: 0.66rem;
  font-weight: 840;
  text-transform: uppercase;
}

.bet-cell.zero-double-split-cell {
  position: absolute;
  z-index: 7;
  padding: 0;
  border-color: rgba(112, 204, 145, 0.34);
  color: rgba(232, 255, 239, 0.94);
  background: linear-gradient(180deg, rgba(22, 112, 72, 0.92), rgba(10, 66, 46, 0.92));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(112, 204, 145, 0.08);
  text-transform: none;
}

.bet-cell.zero-double-split-cell .bet-label {
  font-size: 0.58rem;
  font-weight: 920;
  letter-spacing: 0;
}

.zero-double-split-cell .spot-stack {
  right: -6px;
  bottom: -7px;
  left: auto;
  justify-content: flex-end;
  transform: none;
}

.zero-double-split-cell .spot-chip {
  width: 17px;
  margin-left: -5px;
  font-size: 0.24rem;
}

.bet-cell.column-cell {
  color: rgba(227, 204, 143, 0.8);
  background: rgba(16, 22, 32, 0.78);
  font-size: 0.62rem;
  font-weight: 860;
}

.bet-label {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0 2px;
  font-size: 0.74rem;
  font-weight: 860;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 130ms var(--ease), transform 130ms var(--ease);
}

.zero-cell .bet-label {
  font-size: 1.05rem;
}

.double-zero-cell .bet-label {
  font-size: 0.82rem;
}

.outside-cell .bet-label,
.column-cell .bet-label {
  font-size: inherit;
}

.spot-stack {
  position: absolute;
  right: auto;
  bottom: 3px;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.spot-chip {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  aspect-ratio: 1;
  margin-left: -6px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--chip-text);
  background-color: var(--chip-body);
  background-image: url("assets/chip-sword-template-20260710a.webp");
  background-position: center;
  background-size: cover;
  background-blend-mode: luminosity;
  box-shadow: var(--shadow-chip);
  font-size: 0.3rem;
  font-weight: 860;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72), 0 0 5px rgba(0, 0, 0, 0.34);
  isolation: isolate;
  transform: translateY(calc(var(--i, 0) * -1px));
}

.spot-chip:first-child {
  margin-left: 0;
}

.spot-chip.is-total {
  border-color: rgba(227, 204, 143, 0.68);
  box-shadow: var(--shadow-chip-hover);
}

.outside-cell .spot-chip,
.zero-cell .spot-chip {
  width: 20px;
  font-size: 0.32rem;
}

.bet-cell.has-wager {
  border-color: rgba(227, 204, 143, 0.42);
  box-shadow: var(--shadow-control-hover), 0 0 0 1px rgba(227, 204, 143, 0.04);
}

.bet-cell.is-last-hit {
  z-index: 5;
  border-color: rgba(227, 204, 143, 0.82);
  box-shadow: var(--shadow-control-hover), 0 0 0 1px rgba(227, 204, 143, 0.18), 0 0 26px rgba(227, 204, 143, 0.16);
  filter: brightness(1.12);
}

.bet-cell.is-last-hit .bet-label {
  color: #fff7db;
  opacity: 1;
  transform: translateY(0) scale(1.04);
}

.hit-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  width: 20px;
  aspect-ratio: 0.76;
  border: 1px solid rgba(255, 250, 232, 0.72);
  border-radius: 999px 999px 7px 7px;
  background:
    radial-gradient(circle at 36% 18%, rgba(255, 255, 255, 0.92) 0 13%, transparent 14%),
    linear-gradient(180deg, rgba(255, 250, 232, 0.72), rgba(212, 196, 150, 0.62) 62%, rgba(117, 96, 54, 0.7));
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.38), inset 0 1px 3px rgba(255, 255, 255, 0.58), inset 0 -5px 8px rgba(78, 57, 26, 0.28);
  opacity: 0.92;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: markerDrop 360ms var(--ease);
}

.hit-marker::after {
  content: "";
  position: absolute;
  right: 9%;
  bottom: -3px;
  left: 9%;
  height: 6px;
  border-radius: 999px;
  background: rgba(8, 11, 16, 0.44);
  filter: blur(1px);
}

.bet-cell.has-wager .bet-label {
  opacity: 0.58;
  transform: translateY(-7px) scale(0.9);
}

.table-wager-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  min-width: 0;
}

.table-wager {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-width: 0;
}

.table-wager.is-empty {
  visibility: hidden;
}

.table-bet-amount {
  min-width: 64px;
  color: rgba(227, 204, 143, 0.78);
  font-size: 0.78rem;
  font-weight: 840;
  line-height: 1;
  text-align: left;
  text-shadow: var(--text-depth);
}

.table-bet-amount.is-empty {
  visibility: hidden;
}

.wager-chip,
.spot-chip,
.chip,
.chip-ghost {
  --chip-body: #242a33;
  --chip-text: #f6f3ea;
  --chip-border: rgba(232, 236, 243, 0.24);
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--chip-text);
  background-color: var(--chip-body);
  background-image: url("assets/chip-sword-template-20260710a.webp");
  background-position: center;
  background-size: cover;
  background-blend-mode: luminosity;
  box-shadow: var(--shadow-chip);
  font-weight: 860;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72), 0 0 5px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  isolation: isolate;
}

.wager-chip::before,
.spot-chip::before,
.chip::before,
.chip-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: url("assets/chip-sword-template-20260710a.webp") center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.24;
  pointer-events: none;
}

.wager-chip::after,
.spot-chip::after,
.chip::after,
.chip-ghost::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), inset 0 -10px 16px rgba(0, 0, 0, 0.2);
  opacity: 0.64;
  pointer-events: none;
}

.chip-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 82%;
  height: 1.22em;
  padding: 0 2px;
  border-radius: 4px;
  color: inherit;
  background: rgba(3, 5, 9, 0.34);
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.86), 0 0 5px rgba(0, 0, 0, 0.52);
  white-space: nowrap;
}

.wager-chip {
  width: 42px;
  margin-left: -8px;
  border-color: rgba(232, 236, 243, 0.2);
  font-size: 0.58rem;
  cursor: default;
  pointer-events: none;
}

.wager-chip:first-child {
  margin-left: 0;
}

.chip {
  width: 48px;
  font-size: 0.66rem;
  cursor: pointer;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease), opacity 140ms var(--ease), box-shadow 140ms var(--ease), filter 140ms var(--ease);
  will-change: transform;
}

.chip.is-selected {
  border-color: rgba(227, 204, 143, 0.88);
  filter: brightness(1.08);
  transform: translateY(-4px);
  box-shadow: var(--shadow-chip-hover), 0 0 0 1px rgba(227, 204, 143, 0.22);
}

.chip:hover:not(:disabled),
.chip:focus-visible {
  border-color: rgba(227, 204, 143, 0.68);
  filter: brightness(1.08);
  box-shadow: var(--shadow-chip-hover);
  outline: 0;
  transform: translateY(-5px) scale(1.045);
}

.chip.is-selected:hover,
.chip.is-selected:focus-visible {
  transform: translateY(-6px) scale(1.045);
}

.chip:active:not(:disabled) {
  transform: translateY(-2px) scale(0.985);
}

.chip-ghost {
  position: fixed;
  z-index: 40;
  width: var(--ghost-size, 44px);
  font-size: 0.58rem;
  pointer-events: none;
  will-change: transform, opacity;
  animation: chipTransfer 420ms var(--ease) forwards;
}

.settlement-ghost {
  z-index: 48;
  font-size: 0.46rem;
  animation-duration: var(--duration, 720ms);
  animation-delay: var(--delay, 0ms);
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(.18, .86, .2, 1);
}

.settlement-win {
  border-color: rgba(227, 204, 143, 0.74);
  box-shadow: var(--shadow-chip-hover), 0 0 18px rgba(227, 204, 143, 0.18);
  animation-name: chipSettleWin;
}

.settlement-lose {
  border-color: rgba(209, 96, 96, 0.48);
  box-shadow: var(--shadow-chip), 0 0 14px rgba(209, 96, 96, 0.14);
  animation-name: chipSettleLose;
}

.settlement-push {
  border-color: rgba(194, 200, 209, 0.42);
  box-shadow: var(--shadow-chip), 0 0 12px rgba(194, 200, 209, 0.1);
  animation-name: chipSettlePush;
}

.chip-value-1 {
  --chip-body: #d6d8d4;
  --chip-text: #f7f8f6;
  --chip-border: rgba(255, 255, 255, 0.58);
}

.chip-value-5 {
  --chip-body: #8d2631;
  --chip-border: rgba(224, 104, 116, 0.46);
}

.chip-value-25 {
  --chip-body: #186346;
  --chip-border: rgba(92, 185, 145, 0.42);
}

.chip-value-100 {
  --chip-body: #141820;
  --chip-border: rgba(232, 236, 243, 0.26);
}

.chip-value-500 {
  --chip-body: #58467b;
  --chip-border: rgba(172, 150, 218, 0.42);
}

.chip-value-1000 {
  --chip-body: #bd8f30;
  --chip-text: #f8eed1;
  --chip-border: rgba(239, 204, 122, 0.56);
}

.chip-value-5000 {
  --chip-body: #9b4d2f;
  --chip-border: rgba(227, 136, 91, 0.46);
}

.chip-value-10000 {
  --chip-body: #1f5f87;
  --chip-border: rgba(111, 183, 228, 0.42);
}

.chip-value-25000 {
  --chip-body: #72315d;
  --chip-border: rgba(209, 124, 178, 0.46);
}

.chip-value-50000 {
  --chip-body: #5c6c74;
  --chip-border: rgba(178, 196, 205, 0.48);
}

.chip-value-100000 {
  --chip-body: #d3d4d0;
  --chip-text: #f4f6f8;
  --chip-border: rgba(255, 255, 255, 0.62);
}

.chip-value-250000 {
  --chip-body: #286f66;
  --chip-border: rgba(112, 204, 191, 0.5);
}

.chip-value-500000 {
  --chip-body: #813b45;
  --chip-border: rgba(221, 126, 139, 0.48);
}

.chip-value-1000000 {
  --chip-body: #8d96a0;
  --chip-border: rgba(221, 229, 237, 0.56);
}

.chip-value-1000 .chip-label,
.chip-value-5000 .chip-label,
.chip-value-10000 .chip-label,
.chip-value-25000 .chip-label,
.chip-value-50000 .chip-label,
.chip-value-100000 .chip-label,
.chip-value-250000 .chip-label,
.chip-value-500000 .chip-label,
.chip-value-1000000 .chip-label {
  font-size: 0.82em;
}

.controls {
  display: grid;
  grid-template-rows: 20px 86px 44px;
  gap: 7px;
  width: min(100%, 548px);
  height: 164px;
  justify-self: center;
  align-self: end;
  overflow: visible;
}

.wager-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 20px;
}

.meter {
  display: flex;
  align-items: center;
  min-height: 20px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.meter span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.meter strong {
  display: block;
  color: rgba(243, 245, 248, 0.72);
  font-size: 0.82rem;
  line-height: 1.1;
  text-shadow: var(--text-depth);
}

.meter strong.is-pulsing {
  animation: valuePulse 240ms var(--ease);
}

.wager-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 6px;
  height: 86px;
}

.chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  align-content: center;
  gap: 5px;
  justify-self: center;
  width: 100%;
  height: 84px;
  min-width: 0;
  max-width: 100%;
}

.chips[data-count="8"],
.chips[data-count="9"],
.chips[data-count="10"] {
  max-width: 328px;
}

.chips[data-count="11"],
.chips[data-count="12"],
.chips[data-count="13"],
.chips[data-count="14"] {
  max-width: 304px;
  gap: 4px;
}

.chips[data-count="8"] .chip,
.chips[data-count="9"] .chip,
.chips[data-count="10"] .chip {
  width: 42px;
  font-size: 0.56rem;
}

.chips[data-count="11"] .chip,
.chips[data-count="12"] .chip,
.chips[data-count="13"] .chip,
.chips[data-count="14"] .chip {
  width: 40px;
  font-size: 0.54rem;
}

.actions-panel {
  display: grid;
  grid-template-columns: 1.25fr repeat(2, minmax(0, 1fr));
  gap: 7px;
  height: 44px;
}

.action,
.ghost-button,
.icon-button {
  min-width: 0;
  border: 1px solid rgba(232, 236, 243, 0.1);
  border-radius: 8px;
  color: var(--text);
  background: #101620;
  box-shadow: var(--shadow-control);
  cursor: pointer;
  font-weight: 830;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
}

.action,
.ghost-button {
  min-height: 44px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.action:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.action:focus-visible,
.ghost-button:focus-visible,
.icon-button:focus-visible {
  border-color: rgba(135, 183, 232, 0.28);
  color: #fff;
  background: #151d2a;
  box-shadow: var(--shadow-control-hover);
  outline: 0;
  transform: translateY(-1px);
}

.action:active:not(:disabled),
.ghost-button:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.action.deal {
  color: #0c0d10;
  background: var(--gold);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(0, 0, 0, 0.34), 0 2px 5px rgba(0, 0, 0, 0.26);
}

.action.deal:hover:not(:disabled),
.action.deal:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  color: #080a0e;
  background: #d6bf7a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 28px rgba(0, 0, 0, 0.4), 0 4px 9px rgba(0, 0, 0, 0.3);
}

.ghost-button {
  width: 100%;
  padding: 0 10px;
  color: var(--soft);
  font-size: 0.76rem;
  background: #0d121a;
}

.ghost-button.is-confirming {
  border-color: rgba(227, 204, 143, 0.5);
  color: rgba(227, 204, 143, 0.9);
}

.clear-button {
  min-height: 44px;
  padding: 0;
  font-size: 1.18rem;
}

.chip:disabled,
.action:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.stats-sidebar {
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: var(--stats-w);
  min-width: 0;
  height: calc(100% * var(--table-scale-inverse));
  padding: 16px 0 14px 18px;
  border-left: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  box-shadow: -18px 0 34px -34px rgba(0, 0, 0, 0.92);
  transform: scale(var(--table-scale));
  transform-origin: top left;
}

.stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.stats-head h2,
.stats-section h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1;
}

.stats-head h2 {
  color: rgba(243, 245, 248, 0.78);
  text-shadow: var(--text-depth);
}

.fullscreen-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: rgba(194, 200, 209, 0.64);
  background: transparent;
  box-shadow: none;
}

.fullscreen-toggle:hover:not(:disabled),
.fullscreen-toggle:focus-visible {
  color: rgba(243, 245, 248, 0.9);
  background: rgba(232, 236, 243, 0.06);
  box-shadow: none;
}

.fullscreen-glyph {
  display: block;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(currentColor, currentColor) left top / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left top / 1.5px 6px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 1.5px 6px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 1.5px 6px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 1.5px 6px no-repeat;
  opacity: 0.9;
  transition: transform 130ms var(--ease), opacity 130ms var(--ease);
}

.fullscreen-toggle.is-active .fullscreen-glyph {
  opacity: 1;
  transform: scale(0.82);
}

.stats-content {
  min-height: 0;
  overflow: hidden;
  padding-top: 10px;
}

.stats-section {
  padding: 15px 0 18px;
  border-top: 1px solid var(--line);
}

.stats-section + .stats-section {
  margin-top: 6px;
}

.stats-section h3 {
  color: rgba(194, 200, 209, 0.62);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.stats-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.text-reset {
  padding: 0;
  border: 0;
  color: rgba(136, 145, 159, 0.56);
  background: transparent;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 820;
  line-height: 1.35;
  text-shadow: var(--text-depth);
  text-transform: uppercase;
  transition: color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease), text-shadow 130ms var(--ease);
}

.text-reset:hover,
.text-reset:focus-visible {
  color: rgba(194, 200, 209, 0.86);
  outline: 0;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.52), 0 0 10px rgba(227, 204, 143, 0.08);
  transform: translateY(-1px);
}

.text-reset:active:not(:disabled) {
  transform: translateY(1px);
}

.text-reset.is-confirming {
  color: rgba(227, 204, 143, 0.84);
}

.text-reset:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

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

.stats-mini-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.stat-hero {
  margin-bottom: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(232, 236, 243, 0.08);
}

.stat span {
  display: block;
  margin-bottom: 3px;
  color: rgba(136, 145, 159, 0.78);
  font-size: 0.62rem;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  overflow: visible;
  color: rgba(243, 245, 248, 0.86);
  font-size: 0.92rem;
  line-height: 1.18;
  text-shadow: var(--text-depth);
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.stat-hero strong {
  font-size: 1.34rem;
  letter-spacing: 0;
  line-height: 1.4;
}

.stats-total-strip {
  padding-top: 15px;
  padding-bottom: 18px;
}

.stats-total-strip .stats-title-row {
  margin-bottom: 10px;
}

.stats-total-strip .stat span {
  color: rgba(136, 145, 159, 0.62);
  font-size: 0.54rem;
}

.stats-total-strip .stat strong {
  color: rgba(243, 245, 248, 0.72);
  font-size: 0.78rem;
}

.spin-history-strip {
  position: relative;
  z-index: 5;
  padding-top: 13px;
  padding-bottom: 14px;
  overflow: visible;
}

.spin-history-strip .stats-title-row {
  margin-bottom: 8px;
}

.spin-net-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
}

.spin-net,
.spin-net-empty {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 20px;
  padding: 3px 5px;
  border: 1px solid rgba(232, 236, 243, 0.08);
  border-radius: 7px;
  color: rgba(194, 200, 209, 0.68);
  background: rgba(16, 22, 32, 0.5);
  box-shadow: var(--shadow-low);
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-shadow: var(--text-depth);
  white-space: nowrap;
}

.spin-net {
  cursor: default;
  overflow: visible;
}

.spin-net:hover,
.spin-net:focus-visible {
  z-index: 20;
  border-color: rgba(227, 204, 143, 0.38);
  outline: 0;
  box-shadow: var(--shadow-control-hover);
}

.spin-net-value {
  position: relative;
  z-index: 1;
}

.spin-net.is-positive {
  border-color: rgba(135, 183, 232, 0.22);
  color: rgba(197, 225, 251, 0.9);
  background: rgba(39, 89, 118, 0.34);
}

.spin-net.is-negative {
  border-color: rgba(209, 96, 96, 0.2);
  color: rgba(240, 184, 184, 0.86);
  background: rgba(111, 38, 42, 0.32);
}

.spin-net.is-zero {
  border-color: rgba(227, 204, 143, 0.16);
  color: rgba(227, 204, 143, 0.78);
  background: rgba(116, 92, 42, 0.2);
}

.spin-bet-popover {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 7px;
  width: min(154px, 100%);
  padding: 9px;
  border: 1px solid rgba(227, 204, 143, 0.22);
  border-radius: 8px;
  color: var(--text);
  background: rgba(7, 10, 15, 0.96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(-3px) scale(0.98);
  transition: opacity 130ms var(--ease), transform 130ms var(--ease);
}

.spin-net:nth-child(n + 6) .spin-bet-popover {
  top: auto;
  bottom: calc(100% + 7px);
  transform: translateY(3px) scale(0.98);
}

.spin-net:hover .spin-bet-popover,
.spin-net:focus-visible .spin-bet-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.spin-bet-popover-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.spin-bet-result {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border: 1px solid rgba(232, 236, 243, 0.16);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.spin-bet-result.is-green {
  color: #eaffef;
  background: rgba(22, 112, 72, 0.78);
  border-color: rgba(133, 222, 172, 0.34);
}

.spin-bet-result.is-red {
  color: #fff1dc;
  background: rgba(143, 47, 52, 0.82);
  border-color: rgba(224, 104, 116, 0.35);
}

.spin-bet-result.is-black {
  color: #f8fbff;
  background: rgba(8, 10, 14, 0.9);
  border-color: rgba(232, 236, 243, 0.2);
}

.spin-bet-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.spin-bet-summary span,
.spin-bet-total,
.spin-bet-empty,
.spin-bet-more {
  color: rgba(166, 172, 184, 0.78);
  font-size: 0.5rem;
  font-weight: 850;
  line-height: 1.15;
  text-transform: uppercase;
}

.spin-bet-summary strong {
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
}

.spin-bet-summary strong.is-positive {
  color: var(--positive);
}

.spin-bet-summary strong.is-negative {
  color: var(--negative);
}

.spin-bet-summary strong.is-zero {
  color: rgba(227, 204, 143, 0.82);
}

.spin-bet-total {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(232, 236, 243, 0.08);
  color: rgba(227, 204, 143, 0.72);
}

.spin-bet-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.spin-bet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.spin-bet-label {
  min-width: 0;
  overflow: hidden;
  color: rgba(232, 236, 243, 0.78);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spin-bet-chips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.history-bet-chip {
  position: relative;
  display: grid;
  place-items: center;
  width: 17px;
  aspect-ratio: 1;
  margin-left: -5px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--chip-text);
  background-color: var(--chip-body);
  background-image: url("assets/chip-sword-template-20260710a.webp");
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.14), inset 0 0 0 5px rgba(255, 255, 255, 0.04), 0 5px 9px rgba(0, 0, 0, 0.3);
  font-size: 0.22rem;
  font-weight: 950;
  line-height: 1;
}

.history-bet-chip:first-child {
  margin-left: 0;
}

.history-bet-chip .chip-label {
  transform: translateY(0.2px);
}

.history-bet-chip-more {
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin-left: 3px;
  border: 1px solid rgba(232, 236, 243, 0.1);
  border-radius: 999px;
  color: rgba(194, 200, 209, 0.78);
  background: rgba(16, 22, 32, 0.78);
  font-size: 0.46rem;
  font-weight: 900;
  line-height: 1;
}

.spin-bet-more {
  justify-self: end;
  color: rgba(194, 200, 209, 0.62);
  text-transform: none;
}

.buyin-strip {
  padding-top: 16px;
  padding-bottom: 2px;
}

.spin-history-strip + .buyin-strip {
  margin-top: 8px;
}

.buyin-strip .stats-title-row {
  margin-bottom: 8px;
}

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

.buyin-quick {
  min-width: 0;
  min-height: 24px;
  padding: 0 4px;
  border: 1px solid rgba(232, 236, 243, 0.08);
  border-radius: 7px;
  color: rgba(194, 200, 209, 0.7);
  background: rgba(16, 22, 32, 0.54);
  box-shadow: var(--shadow-low);
  font-size: 0.54rem;
  text-align: center;
  white-space: nowrap;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
}

.buyin-quick:hover:not(:disabled),
.buyin-quick:focus-visible {
  border-color: rgba(227, 204, 143, 0.24);
  color: rgba(243, 245, 248, 0.86);
  background: rgba(21, 29, 42, 0.72);
  box-shadow: var(--shadow-control-hover);
  outline: 0;
  transform: translateY(-1px);
}

.buyin-quick:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.cashout-stake {
  text-align: center;
}

.buyin-strip .cashout-stake {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  margin-top: 9px;
  color: rgba(194, 200, 209, 0.68);
}

.stat strong.is-positive {
  color: rgba(197, 225, 251, 0.9);
}

.stat strong.is-negative {
  color: rgba(240, 184, 184, 0.84);
}

.stats-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.reset-table {
  margin-left: auto;
  text-align: right;
}

.settings-dialog {
  width: min(430px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #090c12;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.66), 0 10px 28px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.settings-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-height: inherit;
  min-width: 0;
  padding: 17px 18px 15px;
  overflow: hidden;
}

.settings-body {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  padding-right: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(232, 236, 243, 0.18) transparent;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.settings-head h2 {
  margin: 0;
  color: rgba(243, 245, 248, 0.8);
  font-size: 0.96rem;
  line-height: 1;
  text-shadow: var(--text-depth);
}

.settings-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 15px 0 17px;
  border-bottom: 1px solid var(--line);
}

.settings-tools {
  gap: 8px;
}

.settings-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-tools-grid .ghost-button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.66rem;
}

.settings-note {
  max-width: 100%;
  color: rgba(136, 145, 159, 0.62);
  font-size: 0.62rem;
  font-weight: 720;
  line-height: 1.35;
}

.settings-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 1px;
}

.settings-title-row h3 {
  margin: 0;
  color: rgba(194, 200, 209, 0.62);
  font-size: 0.66rem;
  line-height: 1;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(232, 236, 243, 0.08);
  border-radius: 7px;
  color: rgba(194, 200, 209, 0.62);
  background: rgba(16, 22, 32, 0.46);
  font-size: 1.05rem;
  line-height: 1;
}

.setting-field,
.toggle-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  color: rgba(194, 200, 209, 0.72);
  font-size: 0.74rem;
  font-weight: 760;
}

.setting-field > span,
.toggle-row > span {
  min-width: 0;
  line-height: 1.18;
}

.setting-field input,
.setting-field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: rgba(243, 245, 248, 0.86);
  background: rgba(16, 22, 32, 0.54);
  box-shadow: var(--shadow-low);
  font-size: 0.76rem;
  font-weight: 780;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
}

.setting-field:hover input:not([type="range"]):not(:disabled),
.setting-field:hover select:not(:disabled),
.setting-field input:not([type="range"]):focus-visible,
.setting-field select:focus-visible {
  border-color: rgba(135, 183, 232, 0.24);
  background: rgba(21, 29, 42, 0.72);
  box-shadow: var(--shadow-control-hover);
  outline: 0;
}

.range-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.range-field strong {
  flex: 0 0 auto;
  color: rgba(243, 245, 248, 0.72);
  font-size: 0.68rem;
  font-weight: 820;
}

.range-field input[type="range"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--gold);
  cursor: pointer;
}

.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(232, 236, 243, 0.16);
}

.range-field input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 1px solid rgba(232, 236, 243, 0.4);
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.34);
  appearance: none;
}

.range-field input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(232, 236, 243, 0.16);
}

.range-field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(232, 236, 243, 0.4);
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.34);
}

.toggle-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 28px;
  gap: 12px;
  cursor: pointer;
  transition: color 130ms var(--ease), transform 130ms var(--ease);
}

.toggle-row:hover,
.toggle-row:focus-within {
  color: rgba(243, 245, 248, 0.86);
}

.toggle-row:active {
  transform: translateY(1px);
}

.toggle-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.34));
}

.settings-actions {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.settings-actions .ghost-button,
.settings-actions .action {
  min-height: 34px;
  border-radius: 7px;
  font-size: 0.68rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(340px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid rgba(201, 173, 105, 0.42);
  border-radius: 10px;
  color: var(--text);
  background: #0a0d13;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.58), 0 8px 18px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 170ms var(--ease), transform 170ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.burst {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.burst span {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(227, 204, 143, 0.78);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  animation: particleOut 680ms var(--ease) var(--d, 0ms) forwards;
}

.burst-lose span {
  background: rgba(209, 96, 96, 0.72);
}

.burst-push span {
  background: rgba(194, 200, 209, 0.58);
}

@keyframes valuePulse {
  50% {
    color: var(--gold-2);
    transform: translateY(-1px);
  }
}

@keyframes tableFlashGold {
  0% {
    opacity: 0;
    background: transparent;
  }
  18% {
    opacity: 0.16;
    background: rgba(227, 204, 143, 0.22);
  }
  100% {
    opacity: 0;
    background: transparent;
  }
}

@keyframes tableFlashRed {
  0% {
    opacity: 0;
    background: transparent;
  }
  18% {
    opacity: 0.12;
    background: rgba(209, 96, 96, 0.2);
  }
  100% {
    opacity: 0;
    background: transparent;
  }
}

@keyframes tableFlashNeutral {
  0% {
    opacity: 0;
    background: transparent;
  }
  18% {
    opacity: 0.12;
    background: rgba(194, 200, 209, 0.16);
  }
  100% {
    opacity: 0;
    background: transparent;
  }
}

@keyframes particleOut {
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0);
  }
}

@keyframes ballRattle {
  0% {
    transform: translateX(calc(-50% + var(--ball-rattle-x0, -1px))) translateY(var(--ball-rattle-y0, -9px)) scale(1.035);
  }
  13% {
    transform: translateX(calc(-50% + var(--ball-rattle-x1, 1px))) translateY(var(--ball-rattle-y1, 4px)) scale(0.968);
  }
  25% {
    transform: translateX(calc(-50% + var(--ball-rattle-x2, -2px))) translateY(var(--ball-rattle-y2, -5px)) scale(1.02);
  }
  42% {
    transform: translateX(calc(-50% + var(--ball-rattle-x3, 2px))) translateY(var(--ball-rattle-y3, 7px)) scale(0.955);
  }
  58% {
    transform: translateX(calc(-50% + var(--ball-rattle-x4, -1px))) translateY(var(--ball-rattle-y4, -3px)) scale(1.012);
  }
  74% {
    transform: translateX(calc(-50% + var(--ball-rattle-x5, 1px))) translateY(var(--ball-rattle-y5, 5px)) scale(0.98);
  }
  88% {
    transform: translateX(calc(-50% + var(--ball-rattle-x6, 0px))) translateY(var(--ball-rattle-y6, -6px)) scale(1.022);
  }
  100% {
    transform: translateX(calc(-50% + var(--ball-rattle-x7, -1px))) translateY(var(--ball-rattle-y7, 2px)) scale(0.99);
  }
}

@keyframes ballTrail {
  0% {
    opacity: 0.42;
    transform: scale(0.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes ballSettle {
  0% {
    transform: translateX(calc(-50% + var(--ball-settle-x0, 0px))) translateY(var(--ball-settle-y0, -10px)) scale(1.05);
  }
  18% {
    transform: translateX(calc(-50% + var(--ball-settle-x1, 2px))) translateY(var(--ball-settle-y1, 9px)) scale(0.95);
  }
  33% {
    transform: translateX(calc(-50% + var(--ball-settle-x2, -1px))) translateY(var(--ball-settle-y2, -5px)) scale(1.03);
  }
  51% {
    transform: translateX(calc(-50% + var(--ball-settle-x3, 1px))) translateY(var(--ball-settle-y3, 5px)) scale(0.97);
  }
  72% {
    transform: translateX(calc(-50% + var(--ball-settle-x4, 0px))) translateY(var(--ball-settle-y4, -2px)) scale(1.01);
  }
  88% {
    transform: translateX(calc(-50% + var(--ball-settle-x5, 0px))) translateY(var(--ball-settle-y5, 2px)) scale(0.99);
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes chipTransfer {
  0% {
    opacity: 0.96;
    transform: translate3d(0, 0, 0) scale(1);
  }
  72% {
    opacity: 0.96;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 0), var(--dy, 0), 0) scale(0.82);
  }
}

@keyframes chipSettleWin {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.78) rotate(0deg);
  }
  12% {
    opacity: 0.98;
  }
  54% {
    opacity: 0.98;
    transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(1.08) rotate(var(--spin-mid, 80deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 0), var(--dy, 0), 0) scale(0.62) rotate(var(--spin, 180deg));
  }
}

@keyframes chipSettleLose {
  0% {
    opacity: 0.92;
    filter: saturate(1);
    transform: translate3d(0, 0, 0) scale(0.82) rotate(0deg);
  }
  46% {
    opacity: 0.86;
    transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(0.94) rotate(var(--spin-mid, -70deg));
  }
  100% {
    opacity: 0;
    filter: saturate(0.72) brightness(0.72);
    transform: translate3d(var(--dx, 0), var(--dy, 0), 0) scale(0.36) rotate(var(--spin, -180deg));
  }
}

@keyframes chipSettlePush {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.76) rotate(0deg);
  }
  14% {
    opacity: 0.82;
  }
  55% {
    opacity: 0.82;
    transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(0.96) rotate(var(--spin-mid, 50deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 0), var(--dy, 0), 0) scale(0.56) rotate(var(--spin, 140deg));
  }
}

@keyframes markerDrop {
  0% {
    opacity: 0;
    transform: translate(-50%, -84%) scale(0.72);
  }
  58% {
    opacity: 0.96;
    transform: translate(-50%, -46%) scale(1.06);
  }
  100% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 1120px) {
  .play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) calc(var(--stats-w) * var(--table-scale));
    width: min(calc((var(--play-w) * var(--table-size) * var(--table-scale)) + (var(--stats-w) * var(--table-scale))), calc(100% - 24px));
  }

  .stats-sidebar {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: 100%;
    transform: none;
  }
}

@media (min-width: 721px) and (max-height: 820px) {
  .felt {
    grid-template-rows: minmax(190px, 0.9fr) 14px minmax(184px, 1fr) 140px;
    gap: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow: hidden;
  }

  .roulette-wheel {
    --wheel-size: min(216px, 28vw);
  }

  .wheel-stats {
    gap: 8px;
  }

  .pocket span {
    min-width: 14px;
    height: 14px;
    font-size: 0.54rem;
  }

  .status-pill {
    min-height: 16px;
    font-size: 0.64rem;
    line-height: 1.1;
  }

  .betting-zone {
    grid-template-rows: minmax(0, 1fr) 34px;
    gap: 6px;
  }

  .roulette-board {
    grid-template-rows: repeat(3, 28px) 7px 26px repeat(2, 26px);
    gap: 2px;
  }

  .roulette-board.is-american {
    grid-template-rows: repeat(6, 12.2px) 7px 26px repeat(2, 26px);
  }

  .bet-label {
    font-size: 0.64rem;
  }

  .outside-cell .bet-label,
  .column-cell .bet-label {
    font-size: 0.54rem;
  }

  .table-wager-row,
  .table-wager {
    height: 34px;
  }

  .table-bet-amount {
    font-size: 0.7rem;
  }

  .wager-chip {
    width: 34px;
    font-size: 0.48rem;
  }

  .controls {
    grid-template-rows: 16px 74px 40px;
    height: 140px;
    gap: 5px;
  }

  .wager-meta,
  .meter {
    min-height: 16px;
  }

  .meter strong {
    font-size: 0.74rem;
  }

  .wager-row {
    height: 74px;
  }

  .chips {
    height: 72px;
    gap: 4px;
  }

  .chip,
  .chips[data-count="8"] .chip,
  .chips[data-count="9"] .chip,
  .chips[data-count="10"] .chip,
  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip,
  .chips[data-count="14"] .chip {
    width: 34px;
    font-size: 0.48rem;
  }

  .chip.is-selected,
  .chip.is-selected:hover,
  .chip.is-selected:focus-visible {
    transform: none;
  }

  .clear-button {
    min-height: 40px;
  }

  .actions-panel {
    height: 40px;
  }

  .action,
  .ghost-button {
    min-height: 40px;
    font-size: 0.72rem;
  }

  .stats-sidebar {
    padding-top: 12px;
    padding-bottom: 10px;
    padding-left: 14px;
  }

  .stats-head {
    min-height: 24px;
  }

  .stats-content {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .stats-section {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .stats-section + .stats-section {
    margin-top: 3px;
  }

  .stats-title-row {
    margin-bottom: 7px;
  }

  .stat-hero {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .stats-grid,
  .stats-mini-grid {
    gap: 6px 8px;
  }

  .stat span {
    margin-bottom: 2px;
    font-size: 0.54rem;
  }

  .stat strong {
    font-size: 0.78rem;
  }

  .stat-hero strong {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .stats-total-strip,
  .spin-history-strip,
  .buyin-strip {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .spin-history-strip .stats-title-row,
  .buyin-strip .stats-title-row {
    margin-bottom: 6px;
  }

  .spin-net,
  .spin-net-empty {
    min-height: 18px;
    padding: 2px 5px;
  }

  .spin-history-strip + .buyin-strip {
    margin-top: 3px;
  }

  .buyin-buttons {
    gap: 4px;
  }

  .buyin-quick,
  .buyin-strip .cashout-stake {
    min-height: 21px;
    font-size: 0.5rem;
  }

  .buyin-strip .cashout-stake {
    margin-top: 5px;
  }

  .stats-actions {
    padding-top: 8px;
  }

  .stats-content {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 236, 243, 0.18) transparent;
  }
}

@media (min-width: 721px) and (max-height: 930px) {
  .is-scaled-up .roulette-board {
    grid-template-rows: repeat(3, 28px) 7px 26px repeat(2, 26px);
    gap: 2px;
  }

  .is-scaled-up .roulette-board.is-american {
    grid-template-rows: repeat(6, 12.2px) 7px 26px repeat(2, 26px);
  }

  .is-scaled-up .bet-label {
    font-size: 0.64rem;
  }

  .is-scaled-up .outside-cell .bet-label,
  .is-scaled-up .column-cell .bet-label {
    font-size: 0.54rem;
  }
}

@media (max-width: 720px) {
  :root {
    --stats-w: 0px;
  }

  .shell {
    min-height: 100svh;
    padding: 0;
    align-content: stretch;
  }

  .play-layout {
    display: flex;
    flex-direction: column;
    width: min(100%, 480px);
    height: 100svh;
    min-height: 0;
    max-height: 100svh;
    padding: 0;
    overflow: hidden;
  }

  .table-shell {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    transform: none;
    transform-origin: top center;
  }

  .table-brand {
    top: 9px;
    left: 12px;
    width: 74px;
  }

  .felt {
    grid-template-rows: 226px 22px minmax(178px, 1fr) 222px;
    gap: 6px;
    height: 100%;
    min-height: 0;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }

  .roulette-wheel {
    --wheel-size: min(206px, 58vw);
  }

  .wheel-cluster {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .wheel-stage {
    grid-column: 1;
    justify-self: center;
  }

  .wheel-stats {
    display: none;
  }

  .wheel-zone {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }

  .roulette-board {
    grid-template-columns: 30px repeat(12, minmax(0, 1fr)) 30px;
    grid-template-rows: repeat(3, 32px) 8px 31px repeat(2, 31px);
    gap: 2px;
    min-width: 0;
    width: 100%;
  }

  .roulette-board.is-american {
    grid-template-rows: repeat(6, 14.5px) 8px 31px repeat(2, 31px);
  }

  .bet-label {
    font-size: 0.56rem;
  }

  .outside-cell .bet-label,
  .column-cell .bet-label {
    font-size: 0.5rem;
  }

  .bet-cell.zero-double-split-cell .bet-label {
    font-size: 0.46rem;
  }

  .zero-double-split-cell .spot-stack {
    right: -4px;
    bottom: -5px;
  }

  .zero-double-split-cell .spot-chip {
    width: 12px;
    margin-left: -4px;
    font-size: 0.18rem;
  }

  .zero-cell .bet-label {
    font-size: 0.82rem;
  }

  .double-zero-cell .bet-label {
    font-size: 0.64rem;
  }

  .pocket span {
    width: auto;
    min-width: 15px;
    height: 15px;
    font-size: 0.58rem;
  }

  .bet-cell .spot-stack {
    right: 2px;
    bottom: 2px;
    left: auto;
    justify-content: flex-end;
    max-width: calc(100% - 4px);
    transform: none;
  }

  .bet-cell .spot-chip,
  .outside-cell .spot-chip,
  .zero-cell .spot-chip {
    width: 12px;
    margin-left: -4px;
    font-size: 0.18rem;
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.14), inset 0 0 0 5px rgba(255, 255, 255, 0.04), 0 4px 8px rgba(0, 0, 0, 0.3);
  }

  .inside-bet .spot-chip {
    width: 10px;
    margin-left: -3px;
    font-size: 0.16rem;
  }

  .bet-cell.has-wager .bet-label {
    z-index: 6;
    opacity: 0.9;
    transform: none;
  }

  .bet-cell.is-last-hit .bet-label {
    transform: translateY(0) scale(1.02);
  }

  .hit-marker {
    width: 14px;
  }

  .wheel-track.has-coverage .pocket:not(.is-covered):not(.is-hit) span {
    opacity: 0.62;
  }

  .wheel-track.has-preview .pocket:not(.is-previewed):not(.is-covered):not(.is-hit) span {
    opacity: 0.5;
  }

  .pocket.is-covered span,
  .pocket.is-covered-strong span,
  .pocket.is-hit.is-covered span {
    background: transparent;
    box-shadow: none;
    text-shadow: 0 0 8px rgba(227, 204, 143, 0.46), 0 1px 2px rgba(0, 0, 0, 0.96);
  }

  .pocket.is-previewed span,
  .pocket.is-covered.is-previewed span,
  .pocket.is-hit.is-previewed span {
    background: transparent;
    box-shadow: none;
    color: #e8f6ff;
    text-shadow: 0 0 9px rgba(129, 192, 235, 0.56), 0 1px 2px rgba(0, 0, 0, 0.96);
  }

  .pocket.is-previewed::before {
    top: 0;
    width: 15px;
    height: 2px;
    opacity: 0.84;
  }

  .controls {
    grid-template-rows: 20px 112px 44px;
    width: 100%;
    height: 190px;
    gap: 7px;
  }

  .wager-row {
    grid-template-columns: 1fr 42px;
    height: 112px;
  }

  .chips {
    height: 110px;
    max-width: 320px;
    gap: 4px;
  }

  .chip,
  .chips[data-count="8"] .chip,
  .chips[data-count="9"] .chip,
  .chips[data-count="10"] .chip,
  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip,
  .chips[data-count="14"] .chip {
    width: 38px;
    font-size: 0.52rem;
  }

  .actions-panel {
    grid-template-columns: 1.25fr repeat(2, minmax(0, 1fr));
    height: 44px;
  }

  .action,
  .ghost-button {
    min-height: 34px;
    font-size: 0.72rem;
  }

  .clear-button {
    min-height: 44px;
  }

  .stats-sidebar {
    order: -1;
    position: relative;
    top: auto;
    left: auto;
    z-index: 8;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
    column-gap: 10px;
    width: 100%;
    height: 54px;
    min-height: 54px;
    padding: max(4px, env(safe-area-inset-top)) 10px 5px;
    border-left: 0;
    border-bottom: 1px solid rgba(232, 236, 243, 0.1);
    background: rgba(8, 11, 16, 0.96);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    transform: none;
  }

  .stats-head {
    min-height: 0;
    gap: 6px;
  }

  .stats-head h2 {
    font-size: 0.64rem;
  }

  .stats-content {
    display: flex;
    align-items: center;
    min-width: 0;
    padding-top: 0;
    overflow: hidden;
  }

  .stats-section {
    display: none;
    padding: 0;
    border-top: 0;
  }

  .stats-section:first-child {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .stats-title-row,
  .stats-grid .stat:nth-child(3),
  .stats-grid .stat:nth-child(4) {
    display: none;
  }

  .stat-hero {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .stats-grid {
    display: contents;
  }

  .stat span {
    margin-bottom: 2px;
    font-size: 0.5rem;
  }

  .stat strong,
  .stat-hero strong {
    font-size: 0.68rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .stats-actions {
    padding-top: 0;
    border-top: 0;
    gap: 8px;
  }

  .settings-inline,
  .reset-table,
  .fullscreen-toggle {
    font-size: 0.52rem;
  }
}

@media (max-width: 390px) {
  .felt {
    grid-template-rows: 208px 22px minmax(168px, 1fr) 222px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .roulette-wheel {
    --wheel-size: 190px;
  }

  .chips {
    max-width: 290px;
  }

  .chip,
  .chips[data-count="8"] .chip,
  .chips[data-count="9"] .chip,
  .chips[data-count="10"] .chip,
  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip,
  .chips[data-count="14"] .chip {
    width: 36px;
    font-size: 0.5rem;
  }
}

@media (max-width: 720px) and (max-height: 700px) {
  .stats-sidebar {
    height: 50px;
    min-height: 50px;
    column-gap: 8px;
    padding: max(3px, env(safe-area-inset-top)) 9px 4px;
  }

  .stats-head h2 {
    font-size: 0.6rem;
  }

  .stats-section:first-child {
    gap: 8px;
  }

  .stat span {
    font-size: 0.46rem;
  }

  .stat strong,
  .stat-hero strong {
    font-size: 0.62rem;
  }

  .settings-inline,
  .reset-table,
  .fullscreen-toggle {
    font-size: 0.48rem;
  }

  .felt {
    grid-template-rows: minmax(132px, 1fr) 24px 200px 132px;
    gap: 4px;
    padding: 5px 10px 5px;
    overflow: hidden;
  }

  .roulette-wheel {
    --wheel-size: min(174px, 43vw);
  }

  .wheel-zone {
    align-items: center;
  }

  .pocket span {
    min-width: 12px;
    height: 12px;
    font-size: 0.46rem;
  }

  .wheel-center {
    inset: 38%;
  }

  .wheel-center strong {
    font-size: 1.08rem;
  }

  .status-pill {
    display: grid;
    align-items: center;
    min-height: 20px;
    padding: 0 4px;
    font-size: 0.5rem;
    line-height: 1.12;
  }

  .betting-zone {
    grid-template-rows: minmax(0, 1fr) 24px;
    gap: 4px;
    align-content: start;
  }

  .roulette-board {
    grid-template-columns: 26px repeat(12, minmax(0, 1fr)) 26px;
    grid-template-rows: repeat(3, 26px) 5px 25px repeat(2, 25px);
    gap: 2px;
    width: 100%;
  }

  .roulette-board.is-american {
    grid-template-rows: repeat(6, 11.7px) 5px 25px repeat(2, 25px);
  }

  .inside-lane {
    opacity: 0.58;
  }

  .bet-label {
    font-size: 0.5rem;
  }

  .outside-cell .bet-label,
  .column-cell .bet-label {
    font-size: 0.46rem;
  }

  .bet-cell.zero-double-split-cell .bet-label {
    font-size: 0.4rem;
  }

  .zero-cell .bet-label {
    font-size: 0.74rem;
  }

  .double-zero-cell .bet-label {
    font-size: 0.58rem;
  }

  .bet-cell .spot-stack {
    right: 1px;
    bottom: 1px;
    max-width: calc(100% - 2px);
  }

  .bet-cell .spot-chip,
  .outside-cell .spot-chip,
  .zero-cell .spot-chip {
    width: 10px;
    margin-left: -3px;
    font-size: 0.15rem;
  }

  .inside-bet .spot-chip {
    width: 8px;
    margin-left: -2px;
    font-size: 0.12rem;
  }

  .hit-marker {
    width: 12px;
  }

  .table-wager-row,
  .table-wager {
    height: 24px;
  }

  .wager-chip {
    width: 30px;
    font-size: 0.42rem;
  }

  .controls {
    grid-template-rows: 16px 72px 36px;
    height: 132px;
    gap: 4px;
  }

  .wager-meta,
  .meter {
    min-height: 16px;
  }

  .meter strong {
    font-size: 0.72rem;
  }

  .wager-row {
    grid-template-columns: 1fr 38px;
    height: 72px;
    gap: 5px;
  }

  .chips {
    height: 72px;
    max-width: 286px;
    gap: 3px;
  }

  .chip,
  .chips[data-count="8"] .chip,
  .chips[data-count="9"] .chip,
  .chips[data-count="10"] .chip,
  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip,
  .chips[data-count="14"] .chip {
    width: 34px;
    font-size: 0.48rem;
  }

  .clear-button {
    min-height: 36px;
    font-size: 0.98rem;
  }

  .chip.is-selected,
  .chip.is-selected:hover,
  .chip.is-selected:focus-visible {
    transform: none;
  }

  .actions-panel {
    height: 36px;
    gap: 6px;
  }

  .action,
  .ghost-button {
    min-height: 32px;
    font-size: 0.66rem;
  }
}

@media (max-width: 340px) and (max-height: 700px) {
  .felt {
    padding-right: 8px;
    padding-left: 8px;
  }

  .roulette-board {
    grid-template-columns: 24px repeat(12, minmax(0, 1fr)) 24px;
  }

  .wager-row {
    grid-template-columns: 1fr 36px;
    gap: 4px;
  }

  .chips {
    max-width: 248px;
  }

  .chip,
  .chips[data-count="8"] .chip,
  .chips[data-count="9"] .chip,
  .chips[data-count="10"] .chip,
  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip,
  .chips[data-count="14"] .chip {
    width: 32px;
    font-size: 0.44rem;
  }

  .settings-inline,
  .reset-table,
  .fullscreen-toggle {
    font-size: 0.46rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
