/* ═══════════════════════════════════════════════════════════
   Craps Royale — style.css
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; }

/* ═══════════════════════════════════════════════════════════
   LOADING SCREEN
═══════════════════════════════════════════════════════════ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #080808;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.loading-dice {
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
}
.loading-die {
  font-size: clamp(36px, 5vw, 56px);
  color: #d4a843;
  animation: loadingDieSpin 1.2s ease-in-out infinite;
}
.loading-die:nth-child(2) {
  animation-delay: 0.3s;
}
@keyframes loadingDieSpin {
  0%, 100% { transform: rotateY(0deg) scale(1); opacity: 0.7; }
  50%      { transform: rotateY(180deg) scale(1.1); opacity: 1; }
}
.loading-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 3.5vw, 40px);
  font-weight: 900;
  color: #d4a843;
  letter-spacing: 0.12em;
  text-shadow: 0 0 30px rgba(212,168,67,0.3);
}
.loading-sub {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 1.8vw, 20px);
  font-weight: 700;
  color: rgba(212,168,67,0.5);
  letter-spacing: 0.3em;
  margin-top: -6px;
}
.loading-bar-track {
  width: clamp(180px, 30vw, 320px);
  height: 3px;
  background: rgba(212,168,67,0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4a843, #e8c46a);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.loading-text {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px, 1.2vw, 13px);
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
}

:root {
  --gold:       #d4a843;
  --gold-dim:   #8a7a5a;
  --gold-faint: rgba(212,168,67,0.12);
  --red:        #c41e3a;
  --green-felt: #0d5a30;
  --bg:         #080808;
  --bg2:        #0c0c0c;
  --text:       #f5f0e8;
  --font-d: 'Playfair Display', serif;
  --font-b: 'DM Sans', sans-serif;
  --font-n: 'Oswald', sans-serif;

  /* ── Responsive size tokens (base 1920px) ── */
  --chip-rack-size: clamp(36px, 2.81vw, 54px);
  --bet-chip-size:  clamp(26px, 1.98vw, 38px);
  --puck-size:      clamp(26px, 1.98vw, 38px);
  --icon-btn-size:  clamp(26px, 1.77vw, 34px);
  --bar-height:     clamp(42px, 2.92vw, 56px);
  --roll-btn-w:     clamp(120px, 8.85vw, 170px);
  --qb-btn-w:       clamp(44px, 3.33vw, 64px);
  --tbl-gap:        clamp(4px, 0.42vw, 8px);
  --tbl-pad:        clamp(4px, 0.42vw, 8px);
}

html, body { width:100%; height:100%; overflow:hidden; overscroll-behavior:none; background:var(--bg); color:var(--text); font-family:var(--font-b); -webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; -webkit-touch-callout:none; }

.screen { position:fixed; inset:0; display:none; }
.screen.active { display:flex; }

/* ══════════════════════════════════════════
   SETUP SCREEN — responsive 2-column
══════════════════════════════════════════ */
#setup-screen {
  align-items: stretch; justify-content: stretch;
  background: radial-gradient(ellipse at center, #1a2a1a 0%, #0a0a0a 70%);
  overflow: hidden;
}
.setup-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.45); pointer-events:none; }

/* ═══ SETUP SCREEN — Desktop ambient effects ═══ */

/* Spotlights that drift smoothly left-right across the setup screen */
@keyframes setup-spot-drift {
  0%   { transform: translateX(-30%); }
  50%  { transform: translateX(30%); }
  100% { transform: translateX(-30%); }
}
@keyframes setup-spot-drift-reverse {
  0%   { transform: translateX(30%); }
  50%  { transform: translateX(-30%); }
  100% { transform: translateX(30%); }
}
#setup-spotlight {
  position: absolute; inset: -50%; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.5s ease;
}
#setup-spotlight.active { opacity: 1; }
#setup-spotlight .spot {
  position: absolute; width: 50%; height: 50%;
  border-radius: 50%;
  filter: blur(80px);
}
#setup-spotlight .spot:nth-child(1) {
  top: 10%; left: 20%;
  background: radial-gradient(circle, rgba(212,168,67,0.35) 0%, transparent 70%);
  animation: setup-spot-drift 10s ease-in-out infinite;
}
#setup-spotlight .spot:nth-child(2) {
  bottom: 10%; right: 15%;
  background: radial-gradient(circle, rgba(79,200,255,0.25) 0%, transparent 70%);
  animation: setup-spot-drift-reverse 14s ease-in-out infinite;
}
#setup-spotlight .spot:nth-child(3) {
  top: 40%; left: 40%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%);
  animation: setup-spot-drift 18s ease-in-out infinite;
  animation-delay: -5s;
}

/* Inner spotlight glow for cards and brand col */
@keyframes setup-card-glow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.setup-card-glow::after, .setup-brand-glow::after {
  content: ''; position: absolute; inset: 0; border-radius: 16px;
  background: linear-gradient(120deg, transparent 20%, rgba(212,168,67,0.05) 40%, transparent 60%, rgba(79,200,255,0.03) 80%, transparent 100%);
  background-size: 300% 300%;
  animation: setup-card-glow 10s ease-in-out infinite;
  pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity 1.5s ease;
}
.setup-card-glow::after, .setup-brand-glow::after { opacity: 1; }

/* Setup screen particles — single scrolling image (same as in-game, GPU-composited) */
#setup-particles {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  overflow: hidden; opacity: 0; transition: opacity 1.0s ease;
}
#setup-particles.active { opacity: 0.8; }
#setup-particles::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 8000px;
  background: url('particles-bg.webp') repeat 0 0;
  background-size: 100% 4000px;
  will-change: transform;
  animation: particleScroll 30s linear infinite;
}

/* Setup screen chip shower canvas */
#setup-chip-canvas {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  width: 100%; height: 100%;
}

/* Hide all setup FX on touch devices */
.touch-device #setup-spotlight,
.touch-device #setup-particles,
.touch-device #setup-chip-canvas,
.touch-device .setup-card-glow::after,
.touch-device .setup-brand-glow::after { display: none !important; }

/* Scrollable full-screen container */
.setup-scroll {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(10px, 1.04vw, 20px) clamp(10px, 0.83vw, 16px) clamp(16px, 1.67vw, 32px);
  scrollbar-width: thin;
  scrollbar-color: rgba(212,168,67,0.3) transparent;
}
.setup-scroll::-webkit-scrollbar { width: 4px; }
.setup-scroll::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.3); border-radius: 2px; }

/* Content wrapper — 3-column: brand | settings-left | settings-right */
.setup-content {
  width: 100%; max-width: clamp(540px, 44.8vw, 860px);
  display: flex; flex-direction: column; align-items: center;
  margin: auto 0;
}
.setup-content--3col {
  max-width: clamp(720px, 62vw, 1200px);
  display: grid;
  grid-template-columns: 1fr minmax(140px, 0.6fr);
  grid-template-rows: 1fr auto;
  gap: 0 clamp(16px, 1.5vw, 28px);
  align-items: stretch;
}

/* ── Brand Column (right) ── */
.setup-brand-col {
  grid-row: 1 / 2;
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 1.5vw, 28px) clamp(10px, 1vw, 18px);
  background: linear-gradient(180deg, rgba(20,15,10,0.7), rgba(10,8,5,0.85));
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.setup-brand-col::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(212,168,67,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.setup-brand-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 0.4vw, 8px);
  flex: 1;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.setup-brand-logo {
  width: clamp(80px, 9vw, 160px);
  height: auto;
  filter: drop-shadow(0 0 20px rgba(212,168,67,0.2));
  margin-bottom: clamp(4px, 0.5vw, 10px);
}
.setup-brand-title {
  font-family: var(--font-d);
  font-size: clamp(28px, 3.2vw, 52px);
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(212,168,67,0.3), 0 2px 4px rgba(0,0,0,0.6);
  line-height: 1;
  letter-spacing: 0.08em;
}
.setup-brand-divider {
  width: 60%;
  display: flex;
  align-items: center;
  margin: clamp(4px, 0.3vw, 8px) 0;
}
.setup-brand-divider .divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,67,0.5), transparent);
}
.setup-brand-site {
  font-family: var(--font-b);
  font-size: clamp(11px, 0.8vw, 15px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.setup-brand-copyright {
  font-family: var(--font-b);
  font-size: clamp(10px, 0.6vw, 13px);
  letter-spacing: 0.15em;
  color: rgba(212,168,67,0.35);
  white-space: nowrap;
  margin-top: 2px;
}
.setup-brand-sub {
  font-family: var(--font-b);
  font-size: clamp(10px, 0.7vw, 14px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(212,168,67,0.45);
  line-height: 1.5;
  margin-top: clamp(2px, 0.2vw, 4px);
}
.setup-start-btn--brand {
  position: relative;
  z-index: 1;
  margin-top: clamp(10px, 1vw, 18px);
  width: 100%;
}
.setup-start-btn--mobile {
  display: none;
  width: 100%;
  margin-top: auto;
}

/* Settings card spans left column */
.setup-content--3col .setup-card {
  grid-row: 1 / 2;
  order: 1;
}
/* Disclaimer spans full width */
.setup-content--3col .setup-disclaimer {
  grid-column: 1 / -1;
  max-width: 100%;
}

/* Sticky settings header — hidden by default, shown on mobile landscape */
.setup-card-header {
  display: none;
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(12,10,6,0.98), rgba(12,10,6,0.92));
  /* backdrop-filter removed for GPU perf */
  padding: clamp(6px, 1vh, 10px) clamp(10px, 1.5vw, 18px);
  font-family: var(--font-n);
  font-size: clamp(9px, 1.1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(212,168,67,0.15);
}

/* Dice Lab toggle on start screen */
.setup-dicelab-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  margin-top: clamp(8px, 0.6vw, 12px);
  position: relative;
  z-index: 1;
}
.setup-dicelab-toggle-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.setup-dicelab-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(10px, 0.7vw, 13px);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold);
}
.setup-dicelab-hint {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(9px, 0.57vw, 11px);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.3px;
}

/* Mini disclaimer in brand col — hidden by default */
.setup-brand-disclaimer {
  display: none;
  margin-top: clamp(6px, 1vh, 10px);
  position: relative;
  z-index: 1;
}
.setup-brand-disclaimer p {
  font-family: var(--font-b);
  font-size: clamp(10px, 0.7vw, 13px);
  line-height: 1.5;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin: 0;
}
.setup-brand-disclaimer strong {
  color: rgba(200,168,74,0.6);
  font-weight: 600;
}

.setup-title { text-align:center; margin-bottom:clamp(8px, 0.73vw, 14px); }
.setup-title h1 {
  font-family: var(--font-d);
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 900; color: var(--gold);
  text-shadow: 0 0 40px rgba(212,168,67,0.3), 0 2px 4px rgba(0,0,0,0.6);
  line-height: 1; margin-bottom: 6px; letter-spacing: 0.08em;
}
.setup-divider { display:flex; align-items:center; gap:clamp(8px, 0.83vw, 16px); width:100%; }
.divider-line { flex:1; height:1px; background:linear-gradient(90deg,transparent,rgba(212,168,67,0.5)); }
.divider-line:last-child { background:linear-gradient(90deg,rgba(212,168,67,0.5),transparent); }
.setup-divider span { font-family:var(--font-b); font-size:clamp(10px, 0.68vw, 13px); letter-spacing:0.4em; text-transform:uppercase; color:var(--gold); white-space:nowrap; }

/* Card — 2 columns on wide screens */
.setup-card {
  position: relative; overflow: hidden;
  width: 100%;
  background: linear-gradient(135deg,rgba(20,15,10,0.95),rgba(10,8,5,0.95));
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 16px; padding: clamp(12px, 1.04vw, 20px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(212,168,67,0.1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(12px, 1.25vw, 24px);
}
.setup-col { display: flex; flex-direction: column; }
.setup-col:first-child {
  border-right: 1px solid rgba(212,168,67,0.1);
  padding-right: clamp(10px, 1.04vw, 20px);
}
.setup-col:last-child { padding-left: 4px; }

.setup-group { margin-bottom:clamp(10px, 0.83vw, 16px); }
.setup-label { display:block; font-size:clamp(9px, 0.57vw, 11px); font-weight:600; text-transform:uppercase; letter-spacing:0.15em; color:var(--gold); margin-bottom:clamp(6px, 0.42vw, 8px); }
.setup-sub-label { font-size:clamp(8px, 0.52vw, 10px); font-weight:500; text-transform:uppercase; letter-spacing:0.1em; color:var(--gold-dim); margin-bottom:clamp(4px, 0.31vw, 6px); margin-top:clamp(6px, 0.52vw, 10px); }
.setup-sub-label:first-child { margin-top:0; }
.btn-group { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.btn-group.two-col { grid-template-columns:repeat(2,1fr); }
.btn-group.four-col { grid-template-columns:repeat(4,1fr); }
.variant-btn,.preset-btn { padding:clamp(5px, 0.42vw, 8px) clamp(4px, 0.31vw, 6px); border-radius:8px; border:1px solid rgba(212,168,67,0.2); background:rgba(255,255,255,0.05); color:var(--gold); font-family:var(--font-b); font-size:clamp(9px, 0.57vw, 11px); font-weight:500; cursor:pointer; transition:all 0.2s; }
.variant-btn:hover,.preset-btn:hover { background:rgba(212,168,67,0.1); border-color:rgba(212,168,67,0.4); }
.variant-btn.active,.preset-btn.active { background:linear-gradient(135deg,var(--gold),#a07830); color:#1a1a1a; font-weight:700; border-color:var(--gold); transform:scale(1.04); }
.preset-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:6px; }
.preset-btn { font-family:var(--font-n); font-size:clamp(10px, 0.68vw, 13px); }

/* ── Custom input row with confirm/clear buttons ── */
.custom-input-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 4px;
}
.custom-input {
  flex: 1;
  padding: clamp(7px, 0.52vw, 10px) clamp(10px, 0.73vw, 14px);
  border-radius: 8px 0 0 8px;
  border: 1px solid rgba(212,168,67,0.3);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-family: var(--font-n);
  font-size: clamp(12px, 0.78vw, 15px);
  text-align: center;
  outline: none;
  min-width: 0;
  -moz-appearance: textfield;
}
.custom-input::-webkit-outer-spin-button,
.custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.custom-input:focus { border-color: var(--gold); }
.custom-input-btn {
  height: clamp(30px, 2.1vw, 38px);
  width: clamp(30px, 2.1vw, 38px);
  min-width: clamp(30px, 2.1vw, 38px);
  border: none;
  background: rgba(255,255,255,0.04);
  color: var(--gold);
  font-size: clamp(12px, 0.78vw, 16px);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
  border-radius: 0;
}
.custom-input-btn:last-child { border-radius: 0 8px 8px 0; }
.custom-input-confirm { color: #6ddb6d; background: rgba(109,219,109,0.06); }
.custom-input-confirm:hover { background: rgba(109,219,109,0.18); }
.custom-input-clear { color: #f07070; background: rgba(240,112,112,0.06); }
.custom-input-clear:hover { background: rgba(240,112,112,0.18); }

/* Link button with committed value indicator */
.link-btn { background:none; border:none; color:var(--gold-dim); font-family:var(--font-b); font-size:clamp(9px, 0.57vw, 11px); cursor:pointer; text-decoration:underline; padding:0; display:inline-flex; align-items:center; gap:4px; }
.link-btn:hover { color:var(--gold); }
.link-btn .custom-check {
  color: #6ddb6d;
  font-size: clamp(10px, 0.68vw, 13px);
  font-weight: 700;
  text-decoration: none;
  display: none;
}
.link-btn.custom-active .custom-check { display: inline; }
.link-btn.custom-active { color: var(--gold); font-weight: 600; text-decoration: none; }

/* Start button — at bottom of right column */
.setup-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 0.5vw, 10px);
  width: 100%; padding: clamp(10px, 0.73vw, 14px); margin-top: auto;
  border-radius: 12px; border: 1px solid var(--gold);
  background: linear-gradient(135deg, var(--gold), #b89030, var(--gold));
  color: #1a1a1a; font-family: var(--font-d); font-size: clamp(13px, 0.83vw, 16px);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(212,168,67,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.setup-start-btn:hover { transform: scale(1.03); box-shadow: 0 6px 30px rgba(212,168,67,0.5); }
.start-btn-icon {
  flex-shrink: 0;
  width: clamp(16px, 1vw, 22px);
  height: clamp(16px, 1vw, 22px);
}

/* ── Setup subtitle (The Ultimate Craps Simulator) ── */
.setup-subtitle {
  font-family: var(--font-b);
  font-size: clamp(8px, 0.52vw, 10px);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(212,168,67,0.5);
  margin-top: clamp(4px, 0.31vw, 6px);
}

/* ── Setup disclaimer footer ── */
.setup-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: clamp(8px, 0.63vw, 12px);
  margin-top: clamp(8px, 0.73vw, 14px);
  padding: clamp(12px, 0.94vw, 18px) clamp(14px, 1.04vw, 20px);
  background: rgba(200,168,74,0.06);
  border: 1px solid rgba(212,168,67,0.28);
  border-radius: 12px;
  width: 100%;
  max-width: clamp(540px, 44.8vw, 860px);
}
.setup-disclaimer-icon {
  flex-shrink: 0;
  font-size: clamp(14px, 1.04vw, 18px);
  line-height: 1.5;
  opacity: 0.9;
}
.setup-disclaimer p {
  font-family: var(--font-n);
  font-size: clamp(12px, 0.83vw, 14px);
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  margin: 0;
}
.setup-disclaimer strong {
  color: #c8a84a;
  font-weight: 700;
}

/* ── First-visit disclaimer overlay ── */
#disclaimer-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.disc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
  /* backdrop-filter removed for GPU perf */
}
.disc-panel {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #16141e, #0e0c14);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: 20px;
  padding: clamp(20px, 2vw, 36px) clamp(24px, 2.5vw, 44px);
  width: min(560px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(212,168,67,0.08),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.disc-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(14px, 1.5vw, 24px);
}
.disc-logo {
  width: clamp(60px, 5vw, 100px);
  height: auto;
  filter: drop-shadow(0 0 16px rgba(212,168,67,0.2));
  margin-bottom: clamp(8px, 0.8vw, 14px);
}
.disc-badge {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(14px, 1.1vw, 20px);
  font-weight: 700;
  letter-spacing: 2px;
  color: #1a1a1a;
  background: linear-gradient(135deg, #d4a843, #b89030);
  padding: clamp(4px, 0.4vw, 8px) clamp(12px, 1.1vw, 20px);
  border-radius: 8px;
  margin-bottom: clamp(8px, 0.8vw, 14px);
  box-shadow: 0 4px 14px rgba(212,168,67,0.3);
}
.disc-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(14px, 1.1vw, 20px);
  font-weight: 700;
  letter-spacing: 4px;
  color: #e8c46a;
}
.disc-body {
  margin-bottom: clamp(16px, 1.5vw, 28px);
}
.disc-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(11px, 0.73vw, 14px);
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin: 0 0 clamp(10px, 0.9vw, 16px) 0;
}
.disc-body strong {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}
.disc-body ul {
  list-style: none;
  padding: 0;
  margin: clamp(10px, 0.9vw, 16px) 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 0.7vw, 14px);
}
.disc-body li {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(10px, 0.68vw, 13px);
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  padding-left: clamp(14px, 1.1vw, 20px);
  position: relative;
}
.disc-body li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: rgba(212,168,67,0.5);
  font-size: 0.7em;
  top: 0.25em;
}
.disc-body li strong {
  color: rgba(255,255,255,0.8);
}
.disc-closing {
  font-style: italic;
  color: rgba(255,255,255,0.45) !important;
  font-size: clamp(10px, 0.63vw, 12px) !important;
  border-top: 1px solid rgba(212,168,67,0.1);
  padding-top: clamp(10px, 0.9vw, 16px);
}
.disc-accept-btn {
  width: 100%;
  padding: clamp(12px, 1vw, 18px) 0;
  border-radius: 12px;
  border: 1px solid rgba(212,168,67,0.5);
  background: linear-gradient(135deg, #d4a843, #b89030);
  color: #0a0a0f;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 0.83vw, 16px);
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(212,168,67,0.25);
}
.disc-accept-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 30px rgba(212,168,67,0.45);
  background: linear-gradient(135deg, #e8c46a, #d4a843);
}

/* Narrow screens → single column */
@media (max-width: 580px) {
  .setup-content--3col {
    grid-template-columns: 1fr;
    max-width: 96vw;
  }
  .setup-brand-col {
    order: -1;
    grid-row: auto;
    flex-direction: row;
    padding: 10px 16px;
    gap: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
  }
  .setup-brand-inner {
    flex-direction: row;
    gap: 10px;
  }
  .setup-brand-logo { width: 48px; margin-bottom: 0; }
  .setup-brand-title { font-size: 22px; }
  .setup-brand-divider, .setup-brand-sub, .setup-brand-disclaimer { display: none; }
  .setup-brand-site { font-size: 10px; letter-spacing: 0.25em; }
  .setup-start-btn--brand { display: none; }
  .setup-start-btn--mobile { display: block; }
  /* Dice Lab toggle — compact on narrow screens */
  .setup-dicelab-row { margin-top: 6px; gap: 2px; }
  .setup-dicelab-label { font-size: 10px; }
  .setup-dicelab-hint { font-size: 9px; }
  .setup-card { grid-template-columns: 1fr; gap: 0; }
  .setup-col:first-child {
    border-right: none; padding-right: 0;
    border-bottom: 1px solid rgba(212,168,67,0.1);
    padding-bottom: 16px; margin-bottom: 16px;
  }
  .setup-col:nth-child(2) {
    border-right: none; padding-right: 0;
    border-bottom: 1px solid rgba(212,168,67,0.1);
    padding-bottom: 16px; margin-bottom: 16px;
  }
  .setup-col:last-child { padding-left: 0; }
  .setup-disclaimer { max-width: 100%; }
}
/* Landscape mobile — 2-column: fixed brand left + scrollable settings right */
@media (max-height: 560px) and (orientation: landscape) {

  /* ── Full-screen 2-column grid: settings LEFT, brand RIGHT ── */
  #setup-screen { overflow: hidden; }
  .setup-scroll {
    padding: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    align-items: stretch;
  }
  .setup-content--3col {
    max-width: 100%;
    width: 100%; height: 100%;
    grid-template-columns: 1fr clamp(180px, 38vw, 320px);
    grid-template-rows: 1fr;
    gap: 0;
    align-items: stretch;
  }

  /* ── Brand column → order 2 (right side) ── */
  .setup-brand-col {
    order: 2;
    grid-row: 1 / -1;
    height: 100%;
    border-radius: 0;
    border: none;
    border-left: 1px solid rgba(212,168,67,0.15);
    padding: 2vw;
    justify-content: center;
    overflow: hidden;
  }
  .setup-brand-logo { width: clamp(56px, 12vw, 110px); margin-bottom: 4px; }
  .setup-brand-title { font-size: clamp(20px, 4.5vw, 36px); }
  .setup-brand-divider { margin: 3px 0; }
  .setup-brand-site { font-size: clamp(6px, 1.2vw, 10px); }
  .setup-brand-sub { font-size: clamp(5px, 0.9vw, 8px); }

  /* ── Prominent ENTER TABLE button on mobile ── */
  .setup-start-btn--brand {
    margin-top: clamp(10px, 2vh, 18px);
    padding: clamp(10px, 1.8vh, 18px) clamp(12px, 1.5vw, 20px);
    font-size: clamp(12px, 2vw, 18px);
    letter-spacing: 0.15em;
    border-radius: 12px;
    box-shadow:
      0 6px 24px rgba(212,168,67,0.4),
      0 0 0 1px rgba(212,168,67,0.5),
      inset 0 1px 0 rgba(255,255,255,0.25);
    background: linear-gradient(135deg, #e8c46a, #d4a843, #b89030);
  }
  .setup-start-btn--brand .start-btn-icon {
    width: clamp(18px, 2.5vw, 26px);
    height: clamp(18px, 2.5vw, 26px);
  }

  /* Mini disclaimer under button — visible on mobile */
  .setup-brand-disclaimer {
    display: block;
  }

  /* Dice Lab toggle — mobile landscape layout */
  .setup-dicelab-row { margin-top: clamp(6px, 1vh, 10px); gap: 2px; }
  .setup-dicelab-label { font-size: clamp(9px, 1.4vw, 12px); }
  .setup-dicelab-hint { font-size: clamp(9px, 1.1vw, 11px); }

  /* ── Settings card → order 1 (left side), scrollable ── */
  .setup-content--3col .setup-card {
    order: 1;
    grid-row: 1 / -1;
    height: 100%;
    overflow-y: auto;
    border-radius: 0;
    border: none;
    background: linear-gradient(180deg, rgba(15,12,8,0.95), rgba(8,6,4,0.95));
    padding: 0;
    grid-template-columns: 1fr;
    gap: 0;
    align-content: start;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,168,67,0.3) transparent;
  }
  .setup-content--3col .setup-card::-webkit-scrollbar { width: 3px; }
  .setup-content--3col .setup-card::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.3); border-radius: 2px; }

  /* Sticky header inside card */
  .setup-card-header {
    display: block;
  }

  /* Remove column borders, stack vertically */
  .setup-col {
    padding: 2vw !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(212,168,67,0.08);
  }
  .setup-col:last-child {
    border-bottom: none;
  }

  .setup-group { margin-bottom: clamp(6px, 1vh, 10px); }
  .setup-label { margin-bottom: clamp(3px, 0.5vh, 6px); }

  /* Hide full-width disclaimer (shown in brand col instead) */
  .setup-content--3col .setup-disclaimer {
    display: none;
  }

  /* Hide mobile-only button inside settings (brand col has it) */
  .setup-start-btn--mobile { display: none !important; }

  .setup-title { display: none; }
  .setup-subtitle { display: none; }
}

/* ── Large desktop (2K+) — scale up setup content ── */
@media (min-width: 2000px) {
  .setup-content--3col {
    max-width: clamp(960px, 62vw, 1600px);
  }
  .setup-content {
    max-width: clamp(860px, 52vw, 1400px);
  }
  .setup-brand-logo { width: clamp(120px, 10vw, 200px); }
  .setup-brand-title { font-size: clamp(36px, 3.5vw, 60px); }
  .setup-brand-site { font-size: clamp(10px, 0.6vw, 14px); }
  .setup-brand-sub { font-size: clamp(8px, 0.5vw, 11px); }
  .setup-title h1 {
    font-size: clamp(48px, 3.5vw, 80px);
  }
  .setup-divider span {
    font-size: clamp(12px, 0.65vw, 18px);
  }
  .setup-card {
    padding: clamp(20px, 1.3vw, 36px);
    gap: 0 clamp(20px, 1.5vw, 40px);
    border-radius: 20px;
  }
  .setup-label {
    font-size: clamp(11px, 0.62vw, 16px);
    margin-bottom: clamp(8px, 0.55vw, 14px);
  }
  .setup-sub-label {
    font-size: clamp(10px, 0.55vw, 14px);
  }
  .variant-btn, .preset-btn {
    padding: clamp(8px, 0.55vw, 14px) clamp(6px, 0.45vw, 12px);
    font-size: clamp(11px, 0.62vw, 16px);
    border-radius: 10px;
  }
  .preset-btn {
    font-size: clamp(13px, 0.72vw, 18px);
  }
  .variant-desc {
    font-size: clamp(12px, 0.7vw, 18px);
  }
  .setup-brand-sub { font-size: clamp(12px, 0.85vw, 17px); }
  .setup-brand-site { font-size: clamp(13px, 0.9vw, 18px); }
  .setup-brand-copyright { font-size: clamp(11px, 0.7vw, 15px); }
  .setup-brand-disclaimer p { font-size: clamp(11px, 0.75vw, 15px); }
  .setup-start-btn {
    padding: clamp(14px, 0.95vw, 24px);
    font-size: clamp(16px, 0.95vw, 24px);
    border-radius: 14px;
  }
  .link-btn {
    font-size: clamp(11px, 0.58vw, 15px);
  }
  .btn-group { gap: 10px; }
  .preset-grid { gap: 10px; }
  .setup-group { margin-bottom: clamp(14px, 0.95vw, 24px); }
  #custom-balance-input, #custom-maxbet-input, #custom-simbets-input {
    font-size: clamp(14px, 0.82vw, 20px);
    padding: clamp(10px, 0.65vw, 16px) clamp(14px, 0.82vw, 20px);
  }
}

/* ── 4K displays — much more aggressive scaling ── */
@media (min-width: 3200px) {
  .setup-scroll {
    align-items: center;
  }
  .setup-content--3col {
    max-width: 70vw;
  }
  .setup-content {
    max-width: 65vw;
  }
  .setup-brand-logo { width: clamp(160px, 12vw, 260px); }
  .setup-brand-title { font-size: clamp(48px, 3.5vw, 80px); }
  .setup-title h1 {
    font-size: clamp(64px, 3.5vw, 120px);
  }
  .setup-divider span {
    font-size: clamp(16px, 0.6vw, 24px);
  }
  .setup-card {
    padding: clamp(32px, 1.2vw, 52px);
    gap: 0 clamp(32px, 1.4vw, 52px);
    border-radius: 24px;
  }
  .setup-col:first-child {
    padding-right: clamp(20px, 1.2vw, 40px);
  }
  .setup-label {
    font-size: clamp(14px, 0.55vw, 22px);
    margin-bottom: clamp(12px, 0.5vw, 18px);
  }
  .setup-sub-label {
    font-size: clamp(12px, 0.5vw, 18px);
    margin-top: clamp(10px, 0.5vw, 16px);
    margin-bottom: clamp(6px, 0.3vw, 10px);
  }
  .variant-btn, .preset-btn {
    padding: clamp(12px, 0.5vw, 18px) clamp(10px, 0.4vw, 16px);
    font-size: clamp(14px, 0.55vw, 22px);
    border-radius: 12px;
  }
  .preset-btn {
    font-size: clamp(16px, 0.6vw, 24px);
  }
  .variant-desc {
    font-size: clamp(14px, 0.55vw, 20px);
    min-height: clamp(32px, 1.2vw, 48px);
  }
  .setup-start-btn {
    padding: clamp(18px, 0.85vw, 32px);
    font-size: clamp(20px, 0.85vw, 32px);
    border-radius: 18px;
  }
  .link-btn {
    font-size: clamp(14px, 0.52vw, 20px);
  }
  .btn-group { gap: 14px; }
  .preset-grid { gap: 14px; }
  .setup-group { margin-bottom: clamp(18px, 0.85vw, 30px); }
  #custom-balance-input, #custom-maxbet-input, #custom-simbets-input {
    font-size: clamp(18px, 0.7vw, 26px);
    padding: clamp(14px, 0.6vw, 20px) clamp(18px, 0.7vw, 26px);
    border-radius: 12px;
  }
}

/* ══════════════════════════════════════════
   GAME SCREEN LAYOUT
══════════════════════════════════════════ */
#game-screen { flex-direction:column; background:var(--bg); }
#game-screen.active { display:flex; }

/* ═══ PARTICLE BACKGROUND — single scrolling image (GPU: 1 layer instead of 160) ═══ */
#particles {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  transition: opacity 1s ease;
  animation: particlePulse 10s ease-in-out infinite;
}
#particles::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 8000px;
  background: url('particles-bg.webp') repeat 0 0;
  background-size: 100% 4000px;
  will-change: transform;
  animation: particleScroll 25s linear infinite;
}
@keyframes particleScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-4000px); }
}
@keyframes particlePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
@media (hover: none) {
  #particles::before { animation: none; display: none; }
  #particles { animation: none; }
}

/* Header — REMOVED, elements moved to sidebar + bottom bar */

/* ══════════════════════════════════════════
   TOP INFO BAR — always visible, Interblock-style
══════════════════════════════════════════ */
/* Phase badge (shared, used by info card) */
.phase-badge { font-family:var(--font-n); font-size:clamp(8px, 0.52vw, 10px); font-weight:700; letter-spacing:0.12em; padding:3px clamp(5px, 0.42vw, 8px); border-radius:6px; text-transform:uppercase; white-space:nowrap; }
.phase-badge.come-out { background:rgba(34,197,94,0.15); color:#22c55e; border:1px solid rgba(34,197,94,0.3); }
.phase-badge.point-phase { background:rgba(245,158,11,0.15); color:#f59e0b; border:1px solid rgba(245,158,11,0.3); }

/* Main Content — no sidebar, full width */
#main-content { flex:1; display:flex; overflow:hidden; position:relative; z-index:1; min-height:0; }

/* Game screen is now a vertical flex column */
#game-screen.active { display: flex; flex-direction: column; }

/* Right column — table + bottom bar stacked (now full width) */
#right-column { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }




/* Dice Display (shared) */
.die { width:clamp(36px, 2.71vw, 52px); height:clamp(36px, 2.71vw, 52px); border-radius:10px; display:flex; align-items:center; justify-content:center; box-shadow:0 3px 12px rgba(0,0,0,0.5); transition:transform 0.3s, box-shadow 0.3s; overflow:hidden; }
.die svg.die-face { width:100%; height:100%; display:block; }
.die.rolling { animation:dieShake 0.42s linear infinite; }
@keyframes dieShake {
  0%,100% { transform:rotate(0) translate(0,0); }
  25% { transform:rotate(-1.2deg) translate(-0.5px,0.3px) scale(1.01); }
  50% { transform:rotate(0.8deg) translate(0.3px,-0.5px); }
  75% { transform:rotate(1.2deg) translate(0.5px,0.3px) scale(1.01); }
}
.die.highlight { box-shadow:0 0 20px rgba(212,168,67,0.6); filter:brightness(1.15); }
.die.die-impact { animation: dieImpact 0.08s ease-in-out 4; }
@keyframes dieImpact {
  0%, 100% { transform: translate(0,0) rotate(0); }
  25% { transform: translate(-1px, 0.5px) rotate(-1.5deg); }
  75% { transform: translate(1px, -0.5px) rotate(1.5deg); }
}

/* History badges */
.hist-badge {
  width: clamp(18px, 1.25vw, 24px);
  height: clamp(18px, 1.25vw, 24px);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-n);
  font-size: clamp(8px, 0.57vw, 11px);
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
  background: linear-gradient(145deg, #3a3d44, #2a2d33);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 3px rgba(0,0,0,0.4);
}
.hist-badge.latest {
  background: linear-gradient(145deg, #4a4d55, #3a3d44);
  border-color: rgba(212,168,67,0.4);
  color: #fff;
  box-shadow: 0 0 8px rgba(212,168,67,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}



/* ══════════════════════════════════════════
   LANDSCAPE PROMPT (portrait mobile only)
══════════════════════════════════════════ */
#rotate-prompt {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(0,0,0,1);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 28px);
  color: var(--gold);
}
.rotate-icon {
  font-size: clamp(56px, 12vw, 80px);
  animation: rotate-phone 2s ease-out infinite;
}
@keyframes rotate-phone {
  0%   { transform: rotate(0deg); }
  40%  { transform: rotate(90deg); }
  100% { transform: rotate(90deg); }
}
.rotate-msg { font-family: var(--font-b); font-size: clamp(13px, 3.5vw, 18px); text-align: center; padding: 0 32px; }
@media (orientation: portrait) {
  #rotate-prompt { display: flex !important; }
  .dice-lab-fab { display: none !important; }
}


/* ══════════════════════════════════════════
   CRAPS TABLE
══════════════════════════════════════════ */
#table-container { flex:1; display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative; min-height:0; touch-action: none; }
#table-scaler { transform-origin:center center; touch-action: none; }

/* ══════════════════════════════════════════
   BOTTOM BAR — sits inside #right-column, only as wide as table area
══════════════════════════════════════════ */
#bottom-bar { position:relative; z-index:20; height:var(--bar-height); flex-shrink:0; background:linear-gradient(180deg,rgba(15,12,8,0.98),rgba(8,6,4,0.98)); border-top:1px solid rgba(212,168,67,0.12); box-shadow:0 -4px 30px rgba(0,0,0,0.4); display:flex; align-items:center; width:100%; overflow:visible; contain:layout style; }
/* Edge fade hints when bar content is scrollable */
#bottom-bar::before,
#bottom-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#bottom-bar::before {
  left: 0;
  background: linear-gradient(to right, rgba(8,6,4,0.95), transparent);
}
#bottom-bar::after {
  right: 0;
  background: linear-gradient(to left, rgba(8,6,4,0.95), transparent);
}
#bottom-bar.bar-scroll-left::before,
#bottom-bar.bar-scroll-right::after {
  opacity: 1;
}
#bottom-inner { display:flex; align-items:center; justify-content:center; gap:clamp(3px, 0.26vw, 5px); padding:0 clamp(8px, 0.83vw, 16px); width:100%; overflow:visible; }
#chip-rack {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: clamp(3px, 0.31vw, 6px);
  flex-shrink: 0;
  justify-content: flex-start;
  padding-top: 12px;
}
.chip-btn { position:relative; border:none; background:none; cursor:pointer; padding:0; transition:transform 0.2s; flex-shrink:0; width:var(--chip-rack-size); height:var(--chip-rack-size); }
.chip-btn:not(.disabled):hover { transform:scale(1.15); }
.chip-btn.selected { transform:scale(1.1); }
.chip-btn.disabled { opacity:0.35; cursor:not-allowed; }

/* ── CSS-Only Casino Chip (replaces chipOverlay.png) ── */
.chip-inner {
  width:100%; height:100%; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden;
  /* No border — the edge-ring provides the rim */
}

/* Edge notch ring — conic gradient creates alternating color tabs around the rim */
.chip-edge-ring {
  position:absolute; inset:0; border-radius:50%;
  background: repeating-conic-gradient(
    from 4deg,
    var(--chip-edge, #fff) 0deg 12deg,
    var(--chip-edge2, #c41e3a) 12deg 24deg
  );
  box-shadow:
    0 2px 6px rgba(0,0,0,0.6),
    0 4px 12px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.15);
}

/* Face disc — covers center, leaves edge notches visible as a rim */
.chip-face {
  position:absolute;
  inset: 4px;
  border-radius:50%;
  background: radial-gradient(circle at 38% 32%,
    color-mix(in srgb, var(--chip-color, #c41e3a), white 14%) 0%,
    var(--chip-color, #c41e3a) 45%,
    var(--chip-border, #8b1528) 100%
  );
  z-index:1;
}

/* Inner ring (classic inset circle on real chips) */
.chip-face::before {
  content:''; position:absolute;
  inset: 18%; border-radius:50%;
  border: 1.5px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.3), 0 0 2px rgba(255,255,255,0.06);
  z-index:2;
}

/* Specular highlight (top-left sheen for 3D curvature) */
.chip-face::after {
  content:''; position:absolute; inset:0; border-radius:50%;
  background: radial-gradient(
    ellipse 55% 45% at 35% 28%,
    rgba(255,255,255,0.2) 0%,
    rgba(255,255,255,0.05) 40%,
    transparent 70%
  );
  z-index:3; pointer-events:none;
}

.chip-label { font-family:var(--font-n); font-weight:700; position:relative; z-index:4; text-shadow: 0 1px 0 rgba(255,255,255,0.12), 0 -1px 0 rgba(0,0,0,0.7), 1px 1px 2px rgba(0,0,0,0.55), -1px -1px 0 rgba(0,0,0,0.3); letter-spacing:0.02em; font-size:clamp(8px, 0.63vw, 12px); pointer-events:none; }
.chip-label.chip-label-sm { font-size:clamp(7px, 0.52vw, 10px); }
.chip-ring { position:absolute; inset:-4px; border-radius:50%; border:2px solid rgba(212,168,67,0.7); animation:pulse 1.5s ease-in-out infinite; display:none; }
.chip-btn.selected .chip-ring { display:block; }
.bar-sep { width:1px; height:clamp(22px, 1.67vw, 32px); background:rgba(212,168,67,0.15); flex-shrink:0; }
#game-controls { display:flex; align-items:center; gap:clamp(3px, 0.31vw, 6px); flex-shrink:0; overflow:visible; }
.btn-spin { padding:4px clamp(8px, 0.73vw, 14px); border-radius:10px; width:var(--roll-btn-w); font-family:var(--font-d); font-size:clamp(10px, 0.68vw, 13px); font-weight:700; text-transform:uppercase; letter-spacing:0.05em; cursor:default; transition:all 0.3s; border:2px solid rgba(212,168,67,0.35); background:rgba(212,168,67,0.12); color:var(--gold); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:clamp(34px, 2.19vw, 42px); position:relative; z-index:25; }
.btn-roll-icon { display:none; } /* Hidden on desktop, shown in mobile media query */
.btn-spin:not(:disabled) { background:linear-gradient(135deg,var(--gold),#e8c060,var(--gold)); color:#1a1a1a; cursor:pointer; border-color:var(--gold); box-shadow:0 4px 35px rgba(212,168,67,0.7),inset 0 1px 0 rgba(255,255,255,0.3); animation:pulseGlow 2s ease-in-out infinite; will-change:opacity; }
.btn-spin:not(:disabled):hover { transform:scale(1.05); }
.btn-spin:not(:disabled):active { transform:scale(0.95); }
.btn-roll-main { font-family:var(--font-d); font-size:clamp(11px, 0.78vw, 15px); font-weight:700; letter-spacing:0.05em; line-height:1.1; }
.btn-roll-sim {
  display: none;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(6px, 0.42vw, 8px);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
  animation: simModeBlink 1.2s ease-in-out infinite;
}
.btn-roll-sim.sim-rolling {
  animation: none;
  color: #16a34a;
}
@keyframes simModeBlink {
  0%, 100% { color: #b91c1c; }
  50%      { color: #1a1a1a; }
}
/* pulseGlow — enhanced with halo ring, defined at end of file */

.icon-btn { width:var(--icon-btn-size); height:var(--icon-btn-size); border-radius:8px; border:1.5px solid; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all 0.2s; position:relative; z-index:1; }
.icon-btn.sm { width:clamp(22px, 1.56vw, 30px); height:clamp(22px, 1.56vw, 30px); border-radius:6px; }
.icon-btn:not(:disabled):hover { transform:scale(1.1); z-index:5; }
.icon-btn:not(:disabled):active { transform:scale(0.9); }
.icon-btn:disabled { opacity:0.22; cursor:not-allowed; }
.icon-btn.amber { color:#f59e0b; border-color:rgba(245,158,11,0.3); background:rgba(245,158,11,0.07); }
.icon-btn.amber:not(:disabled):hover { background:rgba(245,158,11,0.15); }
.icon-btn.red   { color:#ef4444; border-color:rgba(239,68,68,0.3); background:rgba(239,68,68,0.07); }
.icon-btn.red:not(:disabled):hover   { background:rgba(239,68,68,0.15); }
.icon-btn.muted { color:var(--gold-dim); border-color:rgba(138,122,90,0.3); background:rgba(138,122,90,0.07); }
.icon-btn.muted:not(:disabled):hover { background:rgba(138,122,90,0.15); }
.icon-btn.grey  { color:#aaa; border-color:rgba(180,180,180,0.3); background:rgba(180,180,180,0.07); font-family:var(--font-n); font-size:clamp(7px, 0.47vw, 9px); font-weight:700; letter-spacing:0.5px; }
.icon-btn.grey:not(:disabled):hover  { background:rgba(180,180,180,0.15); color:#fff; }
.icon-btn.gold  { color:var(--gold); border-color:rgba(212,168,67,0.3); background:rgba(212,168,67,0.07); }
.icon-btn.gold:not(:disabled):hover  { background:rgba(212,168,67,0.15); }
.icon-btn.green { color:#4ade80; border-color:rgba(74,222,128,0.4); background:rgba(74,222,128,0.12); }
.icon-btn.green:not(:disabled):hover { background:rgba(74,222,128,0.22); }


/* ── UNDO button: always show text label, hide SVG icon ── */
#btn-undo {
  width: var(--qb-btn-w) !important;
  height: var(--icon-btn-size);
  padding: 0 !important;
  border-radius: 8px;
  border: 1.5px solid rgba(180,180,180,0.3);
  background: rgba(180,180,180,0.07);
  color: #aaa;
  font-family: var(--font-n);
  font-size: clamp(6px, 0.42vw, 8px);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
#btn-undo:not(:disabled):hover { background:rgba(180,180,180,0.15); color:#fff; transform:scale(1.1); }
#btn-undo:not(:disabled):active { transform:scale(0.9); }
#btn-undo:disabled { opacity:0.22; cursor:not-allowed; }
#btn-undo svg { display: none; }
#btn-undo::after { content: "UNDO"; }

/* ══════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════ */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
::-webkit-scrollbar { width:4px; height:4px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(212,168,67,0.2); border-radius:2px; }

/* ══════════════════════════════════════════════════════════════
   VISUAL TABLE  —  vt-* layout
   Casino green palette. Uniform greens, white borders, red/gold accents.
══════════════════════════════════════════════════════════════ */

/* ── Table root ── */
#craps-table {
  position: relative !important;
  width: auto !important;
  height: auto !important;
  padding: var(--tbl-pad) !important;
  user-select: none;
  touch-action: none;
  background: linear-gradient(160deg,#1a6b35 0%,#228b3a 30%,#1a6b35 60%,#228b3a 100%) !important;
  background-size: 100% 100% !important;
  border: 1px solid #d4a843 !important;
  border-radius: 10px;
  contain: layout style;
  /* box-shadow set statically — breath overlay uses opacity animation */
}
/* table-edge-shimmer — GPU-composited via transform instead of background-position */
#table-shimmer {
  position: absolute; inset: -1px;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none; z-index: 0;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; -webkit-mask-composite: xor; padding: 1px;
}
#table-shimmer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 300%; height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 49%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.12) 51%, transparent 60%);
  will-change: transform;
  animation: table-edge-shimmer 8s ease-in-out infinite;
}
@keyframes table-edge-shimmer {
  0%, 100% { transform: translateX(-66%); }
  50% { transform: translateX(0%); }
}

/* ── bet-zone: reset from old absolute model ── */
.bet-zone {
  position: relative !important;
  left: auto !important; top: auto !important;
  width: auto !important; height: auto !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  overflow: visible;
  transition: filter 0.14s, box-shadow 0.14s;
  user-select: none;
  flex-shrink: 0;
  text-align: center;
}
.bet-zone:not(.disabled):hover {
  filter: brightness(1.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.55) inset;
  z-index: 10;
}
.bet-zone.disabled  { cursor: not-allowed; pointer-events: all; }
.bet-zone.zone-faded  { opacity: 0.32; }
.bet-zone.zone-locked { opacity: 1; cursor: not-allowed; }
.bet-zone.zone-locked:hover { filter: none !important; box-shadow: none !important; }
.bet-zone.zone-faded:hover  { filter: none !important; box-shadow: none !important; }
.bet-zone.win-highlight,
.vt-big68-wrap.win-highlight  {
  filter: brightness(2) !important;
  box-shadow: 0 0 20px rgba(212,168,67,1) inset, 0 0 30px rgba(212,168,67,0.6) !important;
  z-index: 8;
  animation: zoneWinPulse 0.12s ease-in-out 3;
}
@keyframes zoneWinPulse {
  0%,100% { filter: brightness(2); }
  50%      { filter: brightness(2.8); }
}
.bet-zone.lose-highlight,
.vt-big68-wrap.lose-highlight { filter: brightness(0.38) saturate(0.3) !important; }

/* ── Chips ── */
.bet-chip {
  position: absolute !important;
  z-index: 30;
  top: 50% !important; left: 50% !important;
  transform: translate(-50%, -50%);
  width: var(--bet-chip-size) !important;
  height: var(--bet-chip-size) !important;
  min-width: var(--bet-chip-size) !important;
  min-height: var(--bet-chip-size) !important;
  max-width: var(--bet-chip-size) !important;
  max-height: var(--bet-chip-size) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: all;
  cursor: default;
  border: none;
  overflow: visible !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  font-size: clamp(8px, 0.57vw, 11px) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  word-spacing: 0 !important;
}

/* Edge notch ring on bet chips */
.bet-chip .chip-edge-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(
    from 4deg,
    var(--chip-edge, #fff) 0deg 12deg,
    var(--chip-edge2, #c41e3a) 12deg 24deg
  );
  box-shadow: 0 2px 8px rgba(0,0,0,0.9), inset 0 1px 1px rgba(255,255,255,0.12);
}

/* Face disc on bet chips (slightly thinner rim for small size) */
.bet-chip .chip-face {
  position: absolute; inset: 3px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%,
    color-mix(in srgb, var(--chip-color, #c41e3a), white 14%) 0%,
    var(--chip-color, #c41e3a) 45%,
    var(--chip-border, #8b1528) 100%
  );
  z-index: 1;
}

/* Inner ring on bet chips */
.bet-chip .chip-face::before {
  content: ''; position: absolute;
  inset: 16%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 0 3px rgba(0,0,0,0.3);
  z-index: 2;
}

/* Specular sheen on bet chips */
.bet-chip .chip-face::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(
    ellipse 55% 45% at 35% 28%,
    rgba(255,255,255,0.18) 0%,
    rgba(255,255,255,0.04) 40%,
    transparent 70%
  );
  z-index: 3; pointer-events: none;
}

.bet-chip span {
  font-family: var(--font-n);
  font-size: clamp(8px, 0.57vw, 11px) !important;
  font-weight: 700;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  word-spacing: 0 !important;
  pointer-events: none;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  text-align: center;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 4;
  position: relative;
  text-shadow: 0 1px 1px rgba(0,0,0,0.6), 0 -1px 0 rgba(255,255,255,0.1);
}

/* ── Puck ── */
#puck {
  position: absolute !important;
  z-index: 40;
  pointer-events: none;
  width: var(--puck-size) !important; height: var(--puck-size) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--font-n);
  font-size: clamp(8px, 0.57vw, 11px) !important;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(0,0,0,0.6);
  transition: left 0.55s cubic-bezier(0.34,1.56,0.64,1),
              top  0.55s cubic-bezier(0.34,1.56,0.64,1),
              background 0.4s ease;
}
#puck.off { background: linear-gradient(135deg,#333,#111) !important; color: #888 !important; border: 2px solid #555 !important; }
#puck.on  { background: linear-gradient(135deg,#fff,#ddd) !important; color: #111 !important; border: 2px solid #fff !important; }

/* ── Outer flex wrap ── */
.vt-wrap {
  display: flex;
  gap: var(--tbl-gap);
  align-items: stretch;
  font-family: var(--font-n);
  min-width: clamp(700px, 66.7vw, 1280px);
}

/* Push the center column wider so number cards get more breathing room */
.vt-center {
  min-width: clamp(480px, 44.8vw, 860px);
}

/* ═══════════════════════════════════
   LEFT PANEL  —  288px
═══════════════════════════════════ */
.vt-left {
  width: clamp(160px, 15vw, 288px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.26vw, 5px);
}

.vt-panel {
  border-radius: 8px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(160deg,rgba(0,0,0,0.60) 0%,rgba(0,0,0,0.50) 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.vt-panel-hd {
  font-size: clamp(6px, 0.42vw, 8px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: clamp(2px, 0.21vw, 4px) clamp(5px, 0.42vw, 8px);
  text-align: center;
}

/* ── Hard Ways 2×2 ── */
.vt-hw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: rgba(212,168,67,0.06);
  flex: 1 1 auto;
}
.vt-hw {
  flex-direction: column !important;
  gap: clamp(2px, 0.21vw, 4px);
  padding: clamp(4px, 0.36vw, 7px) clamp(3px, 0.31vw, 6px);
  background: linear-gradient(150deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.60) 100%);
  border: none !important;
  border-radius: 0 !important;
  transition: background 0.15s;
}
.vt-hw:hover {
  background: linear-gradient(150deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.28) 100%);
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(212,168,67,0.4) inset !important;
}
.vt-dice { display: flex; gap: 4px; pointer-events: none; }
.vt-die  { display: block; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.vt-hw-lbl {
  font-size: clamp(9px, 0.68vw, 13px); font-weight: 700; letter-spacing: 1.5px;
  color: #ff5050; text-shadow: 0 0 8px rgba(255,80,80,0.4);
  pointer-events: none;
}
.vt-hw-pay {
  font-size: clamp(9px, 0.68vw, 13px); letter-spacing: 1px;
  color: var(--gold); opacity: 0.75;
  pointer-events: none;
}

/* ── SEVEN ── */
.vt-seven {
  gap: 0;
  padding: clamp(2px, 0.26vw, 5px) clamp(5px, 0.42vw, 8px);
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.40) 60%, rgba(0,0,0,0.55) 100%);
  border: none !important;
  border-radius: 0 !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
}
.vt-seven:hover {
  background: linear-gradient(135deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.40) 100%) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset !important;
}
.vt-side-pay {
  font-size: clamp(6px, 0.42vw, 8px);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
  pointer-events: none;
  min-width: clamp(14px, 1.04vw, 20px);
}
.vt-seven-txt {
  flex: 1;
  font-size: clamp(12px, 0.94vw, 18px); font-weight: 700; letter-spacing: 4px;
  color: #ff3333;
  text-shadow: 0 0 18px rgba(255,50,50,0.7), 0 0 40px rgba(255,50,50,0.3);
  text-align: center;
  pointer-events: none;
}

/* ── Horn block: 2×2 grid, HORN floats centered via grid stacking ── */
.vt-horn-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "a b"
    "c d";
  gap: 1px;
  background: rgba(212,168,67,0.05);
  margin: 2px;
  border-radius: 5px;
  overflow: visible;
  position: relative;
}
/* 4 cells fill grid areas */
.vt-horn-cell:nth-child(1) { grid-area: a; }
.vt-horn-cell:nth-child(2) { grid-area: b; }
.vt-horn-cell:nth-child(3) { grid-area: c; }
.vt-horn-cell:nth-child(4) { grid-area: d; }
.vt-horn-cell {
  flex-direction: column !important;
  gap: 2px; padding: clamp(2px, 0.26vw, 5px) clamp(3px, 0.26vw, 5px);
  background: linear-gradient(150deg,#0a0a14,#060610);
  border: none !important;
  border-radius: 0 !important;
}
.vt-horn-cell:hover {
  background: linear-gradient(150deg,#16102a,#0a0a1e);
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(180,100,255,0.35) inset !important;
}

.vt-horn-cell .vt-dice { gap: 2px; }
.vt-horn-cell .vt-dice .vt-die { width: 14px; height: 14px; }

/* HORN button: span all 4 cells, self-center in the middle */
.vt-horn-ctr {
  grid-area: 1 / 1 / 3 / 3;   /* rows 1-2, cols 1-2 = all 4 cells */
  align-self: center !important;
  justify-self: center !important;
  position: relative !important;
  width: 80%; height: 80%;
  min-width: clamp(30px, 2.5vw, 48px); min-height: clamp(30px, 2.5vw, 48px);
  border-radius: 10px !important;
  flex-direction: column !important;
  gap: 2px; padding: clamp(2px, 0.21vw, 4px) clamp(3px, 0.31vw, 6px);
  background: radial-gradient(circle at 40% 35%, #3a0e0e, #1a0404) !important;
  border: 1.5px solid rgba(200,50,50,0.55) !important;
  box-shadow: 0 0 16px rgba(180,30,30,0.55), 0 2px 10px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,80,80,0.12) !important;
  z-index: 10;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s !important;
  overflow: visible !important;
  white-space: nowrap;
}
.vt-horn-ctr:hover {
  background: radial-gradient(circle at 40% 35%, #5a1212, #2a0808) !important;
  box-shadow: 0 0 26px rgba(220,50,50,0.75), 0 2px 12px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,100,100,0.2) !important;
  filter: none !important;
}
.vt-horn-ctr-lbl {
  font-family: var(--font-n);
  font-size: clamp(9px, 0.63vw, 12px); font-weight: 700; letter-spacing: 2px;
  color: #ff5555; line-height: 1;
  text-shadow: 0 0 10px rgba(255,60,60,0.6);
  pointer-events: none;
}
.vt-horn-ctr-sub {
  font-family: var(--font-n);
  font-size: clamp(7px, 0.47vw, 9px); font-weight: 500; letter-spacing: 1.5px;
  color: rgba(255,100,100,0.6);
  pointer-events: none;
}
.vt-hn {
  font-size: clamp(12px, 1.04vw, 20px); font-weight: 700; color: #f0f0f0; line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}
.vt-hp {
  font-size: clamp(7px, 0.47vw, 9px); letter-spacing: 0.5px; font-weight: 600;
  color: #ff6666;
  pointer-events: none;
}

/* ── Any Craps ── */
.vt-craps {
  gap: 0; padding: clamp(2px, 0.26vw, 5px) clamp(6px, 0.52vw, 10px);
  background: linear-gradient(135deg,#2a0808 0%, #180404 60%, #2a0808 100%);
  border: none !important;
  border-radius: 0 !important;
  border-top: 1px solid rgba(212,168,67,0.06) !important;
}
.vt-craps:hover {
  background: linear-gradient(135deg,#3a1010,#2a0808);
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,80,80,0.4) inset !important;
}
.vt-craps-txt {
  flex: 1; font-size: clamp(9px, 0.73vw, 14px); font-weight: 700; letter-spacing: 2.5px;
  color: #ff5050; text-shadow: 0 0 14px rgba(255,60,60,0.5);
  text-align: center; pointer-events: none;
}

/* ── C&E / Whirl ── */
.vt-cew-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: rgba(212,168,67,0.05);
}
.vt-cew {
  flex-direction: column !important; gap: 2px; padding: clamp(3px, 0.26vw, 5px) clamp(3px, 0.31vw, 6px);
  background: linear-gradient(150deg,#18180a,#0d0d06);
  border: none !important; border-radius: 0 !important;
}
.vt-cew:hover {
  background: linear-gradient(150deg,#2a2a0e,#18180a);
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(212,168,67,0.4) inset !important;
}
.vt-cew-lbl {
  font-size: clamp(9px, 0.68vw, 13px); font-weight: 700; letter-spacing: 2.5px;
  color: var(--gold); text-shadow: 0 0 10px rgba(212,168,67,0.4);
  pointer-events: none;
}
.vt-cew-sub {
  font-size: clamp(6px, 0.42vw, 8px); color: rgba(212,168,67,0.38); letter-spacing: 0.5px;
  pointer-events: none;
}

/* ═══════════════════════════════════
   CENTER
═══════════════════════════════════ */
.vt-center {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: clamp(3px, 0.26vw, 5px);
}

/* Number row takes a fixed large portion; rest is distributed to come/field/pass */
.vt-num-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);   /* 6 numbers + DC BAR */
  gap: clamp(2px, 0.21vw, 4px);
  flex-shrink: 0;
}

/* ── Number cards ── */
.vt-num-card {
  display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 7px; overflow: visible;
  background: linear-gradient(170deg,#176030 0%,#124a22 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: clamp(80px, 6.77vw, 130px);
}
/* Puck slot — reserved area at top of card */
.vt-puck-slot {
  position: relative;
  height: clamp(18px, 1.46vw, 28px); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
  border-radius: 7px 7px 0 0;
  overflow: visible;
}
/* Puck docked inside a slot — CSS handles centering, no pixel coords needed */
#puck.puck-docked {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  transform: translate(-50%, -50%);
  transition: none !important;
}
/* Active card when puck is ON: bright white border */
.vt-card-active {
  border-color: rgba(255,255,255,0.95) !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25), 0 0 18px rgba(255,255,255,0.12) !important;
  overflow: visible !important;
}
/* DON'T COME BAR card */
.vt-dc-card {
  background: linear-gradient(170deg,#1e0808,#120404) !important;
  border-color: rgba(255,255,255,0.15) !important;
}
.vt-dc-bar {
  flex: 1; flex-direction: column !important;
  gap: clamp(3px, 0.26vw, 5px); padding: clamp(4px, 0.31vw, 6px) clamp(2px, 0.21vw, 4px);
  border: none !important; border-radius: 0 !important;
  background: transparent; align-items: center !important;
}
.vt-dc-bar:hover {
  background: rgba(200,40,40,0.2) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset !important;
}
.vt-dc-bar-lbl {
  font-family: var(--font-n);
  font-size: clamp(8px, 0.57vw, 11px); font-weight: 700; letter-spacing: 1px;
  color: #ff6666; line-height: 1.4; text-align: center;
  pointer-events: none;
}
.vt-dc-dice { display: flex; gap: 3px; pointer-events: none; }
.vt-lay {
  padding: clamp(3px, 0.26vw, 5px) clamp(2px, 0.21vw, 4px); font-size: clamp(9px, 0.68vw, 13px); letter-spacing: 2px;
  color: rgba(255,255,255,0.65);
  background: rgba(0,0,0,0.15);
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 !important;
}
.vt-lay:hover {
  background: rgba(255,255,255,0.1) !important;
  filter: none !important;
  box-shadow: none !important;
}
.vt-lay-txt { pointer-events: none; }

.vt-num-main {
  flex: 1;
  flex-direction: column !important; gap: 2px;
  padding: clamp(4px, 0.42vw, 8px) 3px clamp(2px, 0.21vw, 4px);
  background: transparent;
  border: none !important; border-radius: 0 !important;
}
.vt-num-main:hover {
  background: rgba(255,255,255,0.08) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3) inset !important;
}
.vt-num-big {
  font-size: clamp(28px, 2.71vw, 52px); font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.08);
  pointer-events: none;
}
/* SIX and NINE — subtle tilt to distinguish from upside-down */
.vt-num-skew {
  display: inline-block;
  transform: rotate(-15deg);
  font-style: italic;
  letter-spacing: -1px;
  font-size: 1.25em;
  overflow: visible;
}
.vt-num-pay {
  font-size: clamp(9px, 0.68vw, 13px); color: rgba(255,255,255,0.35); letter-spacing: 0.5px;
  pointer-events: none;
}

/* Come/DC indicator strip — FIXED HEIGHT to prevent table resize when zones show/hide */
.vt-come-strip {
  display: flex; gap: 2px; padding: 2px 3px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.06);
  height: clamp(18px, 1.35vw, 26px);
  min-height: clamp(18px, 1.35vw, 26px);
  max-height: clamp(18px, 1.35vw, 26px);
  overflow: visible;
}
.vt-ci {
  flex: 1 !important;
  font-size: clamp(8px, 0.57vw, 11px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  padding: 3px 1px !important; border-radius: 3px !important;
  border: 1px solid !important;
}

/* C and DC — contract bet receivers. Non-clickable but show a chip when occupied.
   Background darkens when a chip is present (relies on .bet-chip child rendered inside). */
.vt-ci-c  { color: rgba(90,220,90,0.6);  border-color: rgba(90,220,90,0.15) !important;
             background: rgba(0,0,0,0); }
.vt-ci-dc { color: rgba(220,90,90,0.6);  border-color: rgba(220,90,90,0.15) !important;
             background: rgba(0,0,0,0); }

/* When a contract bet chip is on C or DC, highlight the zone slightly */
.vt-ci-c:has(.bet-chip)  { background: rgba(90,220,90,0.08) !important;
                             border-color: rgba(90,220,90,0.4) !important; }
.vt-ci-dc:has(.bet-chip) { background: rgba(220,90,90,0.08) !important;
                             border-color: rgba(220,90,90,0.4) !important; }

/* CO and DO — true odds, player-clickable when parent C/DC has a bet.
   Slightly brighter and get a hover glow to signal interactivity. */
.vt-ci-co { color: rgba(100,230,100,0.75); border-color: rgba(100,230,100,0.22) !important;
             cursor: pointer; }
.vt-ci-do { color: rgba(230,100,100,0.75); border-color: rgba(230,100,100,0.22) !important;
             cursor: pointer; }
.vt-ci-co:not(.disabled):hover { background: rgba(90,220,90,0.18) !important;
                                   border-color: rgba(90,220,90,0.6) !important;
                                   filter: none !important; }
.vt-ci-do:not(.disabled):hover { background: rgba(220,90,90,0.18) !important;
                                   border-color: rgba(220,90,90,0.6) !important;
                                   filter: none !important; }

/* CO/DO with a chip already on them — show stacked indicator */
.vt-ci-co:has(.bet-chip) { background: rgba(90,220,90,0.12) !important;
                             border-color: rgba(90,220,90,0.55) !important; }
.vt-ci-do:has(.bet-chip) { background: rgba(220,90,90,0.12) !important;
                             border-color: rgba(220,90,90,0.55) !important; }

/* Bottom strip: PLACE hidden, BUY takes full width */
.vt-num-bot {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.vt-place-btn {
  display: none !important;   /* PLACE = clicking the number itself */
}
.vt-buy-btn {
  flex: 1;
  font-size: clamp(10px, 0.78vw, 15px); letter-spacing: 1px; padding: clamp(3px, 0.26vw, 5px) 2px;
  border-radius: 0 0 7px 7px !important; border: none !important;
  color: rgba(255,255,255,0.65); background: transparent;
  text-align: center;
  position: relative;
  z-index: 2;
}
.vt-buy-btn:hover {
  background: rgba(255,255,255,0.1) !important;
  filter: none !important;
  box-shadow: none !important;
}

/* ── COME row ── */
.vt-come-row { display: flex; flex: 1; }
.vt-come {
  flex: 1;
  min-height: clamp(36px, 2.86vw, 55px);
  background: linear-gradient(135deg,#2a0808 0%,#3a0e0e 50%,#2a0808 100%);
  border: 1px solid rgba(220,60,60,0.4) !important;
  border-radius: 7px !important;
  font-size: clamp(16px, 1.41vw, 27px); font-weight: 700; letter-spacing: 5px;
  color: #ff4444;
  text-shadow: 0 0 24px rgba(255,60,60,0.7), 0 0 50px rgba(255,60,60,0.3);
  box-shadow: inset 0 1px 0 rgba(255,80,80,0.1), 0 2px 10px rgba(0,0,0,0.4);
}
.vt-come:hover {
  background: linear-gradient(135deg,#3a0e0e,#4a1212,#3a0e0e) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,80,80,0.6) inset !important;
}

/* ── PASS LINE — full width ── */
.vt-pass-row { display: flex; flex: 1; }
.vt-pass {
  flex: 1;
  min-height: clamp(36px, 2.86vw, 55px);
  background: linear-gradient(135deg,rgba(0,0,0,0.50),rgba(0,0,0,0.28));
  border: 1px solid rgba(255,255,255,0.2) !important;
  font-size: clamp(16px, 1.41vw, 27px); font-weight: 700; letter-spacing: 4px;
  color: #fff; text-shadow: 0 0 16px rgba(255,255,255,0.3);
  border-radius: 7px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 8px rgba(0,0,0,0.4);
}
.vt-pass:hover {
  background: linear-gradient(135deg,rgba(0,0,0,0.28),rgba(0,0,0,0.10)) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.5) inset !important;
}
/* ── Field + Big 6/8 ── */
.vt-field-outer {
  display: grid;
  grid-template-columns: 6fr 1fr;
  gap: clamp(2px, 0.21vw, 4px);
  align-items: stretch;
  min-height: clamp(36px, 2.86vw, 55px);
  flex: 1;
}

.vt-big68-wrap {
  position: relative;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(160deg,#120404,#080202);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vt-field {
  flex: 1;
  padding: clamp(3px, 0.26vw, 5px) clamp(4px, 0.42vw, 8px) clamp(2px, 0.21vw, 4px);
  background: linear-gradient(135deg,rgba(0,0,0,0.50),rgba(0,0,0,0.60));
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: 7px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(0,0,0,0.4);
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.vt-field:hover {
  background: linear-gradient(135deg,rgba(0,0,0,0.28),rgba(0,0,0,0.50)) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset !important;
}
/* Top row: 2 | dots/numbers | 12 */
.vt-field-top {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(10px, 1.15vw, 22px); width: 100%; pointer-events: none;
}
/* End blocks: big number + sub label stacked */
.vt-field-end {
  display: flex; flex-direction: column;
  align-items: center; gap: 1px; pointer-events: none;
}
/* Middle numbers row */
.vt-field-mids {
  display: flex; align-items: center;
  gap: clamp(8px, 0.94vw, 18px); pointer-events: none;
}
/* FIELD label — large, below */
.vt-field-lbl {
  font-family: var(--font-n); font-size: clamp(11px, 0.83vw, 16px); font-weight: 700;
  letter-spacing: 6px; color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.2);
  pointer-events: none; line-height: 1;
}
/* Text classes */
.vt-fa-num   { font-family: var(--font-n); font-size: clamp(11px, 0.89vw, 17px); font-weight: 700; color: #fff; pointer-events: none; }
.vt-fa-gold  { font-family: var(--font-n); font-size: clamp(16px, 1.35vw, 26px); font-weight: 700; color: #d4a843; line-height: 1; pointer-events: none; }
.vt-fa-red   { font-family: var(--font-n); font-size: clamp(16px, 1.35vw, 26px); font-weight: 700; color: #ff5555; line-height: 1; pointer-events: none; }
.vt-fa-dot   { font-family: var(--font-n); font-size: clamp(9px, 0.68vw, 13px); color: rgba(255,255,255,0.4); pointer-events: none; }
.vt-fa-sub   { font-family: var(--font-n); font-size: clamp(6px, 0.42vw, 8px); font-weight: 600; color: rgba(255,255,255,0.45);
               letter-spacing: 0.5px; text-align: center; line-height: 1.2; pointer-events: none; }

/* ── Big 6/8 internals ── */
.vt-big68-inner {
  width: clamp(50px, 4.17vw, 80px); height: clamp(50px, 4.17vw, 80px);
  transform: rotate(45deg);
  display: flex; flex-direction: column;
  align-items: stretch; flex-shrink: 0;
  pointer-events: none;
}
.vt-big68-zone {
  flex: 1;
  display: flex !important;
  align-items: center !important; justify-content: center !important;
  border: none !important; border-radius: 0 !important;
  background: transparent; cursor: pointer; pointer-events: all;
  transition: background 0.14s;
  position: relative !important; overflow: visible !important;
  box-shadow: none !important;
}
.vt-big68-zone:not(.disabled):hover {
  filter: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.vt-big68-zone:hover {
  background: transparent !important;
  filter: none !important; box-shadow: none !important;
}
.vt-big68-zone:hover .vt-big68-num {
  color: #ff4444;
  text-shadow: 0 0 18px rgba(255,50,50,0.9), 0 0 40px rgba(255,50,50,0.5), 0 0 60px rgba(255,50,50,0.3);
}
.vt-big68-num {
  font-family: var(--font-n);
  font-size: clamp(22px, 1.8vw, 34px); font-weight: 700;
  color: #cc3333; text-shadow: 0 0 10px rgba(200,40,40,0.5);
  pointer-events: none; line-height: 1;
  transform: rotate(-90deg); display: block;
}
.vt-big68-banner {
  flex-shrink: 0; height: clamp(12px, 0.9vw, 18px);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; border: none; background: transparent;
}
.vt-big68-banner-txt {
  font-family: var(--font-n);
  font-size: clamp(7px, 0.52vw, 10px); font-weight: 700; letter-spacing: 2px;
  color: rgba(180,60,60,0.5);
  white-space: nowrap; pointer-events: none;
}
.vt-big68-zone .bet-chip { z-index: 5 !important; }

/* ── Bottom bar: DON'T PASS | PASS ODDS | DON'T PASS ODDS — equal thirds ── */
.vt-bottom-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(2px, 0.21vw, 4px);
}
.vt-btn-dp, .vt-btn-pass-odds, .vt-btn-dp-odds {
  min-height: clamp(22px, 1.56vw, 30px);
  font-family: var(--font-n);
  font-size: clamp(6px, 0.42vw, 8px); font-weight: 700; letter-spacing: 1px;
  border-radius: 6px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  padding: clamp(2px, 0.21vw, 4px) clamp(3px, 0.31vw, 6px);
}
.vt-btn-dp {
  background: linear-gradient(135deg,#200a0a,#2a0c0c);
  color: #ff6666;
  flex-direction: column !important;
  gap: 3px;
}
.vt-btn-dp-txt { font-family: var(--font-n); font-size: clamp(6px, 0.42vw, 8px); font-weight: 700; letter-spacing: 1px; pointer-events: none; }
.vt-btn-dp-dice { display: flex; gap: 3px; pointer-events: none; }
.vt-btn-dp:hover {
  background: linear-gradient(135deg,#2e0e0e,#200a0a) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset !important;
}
.vt-btn-pass-odds {
  background: linear-gradient(135deg,rgba(0,0,0,0.50),rgba(0,0,0,0.60));
  color: #fff;
}
.vt-btn-pass-odds:hover {
  background: linear-gradient(135deg,rgba(0,0,0,0.28),rgba(0,0,0,0.50)) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset !important;
}
.vt-btn-dp-odds {
  background: linear-gradient(135deg,#200a0a,#2a0c0c);
  color: #ff8888;
}
.vt-btn-dp-odds:hover {
  background: linear-gradient(135deg,#2e0e0e,#200a0a) !important;
  filter: none !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset !important;
}
/* ══════════════════════════════════════════════════════
   TOOLTIP  —  JS-rendered, anchored to document.body
   Guaranteed to float above all stacking contexts.
══════════════════════════════════════════════════════ */
#vt-body-tip {
  position: fixed;
  background: linear-gradient(135deg, rgba(8,5,1,0.98), rgba(18,12,2,0.98));
  color: var(--gold);
  font-family: var(--font-n);
  font-size: clamp(12px, 0.83vw, 16px);
  font-weight: 500;
  letter-spacing: 0.07em;
  white-space: normal;
  max-width: min(380px, 50vw);
  padding: 7px clamp(10px, 0.78vw, 16px);
  border-radius: 7px;
  border: 1px solid rgba(212,168,67,0.4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,0,0,0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2147483647;
  line-height: 1.5;
}
#vt-body-tip.visible { opacity: 1; }
/* Structured tooltip sub-elements */
.tip-title { display: block; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; }
.tip-detail { display: block; font-size: 0.9em; font-weight: 400; color: rgba(212,168,67,0.7); margin-top: 1px; }
.tip-lock { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(212,168,67,0.25); }
.tip-lock-reason { display: block; font-size: 0.88em; font-weight: 600; color: rgba(255,255,255,0.85); }
.tip-lock-resolution { display: block; font-size: 0.85em; font-weight: 500; color: rgba(255,200,120,0.9); margin-top: 1px; }
.tip-lock-note { display: block; font-size: 0.8em; font-weight: 400; color: rgba(255,255,255,0.4); font-style: italic; margin-top: 2px; }

/* Chip tooltip — gold/amber, shows total bet amount */
#vt-chip-tip {
  position: fixed;
  background: linear-gradient(135deg,rgba(40,28,4,0.98),rgba(60,42,6,0.98));
  font-family: var(--font-n);
  white-space: nowrap;
  padding: 8px clamp(12px, 0.88vw, 18px);
  border-radius: 7px;
  border: 1px solid rgba(212,168,67,0.65);
  box-shadow: 0 4px 20px rgba(0,0,0,0.85), 0 0 10px rgba(212,168,67,0.15);
  pointer-events: none; opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 2147483646;
  line-height: 1.6;
  max-width: 420px;
}
#vt-chip-tip.visible { opacity: 1; }
.ctip-bet { display: block; font-size: clamp(12px, 0.88vw, 17px); font-weight: 700; color: #f5c842; letter-spacing: 0.04em; }
.ctip-win { display: block; font-size: clamp(12px, 0.83vw, 16px); font-weight: 600; color: rgba(100,230,130,0.9); letter-spacing: 0.03em; margin-top: 2px; }
/* Contract bet lock block inside chip tooltip */
.ctip-lock-wrap { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,0.12); white-space: normal; max-width: 400px; line-height: 1.5; }
.ctip-lock-line { display: block; font-size: clamp(11px, 0.78vw, 15px); font-weight: 600; color: rgba(255,255,255,0.8); letter-spacing: 0.02em; }
.ctip-lock-line:nth-child(2) { font-weight: 500; color: rgba(255,200,120,0.9); margin-top: 1px; }
.ctip-lock-note { display: block; font-size: clamp(10px, 0.73vw, 14px); font-weight: 400; color: rgba(255,255,255,0.45); letter-spacing: 0.02em; margin-top: 3px; font-style: italic; }
/* Fraction warning block inside chip tooltip */
.ctip-frac-wrap { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(240,192,64,0.2); white-space: normal; max-width: 400px; line-height: 1.5; }
.ctip-frac-detail { display: block; font-size: clamp(12px, 0.83vw, 16px); font-weight: 500; color: #f0c040; letter-spacing: 0.02em; }
.ctip-frac-mode { display: block; font-size: clamp(12px, 0.83vw, 16px); font-weight: 400; color: rgba(180,160,200,0.85); letter-spacing: 0.02em; margin-top: 2px; font-style: italic; }
.ctip-frac-fix { display: block; font-size: clamp(12px, 0.83vw, 16px); font-weight: 700; color: #fff; letter-spacing: 0.02em; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════ */
/* VARIANT STYLES                                            */
/* ═══════════════════════════════════════════════════════════ */

/* Variant description in setup screen */
.variant-desc {
  font-size: clamp(10px, 0.65vw, 14px);
  color: rgba(255,255,255,0.5);
  margin-top: clamp(3px, 0.31vw, 6px);
  line-height: 1.5;
  text-align: left;
  min-height: clamp(20px, 1.67vw, 32px);
}

/* Extended num row — 10 numbers for crapless/easy */
.vt-num-row-extended {
  grid-template-columns: repeat(10, 1fr) !important;
}
/* When 10+ cards, shrink text slightly */
.vt-num-row-extended .vt-num-big {
  font-size: clamp(16px, 2.5vw, 28px);
}
.vt-num-row-extended .vt-num-pay {
  font-size: clamp(7px, 1vw, 10px);
}
.vt-num-row-extended .vt-num-card {
  min-width: 0;
}
.vt-num-row-extended .vt-puck-slot {
  height: clamp(14px, 1.15vw, 22px);
}
.vt-num-row-extended .vt-lay {
  padding: 2px 1px;
}
.vt-num-row-extended .vt-lay-txt {
  font-size: clamp(5px, 0.36vw, 7px);
}
.vt-num-row-extended .vt-place-btn,
.vt-num-row-extended .vt-buy-btn {
  font-size: clamp(6px, 0.9vw, 8px);
  padding: 2px 1px;
}

/* ── Buy zone on top of card (crapless variant, no lay) ── */
.vt-buy-top {
  display: flex !important; align-items: center; justify-content: center;
  padding: 3px 2px;
  background: rgba(212,168,67,0.12);
  border-bottom: 1px solid rgba(212,168,67,0.25) !important;
  border-radius: 0 !important; border: none !important;
  cursor: pointer; transition: background 0.15s;
}
.vt-buy-top:hover {
  background: rgba(212,168,67,0.28) !important;
}
.vt-buy-top-txt {
  font-family: var(--font-n);
  font-size: clamp(8px, 0.57vw, 11px); font-weight: 700; letter-spacing: 1.5px;
  color: #d4a843; pointer-events: none;
}

/* ── Low Field / High Field (Easy Craps) ── */
.vt-lowhigh-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 2px;
}
.vt-low-field, .vt-high-field {
  display: flex !important; flex-direction: column !important;
  align-items: center !important; justify-content: center !important;
  padding: 8px 6px;
  border-radius: 7px !important;
  gap: 2px;
  font-family: var(--font-n);
}
.vt-low-field {
  background: linear-gradient(135deg, rgba(30,80,180,0.35), rgba(20,50,120,0.3));
  border: 1px solid rgba(80,140,255,0.35) !important;
}
.vt-low-field:hover {
  background: rgba(30,80,180,0.5) !important;
}
.vt-high-field {
  background: linear-gradient(135deg, rgba(180,40,30,0.35), rgba(120,20,20,0.3));
  border: 1px solid rgba(255,100,80,0.35) !important;
}
.vt-high-field:hover {
  background: rgba(180,40,30,0.5) !important;
}
.vt-lhf-title {
  font-size: clamp(7px, 0.52vw, 10px); font-weight: 700; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.9);
  pointer-events: none;
}
.vt-lhf-nums {
  font-size: clamp(10px, 0.73vw, 14px); font-weight: 800; letter-spacing: 2px;
  color: #f5c842;
  pointer-events: none;
}

/* ── Place Bets label (Easy Craps) ── */
.vt-place-bets-label {
  text-align: center;
  font-family: var(--font-n);
  font-size: clamp(7px, 0.47vw, 9px); font-weight: 700; letter-spacing: 2px;
  color: rgba(255,255,255,0.5);
  padding: 3px 0 1px;
}

/* ── Simplified bottom bar (crapless/easy — no Don't Pass) ── */
.vt-bottom-bar-simple {
  grid-template-columns: 1fr !important;
  justify-items: stretch;
}
.vt-pass-odds-wide {
  width: 100%;
  text-align: center;
  font-size: clamp(9px, 0.63vw, 12px) !important;
  padding: clamp(6px, 0.52vw, 10px) clamp(12px, 1.04vw, 20px) !important;
  letter-spacing: 2px;
}

/* ── Field full width when no Big 6/8 ── */
.vt-field-full {
  grid-template-columns: 1fr !important;
}
.vt-field-full .vt-field {
  flex: 1;
}

/* ── Variant wrapper tweaks ── */

/* ── Responsive: smaller screens with extended layout ── */
@media (max-width: 900px) {
  .vt-num-row-extended {
    gap: 2px;
  }
  .vt-num-row-extended .vt-num-big {
    font-size: clamp(14px, 2vw, 22px);
  }
  .vt-num-row-extended .vt-puck-slot {
    height: clamp(12px, 1.04vw, 18px);
  }
  .vt-lhf-nums {
    font-size: clamp(8px, 0.63vw, 12px);
  }
}
@media (max-width: 600px) {
  .vt-num-row-extended {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

/* ── Large desktop (2K+) — scale up game UI ── */
@media (min-width: 2000px) {
  :root {
    --chip-rack-size: clamp(54px, 2.81vw, 80px);
    --bet-chip-size:  clamp(38px, 1.98vw, 56px);
    --puck-size:      clamp(38px, 1.98vw, 56px);
    --icon-btn-size:  clamp(34px, 1.77vw, 50px);
    --bar-height:     clamp(56px, 2.92vw, 80px);
    --roll-btn-w:     clamp(170px, 8.85vw, 260px);
    --qb-btn-w:       clamp(64px, 3.33vw, 96px);
    --tbl-gap:        clamp(6px, 0.42vw, 12px);
    --tbl-pad:        clamp(6px, 0.42vw, 12px);
  }
  #bottom-inner {
    gap: clamp(5px, 0.35vw, 8px);
    padding: 0 clamp(8px, 0.5vw, 14px);
  }
  .btn-spin {
    font-size: clamp(13px, 0.7vw, 18px);
    border-radius: 14px;
    min-height: clamp(42px, 2.4vw, 60px);
  }
  .btn-roll-main {
    font-size: clamp(15px, 0.8vw, 20px);
  }
  .icon-btn.grey {
    font-size: clamp(9px, 0.5vw, 12px);
  }
  .chip-label {
    font-size: clamp(10px, 0.6vw, 15px);
  }
  .chip-label.chip-label-sm {
    font-size: clamp(9px, 0.52vw, 13px);
  }
  .bar-sep {
    height: clamp(32px, 1.8vw, 44px);
  }
  /* Info card scales up */
  .vt-info-card {
    padding: clamp(5px, 0.35vw, 10px) clamp(8px, 0.5vw, 14px);
  }
  .vt-info-variant-name {
    font-size: clamp(11px, 0.6vw, 16px);
  }
  .vt-info-val {
    font-size: clamp(13px, 0.75vw, 18px);
  }
  .die-xs {
    width: clamp(22px, 1.3vw, 32px);
    height: clamp(22px, 1.3vw, 32px);
  }
  .die-xs .die-face {
    width: clamp(22px, 1.3vw, 32px);
    height: clamp(22px, 1.3vw, 32px);
  }
}

/* ── 4K displays — further scale up ── */
@media (min-width: 3200px) {
  :root {
    --chip-rack-size: clamp(80px, 2.6vw, 110px);
    --bet-chip-size:  clamp(56px, 1.8vw, 80px);
    --puck-size:      clamp(56px, 1.8vw, 80px);
    --icon-btn-size:  clamp(48px, 1.6vw, 68px);
    --bar-height:     clamp(80px, 2.6vw, 110px);
    --roll-btn-w:     clamp(260px, 8vw, 380px);
    --qb-btn-w:       clamp(96px, 3vw, 130px);
    --tbl-gap:        clamp(10px, 0.38vw, 18px);
    --tbl-pad:        clamp(10px, 0.38vw, 18px);
  }
  #bottom-inner {
    gap: clamp(10px, 0.35vw, 16px);
    padding: 0 clamp(16px, 0.5vw, 24px);
  }
  .btn-spin {
    font-size: clamp(18px, 0.6vw, 24px);
    border-radius: 16px;
    min-height: clamp(56px, 2vw, 78px);
  }
  .btn-roll-main {
    font-size: clamp(20px, 0.7vw, 28px);
  }
  .icon-btn.grey {
    font-size: clamp(12px, 0.42vw, 16px);
  }
  .chip-label {
    font-size: clamp(14px, 0.5vw, 20px);
  }
  .chip-label.chip-label-sm {
    font-size: clamp(12px, 0.42vw, 16px);
  }
  .bar-sep {
    height: clamp(44px, 1.6vw, 60px);
  }
  /* Info card */
  .vt-info-card {
    padding: clamp(8px, 0.3vw, 14px) clamp(12px, 0.42vw, 20px);
  }
  .vt-info-variant-name {
    font-size: clamp(16px, 0.5vw, 22px);
  }
  .vt-info-variant-desc {
    font-size: clamp(10px, 0.32vw, 14px);
  }
  .vt-info-val {
    font-size: clamp(18px, 0.6vw, 26px);
  }
  .vt-info-lbl {
    font-size: clamp(8px, 0.26vw, 12px);
  }
  .die-xs {
    width: clamp(30px, 1.1vw, 42px);
    height: clamp(30px, 1.1vw, 42px);
  }
  .die-xs .die-face {
    width: clamp(30px, 1.1vw, 42px);
    height: clamp(30px, 1.1vw, 42px);
  }
  .vt-info-total {
    font-size: clamp(18px, 0.6vw, 26px);
  }
  /* Larger icon button SVGs */
  .icon-btn svg {
    width: clamp(22px, 0.6vw, 30px);
    height: clamp(22px, 0.6vw, 30px);
  }
  #btn-repeat, #btn-double {
    font-size: clamp(10px, 0.35vw, 14px);
  }
}

/* ═══════════════════════════════════════════════════════════
   TABLE LAYOUT — 2K displays
   Increase base dimensions so scaleTable() needs less zoom.
   Target: scale ≈ 1.2–1.5x instead of 2.2x.
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 2000px) {
  /* ── Outer wrap + columns ── */
  .vt-wrap {
    min-width: clamp(1280px, 72vw, 1920px);
  }
  .vt-center {
    min-width: clamp(860px, 50vw, 1340px);
  }
  .vt-left {
    width: clamp(288px, 17vw, 420px);
  }

  /* ── Column & grid gaps ── */
  .vt-left {
    gap: clamp(5px, 0.32vw, 8px);
  }
  .vt-center {
    gap: clamp(5px, 0.32vw, 8px);
  }
  .vt-num-row {
    gap: clamp(4px, 0.26vw, 7px);
  }
  .vt-bottom-bar {
    gap: clamp(4px, 0.26vw, 7px);
  }
  .vt-field-outer {
    gap: clamp(4px, 0.26vw, 7px);
  }

  /* ── Number cards ── */
  .vt-num-card {
    min-height: clamp(130px, 8vw, 195px);
  }
  .vt-num-big {
    font-size: clamp(52px, 3.2vw, 78px);
  }
  .vt-num-pay {
    font-size: clamp(13px, 0.8vw, 20px);
  }
  .vt-puck-slot {
    height: clamp(28px, 1.7vw, 42px);
  }
  .vt-num-main {
    padding: clamp(8px, 0.5vw, 12px) 5px clamp(4px, 0.26vw, 6px);
  }
  .vt-lay {
    padding: clamp(5px, 0.32vw, 8px) clamp(4px, 0.26vw, 6px);
    font-size: clamp(13px, 0.8vw, 20px);
  }
  .vt-buy-btn {
    font-size: clamp(15px, 0.9vw, 22px);
    padding: clamp(5px, 0.32vw, 8px) 3px;
  }
  .vt-come-strip {
    height: clamp(26px, 1.6vw, 40px);
    min-height: clamp(26px, 1.6vw, 40px);
    max-height: clamp(26px, 1.6vw, 40px);
  }
  .vt-ci {
    font-size: clamp(11px, 0.68vw, 17px) !important;
  }

  /* ── DC BAR ── */
  .vt-dc-bar {
    gap: clamp(5px, 0.32vw, 8px);
    padding: clamp(6px, 0.38vw, 10px) clamp(4px, 0.26vw, 6px);
  }
  .vt-dc-bar-lbl {
    font-size: clamp(11px, 0.68vw, 17px);
  }

  /* ── PASS / COME / FIELD rows ── */
  .vt-pass, .vt-come {
    min-height: clamp(55px, 3.4vw, 82px);
    font-size: clamp(27px, 1.7vw, 42px);
  }
  .vt-field-outer {
    min-height: clamp(55px, 3.4vw, 82px);
  }
  .vt-field-lbl {
    font-size: clamp(16px, 1vw, 24px);
  }
  .vt-fa-num {
    font-size: clamp(17px, 1.05vw, 26px);
  }
  .vt-fa-gold, .vt-fa-red {
    font-size: clamp(26px, 1.6vw, 40px);
  }
  .vt-fa-dot {
    font-size: clamp(13px, 0.8vw, 20px);
  }
  .vt-fa-sub {
    font-size: clamp(8px, 0.5vw, 12px);
  }

  /* ── Big 6/8 ── */
  .vt-big68-inner {
    width: clamp(80px, 5vw, 120px);
    height: clamp(80px, 5vw, 120px);
  }
  .vt-big68-num {
    font-size: clamp(26px, 1.6vw, 40px);
  }
  .vt-big68-banner {
    height: clamp(12px, 0.75vw, 18px);
  }
  .vt-big68-banner-txt {
    font-size: clamp(7px, 0.42vw, 10px);
  }

  /* ── Bottom bar: DP / PASS ODDS / DP ODDS ── */
  .vt-btn-dp, .vt-btn-pass-odds, .vt-btn-dp-odds {
    min-height: clamp(30px, 1.9vw, 46px);
    font-size: clamp(8px, 0.5vw, 12px);
    padding: clamp(4px, 0.26vw, 6px) clamp(5px, 0.38vw, 9px);
  }
  .vt-btn-dp-txt {
    font-size: clamp(8px, 0.5vw, 12px);
  }

  /* ── Left panel cells ── */
  .vt-panel-hd {
    font-size: clamp(10px, 0.62vw, 15px);
    padding: clamp(5px, 0.32vw, 8px) clamp(8px, 0.5vw, 12px);
  }
  .vt-hw {
    gap: clamp(4px, 0.26vw, 6px);
    padding: clamp(9px, 0.56vw, 14px) clamp(5px, 0.38vw, 9px);
  }
  .vt-hw-lbl {
    font-size: clamp(13px, 0.8vw, 20px);
  }
  .vt-hw-pay {
    font-size: clamp(13px, 0.8vw, 20px);
  }
  .vt-seven {
    padding: clamp(4px, 0.28vw, 7px) clamp(8px, 0.5vw, 12px);
  }
  .vt-seven-txt {
    font-size: clamp(18px, 1.12vw, 28px);
  }
  .vt-side-pay {
    font-size: clamp(8px, 0.5vw, 12px);
    min-width: clamp(20px, 1.2vw, 30px);
  }
  .vt-horn-cell {
    padding: clamp(5px, 0.32vw, 8px) clamp(5px, 0.32vw, 8px);
  }
  .vt-horn-ctr {
    min-width: clamp(48px, 3vw, 72px);
    min-height: clamp(48px, 3vw, 72px);
  }
  .vt-horn-ctr-lbl {
    font-size: clamp(12px, 0.75vw, 18px);
  }
  .vt-horn-ctr-sub {
    font-size: clamp(9px, 0.56vw, 14px);
  }
  .vt-hn {
    font-size: clamp(20px, 1.25vw, 30px);
  }
  .vt-hp {
    font-size: clamp(9px, 0.56vw, 14px);
  }
  .vt-craps {
    padding: clamp(5px, 0.32vw, 8px) clamp(10px, 0.62vw, 15px);
  }
  .vt-craps-txt {
    font-size: clamp(14px, 0.88vw, 22px);
  }
  .vt-cew {
    padding: clamp(5px, 0.32vw, 8px) clamp(5px, 0.38vw, 9px);
  }
  .vt-cew-lbl {
    font-size: clamp(13px, 0.82vw, 20px);
  }
  .vt-cew-sub {
    font-size: clamp(8px, 0.5vw, 12px);
  }

  /* ── Tooltips ── */
  #vt-body-tip {
    font-size: clamp(15px, 0.88vw, 22px);
    padding: 9px clamp(14px, 0.88vw, 22px);
  }
  .ctip-bet {
    font-size: clamp(16px, 0.95vw, 24px);
  }
  .ctip-win {
    font-size: clamp(15px, 0.88vw, 22px);
  }
  .ctip-lock-line {
    font-size: clamp(14px, 0.82vw, 20px);
  }
  .ctip-lock-note {
    font-size: clamp(13px, 0.75vw, 18px);
  }
  .ctip-frac-detail,
  .ctip-frac-mode,
  .ctip-frac-fix {
    font-size: clamp(15px, 0.88vw, 22px);
  }
  .ctip-frac-wrap {
    max-width: 480px;
  }
}

/* ═══════════════════════════════════════════════════════════
   TABLE LAYOUT — 4K displays  (3200px+)
   Target: scale ≈ 1.0–1.3x instead of 2.8x.
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 3200px) {
  /* ── Outer wrap + columns ── */
  .vt-wrap {
    min-width: clamp(1920px, 62vw, 2880px);
  }
  .vt-center {
    min-width: clamp(1340px, 44vw, 2020px);
  }
  .vt-left {
    width: clamp(420px, 14.5vw, 620px);
  }

  /* ── Column & grid gaps ── */
  .vt-left {
    gap: clamp(8px, 0.28vw, 14px);
  }
  .vt-center {
    gap: clamp(8px, 0.28vw, 14px);
  }
  .vt-num-row {
    gap: clamp(7px, 0.22vw, 12px);
  }
  .vt-bottom-bar {
    gap: clamp(7px, 0.22vw, 12px);
  }
  .vt-field-outer {
    gap: clamp(7px, 0.22vw, 12px);
  }

  /* ── Number cards ── */
  .vt-num-card {
    min-height: clamp(195px, 6.5vw, 290px);
  }
  .vt-num-big {
    font-size: clamp(78px, 2.6vw, 116px);
  }
  .vt-num-pay {
    font-size: clamp(20px, 0.65vw, 30px);
  }
  .vt-puck-slot {
    height: clamp(42px, 1.4vw, 62px);
  }
  .vt-num-main {
    padding: clamp(12px, 0.4vw, 18px) 8px clamp(6px, 0.22vw, 10px);
  }
  .vt-lay {
    padding: clamp(8px, 0.26vw, 12px) clamp(6px, 0.22vw, 10px);
    font-size: clamp(20px, 0.65vw, 30px);
  }
  .vt-buy-btn {
    font-size: clamp(22px, 0.72vw, 34px);
    padding: clamp(8px, 0.26vw, 12px) 5px;
  }
  .vt-come-strip {
    height: clamp(40px, 1.3vw, 58px);
    min-height: clamp(40px, 1.3vw, 58px);
    max-height: clamp(40px, 1.3vw, 58px);
  }
  .vt-ci {
    font-size: clamp(17px, 0.55vw, 24px) !important;
  }

  /* ── DC BAR ── */
  .vt-dc-bar {
    gap: clamp(8px, 0.26vw, 12px);
    padding: clamp(10px, 0.32vw, 14px) clamp(6px, 0.22vw, 10px);
  }
  .vt-dc-bar-lbl {
    font-size: clamp(17px, 0.55vw, 24px);
  }

  /* ── PASS / COME / FIELD rows ── */
  .vt-pass, .vt-come {
    min-height: clamp(82px, 2.75vw, 124px);
    font-size: clamp(42px, 1.38vw, 62px);
  }
  .vt-field-outer {
    min-height: clamp(82px, 2.75vw, 124px);
  }
  .vt-field-lbl {
    font-size: clamp(24px, 0.8vw, 36px);
  }
  .vt-fa-num {
    font-size: clamp(26px, 0.85vw, 38px);
  }
  .vt-fa-gold, .vt-fa-red {
    font-size: clamp(40px, 1.3vw, 60px);
  }
  .vt-fa-dot {
    font-size: clamp(20px, 0.65vw, 30px);
  }
  .vt-fa-sub {
    font-size: clamp(12px, 0.4vw, 18px);
  }

  /* ── Big 6/8 ── */
  .vt-big68-inner {
    width: clamp(120px, 4vw, 180px);
    height: clamp(120px, 4vw, 180px);
  }
  .vt-big68-num {
    font-size: clamp(40px, 1.3vw, 60px);
  }
  .vt-big68-banner {
    height: clamp(18px, 0.6vw, 26px);
  }
  .vt-big68-banner-txt {
    font-size: clamp(10px, 0.35vw, 15px);
  }

  /* ── Bottom bar: DP / PASS ODDS / DP ODDS ── */
  .vt-btn-dp, .vt-btn-pass-odds, .vt-btn-dp-odds {
    min-height: clamp(46px, 1.5vw, 68px);
    font-size: clamp(12px, 0.4vw, 18px);
    padding: clamp(6px, 0.22vw, 10px) clamp(9px, 0.32vw, 14px);
  }
  .vt-btn-dp-txt {
    font-size: clamp(12px, 0.4vw, 18px);
  }

  /* ── Left panel cells ── */
  .vt-panel-hd {
    font-size: clamp(15px, 0.5vw, 22px);
    padding: clamp(8px, 0.26vw, 12px) clamp(12px, 0.4vw, 18px);
  }
  .vt-hw {
    gap: clamp(6px, 0.22vw, 10px);
    padding: clamp(14px, 0.46vw, 20px) clamp(9px, 0.32vw, 14px);
  }
  .vt-hw-lbl {
    font-size: clamp(20px, 0.65vw, 30px);
  }
  .vt-hw-pay {
    font-size: clamp(20px, 0.65vw, 30px);
  }
  .vt-seven {
    padding: clamp(7px, 0.22vw, 10px) clamp(12px, 0.4vw, 18px);
  }
  .vt-seven-txt {
    font-size: clamp(28px, 0.9vw, 42px);
  }
  .vt-side-pay {
    font-size: clamp(12px, 0.4vw, 18px);
    min-width: clamp(30px, 1vw, 44px);
  }
  .vt-horn-cell {
    padding: clamp(7px, 0.26vw, 12px) clamp(8px, 0.26vw, 12px);
  }
  .vt-horn-ctr {
    min-width: clamp(72px, 2.4vw, 108px);
    min-height: clamp(72px, 2.4vw, 108px);
  }
  .vt-horn-ctr-lbl {
    font-size: clamp(18px, 0.6vw, 28px);
  }
  .vt-horn-ctr-sub {
    font-size: clamp(14px, 0.45vw, 20px);
  }
  .vt-hn {
    font-size: clamp(30px, 1vw, 46px);
  }
  .vt-hp {
    font-size: clamp(14px, 0.45vw, 20px);
  }
  .vt-craps {
    padding: clamp(7px, 0.26vw, 12px) clamp(15px, 0.5vw, 22px);
  }
  .vt-craps-txt {
    font-size: clamp(22px, 0.7vw, 32px);
  }
  .vt-cew {
    padding: clamp(7px, 0.26vw, 12px) clamp(9px, 0.32vw, 14px);
  }
  .vt-cew-lbl {
    font-size: clamp(20px, 0.65vw, 30px);
  }
  .vt-cew-sub {
    font-size: clamp(12px, 0.4vw, 18px);
  }

  /* ── Tooltips ── */
  #vt-body-tip {
    font-size: clamp(22px, 0.68vw, 30px);
    padding: 14px clamp(20px, 0.68vw, 30px);
  }
  .ctip-bet {
    font-size: clamp(24px, 0.75vw, 34px);
  }
  .ctip-win {
    font-size: clamp(22px, 0.68vw, 30px);
  }
  .ctip-lock-line {
    font-size: clamp(20px, 0.62vw, 28px);
  }
  .ctip-lock-note {
    font-size: clamp(18px, 0.56vw, 24px);
  }
  .ctip-frac-detail,
  .ctip-frac-mode,
  .ctip-frac-fix {
    font-size: clamp(22px, 0.68vw, 30px);
  }
  .ctip-frac-wrap {
    max-width: 600px;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* SAVE INDICATOR                                            */
/* ═══════════════════════════════════════════════════════════ */

#save-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* ═══ QUICK-BET BUTTONS ═══ */
.quick-bet-group {
  display: flex;
  gap: 4px;
  align-items: center;
}
/* All quick-bet buttons + DOWN: uniform fixed width */
.qb-unified {
  width: var(--qb-btn-w) !important;
  padding: 0 !important;
  justify-content: center;
  flex-shrink: 0;
}
/* ON/OFF toggle states */
.icon-btn.green {
  color: #8f8 !important;
  border-color: rgba(100,200,100,0.4) !important;
  background: rgba(50,160,70,0.15) !important;
}
.icon-btn.green:hover:not(:disabled) {
  background: rgba(50,160,70,0.25) !important;
}
.icon-btn.red-toggle {
  color: #f88 !important;
  border-color: rgba(255,100,100,0.4) !important;
  background: rgba(200,50,50,0.15) !important;
  animation: pulse-off 2s ease-in-out infinite;
}
@keyframes pulse-off {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ═══ BETS OFF DIM ═══ */
.bets-off-dim {
  opacity: 0.4 !important;
  filter: grayscale(0.6);
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.bets-off-dim::after {
  content: 'OFF';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(6px, 0.42vw, 8px);
  font-weight: 900;
  color: rgba(255,80,80,0.9);
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 40;
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
}

/* ═══ TAB SYSTEM (Hard Ways / Hop Bets) ═══ */
.vt-tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 0;
}
.vt-tab {
  flex: 1;
  padding: clamp(2px, 0.21vw, 4px) clamp(3px, 0.31vw, 6px);
  font-size: clamp(7px, 0.47vw, 9px);
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
}
.vt-tab:hover { color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.45); }
.vt-tab.active {
  color: #d4a843;
  background: rgba(212,168,67,0.12);
  border-color: rgba(212,168,67,0.25);
  border-bottom-color: transparent;
}
.vt-tab-panel {
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 0px 6px 6px 6px;
  background: rgba(0,0,0,0.15);
  min-height: clamp(140px, 11.46vw, 220px);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ═══ VT INFO CARD (2-row: variant + status) ═══ */
.vt-info-card {
  border-radius: 6px;
  border: 1px solid rgba(212,168,67,0.25);
  background: linear-gradient(160deg, rgba(12,10,6,0.92) 0%, rgba(8,6,4,0.92) 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: clamp(3px, 0.26vw, 5px) clamp(4px, 0.42vw, 8px);
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.21vw, 4px);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: clamp(3px, 0.26vw, 5px);
}

/* Row 1: Variant name + description */
.vt-info-variant-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.vt-info-variant-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(8px, 0.57vw, 11px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #d4a843;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vt-info-variant-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(6px, 0.39vw, 7.5px);
  color: rgba(255,255,255,0.35);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Horizontal separator */
.vt-info-sep {
  height: 1px;
  background: rgba(212,168,67,0.12);
}

/* Row 2: Single-line status strip */
.vt-info-status-row {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.42vw, 8px);
  min-height: 0;
  overflow: hidden;
}
.vt-info-stat {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.21vw, 4px);
  flex-shrink: 0;
}
.vt-info-lbl {
  font-size: clamp(5px, 0.31vw, 6px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-family: 'Oswald', sans-serif;
  white-space: nowrap;
  line-height: 1;
}
.vt-info-val {
  font-size: clamp(9px, 0.68vw, 13px);
  font-weight: 700;
  font-family: 'Oswald', sans-serif;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  line-height: 1.1;
}
.vt-info-gold {
  color: #d4a843;
}

/* Dice in status row */
.vt-info-dice-area {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.die-xs {
  width: clamp(16px, 1.15vw, 22px);
  height: clamp(16px, 1.15vw, 22px);
  border-radius: 3px !important;
}
.die-xs .die-face {
  width: clamp(16px, 1.15vw, 22px);
  height: clamp(16px, 1.15vw, 22px);
}
.vt-info-total {
  font-size: clamp(10px, 0.73vw, 14px);
  font-weight: 700;
  font-family: 'Oswald', sans-serif;
  color: #fff;
  min-width: 14px;
  text-align: center;
  line-height: 1;
}

/* Point display — sits next to dice */
.vt-info-point {
  font-size: clamp(7px, 0.47vw, 9px);
  color: rgba(255,255,255,0.7);
  font-family: 'Oswald', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}
.vt-info-point strong {
  color: #d4a843;
  font-size: clamp(9px, 0.63vw, 12px);
}

/* Phase badge — pushed to right */
.vt-info-phase {
  font-size: clamp(5px, 0.36vw, 7px);
  padding: 2px clamp(3px, 0.26vw, 5px);
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}
.phase-badge.place-bets {
  background: rgba(120,120,140,0.15);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.15);
}
/* SIM MODE blinking badge on phase indicator */
.phase-badge.sim-mode-badge {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
  cursor: pointer;
  animation: simModeBlink 1.4s ease-in-out infinite;
}
.phase-badge.sim-mode-badge:hover {
  background: rgba(74, 222, 128, 0.28);
  border-color: rgba(74, 222, 128, 0.6);
}
@keyframes simModeBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ═══ HOP BETS GRID ═══ */
.vt-hop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  flex: 1 1 auto;
}
.vt-hop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 1px;
  border-radius: 4px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(30,45,60,0.7), rgba(20,35,50,0.7));
  border: 1px solid rgba(100,150,200,0.2);
  transition: all 0.12s ease;
  position: relative;
  min-height: clamp(20px, 1.46vw, 28px);
}
.vt-hop:hover {
  background: linear-gradient(135deg, rgba(40,60,80,0.8), rgba(30,50,70,0.8));
  border-color: rgba(100,150,200,0.5);
  transform: scale(1.04);
}
.vt-hop .vt-dice { gap: 1px; margin-bottom: 1px; }
.vt-hop .vt-dice .vt-die { width: 11px; height: 11px; }
.vt-hop-pay {
  font-size: clamp(5px, 0.36vw, 7px);
  font-weight: 700;
  color: rgba(212,168,67,0.95);
  letter-spacing: 0.3px;
}
.vt-hop-hard {
  background: linear-gradient(135deg, rgba(60,30,30,0.7), rgba(45,20,20,0.7));
  border-color: rgba(200,100,100,0.25);
}
.vt-hop-hard:hover {
  background: linear-gradient(135deg, rgba(80,35,35,0.8), rgba(60,25,25,0.8));
  border-color: rgba(200,100,100,0.5);
}
.vt-hop-hard-label {
  font-size: clamp(6px, 0.42vw, 8px);
  font-weight: 700;
  color: rgba(255,150,150,0.85);
  letter-spacing: 1px;
  text-align: center;
  margin: 3px 0 1px;
  font-family: 'Oswald', sans-serif;
  text-shadow: 0 0 6px rgba(255,100,100,0.3);
  flex-shrink: 0;
}
.vt-hop-hard-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
}

/* ═══ PUSH HIGHLIGHT ═══ */
.push-highlight {
  animation: push-flash 0.6s ease 3;
  box-shadow: 0 0 16px rgba(212,168,67,0.7), inset 0 0 8px rgba(212,168,67,0.2) !important;
}
@keyframes push-flash {
  0%, 100% { background-color: inherit; }
  50% { background-color: rgba(212,168,67,0.35); }
}

/* ═══ ROLLS SINCE LAST (Hard Ways) ═══ */
.vt-hw-since {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: clamp(6px, 0.42vw, 8px);
  font-weight: 700;
  color: rgba(255,200,100,0.7);
  background: rgba(0,0,0,0.5);
  border-radius: 3px;
  padding: 0 3px;
  line-height: 1.4;
  pointer-events: auto;
  cursor: default;
  min-width: 10px;
  text-align: center;
}
.vt-hw-since:empty { display: none; }

/* ═══ WIN CONDITIONS — RIGHT COLUMN ═══ */
.vt-right {
  width: clamp(44px, 3.75vw, 72px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.62) 50%, rgba(0,0,0,0.75) 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.vt-wc-header {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(7px, 0.5vw, 10px);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: clamp(4px, 0.36vw, 7px) clamp(2px, 0.21vw, 4px) clamp(3px, 0.26vw, 5px);
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  line-height: 1.3;
  white-space: nowrap;
}
.vt-wc-grid {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1px;
  padding: 2px;
}
.wc-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  min-height: clamp(16px, 1.15vw, 22px);
  position: relative;
  transition: all 0.25s ease;
}
.wc-val {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 0.94vw, 18px);
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 1;
}

/* ── Idle (no bets) ── */
.wc-idle {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
}
.wc-idle .wc-val { color: rgba(255,255,255,0.15); }

/* ── Winner: bright, glowing ── */
.wc-win {
  background: linear-gradient(135deg, rgba(50,200,80,0.35), rgba(30,160,60,0.25));
  border: 1px solid rgba(80,220,100,0.5);
  box-shadow: 0 0 8px rgba(60,200,80,0.2), inset 0 0 6px rgba(60,200,80,0.1);
}
.wc-win .wc-val {
  color: #6ef07a;
  text-shadow: 0 0 8px rgba(80,240,100,0.5);
}

/* ── Mixed (some bets win, some lose) ── */
.wc-mixed {
  background: linear-gradient(135deg, rgba(212,168,67,0.25), rgba(180,130,40,0.15));
  border: 1px solid rgba(212,168,67,0.45);
  box-shadow: 0 0 6px rgba(212,168,67,0.15);
}
.wc-mixed .wc-val {
  color: #e8c85a;
  text-shadow: 0 0 6px rgba(212,168,67,0.4);
}

/* ── Shaded: dimmed out, not a winner ── */
.wc-shaded {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.04);
}
.wc-shaded .wc-val {
  color: rgba(255,255,255,0.12);
}

/* ── Point indicator ── */
.wc-is-point {
  border-left: 3px solid #fff !important;
}
.wc-is-point .wc-val::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255,255,255,0.6);
}

/* ═══ DICE LAB — FLOATING WINDOW ═══ */
.dice-lab-float {
  position: fixed;
  top: 15%;
  right: 3%;
  width: clamp(270px, 18vw, 420px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(74,222,128,0.25);
  background: rgba(8,6,4,0.82);
  /* backdrop-filter removed for GPU perf */
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 1px rgba(74,222,128,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  z-index: 900;
  overflow: hidden;
  animation: diceLabFadeIn 0.2s ease-out;
  user-select: none;
  -webkit-user-select: none;
}
/* Glow pulse when Dice Lab opens — draws attention */
.dice-lab-float.dl-glow-in {
  animation: dlGlowIn 0.8s ease-out;
}
@keyframes dlGlowIn {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0), 0 8px 32px rgba(0,0,0,0.6); }
  30%  { box-shadow: 0 0 30px 8px rgba(74,222,128,0.4), 0 8px 32px rgba(0,0,0,0.6); border-color: rgba(74,222,128,0.7); }
  100% { box-shadow: 0 0 1px rgba(74,222,128,0.3), 0 8px 32px rgba(0,0,0,0.6); border-color: rgba(74,222,128,0.25); }
}
.dice-lab-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 5px 12px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(74,222,128,0.15);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.dice-lab-titlebar:active { cursor: grabbing; }
.dice-lab-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 0.9vw, 16px);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(74,222,128,0.7);
}
.dice-lab-close {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.dice-lab-close:hover {
  background: rgba(239,68,68,0.25);
  color: #f87171;
}
.dice-lab-body {
  flex: 1;
  padding: 6px;
  overflow-y: auto;
  cursor: grab;
}
.dice-lab-body:active { cursor: grabbing; }
@keyframes diceLabFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Dice Lab inner controls ── */
.dl-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dl-section-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(11px, 0.8vw, 14px);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  user-select: none;
}
/* ── Custom styled radio button (Dice Lab mode selector) ── */
.dl-radio {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.dl-radio:checked {
  background: rgba(74,222,128,0.12);
  border-color: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.3);
}
.dl-radio:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.dl-radio:hover {
  border-color: rgba(74,222,128,0.5);
}
.dl-dice-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dl-dice-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(10px, 0.7vw, 13px);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.dl-dice-grid {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
}
.dl-die-btn {
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  transition: all 0.15s;
}
.dl-die-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: scale(1.08);
}
.dl-die-btn.dl-selected {
  border-color: #4ade80;
  border-width: 3px;
  background: rgba(74,222,128,0.22);
  box-shadow: 0 0 12px rgba(74,222,128,0.4), inset 0 0 4px rgba(74,222,128,0.15);
  transform: scale(1.15);
}
.dl-die-btn.dl-selected:hover {
  transform: scale(1.18);
}
.dl-die-btn .dl-die-svg {
  display: block;
  pointer-events: none;
}
/* Random "?" button */
.dl-die-random {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
}
.dl-die-random.dl-selected {
  color: #4ade80;
}

/* ── Dice Lab footer (pinned to bottom) ── */
.dl-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── Status banner ── */
.dl-status {
  padding: 5px 10px;
  text-align: center;
  transition: all 0.2s;
}
.dl-status-idle {
  background: rgba(255,255,255,0.06);
}
.dl-status-idle .dl-status-text {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px, 0.65vw, 12px);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(212,168,67,0.8);
}
.dl-status-active {
  background: rgba(180,30,30,0.65);
}
.dl-status-active .dl-status-text {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px, 0.65vw, 12px);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fbbf24;
}
.dl-status-active .dl-status-text::before {
  content: '\26A0\FE0F ';
}
.dl-status-sim {
  font-size: clamp(7px, 0.5vw, 10px);
  font-weight: 400;
  letter-spacing: 0.3px;
  opacity: 0.7;
}

/* ── Dice Lab roll button ── */
.dl-roll-btn {
  width: 100%;
  padding: 8px 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(212,168,67,0.2) 0%, rgba(180,130,40,0.15) 100%);
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-size: clamp(11px, 0.75vw, 14px);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.dl-roll-btn:hover {
  background: linear-gradient(180deg, rgba(212,168,67,0.35) 0%, rgba(180,130,40,0.25) 100%);
}
.dl-roll-btn:active {
  transform: scale(0.97);
}


/* ── Controls wrapper ── */
.dl-controls {
  transition: opacity 0.15s;
}

/* ── Section highlight: green glow border on active section ── */
.dl-section-block {
  padding: 5px 6px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dl-section-block.dl-active {
  border-color: rgba(74,222,128,0.45);
  box-shadow: 0 0 10px rgba(74,222,128,0.15), inset 0 0 8px rgba(74,222,128,0.05);
  background: rgba(74,222,128,0.04);
}

.dl-luck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dl-luck-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px, 0.7vw, 12px);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.dl-luck-val {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 0.85vw, 15px);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.5);
  transition: color 0.15s;
}
.dl-luck-slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dl-luck-end {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}
.dl-luck-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #3b82f6 0%, rgba(255,255,255,0.15) 50%, #f97316 100%);
  outline: none;
  cursor: pointer;
  padding: 8px 0;
  box-sizing: content-box;
}
.dl-luck-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8e2d8;
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: pointer;
}
.dl-luck-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8e2d8;
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: pointer;
}
.dl-luck-desc, .dl-table-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(9px, 0.65vw, 12px);
  color: rgba(255,255,255,0.5);
  text-align: center;
  line-height: 1.3;
}

/* ── Table Condition preset buttons ── */
.dl-table-grid {
  display: flex;
  gap: 3px;
  justify-content: center;
}
.dl-table-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 2px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.15s;
}
.dl-table-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}
.dl-table-btn.dl-table-active {
  border-color: #4ade80;
  background: rgba(74,222,128,0.15);
  box-shadow: 0 0 8px rgba(74,222,128,0.2);
}
.dl-table-icon {
  font-size: 14px;
  line-height: 1;
}
.dl-table-lbl {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(8px, 0.55vw, 10px);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.dl-table-active .dl-table-lbl {
  color: #4ade80;
}

/* ── Natural RNG info section ── */
.dl-rng-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dl-rng-text {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(9px, 0.6vw, 12px);
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  text-align: left;
}
.dl-rng-text strong {
  color: rgba(255,255,255,0.8);
}
.dl-rng-highlight {
  color: rgba(74,222,128,0.7) !important;
  font-weight: 600;
  text-align: left;
  font-style: italic;
}


/* ── Dice Lab responsive: small screens (720p) ── */
@media (max-height: 780px) {
  .dice-lab-float { max-height: 78vh; top: 8%; }
  .dice-lab-body { padding: 4px; }
  .dl-section { gap: 4px; }
  .dl-section-block { padding: 4px 5px; }
  .dl-die-btn { width: 28px; height: 28px; }
  .dl-die-btn .dl-die-svg { width: 24px; height: 24px; }
  .dl-die-random { font-size: 13px; }
  .dl-section-header { font-size: clamp(8px, 0.65vw, 11px); }
  .dl-table-btn { padding: 3px 1px; }
  .dl-table-icon { font-size: 12px; }
  .dl-table-lbl { font-size: clamp(5px, 0.4vw, 8px); }
  .dl-rng-info { gap: 2px; }
  .dl-rng-text { font-size: clamp(7px, 0.45vw, 9px); }
  .dl-luck-slider-row { gap: 4px; }
  .dl-luck-end { font-size: 10px; }
  .dl-roll-btn { padding: 5px 0; font-size: clamp(9px, 0.6vw, 11px); }
  .dl-status { padding: 4px 8px; }
}

/* ── Dice Lab responsive: large screens (2K+) ── */
@media (min-width: 2000px) {
  .dice-lab-float { width: clamp(360px, 16vw, 500px); border-radius: 16px; }
  .dice-lab-body { padding: 10px; }
  .dl-section { gap: 8px; }
  .dl-section-block { padding: 8px 10px; border-radius: 10px; }
  .dl-die-btn { width: 40px; height: 40px; border-radius: 8px; }
  .dl-die-btn .dl-die-svg { width: 34px; height: 34px; }
  .dl-die-random { font-size: 20px; }
  .dl-section-header { font-size: 14px; gap: 10px; }
  .dl-radio { width: 22px; height: 22px; }
  .dl-radio:checked::after { width: 10px; height: 10px; }
  .dl-table-btn { padding: 8px 4px; border-radius: 8px; }
  .dl-table-icon { font-size: 18px; }
  .dl-table-lbl { font-size: 10px; }
  .dl-luck-slider { height: 12px; border-radius: 6px; }
  .dl-luck-slider::-webkit-slider-thumb { width: 28px; height: 28px; }
  .dl-luck-slider::-moz-range-thumb { width: 28px; height: 28px; }
  .dl-luck-val { font-size: 15px; }
  .dl-luck-desc, .dl-table-desc { font-size: 12px; }
  .dl-rng-text { font-size: 11px; }
  .dice-lab-title { font-size: 16px; }
  .dice-lab-close { width: 28px; height: 28px; font-size: 20px; }
  .dl-roll-btn { padding: 10px 0; font-size: 15px; }
  .dl-status .dl-status-text { font-size: 12px; }
  .dl-dice-label { font-size: 12px; }
}

/* ── Dice Lab responsive: 4K screens ── */
@media (min-width: 3200px) {
  .dice-lab-float { width: clamp(480px, 14vw, 640px); border-radius: 20px; }
  .dice-lab-body { padding: 14px; }
  .dl-section { gap: 10px; }
  .dl-section-block { padding: 10px 14px; border-radius: 14px; border-width: 2px; }
  .dl-die-btn { width: 50px; height: 50px; border-radius: 10px; border-width: 3px; }
  .dl-die-btn .dl-die-svg { width: 42px; height: 42px; }
  .dl-die-random { font-size: 24px; }
  .dl-section-header { font-size: 17px; gap: 12px; }
  .dl-radio { width: 26px; height: 26px; border-width: 2.5px; }
  .dl-radio:checked::after { width: 12px; height: 12px; }
  .dl-table-btn { padding: 10px 6px; border-radius: 10px; }
  .dl-table-icon { font-size: 22px; }
  .dl-table-lbl { font-size: 12px; }
  .dl-luck-slider { height: 16px; border-radius: 8px; padding: 10px 0; }
  .dl-luck-slider::-webkit-slider-thumb { width: 34px; height: 34px; }
  .dl-luck-slider::-moz-range-thumb { width: 34px; height: 34px; }
  .dl-luck-val { font-size: 18px; }
  .dl-luck-desc, .dl-table-desc { font-size: 14px; }
  .dl-rng-text { font-size: 13px; line-height: 1.5; }
  .dice-lab-title { font-size: 20px; }
  .dice-lab-titlebar { padding: 10px 14px 8px 18px; }
  .dice-lab-close { width: 34px; height: 34px; font-size: 24px; border-radius: 8px; }
  .dl-roll-btn { padding: 14px 0; font-size: 18px; }
  .dl-status { padding: 8px 14px; }
  .dl-status .dl-status-text { font-size: 15px; }
  .dl-dice-label { font-size: 14px; }
  .dl-dice-grid { gap: 5px; }
  .dl-table-grid { gap: 5px; }
}

/* ═══ BIG/SMALL BETS ═══ */
.vt-bigsmall-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 4px;
}
.vt-small-bet, .vt-big-bet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(3px, 0.31vw, 6px) clamp(2px, 0.21vw, 4px);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.12s ease;
}
.vt-small-bet {
  background: linear-gradient(135deg, rgba(30,60,100,0.6), rgba(20,40,70,0.6));
  border: 1.5px solid rgba(80,140,220,0.35);
}
.vt-small-bet:hover {
  background: linear-gradient(135deg, rgba(40,75,120,0.7), rgba(30,55,90,0.7));
  border-color: rgba(80,140,220,0.6);
  transform: scale(1.02);
}
.vt-big-bet {
  background: linear-gradient(135deg, rgba(100,50,20,0.6), rgba(70,35,15,0.6));
  border: 1.5px solid rgba(220,140,50,0.35);
}
.vt-big-bet:hover {
  background: linear-gradient(135deg, rgba(120,65,25,0.7), rgba(90,45,20,0.7));
  border-color: rgba(220,140,50,0.6);
  transform: scale(1.02);
}
.vt-bs-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px, 0.63vw, 12px);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.vt-small-bet .vt-bs-title { color: rgba(120,180,255,0.9); }
.vt-big-bet .vt-bs-title { color: rgba(255,180,80,0.9); }
.vt-bs-nums {
  font-size: clamp(7px, 0.47vw, 9px);
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ═══ ROLL DISTRIBUTION BAR CHART ═══ */
#distro-panel {
  margin-top: 4px;
}
#distro-chart {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 6px 4px 0;
  height: clamp(70px, 5.99vw, 115px);
}
#distro-empty {
  text-align: center;
  color: rgba(255,255,255,0.18);
  font-size: clamp(7px, 0.47vw, 9px);
  font-style: italic;
  padding: clamp(8px, 0.73vw, 14px) 0;
}
.db-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  cursor: default;
  position: relative;
}
.db-col:hover .db-bar-fill {
  filter: brightness(1.3);
}
.db-col:hover .db-label {
  color: rgba(255,255,255,0.85);
}
/* Hide the percentage text above bars entirely */
.db-bar {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1px;
  position: relative;
}
.db-expected-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(212,168,67,0.6);
  pointer-events: none;
  z-index: 2;
}
.db-bar-fill {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 1px;
  transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.db-grey {
  background: linear-gradient(180deg, rgba(160,160,170,0.6), rgba(100,100,110,0.4));
  box-shadow: 0 0 3px rgba(150,150,160,0.15);
}
.db-green {
  background: linear-gradient(180deg, #4ade60, #22a838);
  box-shadow: 0 0 8px rgba(60,200,80,0.35), 0 0 2px rgba(60,200,80,0.2);
}
.db-red {
  background: linear-gradient(180deg, #ef5555, #b82020);
  box-shadow: 0 0 8px rgba(220,50,50,0.3), 0 0 2px rgba(220,50,50,0.15);
}
.db-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(7px, 0.47vw, 9px);
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  line-height: 1;
  margin-top: 3px;
  padding-bottom: 2px;
}
/* Distro tooltip — handled via JS mouse-follow (vt-body-tip), no CSS tooltip needed */

/* ═══ WIN CASCADE ANIMATION ═══ */
.cascade-chip {
  position: fixed;
  width: clamp(34px, 2.5vw, 48px);
  height: clamp(34px, 2.5vw, 48px);
  border-radius: 50%;
  border: 3px solid;
  box-shadow: 0 4px 16px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.3);
  pointer-events: none;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-n);
  font-size: clamp(10px, 0.68vw, 13px);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.15);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
  overflow: hidden;
}
.cascade-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}
.cascade-chip span {
  position: relative;
  z-index: 1;
}

/* Win counter */
#win-cascade-counter {
  position: fixed;
  bottom: clamp(50px, 5vw, 90px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
  background: linear-gradient(135deg, rgba(10,35,8,0.96), rgba(8,24,6,0.96));
  border: 2px solid rgba(100,240,100,0.6);
  border-radius: 18px;
  padding: clamp(12px, 1.2vw, 22px) clamp(24px, 2.5vw, 48px);
  z-index: 2500;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 40px rgba(80,220,80,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#win-cascade-counter.visible {
  opacity: 1;
}
.wcc-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(16px, 1.4vw, 24px);
  font-weight: 700;
  letter-spacing: 4px;
  color: rgba(100,240,100,0.7);
  text-transform: uppercase;
}
.wcc-amount {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(32px, 3vw, 56px);
  font-weight: 700;
  color: #7fff7f;
  transition: all 0.1s ease;
}
/* Final flash when cascade finishes */
#win-cascade-counter.wcc-flash {
  animation: wcc-pulse 0.4s ease-in-out 3;
}
@keyframes wcc-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); border-color: rgba(100,240,100,0.6); }
  50% { transform: translateX(-50%) scale(1.12); border-color: rgba(140,255,140,0.9); box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 60px rgba(80,240,80,0.35); }
}

/* ═══ LOSS GLOW — red inward glow from table edges on any loss ═══ */
@keyframes loss-glow-pulse {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}
#loss-glow-overlay {
  position: absolute; inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 40px 12px rgba(220,30,30,0.45), inset 0 0 80px 20px rgba(180,20,20,0.2);
  pointer-events: none;
  z-index: 100;
  opacity: 0;
}
#loss-glow-overlay.active {
  animation: loss-glow-pulse 1.2s ease-out forwards;
}

/* ═══ E04 — BACKGROUND BREATH (game screen red-gold breathing, 12s) ═══ */
#game-screen::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(34,0,0,0.3) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
  animation: casinoBreath 12s ease-in-out infinite;
}
@keyframes casinoBreath {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.7; }
}

/* ═══ E05 — AMBIENT BREATH + WANDERING GLOW ═══ */
#craps-table {
  box-shadow: 0 0 4px 1px rgba(255,255,255,0.45), 0 0 12px 2px rgba(220,220,230,0.25), 0 0 24px 4px rgba(200,200,210,0.12), inset 0 0 20px rgba(0,0,0,0.1);
}
/* Breathing overlay — static inset shadow, GPU-composited opacity pulse */
#craps-table::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.35);
  will-change: opacity;
  animation: ambientBreath 14s ease-in-out infinite;
}
@keyframes ambientBreath {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
/* Wandering glow — soft light spot drifts smoothly across felt */
#felt-glow {
  position: absolute;
  /* Oversized so glow can move around without clipping */
  width: 60%; height: 80%;
  left: 20%; top: 10%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 65%);
  /* mix-blend-mode removed for GPU perf — negligible visual difference on dark felt */
  will-change: transform;
  animation: feltGlowWander 18s ease-in-out infinite;
}
@keyframes feltGlowWander {
  0%   { transform: translate(-30%, -20%); }
  20%  { transform: translate(25%, -15%); }
  40%  { transform: translate(30%, 25%); }
  60%  { transform: translate(-15%, 30%); }
  80%  { transform: translate(-25%, -5%); }
  100% { transform: translate(-30%, -20%); }
}

/* ═══ E06 — TABLE MICRO-SHAKE pre-result ═══ */
#craps-table.preshake {
  animation: tableShake 0.07s ease-in-out 6 !important;
}
@keyframes tableShake {
  0%, 100% { translate: 0 0; }
  33%      { translate: -1.2px 0.4px; }
  66%      { translate: 1px -0.6px; }
}

/* ═══ E01b — NEON WIN (intensified glow on table for 3.5s) ═══ */
#craps-table.neon-win {
  animation: neonWinPulse 1.1s ease-in-out 3 !important;
}
@keyframes neonWinPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255,215,0,0.4), inset 0 0 40px rgba(0,0,0,0.3); }
  50%      { box-shadow: 0 0 32px rgba(255,204,0,0.7), 0 0 55px rgba(255,153,0,0.3), inset 0 0 20px rgba(0,0,0,0.1); }
}

/* ═══ E07 — ECHO WAVE from number card ═══ */
.vt-num-card.echo { overflow: visible !important; }
.vt-num-card.echo::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,210,80,0.5);
  transform: translate(-50%,-50%) scale(0);
  pointer-events: none;
  z-index: 20;
  animation: echoWave 0.65s ease-out forwards;
}
@keyframes echoWave {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 0.75; }
  100% { transform: translate(-50%,-50%) scale(5); opacity: 0; }
}

/* ═══ E08 — STREAK AURA (cumulative golden overlay, no text) ═══ */
#craps-table.streak-1::before { content:''; position:absolute; inset:0; border-radius:10px; pointer-events:none; z-index:0; transition:background 1.8s ease; background:radial-gradient(ellipse at center, rgba(255,180,30,0.04) 0%, transparent 70%); }
#craps-table.streak-2::before { content:''; position:absolute; inset:0; border-radius:10px; pointer-events:none; z-index:0; transition:background 1.8s ease; background:radial-gradient(ellipse at center, rgba(255,180,30,0.09) 0%, transparent 70%); }
#craps-table.streak-3::before { content:''; position:absolute; inset:0; border-radius:10px; pointer-events:none; z-index:0; transition:background 1.8s ease; background:radial-gradient(ellipse at center, rgba(255,180,30,0.15) 0%, transparent 68%); }
#craps-table.streak-4::before { content:''; position:absolute; inset:0; border-radius:10px; pointer-events:none; z-index:0; transition:background 1.8s ease; background:radial-gradient(ellipse at center, rgba(255,180,30,0.23) 0%, transparent 65%); box-shadow: inset 0 0 40px rgba(255,160,10,0.1); }

/* (E09/E10 near-miss removed — not needed for multi-win game) */

/* ═══ E11 — WIN FLASH SUBLIMINAL overlay ═══ */
#win-flash {
  position: fixed; inset: 0;
  background: rgba(255,200,50,0);
  pointer-events: none; z-index: 2000;
  transition: background 0.07s;
}

/* ═══ E12 — ROLL BUTTON HALO (GPU: opacity only) ═══ */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}


/* ═══ ZOOM-OUT FLOATING ACTION BUTTON ═══ */
.zoom-out-fab {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(212,168,67,0.5);
  background: rgba(12,10,8,0.9);
  color: #e8c46a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 12px rgba(212,168,67,0.15);
  transition: all 0.2s ease;
  /* backdrop-filter removed for GPU perf */
}
.zoom-out-fab:hover {
  background: rgba(212,168,67,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 20px rgba(212,168,67,0.3);
}
.zoom-out-fab:active {
  transform: scale(0.88);
}
.zoom-out-fab svg { pointer-events: none; }

/* ═══ RANDOM SHINE (GPU: transform instead of left) ═══ */
@keyframes chip-shine-sweep { 0%{transform:translateX(-800%) skewX(-18deg);opacity:0;} 15%{opacity:1;} 100%{transform:translateX(800%) skewX(-18deg);opacity:0;} }
@keyframes text-shine-sweep { 0%{background-position:-200% center;} 100%{background-position:200% center;} }

/* ═══ SECTION-LEVEL SHINE — single sweep across an entire container ═══ */
.section-shine { position: relative; }
.section-shine::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 15%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.35) 48%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.35) 52%, transparent 70%);
  will-change: transform;
  z-index: 200;
  pointer-events: none;
  animation: chip-shine-sweep 0.9s ease-out forwards;
}
/* Containers that need clipping for the sweep to work */
#history-strip.section-shine, #game-controls.section-shine { overflow: hidden !important; }
#btn-roll.section-shine { overflow: visible !important; }
#btn-roll.section-shine::after { display: none !important; }
.vt-wrap.section-shine { overflow: visible !important; }
.vt-wrap.section-shine::after { clip-path: inset(0 0 0 0 round 8px); }
/* Balance text still uses text gradient shine */
.top-info-value.section-shine { overflow: visible !important; }
.top-info-value.section-shine::after { display: none; }
.top-info-value.section-shine {
  background:linear-gradient(90deg,var(--gold) 0%,var(--gold) 35%,#fff 48%,#fffbe6 50%,#fff 52%,var(--gold) 65%,var(--gold) 100%);
  background-size:200% 100%;
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
  animation:text-shine-sweep .8s ease-out forwards;
}
/* Keep old individual shine classes for chipShine() on win — GPU: transform sweep */
.bet-chip.shine-active{overflow:hidden !important;}
.bet-chip.shine-active::after{content:'';position:absolute;top:-30%;left:0;width:50%;height:160%;background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,0.55) 48%,rgba(255,255,255,0.7) 50%,rgba(255,255,255,0.55) 52%,transparent 70%);will-change:transform;z-index:50;pointer-events:none;animation:chip-shine-sweep .6s ease-out forwards;}

/* ═══ REDO LAST BET BUTTON ═══ */
/* ═══ REPEAT BET + DOUBLE BET BUTTONS ═══ */
#btn-repeat, #btn-double {width:var(--qb-btn-w) !important;height:var(--icon-btn-size);padding:0 !important;border-radius:8px;border:1.5px solid rgba(212,168,67,0.3);background:rgba(212,168,67,0.07);color:var(--gold);font-family:var(--font-n);font-size:clamp(6px, 0.42vw, 8px);font-weight:700;letter-spacing:.5px;line-height:1.15;text-align:center;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;transition:all .2s;}
#btn-repeat:not(:disabled):hover, #btn-double:not(:disabled):hover {background:rgba(212,168,67,0.2);transform:scale(1.1);}
#btn-repeat:not(:disabled):active, #btn-double:not(:disabled):active {transform:scale(0.9);}
#btn-repeat:disabled, #btn-double:disabled {opacity:0.22;cursor:not-allowed;}
#btn-double:not(:disabled){border-color:rgba(100,220,100,0.5);background:rgba(50,180,70,0.12);color:#8f8;}
/* Table Limits */
/* Custom input wraps — smooth collapse to prevent layout jump */
.custom-input-wrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
  margin-top: 0;
}
.custom-input-wrap.open {
  max-height: 60px;
  opacity: 1;
  margin-top: 6px;
}
#custom-maxbet-wrap input,#custom-simbets-wrap input{width:100%;padding:8px 12px;border-radius:8px;border:1px solid rgba(212,168,67,0.2);background:rgba(255,255,255,0.04);color:#e8e8f0;font-size:14px;outline:none;margin-top:4px}
#custom-maxbet-wrap input:focus,#custom-simbets-wrap input:focus{border-color:#d4a843;box-shadow:0 0 0 2px rgba(212,168,67,0.15)}
#simbets-desc{margin-top:6px}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   (Moved from JS inline cssText in showToast / showFractionWarningToast)
═══════════════════════════════════════════════════════════ */

/* Toast — center-screen fog bloom (ported from Sic Bo Macau) */
.game-toast {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}
.game-toast.visible { opacity: 1; }
.game-toast.toast-exit { pointer-events: none; }

.toast-fog {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 900px; height: 350px;
  border-radius: 50%;
  background: #000;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0;
}
.game-toast.visible .toast-fog {
  animation: fogBloomIn 0.5s ease-out forwards;
}
.game-toast.toast-exit .toast-fog {
  animation: fogBloomOut 0.35s ease-in forwards;
}

.toast-text {
  position: relative;
  font-family: var(--font-d, 'Playfair Display', serif);
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 900;
  color: var(--gold, #d4a843);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000, 0 0 20px rgba(212,168,67,0.5), 0 0 40px rgba(212,168,67,0.2);
  text-align: center;
  white-space: pre-line;
  transform: scale(0);
  opacity: 0;
}
.game-toast.visible .toast-text {
  animation: toastTextIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}
.game-toast.toast-exit .toast-text {
  animation: toastTextOut 0.3s ease-in forwards;
}

@keyframes fogBloomIn {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes fogBloomOut {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
}
@keyframes toastTextIn {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes toastTextOut {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.5); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE LANDSCAPE — right-side controls column
   Triggers on phones in landscape (viewport height ≤ 520px)
═══════════════════════════════════════════════════════════ */
@media (max-height: 520px) and (orientation: landscape) {

  /* ── 1. HIDE TOOLTIPS — no hover on touch devices ── */
  #vt-body-tip,
  #vt-chip-tip {
    display: none;
  }

  /* ── 2. HIDE ODDS/PAY TEXT — reclaim vertical space ── */
  .vt-hw-pay,
  .vt-hp,
  .vt-num-pay,
  .vt-side-pay,
  .vt-fa-sub,
  .vt-cew-sub,
  .vt-horn-ctr-sub,
  .vt-hop-pay {
    display: none;
  }

  /* ── 3. INFO CARD: hide variant/phase, 2×2 grid status ── */
  .vt-info-variant-row,
  .vt-info-sep,
  #vt-info-phase {
    display: none;
  }
  .vt-info-card {
    padding: clamp(3px, 0.6vh, 6px) clamp(4px, 0.4vw, 8px);
    gap: 2px;
    min-height: 0;
    overflow: visible;
  }
  /* 2×2 grid: BALANCE | ON TABLE  //  dice+total | PT */
  .vt-info-status-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2px, 0.4vw, 4px) clamp(4px, 0.6vw, 8px);
    overflow: visible;
  }
  .vt-info-stat {
    align-items: flex-start;
    min-width: 0;
  }
  .vt-info-val {
    font-size: clamp(11px, 0.83vw, 16px);
  }
  .vt-info-lbl {
    font-size: clamp(5px, 0.36vw, 7px);
  }
  /* Dice area — left-aligned in its grid cell */
  .vt-info-dice-area {
    flex-shrink: 0;
    justify-content: flex-start;
  }
  .vt-info-total {
    font-size: clamp(10px, 0.78vw, 15px);
  }
  .die-xs {
    width: clamp(14px, 1.15vw, 20px);
    height: clamp(14px, 1.15vw, 20px);
  }
  .die-xs .die-face {
    width: clamp(14px, 1.15vw, 20px);
    height: clamp(14px, 1.15vw, 20px);
  }
  /* Point — left-aligned, vertically centered in its cell */
  .vt-info-point {
    font-size: clamp(7px, 0.52vw, 10px);
    align-self: center;
    justify-self: start;
  }
  .vt-info-point strong {
    font-size: clamp(9px, 0.62vw, 13px);
  }

  /* ── 4. COME STRIP: 2×2 grid — C/CO top, D/DO bottom ── */
  .vt-ci-dc,
  .vt-ci-co,
  .vt-ci-do {
    display: flex !important;
  }
  .vt-ci-c {
    font-size: 0;        /* hide the original "C" text */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .vt-ci-c::after {
    content: "C";
    font-size: clamp(8px, 1.8vw, 12px);
    font-family: var(--font-n);
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
  }
  .vt-come-strip {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1px !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 1px !important;
  }
  .vt-ci {
    font-size: clamp(8px, 1.8vw, 12px) !important;
    padding: 2px 1px !important;
    min-height: 0 !important;
  }
  /* Grid order: C top-left, CO top-right, D bottom-left, DO bottom-right */
  .vt-ci-c  { order: 1; }
  .vt-ci-co { order: 2; }
  .vt-ci-dc { order: 3; }
  .vt-ci-do { order: 4; }

  /* ── Minimal puck slot — puck overflows above the card ── */
  .vt-puck-slot {
    height: 2px !important;
    min-height: 2px !important;
    max-height: 2px !important;
    background: transparent !important;
    border-bottom: none !important;
    overflow: visible !important;
  }
  .vt-num-card {
    overflow: visible !important;
  }
  /* Puck itself sits above the card boundary */
  .puck {
    margin-top: calc(-1 * var(--puck-size, 20px) + 2px);
    z-index: 60;
  }

  /* ── 5. UNDO: icon → text, move to bet group area ── */
  #btn-undo {
    order: 7;
    font-family: var(--font-n);
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--gold);
    border-color: rgba(212,168,67,0.3);
    background: rgba(212,168,67,0.07);
  }
  #btn-undo svg {
    display: none;
  }
  #btn-undo::after {
    content: "UNDO";
  }

  /* ── 6. THREE-COLUMN LAYOUT: table | chips | controls ── */
  #right-column {
    flex-direction: row;
    overflow: hidden;
  }

  /* #bottom-bar splits into TWO visual columns via inner flex */
  #bottom-bar {
    height: auto;
    width: auto;
    max-width: none;
    flex-direction: row;
    border-top: none;
    border-left: 1px solid rgba(212,168,67,0.15);
    box-shadow: -4px 0 30px rgba(0,0,0,0.4);
    overflow: visible;
    flex-shrink: 0;
    /* Semi-transparent background */
    background: linear-gradient(
      180deg,
      rgba(15,12,8,0.55),
      rgba(8,6,4,0.55)
    );
    /* backdrop-filter removed for GPU perf */
  }
  /* Hide desktop scroll-fade indicators on mobile vertical bar */
  #bottom-bar::before,
  #bottom-bar::after {
    display: none;
  }

  #bottom-inner {
    flex-direction: row;
    gap: 0;
    padding: 0;
    height: 100%;
    width: auto;
    justify-content: flex-start;
    align-items: stretch;
    overflow: visible;
  }

  /* ── Hide .bar-sep separators ── */
  .bar-sep { display: none; }

  /* ── 7. CHIP COLUMN: vertical strip between table and controls ── */
  #chip-rack {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 3px;
    --chip-rack-size: clamp(26px, 6vh, 36px);
    padding: 3px 2px;
    border-bottom: none;
    border-right: 1px solid rgba(212,168,67,0.1);
    margin-bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    flex-shrink: 0;
  }
  /* Spacer before first chip and after last chip — same height as a chip
     so chips don't get cut off at scroll edges */
  #chip-rack::before,
  #chip-rack::after {
    content: '';
    display: block;
    width: var(--chip-rack-size);
    min-height: var(--chip-rack-size);
    flex-shrink: 0;
    pointer-events: none;
  }
  #chip-rack .chip-btn {
    width: var(--chip-rack-size);
    height: var(--chip-rack-size);
    flex-shrink: 0;
  }
  #chip-rack .chip-inner {
    width: 100%;
    height: 100%;
  }
  #chip-rack .chip-label {
    font-size: clamp(6px, 1.3vw, 9px);
  }

  /* ── CONTROLS COLUMN: 6-col CSS Grid with icons pinned to bottom ──
     Betting buttons fill the top, roll button in middle, 
     icons pushed to bottom via a spacer trick.
  */
  #game-controls {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: clamp(100px, 17vw, 150px);
    padding: clamp(2px, 0.6vh, 4px) clamp(4px, 0.8vw, 8px);
    padding-left: clamp(2px, 0.4vw, 4px);
    padding-bottom: 0;
    overflow-y: auto;
    overflow-x: visible;
    height: 100%;
    gap: clamp(2px, 0.5vh, 3px);
    align-content: center;
  }

  /* ══════════════════════════════════════════════════════
     SECTION 1 — BETTING BUTTONS (top zone)
     ON/OFF (full width) then pairs: PRESS/ACROSS, INSIDE/OUTSIDE,
     DOWN/UNDO, REPEAT/DOUBLE
  ══════════════════════════════════════════════════════ */

  .quick-bet-group {
    display: contents;
    order: unset;
    grid-column: unset;
  }

  /* ON/OFF: full-width header button across all 6 cols */
  #btn-onoff   { order: 1; grid-column: 1 / -1; margin-bottom: clamp(2px, 0.6vh, 5px); }

  /* Paired betting buttons: each spans 3 cols = half width */
  #btn-press   { order: 2; grid-column: span 3; }
  #btn-across  { order: 3; grid-column: span 3; }
  #btn-inside  { order: 4; grid-column: span 3; }
  #btn-outside { order: 5; grid-column: span 3; }
  #btn-down    { order: 6; grid-column: span 3; }
  #btn-undo    { order: 7; grid-column: span 3; }
  #btn-repeat  { order: 8; grid-column: span 3; }
  #btn-double  { order: 9; grid-column: span 3; }

  /* Shared style for ALL betting-action buttons */
  .quick-bet-group .qb-unified,
  #btn-down,
  #btn-undo,
  #btn-repeat,
  #btn-double {
    width: 100% !important;           /* must override base .qb-unified & #btn-repeat,#btn-double */
    height: clamp(28px, 7vh, 40px);
    min-height: clamp(26px, 5.5vh, 34px);
    font-size: clamp(7px, 1.6vw, 10px);
    font-family: var(--font-n);
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 0 clamp(2px, 0.4vw, 4px) !important;  /* same: base uses forced priority */
    border-radius: clamp(4px, 0.8vw, 7px);
    border: 1px solid rgba(180,180,180,0.2);
    background: rgba(255,255,255,0.04);
    color: #ccc;
    flex: unset;
    line-height: 1.1;
  }

  /* Active press feedback */
  .quick-bet-group .qb-unified:not(:disabled):active,
  #btn-down:not(:disabled):active,
  #btn-undo:not(:disabled):active,
  #btn-repeat:not(:disabled):active,
  #btn-double:not(:disabled):active {
    background: rgba(212,168,67,0.18);
    color: var(--gold);
  }

  /* ON/OFF toggle color states from JS */
  #btn-onoff.green       { color: #8f8 !important; border-color: rgba(100,200,100,0.35) !important; background: rgba(50,160,70,0.12) !important; }
  #btn-onoff.red-toggle  { color: #f88 !important; border-color: rgba(255,100,100,0.35) !important; background: rgba(200,50,50,0.12) !important; }

  /* DOUBLE enabled: subtle green */
  #btn-double:not(:disabled) {
    border-color: rgba(100,220,100,0.35);
    color: #8f8;
    background: rgba(50,180,70,0.08);
  }

  /* ══════════════════════════════════════════════════════
     SECTION 2 — UTILITY ICONS (before roll button)
     Stats · Fullscreen · Settings · Exit — paired 2-per-row
  ══════════════════════════════════════════════════════ */
  #btn-dice-lab     { display: none !important; }
  #btn-stats-drawer { order: 10; grid-column: span 3; }
  #btn-fullscreen   { order: 11; grid-column: span 3; display: flex; }
  #btn-sound        { order: 12; grid-column: span 3; }
  #btn-reset        { order: 13; grid-column: span 3; }

  /* Match betting-button sizing for consistency */
  #btn-stats-drawer,
  #btn-fullscreen,
  #btn-sound,
  #btn-reset {
    width: 100% !important;
    height: clamp(34px, 8.5vh, 48px);
    min-height: clamp(30px, 7vh, 42px);
    border-radius: clamp(4px, 0.8vw, 7px);
    margin: 0;
    padding: 0;
    justify-self: center;
    overflow: visible;
    /* No sticky — flows naturally before roll button */
    position: relative;
    background: transparent;
  }

  /* Subtle top-border separator above the first icon row */
  #btn-stats-drawer,
  #btn-fullscreen {
    border-top: 1px solid rgba(212,168,67,0.12);
    padding-top: clamp(4px, 1vh, 8px);
    margin-top: clamp(8px, 2vh, 14px);
  }

  /* Icon SVG sizes — scale with viewport */
  #btn-stats-drawer svg,
  #btn-fullscreen svg,
  #btn-sound svg,
  #btn-reset svg {
    width: clamp(16px, 3.5vw, 22px);
    height: clamp(16px, 3.5vw, 22px);
  }

  /* ══════════════════════════════════════════════════════
     SECTION 3 — ROLL BUTTON (square, full width)
  ══════════════════════════════════════════════════════ */
  #btn-roll {
    order: 20;
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: clamp(72px, 22vh, 120px);
    min-height: clamp(56px, 14vh, 72px);
    margin: 0;
    margin-top: clamp(4px, 1vh, 8px);
    padding: clamp(4px, 1vh, 8px);
    border-radius: clamp(8px, 1.5vw, 14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1px, 0.3vh, 3px);
    position: relative;
    align-self: center;
  }

  /* Hide dice icon */
  #btn-roll .btn-roll-icon {
    display: none;
  }

  #btn-roll .btn-roll-main {
    font-size: clamp(10px, 2.2vw, 15px);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    word-spacing: 100vw;
    letter-spacing: 0.06em;
  }

  /* ── UNDO: text label, not SVG icon ── */
  #btn-undo {
    color: var(--gold);
    border-color: rgba(212,168,67,0.3);
    background: rgba(212,168,67,0.07);
  }
  #btn-undo svg { display: none; }
  #btn-undo::after { content: "UNDO"; }

  /* ── 9. LARGER TABLE TEXT: FIELD, PASS, COME, LHF ── */
  .vt-field-lbl {
    font-size: clamp(16px, 3.5vw, 24px);
    letter-spacing: 4px;
  }
  .vt-pass {
    font-size: clamp(18px, 4vw, 28px);
  }
  .vt-come {
    font-size: clamp(18px, 4vw, 28px);
  }
  .vt-lhf-title {
    font-size: clamp(9px, 2vw, 13px);
  }
  .vt-lhf-nums {
    font-size: clamp(12px, 2.5vw, 18px);
  }
  /* Number card big numbers also benefit from bump */
  .vt-num-big {
    font-size: clamp(30px, 6vw, 48px);
  }
  /* FIELD inner numbers */
  .vt-fa-gold,
  .vt-fa-red {
    font-size: clamp(18px, 3.5vw, 28px);
  }
  .vt-fa-num {
    font-size: clamp(12px, 2.5vw, 18px);
  }

  /* ── Tighten table padding for more room ── */
  #table-container {
    padding: 2px;
  }

  /* ── Adjust token sizes for mobile ── */
  :root {
    --bet-chip-size: clamp(20px, 5vw, 30px);
    --puck-size: clamp(20px, 5vw, 30px);
  }

  /* ── Win cascade counter ── */
  #win-cascade-counter {
    bottom: 8px;
    left: 50%;
    padding: 10px 20px;
  }
  .wcc-amount {
    font-size: clamp(26px, 5vw, 40px);
  }
  .wcc-label {
    font-size: clamp(12px, 2.5vw, 18px);
  }

  /* ── Save wrap: hide text label ── */
  #save-wrap span:not(.icon-btn) {
    display: none;
  }

  /* ── GLOBAL SCROLLBAR HIDING: hide scrollbar controls but keep scroll ── */
  * {
    -ms-overflow-style: none;   /* IE / Edge */
    scrollbar-width: none;      /* Firefox */
  }
  *::-webkit-scrollbar {
    display: none;              /* Chrome / Safari */
  }

  /* ── SIX and NINE: reduce to avoid touching borders ── */
  .vt-num-skew {
    font-size: clamp(22px, 4.5vw, 38px);
  }
  /* All num-big: tighten line height for mobile */
  .vt-num-big {
    line-height: 0.9;
    padding: 0 1px;
  }
}

/* ── Stats popup: 4-col cards on narrow viewports ── */
@media (max-width: 700px) {
  .sp-stat-cards {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  #stats-popup-history {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ── Stats popup & Settings: full-height fit on mobile landscape ── */
@media (max-height: 520px) and (orientation: landscape) {
  /* Stats popup: full-height flex with scrollable body */
  #stats-popup-panel {
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .sp-scroll-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
  .sp-scroll-body::-webkit-scrollbar { display: none !important; }
  #stats-popup-panel::-webkit-scrollbar { display: none !important; }
  .sp-header {
    padding: clamp(6px, 1.5vh, 12px) clamp(10px, 2vw, 20px) 0 !important;
    margin-bottom: clamp(4px, 1vh, 10px) !important;
  }
  .sp-header-title { font-size: clamp(11px, 2.5vw, 16px) !important; }
  .sp-close {
    width: clamp(24px, 5vh, 32px) !important;
    height: clamp(24px, 5vh, 32px) !important;
  }
  .sp-stat-cards {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: clamp(4px, 1vh, 8px) !important;
    padding: 0 clamp(8px, 2vw, 16px) !important;
    margin-bottom: clamp(4px, 1vh, 10px) !important;
  }
  .sp-card {
    padding: clamp(6px, 1.5vh, 12px) clamp(4px, 1vw, 8px) clamp(4px, 1vh, 8px) !important;
    border-radius: 10px !important;
  }
  .sp-card-val { font-size: clamp(14px, 4vh, 28px) !important; }
  .sp-card-label {
    font-size: clamp(7px, 1.5vw, 10px) !important;
    margin-top: clamp(2px, 0.5vh, 6px) !important;
  }
  .sp-section-title {
    font-size: clamp(9px, 2vw, 12px) !important;
    margin: 2px clamp(8px, 2vw, 16px) clamp(3px, 0.8vh, 8px) !important;
  }
  #stats-popup-history {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: clamp(4px, 1vh, 8px) !important;
    padding: 0 clamp(8px, 2vw, 16px) !important;
    margin-bottom: clamp(4px, 1vh, 10px) !important;
  }
  .popup-hist-row {
    padding: clamp(4px, 1vh, 8px) clamp(6px, 1.5vw, 10px) !important;
    border-radius: 8px !important;
  }
  .popup-hist-sum { font-size: clamp(14px, 3.5vh, 20px) !important; }
  #sp-distro-chart {
    height: clamp(80px, 40vh, 200px) !important;
    margin: 0 clamp(8px, 2vw, 16px) clamp(3px, 0.8vh, 8px) !important;
  }
  .sp-footer {
    padding: clamp(4px, 1vh, 10px) clamp(8px, 2vw, 16px) clamp(6px, 1.5vh, 14px) !important;
  }
  .sp-done-btn {
    padding: clamp(6px, 1.5vh, 12px) 0 !important;
    font-size: clamp(10px, 2.5vw, 14px) !important;
  }

  /* Settings panel: full-height fit */
  #settings-panel {
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
  .sp-header {
    padding: clamp(6px, 1.2vh, 12px) clamp(10px, 2.5vw, 20px) 0 !important;
  }
  .sp-scroll-body {
    padding: 0 clamp(10px, 2.5vw, 20px) !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
  .sp-scroll-body::-webkit-scrollbar { display: none !important; }
  #settings-panel > .sp-footer {
    padding: clamp(4px, 1vh, 8px) clamp(10px, 2.5vw, 20px) clamp(6px, 1.5vh, 12px) !important;
  }
  .sp-title {
    font-size: clamp(12px, 3vw, 16px) !important;
    margin-bottom: clamp(6px, 1.5vh, 12px) !important;
  }
  .sp-close-btn {
    font-size: clamp(14px, 3.5vw, 18px) !important;
    top: clamp(6px, 1.5vh, 12px) !important;
    right: clamp(8px, 2vw, 16px) !important;
  }
  .sp-section-hdr {
    font-size: clamp(8px, 2vw, 11px) !important;
    margin-bottom: clamp(4px, 1vh, 8px) !important;
    margin-top: clamp(2px, 0.5vh, 4px) !important;
    padding-bottom: clamp(3px, 0.8vh, 6px) !important;
  }
  .sp-section-body { margin-bottom: clamp(6px, 1.5vh, 12px) !important; }
  .sp-slider-row {
    gap: clamp(4px, 1vw, 8px) !important;
    margin-bottom: clamp(6px, 1.5vh, 10px) !important;
  }
  .sp-slider::-webkit-slider-thumb {
    width: 16px !important;
    height: 16px !important;
  }
  .sp-dice-grid {
    gap: clamp(4px, 1vw, 8px) !important;
  }
  .sp-dice-btn {
    gap: clamp(3px, 0.8vh, 6px) !important;
    padding: clamp(4px, 1vh, 8px) clamp(2px, 0.5vw, 4px) clamp(3px, 0.8vh, 6px) !important;
  }
  .sp-done-btn {
    padding: clamp(6px, 1.5vh, 10px) 0 !important;
    font-size: clamp(10px, 2.5vw, 13px) !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   DICE SHOOTER OVERLAY
═══════════════════════════════════════════════════════════ */

#dice-shooter-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.ds-container {
  position: absolute;
  width: 82px;
  height: 82px;
  perspective: 720px;
  transform: translate(-200px, -200px);
  z-index: 1001;
  will-change: transform;
}

.ds-container .dice {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.ds-container .face {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 10px;
  backface-visibility: visible;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  padding: 11px;
}

.ds-container .dot-slot {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* White die */
.ds-container .dice-white .face {
  background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
.ds-container .dice-white .dot {
  width: 14px; height: 14px;
  background: radial-gradient(circle at 40% 35%, #333, #111);
  border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.4);
}

/* Red die */
.ds-container .dice-red .face {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
}
.ds-container .dice-red .dot {
  width: 14px; height: 14px;
  background: radial-gradient(circle at 40% 35%, #fff, #e0e0e0);
  border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.15);
}

/* Green die */
.ds-container .dice-green .face {
  background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
}
.ds-container .dice-green .dot {
  width: 14px; height: 14px;
  background: radial-gradient(circle at 40% 35%, #fff, #c8e6c9);
  border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.15);
}

/* Face positions (82px cube: translateZ = 41px) */
.ds-container .front  { transform: rotateY(0deg)    translateZ(41px); }
.ds-container .back   { transform: rotateY(180deg)  translateZ(41px); }
.ds-container .right  { transform: rotateY(90deg)   translateZ(41px); }
.ds-container .left   { transform: rotateY(-90deg)  translateZ(41px); }
.ds-container .top    { transform: rotateX(90deg)   translateZ(41px); }
.ds-container .bottom { transform: rotateX(-90deg)  translateZ(41px); }

/* Drop shadow under each die */
.ds-container::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 94px; height: 94px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  box-shadow: 0 0 16px 6px rgba(0,0,0,0.4), 0 10px 26px 8px rgba(0,0,0,0.28);
  pointer-events: none;
  z-index: -1;
}

/* Dice Shooter toggle button — active state */
#btn-dice-shooter.ds-active {
  background: rgba(212,168,67,0.22) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 8px rgba(212,168,67,0.4);
}

/* Dissolve-expand exit animation for shooter dice */
@keyframes ds-dissolve {
  0%   { opacity: 1; transform: translate(var(--ds-fx), var(--ds-fy)) rotate(var(--ds-fr)) scale(1); }
  60%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(var(--ds-fx), var(--ds-fy)) rotate(var(--ds-fr)) scale(2.2); }
}
.ds-container.ds-dissolving {
  animation: ds-dissolve 0.65s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE PERFORMANCE — disable heavy continuous animations
   on touch devices to preserve battery and GPU budget.
   
   Kills: particles (via JS), ambientBreath, feltGlowWander,
   casinoBreath, backdrop-filter blur, table-edge-shimmer.
   
   Keeps: event-triggered effects (neonWinPulse, echoWave,
   tableShake, chipShine, streak auras).
═══════════════════════════════════════════════════════════ */

/* Target touch devices via the .touch-device class (set by touch.js) */

/* 1. ambientBreath — continuous box-shadow animation on #craps-table */
.touch-device #craps-table {
  animation: none !important;
  box-shadow: 0 0 4px 1px rgba(255,255,255,0.45),
              0 0 12px 2px rgba(220,220,230,0.25),
              inset 0 0 40px rgba(0,0,0,0.3) !important;
}
/* Re-enable short event-triggered animations (neonWin, shake) by restoring
   animation only when those specific classes are applied */
.touch-device #craps-table.neon-win {
  animation: neonWinPulse 1.1s ease-in-out 3 !important;
}
.touch-device #craps-table.preshake {
  animation: tableShake 0.07s ease-in-out 6 !important;
}

/* 2. feltGlowWander — continuous transform animation on blended overlay */
.touch-device #felt-glow {
  display: none !important;
}

/* 3. casinoBreath — continuous filter animation (hue-rotate is very expensive) */
.touch-device #game-screen::before {
  animation: none !important;
  opacity: 0.5 !important;
  filter: none !important;
}

/* 4. backdrop-filter blur — expensive compositing on always-visible elements */
.touch-device #bottom-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: linear-gradient(180deg, rgba(15,12,8,0.97), rgba(8,6,4,0.97)) !important;
}

/* 5. table-edge-shimmer — GPU-composited transform animation */
.touch-device #table-shimmer {
  animation: none !important;
  opacity: 0 !important;
}
.touch-device #table-shimmer::before {
  animation: none !important;
}
/* 5b. ambient breath overlay — disable on mobile */
.touch-device #craps-table::before {
  animation: none !important;
  opacity: 0 !important;
}

/* 6. Particles — hidden via CSS as safety net (JS also skips init) */
.touch-device #particles {
  animation: none !important;
}
.touch-device #particles::before {
  animation: none !important;
  display: none !important;
}

/* 7. Random shine — completely disabled on mobile */
.touch-device .section-shine::after,
.touch-device .bet-chip.shine-active::after,
.touch-device .chip-btn.section-shine::after {
  display: none !important;
  animation: none !important;
}
.touch-device .section-shine,
.touch-device .bet-chip.shine-active {
  overflow: hidden !important;
}

/* 8. Win glow — replaces particles on mobile.
   GPU-friendly: static box-shadow on overlay, animate opacity only.
   Uses #win-glow-overlay (injected by touch.js or game.js). */
@keyframes winGlowFade {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; }
}
.touch-device #craps-table .win-glow-overlay {
  position: absolute; inset: 0;
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: opacity;
}
.touch-device #craps-table.win-glow .win-glow-overlay {
  animation: winGlowFade 1.5s ease-in-out forwards;
}
/* Streak levels — static box-shadow of increasing intensity */
.touch-device #craps-table.win-glow-1 .win-glow-overlay {
  box-shadow: inset 0 0 40px rgba(255,200,50,0.18);
}
.touch-device #craps-table.win-glow-2 .win-glow-overlay {
  box-shadow: inset 0 0 65px rgba(255,190,40,0.28);
}
.touch-device #craps-table.win-glow-3 .win-glow-overlay {
  box-shadow: inset 0 0 85px rgba(255,180,30,0.38);
}
.touch-device #craps-table.win-glow-4 .win-glow-overlay {
  box-shadow: inset 0 0 110px rgba(255,170,20,0.5);
}

/* 9. Zoom-out FAB — disable backdrop-filter on touch */
.touch-device .zoom-out-fab {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(12,10,8,0.95) !important;
}

/* ── Dice Lab: Mobile FAB button ── */
/* ── Dice Lab: Mobile tab (half-circle on left edge) ── */
.dice-lab-fab {
  display: none; /* shown via JS inline display:flex */
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 22px;
  height: 48px;
  border-radius: 0 12px 12px 0;
  border: 1.5px solid rgba(212,168,67,0.5);
  border-left: none;
  background: linear-gradient(135deg, #d4a843, #b89030);
  color: #0a0a0f;
  cursor: pointer;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding-left: 2px;
  transition: all 0.15s;
  box-shadow: 2px 0 10px rgba(0,0,0,0.4);
}
.dice-lab-fab svg {
  display: none;
}
.dice-lab-fab::after {
  content: '';
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid #0a0a0f;
  margin-left: 1px;
}
.dice-lab-fab:active {
  width: 26px;
}

/* ── Dice Lab: Mobile backdrop ── */
.dice-lab-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 899;
}

/* ── Dice Lab: Mobile drawer transformation ── */
.touch-device .dice-lab-float {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  width: 280px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 12px 12px 0 !important;
  animation: dlDrawerSlideIn 0.25s ease-out !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(8,6,4,0.97) !important;
}
.touch-device .dice-lab-body {
  cursor: default !important;
  -webkit-overflow-scrolling: touch;
}
.touch-device .dice-lab-titlebar {
  cursor: default !important;
}
@keyframes dlDrawerSlideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* 10. Win cascade counter — disable backdrop-filter on touch */
.touch-device #win-cascade-counter {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WIN TIER OVERLAY SYSTEM — Animations 2 (Intermediate) & 3 (Extraordinary)
   Responsive: mobile → tablet → desktop → 2K → 4K
═══════════════════════════════════════════════════════════════════════════ */

/* ── Base overlay (shared by tier 2 & 3) ── */
.win-tier-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: opacity;
}
.win-tier-overlay.wt-active {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}
.win-tier-overlay.wt-exit {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
}

/* ── Radial burst background ── */
.wt-radial-burst {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.wt-active .wt-radial-burst {
  opacity: 1;
}
.tier2-burst {
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 210, 80, 0.22) 0%,
    rgba(220, 170, 50, 0.12) 30%,
    rgba(0, 0, 0, 0.72) 70%,
    rgba(0, 0, 0, 0.85) 100%);
}
.tier3-burst {
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 230, 80, 0.30) 0%,
    rgba(255, 200, 40, 0.18) 25%,
    rgba(0, 0, 0, 0.75) 65%,
    rgba(0, 0, 0, 0.90) 100%);
}

/* ── Shimmer sweep across the screen ── */
.wt-shimmer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.wt-active .wt-shimmer {
  opacity: 1;
}
.wt-shimmer::after {
  content: '';
  position: absolute;
  top: -50%; left: -150%;
  width: 80%;
  height: 200%;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255, 230, 120, 0.08) 44%,
    rgba(255, 230, 120, 0.16) 50%,
    rgba(255, 230, 120, 0.08) 56%,
    transparent 70%);
  transform: skewX(-20deg);
}
.wt-active .tier2-shimmer::after {
  animation: wtShimmerSweep 1.4s ease-in-out 0.2s 1 forwards;
}
.wt-active .tier3-shimmer::after {
  animation: wtShimmerSweep 1.0s ease-in-out 0.15s 1 forwards;
}
@keyframes wtShimmerSweep {
  0%   { left: -150%; }
  100% { left: 200%; }
}

/* ══════════════════════════════════════════
   TIER 2 — INTERMEDIATE WIN: "WIN $X"
   Full-screen centered text, bright gold, no shadows
══════════════════════════════════════════ */

.tier2-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transform: scale(0.6) translateY(20px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.35s ease;
  text-align: center;
  padding: 2vh 4vw;
  box-sizing: border-box;
  max-width: 96vw;
  max-height: 96vh;
  overflow: hidden;
}
.wt-active .tier2-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.wt-exit .tier2-content {
  transform: scale(1.15) translateY(-10px);
  opacity: 0;
  transition: transform 0.4s ease-in, opacity 0.3s ease;
}

/* Contextual craps callout headline */
.tier2 .wt-label {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f0c850;
  font-size: clamp(18px, 3.5vw, 44px);
  line-height: 1.2;
  margin-bottom: clamp(2px, 0.3vh, 6px);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 20px rgba(0,0,0,0.4);
}

/* "$X" amount — bright gold gradient + dark shadow for contrast */
.tier2 .wt-amount {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(60px, 18vmin, 220px);
  line-height: 1.1;
  padding: 0.05em 0.1em;
  background: linear-gradient(180deg, #fff5a0 0%, #ffe040 40%, #f0c030 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.8)) drop-shadow(0 0 20px rgba(0,0,0,0.5));
}


/* ══════════════════════════════════════════
   TIER 3 — EXTRAORDINARY WIN: "!!!WIN $X!!!"
   Explosive entrance with sparks, bright & clean
══════════════════════════════════════════ */

/* Initial white flash */
.wt3-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 240, 0);
  transition: background 0.08s;
  pointer-events: none;
}
.wt-active .wt3-flash {
  animation: wt3FlashPop 0.3s ease-out forwards;
}
@keyframes wt3FlashPop {
  0%   { background: rgba(255, 255, 230, 0.6); }
  100% { background: rgba(255, 255, 230, 0); }
}

/* Content row: !!! WIN $X !!! */
.tier3-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 32px);
  transform: scale(0.3);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  padding: 2vh 2vw;
  box-sizing: border-box;
  max-width: 96vw;
  max-height: 96vh;
  overflow: hidden;
}
.wt-active .tier3-content {
  transform: scale(1);
  opacity: 1;
}
.wt-exit .tier3-content {
  transform: scale(1.2);
  opacity: 0;
  transition: transform 0.5s ease-in, opacity 0.4s ease;
}

.wt3-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Contextual craps callout headline — tier 3, brighter */
.tier3 .wt3-label {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffe060;
  font-size: clamp(22px, 4.5vw, 56px);
  line-height: 1.2;
  margin-bottom: clamp(2px, 0.4vh, 8px);
  text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 24px rgba(0,0,0,0.5);
}

/* "$X" amount — tier 3, brighter gradient + dark shadow for contrast */
.tier3 .wt3-amount {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(72px, 24vmin, 300px);
  line-height: 1.1;
  padding: 0.05em 0.1em;
  background: linear-gradient(180deg, #fffbe0 0%, #ffe850 25%, #ffd030 60%, #f0b820 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.85)) drop-shadow(0 0 24px rgba(0,0,0,0.5));
}

/* Pulsing scale on the amount */
.wt-active .wt3-amount {
  animation: wt3AmountPulse 0.5s ease-in-out 0.4s 2;
}
@keyframes wt3AmountPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

/* Exclamation marks — bright, with dark shadow for contrast */
.wt3-exclaim-left,
.wt3-exclaim-right {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(48px, 14vmin, 200px);
  line-height: 1.15;
  color: rgba(255, 220, 70, 0.45);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  user-select: none;
  opacity: 0;
  transition: opacity 0.4s ease 0.15s;
}
.wt-active .wt3-exclaim-left,
.wt-active .wt3-exclaim-right {
  opacity: 1;
  animation: wt3ExclaimBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
@keyframes wt3ExclaimBounce {
  0%   { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.wt-active .wt3-exclaim-right {
  animation-delay: 0.2s;
}

/* ── Spark particles (tier 3) — brighter ── */
.wt3-sparks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.wt3-spark {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: hsl(var(--hue), 95%, 72%);
  box-shadow: 0 0 8px 3px hsla(var(--hue), 95%, 68%, 0.7);
  opacity: 0;
  transform: translate(-50%, -50%);
}
.wt-active .wt3-spark {
  animation: wt3SparkBurst 1.0s cubic-bezier(0.16, 1, 0.3, 1) var(--delay) forwards;
}
@keyframes wt3SparkBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.2);
  }
}


/* ══════════════════════════════════════════
   TIER 3 — GOLDEN CHIP SHOWER CANVAS
   Full-screen canvas behind the text, above the burst
══════════════════════════════════════════ */

.wt3-chip-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1; /* above burst, below content */
}

/* Ensure tier3 content text sits above the chip canvas */
.tier3-content {
  z-index: 2;
  position: relative;
}

.tier3 .wt3-sparks {
  z-index: 3;
}

.tier3 .wt-shimmer {
  z-index: 4;
}


/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Win Tier Overlays
══════════════════════════════════════════ */

/* ── Small mobile (portrait, ≤480px) ── */
@media (max-width: 480px) {
  .tier2 .wt-label { font-size: 16px; }
  .tier2 .wt-amount { font-size: 56px; }
  .tier3 .wt3-label { font-size: 18px; }
  .tier3 .wt3-amount { font-size: 66px; }
  .tier3-content { gap: 4px; }
}

/* ── Mobile landscape (short viewport) ── */
@media (max-height: 500px) and (orientation: landscape) {
  .tier2 .wt-label { font-size: clamp(14px, 3.5vh, 24px); }
  .tier2 .wt-amount { font-size: clamp(44px, 22vh, 120px); }
  .tier3 .wt3-label { font-size: clamp(16px, 4vh, 28px); }
  .tier3 .wt3-amount { font-size: clamp(52px, 28vh, 150px); }
  .tier3-content { gap: clamp(4px, 1.5vw, 16px); }
}

/* ── Tablet (601px–1024px) ── */
@media (min-width: 601px) and (max-width: 1024px) {
  .tier2 .wt-amount { font-size: clamp(72px, 14vw, 160px); }
  .tier3 .wt3-amount { font-size: clamp(88px, 18vw, 210px); }
}

/* ── 2K+ displays (≥2560px width) ── */
@media (min-width: 2560px) {
  .tier2 .wt-amount { font-size: 240px; }
  .tier3 .wt3-amount { font-size: 320px; }
  .tier2 .wt-label { font-size: 44px; }
  .tier3 .wt3-label { font-size: 56px; }
}

/* ── 4K displays (≥3840px width) ── */
@media (min-width: 3840px) {
  .tier2 .wt-amount { font-size: 340px; }
  .tier3 .wt3-amount { font-size: 440px; }
  .tier2 .wt-label { font-size: 60px; letter-spacing: 0.25em; }
  .tier3 .wt3-label { font-size: 76px; letter-spacing: 0.3em; }
  .wt3-spark {
    width: calc(var(--size) * 2);
    height: calc(var(--size) * 2);
  }
}

/* ── Ultra-wide (21:9+) ── */
@media (min-aspect-ratio: 21/9) {
  .tier2 .wt-amount { font-size: clamp(72px, 18vh, 240px); }
  .tier3 .wt3-amount { font-size: clamp(88px, 24vh, 320px); }
  .wt3-exclaim-left, .wt3-exclaim-right { font-size: clamp(52px, 16vh, 200px); }
}

/* ── Reduced motion preference ── */
@media (prefers-reduced-motion: reduce) {
  .wt3-spark { display: none; }
  .wt3-chip-canvas { display: none; }
  .wt-shimmer::after { animation: none !important; }
  .tier2-content, .tier3-content {
    transition-duration: 0.15s;
  }
  .wt-active .wt3-amount {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESUME TOAST OVERLAY
   Shown on load when a saved game is detected.
   Acts as the audio-unlock gesture for mobile browsers.
═══════════════════════════════════════════════════════════ */

#resume-toast-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.rt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  /* backdrop-filter removed for GPU perf */
  cursor: pointer;
}

.rt-panel {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #1a1a2e 0%, #12121e 60%, #0e0e1a 100%);
  border: 1px solid rgba(212, 168, 67, 0.28);
  border-radius: 24px;
  padding: clamp(28px, 2.6vw, 48px) clamp(26px, 2.5vw, 48px) clamp(24px, 2.2vw, 42px);
  width: min(520px, 94vw);
  text-align: center;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(212, 168, 67, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  margin: auto;

  /* Start hidden + shifted down */
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.34, 1.38, 0.64, 1);
}

/* Animate in */
#resume-toast-overlay.rt-visible .rt-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Animate out */
#resume-toast-overlay.rt-hiding .rt-panel {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* ── Dice row ── */
.rt-dice-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(14px, 1.3vw, 22px);
}

.rt-die {
  width: clamp(36px, 3.3vw, 52px);
  height: clamp(36px, 3.3vw, 52px);
  border-radius: 8px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  animation: rt-die-float 3.2s ease-in-out infinite;
}

.rt-die-red {
  animation-delay: -1.6s;
  animation-duration: 2.8s;
}

@keyframes rt-die-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%       { transform: translateY(-5px) rotate(4deg); }
}

/* ── Text ── */
.rt-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(20px, 1.88vw, 30px);
  font-weight: 700;
  letter-spacing: 4px;
  color: #e8c46a;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.rt-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(13px, 1.04vw, 16px);
  color: #9090b0;
  letter-spacing: 0.5px;
  margin-bottom: clamp(18px, 1.67vw, 28px);
}

/* ── Balance pill ── */
.rt-balance-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(212, 168, 67, 0.07);
  border: 1px solid rgba(212, 168, 67, 0.18);
  border-radius: 40px;
  padding: clamp(8px, 0.73vw, 12px) clamp(16px, 1.46vw, 24px);
  margin-bottom: 8px;
}

.rt-balance-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(11px, 0.83vw, 13px);
  letter-spacing: 2.5px;
  color: #a0a0c0;
  text-transform: uppercase;
}

.rt-balance-val {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(22px, 2.08vw, 36px);
  font-weight: 700;
  color: #f0d080;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.rt-balance-on-table {
  font-size: clamp(16px, 1.56vw, 26px);
  color: #b0c8e8;
}

/* ── Date hint ── */
.rt-date {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(12px, 0.89vw, 14px);
  color: #9e9ec8;
  letter-spacing: 0.3px;
  margin-bottom: clamp(18px, 1.67vw, 26px);
  margin-top: 4px;
}

/* ── Buttons ── */
.rt-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: clamp(16px, 1.46vw, 24px);
}

.rt-btn {
  width: 100%;
  padding: clamp(13px, 1.15vw, 20px) clamp(20px, 1.77vw, 32px);
  border-radius: 14px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(13px, 1.04vw, 17px);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Primary — Resume */
.rt-btn-resume {
  background: linear-gradient(135deg, #d4a843, #b89030);
  border: 1px solid rgba(212, 168, 67, 0.5);
  color: #0a0a0f;
  box-shadow:
    0 6px 20px rgba(212, 168, 67, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.rt-btn-resume:hover {
  transform: scale(1.025);
  box-shadow: 0 8px 28px rgba(212, 168, 67, 0.42);
  background: linear-gradient(135deg, #e8c46a, #d4a843);
}

.rt-btn-resume:active {
  transform: scale(0.98);
  box-shadow: 0 3px 12px rgba(212, 168, 67, 0.2);
}

/* Secondary — Start Over */
.rt-btn-new {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #8080a0;
  letter-spacing: 2.5px;
}

.rt-btn-new:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #b0b0cc;
  background: rgba(255, 255, 255, 0.05);
}

.rt-btn-new:active {
  transform: scale(0.98);
}

/* ── Ad section (broke state) ── */
.rt-ad-section {
  margin: clamp(14px, 1.25vw, 22px) 0 clamp(6px, 0.52vw, 10px);
  padding: clamp(14px, 1.25vw, 22px) clamp(16px, 1.46vw, 26px);
  background: rgba(56, 142, 60, 0.07);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: 16px;
}

.rt-ad-label {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(12px, 0.94vw, 15px);
  color: #a0c8a0;
  line-height: 1.55;
  margin-bottom: clamp(12px, 1.04vw, 18px);
}

.rt-btn-ad {
  width: 100%;
  padding: clamp(12px, 1.04vw, 18px) clamp(18px, 1.67vw, 30px);
  border-radius: 13px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(13px, 1.04vw, 16px);
  font-weight: 700;
  letter-spacing: 2.5px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #388e3c, #2e7d32);
  border: 1px solid rgba(76, 175, 80, 0.45);
  color: #fff;
  box-shadow: 0 5px 18px rgba(56, 142, 60, 0.3);
  margin-bottom: clamp(10px, 0.83vw, 14px);
}

.rt-btn-ad:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 7px 24px rgba(56, 142, 60, 0.45);
}

.rt-btn-ad:disabled {
  opacity: 0.45; cursor: not-allowed;
  background: #232333; border-color: #35354a; color: #60607a; box-shadow: none;
}

.rt-ad-status-msg {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(10px, 0.78vw, 13px);
  letter-spacing: 1.5px; text-align: center;
  padding: clamp(5px, 0.42vw, 8px) 0;
  border-radius: 6px;
  margin-bottom: clamp(8px, 0.63vw, 12px);
}

.rt-ad-status-msg.success { color: #66bb6a; background: rgba(76,175,80,0.08); border: 1px solid rgba(76,175,80,0.2); }
.rt-ad-status-msg.error   { color: #ef9a9a; background: rgba(244,67,54,0.08);  border: 1px solid rgba(244,67,54,0.15); }

.rt-ad-disclaimer {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(11px, 0.83vw, 13px);
  color: #6a8a6a;
  line-height: 1.55;
  margin-top: clamp(10px, 0.83vw, 14px);
  padding-top: clamp(8px, 0.63vw, 12px);
  border-top: 1px solid rgba(76, 175, 80, 0.12);
}

.rt-ad-disclaimer strong { color: #90c890; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   Resume Toast — 2K displays
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 2000px) {
  .rt-panel {
    width: min(720px, 42vw);
    padding: clamp(38px, 2.2vw, 64px) clamp(36px, 2.1vw, 64px) clamp(32px, 1.8vw, 56px);
    border-radius: 30px;
  }
  .rt-dice-row {
    gap: 14px;
    margin-bottom: clamp(20px, 1.1vw, 32px);
  }
  .rt-die {
    width: clamp(48px, 2.8vw, 72px);
    height: clamp(48px, 2.8vw, 72px);
  }
  .rt-title {
    font-size: clamp(28px, 1.6vw, 44px);
    letter-spacing: 5px;
    margin-bottom: 12px;
  }
  .rt-subtitle {
    font-size: clamp(16px, 0.85vw, 22px);
    margin-bottom: clamp(24px, 1.4vw, 38px);
  }
  .rt-balance-row {
    gap: 14px;
    padding: clamp(12px, 0.65vw, 18px) clamp(22px, 1.2vw, 34px);
    margin-bottom: 12px;
  }
  .rt-balance-label {
    font-size: clamp(13px, 0.7vw, 18px);
    letter-spacing: 3px;
  }
  .rt-balance-val {
    font-size: clamp(30px, 1.7vw, 48px);
  }
  .rt-balance-on-table {
    font-size: clamp(22px, 1.3vw, 36px);
  }
  .rt-date {
    font-size: clamp(14px, 0.75vw, 20px);
    margin-bottom: clamp(24px, 1.4vw, 36px);
  }
  .rt-btn-group {
    gap: 14px;
    margin-top: clamp(22px, 1.2vw, 34px);
  }
  .rt-btn {
    padding: clamp(16px, 0.95vw, 28px) clamp(28px, 1.5vw, 44px);
    border-radius: 18px;
    font-size: clamp(16px, 0.85vw, 24px);
    letter-spacing: 4px;
    gap: 10px;
  }
  .rt-ad-section {
    margin: clamp(20px, 1.1vw, 30px) 0 clamp(10px, 0.45vw, 14px);
    padding: clamp(20px, 1.1vw, 30px) clamp(22px, 1.2vw, 36px);
    border-radius: 20px;
  }
  .rt-ad-label {
    font-size: clamp(14px, 0.8vw, 20px);
    margin-bottom: clamp(16px, 0.85vw, 24px);
  }
  .rt-btn-ad {
    padding: clamp(16px, 0.85vw, 24px) clamp(24px, 1.4vw, 40px);
    border-radius: 16px;
    font-size: clamp(16px, 0.85vw, 22px);
    letter-spacing: 3px;
    margin-bottom: clamp(14px, 0.7vw, 20px);
  }
  .rt-ad-status-msg {
    font-size: clamp(13px, 0.65vw, 18px);
    padding: clamp(7px, 0.35vw, 12px) 0;
    margin-bottom: clamp(12px, 0.55vw, 16px);
  }
  .rt-ad-disclaimer {
    font-size: clamp(13px, 0.7vw, 18px);
    margin-top: clamp(14px, 0.7vw, 20px);
    padding-top: clamp(12px, 0.55vw, 16px);
  }
}

/* ══════════════════════════════════════════════════════════════
   Resume Toast — 4K displays
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 3200px) {
  .rt-panel {
    width: min(960px, 32vw);
    padding: clamp(52px, 1.8vw, 84px) clamp(48px, 1.7vw, 84px) clamp(44px, 1.5vw, 72px);
    border-radius: 36px;
  }
  .rt-dice-row {
    gap: 18px;
    margin-bottom: clamp(28px, 0.95vw, 44px);
  }
  .rt-die {
    width: clamp(64px, 2.2vw, 96px);
    height: clamp(64px, 2.2vw, 96px);
    border-radius: 12px;
  }
  .rt-title {
    font-size: clamp(38px, 1.3vw, 60px);
    letter-spacing: 6px;
    margin-bottom: 16px;
  }
  .rt-subtitle {
    font-size: clamp(20px, 0.7vw, 30px);
    margin-bottom: clamp(32px, 1.1vw, 52px);
  }
  .rt-balance-row {
    gap: 18px;
    padding: clamp(16px, 0.55vw, 26px) clamp(30px, 1vw, 46px);
    border-radius: 50px;
    margin-bottom: 14px;
  }
  .rt-balance-label {
    font-size: clamp(16px, 0.55vw, 24px);
    letter-spacing: 3.5px;
  }
  .rt-balance-val {
    font-size: clamp(40px, 1.4vw, 64px);
  }
  .rt-balance-on-table {
    font-size: clamp(30px, 1vw, 48px);
  }
  .rt-date {
    font-size: clamp(18px, 0.62vw, 26px);
    margin-bottom: clamp(32px, 1.1vw, 48px);
  }
  .rt-btn-group {
    gap: 18px;
    margin-top: clamp(30px, 1vw, 46px);
  }
  .rt-btn {
    padding: clamp(22px, 0.75vw, 36px) clamp(36px, 1.2vw, 56px);
    border-radius: 22px;
    font-size: clamp(20px, 0.7vw, 32px);
    letter-spacing: 5px;
    gap: 12px;
  }
  .rt-ad-section {
    margin: clamp(28px, 0.95vw, 42px) 0 clamp(14px, 0.4vw, 20px);
    padding: clamp(28px, 0.95vw, 42px) clamp(30px, 1vw, 48px);
    border-radius: 24px;
  }
  .rt-ad-label {
    font-size: clamp(18px, 0.62vw, 28px);
    margin-bottom: clamp(22px, 0.75vw, 34px);
  }
  .rt-btn-ad {
    padding: clamp(22px, 0.75vw, 34px) clamp(32px, 1.1vw, 52px);
    border-radius: 20px;
    font-size: clamp(20px, 0.7vw, 28px);
    letter-spacing: 3.5px;
    margin-bottom: clamp(18px, 0.62vw, 26px);
  }
  .rt-ad-status-msg {
    font-size: clamp(16px, 0.55vw, 24px);
    padding: clamp(10px, 0.32vw, 16px) 0;
    border-radius: 8px;
    margin-bottom: clamp(14px, 0.48vw, 22px);
  }
  .rt-ad-disclaimer {
    font-size: clamp(16px, 0.55vw, 24px);
    margin-top: clamp(18px, 0.62vw, 26px);
    padding-top: clamp(14px, 0.48vw, 22px);
  }
}

/* ══════════════════════════════════════════════════════════════
   Resume Toast — Mobile landscape
   ══════════════════════════════════════════════════════════════ */
@media (max-height: 520px) and (orientation: landscape) {
  #resume-toast-overlay {
    align-items: center !important;
    justify-content: center !important;
  }
  .rt-panel {
    max-height: 98vh !important;
    max-height: 98dvh !important;
    height: auto !important;
    min-height: 0 !important;
    width: min(420px, 70vw) !important;
    border-radius: 14px !important;
    overflow-y: auto !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    padding: clamp(6px, 1.5vh, 10px) clamp(14px, 3vw, 24px) clamp(6px, 1.5vh, 10px) !important;
    box-sizing: border-box !important;
    margin: auto !important;
  }
  .rt-panel::-webkit-scrollbar { display: none !important; }
  .rt-dice-row {
    gap: 6px !important;
    margin-bottom: clamp(2px, 0.8vh, 6px) !important;
  }
  .rt-die {
    width: clamp(22px, 5vh, 32px) !important;
    height: clamp(22px, 5vh, 32px) !important;
  }
  .rt-title {
    font-size: clamp(13px, 3.5vh, 20px) !important;
    letter-spacing: 2px !important;
    margin-bottom: 2px !important;
  }
  .rt-subtitle {
    font-size: clamp(9px, 2vw, 12px) !important;
    margin-bottom: clamp(4px, 1vh, 8px) !important;
  }
  .rt-balance-row {
    padding: clamp(4px, 1vh, 7px) clamp(10px, 2vw, 16px) !important;
    margin-bottom: 3px !important;
    gap: 6px !important;
  }
  .rt-balance-label {
    font-size: clamp(7px, 1.6vw, 10px) !important;
    letter-spacing: 1.5px !important;
  }
  .rt-balance-val {
    font-size: clamp(14px, 3.5vh, 22px) !important;
  }
  .rt-balance-on-table {
    font-size: clamp(11px, 2.8vh, 16px) !important;
  }
  .rt-date {
    margin-bottom: clamp(1px, 0.3vh, 4px) !important;
    margin-top: 0 !important;
    font-size: clamp(8px, 1.8vw, 10px) !important;
  }
  .rt-btn-group {
    gap: clamp(3px, 0.8vh, 6px) !important;
    margin-top: clamp(4px, 1vh, 8px) !important;
  }
  .rt-btn {
    padding: clamp(5px, 1.2vh, 9px) 0 !important;
    font-size: clamp(9px, 2.2vw, 13px) !important;
    margin-bottom: 0 !important;
    border-radius: 8px !important;
    letter-spacing: 2px !important;
  }
  .rt-or-divider {
    font-size: clamp(7px, 1.8vw, 10px) !important;
    margin: clamp(3px, 0.8vh, 6px) 0 !important;
  }
  .rt-ad-section {
    margin-top: clamp(4px, 1vh, 8px) !important;
    padding-top: clamp(4px, 1vh, 8px) !important;
  }
  .rt-ad-title {
    font-size: clamp(9px, 2vw, 12px) !important;
    margin-bottom: clamp(3px, 0.8vh, 6px) !important;
  }
  .rt-ad-body {
    font-size: clamp(8px, 1.8vw, 11px) !important;
  }
  .rt-ad-btn {
    padding: clamp(5px, 1.2vh, 8px) 0 !important;
    font-size: clamp(9px, 2vw, 12px) !important;
    margin-top: clamp(4px, 1vh, 8px) !important;
  }
  .rt-ad-status-msg {
    font-size: clamp(8px, 1.8vw, 11px) !important;
    padding: clamp(3px, 0.8vh, 6px) 0 !important;
    margin-bottom: clamp(4px, 1vh, 6px) !important;
  }
  .rt-ad-disclaimer {
    font-size: clamp(7px, 1.5vw, 10px) !important;
    margin-top: clamp(4px, 1vh, 8px) !important;
    padding-top: clamp(3px, 0.8vh, 6px) !important;
  }
}


/* ================================================================
   STATS POPUP (moved from game.js dynamic injection)
   ================================================================ */

#stats-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#stats-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  /* backdrop-filter removed for GPU perf */
}
#stats-popup-panel {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg,#18182a,#12121e);
  border: 1px solid #2a2a3a;
  border-radius: 22px;
  padding: 0;
  width: min(1200px,80vw,96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.7),0 0 0 1px rgba(212,168,67,.12);
  font-family: "DM Sans","Oswald",sans-serif;
}
.sp-scroll-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px,1.46vw,28px) clamp(18px,1.77vw,34px) 0;
  margin-bottom: clamp(14px,1.25vw,24px);
  flex-shrink: 0;
}
.sp-header-title {
  font-family: "Oswald",sans-serif;
  font-size: clamp(14px,1.04vw,20px);
  letter-spacing: 3px;
  color: #d4a843;
  text-transform: uppercase;
}
.sp-close {
  width: clamp(28px,1.98vw,38px);
  height: clamp(28px,1.98vw,38px);
  border-radius: 10px;
  border: 1px solid rgba(212,168,67,.2);
  background: rgba(212,168,67,.06);
  color: #d4a843;
  font-size: clamp(12px,0.89vw,17px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.sp-close:hover {
  background: rgba(212,168,67,.15);
  border-color: rgba(212,168,67,.4);
}
.sp-stat-cards {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: clamp(8px,0.73vw,14px);
  padding: 0 clamp(18px,1.77vw,34px);
  margin-bottom: clamp(14px,1.25vw,24px);
}
.sp-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: clamp(14px,1.25vw,24px) clamp(8px,0.73vw,14px) clamp(10px,0.94vw,18px);
  text-align: center;
  min-width: 0;
  overflow: hidden;
}
.sp-card-green {
  border-color: rgba(74,222,128,.18);
  background: rgba(74,222,128,.04);
}
.sp-card-red {
  border-color: rgba(248,113,113,.18);
  background: rgba(248,113,113,.04);
}
.sp-card-val {
  font-family: "Oswald",sans-serif;
  font-size: clamp(16px,2.2vw,36px);
  font-weight: 700;
  color: #e8e8f0;
  line-height: 1;
  white-space: nowrap;
}
.sp-card-green .sp-card-val {
  color: #4ade80;
}
.sp-card-red .sp-card-val {
  color: #f87171;
}
.sp-card-label {
  font-size: clamp(10px,0.73vw,14px);
  letter-spacing: .5px;
  color: #9a9ab8;
  margin-top: clamp(6px,0.52vw,10px);
  text-transform: uppercase;
  font-weight: 600;
}
.sp-section-title {
  font-family: "Oswald",sans-serif;
  font-size: clamp(11px,0.78vw,15px);
  letter-spacing: 2px;
  color: #9a9ab8;
  margin: 4px clamp(18px,1.77vw,34px) clamp(8px,0.73vw,14px);
  text-transform: uppercase;
}
#stats-popup-history {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: clamp(6px,0.63vw,12px);
  padding: 0 clamp(18px,1.77vw,34px);
  margin-bottom: clamp(12px,1.15vw,22px);
}
.popup-hist-row {
  display: flex;
  align-items: center;
  gap: clamp(4px,0.42vw,8px);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  padding: clamp(6px,0.52vw,10px) clamp(8px,0.73vw,14px);
}
.popup-hist-latest {
  background: rgba(212,168,67,.06);
  border-color: rgba(212,168,67,.2);
}
.popup-hist-dice {
  display: flex;
  gap: 5px;
}
.popup-die-mini svg {
  display: block;
}
.popup-hist-sum {
  font-family: "Oswald",sans-serif;
  font-size: clamp(16px,1.25vw,24px);
  font-weight: 700;
  color: #c0c0d0;
  margin-left: auto;
  min-width: clamp(18px,1.35vw,26px);
  text-align: center;
}
.popup-hist-latest .popup-hist-sum {
  color: #d4a843;
}
#sp-distro-chart {
  display: flex;
  gap: clamp(3px,0.31vw,6px);
  align-items: flex-end;
  height: clamp(70px,6.25vw,120px);
  margin: 0 clamp(18px,1.77vw,34px) clamp(8px,0.73vw,14px);
  padding-bottom: 4px;
}
#sp-distro-chart .db-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
}
#sp-distro-chart .db-bar {
  flex: 1;
  width: 100%;
  position: relative;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  background: rgba(255,255,255,.03);
}
#sp-distro-chart .db-bar-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height .3s;
}
#sp-distro-chart .db-grey {
  background: rgba(255,255,255,.12);
}
#sp-distro-chart .db-green {
  background: #4ade80;
}
#sp-distro-chart .db-red {
  background: #f87171;
}
#sp-distro-chart .db-label {
  font-size: clamp(9px,0.68vw,13px);
  color: #9a9ab8;
  font-family: "Oswald",sans-serif;
}
#sp-distro-empty {
  color: #8585a0;
  font-size: clamp(11px,0.83vw,16px);
  text-align: center;
  padding: clamp(10px,0.94vw,18px) clamp(18px,1.77vw,34px);
}
/* ── Stats: value color helpers ── */
.sp-val-green { color: #4ade80 !important; }
.sp-val-red { color: #f87171 !important; }

/* ── Stats: small card row (3-col for secondary stats) ── */
.sp-stat-cards-sm {
  grid-template-columns: repeat(3,1fr) !important;
  margin-bottom: clamp(8px,0.73vw,14px) !important;
}
.sp-stat-cards-sm .sp-card {
  padding: clamp(8px,0.73vw,14px) clamp(6px,0.52vw,10px) clamp(6px,0.52vw,10px);
}
.sp-stat-cards-sm .sp-card-val {
  font-size: clamp(14px,1.4vw,24px);
}
.sp-stat-cards-sm .sp-card-label {
  font-size: clamp(7px,0.52vw,10px);
  margin-top: clamp(3px,0.26vw,5px);
}

/* ── Stats: Dice Lab conditions banner ── */
.sp-lab-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 clamp(18px,1.77vw,34px) clamp(10px,0.83vw,16px);
  padding: clamp(8px,0.63vw,12px) clamp(12px,1.04vw,20px);
  border-radius: 10px;
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.18);
}
.sp-lab-icon {
  font-size: clamp(14px,1.15vw,22px);
}
.sp-lab-text {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(10px,0.73vw,14px);
  font-weight: 600;
  letter-spacing: 0.8px;
  color: rgba(74,222,128,0.8);
}

/* ── Stats: header actions (print + close) ── */
.sp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sp-icon-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.sp-icon-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ── Stats: Reset button ── */
.sp-reset-btn {
  width: 100%;
  padding: clamp(6px,0.52vw,10px) 0;
  margin-bottom: clamp(6px,0.52vw,10px);
  border-radius: 10px;
  border: 1px solid rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.08);
  color: #f87171;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px,0.63vw,12px);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.sp-reset-btn:hover {
  background: rgba(248,113,113,0.18);
  border-color: rgba(248,113,113,0.5);
}

/* ── Stats: Confirmation overlay ── */
.sp-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}
.sp-confirm-box {
  background: rgba(15,12,8,0.98);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 16px;
  padding: clamp(20px,1.8vw,36px);
  text-align: center;
  max-width: 320px;
}
.sp-confirm-msg {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(13px,1vw,18px);
  font-weight: 600;
  color: #e8e8f0;
  margin-bottom: 16px;
  line-height: 1.4;
}
.sp-confirm-sub {
  font-size: clamp(10px,0.73vw,13px);
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}
.sp-confirm-btns {
  display: flex;
  gap: 10px;
}
.sp-confirm-yes {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(248,113,113,0.4);
  background: rgba(248,113,113,0.15);
  color: #f87171;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(10px,0.73vw,13px);
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.sp-confirm-yes:hover { background: rgba(248,113,113,0.3); }
.sp-confirm-no {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-family: 'Oswald', sans-serif;
  font-size: clamp(10px,0.73vw,13px);
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.sp-confirm-no:hover { background: rgba(255,255,255,0.12); }

.sp-footer {
  padding: clamp(10px,0.94vw,18px) clamp(18px,1.77vw,34px) clamp(16px,1.46vw,28px);
  flex-shrink: 0;
}
.sp-done-btn {
  width: 100%;
  padding: clamp(10px,0.94vw,18px) 0;
  border-radius: 14px;
  border: 1px solid rgba(212,168,67,.4);
  background: linear-gradient(135deg,#d4a843,#b89030);
  color: #0a0a0f;
  font-family: "Oswald",sans-serif;
  font-size: clamp(12px,0.89vw,17px);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(212,168,67,.25);
}
.sp-done-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(212,168,67,.4);
  background: linear-gradient(135deg,#e8c46a,#d4a843);
}
@media(min-width:2000px) {
  #stats-popup-panel {
    width: min(1100px,80vw);
    border-radius: 28px;
  }
  .sp-header {
    padding: clamp(22px,1.3vw,38px) clamp(26px,1.5vw,46px) 0;
    margin-bottom: clamp(20px,1.1vw,34px);
  }
  .sp-header-title {
    font-size: clamp(18px,0.9vw,28px);
    letter-spacing: 4px;
  }
  .sp-close {
    width: clamp(36px,1.8vw,52px);
    height: clamp(36px,1.8vw,52px);
    border-radius: 13px;
    font-size: clamp(16px,0.8vw,24px);
  }
  .sp-stat-cards {
    gap: clamp(12px,0.65vw,20px);
    padding: 0 clamp(26px,1.5vw,46px);
    margin-bottom: clamp(20px,1.1vw,34px);
  }
  .sp-card {
    border-radius: 20px;
    padding: clamp(20px,1.1vw,34px) clamp(12px,0.65vw,20px) clamp(16px,0.85vw,26px);
  }
  .sp-card-val {
    font-size: clamp(32px,2vw,52px);
  }
  .sp-card-label {
    font-size: clamp(12px,0.65vw,20px);
    margin-top: clamp(8px,0.45vw,14px);
  }
  .sp-section-title {
    font-size: clamp(13px,0.7vw,20px);
    margin: 6px clamp(26px,1.5vw,46px) clamp(12px,0.65vw,20px);
  }
  #stats-popup-history {
    gap: clamp(10px,0.55vw,16px);
    padding: 0 clamp(26px,1.5vw,46px);
    margin-bottom: clamp(18px,1vw,30px);
  }
  .popup-hist-row {
    border-radius: 14px;
    padding: clamp(10px,0.55vw,16px) clamp(12px,0.65vw,20px);
    gap: clamp(6px,0.35vw,12px);
  }
  .popup-hist-sum {
    font-size: clamp(20px,1.1vw,34px);
    min-width: clamp(24px,1.2vw,36px);
  }
  #sp-distro-chart {
    gap: clamp(5px,0.28vw,10px);
    height: clamp(100px,5.5vw,170px);
    margin: 0 clamp(26px,1.5vw,46px) clamp(12px,0.65vw,20px);
  }
  #sp-distro-chart .db-label {
    font-size: clamp(12px,0.6vw,18px);
  }
  #sp-distro-empty {
    font-size: clamp(14px,0.75vw,22px);
    padding: clamp(14px,0.8vw,24px) clamp(26px,1.5vw,46px);
  }
  .sp-footer {
    padding: clamp(16px,0.85vw,26px) clamp(26px,1.5vw,46px) clamp(22px,1.3vw,38px);
  }
  .sp-done-btn {
    padding: clamp(14px,0.8vw,24px) 0;
    border-radius: 16px;
    font-size: clamp(15px,0.8vw,24px);
    letter-spacing: 4px;
  }
}
@media(min-width:3200px) {
  #stats-popup-panel {
    width: min(1280px,42vw);
    border-radius: 34px;
  }
  .sp-header {
    padding: clamp(30px,1.1vw,52px) clamp(34px,1.2vw,60px) 0;
    margin-bottom: clamp(28px,0.95vw,46px);
  }
  .sp-header-title {
    font-size: clamp(24px,0.75vw,36px);
    letter-spacing: 5px;
  }
  .sp-close {
    width: clamp(46px,1.5vw,68px);
    height: clamp(46px,1.5vw,68px);
    border-radius: 16px;
    font-size: clamp(20px,0.65vw,30px);
  }
  .sp-stat-cards {
    gap: clamp(16px,0.55vw,28px);
    padding: 0 clamp(34px,1.2vw,60px);
    margin-bottom: clamp(28px,0.95vw,46px);
  }
  .sp-card {
    border-radius: 24px;
    padding: clamp(28px,0.95vw,46px) clamp(16px,0.55vw,28px) clamp(22px,0.75vw,36px);
  }
  .sp-card-val {
    font-size: clamp(44px,1.6vw,72px);
  }
  .sp-card-label {
    font-size: clamp(16px,0.55vw,26px);
    margin-top: clamp(12px,0.4vw,18px);
  }
  .sp-section-title {
    font-size: clamp(17px,0.58vw,26px);
    margin: 8px clamp(34px,1.2vw,60px) clamp(16px,0.55vw,28px);
  }
  #stats-popup-history {
    gap: clamp(14px,0.48vw,22px);
    padding: 0 clamp(34px,1.2vw,60px);
    margin-bottom: clamp(24px,0.82vw,40px);
  }
  .popup-hist-row {
    border-radius: 18px;
    padding: clamp(14px,0.48vw,22px) clamp(16px,0.55vw,28px);
    gap: clamp(10px,0.32vw,16px);
  }
  .popup-hist-sum {
    font-size: clamp(28px,0.9vw,44px);
    min-width: clamp(32px,1vw,48px);
  }
  #sp-distro-chart {
    gap: clamp(8px,0.24vw,14px);
    height: clamp(140px,4.5vw,220px);
    margin: 0 clamp(34px,1.2vw,60px) clamp(16px,0.55vw,28px);
  }
  #sp-distro-chart .db-label {
    font-size: clamp(15px,0.5vw,24px);
  }
  #sp-distro-empty {
    font-size: clamp(18px,0.62vw,28px);
    padding: clamp(18px,0.65vw,32px) clamp(34px,1.2vw,60px);
  }
  .sp-footer {
    padding: clamp(22px,0.75vw,36px) clamp(34px,1.2vw,60px) clamp(28px,1.1vw,52px);
  }
  .sp-done-btn {
    padding: clamp(18px,0.65vw,32px) 0;
    border-radius: 20px;
    font-size: clamp(18px,0.65vw,30px);
    letter-spacing: 5px;
  }
}


/* ================================================================
   SETTINGS PANEL (moved from game.js dynamic injection)
   ================================================================ */

#settings-panel-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
#settings-panel-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  /* backdrop-filter removed for GPU perf */
}
#settings-panel {
  position: relative; z-index: 1;
  background: #14141e;
  border: 1px solid #252535;
  border-radius: 20px;
  padding: 0;
  width: min(520px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0,0,0,0.75), 0 0 0 1px rgba(212,168,67,0.12);
  font-family: 'DM Sans', 'Oswald', sans-serif;
}
/* Sticky header — settings panel only */
#settings-panel > .sp-header {
  position: relative;
  flex-shrink: 0;
  padding: clamp(14px,1.25vw,24px) clamp(20px,1.88vw,36px) 0;
}
.sp-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(14px,0.99vw,19px); letter-spacing: 4px;
  color: #d4a843; text-align: center;
  margin-bottom: clamp(10px,0.94vw,18px);
}
.sp-close-btn {
  position: absolute; top: clamp(10px,0.94vw,18px); right: clamp(12px,1.15vw,22px);
  color: #8585a0; cursor: pointer; font-size: clamp(14px,1.04vw,20px);
  line-height: 1; transition: color .15s;
}
.sp-close-btn:hover { color: #e8e8f0; }
/* Scrollable middle content */
.sp-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 clamp(20px,1.88vw,36px);
  scrollbar-width: thin;
  scrollbar-color: rgba(212,168,67,0.2) transparent;
}
.sp-scroll-body::-webkit-scrollbar { width: 4px; }
.sp-scroll-body::-webkit-scrollbar-track { background: transparent; }
.sp-scroll-body::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.2); border-radius: 2px; }
.sp-section-hdr {
  display: flex; align-items: center; gap: clamp(4px,0.42vw,8px);
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px,0.68vw,13px); letter-spacing: 2.5px;
  color: #9a9ab8; text-transform: uppercase;
  margin-bottom: clamp(8px,0.73vw,14px); margin-top: clamp(3px,0.31vw,6px);
  padding-bottom: clamp(4px,0.42vw,8px);
  border-bottom: 1px solid #1e1e2c;
}
.sp-section-body { margin-bottom: clamp(12px,1.15vw,22px); }
.sp-section-empty {
  color: #6a6a88; font-size: clamp(9px,0.68vw,13px);
  letter-spacing: 1px; text-align: center;
  padding: clamp(7px,0.63vw,12px) 0 4px;
  font-family: 'Oswald', sans-serif;
}
/* Toggle row — desktop-only tooltip setting */
.sp-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(6px,0.52vw,10px) 0;
}
.sp-toggle-info { flex: 1; min-width: 0; }
.sp-toggle-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px,0.63vw,12px); letter-spacing: 2px;
  color: #b0b0c8; text-transform: uppercase;
}
.sp-toggle-desc {
  font-size: clamp(8px,0.52vw,10px); color: #8888a8;
  margin-top: 2px; letter-spacing: 0.5px;
}
.sp-toggle-switch {
  position: relative; width: 42px; height: 24px;
  border-radius: 12px; border: 1px solid #2a2a3a;
  background: #1c1c2a; cursor: pointer;
  transition: background .2s, border-color .2s;
  flex-shrink: 0; margin-left: 12px;
  padding: 0;
}
.sp-toggle-switch .sp-toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #555570;
  transition: transform .2s, background .2s;
  pointer-events: none;
}
.sp-toggle-switch.active {
  background: rgba(212,168,67,0.2);
  border-color: #d4a843;
}
.sp-toggle-switch.active .sp-toggle-knob {
  transform: translateX(18px);
  background: #d4a843;
}
/* Desktop-only: hide on mobile/touch, show on desktop */
.sp-desktop-only { display: none; }
.sp-mobile-only  { display: flex; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .sp-desktop-only { display: flex; }
  .sp-mobile-only  { display: none; }
}
/* Sliders */
.sp-slider-row {
  display: flex; align-items: center; gap: clamp(7px,0.63vw,12px);
  margin-bottom: clamp(10px,0.94vw,18px);
}
.sp-slider-icon { color: #7070888; flex-shrink: 0; color: #9a9ab0; }
.sp-slider-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(9px,0.63vw,12px); letter-spacing: 2px;
  color: #a8a8c0; width: clamp(30px,2.29vw,44px); flex-shrink: 0;
}
.sp-slider-wrap { flex: 1; }
.sp-slider {
  width: 100%; height: 5px;
  -webkit-appearance: none; appearance: none;
  background: #252535; border-radius: 3px; outline: none;
  cursor: pointer;
}
.sp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #d4a843; border: 2px solid #111118;
  box-shadow: 0 0 5px rgba(212,168,67,0.45);
  cursor: pointer; transition: transform .1s;
}
.sp-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.sp-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #d4a843; border: 2px solid #111118;
  cursor: pointer;
}
.sp-slider-val {
  font-size: clamp(9px,0.68vw,13px); color: #c0c0d0;
  width: clamp(28px,2.19vw,42px); text-align: right; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.sp-mute-row { display: flex; justify-content: flex-end; margin-top: -4px; }
.sp-mute-btn {
  padding: clamp(3px,0.31vw,6px) clamp(8px,0.83vw,16px); border-radius: 7px;
  border: 1px solid #2a2a3a; background: #1c1c2a;
  color: #a8a8c0; font-family: 'Oswald', sans-serif;
  font-size: clamp(8px,0.57vw,11px); letter-spacing: 2px;
  cursor: pointer; transition: all .15s;
}
.sp-mute-btn:hover { border-color: #a8a8c0; color: #e0e0f0; }
/* Dice grid */
.sp-dice-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(5px,0.52vw,10px);
}
.sp-dice-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(4px,0.42vw,8px); padding: clamp(7px,0.63vw,12px) clamp(4px,0.42vw,8px) clamp(6px,0.52vw,10px);
  border-radius: 10px;
  border: 1px solid #252535;
  background: #1a1a28;
  cursor: pointer; transition: all .15s;
  color: #9a9abb;
}
.sp-dice-btn:hover {
  border-color: #454560;
  background: #1f1f30;
  color: #c0c0d8;
}
.sp-dice-btn.active {
  border-color: #d4a843;
  background: rgba(212,168,67,0.08);
  color: #d4a843;
  box-shadow: 0 0 10px rgba(212,168,67,0.15);
}
.sp-dice-pips {
  display: flex; gap: 3px; align-items: center;
  justify-content: center; height: clamp(16px,1.15vw,22px);
}
.sp-no-anim-icon {
  font-size: clamp(12px,0.94vw,18px); line-height: 1; color: #8585a0;
}
.sp-dice-btn.active .sp-no-anim-icon { color: #d4a843; }
.sp-dice-lbl {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(8px,0.57vw,11px); letter-spacing: 1.5px;
  text-transform: uppercase; text-align: center;
}
/* Footer — sticky at bottom of flex panel */
#settings-panel > .sp-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: clamp(8px,0.73vw,14px) clamp(20px,1.88vw,36px) clamp(14px,1.25vw,24px);
  border-top: 1px solid rgba(212,168,67,0.08);
}
/* ═══ Settings: About info ═══ */
.sp-about-info {
  text-align: left;
}
.sp-about-line {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(9px, 0.52vw, 11px);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3px;
  line-height: 1.6;
}
.sp-about-link {
  color: #d4a843;
  text-decoration: none;
  transition: color 0.2s;
}
.sp-about-link:hover {
  color: #f0c95a;
  text-decoration: underline;
}

/* ── Session Log (Settings) ── */
.sp-log-info {
  padding: clamp(6px,0.4vw,10px) 0;
}
.sp-log-stat {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(10px,0.68vw,13px);
  color: #d0d0e8;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.sp-log-summary {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(8px,0.52vw,10px);
  color: #8888a8;
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.sp-log-actions {
  display: flex; gap: clamp(6px,0.5vw,10px);
  margin-top: clamp(4px,0.3vw,8px);
}
.sp-log-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: clamp(5px,0.36vw,8px) clamp(10px,0.7vw,16px);
  border-radius: 8px; border: 1px solid #2a2a3a;
  background: #1c1c2a; color: #b0b0c8;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(9px,0.57vw,12px);
  font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; transition: all .15s;
}
.sp-log-btn:hover { border-color: #a8a8c0; color: #e0e0f0; }
.sp-log-export:hover { border-color: rgba(212,168,67,0.5); color: #d4a843; }
.sp-log-clear:hover { border-color: rgba(200,80,80,0.5); color: #e06060; }

/* ── User Manual row ── */
.sp-manual-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(8px,0.6vw,12px) clamp(10px,0.7vw,16px);
}
.sp-manual-btn:hover { border-color: rgba(212,168,67,0.5); color: #d4a843; }

/* ── Session Log (Stats compact row) ── */
.sp-log-export-row {
  display: flex; align-items: center; gap: 8px;
  padding: clamp(8px,0.6vw,12px) clamp(10px,0.7vw,16px);
  margin-top: clamp(8px,0.6vw,12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: 'DM Sans', sans-serif;
}
.sp-log-export-icon { font-size: clamp(12px,0.8vw,16px); }
#stats-log-summary {
  flex: 1;
  font-size: clamp(9px,0.57vw,12px);
  color: #b0b0c8; font-weight: 600;
  letter-spacing: 0.5px;
}

.sp-disclaimer {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(11px,0.83vw,13px);
  color: #9e9ec8; line-height: 1.6; text-align: center;
  margin-top: clamp(12px,1.04vw,18px);
  margin-bottom: clamp(8px,0.73vw,14px);
  padding-top: clamp(10px,0.83vw,14px);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sp-disclaimer strong { color: #c8a84a; font-weight: 600; }
.sp-done-btn {
  width: 100%; padding: clamp(8px,0.68vw,13px) 0;
  border-radius: 11px;
  border: 1px solid rgba(212,168,67,0.4);
  background: linear-gradient(135deg, #d4a843, #b89030);
  color: #0a0a0f;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(11px,0.78vw,15px); font-weight: 700; letter-spacing: 3px;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 4px 14px rgba(212,168,67,0.2);
}
.sp-done-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 22px rgba(212,168,67,0.35);
  background: linear-gradient(135deg, #e8c46a, #d4a843);
}

/* ── 2K displays ── */
@media (min-width: 2000px) {
  #settings-panel {
    width: min(720px, 42vw);
    padding: clamp(26px, 1.4vw, 44px) clamp(28px, 1.6vw, 48px) clamp(20px, 1.1vw, 34px);
    border-radius: 26px;
  }
  .sp-title {
    font-size: clamp(18px, 0.85vw, 26px);
    letter-spacing: 5px;
    margin-bottom: clamp(20px, 1.1vw, 36px);
  }
  .sp-close-btn {
    top: clamp(16px, 0.8vw, 26px);
    right: clamp(18px, 1vw, 30px);
    font-size: clamp(18px, 0.9vw, 28px);
  }
  .sp-section-hdr {
    font-size: clamp(12px, 0.6vw, 18px);
    letter-spacing: 3px;
    margin-bottom: clamp(12px, 0.65vw, 20px);
    padding-bottom: clamp(6px, 0.35vw, 12px);
  }
  .sp-section-body { margin-bottom: clamp(18px, 1vw, 30px); }
  .sp-section-empty {
    font-size: clamp(12px, 0.6vw, 18px);
    padding: clamp(10px, 0.55vw, 16px) 0 6px;
  }
  .sp-slider-row {
    gap: clamp(10px, 0.55vw, 18px);
    margin-bottom: clamp(14px, 0.8vw, 24px);
  }
  .sp-slider-label {
    font-size: clamp(11px, 0.55vw, 16px);
    width: clamp(40px, 2vw, 60px);
  }
  .sp-slider::-webkit-slider-thumb {
    width: 26px; height: 26px;
  }
  .sp-slider::-moz-range-thumb {
    width: 26px; height: 26px;
  }
  .sp-slider-val {
    font-size: clamp(12px, 0.6vw, 18px);
    width: clamp(36px, 1.8vw, 56px);
  }
  .sp-mute-btn {
    padding: clamp(5px, 0.28vw, 8px) clamp(12px, 0.7vw, 22px);
    font-size: clamp(10px, 0.5vw, 14px);
    border-radius: 9px;
  }
  .sp-dice-grid { gap: clamp(8px, 0.45vw, 14px); }
  .sp-dice-btn {
    gap: clamp(6px, 0.35vw, 12px);
    padding: clamp(10px, 0.55vw, 16px) clamp(6px, 0.35vw, 12px) clamp(8px, 0.45vw, 14px);
    border-radius: 12px;
  }
  .sp-dice-pips { height: clamp(20px, 1vw, 30px); }
  .sp-no-anim-icon { font-size: clamp(16px, 0.8vw, 24px); }
  .sp-dice-lbl { font-size: clamp(10px, 0.5vw, 14px); }
  .sp-disclaimer {
    font-size: clamp(13px, 0.7vw, 18px);
    margin-top: clamp(16px, 0.85vw, 24px);
    padding-top: clamp(14px, 0.75vw, 20px);
  }
  .sp-done-btn {
    padding: clamp(12px, 0.6vw, 18px) 0;
    border-radius: 14px;
    font-size: clamp(14px, 0.7vw, 20px);
    letter-spacing: 4px;
  }
}

/* ── 4K displays ── */
@media (min-width: 3200px) {
  #settings-panel {
    width: min(960px, 32vw);
    padding: clamp(36px, 1.2vw, 60px) clamp(38px, 1.3vw, 64px) clamp(28px, 0.95vw, 48px);
    border-radius: 32px;
  }
  .sp-title {
    font-size: clamp(24px, 0.72vw, 34px);
    letter-spacing: 6px;
    margin-bottom: clamp(28px, 0.95vw, 48px);
  }
  .sp-close-btn {
    top: clamp(22px, 0.7vw, 34px);
    right: clamp(24px, 0.82vw, 38px);
    font-size: clamp(24px, 0.75vw, 36px);
  }
  .sp-section-hdr {
    font-size: clamp(16px, 0.52vw, 24px);
    letter-spacing: 3.5px;
    margin-bottom: clamp(16px, 0.55vw, 28px);
    padding-bottom: clamp(8px, 0.28vw, 14px);
  }
  .sp-section-body { margin-bottom: clamp(24px, 0.82vw, 40px); }
  .sp-section-empty {
    font-size: clamp(16px, 0.52vw, 24px);
    padding: clamp(14px, 0.48vw, 22px) 0 8px;
  }
  .sp-slider-row {
    gap: clamp(14px, 0.48vw, 24px);
    margin-bottom: clamp(20px, 0.68vw, 32px);
  }
  .sp-slider-label {
    font-size: clamp(14px, 0.48vw, 22px);
    width: clamp(52px, 1.7vw, 76px);
  }
  .sp-slider { height: 7px; }
  .sp-slider::-webkit-slider-thumb {
    width: 32px; height: 32px;
  }
  .sp-slider::-moz-range-thumb {
    width: 32px; height: 32px;
  }
  .sp-slider-val {
    font-size: clamp(16px, 0.52vw, 24px);
    width: clamp(48px, 1.5vw, 72px);
  }
  .sp-mute-btn {
    padding: clamp(7px, 0.24vw, 12px) clamp(16px, 0.55vw, 28px);
    font-size: clamp(13px, 0.42vw, 18px);
    border-radius: 10px;
  }
  .sp-dice-grid { gap: clamp(12px, 0.4vw, 20px); }
  .sp-dice-btn {
    gap: clamp(8px, 0.28vw, 16px);
    padding: clamp(14px, 0.48vw, 22px) clamp(8px, 0.28vw, 16px) clamp(12px, 0.4vw, 18px);
    border-radius: 14px;
  }
  .sp-dice-pips { height: clamp(26px, 0.85vw, 38px); }
  .sp-no-anim-icon { font-size: clamp(22px, 0.7vw, 32px); }
  .sp-dice-lbl { font-size: clamp(13px, 0.42vw, 20px); }
  .sp-disclaimer {
    font-size: clamp(16px, 0.55vw, 24px);
    margin-top: clamp(22px, 0.75vw, 32px);
    padding-top: clamp(18px, 0.62vw, 28px);
  }
  .sp-done-btn {
    padding: clamp(16px, 0.55vw, 26px) 0;
    border-radius: 18px;
    font-size: clamp(18px, 0.58vw, 28px);
    letter-spacing: 5px;
  }
}

/* ═══════════════════════════════════════════════════════════
   WIN CONDITION DETAIL TOAST
═══════════════════════════════════════════════════════════ */

/* Make wc-box clickable when active */
.wc-box.wc-win,
.wc-box.wc-mixed,
.wc-box.wc-shaded {
  cursor: pointer;
}
.wc-box.wc-win:active,
.wc-box.wc-mixed:active,
.wc-box.wc-shaded:active {
  filter: brightness(1.3);
  transition: filter 0.05s;
}

/* ── Overlay container ── */
#wc-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.wcd-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  /* backdrop-filter removed for GPU perf */
  cursor: pointer;
}

/* ── Panel ── */
.wcd-panel {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #1a1a2e 0%, #12121e 60%, #0e0e1a 100%);
  border: 1px solid rgba(212, 168, 67, 0.28);
  border-radius: 24px;
  padding: clamp(20px, 2vw, 36px) clamp(20px, 2vw, 36px) clamp(16px, 1.6vw, 28px);
  width: min(420px, 92vw);
  text-align: center;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(212, 168, 67, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-height: 85vh;
  display: flex;
  flex-direction: column;

  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.34, 1.38, 0.64, 1);
}

/* Wider panel when both columns present */
.wcd-panel-mixed {
  width: min(740px, 94vw);
}

#wc-detail-overlay.wcd-visible .wcd-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#wc-detail-overlay.wcd-hiding .wcd-panel {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* ── Header ── */
.wcd-header {
  flex-shrink: 0;
  margin-bottom: clamp(10px, 1.2vw, 18px);
}

.wcd-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(42px, 3.6vw, 58px);
  height: clamp(42px, 3.6vw, 58px);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.2), rgba(180, 130, 40, 0.1));
  border: 2px solid rgba(212, 168, 67, 0.45);
  font-family: 'Oswald', sans-serif;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 700;
  color: #e8c46a;
  text-shadow: 0 0 12px rgba(212, 168, 67, 0.4);
  margin-bottom: clamp(8px, 0.8vw, 12px);
}

.wcd-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(14px, 1.3vw, 20px);
  font-weight: 700;
  letter-spacing: 3px;
  color: #e8c46a;
  text-transform: uppercase;
}

.wcd-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(11px, 0.9vw, 14px);
  color: #9e9ec8;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ── Body (scrollable area) ── */
.wcd-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,168,67,0.2) transparent;
}
.wcd-body::-webkit-scrollbar { width: 4px; }
.wcd-body::-webkit-scrollbar-track { background: transparent; }
.wcd-body::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.25); border-radius: 4px; }

/* ══ TWO-COLUMN LAYOUT ══ */

.wcd-columns {
  display: flex;
  flex-direction: column;  /* single-column default */
  gap: clamp(10px, 1vw, 16px);
}

/* Two columns when mixed (losses LEFT, wins RIGHT) */
.wcd-columns-mixed {
  flex-direction: row;
  align-items: flex-start;
}

.wcd-col {
  min-width: 0;
}

/* In mixed mode each column takes half */
.wcd-columns-mixed .wcd-col {
  flex: 1 1 0;
}

/* Each column's list area scrolls independently */
.wcd-columns-mixed .wcd-list {
  max-height: clamp(160px, 28vh, 320px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.wcd-columns-mixed .wcd-list::-webkit-scrollbar { width: 3px; }
.wcd-columns-mixed .wcd-list::-webkit-scrollbar-track { background: transparent; }
.wcd-columns-mixed .wcd-list::-webkit-scrollbar-thumb { border-radius: 3px; }
.wcd-columns-mixed .wcd-list-win::-webkit-scrollbar-thumb { background: rgba(110,240,122,0.2); }
.wcd-columns-mixed .wcd-list-lose::-webkit-scrollbar-thumb { background: rgba(248,113,113,0.2); }

/* ── Section titles ── */
.wcd-section-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(11px, 0.88vw, 14px);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px clamp(6px, 0.5vw, 10px);
}

.wcd-win-title {
  color: #6ef07a;
}
.wcd-lose-title {
  color: #f87171;
}

/* ── List containers ── */
.wcd-list {
  border-radius: 12px;
  overflow: hidden;
}
.wcd-list-win {
  background: rgba(50, 200, 80, 0.06);
  border: 1px solid rgba(80, 220, 100, 0.15);
}
.wcd-list-lose {
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.15);
}

/* ── Rows ── */
.wcd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(7px, 0.65vw, 11px) clamp(10px, 1vw, 16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.wcd-row:last-of-type {
  border-bottom: none;
}

.wcd-row-name {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(12px, 0.95vw, 15px);
  color: #c0c0d8;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wcd-note {
  font-size: clamp(9px, 0.72vw, 11px);
  color: #8080a0;
  font-style: italic;
  white-space: nowrap;
}

.wcd-row-nums {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.4vw, 8px);
  flex-shrink: 0;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 0.95vw, 15px);
}

.wcd-bet {
  color: #8080a0;
}

.wcd-arrow {
  color: rgba(255,255,255,0.2);
  font-size: clamp(10px, 0.8vw, 13px);
}

.wcd-profit {
  color: #6ef07a;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(80, 240, 100, 0.3);
}

.wcd-loss {
  color: #f87171;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

/* ── Total rows (sticky at bottom of each list) ── */
.wcd-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(8px, 0.7vw, 12px) clamp(10px, 1vw, 16px);
  font-family: 'Oswald', sans-serif;
  font-size: clamp(11px, 0.88vw, 13px);
  font-weight: 700;
  letter-spacing: 1.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  bottom: 0;
}
.wcd-total-win {
  color: rgba(110, 240, 122, 0.7);
  background: rgba(50, 200, 80, 0.06);
}
.wcd-total-lose {
  color: rgba(248, 113, 113, 0.7);
  background: rgba(248, 113, 113, 0.06);
}

/* ── Net result (below columns row) ── */
.wcd-net {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(10px, 0.9vw, 14px) clamp(12px, 1.1vw, 18px);
  margin-top: clamp(10px, 0.8vw, 16px);
  background: rgba(212, 168, 67, 0.06);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 0.95vw, 15px);
  font-weight: 700;
  letter-spacing: 2px;
  color: #e8c46a;
}

/* ── Done button ── */
.wcd-btn-done {
  flex-shrink: 0;
  width: 100%;
  margin-top: clamp(12px, 1.1vw, 18px);
  padding: clamp(11px, 1vw, 16px) clamp(18px, 1.6vw, 28px);
  border-radius: 14px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(13px, 1.04vw, 17px);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(135deg, #d4a843, #b89030);
  border: 1px solid rgba(212, 168, 67, 0.5);
  color: #0a0a0f;
  box-shadow:
    0 6px 20px rgba(212, 168, 67, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.wcd-btn-done:hover {
  transform: scale(1.025);
  box-shadow: 0 8px 28px rgba(212, 168, 67, 0.42);
  background: linear-gradient(135deg, #e8c46a, #d4a843);
}
.wcd-btn-done:active {
  transform: scale(0.98);
  box-shadow: 0 3px 12px rgba(212, 168, 67, 0.2);
}

/* ── Mobile landscape ── */
@media (max-height: 520px) and (orientation: landscape) {
  .wcd-panel {
    max-height: 92vh;
    padding: clamp(12px, 1.5vw, 20px) clamp(14px, 1.8vw, 24px) clamp(10px, 1.2vw, 16px);
    border-radius: 16px;
    width: min(380px, 80vw);
  }
  /* In landscape, mixed panel can be wider since we have horizontal room */
  .wcd-panel-mixed {
    width: min(680px, 92vw);
  }
  .wcd-number {
    width: 36px;
    height: 36px;
    font-size: 20px;
    border-radius: 10px;
    margin-bottom: 4px;
  }
  .wcd-title { font-size: 13px; letter-spacing: 2px; }
  .wcd-subtitle { font-size: 10px; }
  .wcd-header { margin-bottom: 6px; }
  .wcd-section-title { font-size: 10px; padding-bottom: 4px; }
  .wcd-row { padding: 5px 8px; }
  .wcd-row-name { font-size: 11px; }
  .wcd-row-nums { font-size: 11px; }
  .wcd-total { padding: 6px 8px; font-size: 10px; }
  .wcd-net { padding: 7px 10px; font-size: 11px; margin-top: 6px; }
  .wcd-btn-done {
    margin-top: 8px;
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 10px;
  }
  .wcd-columns-mixed .wcd-list {
    max-height: clamp(100px, 22vh, 200px);
  }
}

/* ── Small portrait phones — stack columns vertically ── */
@media (max-width: 480px) and (orientation: portrait) {
  .wcd-panel {
    width: 96vw;
    padding: 16px 14px 14px;
    border-radius: 18px;
    max-height: 80vh;
  }
  /* Override: mixed panel also full-width on small portrait */
  .wcd-panel-mixed {
    width: 96vw;
  }
  /* Stack columns vertically on narrow portrait screens */
  .wcd-columns-mixed {
    flex-direction: column;
  }
  .wcd-columns-mixed .wcd-list {
    max-height: clamp(120px, 20vh, 200px);
  }
  .wcd-number {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .wcd-title { font-size: 14px; }
  .wcd-row { padding: 8px 10px; }
  .wcd-btn-done {
    padding: 13px 20px;
    font-size: 14px;
  }
}

/* ── Mid-size tablets portrait — stack if too narrow for two cols ── */
@media (min-width: 481px) and (max-width: 760px) {
  .wcd-panel-mixed {
    width: min(96vw, 700px);
  }
  /* If truly too narrow, stack */
  @supports (width: 1cqi) {
    /* Fallback for very narrow viewports */
  }
}

/* ═══════════════════════════════════════════════════════════
   FRACTIONAL PAYOUT WARNING ICON
   Yellow ⚠ badge on bet zones where floor rounding loses money
   ═══════════════════════════════════════════════════════════ */
.frac-warn {
  position: absolute;
  left: calc(50% - var(--bet-chip-size) / 2 - 3px);
  bottom: calc(50% - var(--bet-chip-size) / 2 - 3px);
  z-index: 50;
  width: clamp(12px, 0.9vw, 16px);
  height: clamp(12px, 0.9vw, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 42, 1);
  border: 1px solid rgba(240, 192, 64, 0.7);
  border-radius: 50%;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 6px rgba(240, 192, 64, 0.4);
}
.frac-warn svg {
  width: clamp(8px, 0.6vw, 11px);
  height: clamp(8px, 0.6vw, 11px);
  flex-shrink: 0;
}
@keyframes frac-warn-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
/* On touch devices, make it slightly larger for tap targets */
.touch-device .frac-warn {
  width: clamp(16px, 1.2vw, 22px);
  height: clamp(16px, 1.2vw, 22px);
}
.touch-device .frac-warn svg {
  width: clamp(10px, 0.8vw, 13px);
  height: clamp(10px, 0.8vw, 13px);
}

/* ══════════════════════════════════════════════════════════════
   VERY LONG PRESS TOOLTIP — bigger text mode
   Applied via .vlp-big class on #touch-zone-tooltip
   ══════════════════════════════════════════════════════════════ */
#touch-zone-tooltip.vlp-big {
  font-size: clamp(13px, 2.5vw, 18px) !important;
  padding: clamp(10px, 2vh, 16px) clamp(16px, 3vw, 28px) !important;
  max-width: 85vw !important;
  line-height: 1.35 !important;
  letter-spacing: 0.8px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,168,67,0.2) !important;
  white-space: normal !important;
  text-align: left !important;
}
/* Chip-tip sub-elements inside the mobile VLP tooltip */
#touch-zone-tooltip.vlp-big .ctip-bet {
  display: block; font-size: clamp(14px, 3vw, 20px); font-weight: 700;
  color: #f5c842; letter-spacing: 0.04em;
}
#touch-zone-tooltip.vlp-big .ctip-win {
  display: block; font-size: clamp(13px, 2.5vw, 18px); font-weight: 600;
  color: rgba(100,230,130,0.9); margin-top: 3px;
}
#touch-zone-tooltip.vlp-big .ctip-lock-wrap {
  display: block; margin-top: 6px; padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.15);
  white-space: normal; max-width: 80vw; line-height: 1.45;
}
#touch-zone-tooltip.vlp-big .ctip-lock-line {
  display: block; font-size: clamp(11px, 2.2vw, 15px); font-weight: 600;
  color: rgba(255,255,255,0.8);
}
#touch-zone-tooltip.vlp-big .ctip-lock-line:nth-child(2) {
  font-weight: 500; color: rgba(255,200,120,0.9); margin-top: 1px;
}
#touch-zone-tooltip.vlp-big .ctip-lock-note {
  display: block; font-size: clamp(10px, 2vw, 14px); font-weight: 400;
  color: rgba(255,255,255,0.45); font-style: italic; margin-top: 3px;
}
#touch-zone-tooltip.vlp-big .ctip-frac-wrap {
  display: block; margin-top: 6px; padding-top: 6px;
  border-top: 1px solid rgba(240,192,64,0.25);
  white-space: normal; max-width: 80vw; line-height: 1.45;
}
#touch-zone-tooltip.vlp-big .ctip-frac-detail {
  display: block; font-size: clamp(11px, 2.2vw, 15px); font-weight: 500;
  color: #f0c040;
}
#touch-zone-tooltip.vlp-big .ctip-frac-mode {
  display: block; font-size: clamp(11px, 2.2vw, 15px); font-weight: 400;
  color: rgba(180,160,200,0.85); font-style: italic; margin-top: 2px;
}
#touch-zone-tooltip.vlp-big .ctip-frac-fix {
  display: block; font-size: clamp(11px, 2.2vw, 15px); font-weight: 700;
  color: #fff; margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL: Prevent bet-chip clipping in ALL containers
   Any container that holds bet-zones must allow chips to overflow.
   ══════════════════════════════════════════════════════════════ */
.vt-cew-row,
.vt-cew,
.vt-horn-cell,
.vt-hw-grid,
.vt-hw,
.vt-side-row,
.vt-side-cell,
.vt-tab-panel,
.vt-hop-grid,
.vt-hop,
.vt-come-row,
.vt-come,
.vt-field-outer,
.vt-field,
.vt-pass-row,
.vt-pass,
.vt-bottom-bar,
.vt-bigsmall-row,
.vt-lowhigh-row,
.vt-big68-wrap,
.vt-big68-inner,
.vt-big68-zone,
.vt-num-bot,
.vt-come-strip,
.vt-dc-card,
.vt-dc-bar,
.vt-btn-dp,
.vt-btn-pass-odds,
.vt-btn-dp-odds,
.vt-lay,
.vt-num-main,
.vt-buy-btn,
.vt-buy-top,
.vt-place-btn,
.vt-ci {
  overflow: visible !important;
}


/* ═══════════════════════════════════════════════════════════
   EXIT MODAL
   (Moved from JS-injected style in game.js → openExitModal)
═══════════════════════════════════════════════════════════ */

#exit-modal-overlay {
  position: fixed; inset: 0; z-index: 11000;
  display: flex; align-items: center; justify-content: center;
}
.em-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  cursor: pointer;
}
.em-panel {
  position: relative; z-index: 1;
  background: linear-gradient(160deg, #1a1a2e 0%, #12121e 60%, #0e0e1a 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: clamp(24px,2.2vw,42px) clamp(22px,2vw,40px) clamp(18px,1.7vw,32px);
  width: min(400px, 92vw);
  text-align: center;
  box-shadow: 0 28px 80px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.04);
  opacity: 0; transform: translateY(14px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34,1.38,0.64,1);
}
#exit-modal-overlay.em-visible .em-panel {
  opacity: 1; transform: translateY(0) scale(1);
}
#exit-modal-overlay.em-hiding .em-panel {
  opacity: 0; transform: translateY(-8px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.em-icon {
  width: clamp(44px,4vw,58px); height: clamp(44px,4vw,58px);
  border-radius: 50%;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto clamp(10px,0.94vw,18px); color: #a8a8c0;
}
.em-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(18px,1.67vw,28px); font-weight: 700; letter-spacing: 4px;
  color: #f0f0f8; margin-bottom: clamp(8px,0.63vw,12px);
}
.em-body-text {
  font-family: 'DM Sans', sans-serif; font-size: clamp(13px,1.04vw,16px);
  color: #9090a8; line-height: 1.6;
  margin-bottom: clamp(4px,0.31vw,6px);
}
.em-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin: clamp(14px,1.25vw,22px) 0;
}
.em-section-label {
  font-family: 'Oswald', sans-serif; font-size: clamp(12px,0.94vw,15px);
  letter-spacing: 2px; color: #8888a0; text-transform: uppercase;
  margin-bottom: clamp(10px,0.94vw,16px);
}
.em-btn-group { display: flex; flex-direction: column; gap: clamp(8px,0.73vw,12px); }
.em-btn {
  width: 100%;
  padding: clamp(13px,1.15vw,20px) clamp(18px,1.67vw,30px);
  border-radius: 13px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(13px,1.04vw,16px); font-weight: 700; letter-spacing: 2.5px;
  cursor: pointer; transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.em-btn:active:not(:disabled) { transform: scale(0.97); }
.em-btn-ad {
  background: linear-gradient(135deg, #388e3c, #2e7d32);
  border: 1px solid rgba(76,175,80,0.45); color: #fff;
  box-shadow: 0 5px 18px rgba(56,142,60,0.3);
  width: 100%; margin-bottom: 0;
}
.em-btn-ad:hover:not(:disabled) { transform: scale(1.02); box-shadow: 0 7px 24px rgba(56,142,60,0.45); }
.em-btn-ad:disabled { opacity: 0.45; cursor: not-allowed; background: #232333; border-color: #35354a; color: #60607a; box-shadow: none; }
.em-btn-exit { background: transparent; border: 1px solid rgba(248,113,113,0.2); color: #c07070; }
.em-btn-exit:hover { border-color: rgba(248,113,113,0.4); color: #f87171; background: rgba(248,113,113,0.05); }
.em-btn-cancel { background: transparent; border: 1px solid rgba(255,255,255,0.06); color: #45455a; }
.em-btn-cancel:hover { border-color: rgba(255,255,255,0.14); color: #a8a8c0; }
.em-btn-close-app { background: transparent; border: 1px solid rgba(255,80,80,0.35); color: #ff5050; }
.em-btn-close-app:hover { border-color: rgba(255,80,80,0.6); color: #ff7070; background: rgba(255,80,80,0.08); }
.em-disclaimer {
  font-family: 'DM Sans', sans-serif; font-size: clamp(11px,0.83vw,13px);
  color: #9e9ec8; line-height: 1.6;
  margin-top: clamp(14px,1.25vw,22px);
  padding-top: clamp(10px,0.94vw,16px);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.em-disclaimer strong { color: #c8a84a; font-weight: 600; }
.em-ad-status {
  font-family: 'Oswald', sans-serif; font-size: clamp(9px,0.63vw,12px);
  letter-spacing: 1.5px; text-align: center;
  padding: clamp(5px,0.42vw,8px) 0; border-radius: 6px;
  margin-top: clamp(8px,0.73vw,12px);
}
.em-ad-status.success { color: #66bb6a; background: rgba(76,175,80,0.08); border: 1px solid rgba(76,175,80,0.2); }
.em-ad-status.error   { color: #ef9a9a; background: rgba(244,67,54,0.08);  border: 1px solid rgba(244,67,54,0.15); }
.em-ad-status.info    { color: #90caf9; background: rgba(33,150,243,0.08); border: 1px solid rgba(33,150,243,0.15); }

@media (max-height: 520px) and (orientation: landscape) {
  #exit-modal-overlay { align-items: center !important; justify-content: center !important; }
  .em-panel {
    max-height: 96vh !important; max-height: 96dvh !important;
    width: min(360px, 68vw) !important;
    padding: clamp(8px, 2vh, 14px) clamp(14px, 3vw, 22px) clamp(6px, 1.5vh, 12px) !important;
    border-radius: 14px !important; overflow-y: auto !important; margin: auto !important;
    -ms-overflow-style: none; scrollbar-width: none;
  }
  .em-panel::-webkit-scrollbar { display: none; }
  .em-icon { width: clamp(30px, 6vh, 40px) !important; height: clamp(30px, 6vh, 40px) !important; margin-bottom: clamp(4px, 1vh, 8px) !important; }
  .em-icon svg { width: 18px !important; height: 18px !important; }
  .em-title { font-size: clamp(13px, 3.5vh, 20px) !important; letter-spacing: 2.5px !important; margin-bottom: clamp(3px, 0.8vh, 6px) !important; }
  .em-body-text { font-size: clamp(10px, 2.2vw, 13px) !important; line-height: 1.4 !important; margin-bottom: 2px !important; }
  .em-divider { margin: clamp(4px, 1vh, 8px) 0 !important; }
  .em-section-label { font-size: clamp(9px, 2vw, 12px) !important; margin-bottom: clamp(4px, 1vh, 8px) !important; }
  .em-btn-group { gap: clamp(4px, 1vh, 7px) !important; }
  .em-btn { padding: clamp(6px, 1.5vh, 10px) clamp(10px, 2vw, 18px) !important; font-size: clamp(9px, 2.2vw, 13px) !important; border-radius: 9px !important; letter-spacing: 2px !important; }
  .em-btn-ad { padding: clamp(6px, 1.5vh, 10px) clamp(10px, 2vw, 18px) !important; font-size: clamp(9px, 2vw, 12px) !important; }
  .em-disclaimer { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════
   UTILITY KEYFRAMES
   (Moved from JS-injected style — used by ad spinner buttons)
═══════════════════════════════════════════════════════════ */

@keyframes spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════
   HTML ADS — AdSense top banner (desktop only)
   Active only when body has .html-ads-active class.
   On mobile, ads are handled by CrapsAds (interstitials +
   reward ads) — no HTML banner is injected.

   IMPORTANT: Visibility decisions are made in JS BEFORE the
   ad <ins> is injected. These rules ONLY style slots that
   exist in the DOM — they never hide a loaded ad, which
   would violate AdSense policy.
═══════════════════════════════════════════════════════════ */

/* ── Desktop: Top Banner (leaderboard) ── */
#ad-banner-top {
  width: 100%;
  min-height: 90px;
  max-height: 120px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(212, 168, 67, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  text-align: center;
  overflow: hidden;
  z-index: 5;
}

/* ── AdSense ins element reset ── */
.html-ad-slot ins {
  display: block;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════ */
/* BET TIMER BAR                                             */
/* ═══════════════════════════════════════════════════════════ */

.bet-timer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 100;
  pointer-events: none;
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.bet-timer-bar.hidden {
  visibility: hidden;
  opacity: 0;
}

.bet-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transform-origin: left center;
  transition: transform 50ms linear;
}

.bet-timer-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.bet-timer-fill.critical {
  background: linear-gradient(90deg, #ef4444, #f87171);
  animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* Timer-locked zones during "no more bets" window */
.timer-locked {
  pointer-events: none !important;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}



/* ── Hide ALL fixed game overlays when on setup screen ── */
/* Elements appended to document.body with position:fixed leak through
   screen transitions. This rule force-hides them when setup is active. */
body.on-setup #win-cascade-counter,
body.on-setup .win-tier-overlay,
body.on-setup .game-toast,
body.on-setup #dice-shooter-overlay,
body.on-setup .chip-fly,
body.on-setup .bet-timer-bar,
body.on-setup #win-flash,
body.on-setup #wc-detail-overlay,
body.on-setup #broke-overlay,
body.on-setup #exit-modal-overlay,
body.on-setup #settings-panel-overlay,
body.on-setup #stats-popup-overlay,
body.on-setup .dice-lab-backdrop {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ── Timer mode: dark/green roll button for ALL timer states ── */
/* DISABLED FOR TESTING — uncomment to restore green/black timer button style
#btn-roll.timer-active {
  background: #111 !important;
  border: 2px solid #4ade80 !important;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25) !important;
}

#btn-roll.timer-active .btn-roll-main {
  color: #4ade80 !important;
}
*/

/* Blinking animation only during PLACE YOUR BETS phase */
.timer-blink-green {
  animation: timerBlinkGreen 1.2s ease-in-out infinite;
}

@keyframes timerBlinkGreen {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ── Settings panel: hidden utility ── */
.sp-hidden {
  display: none !important;
}

/* ── Settings panel: timer duration buttons ── */
.sp-timer-dur-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sp-timer-dur-btn:hover {
  background: rgba(255,255,255,0.14);
}

.sp-timer-dur-btn.active {
  background: rgba(201, 169, 101, 0.25);
  color: #c9a965;
  border-color: #c9a965;
}

/* ═══════════════════════════════════════════════════════════ */
/* BROKE OVERLAY — "Out of Chips" modal                      */
/* ═══════════════════════════════════════════════════════════ */

#broke-overlay {
  position: fixed; inset: 0; z-index: 11500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.32s ease;
}
#broke-overlay.bk-visible { opacity: 1; }
#broke-overlay.bk-hiding { opacity: 0; transition-duration: 0.22s; }

.bk-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.80);
}

.bk-panel {
  position: relative; z-index: 1;
  background: linear-gradient(160deg, #1a1a2e 0%, #12121e 60%, #0e0e1a 100%);
  border: 1px solid rgba(212, 168, 67, 0.25);
  border-radius: 22px;
  width: min(440px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(24px, 2.5vw, 40px) clamp(22px, 2.2vw, 36px);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(212, 168, 67, 0.08);
  transform: scale(0.92); transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: none;
}
.bk-panel::-webkit-scrollbar { display: none; }
#broke-overlay.bk-visible .bk-panel { transform: scale(1); }
#broke-overlay.bk-hiding .bk-panel { transform: scale(0.92); }

.bk-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(220, 60, 60, 0.12);
  border: 1px solid rgba(220, 60, 60, 0.3);
  display: flex; align-items: center; justify-content: center;
  color: #ef4444;
}

.bk-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(20px, 1.8vw, 30px);
  font-weight: 700; letter-spacing: 3px;
  color: #ef4444;
  margin-bottom: 6px;
}

.bk-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(12px, 0.9vw, 15px);
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
}

.bk-divider {
  height: 1px; margin: 12px 0;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.2), transparent);
}

.bk-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin: 8px 0;
  text-align: left;
}

.bk-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 0;
}

.bk-stat-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(10px, 0.7vw, 12px);
  font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase;
  color: #8888a0;
}

.bk-stat-val {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(12px, 0.85vw, 15px);
  font-weight: 700;
  color: #f0f0f8;
}

.bk-stat-peak { color: #d4a843; }

/* Ad section (free build) */
.bk-ad-section {
  margin: 8px 0;
  text-align: center;
}

.bk-ad-label {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(10px, 0.7vw, 12px);
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
}

.bk-ad-status {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(10px, 0.7vw, 12px);
  color: #f59e0b;
  margin-top: 6px;
}

/* Buttons */
.bk-btn-group {
  display: flex; flex-direction: column;
  gap: 8px; margin-top: 4px;
}

.bk-btn {
  width: 100%;
  padding: clamp(10px, 0.9vw, 14px) 16px;
  border-radius: 12px; border: none;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(11px, 0.8vw, 14px);
  font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer; transition: all 0.2s;
}
.bk-btn:hover { transform: scale(1.02); }
.bk-btn:active { transform: scale(0.98); }
.bk-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.bk-btn-play-again {
  background: linear-gradient(135deg, #d4a843, #b89030);
  color: #0a0a0f;
  box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}
.bk-btn-play-again:hover { box-shadow: 0 6px 24px rgba(212, 168, 67, 0.45); }

.bk-btn-ad {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}
.bk-btn-ad:hover { box-shadow: 0 6px 24px rgba(34, 197, 94, 0.45); }

.bk-btn-stats {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 168, 67, 0.25);
  color: var(--gold);
}
.bk-btn-stats:hover { background: rgba(212, 168, 67, 0.12); }

.bk-btn-restart {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}
.bk-btn-restart:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.bk-btn-exit {
  background: transparent; border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: clamp(10px, 0.7vw, 12px);
  letter-spacing: 1.5px;
  padding: 6px 16px;
}
.bk-btn-exit:hover { color: rgba(255, 255, 255, 0.55); }

.bk-disclaimer {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(9px, 0.55vw, 11px);
  color: rgba(255, 255, 255, 0.25);
  margin-top: 14px; line-height: 1.4;
}
.bk-disclaimer strong { color: rgba(255, 255, 255, 0.4); font-weight: 600; }

/* Mobile landscape */
@media (max-height: 520px) and (orientation: landscape) {
  .bk-panel {
    padding: 14px 18px;
    max-height: 94vh;
    border-radius: 16px;
  }
  .bk-icon { width: 36px; height: 36px; margin-bottom: 8px; }
  .bk-icon svg { width: 18px; height: 18px; }
  .bk-title { font-size: 16px; margin-bottom: 4px; }
  .bk-subtitle { font-size: 11px; margin-bottom: 8px; }
  .bk-disclaimer { display: none; }
}
