/* AUREA Dice — page styles (patch #114).
   A felt-table card: two large CSS dice with pip faces, three pick
   buttons that print their range and multiplier, the standard
   meters / bet row / roll button. The result is always decided
   server-side first — the rolling animation here is staging. */

.dc-cardwrap { padding: 18px 16px 20px; }

.dc-stage {
  position: relative;
  margin: 4px auto 0;
  max-width: 560px;
  padding: 14px 14px 14px;
  /* Keep the whole stage clear of the sticky topbar (which wraps to
     ~150px tall on phones) when it is scrolled into view. */
  scroll-margin-top: 150px;
  border-radius: 22px;
  border: 1px solid rgba(255, 215, 0, .45);
  background:
    radial-gradient(ellipse 90% 42% at 50% -6%, rgba(138, 43, 226, .38), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 112%, rgba(255, 215, 0, .10), transparent 70%),
    linear-gradient(180deg, #14261C 0%, #0C1B26 52%, #0A0F1E 100%);
  box-shadow:
    0 0 0 1px rgba(138, 43, 226, .35),
    0 0 34px rgba(138, 43, 226, .20),
    0 18px 44px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 0 44px rgba(0, 0, 0, .45);
  text-align: center;
}
.dc-dealer {
  width: clamp(76px, 22vw, 118px); height: clamp(76px, 22vw, 118px);
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, .55);
  box-shadow: 0 0 22px rgba(255, 215, 0, .25);
  background: #0A0F1E;
}
.dc-dicebox {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 5vw, 22px);
  margin: 10px 0 4px;
}
.dc-die {
  /* Compact on phones (78px at 390px wide) so dealer + dice + sum +
     WIN all fit inside the stage below the sticky header. */
  width: clamp(64px, 20vw, 92px); height: clamp(64px, 20vw, 92px);
  border-radius: clamp(13px, 4.2vw, 18px);
  background: linear-gradient(145deg, #FFFFFF, #D9DEE9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5), inset 0 -6px 12px rgba(10, 15, 30, .18);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: clamp(9px, 2.6vw, 13px);
  box-sizing: border-box;
}
.dc-die .pip {
  width: clamp(11px, 3.6vw, 17px); height: clamp(11px, 3.6vw, 17px);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #3A4358, #0A0F1E 70%);
  align-self: center; justify-self: center;
  visibility: hidden;
}
.dc-die .pip.on { visibility: visible; }
.dc-die.win { box-shadow: 0 0 0 3px rgba(255, 215, 0, .9), 0 0 34px rgba(255, 215, 0, .55), 0 10px 24px rgba(0, 0, 0, .5); }
.dc-die.rolling { animation: dcShake .12s linear infinite; }
@keyframes dcShake {
  /* Small excursions only (<=4px / <=3deg): the dice stay fully
     inside the stage for the whole tumble. */
  0% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-4px); }
  100% { transform: rotate(-2deg) translateY(1px); }
}
.dc-sumline { color: #A7ACC2; font-weight: 700; letter-spacing: .12em; font-size: .8rem; }
.dc-sumline b { color: #FFE873; font-size: 1.5rem; margin-left: 6px; letter-spacing: 0; }
.dc-winbar {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 215, 0, .35);
}
.dc-win-k { color: #A7ACC2; font-size: .75rem; font-weight: 800; letter-spacing: .18em; }
.dc-win-v { color: #FFD700; font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dc-win-pt { color: #A7ACC2; font-weight: 700; }

.dc-picks {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 560px; margin: 14px auto 0;
}
.dc-pick {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px 10px;
  border-radius: 14px;
  border: 1px solid #39415F;
  background: var(--hatch-widget-surface, #121830);
  color: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.dc-pick:hover { border-color: rgba(255, 215, 0, .6); }
.dc-pick.on {
  border-color: #FFD700;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, .7), 0 0 18px rgba(255, 215, 0, .30);
  background: linear-gradient(180deg, rgba(255, 215, 0, .14), rgba(138, 43, 226, .12));
}
.dc-pick-name { font-weight: 800; font-size: 1.02rem; }
.dc-pick-range { color: #A7ACC2; font-size: .82rem; font-weight: 700; letter-spacing: .06em; }
.dc-pick-mult { color: #FFE873; font-weight: 800; font-size: 1.05rem; }

.dc-meters {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 560px; margin: 14px auto 0;
}
.dc-meter {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid #39415F;
  background: rgba(0, 0, 0, .25);
}
.dc-meter-k { color: #8B90A5; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.dc-meter-v { font-weight: 800; font-variant-numeric: tabular-nums; }

/* --- Earnings band (patch #117) ----------------------------------
   Under the meters: total / today / month net with an earned/used
   sub-line, plus peak-balance and biggest-win chips. Rendered only
   once rewards_earnings() answers — while patch #117 is unapplied
   the RPC 404s and the band simply never appears. */
.dc-earn { max-width: 560px; margin: 10px auto 0; }
.dc-earn-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dc-earn-col {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid #39415F;
  background: rgba(0, 0, 0, .25);
}
.dc-earn-k { color: #8B90A5; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.dc-earn-net { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dc-earn-net.pos { color: #FFD700; }
.dc-earn-net.neg { color: #FF7A6B; }
.dc-earn-sub { color: #8B90A5; font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dc-earn-recs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-earn-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, .45);
  background: rgba(255, 215, 0, .07);
  color: #FFE873;
  font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums;
}

.dc-betrow {
  display: flex; justify-content: center; gap: 10px;
  max-width: 560px; margin: 14px auto 0;
}
.dc-betbtn {
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid #39415F;
  background: transparent;
  color: inherit;
  font-weight: 800;
  cursor: pointer;
}
.dc-betbtn.on {
  border-color: #FFD700;
  color: #FFE873;
  box-shadow: 0 0 14px rgba(255, 215, 0, .30);
  background: rgba(255, 215, 0, .10);
}
.dc-rollbtn {
  display: block;
  width: 100%; max-width: 560px;
  margin: 16px auto 0;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #FFD700, #B388FF);
  color: #0A0F1E;
  font-size: 1.15rem; font-weight: 800; letter-spacing: .22em;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(255, 215, 0, .25);
}
.dc-rollbtn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.dc-autorow {
  display: flex; justify-content: center; align-items: stretch; gap: 8px;
  max-width: 560px; margin: 12px auto 0;
}
.dc-autocount {
  flex: 0 1 64px;
  padding: 9px 0;
  border-radius: 999px;
  border: 1px solid rgba(138, 43, 226, .5);
  background: rgba(255, 255, 255, .04);
  color: #C9CDDD;
  font-weight: 800;
  cursor: pointer;
}
.dc-autocount.on {
  color: #fff;
  background: linear-gradient(180deg, #A678FF, #8A2BE2);
  border-color: #C9A8FF;
  box-shadow: 0 0 14px rgba(138, 43, 226, .55);
}
.dc-autocount:disabled { opacity: .45; cursor: default; }
.dc-autobtn {
  flex: 1 1 auto;
  max-width: 170px;
  padding: 9px 0;
  border-radius: 999px;
  border: 1px solid rgba(138, 43, 226, .65);
  background: rgba(138, 43, 226, .14);
  color: #D9C2FF;
  font-weight: 800;
  letter-spacing: .12em;
  cursor: pointer;
}
.dc-autobtn.on {
  color: #fff;
  background: linear-gradient(180deg, #FF7A59, #E23A2E);
  border-color: #FFB3A3;
  box-shadow: 0 0 16px rgba(226, 58, 46, .55);
}
.dc-autobtn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.dc-autostat { text-align: center; min-height: 1.4em; margin: 8px auto 0; max-width: 560px; font-weight: 700; font-size: .9rem; color: #D9C2FF; }
.dc-status { text-align: center; min-height: 1.4em; margin: 10px auto 0; max-width: 560px; color: #A7ACC2; }
.dc-status.win { color: #FFE873; font-weight: 800; }

.dc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dc-table td, .dc-table th {
  padding: 8px 6px;
  border-bottom: 1px solid #39415F;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dc-table td:first-child, .dc-table th:first-child { text-align: left; font-weight: 700; }
.dc-table th { color: #8B90A5; font-size: .74rem; letter-spacing: .08em; }
.dc-rtp { color: #A7ACC2; font-size: .86rem; margin-top: 10px; }
.dc-how { padding-left: 20px; color: #A7ACC2; }
.dc-how li { margin: 6px 0; }
.dc-history { display: flex; flex-direction: column; gap: 6px; }
.dc-hist-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 7px 10px;
  border: 1px solid #39415F; border-radius: 10px;
  font-size: .88rem; font-variant-numeric: tabular-nums;
}
.dc-hist-row .win { color: #FFE873; font-weight: 800; }
.dc-hist-row .lose { color: #8B90A5; }
.dc-hist-empty { color: #8B90A5; font-size: .88rem; }

/* --- Result board (patch #123) — sic-bo style: the recent sums
   on a 6-row board, filled down each column then on to the next,
   oldest first; small = cool blue, big = warm red, seven = gold
   (the AUREA accent), the latest cell lit with a gold ring. --- */
.dc-road-wrap { margin: 4px 0 12px; }
.dc-road-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; margin-bottom: 6px;
  color: #A7ACC2; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
}
.dc-road-counts { font-variant-numeric: tabular-nums; font-weight: 600; }
.dc-road {
  display: grid;
  grid-template-rows: repeat(6, 25px);
  grid-auto-flow: column;
  grid-auto-columns: 25px;
  gap: 3px;
  overflow-x: auto;
  padding: 7px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid #39415F; border-radius: 10px;
}
.dc-cell {
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}
.dc-cell.cat-small { background: rgba(96, 165, 250, .16); border-color: rgba(96, 165, 250, .55); color: #8FC1FF; }
.dc-cell.cat-big { background: rgba(255, 107, 122, .14); border-color: rgba(255, 107, 122, .55); color: #FF8FA0; }
.dc-cell.cat-seven { background: rgba(245, 197, 66, .18); border-color: rgba(245, 197, 66, .65); color: #F5C542; }
.dc-cell.latest { box-shadow: 0 0 0 2px #F5C542, 0 0 10px rgba(245, 197, 66, .55); }

/* Dice / dealer sizing is clamp()-driven above (78px dice at a
   390px viewport), so no small-screen overrides are needed. */

/* --- Double-Up Challenge panel (patch #116) ---------------------
   Shown only after a win (or restored from dice_state.double on
   load). The single staging die reuses .dc-die wholesale — same
   clamp() sizing and small-excursion shake as the main dice, so
   the mobile sizing fix covers this panel too. */
.dc-double {
  max-width: 560px;
  margin: 16px auto 0;
  padding: 14px 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 215, 0, .65);
  background:
    radial-gradient(ellipse 90% 46% at 50% -8%, rgba(255, 215, 0, .16), transparent 70%),
    linear-gradient(180deg, rgba(138, 43, 226, .16), rgba(0, 0, 0, .35));
  box-shadow: 0 0 22px rgba(255, 215, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .06);
  text-align: center;
}
.dc-double-title {
  margin: 0;
  font-size: 1.05rem; font-weight: 800; letter-spacing: .1em;
  color: #FFE873;
}
.dc-double-step { margin: 4px 0 0; color: #A7ACC2; font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
.dc-double-amt {
  margin-top: 6px;
  color: #FFD700; font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.dc-double-rule { margin: 4px 0 0; color: #A7ACC2; font-size: .84rem; }
.dc-double-stage { display: flex; justify-content: center; margin: 12px 0 4px; }
.dc-double-result { min-height: 1.4em; margin: 6px 0 0; color: #A7ACC2; font-weight: 700; }
.dc-double-result.win { color: #FFE873; }
.dc-double-picks { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.dc-double-pick {
  flex: 1 1 0; max-width: 200px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid #39415F;
  background: var(--hatch-widget-surface, #121830);
  color: inherit;
  font-weight: 800; font-size: .98rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.dc-double-pick:hover { border-color: rgba(255, 215, 0, .6); }
.dc-double-pick:disabled { opacity: .45; cursor: not-allowed; }
.dc-double-stop {
  margin-top: 10px;
  padding: 10px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, .7);
  background: rgba(255, 215, 0, .10);
  color: #FFE873;
  font-weight: 800;
  cursor: pointer;
}
.dc-double-stop:disabled { opacity: .45; cursor: not-allowed; }

/* --- One-screen play layout (user order 2026-12-01) ---------------
   The controls now run stage -> picks -> bet row -> ROLL, with the
   meters and the earnings band BELOW the ROLL button (HTML order).
   On phones the stage is tightened so stage + picks + bet + ROLL
   fit a single iPhone screen (~660-750px tall) with no scrolling.
   Dice stay inside the clamp() bounds of the earlier sizing fix —
   this only trims them toward the compact end on small screens. */
@media (max-width: 520px) {
  .dc-cardwrap { padding: 12px 12px 16px; }
  .dc-cardwrap .sfx-row { margin-bottom: 6px; }
  .dc-stage { margin-top: 0; padding: 8px 10px; }
  .dc-dealer { width: 64px; height: 64px; }
  .dc-dicebox { margin: 6px 0 2px; gap: 14px; }
  .dc-die { width: clamp(60px, 18vw, 92px); height: clamp(60px, 18vw, 92px); }
  .dc-sumline b { font-size: 1.25rem; }
  .dc-winbar { margin-top: 6px; padding: 6px 10px; }
  .dc-win-v { font-size: 1.4rem; }
  .dc-picks { margin-top: 8px; gap: 8px; }
  .dc-pick { padding: 8px 4px; }
  .dc-betrow { margin-top: 8px; }
  .dc-betbtn { padding: 8px 20px; }
  .dc-rollbtn { margin-top: 10px; padding: 12px; }
  .dc-meters { margin-top: 12px; }
}

/* --- earnings band lux bump (2026-12-02): match the chicken band --- */
.dc-earn-col {
  padding: 13px 4px 11px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(10, 13, 26, .88), rgba(10, 13, 26, .88)) padding-box,
    linear-gradient(150deg, rgba(255, 215, 0, .5), rgba(138, 43, 226, .45)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 4px 12px rgba(0, 0, 0, .3);
}
.dc-earn-net { font-size: 1.35rem; }
.dc-earn-net.pos { text-shadow: 0 0 14px rgba(255, 215, 0, .35); }
.dc-earn-chip { font-size: .84rem; padding: 6px 14px; box-shadow: 0 0 10px rgba(255, 215, 0, .15); }

/* --- Progressive jackpot banner (patch #232) --- */
.dc-jp {
  margin: 0 0 14px;
  padding: 12px 16px 13px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 183, 0, .10), rgba(138, 43, 226, .10)), #070B18;
  border: 1px solid rgba(255, 183, 0, .55);
  box-shadow: 0 0 18px rgba(255, 183, 0, .18), inset 0 0 24px rgba(255, 183, 0, .05);
}
.dc-jp-head {
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.dc-jp-label {
  font-size: .78rem; font-weight: 800; letter-spacing: .22em; color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 183, 0, .6);
}
.dc-jp-amount {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 2.3rem; font-weight: 700; line-height: 1.15;
  color: #FFC933; text-shadow: 0 0 18px rgba(255, 176, 0, .8);
}
.dc-jp.live .dc-jp-amount { animation: dcJpPulse 2.6s ease-in-out infinite; }
@keyframes dcJpPulse {
  0%, 100% { text-shadow: 0 0 14px rgba(255, 176, 0, .65); }
  50% { text-shadow: 0 0 26px rgba(255, 176, 0, 1); }
}
.dc-jp-pt { font-size: 1rem; font-weight: 800; color: #B8860B; margin-left: 6px; }
.dc-jp-sub { margin: 4px 0 0; font-size: .82rem; color: #A7ACC2; }
.dc-jp-last { margin: 3px 0 0; font-size: .78rem; font-weight: 700; color: #FFD700; }

@media (prefers-reduced-motion: reduce) {
  .dc-jp.live .dc-jp-amount { animation: none; }
}
