body { margin: 0; background: #0b0b0f; color: #ececf1; font: 500 14px/1.4 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.ladder { width: 100%; max-width: 560px; box-sizing: border-box; padding: 12px 16px; display: grid; gap: 8px; margin: 0 auto; }
.facts { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: 13px; color: #9b9bab; font-variant-numeric: tabular-nums; }
.facts b { color: #ececf1; font-weight: 700; font-size: 14px; }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.startpick { display: inline-flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; min-width: 0; padding-bottom: 2px; scrollbar-width: thin; }
.startpick button { flex: 0 0 auto; width: 28px; height: 28px; border: 1px solid #3a3a46; border-radius: 7px; background: #141419; color: #9b9bab; font: inherit; font-weight: 700; cursor: pointer; }
.startpick button[aria-pressed="true"] { background: #7C3AED; border-color: #7C3AED; color: #fff; }
.startpick button:disabled { opacity: .45; cursor: default; }
.hint { flex: 1; min-width: 140px; font-size: 12px; color: #6d6d7f; }
.clear { height: 28px; padding: 0 10px; border: 1px solid #3a3a46; border-radius: 7px; background: transparent; color: #9b9bab; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.clear:disabled { opacity: .45; cursor: default; }
.boardwrap { background: radial-gradient(130% 110% at 50% 0%, #1a1633 0%, #12121c 55%, #0d0d13 100%); border: 1px solid #2c2c40; border-radius: 12px; padding: 8px; }
.rows { position: relative; height: 288px; }
.lrow { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: repeat(var(--lanes, 5), minmax(0, 1fr)); border-top: 1px dashed rgba(155,155,171,.14); box-sizing: border-box; }
.lrow:first-of-type { border-top: 0; }
.lrow.alt { background: rgba(124,58,237,.05); }
.lrow .cell { border-left: 1px solid rgba(155,155,171,.10); }
.lrow .cell:first-child { border-left: 0; }
.layer { position: absolute; inset: 0; }
.rung { position: absolute; height: 7px; border-radius: 4px; transform: translate(-50%, -50%); z-index: 2; }
.rung.player { background: linear-gradient(90deg, #a78bfa, #7C3AED); box-shadow: 0 0 10px rgba(124,58,237,.8), inset 0 1px 0 rgba(255,255,255,.35); }
.rung.ghost { background: linear-gradient(90deg, #5f5f78, #43435a); box-shadow: none; opacity: .85; }
.gap { position: absolute; width: min(26px, calc(92% / var(--lanes, 10))); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); border: 0; border-radius: 50%; background: transparent; cursor: pointer; z-index: 3; }
.gap:hover { background: rgba(124,58,237,.35); }
.busttile { position: absolute; width: 26px; height: 26px; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 8px; background: #b91c1c; color: #fff; font-weight: 800; z-index: 3; }
.token { position: absolute; width: 32px; height: 32px; transform: translate(-50%, -50%); z-index: 4; transition: left 120ms linear, top 120ms linear; pointer-events: none; }
.coin { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffedb0, #f7b733 55%, #c77400); box-shadow: inset 0 0 0 3px rgba(255, 244, 200, .55), inset 0 -5px 7px rgba(120, 53, 0, .45), 0 2px 8px rgba(0, 0, 0, .5), 0 0 16px rgba(245, 166, 35, .65); color: #8a4b00; font-size: 15px; font-weight: 900; line-height: 1; }
.token.win .coin { background: radial-gradient(circle at 35% 30%, #bbf7d0, #22c55e 55%, #15803d); color: #052e16; box-shadow: inset 0 0 0 3px rgba(220, 252, 231, .55), inset 0 -5px 7px rgba(4, 60, 30, .45), 0 2px 8px rgba(0, 0, 0, .5), 0 0 18px rgba(34, 197, 94, .85); }
.token.lose .coin { background: radial-gradient(circle at 35% 30%, #fecaca, #ef4444 55%, #991b1b); color: #450a0a; box-shadow: inset 0 0 0 3px rgba(254, 226, 226, .55), inset 0 -5px 7px rgba(69, 10, 10, .45), 0 2px 8px rgba(0, 0, 0, .5), 0 0 18px rgba(239, 68, 68, .85); }
@keyframes hop { 35% { transform: translateY(-4px) scale(1.12); } 70% { transform: translateY(1px) scale(.97); } }
.coin.hop { animation: hop 200ms ease-out; }
.vaults { display: grid; gap: 5px; container-type: inline-size; }
.vaults.dense { gap: 3px; }
.vaults.dense .vault { padding: 5px 0; }
.vault { text-align: center; padding: 7px 2px; border-radius: 8px; background: #1b1b22; border: 1px solid #26262f; font-weight: 700; font-size: clamp(7px, calc(30cqw / var(--vlanes, 10)), 13px); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.02em; overflow: hidden; }
/* Arcade tiers for the Plinko row: cool centre, hot edges, gold jackpots. */
.vault.t-min { background: linear-gradient(180deg, #1c2c52, #111c36); border-color: #2a4478; color: #a9c6ff; }
.vault.t-low { background: linear-gradient(180deg, #0f4c4c, #093030); border-color: #177777; color: #8ff5e6; }
.vault.t-mid { background: linear-gradient(180deg, #4c1d95, #2e1065); border-color: #6d28d9; color: #ddd0ff; }
.vault.t-high { background: linear-gradient(180deg, #9d1150, #5f0a31); border-color: #db2777; color: #ffc7de; }
.vault.t-hot { background: linear-gradient(180deg, #9a3412, #5c1d05); border-color: #ea580c; color: #ffd9b3; }
.vault.t-jack { background: linear-gradient(180deg, #a16207, #63400a); border-color: #f5a623; color: #ffeda6; animation: jackPulse 1.7s ease-in-out infinite; }
@keyframes jackPulse { 50% { box-shadow: 0 0 16px rgba(245, 166, 35, .9); } }
.vault.hit { background: #15803d; border-color: #22c55e; color: #fff; }
.vault.bust { background: #b91c1c; border-color: #ef4444; color: #fff; }
.trap { position: absolute; width: calc(96% / var(--lanes, 10)); min-width: 0; height: 20px; padding: 0 1px; box-sizing: border-box; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 6px; background: #26262f; border: 1px solid #3a3a46; color: #9b9bab; font-size: 10px; font-weight: 800; z-index: 2; }
.trap.bust { background: #b91c1c; border-color: #ef4444; color: #fff; }
.steps { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.stepchip { padding: 3px 7px; border-radius: 6px; background: #1b1b22; border: 1px solid #26262f; color: #6d6d7f; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepchip.done { color: #ececf1; border-color: #7C3AED; }
.stepchip.now { background: #7C3AED; color: #fff; border-color: #7C3AED; }
.stepchip.jackpot { border-color: #f5a623; color: #fbbf24; }
.stepchip.jackpot.done { background: #7d5410; color: #fff; }
.status { font-size: 13px; color: #9b9bab; text-align: center; min-height: 18px; }

/* Phone: the shell stacks the panel under the zone, so keep the whole page
   inside a short frame — compact rows and hide the hint. */
@media (max-width: 699px) {
  hb-game::part(zone) { min-height: 0; }
  hb-game::part(panel) { gap: 6px; padding: 8px 10px; }
  .ladder { padding: 6px 8px; gap: 4px; }
  .facts { display: none; }
  .hint { display: none; }
  .controls { gap: 6px; }
  .startpick button { width: 22px; height: 22px; }
  .clear { height: 22px; }
  .boardwrap { padding: 4px; }
  .rows { height: 78px; }
  .token { width: 19px; height: 19px; }
  .coin { font-size: 10px; box-shadow: inset 0 0 0 2px rgba(255, 244, 200, .55), inset 0 -3px 4px rgba(120, 53, 0, .45), 0 0 8px rgba(245, 166, 35, .6); }
  .rung { height: 3px; }
  .busttile { width: 14px; height: 14px; font-size: 9px; border-radius: 4px; }
  .gap { width: min(14px, calc(92% / var(--lanes, 10))); }
  .vault { padding: 3px 0; }
  .steps { display: none; }
  .trap { height: 13px; font-size: 8px; border-radius: 4px; }
  .status { font-size: 11px; min-height: 14px; }
}
