/* WarmUp player portal. Light theme only. */
:root {
  --blue: #0057ff;
  --blue-lo: #0046cc;
  --blue-50: #ebf2ff;
  --yellow: #ffc629;
  --yellow-soft: #fff6d9;
  --bg: #f9fafc;
  --ink: #081f4a;
  --muted: #5a6886;
  --subtle: #8e9ab2;
  --line: #e4e9f2;
  --fill: #f1f4f9;
  --surface: #ffffff;
  --red: #d92d3a;
  --red-soft: #fdeced;
  --green: #0d8a5a;
  --green-soft: #e3f6ed;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --e-2: 0 2px 4px rgba(8, 31, 74, 0.04), 0 12px 28px -14px rgba(8, 31, 74, 0.16);
  --focus: 0 0 0 3px rgba(0, 87, 255, 0.28);
  --font: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h3, p { margin: 0; }
h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 4px 0 10px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1040px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
/* Same wordmark as WarmUp Scan: mark + "WarmUp" + blue product name. */
.brand { display: flex; align-items: center; gap: 7px; flex-shrink: 0; color: var(--ink); text-decoration: none; }
.brand-mark { display: block; height: 24px; width: auto; }
.brand-word, .brand-play { font-size: 20px; letter-spacing: -0.02em; line-height: 1; margin-top: 1px; }
.brand-word { font-weight: 700; color: var(--ink); }
.brand-play { font-weight: 500; color: var(--blue); margin-left: -2px; }
.chip-net { font-size: 12px; color: var(--muted); background: var(--fill); padding: 3px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.chip-net i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.who { margin-left: auto; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.who b { font-weight: 700; }
.who b.mono { font-size: 12.5px; }
.who .small-btn { padding: 3px 10px; font-size: 12.5px; }
.acct-label { margin-top: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
#app { display: grid; gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--e-2); }
.label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; display: block; line-height: 1.15; font-variation-settings: "opsz" 96; font-variant-numeric: tabular-nums; }

.onboard { max-width: 520px; margin: 40px auto; display: grid; gap: 12px; }
.onboard h1 { font-size: 22px; }

.wallet { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; align-items: start; }
.balance { display: grid; gap: 6px; align-content: start; }
#addr { word-break: break-all; font-size: 11.5px; }
.balance .big { font-size: 36px; }
.sub-bal { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.sub-bal b { color: var(--ink); }
.bridge { display: grid; gap: 12px; align-content: start; }
[data-bridge-pane] { display: grid; gap: 12px; }
.dep-addr { display: grid; gap: 6px; padding: 14px; border-radius: var(--r-md); background: var(--blue-50); }
.dep-addr .label { color: var(--blue-lo); }
.addr-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.addr-row code { font-size: 13.5px; font-weight: 500; word-break: break-all; flex: 1; min-width: 0; color: var(--ink); }
.small-btn { padding: 5px 12px; font-size: 13px; }
.wallet-actions { display: grid; gap: 6px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps > li { display: grid; gap: 8px; padding-left: 36px; position: relative; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 11.5px; top: 28px; bottom: -12px; width: 1px; background: var(--line); }
.steps b { font-size: 14.5px; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: grid; gap: 8px; }
input { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 9px 12px; min-width: 0; }
#wd-addr, #faucet-addr { flex: 1; width: 100%; min-width: 220px; }
#mm-amt, #wd-amt, #d-amt { width: 110px; }
#f-n { width: 80px; }
.unit { color: var(--muted); font-size: 13px; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 9px 16px; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: #c9d3e6; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-lo); }
.btn.ghost { padding: 9px 12px; min-width: 42px; }
.btn:disabled { opacity: 0.55; cursor: progress; }

.tabs { display: flex; gap: 4px; }
.tab { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--blue-50); color: var(--blue-lo); }
.game-tabs { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px; justify-self: start; box-shadow: var(--e-2); margin-top: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.game-tabs::-webkit-scrollbar { display: none; }
.game-tabs .tab { white-space: nowrap; flex: none; }
.game-tabs .short { display: none; }
.game-tabs .tab { padding: 9px 24px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.small-tabs .tab { padding: 6px 12px; font-size: 13px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list li { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 8px 10px; background: var(--fill); border-radius: var(--r-sm); flex-wrap: wrap; }
.list li .grow { flex: 1; }
.list.compact li { padding: 6px 10px; }
.list .empty, .list.compact .empty { color: var(--subtle); background: transparent; padding: 4px 0; }
.tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--muted); }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.wait { background: var(--yellow-soft); color: #9a6700; }
.tag.bad { background: var(--red-soft); color: var(--red); }

.game { display: grid; gap: 16px; }
.game > h3 { margin: 4px 0 -6px; }
.fomo-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px; border-radius: var(--r-md); background: linear-gradient(120deg, #0057ff 0%, #1f6bff 55%, #4c8dff 100%); color: #fff; }
.fomo-head .label, .fomo-head .muted { color: rgba(255, 255, 255, 0.82); }
.clock { font: 800 52px/1.05 var(--font); letter-spacing: -0.03em; font-variation-settings: "opsz" 96; font-variant-numeric: tabular-nums; }
.clock.hot { color: var(--yellow); }
.clock.idle { font-size: 32px; line-height: 1.5; letter-spacing: 0; }
.pot { text-align: right; display: grid; align-content: start; }
.pot .big { font-size: 34px; }
.stats, .odds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.odds { grid-template-columns: repeat(3, 1fr); }
.stats div, .odds div { background: var(--fill); border-radius: var(--r-sm); padding: 10px 12px; display: grid; align-content: start; gap: 2px; }
.stats span, .odds span { font-size: 12px; color: var(--muted); }
.stats b, .odds b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds b { white-space: normal; }
.buy { gap: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rules summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.rules ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.rules p { margin-top: 8px; }
.crash-stage { display: grid; gap: 4px; justify-items: center; padding: 26px 18px; border-radius: var(--r-md); background: linear-gradient(120deg, #0057ff 0%, #1f6bff 55%, #4c8dff 100%); color: #fff; transition: background 0.3s; }
.crash-stage .label, .crash-stage .small { color: rgba(255, 255, 255, 0.85); }
.crash-stage.crashed { background: linear-gradient(120deg, #c62a36 0%, #e0454f 100%); }
.crash-stage.flying .crash-mult { color: #fff; }
.crash-mult { font: 800 64px/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; font-variation-settings: "opsz" 96; }
.crash-history { display: flex; gap: 6px; flex-wrap: wrap; }
.crash-history a { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.crash-history a.hi { background: var(--green-soft); color: var(--green); }
.crash-history a.bad { background: var(--red-soft); color: var(--red); }
.crash-history .pend { font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); }
.crash-pick { min-height: 40px; }
.rps-make { display: grid; gap: 10px; }
.face.move { width: auto; padding: 0 16px; gap: 6px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; }
.face.move i { font-style: normal; font-size: 22px; }
.mini-moves { display: inline-flex; gap: 4px; }
.mini-moves button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 2px 8px; font-size: 16px; cursor: pointer; }
.mini-moves button:hover { border-color: var(--blue); }
.impl { border-top: 1px solid var(--line); padding-top: 14px; }
.impl summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); }
.login-methods { display: grid; gap: 10px; padding: 14px 20px; }
.login-methods summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.login-methods:not([open]) { gap: 0; }
.pk-name { gap: 6px; }
.pk-name input { flex: 1; min-width: 160px; }
.warn-note { margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--yellow-soft); color: #7a5200; font-size: 13px; }
.login-methods .list li .grow { min-width: 0; overflow-wrap: anywhere; }
.impl-body { margin-top: 10px; display: grid; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-2, #26385e); }
.impl-body h4 { margin: 8px 0 0; font-size: 13.5px; color: var(--ink); }
.impl-body p { margin: 0; }
.impl-body ol, .impl-body ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.impl-body code { font-family: var(--mono); font-size: 12px; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
.impl-body a.mono { font-size: 12px; word-break: break-all; }

.pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 52px; }
.face { width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-size: 26px; cursor: pointer; display: grid; place-items: center; }
.face.wide { width: auto; padding: 0 16px; font-size: 15px; font-weight: 700; }
.face.on { border-color: var(--blue); background: var(--blue-50); }
/* Roll-under slider: own track, filled up to the thumb (--p set from JS), round thumb. */
.pick input[type="range"] {
  --p: 50%;
  flex: 1; min-width: 200px; height: 32px; margin: 0; padding: 0; border: 0;
  background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.pick input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 999px;
  background: linear-gradient(to right, var(--blue) 0 var(--p), var(--fill) var(--p) 100%);
  box-shadow: inset 0 0 0 1px rgba(8, 31, 74, 0.06);
}
.pick input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: var(--fill); box-shadow: inset 0 0 0 1px rgba(8, 31, 74, 0.06); }
.pick input[type="range"]::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--blue); }
.pick input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin-top: -8px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue);
  box-shadow: 0 2px 6px rgba(0, 87, 255, 0.28), 0 1px 2px rgba(8, 31, 74, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pick input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue);
  box-shadow: 0 2px 6px rgba(0, 87, 255, 0.28), 0 1px 2px rgba(8, 31, 74, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pick input[type="range"]:hover::-webkit-slider-thumb,
.pick input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.pick input[type="range"]:hover::-moz-range-thumb,
.pick input[type="range"]:active::-moz-range-thumb { transform: scale(1.12); }
.pick input[type="range"]:focus-visible { box-shadow: none; }
.pick input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus), 0 2px 6px rgba(0, 87, 255, 0.28); }
.pick input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: var(--focus), 0 2px 6px rgba(0, 87, 255, 0.28); }
.pick .under { font-weight: 800; font-size: 20px; min-width: 110px; font-variant-numeric: tabular-nums; }
.result { border-radius: var(--r-md); padding: 16px; display: grid; gap: 6px; }
.result.win { background: var(--green-soft); }
.result.lose { background: var(--fill); }
.result .head { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 800; }
.result .roll { font-size: 40px; line-height: 1; }
.seed-box { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px dashed var(--line); }
.seed-box .small { word-break: break-all; }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; }
.checks li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 6px; }
.checks li.bad { color: var(--red); }
.checks li.bad::before { content: "✗"; color: var(--red); }
.alerts { display: grid; gap: 6px; }
.alerts .alert { padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; background: var(--red-soft); color: var(--red); }
.alerts .alert.ok { background: var(--fill); color: var(--muted); }
.result .proof { font-family: var(--mono); font-size: 11px; color: var(--muted); word-break: break-all; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; max-width: calc(100% - 32px); box-shadow: var(--e-2); z-index: 10; }
.toast.err { background: var(--red); }

@media (max-width: 760px) {
  .wallet, .two, .fomo-head { grid-template-columns: 1fr; }
  .pot { text-align: left; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .clock { font-size: 40px; }
  .odds b { font-size: 14.5px; }
  .game-tabs { justify-self: stretch; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(60px, 1fr); border-radius: 16px; } /* one row; scrolls if games outgrow it */
  .game-tabs:has(> .tab:nth-child(6)) { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); } /* 6+ games: rows of 3 */
  .game-tabs .tab { padding: 9px 4px; font-size: 14.5px; }
  .game-tabs .long { display: none; }
  .game-tabs .short { display: inline; }
  .crash-mult { font-size: 52px; }
  .chip-net { display: none; }
}

/* Plugin games: the shell holds a sandboxed iframe; the frame document reuses this stylesheet. */
.plugin-host iframe { display: block; width: 100%; height: 480px; border: 0; background: transparent; }
body.plugin-frame { background: transparent; margin: 0; padding: 2px 2px 10px; min-height: 0; }
body.plugin-frame > .card { margin: 0; }
/* emergency stop (admin 停用): shown on the game's tab pane */
.stop-banner { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 14px; line-height: 1.5; }
