/* Layout: header, then chat sidebar (left) + main column. Ink-violet surfaces, one orange action
   color, emerald heads, gold tails. Flat panels, hairline borders, Inter with tabular numbers. */
:root {
  --bg: #0f0e15;
  --panel: #16151e;
  --panel-2: #1c1b26;
  --panel-3: #252331;
  --well: #121118;
  --line: #2a2837;
  --line-2: #3a3748;
  --ink: #edecf3;
  --text: #d5d3df;
  --muted: #9c99ab;
  --dim: #6c6979;
  --orange: #f5862b;
  --orange-hi: #ffa65e;
  --orange-lo: #d26a14;
  --heads: #34b873;
  --heads-lo: #1f7d4c;
  --tails: #e4b43e;
  --tails-lo: #a47d1f;
  --violet: #8f6ee6;
  --good: #3fcf8e;
  --bad: #ef7070;
  --r-lg: 14px;
  --r: 10px;
  --r-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { height: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100%; color: var(--ink); font: 500 14.5px/1.5 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(1100px 480px at 70% -12%, rgba(143, 110, 230, .07), transparent 60%), var(--bg);
  background-attachment: fixed;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--orange-hi); }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 14px; font-weight: 600; color: var(--muted); }
p { margin: 0; }
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-weight: 500; }
.dim { color: var(--dim); }
.center { text-align: center; }
.grow { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.t-heads { color: var(--heads); } .t-tails { color: var(--tails); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 9px 18px; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--orange); color: #1d0e00; transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover:not(:disabled) { background: var(--orange-hi); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-3); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; padding: 12px; }
.btn.armed { background: var(--heads); color: #03200f; }
.btn.armed:hover:not(:disabled) { background: #45c883; }
.link { background: none; border: 0; padding: 0; color: var(--orange-hi); cursor: pointer; font-weight: 600; font-size: 13px; }
.plain { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 6px; }
.plain:hover { color: var(--orange-hi); }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 20px; line-height: 1;
}
.icon-btn:hover { color: var(--ink); background: var(--panel-3); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- Form fields ---------- */
label.f { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; padding: 10px 13px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--well); color: var(--ink); font-weight: 500; font-size: 15px;
}
input::placeholder { color: var(--dim); }
input:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 134, 43, .14); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.msg { min-height: 1.2em; font-size: 13px; }
.msg.err { color: var(--bad); } .msg.ok { color: var(--good); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row.nowrap { flex-wrap: nowrap; align-items: center; }
.row > label.f { flex: 1 1 150px; }
.stack { display: grid; gap: 14px; }

/* ---------- Coins and tokens ---------- */
.chip { display: block; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
[data-chip] { display: inline-flex; }
/* The site's token: a plain orange coin with one engraved ring. */
.tok {
  display: inline-block; position: relative; width: 17px; height: 17px; border-radius: 50%; flex: none; vertical-align: -3px;
  background: radial-gradient(circle at 36% 30%, #ffc48c, var(--orange) 55%, #b9590e);
  box-shadow: inset 0 0 0 1px rgba(110, 45, 0, .45);
}
.tok::before { content: ""; position: absolute; inset: 21%; border-radius: 50%; border: 1px solid rgba(255, 238, 218, .7); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 20px;
  background: rgba(15, 14, 21, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo { position: relative; width: 38px; height: 26px; }
.logo > span { position: absolute; top: 1px; }
.logo > span:first-child { left: 0; z-index: 1; }
.logo > span:last-child { left: 13px; }
.wordmark { font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.wordmark b { color: var(--orange); font-weight: 700; }
.nav { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.nav a svg { width: 16px; height: 16px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
.acct { display: flex; align-items: center; gap: 8px; }
.bal { display: flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.testmode { font-size: 11.5px; font-weight: 600; color: var(--tails); border: 1px solid rgba(228, 180, 62, .4); border-radius: 999px; padding: 2px 9px; }
.menu-wrap { position: relative; }
.me-chip { display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; padding: 3px 8px 3px 3px; border-radius: 999px; font-weight: 600; }
.me-chip:hover { background: var(--panel-2); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; display: grid; padding: 5px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .7); }
.menu a, .menu button { text-align: left; padding: 9px 11px; border-radius: 6px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--panel-3); }
.chat-toggle, .chat-close { display: none; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; padding: 16px 20px 40px; max-width: 1600px; margin: 0 auto; }
main { min-width: 0; }
.view { display: grid; gap: 14px; align-content: start; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; padding: 4px 2px 0; }
.page-head p { margin-top: 4px; max-width: 60ch; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; align-content: start; }
.foot { font-size: 12px; padding: 0 4px; }

/* ---------- Chat ---------- */
.chat {
  position: sticky; top: 72px; height: calc(100dvh - 88px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.chat-head h2 { flex: 1; font-size: 16px; }
.online { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.online i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.msgs { flex: 1; overflow-y: auto; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.m { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.m-av { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.m-av .av { --s: 32px !important; }
.m-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: 1.3; font-size: 13.5px; }
.m-txt { color: var(--text); font-weight: 400; overflow-wrap: anywhere; margin-top: 1px; }
.m-mod { display: none; gap: 8px; margin-left: auto; }
.m:hover .m-mod { display: inline-flex; }
.m-sys { text-align: center; color: var(--dim); font-size: 12px; }
.composer { margin: 6px 12px 0; display: flex; align-items: center; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); padding: 3px 3px 3px 13px; }
.composer:focus-within { border-color: var(--orange); }
.composer input { flex: 1; border: 0; background: none; padding: 8px 0; box-shadow: none; min-width: 0; }
.composer input:focus { box-shadow: none; }
.composer button { width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.composer button:hover { color: var(--orange); }
.composer button svg { width: 18px; height: 18px; }
.chat-guest { padding: 6px 12px 0; }
.chat-err { padding: 4px 16px 0; }
.chat-icons { display: flex; gap: 6px; justify-content: center; padding: 10px 12px 12px; }

/* ---------- Names, avatars, badges ---------- */
.uname { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; font-weight: 600; color: #c4cbec; text-align: left; max-width: 100%; white-space: nowrap; }
.pl-name .uname, .fv-name .uname, .me-chip .uname { overflow: hidden; text-overflow: ellipsis; }
.uname:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; padding: 1px 6px; border-radius: 5px; white-space: nowrap; border: 1px solid; line-height: 1.5; }
.badge.owner { color: #ffb675; background: rgba(245, 134, 43, .12); border-color: rgba(245, 134, 43, .38); }
.badge.hr { color: #efcf78; background: rgba(228, 180, 62, .1); border-color: rgba(228, 180, 62, .32); }
.badge.whale { color: #93d6ec; background: rgba(80, 178, 220, .1); border-color: rgba(80, 178, 220, .3); }
.badge.admin { color: #f3a0a0; background: rgba(239, 112, 112, .1); border-color: rgba(239, 112, 112, .3); }

.av { --s: 40px; position: relative; isolation: isolate; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; border-radius: 50%; }
.av > img, .av > .init { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.av > .init { background: hsl(var(--h, 260) 24% 29%); color: hsl(var(--h, 260) 50% 86%); font-weight: 600; font-size: calc(var(--s) * .4); }
.av > .init.empty { background: transparent; border: 1.5px dashed var(--line-2); }
.av > img, .av > .init:not(.empty) { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Coinflip lobby ---------- */
.announce { position: relative; border-radius: var(--r-lg); padding: 16px 20px; border: 1px solid var(--line); background: var(--panel); }
.announce h3 { color: var(--ink); font-size: 16px; }
.announce p { margin-top: 3px; font-size: 14px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px; display: grid; gap: 2px; }
.tile b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.tile > span:not(.tok) { color: var(--muted); font-size: 13px; }
.games { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: grid; gap: 10px; }
.games-head { display: flex; align-items: center; gap: 12px; padding: 2px 6px; flex-wrap: wrap; }
.l100 { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.rows { display: grid; gap: 6px; }
.frow {
  display: grid; grid-template-columns: minmax(0, 1fr) 64px 130px minmax(170px, auto); align-items: center; gap: 16px;
  padding: 10px 16px; border-radius: var(--r); background: var(--panel-2); border: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.frow:hover { border-color: var(--line-2); }
.frow.pending { border-color: rgba(245, 134, 43, .4); }
.frow.done { background: transparent; border-color: var(--line); }
.duel { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pl { display: grid; justify-items: center; gap: 5px; width: 80px; transition: opacity .3s, filter .3s; }
.pl.win .av > img, .pl.win .av > .init { box-shadow: 0 0 0 2px var(--good), 0 0 16px -4px rgba(63, 207, 142, .6); animation: win-glow .6s ease-out; }
.pl-av { position: relative; }
.pl-chip { position: absolute; left: -5px; bottom: -3px; z-index: 2; }
.pl-name { max-width: 100%; font-size: 13px; display: flex; justify-content: center; min-width: 0; }
.slot { width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; opacity: .6; }
.vs { color: var(--dim); font-weight: 600; font-size: 12px; }
.fcenter { display: grid; place-items: center; }
.val { display: flex; align-items: center; justify-content: flex-end; gap: 7px; font-weight: 600; font-size: 17px; }
.act { display: flex; gap: 6px; justify-content: flex-end; }
.act [data-cancel-at]:disabled { font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 32px 12px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }

/* Countdown ring */
.ring { --s: 48px; position: relative; width: var(--s); height: var(--s); display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .trk { fill: none; stroke: rgba(245, 134, 43, .16); stroke-width: 6; }
.ring .bar { fill: none; stroke: var(--orange); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .12s linear; }
.ring b { position: relative; font-size: calc(var(--s) * .36); font-weight: 600; }

/* ---------- Jackpot ---------- */
.jp-stage { position: relative; display: grid; justify-items: center; gap: 18px; padding: 22px 16px 8px; }
.jp-wheel-wrap { position: relative; width: min(360px, 78vw); aspect-ratio: 1; }
.jp-rot { position: absolute; inset: 0; will-change: transform; }
.jp-wheel { width: 100%; height: 100%; display: block; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .4)); }
.jp-marks { position: absolute; inset: 0; pointer-events: none; }
.jp-mark { position: absolute; transform: translate(-50%, -50%); }
.jp-mark .av > img, .jp-mark .av > .init { box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
.jp-pointer { position: absolute; z-index: 2; top: -4px; left: 50%; transform: translateX(-50%); width: 0; height: 0;
  border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 19px solid var(--ink);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }
.jp-center { position: absolute; inset: 22%; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center;
  background: radial-gradient(circle at 50% 35%, #1b1a25, #0e0d13 75%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.jp-pot { display: flex; align-items: center; gap: 9px; font-size: clamp(26px, 5vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.jp-pot .tok { width: 24px; height: 24px; }
.jp-status { color: var(--muted); font-size: 13.5px; max-width: 180px; }
.jp-status b { color: var(--orange-hi); }
.jp-won { color: var(--good); font-weight: 600; }
.jp-actions { display: flex; gap: 8px; align-items: center; }
.jp-join { min-width: 150px; }
.jp-fair { width: min(760px, 100%); }
.jp-players { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.jp-card { --pc: var(--line); display: grid; justify-items: center; gap: 8px; padding: 16px 12px 14px; min-height: 160px; border-radius: var(--r);
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 10%, var(--panel-2)), var(--panel) 75%);
  border: 1px solid color-mix(in srgb, var(--pc) 22%, var(--line)); box-shadow: inset 0 2px 0 var(--pc); transition: opacity .4s, box-shadow .4s; }
.jp-card.empty { background: var(--panel); box-shadow: none; place-content: center; border-style: solid; border-color: var(--line); }
.jp-seat { width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .04); }
.jp-card.winner { box-shadow: inset 0 2px 0 var(--pc), 0 0 0 1.5px var(--good), 0 0 26px -8px rgba(63, 207, 142, .6); }
.jp-card.lose { opacity: .45; }
.jp-name { max-width: 100%; display: flex; justify-content: center; }
.jp-name .uname { overflow: hidden; text-overflow: ellipsis; }
.jp-amt { display: flex; align-items: center; gap: 6px; font-size: 14.5px; flex-wrap: wrap; justify-content: center; }
.jp-preview { display: grid; gap: 8px; }
.chance-bar { height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.chance-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--orange); transition: width .2s; }
.jp-hrow { grid-template-columns: auto minmax(0, 1fr) auto; }
.jp-ver { grid-column: 1 / -1; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(6, 5, 10, .72); backdrop-filter: blur(4px); overflow-y: auto; }
.sheet { position: relative; width: min(540px, 100%); grid-template-columns: minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 16px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .85); }
.sheet.narrow { width: min(420px, 100%); }
.sheet:focus { outline: none; }
.sheet.wide { width: min(860px, 100%); }
.x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: var(--r-sm); border: 0; background: var(--panel-3); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.x:hover { color: var(--ink); }

/* Create */
.amount { position: relative; }
.amount .tok { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; }
.amount input { padding-left: 44px; font-size: 20px; font-weight: 600; }
.quick { display: flex; gap: 6px; }
.chipbtn { flex: 1; padding: 7px 0; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; font-weight: 600; color: var(--muted); }
.chipbtn:hover { color: var(--ink); background: var(--panel-3); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-side { display: grid; justify-items: center; gap: 10px; padding: 16px 10px; border-radius: var(--r); cursor: pointer; background: var(--well); border: 1.5px solid var(--line); font-weight: 600; font-size: 15px; }
.pick-side.heads[aria-pressed="true"] { border-color: var(--heads); background: rgba(52, 184, 115, .07); color: #a3e3c0; }
.pick-side.tails[aria-pressed="true"] { border-color: var(--tails); background: rgba(228, 180, 62, .07); color: #f0d58f; }
.sumline { display: flex; justify-content: space-between; font-size: 14px; }
.sumline .win { color: var(--good); }

/* Flip view: wide, two players facing off, coin in the middle */
.sheet.flipview {
  width: min(1100px, 100%); min-height: min(620px, calc(100dvh - 32px)); padding: 24px 32px 20px; gap: 10px; align-content: start;
  background: radial-gradient(700px 320px at 50% -10%, rgba(143, 110, 230, .08), transparent 70%), var(--panel);
}
.fv-brand { display: flex; justify-content: center; align-items: center; gap: 10px; }
.fv-word { font-size: 24px; }
.fv-meta { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.fv-meta b { color: var(--ink); font-size: 15px; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.fv { display: grid; grid-template-columns: minmax(0, 1fr) 260px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
.fv-side { display: grid; justify-items: start; gap: 12px; min-width: 0; transition: opacity .4s; }
.fv-side.right { justify-items: end; text-align: right; }
.fv-av { position: relative; }
.fv-av .av > img, .fv-av .av > .init { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.fv-chip { position: absolute; left: -8px; bottom: -4px; z-index: 2; }
.fv-chip.faded { opacity: .45; }
.fv-empty { display: block; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.fv-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; max-width: 100%; }
.fv-side.right .fv-name { justify-content: flex-end; }
.fv-bar { width: min(100%, 340px); display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--r); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); transition: background .4s, border-color .4s; }
.fv-amt { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 600; }
.fv-call { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.fv-call.heads { color: #a3e3c0; } .fv-call.tails { color: #f0d58f; }
.fv-side.winner .av > img, .fv-side.winner .av > .init { box-shadow: 0 0 0 3px var(--good), 0 0 30px -6px rgba(63, 207, 142, .6); animation: win-glow .6s ease-out; }
@keyframes win-glow { from { box-shadow: 0 0 0 0 var(--good), 0 0 0 0 rgba(63, 207, 142, 0); } }
.stage { display: grid; place-items: center; min-height: 250px; perspective: 1000px; text-align: center; gap: 10px; align-content: center; }
.cd-label { color: var(--muted); font-size: 13px; }
.coin3d { width: 170px; height: 170px; position: relative; transform-style: preserve-3d; }
.coin3d .face { position: absolute; inset: 0; backface-visibility: hidden; display: grid; place-items: center; }
.coin3d .face.back { transform: rotateX(180deg); }
.coin3d .chip { filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .45)); }
.coin3d.row-coin { width: 52px; height: 52px; }
.coin3d.row-coin .chip { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.fcenter { perspective: 500px; }
.coin-shadow { width: 110px; height: 12px; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .5), transparent 70%); margin-top: -4px; }
.waiting { display: grid; gap: 12px; justify-items: center; max-width: 240px; }
.waiting .chip { opacity: .9; }
.fv-result { text-align: center; min-height: 58px; display: grid; gap: 2px; align-content: center; }
.verdict { font-size: 26px; font-weight: 700; }
.verdict.won { color: var(--good); } .verdict.lost { color: var(--bad); }
.fv-fairbtn { justify-self: center; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 14.5px; cursor: pointer; padding: 6px 10px; border-radius: var(--r-sm); }
.fv-fairbtn:hover { color: var(--ink); }
.fv-fairbtn svg { width: 18px; height: 18px; }
.fv-fair { background: var(--well); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 14px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.fairgrid { display: grid; gap: 8px; margin-top: 10px; font-size: 13px; }
.fairgrid div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; }
.fairgrid code { font-family: var(--mono); font-size: 12px; word-break: break-all; color: #cfcbe0; }
.frow[data-view] { cursor: pointer; }
.frow[data-view]:hover { background: #22212d; }

/* Deposit */
.addr { font-size: 14px !important; color: var(--ink); user-select: all; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.facts div { background: var(--well); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; display: grid; gap: 2px; }
.facts span { font-size: 12px; }
.facts b { font-size: 14px; }
.small { font-size: 13px; }
.mockbox { border-style: dashed; border-color: rgba(228, 180, 62, .4); }

/* History */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--well); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { padding: 6px 14px; border-radius: 6px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); }
.hist { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.hrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 13px; border-radius: var(--r); background: var(--panel-2); }
.hrow .vsline { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.hrow .r { text-align: right; display: grid; justify-items: end; }

/* Profile */
.pf-head { display: flex; gap: 18px; align-items: center; }
.pf-id { display: grid; gap: 10px; min-width: 0; }
.pf-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.stat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat4 div { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: grid; }
.stat4 b { font-size: 17px; font-weight: 600; }
.stat4 span { color: var(--muted); font-size: 12px; }
.ranks { display: grid; gap: 10px; }
.rank { display: grid; gap: 6px; }
.rank .top-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.pbar { height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.pbar.whale i { background: #50b2dc; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); }

/* Player card */
.uc { display: grid; justify-items: center; gap: 12px; padding-top: 6px; }
.uc .who { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; max-width: 100%; }
.uc .stat4 { grid-template-columns: repeat(2, 1fr); width: 100%; }
.shop-bal { display: grid; justify-items: end; }
.shop-bal b { font-size: 20px; display: flex; align-items: center; gap: 8px; }

/* ---------- Wallet ---------- */
.box { background: var(--well); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 6px; }
.box code { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.big-amt { font-size: 22px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.r { text-align: right; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--panel-3); color: var(--muted); white-space: nowrap; text-transform: capitalize; }
.pill.ok { background: rgba(63, 207, 142, .12); color: var(--good); }
.pill.pend { background: rgba(228, 180, 62, .12); color: var(--tails); }
.pill.bad { background: rgba(239, 112, 112, .12); color: var(--bad); }
.scroll { overflow-x: auto; max-height: 380px; overflow-y: auto; }

/* ---------- Fairness ---------- */
.prose ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text); }
.prose code, pre { font-family: var(--mono); font-size: 12.5px; background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-weight: 400; }
pre { padding: 12px; overflow-x: auto; margin: 0; }
.verify-out { display: grid; gap: 8px; }
.verify-out .line { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.rules { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 11px 16px; border-radius: var(--r); background: var(--panel-3); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .8); font-weight: 500; }
.toast.err { border-color: rgba(239, 112, 112, .55); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .frow { grid-template-columns: minmax(0, 1fr) 56px 110px auto; gap: 12px; padding: 10px 14px; }
  .pl { width: 72px; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; padding: 12px 12px 40px; }
  .chat { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; height: auto; width: min(340px, 92vw); border-radius: 0 var(--r-lg) var(--r-lg) 0; transform: translateX(-105%); transition: transform .25s ease; }
  body.chat-open .chat { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .6); }
  .chat-toggle, .chat-close { display: grid; }
  .two { grid-template-columns: 1fr; }
  .fv { grid-template-columns: 1fr 1fr; gap: 14px; }
  .fv .stage { grid-column: 1 / -1; grid-row: 1; min-height: 210px; }
  .sheet.flipview { padding: 22px 16px 16px; }
  .fv-av .av, .fv-av .fv-empty { --s: 88px !important; width: 88px; height: 88px; }
  .fv-chip svg { width: 32px; height: 32px; }
  .fv-bar { padding: 9px 12px; }
  .fv-amt { font-size: 15px; }
  .fv-name { font-size: 15px; }
  .facts { grid-template-columns: 1fr; }
  .jp-players { grid-auto-columns: 136px; }
  .jp-card { min-height: 146px; padding: 14px 8px; }
}
@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .nav { order: 5; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav a { flex: 1 0 auto; justify-content: center; padding: 7px 10px; font-size: 14px; }
  .wordmark { font-size: 20px; }
  .hide-sm, .testmode { display: none !important; }
  .acct { gap: 6px; margin-left: auto; }
  .acct .btn { padding: 7px 12px; font-size: 13.5px; }
  .bal { padding: 6px 10px; font-size: 14px; }
  .games-head { gap: 8px; padding: 2px; }
  .games-head > .muted { display: none; }
  .games-head .btn { padding: 7px 12px; font-size: 13.5px; }
  .announce { padding: 14px 16px; }
  .announce h3 { font-size: 15px; } .announce p { font-size: 13.5px; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tile { padding: 11px 12px; border-radius: var(--r); }
  .tile b { font-size: 17px; }
  .tile > span:not(.tok) { font-size: 12px; }
  .frow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "duel center" "val act"; row-gap: 10px; }
  .duel { grid-area: duel; gap: 8px; } .fcenter { grid-area: center; } .val { grid-area: val; justify-content: flex-start; font-size: 16px; } .act { grid-area: act; }
  .pl { width: 62px; }
  .pl .av { --s: 40px !important; }
  .slot { width: 40px; height: 40px; }
  .stat4 { grid-template-columns: repeat(2, 1fr); }
  .sheet { padding: 20px 16px; }
  .fairgrid div { grid-template-columns: 1fr; gap: 2px; }
}
.admin-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 480px) { .wordmark { display: none; } .top { row-gap: 8px; } }
@media (max-width: 480px) { .fv-brand .wordmark { display: inline; font-size: 22px; } }
@media (max-width: 480px) { .nav a svg { display: none; } .nav a { padding: 7px 8px; } }
.soon-bar { background: rgba(245, 134, 43, .1); border-bottom: 1px solid rgba(245, 134, 43, .3); color: #ffb675; text-align: center; font-size: 13px; font-weight: 600; padding: 7px 12px; }

/* ---------- Wallet: coin tiles, Solana banner, address box ---------- */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.net-pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: #b7e9de; background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .28); }
.net-dot { width: 6px; height: 6px; border-radius: 50%; background: #2dd4bf; }
.coin-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.coin-pick button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); cursor: pointer; text-align: left;
  background: var(--well); border: 1px solid var(--line); color: var(--ink); transition: border-color .15s, background .15s; }
.coin-pick button:hover { border-color: var(--line-2); background: #17161f; }
.coin-pick button[aria-pressed="true"] { border-color: var(--orange); background: rgba(245, 134, 43, .06); }
.coin-pick button:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 2px; }
.coin-pick b { display: block; font-size: 15px; font-weight: 600; line-height: 1.15; }
.coin-pick small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.coin-ico { flex: none; display: block; }
.net-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r);
  background: rgba(45, 212, 191, .05); border: 1px solid rgba(45, 212, 191, .2); }
.net-note p { margin: 0; font-size: 13px; color: var(--text); }
.net-badge { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; font-weight: 700; color: #e9fffb; background: #1f8a80; }
.addr-box { gap: 10px; }
.addr-top { display: flex; align-items: center; gap: 12px; }
.addr-top div { display: grid; }
.addr-top b { font-size: 16px; font-weight: 600; }
.dep-ico:empty { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-3); }
.addr-box .addr { padding: 10px 12px; border-radius: var(--r-sm); background: #0d0c12; border: 1px dashed var(--line-2); }
.addr-warn { margin: 0; padding: 8px 10px; border-radius: var(--r-sm); color: #f0d58f; background: rgba(228, 180, 62, .07); border: 1px solid rgba(228, 180, 62, .24); }
.dep-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.dep-steps li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--text); }
.dep-steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-size: 12px; font-weight: 600; color: var(--ink); background: var(--panel-3); border: 1px solid var(--line-2); }
@media (max-width: 480px) { .coin-pick { grid-template-columns: 1fr 1fr 1fr; } .coin-pick button { flex-direction: column; text-align: center; gap: 6px; padding: 10px 6px; } .coin-pick small { display: none; } }

.fee-note { font-size: 13px; padding: 8px 10px; border-radius: var(--r-sm); color: #ffcf9f; background: rgba(245, 134, 43, .07); border: 1px solid rgba(245, 134, 43, .26); }

/* ---------- Roulette ---------- */
.rl-announce { background: var(--panel); }
.rl-t-green { color: #5fd396; } .rl-t-yellow { color: #ecc860; } .rl-t-purple { color: #b39bf2; }
.rl-stage { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 14px; }
.rl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rl-recent { display: flex; gap: 5px; flex-wrap: wrap; min-height: 20px; align-items: center; }
.rl-counts { display: flex; gap: 14px; font-size: 13.5px; }
.rl-counts > span { display: inline-flex; align-items: center; gap: 6px; }
.rl-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; }
.rl-dot.sm { width: 10px; height: 10px; vertical-align: 0; }
.rl-dot.green { background: var(--heads); }
.rl-dot.yellow { background: var(--tails); }
.rl-dot.purple { background: var(--violet); }
.rl-recent .rl-dot { width: 14px; height: 14px; }
.rl-recent .rl-dot:first-child { outline: 1.5px solid rgba(255, 255, 255, .55); outline-offset: 2px; }

.rl-strip-wrap { position: relative; overflow: hidden; border-radius: var(--r); padding: 12px 0; background: #0d0c12; border: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.rl-strip { display: flex; gap: 8px; width: max-content; will-change: transform; }
/* Each slot is a chip coin (drawn in app.js) in its color, with the slot number in the middle. */
.rl-tile { width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative; }
.rl-tile .chip { width: 100%; height: 100%; filter: none; }
.rl-tile.win { animation: rl-win .45s ease-out forwards; z-index: 1; }
@keyframes rl-win { to { transform: scale(1.1); filter: drop-shadow(0 0 12px rgba(255, 255, 255, .35)); } }
.rl-marker { position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--orange-hi); }
.rl-marker::before, .rl-marker::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 7px solid transparent; }
.rl-marker::before { top: -1px; border-top-color: var(--orange-hi); }
.rl-marker::after { bottom: -1px; border-bottom-color: var(--orange-hi); }

.rl-timer { display: grid; gap: 8px; }
.rl-bar { height: 4px; border-radius: 99px; background: var(--well); overflow: hidden; }
.rl-bar i { display: block; height: 100%; background: var(--orange); transform-origin: left; transition: transform .1s linear; }
.rl-status { font-size: 14px; text-align: center; min-height: 1.4em; color: var(--text); }
.rl-landed { font-weight: 600; padding: 1px 9px; border-radius: 99px; }
.rl-landed.green { background: rgba(52, 184, 115, .16); color: #5fd396; } .rl-landed.yellow { background: rgba(228, 180, 62, .15); color: #ecc860; }
.rl-landed.purple { background: rgba(143, 110, 230, .18); color: #b9a3f4; }

.rl-bet { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.rl-amt { flex: 0 1 200px; }
.rl-amt-in { position: relative; display: block; }
.rl-amt-in .tok { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.rl-amt-in input { padding-left: 36px !important; width: 100%; }
.rl-quick { display: flex; gap: 5px; flex-wrap: wrap; flex: 1 1 auto; }
.rl-quick button { padding: 8px 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; }
.rl-quick button:hover { background: var(--panel-3); color: var(--ink); }
.rl-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.rl-hist table { width: 100%; }
.rl-hist .rl-vrow td { background: var(--well); }

.rl-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.rl-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: grid; gap: 10px; align-content: start; transition: opacity .3s, border-color .3s, box-shadow .3s; }
.rl-col.winner { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), 0 0 24px -8px rgba(63, 207, 142, .55); }
.rl-col.loser { opacity: .55; }
.rl-pick { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--r); cursor: pointer;
  color: #fff; font-size: 15px; font-weight: 600; text-align: left; transition: transform .1s, filter .15s; }
.rl-pick:hover:not(:disabled) { filter: brightness(1.07); }
.rl-pick:active:not(:disabled) { transform: translateY(1px); }
.rl-pick:disabled { filter: saturate(.5) brightness(.75); cursor: default; }
.rl-pick .rl-dot { width: 12px; height: 12px; background: rgba(255, 255, 255, .25); border: 1.5px solid rgba(255, 255, 255, .75); }
.rl-pick .rl-x { font-weight: 600; font-size: 13.5px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .18); }
.rl-col[data-color="green"] .rl-pick { background: #2f9d63; }
.rl-col[data-color="yellow"] .rl-pick { background: #d6a83a; color: #251a02; }
.rl-col[data-color="yellow"] .rl-pick .rl-dot { border-color: rgba(37, 26, 2, .6); background: rgba(37, 26, 2, .12); }
.rl-col[data-color="purple"] .rl-pick { background: #7f61d8; }
.rl-total { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; font-size: 14px; }
.rl-total > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.rl-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.rl-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px 9px; border-radius: var(--r-sm); background: var(--well); }
.rl-row.me { outline: 1px solid rgba(245, 134, 43, .5); }
.rl-row .rl-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rl-row .won { color: var(--good); } .rl-row .lost { color: var(--dim); text-decoration: line-through; }
@media (max-width: 980px) { .rl-cols { grid-template-columns: 1fr; } .rl-list { max-height: 220px; } }
@media (max-width: 480px) { .rl-tile { width: 56px; height: 56px; } .rl-tools { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .rl-tile.win { animation: none; outline: 2px solid #fff; outline-offset: 2px; } }

/* ---------- Levels, rewards, giveaways, tips ---------- */
.lvl { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 4px; transform: rotate(45deg); margin: 0 3px 0 2px; }
.lvl > b { transform: rotate(-45deg); font-size: 9px; font-weight: 700; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.lvl.l1 { background: linear-gradient(135deg, #c48b5c, #8b5a31); }
.lvl.l2 { background: linear-gradient(135deg, #cfd2da, #8a909c); } .lvl.l2 > b { color: #1c1f27; }
.lvl.l3 { background: linear-gradient(135deg, #e8c75c, #b08a26); } .lvl.l3 > b { color: #2c2104; }
.lvl.l4 { background: linear-gradient(135deg, #9fd5df, #4a9cad); } .lvl.l4 > b { color: #0d2a31; }
.lvl.l5 { background: linear-gradient(135deg, #ae9ff0, #6a5fd2); }
.lvl.l6 { background: linear-gradient(135deg, #3a3842, #141318); box-shadow: inset 0 0 0 1px #8a6ee0; }
.lvl.big { width: 38px; height: 38px; border-radius: 9px; } .lvl.big > b { font-size: 16px; }

.m-ev { text-align: center; font-size: 13px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); background: var(--well); border: 1px solid var(--line); }
.m-ev .uname { font-weight: 600; }
.m-ev .tok { margin-right: 3px; }
.m-ev.ev-tip { border-color: rgba(63, 207, 142, .3); background: rgba(63, 207, 142, .05); }
.m-ev.ev-giveaway_start, .m-ev.ev-giveaway_win, .m-ev.ev-race_win { border-color: rgba(245, 134, 43, .35); background: rgba(245, 134, 43, .06); }

.gw { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 10px 12px 2px; padding: 9px 10px 9px 12px; border-radius: var(--r);
  background: rgba(245, 134, 43, .08); border: 1px solid rgba(245, 134, 43, .35); animation: gw-in .4s ease-out; }
@keyframes gw-in { from { opacity: 0; transform: translateY(-6px); } }
.gw-ico { width: 22px; height: 22px; color: var(--orange-hi); }
.gw-txt { display: grid; line-height: 1.25; min-width: 0; }
.gw-title { font-weight: 600; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gw-prize { font-size: 12px; }
.gw-prize b { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.gw-side { display: grid; justify-items: end; gap: 4px; }
.gw-in { font-size: 12px; color: #ffcf9f; }
.gw-more { grid-column: 1 / -1; font-size: 11px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .gw { animation: none; } }
.rw-level { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); margin-top: 12px; }
.rw-level .lvl.big { margin: 6px; }
.rw-level div { display: grid; }
.rw-level b { font-size: 19px; }
.rw-prog { display: grid; gap: 6px; margin: 14px 0; }
.rw-claim { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r);
  background: rgba(245, 134, 43, .06); border: 1px solid rgba(245, 134, 43, .3); }
.rw-claim div { display: grid; }
.rw-claim b { font-size: 22px; display: inline-flex; align-items: center; gap: 6px; }
.rw-table { width: 100%; margin-top: 10px; font-size: 14px; }
.rw-table td { padding: 6px 4px; }
.rw-table tr.cur td { color: var(--orange-hi); font-weight: 600; }
.tip-box { width: 100%; display: grid; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); }
.tip-in { position: relative; flex: 1; }
.tip-in .tok { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.tip-in input { padding-left: 36px !important; width: 100%; }
.gw-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }

.rl-room { font-size: 12px; color: var(--muted); padding: 0 4px; min-height: 1.2em; }
.rl-room.full { color: var(--bad); }

.to-house { display: grid; gap: 6px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.to-house input { max-width: 180px; }

/* ---------- Coin toss ---------- */
.coin-wrap { position: relative; display: grid; place-items: center; z-index: 2; perspective: 1000px; }
.stage { position: relative; }
.fcenter { position: relative; }
.fv-side { position: relative; }
.fx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 1; }
.fx > i { position: absolute; left: 0; top: 0; display: block; border-radius: 50%; transform: translate(-50%, -50%); }
.fx-ring { width: calc(170px * var(--s)); height: calc(170px * var(--s)); border: 2px solid var(--c); opacity: 0; }
.ring.hurry b { color: var(--orange-hi); }
.ring.hurry .bar { stroke: var(--orange-hi); }
/* Soft landing */
.fx.soft .fx-glow { width: calc(200px * var(--s)); height: calc(200px * var(--s)); background: radial-gradient(circle, var(--c) 0%, transparent 62%);
  opacity: 0; animation: fx-glow 1.1s ease-out forwards; }
.fx.soft .fx-ring { border-width: 1.5px; box-shadow: none; animation: fx-ring-soft 1.2s cubic-bezier(.2,.6,.3,1) forwards; }
@keyframes fx-glow { 0% { opacity: .4; transform: translate(-50%, -50%) scale(.6); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }
@keyframes fx-ring-soft { 0% { opacity: .55; transform: translate(-50%, -50%) scale(.85); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); } }
@media (prefers-reduced-motion: reduce) {
  [class*="fx-"] { animation: none !important; }
  .fv-side.winner .av > img, .fv-side.winner .av > .init, .pl.win .av > img, .pl.win .av > .init { animation: none; }
}

.stat4 b.pos { color: var(--good); } .stat4 b.neg { color: var(--bad); }

/* ---------- Weekly race ---------- */
.race-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--r-lg);
  background: radial-gradient(520px 200px at 0% 0%, rgba(245, 134, 43, .1), transparent 70%), var(--panel); border: 1px solid var(--line); margin-bottom: 12px; }
.race-kicker { font-size: 13px; font-weight: 600; color: var(--orange-hi); }
.race-hero h1 { display: flex; align-items: center; gap: 10px; font-size: 32px; margin: 4px 0 6px; }
.race-hero h1 .tok { width: 26px; height: 26px; }
.race-pool-word { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.race-hero p { margin: 0; max-width: 560px; color: var(--muted); }
.race-timer { display: grid; justify-items: end; gap: 2px; }
.race-timer b { font-size: 22px; font-weight: 600; }
.race-prizes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.race-prize { display: grid; gap: 2px; padding: 10px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); min-width: 110px; }
.race-prize span { font-size: 12px; color: var(--muted); font-weight: 600; }
.race-prize b { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.race-prize.p1 { border-color: rgba(228, 180, 62, .45); } .race-prize.p2 { border-color: rgba(200, 205, 215, .32); } .race-prize.p3 { border-color: rgba(196, 139, 92, .45); }
.race-me { padding: 11px 16px; border-radius: var(--r); background: rgba(245, 134, 43, .06); border: 1px solid rgba(245, 134, 43, .28); margin-bottom: 12px; }
.race-table { width: 100%; }
.race-table td { padding: 9px 8px; vertical-align: middle; }
.race-rank { width: 46px; font-weight: 600; font-size: 14px; text-align: center; color: var(--muted); }
.race-who { display: inline-flex; align-items: center; gap: 8px; }
.race-table tr.me td { background: rgba(245, 134, 43, .06); }
.race-table tr.top1 td:last-child { color: #f0cd6e; } .race-table td .tok { vertical-align: -3px; }
.rk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--panel-3); }
.rk.rk1 { color: #f0cd6e; background: rgba(228, 180, 62, .14); box-shadow: inset 0 0 0 1px rgba(228, 180, 62, .5); }
.rk.rk2 { color: #d6dae3; background: rgba(200, 205, 215, .1); box-shadow: inset 0 0 0 1px rgba(200, 205, 215, .38); }
.rk.rk3 { color: #dca87e; background: rgba(196, 139, 92, .12); box-shadow: inset 0 0 0 1px rgba(196, 139, 92, .5); }
.race-last { display: grid; gap: 8px; }
.race-last-row { display: grid; grid-template-columns: 28px 26px 1fr auto auto; align-items: center; gap: 10px; }
@media (max-width: 720px) { .race-hero h1 { font-size: 26px; } .race-timer { justify-items: start; } .race-last-row { grid-template-columns: 24px 26px 1fr auto; } .race-last-row .muted { display: none; } }

/* ---------- Referrals (in Rewards) ---------- */
.rw-ref { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rw-ref h3 { font-size: 16px; color: var(--ink); }
.ref-link { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 12px; border-radius: var(--r-sm); background: #0d0c12; border: 1px dashed var(--line-2); }
.ref-link code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12.5px; line-height: 1.4; }
.ref-link .btn { flex: none; }
.ref-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ref-stats div { display: grid; padding: 10px 12px; border-radius: var(--r-sm); background: var(--well); border: 1px solid var(--line); }
.ref-stats b { font-size: 17px; } .ref-stats span { font-size: 12px; color: var(--muted); }
.small-claim b { font-size: 19px !important; }
#rewardsModal .sheet { width: min(500px, 100%); }
