/* DICE — WXO header logo only; 3D UI icons elsewhere */
:root {
  --ink: #111111;
  --muted: #5b5b5b;
  --line: rgba(185, 28, 28, 0.14);
  --card: rgba(255, 255, 255, 0.92);
  --red: #ef3340;
  --red3: #d91e2b;
  --red-deep: #b91c1c;
  --ok: #16a34a;
  --ok-soft: #22c55e;
  --ok-bg: #e8f9ef;
  --err-bg: #fff1f3;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Rajdhani", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --max: 440px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff8f8;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(217, 30, 43, 0.18), transparent 58%),
    radial-gradient(700px 420px at 100% 4%, rgba(22, 163, 74, 0.10), transparent 52%),
    linear-gradient(165deg, #fff5f5 0%, #ffffff 42%, #f4faf6 100%);
}
.hidden { display: none !important; }

.top {
  position: sticky; top: 0; z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(8px + var(--safe-t)) max(10px, var(--safe-r)) 8px max(10px, var(--safe-l));
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand-logo { display: none; }
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: calc(36% - 4px);
}
.brand-text { min-width: 0; overflow: hidden; }
.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(0.92rem, 3.8vw, 1.12rem);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.eyebrow {
  margin: 0; font-size: .5rem; font-weight: 700; letter-spacing: .12em;
  color: var(--red3); text-transform: uppercase;
  line-height: 1.1;
}
.back {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  display: grid; place-items: center; text-decoration: none; color: var(--ink);
  background: #fff; font-weight: 700; flex: 0 0 auto;
}
.top-actions {
  display: flex; align-items: center; gap: 2px;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.bal-wrap {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  z-index: 25;
}
.bal-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 14px 8px 10px;
  background: #fff;
  max-width: min(62vw, 17rem);
  min-height: 52px;
  user-select: none;
  z-index: 2;
  font: inherit;
  color: inherit;
  cursor: default;
  width: 100%;
}
.bal-highlight {
  border: 1.5px solid var(--red3);
  background: linear-gradient(135deg, #fff7f7 0%, #ffffff 55%, #f3fff6 100%);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08), 0 6px 14px rgba(185, 28, 28, 0.07);
}
.bal-caret {
  display: inline-block;
  margin-left: 2px;
  font-size: .72em;
  opacity: .75;
}
.bal-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 40;
  min-width: 260px;
  width: max(100%, 260px);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(185, 28, 28, .14);
  background: linear-gradient(180deg, #fff, #fffafa);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .14);
}
.bal-opt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  margin: 0 0 3px;
  cursor: pointer;
}
.bal-opt:last-child { margin-bottom: 0; }
.bal-opt:hover, .bal-opt:focus-visible {
  background: #fff1f2;
  border-color: rgba(217, 30, 43, .2);
  outline: none;
}
.bal-opt.is-on {
  background: linear-gradient(180deg, #fff5f5, #ffe4e6);
  border-color: rgba(217, 30, 43, .28);
  color: var(--red-deep);
}
.bal-opt-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.bal-opt.is-on .bal-opt-label { color: var(--red3); }
.bal-opt-amt {
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bal-opt.is-on .bal-opt-amt { color: var(--red-deep); }
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ui-ico {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.18));
}
.bal-ico {
  width: 26px;
  height: 26px;
  border-radius: 0;
  object-fit: contain;
  flex: 0 0 auto;
}
.inline-ico {
  width: 15px;
  height: 15px;
  margin-right: 4px;
  vertical-align: -3px;
}
.cell-ico {
  width: 13px;
  height: 13px;
}
.play-ico {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
}
.panel-kicker .ui-ico {
  width: 15px;
  height: 15px;
}
.coin-tag .ui-ico {
  width: 14px;
  height: 14px;
}
.bal-copy { min-width: 0; overflow: hidden; }
.bal-label {
  display: block; font-size: .48rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700; line-height: 1.1;
}
.bal-highlight .bal-label { color: var(--red3); }
.bal-center strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.05rem, 4.2vw, 1.32rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bal-highlight strong { color: var(--red3); }
.bal-rate { display: none; }
.bal-sub {
  display: block;
  margin-top: 2px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill.ghost, .linkish {
  background: transparent; border: 0; color: var(--red3);
  font: inherit; font-weight: 700; font-size: .72rem; padding: 6px 6px; cursor: pointer;
}
.icon-pill {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line) !important;
  border-radius: 999px;
  padding: 6px 10px !important;
  background: #fff !important;
}
.pill.ghost[aria-pressed="false"] { color: var(--muted); }
.pill.ghost[aria-pressed="false"] .ico-sound { opacity: .55; }

.menu-wrap { position: relative; width: 40px; height: 40px; flex: 0 0 auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--red-deep);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.08);
}
.icon-btn:active { transform: scale(0.97); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: min(292px, calc(100vw - 28px));
  min-width: 248px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(185, 28, 28, .12);
  background: linear-gradient(180deg, #ffffff, #fffafa);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
}
.menu-label {
  padding: 4px 10px 8px; font-size: .58rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); font-weight: 800;
}
.menu-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  margin: 0 0 4px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}
.menu-item:last-child { margin-bottom: 0; }
.menu-item:hover, .menu-item:focus-visible {
  background: #fff7f7;
  border-color: rgba(217, 30, 43, .22);
  outline: none;
}
.menu-item.is-toggle {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}
.menu-ico {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #fff7ed, #fff1f2);
  border: 1px solid rgba(185, 28, 28, .08);
  color: #b45309;
  flex: 0 0 36px;
  font-weight: 900;
  font-size: .95rem;
}
.menu-ico.is-green { color: #15803d; background: linear-gradient(160deg, #ecfdf5, #f0fdf4); }
.menu-ico.is-red { color: #b91c1c; background: linear-gradient(160deg, #fff5f5, #fef2f2); }
.menu-copy { min-width: 0; display: grid; gap: 2px; }
.menu-title {
  font-size: .86rem; font-weight: 800; color: #111; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-desc {
  font-size: .68rem; font-weight: 600; color: #64748b; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-arrow {
  color: #94a3b8; font-weight: 800; font-size: .95rem; text-align: right;
}
.menu .tog-state {
  font-size: .68rem; letter-spacing: .06em; font-weight: 800;
  color: #15803d; min-width: 28px; text-align: right;
}
.menu .tog-state.off { color: var(--muted); }

.wrap {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 10px max(12px, var(--safe-r)) calc(20px + var(--safe-b)) max(12px, var(--safe-l));
  display: grid; gap: 8px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: 0 8px 22px rgba(185, 28, 28, .05);
  backdrop-filter: blur(6px);
}
.panel-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 8px;
  font-size: .62rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--red3);
}
.panel-kicker .ui-ico {
  width: 15px; height: 15px;
}
.sec-head h2 { display: inline-flex; align-items: center; }

@media (max-width: 380px) {
  .brand { max-width: 32%; gap: 5px; }
  .eyebrow { display: none; }
  .pill-txt { display: none; }
  .icon-pill { padding: 7px !important; }
  .bal-center { max-width: min(64vw, 14.5rem); padding: 7px 12px 7px 8px; min-height: 48px; }
  .bal-label { font-size: .42rem; }
}

@media (min-width: 480px) {
  .top { padding-left: 16px; padding-right: 16px; }
  .brand { max-width: none; }
  .bal-center { max-width: 18.5rem; }
}

.hero-slider { padding: 14px 12px 12px; }
.result-stage {
  position: relative;
  padding: 46px 2px 4px;
  margin-bottom: 12px;
  overflow: hidden;
}
.result-float {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  will-change: left;
  transition: left 0.55s cubic-bezier(.22, .8, .2, 1);
}
.result-float.is-rolling { transition: left 0.1s linear; }
.result-box {
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 11px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: .02em;
  line-height: 1;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  box-shadow: 0 6px 14px rgba(185, 28, 28, .1);
}
.result-box.rolling { border-color: var(--red3); }
.result-box.is-win {
  background: var(--ok); color: #fff; border-color: #15803d;
}
.result-box.is-loss {
  background: var(--red3); color: #fff; border-color: var(--red-deep);
}
.result-stem {
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #d1d5db;
  margin-top: -1px;
}
.result-box.rolling + .result-stem { border-top-color: var(--red3); }
.result-box.is-win + .result-stem { border-top-color: var(--ok); }
.result-box.is-loss + .result-stem { border-top-color: var(--red3); }

.tick-row {
  display: flex; justify-content: space-between;
  font-size: .74rem; font-weight: 700; color: var(--muted);
  margin-bottom: 12px; padding: 0 2px;
}
.slider-wrap { position: relative; height: 40px; }
.slider-track {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 16px; border-radius: 999px; overflow: hidden; display: flex;
  background: #eee;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.slider-seg { height: 100%; }
.slider-seg.is-win { background: var(--ok-soft); }
.slider-seg.is-lose { background: var(--red3); }
.chance-mark {
  position: absolute; top: 50%; width: 2px; height: 24px;
  background: rgba(0,0,0,.25); transform: translate(-50%, -50%);
  pointer-events: none; z-index: 1;
}
.result-dot {
  position: absolute; top: 50%; left: 50%;
  width: 20px; height: 20px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff; border: 3px solid #9ca3af;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  pointer-events: none; z-index: 3;
  transition: left 0.55s cubic-bezier(.22, .8, .2, 1), border-color .2s, background .2s;
}
.result-dot.is-rolling {
  transition: left 0.1s linear;
  border-color: var(--red3);
}
.result-dot.is-win { border-color: var(--ok); background: var(--ok-bg); }
.result-dot.is-loss { border-color: var(--red3); background: var(--err-bg); }
.slider-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  appearance: none; background: transparent; cursor: pointer; z-index: 4;
}
.slider-input::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--red3);
  box-shadow: 0 2px 6px rgba(185,28,28,.25);
  opacity: .85;
}
.slider-input::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--red3);
}
.slider-input::-webkit-slider-runnable-track { height: 16px; background: transparent; }
.slider-input::-moz-range-track { height: 16px; background: transparent; }

.dir-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dir {
  height: 36px; border-radius: 10px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .82rem;
  background: #f5f5f5; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.dir .dir-ico {
  width: 18px;
  height: 18px;
  vertical-align: 0;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.22));
}
.dir.on { background: var(--red3); color: #fff; }
.dir.on .dir-ico { filter: drop-shadow(0 1px 2px rgba(0,0,0,.28)); }

.trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.trio-cell { display: grid; gap: 4px; min-width: 0; }
.trio-cell span {
  font-size: .62rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.trio-cell input {
  width: 100%; height: 40px; border-radius: 10px;
  border: 1.5px solid var(--line); padding: 0 6px;
  font: inherit; font-weight: 800; font-size: .88rem;
  text-align: center; color: var(--ink); background: #fff; min-width: 0;
}

.play {
  width: 100%; height: 48px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ok); color: #fff;
  font: inherit; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 8px 18px rgba(22, 163, 74, .28);
}
.play:hover { background: #15803d; }
.play:active { transform: scale(.99); }
.play:disabled { opacity: .5; cursor: wait; box-shadow: none; }
#btnAutoStart.play {
  background: var(--red3);
  box-shadow: 0 8px 18px rgba(185, 28, 28, .22);
}
#btnAutoStart.play:hover { background: var(--red-deep); }

.field-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px;
}
.profit-head { margin-top: 10px; }
.amount-row {
  display: flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
}
.amount-row.compact { overflow: visible; }
.amount-row input {
  flex: 1; min-width: 0; height: 42px; border: 0; padding: 0 12px;
  font: inherit; font-weight: 800; font-size: 1rem; color: var(--ink); background: transparent;
}
.amount-row.readonly input { color: var(--ok); }
.coin-tag {
  padding: 0 12px; height: 42px; display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; color: var(--muted);
  border-left: 1px solid var(--line); background: #fafafa;
}
.inline-chip {
  height: 42px; min-width: 42px; border: 0; border-left: 1px solid var(--line);
  background: #fafafa; color: var(--red3); font: inherit; font-weight: 800; cursor: pointer; padding: 0 10px;
}
.qty-row { display: flex; gap: 6px; margin-top: 8px; }
.chip {
  flex: 1; height: 34px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--red3); font: inherit; font-weight: 800; cursor: pointer;
}
.chip:active { background: var(--err-bg); }

.mode-tabs {
  display: grid; grid-template-columns: 1fr 1fr 48px;
  border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
}
.mode-tab {
  height: 40px; border: 0; background: #fff; color: var(--muted);
  font: inherit; font-weight: 800; cursor: pointer;
  display: grid; place-items: center;
}
.mode-tab + .mode-tab { border-left: 1px solid var(--line); }
.mode-tab.on { background: var(--red3); color: #fff; }
.mode-tab.tab-chart { color: var(--muted); }
.mode-tab.tab-chart.on { background: #fff5f5; color: var(--red3); }

.sec-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.sec-head.tight { margin-bottom: 6px; }
.sec-head h2, .sec-head .h3 {
  margin: 0; font-family: var(--display); font-size: .98rem; font-weight: 800;
}
.sec-head .h3 { font-size: .9rem; }

.toggle-pill {
  min-width: 52px; height: 28px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #f5f5f5; color: var(--muted); font: inherit; font-weight: 800; font-size: .72rem;
  cursor: pointer; padding: 0 10px;
}
.toggle-pill[aria-pressed="true"] {
  background: var(--red3); color: #fff; border-color: var(--red3);
}

.seg-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px;
}
.seg-row .seg {
  height: 34px; border: 0; background: #fff; color: var(--muted);
  font: inherit; font-weight: 700; font-size: .75rem; cursor: pointer;
}
.seg-row .seg + .seg { border-left: 1px solid var(--line); }
.seg-row .seg.on { background: var(--red3); color: #fff; }
.seg-row .seg.on[data-man-on="win"],
.seg-row .seg.on[data-auto-on="win"] {
  background: var(--red3);
  box-shadow: inset 0 0 0 1px #b91c1c;
}
.seg-row .seg.on[data-man-on="loss"],
.seg-row .seg.on[data-auto-on="loss"] {
  background: #16a34a;
  box-shadow: inset 0 0 0 1px #15803d;
}
.seg-row .seg.on[data-loss-adj="inc"] {
  background: #16a34a;
  box-shadow: inset 0 0 0 1px #15803d;
}
.compound-on-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.compound-on-label {
  font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em;
}
.seg-loss-on {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 4.2rem; padding: 6px 12px; border-radius: 999px;
  background: #16a34a; color: #fff; font-weight: 800; font-size: .78rem;
  border: 1px solid #15803d; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.adj-grid { display: grid; gap: 8px; margin-bottom: 4px; }
.adj-label {
  display: block; font-size: .62rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
}
.adj-grid .seg-row { grid-template-columns: 1fr 1fr; }

.next-bet-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: #fafafa; border: 1px solid var(--line);
  font-size: .82rem; font-weight: 700; color: var(--muted);
}
.next-bet-row strong { color: var(--ink); font-size: .95rem; }

.field { display: grid; gap: 4px; margin-bottom: 8px; font-size: .74rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .verify-box input, .verify-box select, #clientSeed {
  width: 100%; height: 40px; border-radius: 10px; border: 1.5px solid var(--line);
  padding: 0 10px; font: inherit; font-weight: 700; color: var(--ink); background: #fff;
}
.check-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-weight: 700; font-size: .86rem; color: var(--ink);
}
.check-row.slim { font-size: .8rem; margin-top: -4px; }
.check-row input { accent-color: var(--red3); width: 16px; height: 16px; }
.auto-mode-row { margin-bottom: 8px; }
.auto-unlimited-label {
  margin: -2px 0 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--red3);
}
.compound-opts { display: grid; }

.adv-box {
  margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px;
  background: #fafafa;
}
.adv-box summary {
  cursor: pointer; font-weight: 800; font-size: .8rem; color: var(--muted);
  padding: 10px 0; list-style: none;
}
.adv-box summary::-webkit-details-marker { display: none; }
.adv-box[open] summary { color: var(--ink); }
.adv-box .field:last-child { margin-bottom: 10px; }

.auto-title { margin: 0 0 8px; font-family: var(--display); font-size: 1.05rem; font-weight: 800; }
.stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 8px;
}
.stat-grid div {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; background: #fafafa;
}
.stat-grid span { display: block; font-size: .58rem; color: var(--muted); text-transform: uppercase; }
.stat-grid strong { font-size: .88rem; font-weight: 800; }
.stop-btn {
  height: 44px; border-radius: 12px; cursor: pointer;
  background: #fff; color: var(--red3); border: 1.5px solid var(--red3);
  font: inherit; font-weight: 800; font-size: .92rem;
  padding: 0 14px;
}
.auto-ctrl-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: stretch;
  margin-top: 4px;
}
.auto-ctrl-row.is-paused {
  grid-template-columns: 1fr auto;
}
.auto-ctrl-row.is-finished {
  display: none;
}
.pause-btn, .resume-btn {
  height: 44px; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: .92rem;
  border: 1.5px solid var(--line);
}
.pause-btn {
  background: linear-gradient(180deg, #fff8e1, #fef3c7);
  color: #854d0e;
  border-color: rgba(212, 160, 23, .45);
}
.resume-btn {
  background: linear-gradient(180deg, #C62838, #991B1B);
  color: #fff;
  border-color: transparent;
}
.stop-btn.stop-side {
  min-width: 88px;
  background: #fff;
  color: var(--red3);
}
.hide-btn {
  width: 100%;
  margin-top: 8px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: .9rem;
  background: #fff;
  color: var(--muted);
  border: 1.5px dashed rgba(100, 116, 139, .45);
}
.hide-btn:hover {
  color: var(--red3);
  border-color: var(--red3);
  background: #fff5f5;
}
.result-sub { margin: 4px 0 8px; color: var(--muted); font-size: .78rem; }

/* Chart */
.live-bet-bar {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 6px;
  padding: 9px 10px;
  border: 1.5px solid var(--red3);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7f7 0%, #ffffff 55%, #f3fff7 100%);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08), 0 8px 18px rgba(185, 28, 28, 0.06);
}
.live-bet-cell {
  text-align: center;
  min-width: 0;
}
.live-bet-cell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cell-ico {
  width: 13px;
  height: 13px;
}
.live-bet-cell strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(0.85rem, 3.4vw, 1.05rem);
  font-weight: 800;
  color: var(--red3);
  line-height: 1.2;
  word-break: break-word;
  margin-top: 2px;
}
.coin-tag {
  padding: 0 10px; height: 42px; display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 800; color: var(--muted);
  border-left: 1px solid var(--line); background: #fafafa;
}
.coin-tag .ui-ico {
  width: 14px;
  height: 14px;
}
.play {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.play-ico {
  width: 20px;
  height: 20px;
}
.field-head span {
  display: inline-flex; align-items: center;
}
.tx-bet-amt {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.tx-dir {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #6b7280;
  background: #f3f4f6;
  vertical-align: middle;
}
.tx-change {
  display: inline-block;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tx-change.tx-up { color: var(--ok); }
.tx-change.tx-down { color: var(--red3); }
.tx-mult-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.tx-mult {
  font-weight: 700;
  font-size: .8rem;
  color: #4b5563;
}
.hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 4px 0 0; font-size: .72rem; font-weight: 600; color: var(--muted);
}
.hint .inline-ico { margin-right: 0; }
.auto-now-bet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid #86efac;
  background: #e8f9ef;
}
.auto-now-bet span {
  font-size: .72rem;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.auto-now-bet strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #166534;
}
.compound-mode-row {
  grid-template-columns: 1fr 1fr;
}
.compound-hint { margin: -2px 0 8px; line-height: 1.35; }
.seg-row .seg.on.is-loss-on,
.seg-row .seg.on[data-man-on="loss"],
.seg-row .seg.on[data-auto-on="loss"] {
  background: #16a34a;
  box-shadow: inset 0 0 0 1px #15803d;
}
.chart-panel {
  padding-bottom: 12px;
  order: 0;
}
.chart-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px;
}
.chart-stats div {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; background: #fafafa;
}
.chart-stats span {
  display: block; font-size: .56rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
}
.chart-stats strong { font-size: .9rem; font-weight: 800; }
.chart-stats strong.is-up { color: var(--ok); }
.chart-stats strong.is-down { color: var(--red3); }
.chart-wrap {
  position: relative; width: 100%; height: 160px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden;
  contain: layout paint;
}
.chart-wrap canvas { display: block; width: 100%; height: 100%; }
.chart-empty {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center;
  font-size: .8rem; font-weight: 600; pointer-events: none;
}
.chart-empty.hidden { display: none !important; }

.field-error {
  margin: 6px 0 0; font-size: .72rem; font-weight: 700; color: var(--red3);
}
.compound-only-loss {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}
.pill-loss {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.hist-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.hist-tabs button {
  border: 1px solid var(--line);
  background: #fafafa;
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.hist-tabs button.on {
  background: var(--red3);
  border-color: var(--red3);
  color: #fff;
}
.hist-day-label {
  margin: 0 0 8px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tx-list {
  /* Grow with content so the whole page scrolls */
  max-height: none;
  overflow: visible;
}
.tx-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.tx-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .76rem;
}
.tx-table .col-bet { width: 28%; }
.tx-table .col-res { width: 26%; }
.tx-table .col-mult { width: 14%; text-align: right; }
.tx-table .col-chg { width: 18%; text-align: right; }
.tx-table .col-time { width: 14%; text-align: right; }
.tx-table.tx-no-result .col-bet { width: 36%; }
.tx-table.tx-no-result .col-mult { width: 18%; }
.tx-table.tx-no-result .col-chg { width: 28%; }
.tx-table.tx-no-result .col-time { width: 18%; }
.tx-table thead th {
  text-align: left;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 8px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tx-table thead th.col-mult,
.tx-table thead th.col-chg,
.tx-table thead th.col-time { text-align: right; }
.tx-table tbody td {
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  font-weight: 700;
}
.tx-table tbody tr.is-win td { background: #f7fdf9; }
.tx-table tbody tr.is-loss td { background: #fff; }
.tx-table tbody tr:last-child td { border-bottom: 0; }
.tx-player { font-weight: 800; color: var(--ink); white-space: nowrap; }
.tx-bet {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-res-cell { white-space: nowrap; }
.tx-result {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  white-space: nowrap;
}
.tx-result .tx-pill {
  display: inline-block;
  min-width: 2.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  line-height: 1.2;
}
.tx-result.tx-win .tx-pill {
  color: #166534;
  background: #dcfce7;
}
.tx-result.tx-loss .tx-pill {
  color: #991b1b;
  background: #fee2e2;
}
.tx-result .tx-roll {
  font-size: .72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #6b7280;
}
.tx-win { color: var(--ok); }
.tx-loss { color: var(--red3); }
.tx-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
}
.tx-bal {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  font-size: .74rem;
}
.tx-time {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tx-list .muted { margin: 0; padding: 14px 0; text-align: center; font-weight: 600; }

.hint { margin: 2px 0 0; text-align: center; font-size: .66rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .76rem; }

.modal {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4);
  display: grid; place-items: end center; padding: 10px;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(440px, 100%); max-height: min(88vh, 720px); overflow: auto;
  background: #fff; border-radius: 16px; padding: 14px; border: 1px solid var(--line);
}
.fair-dl { margin: 8px 0; }
.fair-dl dt {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-top: 8px;
}
.fair-dl dd { margin: 3px 0 0; word-break: break-all; font-size: .78rem; font-weight: 600; }
.verify-box {
  margin-top: 12px; display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line);
}
.verify-box h3 { margin: 0; font-family: var(--display); font-size: .95rem; }
.v-out {
  margin: 0; padding: 10px; border-radius: 10px; background: #111; color: #f3f4f6;
  font-size: .68rem; white-space: pre-wrap; min-height: 40px;
}

@media (max-width: 360px) {
  .trio-cell input { font-size: .8rem; padding: 0 4px; }
  .mode-tabs { grid-template-columns: 1fr 1fr 42px; }
  .chart-stats strong { font-size: .8rem; }
}
@media (min-width: 768px) {
  .wrap { padding-top: 14px; gap: 10px; }
  .result-stage { padding-top: 50px; }
  .result-box { min-width: 78px; font-size: 1.28rem; }
  .chart-wrap { height: 180px; }
}

/* —— Promo banner carousel (visual only) —— */
.promo-carousel {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid #e11d48;
  background: #0a0a0a;
  position: relative;
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.22);
  touch-action: pan-y;
}
.promo-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s ease;
  will-change: transform;
}
.promo-slide {
  flex: 0 0 100%;
  width: 100%;
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 148px;
  max-height: 220px;
  overflow: hidden;
  background: #0a0a0a;
}
.promo-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}
.promo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 48%, rgba(180,10,20,.18) 100%);
  pointer-events: none;
}
.promo-slide-fill {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 220px at 88% 40%, rgba(225, 29, 72, 0.45), transparent 55%),
    linear-gradient(135deg, #0a0a0a 0%, #1a0a0c 55%, #2a0c10 100%);
}
.promo-copy {
  position: absolute;
  left: 14px;
  top: 12px;
  right: 42%;
  z-index: 2;
  color: #fff;
}
.promo-copy-center {
  right: 36%;
  top: 16px;
}
.promo-eyebrow {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.75);
}
.promo-title {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 5.2vw, 1.7rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
.promo-tag {
  margin: 6px 0 0;
  color: #ff3b3b;
  font-weight: 900;
  font-size: clamp(0.72rem, 2.8vw, 0.88rem);
  letter-spacing: 0.06em;
}
.promo-sub {
  margin: 6px 0 0;
  font-size: clamp(0.68rem, 2.5vw, 0.78rem);
  font-weight: 700;
  line-height: 1.25;
  color: rgba(255,255,255,0.92);
}
.promo-cta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.95);
  background: linear-gradient(180deg, #ff5a62 0%, #e31c23 45%, #a80e16 100%);
  color: #fff;
  font-weight: 900;
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.promo-cta:active { transform: scale(0.98); }

.promo-dice {
  position: absolute;
  right: 8%;
  top: 26%;
  width: clamp(52px, 16vw, 72px);
  height: clamp(52px, 16vw, 72px);
  z-index: 2;
  pointer-events: none;
  animation: promoDiceSpin 5.2s linear infinite, promoDiceFloat 3.2s ease-in-out infinite;
}
.promo-dice-alt { right: 10%; top: 30%; }
.promo-slide:not(.is-active) .promo-dice {
  animation-play-state: paused;
}
.promo-dice-face {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #e8e8e8;
  box-shadow: 0 0 18px rgba(225, 29, 72, 0.55), 0 6px 14px rgba(0,0,0,0.35);
  position: relative;
}
.promo-dice-face .pip {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e11d48;
}
.promo-dice-face .pip.tl { top: 16%; left: 16%; }
.promo-dice-face .pip.tr { top: 16%; right: 16%; }
.promo-dice-face .pip.c { top: 46%; left: 46%; }
.promo-dice-face .pip.bl { bottom: 16%; left: 16%; }
.promo-dice-face .pip.br { bottom: 16%; right: 16%; }

@keyframes promoDiceSpin {
  from { transform: rotate(-8deg); }
  to { transform: rotate(352deg); }
}
@keyframes promoDiceFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.promo-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
}
.promo-arrow,
.promo-dot {
  pointer-events: auto;
}
.promo-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.promo-dots { display: flex; gap: 6px; align-items: center; }
.promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
}
.promo-dot.is-on {
  width: 16px;
  background: #e31c23;
}

@media (max-width: 380px) {
  .promo-slide { min-height: 136px; max-height: 180px; }
  .promo-copy { right: 40%; }
  .promo-cta { min-height: 34px; font-size: 0.72rem; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-track { transition: none; }
  .promo-dice { animation: none !important; }
}

