:root {
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --felt: #1a4d3e;
  --felt-dark: #0f2e26;
  --felt-light: #2a6b56;
  --cream: #f3e9d8;
  --cream-mid: #e8dcc8;
  --cream-shadow: #c9b89e;
  --ink: #1c1410;
  --red-digital: #ff3b3b;
  --gold: #d4af37;
  --gold-mid: #b8962e;
  --gold-dark: #7a6220;
  --crimson: #9b1b30;
  --frame-outer: linear-gradient(145deg, #f0e6b8 0%, #d4af37 40%, #8a7020 100%);
  --chip-blue: #1e5a8a;
  --chip-red: #b22222;
  --chip-white: #e8e4dc;
  --chip-green: #1f6b3a;
  --chip-purple: #5c2d6b;
  --die-red: #c41e3a;
  --die-red-dark: #7a0f1f;
  --shadow: rgba(0, 0, 0, 0.5);
  /* One size for all pip dice on the table and in the dome */
  --board-die-size: 26px;
  --board-row-gap: 10px;
  --board-section-gap: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--cream);
  background: #0a1210;
  background-image:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(42, 107, 86, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, #0d1815 0%, #0a1210 40%, #050807 100%);
  line-height: 1.45;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* —— Site header —— */
.site-header {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #1a0f14 0%, #120a0d 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 8px 32px var(--shadow);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.site-header__inner .logo-block:hover .logo-block__mark {
  filter: brightness(1.06);
}

.logo-block {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-block__mark {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff8e8 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-block__tag {
  font-size: 0.8rem;
  color: rgba(243, 233, 216, 0.45);
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  color: rgba(243, 233, 216, 0.65);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover {
  color: var(--cream);
  background: rgba(212, 175, 55, 0.08);
}

.main-nav a.is-active {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-ghost {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: 1px solid rgba(243, 233, 216, 0.25);
  color: var(--cream);
  border-radius: 4px;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-primary {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  background: linear-gradient(180deg, var(--gold-mid) 0%, var(--gold-dark) 100%);
  border: none;
  color: #1a1510;
  border-radius: 4px;
  cursor: pointer;
}

.breadcrumb-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.4rem 1.5rem 0.85rem;
  font-size: 0.82rem;
  color: rgba(243, 233, 216, 0.4);
}

.breadcrumb-bar span {
  color: rgba(243, 233, 216, 0.65);
}

.breadcrumb-bar a {
  color: rgba(243, 233, 216, 0.55);
  text-decoration: none;
}

.breadcrumb-bar a:hover {
  color: var(--gold);
}

/* —— Pit rail (casino table HUD) —— */
.pit-rail {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Stack ribbon (your stack + denomination live in .pit-rail on Sic Bo) */
.stack-ribbon__title {
  flex: 0 0 auto;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.55);
}

.stack-ribbon__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.stack-ribbon__stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.55rem;
  margin: 0;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(212, 175, 55, 0.16);
}

.stack-ribbon__stat:first-of-type {
  padding-left: 0;
  border-left: none;
}

.stack-ribbon__stat dt {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(243, 233, 216, 0.4);
  font-weight: 500;
}

.stack-ribbon__stat dd {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  color: #c8e6c9;
  letter-spacing: 0.02em;
}

.stack-ribbon__denom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex: 0 1 auto;
  min-width: 0;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(212, 175, 55, 0.16);
}

.stack-ribbon__denom--pit {
  position: relative;
  z-index: 2;
}

.stack-ribbon__denom--pit .denom-picker__panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.pit-rail__controls .stack-ribbon--stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding-right: 0.65rem;
  margin-right: 0.15rem;
  border-right: 1px solid rgba(212, 175, 55, 0.16);
}

.pit-rail__controls .stack-ribbon--stack .stack-ribbon__stats {
  flex: 0 1 auto;
}

.pit-rail__controls .stack-ribbon__toast {
  flex: 1 1 10rem;
  margin: 0;
  margin-left: auto;
  min-width: 0;
  text-align: right;
}

.pit-rail__controls .stack-ribbon--stack .pit-toast {
  margin-top: 0;
}

.stack-ribbon__denom-label {
  flex: 0 0 auto;
  font-family: var(--font-serif);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.45);
  white-space: nowrap;
}

.denom-picker {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.denom-picker__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.5rem 0.22rem;
  margin: 0;
  border: 1px solid rgba(196, 163, 90, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(40, 34, 26, 0.9) 0%, rgba(22, 18, 14, 0.95) 100%);
  cursor: pointer;
  font: inherit;
  color: rgba(243, 233, 216, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.denom-picker__trigger:hover {
  border-color: rgba(212, 175, 55, 0.45);
}

.denom-picker__trigger:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.55);
  outline-offset: 2px;
}

.denom-picker__display {
  pointer-events: none;
}

.denom-picker__display.chip {
  width: 40px;
  height: 40px;
}

.denom-picker__hint {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.5);
}

.denom-picker__panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  right: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(196, 163, 90, 0.35);
  background: linear-gradient(180deg, rgba(28, 38, 22, 0.98) 0%, rgba(22, 18, 14, 0.99) 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.denom-picker__chips {
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  max-width: min(100vw - 2rem, 22rem);
}

.denom-picker__chips .chip {
  width: 40px;
  height: 40px;
}

.denom-picker__chips .chip-value span {
  font-size: 0.52rem;
}

.stack-ribbon__chips.chips-tray--value {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  gap: 0.4rem;
}

.stack-ribbon__chips .chip {
  width: 40px;
  height: 40px;
}

.stack-ribbon__chips .chip-value span {
  font-size: 0.52rem;
}

.pit-rail__frame {
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(160deg, rgba(200, 175, 120, 0.35) 0%, rgba(80, 65, 45, 0.5) 50%, rgba(30, 24, 18, 0.85) 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pit-rail__inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 11px;
  overflow: visible;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(42, 107, 86, 0.18) 0%, transparent 55%),
    linear-gradient(185deg, #162220 0%, #0c1210 40%, #070a09 100%);
  border: 1px solid rgba(0, 0, 0, 0.5);
}

/* Your stack, seat/limits, denomination, timer, roll — one row */
.pit-rail__controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.35rem;
  padding: 1.4rem 1.55rem 1.5rem;
  background: linear-gradient(180deg, rgba(8, 14, 12, 0.55) 0%, rgba(6, 10, 9, 0.92) 100%);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wallet-pnl.is-pos {
  color: #7dffb3 !important;
}

.wallet-pnl.is-neg {
  color: #ff8a8a !important;
}

.wallet-last {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.38rem;
  text-align: right;
  font-size: 0.72rem;
  font-weight: 600;
}

.wallet-last__row--dice {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.wallet-last__row--detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  justify-content: flex-end;
}

.wallet-last__combo {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: rgba(243, 233, 216, 0.72);
}

.wallet-last__total {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: rgba(243, 233, 216, 0.92);
}

.wallet-last__zone {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.wallet-last__zone--small {
  color: #b8f5d0;
  background: rgba(42, 107, 86, 0.45);
  border-color: rgba(120, 200, 160, 0.35);
}

.wallet-last__zone--big {
  color: #ffd0d8;
  background: rgba(155, 27, 48, 0.4);
  border-color: rgba(255, 160, 170, 0.3);
}

.wallet-last__zone--triple {
  color: #f5e6b8;
  background: rgba(184, 150, 74, 0.35);
  border-color: rgba(212, 175, 55, 0.45);
}

.wallet-last__row--meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  justify-content: flex-end;
  align-items: baseline;
}

.wallet-last__sum {
  font-family: var(--font-serif);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(243, 233, 216, 0.88);
  letter-spacing: 0.04em;
}

.wallet-last__net {
  font-family: var(--font-serif);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pit-toast {
  margin: 0.55rem 0 0;
  min-height: 1.15em;
  font-size: 0.72rem;
  color: #e8b896;
  letter-spacing: 0.02em;
}

.pit-table-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem 1.25rem;
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
}

.pit-table-meta__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.4rem;
  background: linear-gradient(180deg, rgba(50, 42, 28, 0.95) 0%, rgba(28, 24, 18, 0.98) 100%);
  border: 1px solid rgba(196, 163, 90, 0.35);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pit-table-meta__badge-k {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.4);
}

.pit-table-meta__badge-v {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #e8d5a8;
  line-height: 1;
  min-width: 1.25em;
}

.pit-table-meta__limits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.65rem 1.15rem;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: rgba(243, 233, 216, 0.55);
}

.pit-table-meta__limits li span {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.35);
  margin-bottom: 0.15rem;
}

.pit-table-meta__limits strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f0e6d4;
}

#cur-bet {
  color: #d4c4a8;
}

.pit-timer {
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 380px;
}

.pit-timer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pit-timer__label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.48);
}

.pit-timer__clock {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.pit-timer__value {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f0d78c;
  line-height: 1;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.pit-timer__unit {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.35);
}

.pit-timer__track {
  --bet-p: 1;
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.pit-timer__fill {
  display: block;
  height: 100%;
  width: calc(var(--bet-p) * 100%);
  border-radius: 999px;
  background: linear-gradient(90deg, #5a7020 0%, #c9a227 42%, #fff3c4 100%);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
  transition: width 0.35s ease;
}

.pit-timer.is-urgent .pit-timer__fill {
  background: linear-gradient(90deg, #8a2818 0%, #f0a030 55%, #ffe8a8 100%);
  box-shadow: 0 0 18px rgba(255, 140, 60, 0.5);
}

.pit-timer.is-urgent .pit-timer__value {
  color: #ffd8a8;
}

.pit-timer.is-rolling .pit-timer__track {
  opacity: 0.4;
}

.pit-timer.is-rolling .pit-timer__value {
  color: rgba(243, 233, 216, 0.35);
}

.pit-timer.is-rolling .pit-timer__unit {
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin: 0;
}

.pit-timer__hint {
  margin: 0.45rem 0 0;
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  color: rgba(243, 233, 216, 0.42);
}

.roll-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 0;
}

.roll-mode__label {
  font-family: var(--font-serif);
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.45);
}

.roll-mode__toggle {
  display: inline-flex;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(196, 163, 90, 0.35);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.roll-mode__btn {
  font-family: var(--font-serif);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.38rem 0.65rem;
  margin: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: rgba(243, 233, 216, 0.45);
  background: transparent;
  transition: background 0.18s, color 0.18s;
}

.roll-mode__btn:hover {
  color: rgba(243, 233, 216, 0.75);
}

.roll-mode__btn.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(40, 34, 26, 0.95) 0%, rgba(22, 18, 14, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.roll-mode__btn:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.55);
  outline-offset: 2px;
}

.pit-roll-btn.roll-btn {
  flex: 0 0 auto;
  min-width: 9.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-family: var(--font-serif);
  padding: 0.85rem 1.5rem;
  background: linear-gradient(165deg, #9b1b30 0%, #5c0f1c 48%, #3a0a12 100%);
  border: 1px solid rgba(232, 200, 140, 0.35);
  color: #fffaf5;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.pit-roll-btn__main {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pit-roll-btn__sub {
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(255, 250, 245, 0.45);
}

.pit-roll-btn.roll-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 220, 160, 0.45);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(155, 27, 48, 0.35);
}

.pit-roll-btn.roll-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.chips-tray {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chips-tray--table,
.chips-tray--value {
  flex: 0 1 auto;
  justify-content: flex-start;
  min-width: 0;
  flex-wrap: nowrap;
}

.chips-tray--value {
  flex: 1 1 auto;
}

.chip {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 3px 6px rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.chip:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 3px 6px rgba(255, 255, 255, 0.28);
}

.chip.is-selected {
  outline: 2px solid rgba(255, 224, 140, 0.95);
  outline-offset: 4px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 6px 22px rgba(212, 175, 55, 0.35);
}

@media (max-width: 900px) {
  .pit-rail__controls {
    flex-wrap: wrap;
  }

  .pit-table-meta {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .pit-rail__controls .live-roll--pit {
    flex: 1 1 100%;
    max-width: none;
  }

  .pit-timer {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }

  .roll-mode {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(212, 175, 55, 0.12);
  }

  .pit-roll-btn.roll-btn {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .pit-rail__controls .stack-ribbon--stack {
    flex-basis: 100%;
    justify-content: center;
    padding-right: 0;
    margin-right: 0;
    border-right: none;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  }

  .pit-rail__controls .stack-ribbon__toast {
    flex-basis: 100%;
    margin-left: 0;
    text-align: center;
  }

  .pit-rail__controls .stack-ribbon__denom {
    flex-basis: 100%;
    justify-content: center;
    padding-left: 0;
    border-left: none;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(212, 175, 55, 0.12);
  }
}

@media (max-width: 720px) {
  .pit-rail__controls {
    padding: 1.1rem 1.15rem 1.2rem;
  }

  .pit-table-meta__limits {
    flex-wrap: wrap;
  }

  .stack-ribbon__chips .chip {
    width: 38px;
    height: 38px;
  }

  .denom-picker__display.chip {
    width: 38px;
    height: 38px;
  }

  .denom-picker__chips .chip {
    width: 38px;
    height: 38px;
  }
}

/* Table number chips — one color per table */
.chip-table {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.chip-table--1 {
  background: radial-gradient(circle at 32% 32%, #7a9fd4, #2a4f9a);
  border-color: rgba(255, 255, 255, 0.45);
}
.chip-table--2 {
  background: radial-gradient(circle at 32% 32%, #e87878, #9a2020);
  border-color: rgba(255, 255, 255, 0.45);
}
.chip-table--3 {
  background: radial-gradient(circle at 32% 32%, #f0f0f0, #9a9a9a);
  border-color: #777;
  color: #222;
  text-shadow: none;
}
.chip-table--4 {
  background: radial-gradient(circle at 32% 32%, #5ecf8f, #1a6b3a);
  border-color: rgba(255, 255, 255, 0.45);
}
.chip-table--5 {
  background: radial-gradient(circle at 32% 32%, #c895e8, #5c2d7a);
  border-color: rgba(255, 255, 255, 0.45);
}
.chip-table--6 {
  background: radial-gradient(circle at 32% 32%, #f0c860, #a67c00);
  border-color: rgba(255, 255, 255, 0.45);
  color: #2a1a05;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Value / denomination chips — color by price tier */
.chip-value span {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  pointer-events: none;
  color: inherit;
}

.chip-value--5 {
  background: radial-gradient(circle at 32% 32%, #5aaee0, #1e5a8a);
  color: #fff;
}
.chip-value--10 {
  background: radial-gradient(circle at 32% 32%, #e85a6a, #a31d2d);
  color: #fff;
}
.chip-value--25 {
  background: radial-gradient(circle at 32% 32%, #ffffff, #c8c4bc);
  color: #222;
  border-color: #888;
}
.chip-value--50 {
  background: radial-gradient(circle at 32% 32%, #4ecf7a, #1f6b3a);
  color: #fff;
}
.chip-value--100 {
  background: radial-gradient(circle at 32% 32%, #c080e8, #5c2d6b);
  color: #fff;
}
.chip-value--500 {
  background: radial-gradient(circle at 32% 32%, #f4d080, #b8860b);
  color: #2a1a05;
  border-color: rgba(80, 60, 10, 0.45);
}
.chip-value--500 span {
  font-size: 0.52rem;
}

@keyframes dome-shake {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  12% {
    transform: translate3d(-4px, -2px, 0) rotate(-6deg);
  }
  24% {
    transform: translate3d(4px, 2px, 0) rotate(6deg);
  }
  36% {
    transform: translate3d(-3px, 2px, 0) rotate(-5deg);
  }
  48% {
    transform: translate3d(3px, -2px, 0) rotate(5deg);
  }
  60% {
    transform: translate3d(-2px, 0, 0) rotate(-3deg);
  }
  72% {
    transform: translate3d(2px, 1px, 0) rotate(3deg);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

#dome.rolling {
  animation: dome-shake 1s cubic-bezier(0.33, 1, 0.68, 1) both;
}

/* —— Pip dice (3D “rounded cap” casino style) —— */
.die-face {
  --die-size: 28px;
  width: var(--die-size);
  height: var(--die-size);
  flex-shrink: 0;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: calc(var(--die-size) * 0.12);
  gap: calc(var(--die-size) * 0.04);
  position: relative;
  border-radius: calc(var(--die-size) * 0.3);
  background:
    radial-gradient(ellipse 95% 55% at 50% 6%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.12) 38%, transparent 52%),
    linear-gradient(168deg, #f07884 0%, var(--die-red) 38%, #5c1018 88%, #2a060c 100%);
  border: 1px solid rgba(45, 12, 18, 0.55);
  border-top-color: rgba(255, 220, 220, 0.55);
  border-bottom-color: rgba(0, 0, 0, 0.45);
  box-shadow:
    0 calc(var(--die-size) * 0.09) calc(var(--die-size) * 0.12) rgba(0, 0, 0, 0.55),
    0 calc(var(--die-size) * 0.02) 0 rgba(255, 255, 255, 0.4) inset,
    inset 0 -5px 10px rgba(0, 0, 0, 0.42),
    inset 0 4px 12px rgba(255, 255, 255, 0.38);
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.die-face.die-tumbling {
  animation: die-tumble 0.11s ease-in-out infinite;
  transition: none;
}

.die-face.is-settling {
  transform: scale(1.06);
}

@keyframes die-tumble {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg) scale(0.94);
  }
  50% {
    transform: translateY(-1px) rotate(6deg) scale(1.04);
  }
}

.die-face .pip {
  position: relative;
  z-index: 1;
  width: calc(var(--die-size) * 0.2);
  height: calc(var(--die-size) * 0.2);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #d8d8d8 55%, #9a9a9a 100%);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.55),
    inset 0 -1px 2px rgba(0, 0, 0, 0.25);
  align-self: center;
  justify-self: center;
  opacity: 0;
}

.die-face.face-1 .pip:nth-child(5) {
  opacity: 1;
}
.die-face.face-2 .pip:nth-child(1),
.die-face.face-2 .pip:nth-child(9) {
  opacity: 1;
}
.die-face.face-3 .pip:nth-child(1),
.die-face.face-3 .pip:nth-child(5),
.die-face.face-3 .pip:nth-child(9) {
  opacity: 1;
}
.die-face.face-4 .pip:nth-child(1),
.die-face.face-4 .pip:nth-child(3),
.die-face.face-4 .pip:nth-child(7),
.die-face.face-4 .pip:nth-child(9) {
  opacity: 1;
}
.die-face.face-5 .pip:nth-child(1),
.die-face.face-5 .pip:nth-child(3),
.die-face.face-5 .pip:nth-child(5),
.die-face.face-5 .pip:nth-child(7),
.die-face.face-5 .pip:nth-child(9) {
  opacity: 1;
}
.die-face.face-6 .pip:nth-child(1),
.die-face.face-6 .pip:nth-child(3),
.die-face.face-6 .pip:nth-child(4),
.die-face.face-6 .pip:nth-child(6),
.die-face.face-6 .pip:nth-child(7),
.die-face.face-6 .pip:nth-child(9) {
  opacity: 1;
}

.die-board,
.die-sm {
  --die-size: var(--board-die-size);
}

/* Compact dice for wallet “last roll” strip */
.die-last {
  --die-size: 16px;
}

.die-xs {
  --die-size: 13px;
}
.die-md {
  --die-size: 26px;
}
.die-lg {
  --die-size: 44px;
}
.die-xl {
  --die-size: 52px;
}

/* —— Main layout —— */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.layout-main {
  display: grid;
  grid-template-columns: 1fr minmax(268px, 320px);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .layout-main {
    grid-template-columns: 1fr;
  }
}

.board-shell {
  padding: 11px;
  border-radius: 18px;
  background: var(--frame-outer);
  box-shadow: 0 24px 64px var(--shadow), inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.board {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(42, 107, 86, 0.5) 0%, transparent 55%),
    linear-gradient(168deg, var(--felt-light) 0%, var(--felt) 45%, var(--felt-dark) 100%);
  border-radius: 12px;
  padding: 1.2rem 1.25rem 1.45rem;
  border: 1px solid rgba(15, 60, 45, 0.6);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: var(--board-section-gap);
}

.board::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.board > * {
  position: relative;
  z-index: 1;
}

.board-title {
  text-align: center;
  margin-bottom: 0;
}

.board-title__script {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.2rem, 6vw, 3.25rem);
  color: #fff8e8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55), 0 0 40px rgba(212, 175, 55, 0.25);
  line-height: 1.1;
}

.board-title__sub {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.45);
  margin-top: 0.2rem;
}

.board-title__rule {
  width: min(140px, 40%);
  height: 1px;
  margin: 0.65rem auto 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.35) 20%,
    rgba(243, 233, 216, 0.65) 50%,
    rgba(212, 175, 55, 0.35) 80%,
    transparent 100%
  );
  border-radius: 1px;
}

.board .cell {
  position: relative;
}

.cell {
  background: linear-gradient(155deg, #faf6ef 0%, var(--cream) 38%, var(--cream-mid) 100%);
  color: var(--ink);
  border-radius: 7px;
  border: 1px solid rgba(95, 75, 40, 0.22);
  padding: 0.48rem 0.34rem;
  min-height: 2.35rem;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.28;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 4px rgba(0, 0, 0, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.14);
  transition: background 0.2s, box-shadow 0.2s;
}

.cell-bet {
  position: absolute;
  bottom: 5px;
  right: 5px;
  z-index: 3;
  font-family: var(--font-serif);
  font-size: clamp(0.65rem, 1.5vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(180deg, #1e6091 0%, #0d3d5c 100%);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  min-width: 2.4em;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  pointer-events: none;
  line-height: 1.2;
}

.cell.has-bet {
  padding-bottom: 1.85rem;
}

.cell.is-win {
  background: linear-gradient(165deg, #fffef8 0%, #e6f7ee 42%, #c8edd8 100%);
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 18px rgba(125, 255, 179, 0.55),
    0 0 28px rgba(212, 175, 55, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.cell .big-label {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--crimson);
}

.cell .sub {
  font-size: 0.6rem;
  color: #3d3428;
  margin-top: 0.2rem;
}

.cell .pay {
  font-family: var(--font-serif);
  font-size: 0.66rem;
  color: var(--gold-dark);
  font-weight: 600;
}

.zone-side {
  min-height: 142px;
  max-width: 7.75rem;
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.55rem 0.4rem !important;
  gap: 0.12rem;
}

.zone-side--sm {
  border-left: 2px solid rgba(42, 107, 86, 0.45);
  box-shadow: inset 4px 0 12px rgba(42, 107, 86, 0.08);
}

.zone-side--bg {
  border-right: 2px solid rgba(155, 27, 48, 0.35);
  box-shadow: inset -4px 0 12px rgba(155, 27, 48, 0.06);
}

.zone-side__range {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.15rem;
  margin-top: 0.25rem;
  width: 100%;
}

.zone-side__range-label {
  font-family: var(--font-serif);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(61, 52, 40, 0.55);
}

.zone-side__nums {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.65rem, 4.2vw, 2.65rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--crimson);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.zone-side__nums.zone-side__nums--spread {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: clamp(0.88rem, 1.85vw, 1.22rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.12;
  color: var(--crimson);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.zone-side__nums--spread .zone-side__dash {
  opacity: 0.52;
  font-weight: 600;
  font-size: 0.58em;
  flex: 0 0 auto;
  align-self: center;
  padding: 0 0.1em;
}

.zone-side__nums--spread .zone-side__lo,
.zone-side__nums--spread .zone-side__hi {
  flex: 0 0 auto;
  min-width: 0;
}

.zone-side .big-label {
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  letter-spacing: 0.1em;
  margin-top: 0.05rem;
}

.zone-side .pay {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  margin-top: 0.25rem;
}

.zone-side .sub {
  font-size: clamp(0.68rem, 1.35vw, 0.82rem);
  line-height: 1.35;
  margin-top: 0.35rem;
  max-width: 11rem;
}

.zone-side.has-bet {
  padding-bottom: 2.1rem !important;
}

.row-top {
  display: grid;
  grid-template-columns:
    minmax(72px, 0.72fr)
    minmax(4rem, 5rem)
    minmax(15rem, 2.45fr)
    minmax(4rem, 5rem)
    minmax(72px, 0.72fr);
  gap: var(--board-row-gap);
  margin: 0;
  align-items: stretch;
  width: 100%;
  min-width: min(100%, 720px);
}

@media (max-width: 720px) {
  .row-top {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }
  .zone-side {
    max-width: none;
  }
  .triples-block {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .triples-block__inner {
    grid-template-columns: 1fr;
  }
}

.doubles-col {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: var(--board-row-gap);
  width: 100%;
  max-width: 5rem;
  min-width: 4rem;
  justify-self: center;
  box-sizing: border-box;
}

.doubles-col .cell {
  padding: 0.3rem 0.12rem;
  font-size: 0.62rem;
  min-width: 0;
  overflow: hidden;
}

.double-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.triples-block {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 16rem;
  min-height: 158px;
}

.triples-block__inner {
  display: grid;
  grid-template-columns: minmax(6rem, 1.2fr) minmax(148px, 1.95fr) minmax(6rem, 1.2fr);
  gap: var(--board-row-gap);
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.triple-col {
  display: flex;
  flex-direction: column;
  gap: var(--board-row-gap);
}

.triple-col .cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.42rem 0.22rem;
  font-size: 0.58rem;
  min-height: 2.75rem;
}

.triple-col--center {
  display: flex;
  align-items: stretch;
}

.triple-col--center .any-triple {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100%;
  gap: 0.35rem;
}

.triple-dice {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 0.2rem;
}

.triple-dice--any {
  gap: 6px;
  margin-bottom: 0;
}

.any-triple {
  font-size: 0.72rem !important;
  padding: 0.5rem 0.45rem 0.55rem !important;
  min-height: auto !important;
}

.any-triple__title {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--crimson);
}

.any-triple__hint {
  font-family: var(--font-serif);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(61, 52, 40, 0.55);
  margin: 0.05rem 0 0.15rem;
}

.any-triple-combos {
  --board-die-size: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 0.38rem;
  width: 100%;
  max-width: 100%;
  margin: 0.1rem 0 0.05rem;
  justify-items: stretch;
  min-width: 0;
}

.any-triple-combos .triple-dice--any {
  gap: 3px;
  max-width: 100%;
  min-width: 0;
}

.any-triple-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.18rem 0.1rem;
  border-radius: 6px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.42) 0%, rgba(232, 220, 200, 0.35) 100%);
  border: 1px solid rgba(95, 75, 40, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.any-triple__pay {
  font-size: clamp(0.78rem, 1.45vw, 0.95rem) !important;
  margin-top: 0.2rem;
}

.row-totals {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: var(--board-row-gap);
  margin: 0;
}

.row-totals .cell {
  padding: 0.48rem 0.16rem;
  min-height: 2.65rem;
}

.row-totals .pay {
  font-size: clamp(0.62rem, 1.25vw, 0.78rem) !important;
}

.row-totals .num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.82rem, 1.55vw, 1.02rem);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.two-dice-row {
  display: grid;
  grid-template-columns: 56px repeat(15, minmax(0, 1fr));
  gap: var(--board-row-gap);
  margin: 0;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Wrapper only holds pair cells in DOM; children participate in parent grid */
.two-dice-pairs {
  display: contents;
}

.two-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, rgba(243, 233, 216, 0.12) 0%, rgba(15, 46, 38, 0.45) 100%);
  border: 0.5px dashed rgba(212, 175, 55, 0.45);
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(243, 233, 216, 0.85);
  padding: 0.3rem 0.2rem;
}

.two-label em {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
  margin-top: 0.15rem;
}

.pair-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.38rem 0.1rem !important;
  min-height: 3.15rem;
  min-width: 0;
  border: 0.5px solid rgba(95, 75, 40, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 3px rgba(0, 0, 0, 0.03),
    0 1px 5px rgba(0, 0, 0, 0.1);
}

.two-dice-row .pair-cell.is-win {
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 14px rgba(125, 255, 179, 0.45),
    inset 0 1px 0 #fff;
}

/* Two dice per tile: stacked vertically (row of tiles stays horizontal) */
.pair-cell .pip-dice {
  flex-direction: column;
  gap: 4px;
}

.pip-dice {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.row-singles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--board-row-gap);
  margin: 0;
}

.single-cell {
  padding: 0.52rem 0.22rem !important;
  min-height: 3.5rem;
}

.single-cell .name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.68rem, 1.25vw, 0.82rem);
  letter-spacing: 0.08em;
  color: var(--crimson);
  margin-top: 0.22rem;
}

.payout-legend {
  text-align: center;
  margin: 0;
  padding-top: 0.15rem;
  font-size: 0.68rem;
  color: rgba(243, 233, 216, 0.62);
  letter-spacing: 0.03em;
}

.chip-selector {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
}

.chip-selector__label {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.55);
}

.chip-selector__value {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold);
}

/* History panel: live cage + last rolls list */
.history-panel {
  --hist-brass: #b8964a;
  --hist-brass-dim: rgba(184, 150, 74, 0.35);

  position: sticky;
  top: 0.5rem;
  min-width: 248px;
  max-width: 320px;
  padding: 2px;
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(200, 170, 110, 0.45) 0%, rgba(80, 55, 40, 0.5) 100%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.history-panel__live.live-roll--pit {
  flex: 0 0 auto;
  max-width: none;
  width: 100%;
  border-radius: 2px 2px 0 0;
  border-bottom: 1px solid var(--hist-brass-dim);
  box-sizing: border-box;
}

.history-panel__head {
  padding: 0.85rem 0.75rem 0.55rem;
  background: linear-gradient(180deg, #25161c 0%, #1a0e12 100%);
  border-radius: 0;
  border-bottom: 1px solid var(--hist-brass-dim);
  text-align: center;
}

.history-panel__title {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(232, 218, 195, 0.88);
  margin: 0 0 0.35rem;
}

.history-panel__sub {
  margin: 0;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: rgba(243, 233, 216, 0.38);
}

.history-panel__legend {
  margin: 0;
  padding: 0.45rem 0.65rem 0.5rem;
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  color: rgba(243, 233, 216, 0.4);
  background: #12090c;
  border-bottom: 1px solid var(--hist-brass-dim);
  line-height: 1.5;
}

.history-panel__dot {
  margin: 0 0.2rem;
  opacity: 0.45;
}

.history-panel__key {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  line-height: 1.1em;
  text-align: center;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.62rem;
  margin-right: 0.15rem;
  vertical-align: middle;
}

.history-panel__key--s {
  background: rgba(42, 107, 86, 0.55);
  color: #c8f0e0;
}

.history-panel__key--b {
  background: rgba(120, 40, 55, 0.55);
  color: #ffd0d8;
}

.history-panel__key--t {
  background: rgba(184, 150, 74, 0.45);
  color: #1a1510;
}

/* Stacked roll cards — newest first */
.history-road {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.65rem 0.75rem;
  background: linear-gradient(180deg, #0f080a 0%, #060304 100%);
  border-bottom: 1px solid var(--hist-brass-dim);
  border-radius: 0 0 2px 2px;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.history-roll {
  padding: 0.45rem 0.55rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(184, 150, 74, 0.22);
  background: linear-gradient(165deg, rgba(22, 16, 20, 0.95) 0%, rgba(10, 6, 8, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
  min-width: 0;
}

.history-roll--small {
  border-color: rgba(80, 160, 120, 0.35);
}

.history-roll--big {
  border-color: rgba(180, 60, 80, 0.35);
}

.history-roll--triple {
  border-color: rgba(212, 175, 55, 0.45);
}

/* Single-line history row: wrapper skips box so .wallet-last column flex never stacks children */
.wallet-last.wallet-last--single {
  display: contents;
}

.wallet-last__inline {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem 0.45rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.history-panel .wallet-last__inline {
  text-align: left;
  row-gap: 0.35rem;
}

.history-panel .wallet-last__inline .die-last {
  --die-size: 16px;
  flex-shrink: 0;
}

.history-panel .wallet-last__inline .wallet-last__combo {
  font-size: 0.78rem;
  margin-left: 0.1rem;
}

.history-panel .wallet-last__inline .wallet-last__total {
  font-size: 0.95rem;
}

.history-panel .wallet-last__inline .wallet-last__zone {
  font-size: 0.68rem;
  padding: 0.18rem 0.45rem;
}

/* Net / “No bets” on its own row — avoids cramped one-line overflow + scrollbars */
.history-panel .wallet-last__inline .wallet-last__net {
  flex: 1 1 100%;
  font-size: 0.78rem;
  margin-left: 0;
  margin-top: 0.1rem;
  padding-top: 0.35rem;
  text-align: right;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
}

/* Live dice — cage on felt tray */
.live-roll {
  padding: 0.65rem 0.65rem 0.85rem;
  background: linear-gradient(180deg, #1a1216 0%, #0d090b 100%);
  border-radius: 0 0 2px 2px;
}

.live-roll__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.5);
  text-align: center;
}

.live-roll__stage {
  position: relative;
  padding: 0.5rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #0f0a0c 0%, #050304 100%);
  border: 1px solid rgba(184, 150, 74, 0.25);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.live-roll__felt {
  position: absolute;
  inset: 0.45rem;
  border-radius: 3px;
  background:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(42, 107, 86, 0.35) 0%, transparent 55%),
    linear-gradient(168deg, #152e26 0%, #0c1f1a 50%, #081510 100%);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.live-roll__brass {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(196, 163, 90, 0.55);
  border-radius: 2px;
  background: linear-gradient(145deg, rgba(220, 190, 120, 0.35) 0%, rgba(80, 60, 30, 0.5) 100%);
  pointer-events: none;
  z-index: 2;
}

.live-roll__brass--tl {
  top: 0.35rem;
  left: 0.35rem;
}
.live-roll__brass--tr {
  top: 0.35rem;
  right: 0.35rem;
}
.live-roll__brass--bl {
  bottom: 0.35rem;
  left: 0.35rem;
}
.live-roll__brass--br {
  bottom: 0.35rem;
  right: 0.35rem;
}

#dome.live-roll__cage,
.live-roll__cage {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 100%;
  max-width: 168px;
  min-height: 78px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  border-radius: 6px;
  background:
    radial-gradient(ellipse 100% 80% at 50% -10%, rgba(255, 255, 255, 0.15) 0%, transparent 45%),
    linear-gradient(175deg, rgba(38, 42, 48, 0.95) 0%, rgba(14, 16, 20, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    inset 0 -8px 20px rgba(0, 0, 0, 0.45),
    inset 0 3px 12px rgba(255, 255, 255, 0.06);
  transform-origin: 50% 60%;
}

#dome .die-board,
.live-roll__cage .die-board {
  --board-die-size: 30px;
}

.live-roll__caption {
  margin: 0.55rem 0 0;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.32);
  text-align: center;
}

/* Live cage embedded in pit controls row */
.live-roll--pit {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 210px;
  padding: 0.4rem 0.5rem 0.48rem;
  background: linear-gradient(180deg, rgba(26, 18, 22, 0.4) 0%, rgba(10, 8, 9, 0.92) 100%);
  border-radius: 8px;
  border: 1px solid rgba(184, 150, 74, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.live-roll--pit .live-roll__eyebrow {
  margin: 0 0 0.32rem;
  font-size: 0.48rem;
  letter-spacing: 0.18em;
}

.live-roll--pit .live-roll__stage {
  padding: 0.38rem;
}

.live-roll--pit .live-roll__caption {
  margin: 0.32rem 0 0;
  font-size: 0.48rem;
  letter-spacing: 0.1em;
}

.pit-rail__controls .live-roll__cage,
.history-panel .live-roll__cage {
  max-width: 100%;
  min-height: 62px;
  padding: 0.45rem 0.5rem;
  gap: 6px;
}

.pit-rail__controls #dome .die-board,
.history-panel #dome .die-board {
  --board-die-size: 24px;
}

/* Live cage in sidebar: larger dice */
.history-panel .live-roll__cage {
  min-height: 80px;
  padding: 0.55rem 0.65rem;
  gap: 10px;
}

.history-panel #dome .die-board {
  --board-die-size: 36px;
}

/* Player had a payout on this roll */
#dome.live-roll__cage--win {
  border-color: rgba(125, 255, 179, 0.65);
  background:
    radial-gradient(ellipse 100% 80% at 50% -10%, rgba(125, 255, 179, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(212, 175, 55, 0.12) 0%, transparent 45%),
    linear-gradient(175deg, rgba(42, 48, 44, 0.98) 0%, rgba(14, 22, 18, 0.99) 100%);
  box-shadow:
    0 0 0 1px rgba(125, 255, 179, 0.45),
    0 0 22px rgba(125, 255, 179, 0.4),
    0 0 36px rgba(212, 175, 55, 0.2),
    0 10px 28px rgba(0, 0, 0, 0.55),
    inset 0 -8px 20px rgba(0, 0, 0, 0.45),
    inset 0 3px 14px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.live-roll--pit .live-roll__felt {
  inset: 0.32rem;
}

.live-roll--pit .live-roll__brass {
  width: 11px;
  height: 11px;
}

.live-roll--pit .live-roll__brass--tl {
  top: 0.28rem;
  left: 0.28rem;
}
.live-roll--pit .live-roll__brass--tr {
  top: 0.28rem;
  right: 0.28rem;
}
.live-roll--pit .live-roll__brass--bl {
  bottom: 0.28rem;
  left: 0.28rem;
}
.live-roll--pit .live-roll__brass--br {
  bottom: 0.28rem;
  right: 0.28rem;
}

.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  font-size: 0.82rem;
  color: rgba(243, 233, 216, 0.4);
}

.site-footer h3 {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.55);
  margin-bottom: 0.6rem;
}

.site-footer ul {
  list-style: none;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.site-footer__copy {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 1rem;
  font-size: 0.75rem;
  color: rgba(243, 233, 216, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  #dome.rolling {
    animation: none;
  }

  .die-face.die-tumbling {
    animation: none;
  }
}

/* —— Sic Bo lobby (table picker) —— */
.page-lobby {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.lobby-main {
  flex: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  width: 100%;
}

.lobby-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.lobby-hero__script {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: #fff8e8;
  margin: 0 0 0.35rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.lobby-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(243, 233, 216, 0.92);
  margin: 0 0 0.65rem;
}

.lobby-hero__lead {
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(243, 233, 216, 0.55);
}

.lobby-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.lobby-summary__card {
  padding: 1rem 1.15rem;
  background: linear-gradient(180deg, rgba(20, 26, 28, 0.95) 0%, rgba(10, 12, 14, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.lobby-summary__card--accent {
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, rgba(35, 28, 22, 0.95) 0%, rgba(18, 14, 12, 0.98) 100%);
}

.lobby-summary__label {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243, 233, 216, 0.4);
  margin-bottom: 0.45rem;
}

.lobby-summary__value {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e8f5e9;
  line-height: 1.2;
}

.lobby-summary__card--accent .lobby-summary__value {
  color: #f0e4c4;
}

.lobby-summary__hint {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  color: rgba(243, 233, 216, 0.38);
  line-height: 1.35;
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}

.lobby-table-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.2rem 1.25rem;
  background: linear-gradient(165deg, rgba(42, 107, 86, 0.22) 0%, rgba(12, 18, 16, 0.96) 45%, rgba(8, 10, 10, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.lobby-table-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(42, 107, 86, 0.15);
}

.lobby-table-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.lobby-table-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff8e8;
}

.lobby-table-card__status {
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7dffb3;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(125, 255, 179, 0.35);
  border-radius: 3px;
}

.lobby-table-card__stats {
  margin: 0 0 1.1rem;
  flex: 1;
}

.lobby-table-card__stats > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lobby-table-card__stats > div:last-child {
  border-bottom: none;
}

.lobby-table-card__stats dt {
  font-size: 0.72rem;
  color: rgba(243, 233, 216, 0.45);
  font-weight: 500;
}

.lobby-table-card__stats dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(243, 233, 216, 0.88);
  text-align: right;
}

.lobby-table-card__cta {
  display: block;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1510;
  padding: 0.65rem 1rem;
  background: linear-gradient(180deg, var(--gold-mid) 0%, var(--gold-dark) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.lobby-table-card__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.25);
  color: #1a1510;
}

.lobby-disclaimer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(243, 233, 216, 0.32);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.page-lobby .site-footer {
  margin-top: auto;
}

/* —— Landing (home) —— */
.page-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.home-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.home-hero {
  max-width: 640px;
  text-align: center;
}

.home-hero__script {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.75rem, 8vw, 4rem);
  color: #fff8e8;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.home-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(243, 233, 216, 0.92);
  margin-bottom: 1rem;
}

.home-hero__lead {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.65;
  color: rgba(243, 233, 216, 0.65);
  margin-bottom: 2rem;
}

.home-cta {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1510;
  padding: 0.85rem 2.25rem;
  background: linear-gradient(180deg, var(--gold-mid) 0%, var(--gold-dark) 100%);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(212, 175, 55, 0.25);
  text-decoration: none;
  color: #1a1510;
}

.page-home .site-footer {
  margin-top: auto;
}
