:root {
  color-scheme:dark;
  font:16px/1.55 "Hiragino Sans","Yu Gothic UI","Segoe UI",system-ui,sans-serif;
  --bg:#15131c; --surface:#201d29; --raised:#302c3c; --line:#393544;
  --text:#f6f4fc; --sub:#b7b0c6; --accent:#c7b3ff; --action:#6950ba;
  background:var(--bg); color:var(--text);
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
.wrap { width:min(100%,1060px); margin:auto; padding-inline:clamp(14px,4vw,44px); }
.top { background:var(--surface); border-bottom:1px solid var(--line); }
nav,.title,.section-head,.address-row,.actions,.line { display:flex; align-items:center; gap:12px; justify-content:space-between; }
nav { min-height:60px; }
a { color:inherit; text-decoration:none; }
.brand { display:inline-flex; align-items:center; gap:9px; font-weight:750; }
.brand-mark { display:block; width:29px; height:29px; flex:none; }
.back { color:var(--sub); font-size:.9rem; padding:8px 0; }
.link { display:inline-block; text-decoration:underline; text-underline-offset:3px; color:var(--accent); margin-bottom:15px; }
main.wrap { padding-block:clamp(20px,4vw,44px); }
.title { margin-bottom:18px; }
h1,h2,h3,p,dl,dd,ul { margin:0; }
h1 { font-size:clamp(1.5rem,3.2vw,2.25rem); line-height:1.2; letter-spacing:-.025em; }
h2 { font-size:1.14rem; line-height:1.35; }
h3,label,.summary dt { font-size:.88rem; font-weight:700; }
.columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.panel { min-width:0; background:var(--surface); border:1px solid var(--line); padding:clamp(18px,3vw,26px); border-radius:12px; }
.balance { margin:14px 0 2px; line-height:1.15; overflow-wrap:anywhere; }
.balance strong { font-size:clamp(2.3rem,5vw,3.7rem); letter-spacing:-.055em; line-height:1; }
.balance span,.muted,.summary dt,.section-head span,.entry-detail,.entry-time { color:var(--sub); }
.muted,.entry-detail,.entry-time,.section-head span { font-size:.84rem; }
.panel>h2+.muted,.section-head+.muted { margin-top:16px; }
hr { border:0; border-top:1px solid var(--line); margin:23px 0 17px; }
.address-row { margin-top:6px; align-items:center; }
code { font:600 .9rem/1.6 ui-monospace,Consolas,monospace; overflow-wrap:anywhere; user-select:all; }
.address-row code { min-width:0; }
.quiet,.primary { min-height:41px; padding:8px 14px; border-radius:7px; font:inherit; font-size:.9rem; font-weight:700; white-space:nowrap; cursor:pointer; }
.quiet { background:var(--raised); color:var(--text); border:1px solid var(--line); }
.primary { background:var(--action); color:#fff; border:1px solid transparent; }
button:disabled { opacity:.5; cursor:default; }
@media(hover:hover) { button:enabled:hover { filter:brightness(1.12); } .back:hover { color:white; } }
:is(a,button,input,code):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
form { margin-top:16px; }
label { display:block; margin:14px 0 5px; }
input { width:100%; min-height:44px; background:var(--bg); color:var(--text); border:1px solid #50495f; border-radius:7px; padding:8px 12px; font:inherit; }
.amount-row { position:relative; }
.amount-row span { position:absolute; top:50%; right:14px; transform:translateY(-50%); color:var(--sub); pointer-events:none; }
.amount-row input { padding-right:43px; }
form .primary { width:100%; margin-top:18px; }
.summary { margin:18px 0; }
.summary dd { margin:2px 0 14px; }
.review-amount { font-size:1.35rem; font-weight:750; }
.actions { justify-content:flex-end; flex-wrap:wrap; }
.message { font-size:.88rem; overflow-wrap:anywhere; }
.message:not(:empty) { margin:12px 0 3px; }
#load-status:not(:empty) { margin:0 0 14px; }
.message[data-kind="error"] { color:#ffaf9f; }
.message[data-kind="success"],.credit { color:#71edb6; }
#demo-refill-panel {margin-top:12px;}
#demo-refill {color:#b9f4df;border-color:#407569;background:#203b37;}
#demo-refill:disabled {color:var(--sub);border-color:var(--line);background:var(--surface);opacity:.8;}
.entries { list-style:none; padding:0; margin-top:9px; }
.entries:empty,.muted:empty { display:none; }
.entries li { padding:13px 0; }
.entries li+li { border-top:1px solid var(--line); }
.entries li:last-child { padding-bottom:0; }
.line { gap:8px; flex-wrap:wrap; }
.line strong { font-size:.98rem; }
.entry-detail,.entry-time { margin-top:2px; overflow-wrap:anywhere; }
.entry-time { font-size:.77rem; }
.numeric,.balance,.line,.summary,.entry-detail { font-variant-numeric:tabular-nums; }
.account { background:linear-gradient(120deg,#332941,#24202d 84%); }
.account h2 { font-size:.92rem; color:#d5cde3; }
.account .balance { margin-bottom:9px; }
.account .address-row { align-items:center; background:#19161f; padding:9px 10px 9px 13px; border-radius:8px; gap:6px; }
.account .address-row .quiet { flex:none; }
.link-screen main { max-width:680px; }
.wager-rank { border-top:1px solid var(--line); margin-top:16px; padding-top:16px; }
.rank-line { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.rank-line h3,.wager-rank p { margin:0; }
.rank-line strong { color:var(--accent); }
.wager-rank p:not(:empty) { margin-top:6px; font-variant-numeric:tabular-nums; }
.wager-rank progress { width:100%; height:6px; margin:10px 0 0; accent-color:var(--accent); }
.wager-rank button { margin-top:10px; }
.wager-rank details { margin-top:12px; font-size:.84rem; }
.wager-rank summary { cursor:pointer; }
.rank-picker { display:flex; gap:10px; margin-top:10px; align-items:center; }
.rank-picker select { min-width:0; flex:1; padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--text); font:inherit; }
.wager-rank tr[aria-current="step"] { color:var(--accent); font-weight:700; }
.wager-rank table { width:100%; margin-top:8px; border-collapse:collapse; }
.wager-rank th,.wager-rank td { text-align:right; padding:4px 2px; font-variant-numeric:tabular-nums; }
.wager-rank th:first-child,.wager-rank td:first-child { text-align:left; }
.link-screen #state { color:var(--accent); font-weight:700; overflow-wrap:anywhere; }
.link-screen #signin p { margin:12px 0; }
.link-screen #pair { margin-top:20px; padding-top:8px; border-top:1px solid var(--line); }
.link-screen #command { display:block; padding:12px; background:var(--bg); border-radius:7px; margin:8px 0; }
.link-screen #logout { margin-top:14px; }
@media(max-width:680px) {
  .columns { grid-template-columns:minmax(0,1fr); gap:12px; }
  nav { min-height:54px; }
  .title { margin-bottom:14px; }
  .panel { padding:17px; }
  .balance { margin-top:10px; }
  hr { margin:17px 0 14px; }
}
