/* Self-hosted fonts (SIL Open Font License — see /fonts/LICENSE-*.txt).
   Nothing is requested from Google, so visitors' IPs aren't shared with a third party. */
@font-face { font-family: 'Rubik'; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url('/fonts/rubik-latin-ext-wght-normal.woff2') format('woff2-variations'), url('/fonts/rubik-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url('/fonts/jetbrains-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 500;
  src: url('/fonts/jetbrains-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url('/fonts/rubik-latin-wght-normal.woff2') format('woff2-variations'), url('/fonts/rubik-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 500;
  src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #0a0a0c;
  --bg-raised: #151417;
  --bg-card: #1c1a1e;
  --line: #2d2a2f;
  --cherry: #ff0139;
  --cherry-deep: #a8001f;
  --gold: #d4af37;
  --chrome: #f4f4f6;
  --text: #f4f2f4;
  --text-dim: #a19ba0;
  --win: #3ecf8e;
  --lose: #ff0139;
  --radius: 10px;
  --font-display: 'Rubik', system-ui, sans-serif;
  --font-body: 'Rubik', system-ui, sans-serif;
  --font-mono: 'Rubik', system-ui, sans-serif; /* numbers: Rubik + tabular figures */
  --font-code: 'JetBrains Mono', ui-monospace, monospace; /* seed hashes only */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
a { text-decoration: none; }
button, .btn { text-decoration: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
nav.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(8px);
  gap: 16px;
  position: relative;
  z-index: 41;
  transition: margin-left 0.2s ease;
}
nav.top .nav-left { display: flex; align-items: center; gap: 10px; }
nav.top .nav-center { display: flex; justify-content: center; }
nav.top .nav-right { justify-self: end; display: flex; align-items: center; gap: 14px; }

@media (max-width: 720px) {
  nav.top { grid-template-columns: auto 1fr auto; padding: 10px 16px; }
  .logo img { height: 38px; }
}

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo img { height: 54px; width: auto; display: block; }

.hamburger-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}
.hamburger-btn:hover { border-color: var(--cherry); }
.hamburger-btn svg { width: 18px; height: 18px; }

.balance-pill-unused {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.balance-pill .cherries { color: var(--gold); }

/* ---- Buttons ---- */
button, .btn {
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.08s ease, filter 0.15s ease;
}
button:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cherry);
  color: white;
  border: 1px solid var(--cherry-deep);
  box-shadow: 0 2px 0 var(--cherry-deep);
}
.btn-primary:hover { background: #ff1a45; }
.btn-primary:active { transform: translateY(2px); box-shadow: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cherry); }

.btn-gold {
  background: var(--gold);
  color: #221805;
  border: 1px solid #6b4f14;
  box-shadow: 0 2px 0 #6b4f14;
}
.btn-gold:active { transform: translateY(2px); box-shadow: none; }

/* ---- Auth pages ---- */
.auth-shell { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-family: var(--font-display); font-size: 30px; margin: 0 0 6px; }
.auth-card p.sub { color: var(--text-dim); margin: 0 0 24px; font-size: 14px; }

.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }

label { display: block; font-size: 13px; color: var(--text-dim); margin: 16px 0 6px; }
label:first-of-type { margin-top: 0; }

input[type=text], input[type=email], input[type=password], input[type=number] {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}
input:focus { border-color: var(--cherry); }
.auth-card button[type=submit] { width: 100%; margin-top: 22px; }

.switch-link { margin-top: 18px; font-size: 14px; color: var(--text-dim); text-align: center; }
.switch-link a { color: var(--cherry); text-decoration: none; font-weight: 600; }

.msg { margin-top: 14px; font-size: 14px; padding: 10px 12px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.error { background: rgba(232, 56, 79, 0.12); color: #ff8b98; border: 1px solid rgba(232,56,79,0.3); }
.msg.success { background: rgba(62, 207, 142, 0.12); color: #7fe3b6; border: 1px solid rgba(62,207,142,0.3); }

/* ---- Dashboard-style stats ---- */
.hero { padding: 48px 0 32px; border-bottom: 1px solid var(--line); }
.hero h1 { font-family: var(--font-display); font-size: 34px; margin: 0 0 8px; }
.hero p { color: var(--text-dim); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 28px 0; }
.stat-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.stat-card .label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card .value { font-family: var(--font-mono); font-size: 26px; margin-top: 8px; }

.section-title { font-family: var(--font-display); font-size: 22px; margin: 36px 0 16px; }

/* ---- Old games-grid (still used on some pages) ---- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.game-tile {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 22px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
  position: relative; overflow: hidden;
}
.game-tile:hover { border-color: var(--cherry); transform: translateY(-2px); }
.game-tile .tile-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.game-tile .tile-name { font-weight: 700; font-size: 16px; }
.game-tile .tile-note { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.game-tile.disabled { opacity: 0.45; cursor: not-allowed; }
.game-tile .badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--bg-raised); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 999px; color: var(--text-dim);
}
.game-tile.locked::after { content: '🔒'; position: absolute; bottom: 14px; right: 14px; font-size: 14px; opacity: 0.6; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--text-dim); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
td.mono, th.mono { font-family: var(--font-mono); }
.win-tag { color: var(--win); font-weight: 700; }
.lose-tag { color: var(--lose); font-weight: 700; }

/* ---- Dice game ---- */
.dice-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; padding: 32px 0 60px; }
@media (max-width: 800px) { .dice-layout { grid-template-columns: 1fr; } }
.bet-panel { position: sticky; top: 90px; align-self: start; }
.roll-stage {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 32px;
  min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.roll-number { font-family: var(--font-mono); font-size: 56px; font-weight: 500; letter-spacing: -0.02em; }
.roll-number.win { color: var(--win); }
.roll-number.lose { color: var(--lose); }

.slider-track { width: 100%; height: 34px; border-radius: 8px; position: relative; background: var(--win); overflow: hidden; }
#targetFillLose, #targetFillWin { position: absolute; top: 0; bottom: 0; }
input[type=range] { width: 100%; margin: 10px 0; accent-color: var(--cherry); }

.toggle-row { display: flex; gap: 8px; margin-top: 8px; }
.toggle-row button { flex: 1; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text-dim); }
.toggle-row button.active { background: var(--cherry); color: white; border-color: var(--cherry); }

.stat-row { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; color: var(--text-dim); }
.stat-row span.val { color: var(--text); font-family: var(--font-mono); }

.seed-box {
  margin-top: 24px; font-family: var(--font-code); font-size: 12px; color: var(--text-dim);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; padding: 12px; word-break: break-all;
}
.seed-box a { color: var(--gold); cursor: pointer; text-decoration: underline; }

footer.legal { border-top: 1px solid var(--line); padding: 24px; text-align: center; color: var(--text-dim); font-size: 12px; line-height: 1.6; }

/* ---- Auth modal ---- */
body.blurred > *:not(.modal-backdrop):not(.toast-container) { filter: blur(6px); pointer-events: none; user-select: none; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 5, 7, 0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; opacity: 0; animation: modalFadeIn 0.18s ease forwards;
}
@keyframes modalFadeIn { to { opacity: 1; } }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 16px; padding: 34px 32px;
  width: 100%; max-width: 400px; position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 1, 57, 0.08);
  transform: translateY(6px); animation: modalRise 0.2s ease forwards;
}
@keyframes modalRise { to { transform: translateY(0); } }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--text-dim);
  font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.modal-close:hover { background: var(--cherry); border-color: var(--cherry); color: white; }
.modal-tabs { display: flex; gap: 4px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.modal-tab { flex: 1; text-align: center; padding: 9px 0; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--text-dim); background: transparent; border: none; cursor: pointer; }
.modal-tab.active { background: var(--cherry); color: white; }

/* ---- Activity feed ---- */
.activity-feed { display: flex; flex-direction: column; }
.activity-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.activity-row:last-child { border-bottom: none; }
.activity-left { display: flex; align-items: center; gap: 10px; }
.activity-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg-raised); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-dim); flex-shrink: 0;
}
.activity-user { font-weight: 600; }
.activity-game { color: var(--text-dim); font-size: 12.5px; }
.activity-amount { font-family: var(--font-mono); font-weight: 600; }

/* ---- Homepage hero (simplified, no promo images) ---- */
.home-hero { padding: 64px 0 48px; text-align: center; border-bottom: 1px solid var(--line); border-top: 3px solid var(--cherry); background: var(--bg); }
.home-hero p.tagline { color: var(--text-dim); font-size: 17px; max-width: 480px; margin: 0 auto 28px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.play-money-banner {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px;
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin-bottom: 24px;
}
.play-money-banner .dot-ind { width: 7px; height: 7px; border-radius: 50%; background: var(--win); }

.home-section { padding: 50px 0; border-bottom: 1px solid var(--line); }
.home-section h2 { font-family: var(--font-display); font-size: 26px; margin: 0 0 6px; }
.home-section .eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cherry); margin-bottom: 8px;
}
.home-section .eyebrow::before { content: '— '; color: var(--gold); }
.home-section p.section-sub { color: var(--text-dim); margin: 0 0 26px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.feature-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.feature-card .icon { font-size: 22px; margin-bottom: 10px; display: block; }
.feature-card h3 { margin: 0 0 6px; font-size: 15px; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }

/* ---- Badges / XP ---- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.badge-tile { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 16px 12px; text-align: center; }
.badge-tile.earned { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.badge-tile.locked { opacity: 0.4; }
.badge-tile .badge-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.badge-tile .badge-name { font-weight: 700; font-size: 13px; }
.badge-tile .badge-desc { color: var(--text-dim); font-size: 11px; margin-top: 4px; line-height: 1.4; }

.xp-bar-track { width: 100%; height: 12px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.xp-bar-fill { height: 100%; background: var(--cherry); border-radius: 999px; transition: width 0.4s ease; }

.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: none; }
.settings-row .label-block .title { font-weight: 600; font-size: 14px; }
.settings-row .label-block .sub { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }

.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: background 0.15s ease; }
.switch-track::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 50%; transform: translateY(-50%); background: var(--text-dim); border-radius: 50%; transition: all 0.15s ease; }
.switch input:checked + .switch-track { background: var(--cherry); border-color: var(--cherry); }
.switch input:checked + .switch-track::before { left: 23px; background: white; }

/* ---- Crypto ticker ---- */
.site-header { position: sticky; top: 0; z-index: 30; transition: margin-left 0.2s ease; }
.ticker-bar { display: flex; overflow: hidden; background: var(--bg-raised); border-bottom: 1px solid var(--line); white-space: nowrap; height: 38px; align-items: center; }
.ticker-track { display: flex; align-items: center; gap: 34px; padding-left: 24px; animation: tickerScroll 40s linear infinite; }
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-track.ticker-track-custom { animation-name: tickerScrollCustom; }
@keyframes tickerScrollCustom { from { transform: translateX(0); } to { transform: translateX(var(--ticker-shift, -50%)); } }
.ticker-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-family: var(--font-mono); }
.ticker-item img { width: 16px; height: 16px; border-radius: 50%; }
.ticker-item .sym { color: var(--text-dim); font-family: var(--font-body); font-weight: 600; }
.ticker-item .chg.up { color: var(--win); }
.ticker-item .chg.down { color: var(--lose); }
.ticker-skeleton { display: flex; align-items: center; gap: 34px; padding-left: 24px; }
.ticker-skel-item { display: flex; align-items: center; gap: 7px; }
.ticker-skel-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--line); animation: skelPulse 1.3s ease-in-out infinite; }
.ticker-skel-bar { width: 64px; height: 10px; border-radius: 4px; background: var(--line); animation: skelPulse 1.3s ease-in-out infinite; }
@keyframes skelPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.7; } }

/* ---- TOS / rules & generic legal-style page ---- */
.legal-doc { padding: 40px 0 60px; }
.legal-doc h1 { font-family: var(--font-display); font-size: 32px; margin: 0 0 8px; }
.legal-doc .updated { color: var(--text-dim); font-size: 13px; margin-bottom: 32px; }
.legal-doc h2 { font-family: var(--font-display); font-size: 20px; margin: 32px 0 10px; }
.legal-doc p, .legal-doc li { color: var(--text-dim); font-size: 14.5px; line-height: 1.7; }
.legal-doc ul { padding-left: 20px; }
.legal-doc strong { color: var(--text); }

/* ---- Global loading overlay ---- */
body.blurred-loading > *:not(.loader-overlay):not(.modal-backdrop):not(.toast-container) { filter: blur(6px); pointer-events: none; user-select: none; }
.loader-overlay {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  background: rgba(6, 5, 7, 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.loader-overlay.show { display: flex; }
.loader-ring-wrap { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.loader-ring { position: absolute; inset: 0; border-radius: 50%; border: 5px solid rgba(255, 1, 57, 0.18); border-top-color: var(--cherry); animation: loaderSpin 0.85s linear infinite; }
.loader-icon { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 1, 57, 0.35)); }
@keyframes loaderSpin { to { transform: rotate(360deg); } }

/* ---- Toast notifications ---- */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast {
  background: var(--bg-card); border: 1px solid var(--line); border-left: 3px solid var(--lose); border-radius: 10px;
  padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); animation: toastIn 0.2s ease;
}
.toast-success { border-left-color: var(--win); }
.toast-info { border-left-color: var(--gold); }
.toast-icon { flex-shrink: 0; font-size: 15px; line-height: 1.3; }
.toast-error .toast-icon { color: var(--lose); }
.toast-success .toast-icon { color: var(--win); }
.toast-info .toast-icon { color: var(--gold); }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close { background: transparent; border: none; color: var(--text-dim); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; flex-shrink: 0; }
.toast-close:hover { color: var(--text); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast.toast-out { animation: toastOut 0.2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---- Social rail ---- */
.social-rail { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 15; }
.social-rail a {
  width: 40px; height: 40px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social-rail a:hover { border-color: var(--cherry); color: var(--cherry); transform: translateX(2px); }
.social-rail svg { width: 19px; height: 19px; }
@media (max-width: 900px) { .social-rail { display: none; } }

/* ---- Account dropdown menu ---- */
#accountMenuMount { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 6px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px 5px 5px; cursor: pointer; }
.account-trigger:hover { border-color: var(--cherry); }
.account-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--cherry); border: 1px solid var(--cherry-deep);
  color: white; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono);
}
.account-avatar-lg { width: 38px; height: 38px; font-size: 13px; }
.account-chevron { color: var(--text-dim); }
.account-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 240px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); padding: 8px; z-index: 50; animation: accountPanelIn 0.14s ease;
}
@keyframes accountPanelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.account-panel-header { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-panel-name { font-weight: 700; font-size: 14px; }
.account-panel-email { color: var(--text-dim); font-size: 12px; margin-top: 1px; }
.account-panel-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px;
  background: transparent; border: none; color: var(--text); font-family: var(--font-body); font-size: 13.5px; text-align: left; cursor: pointer;
}
.account-panel-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-dim); }
.account-panel-item:hover { background: var(--bg-raised); }
.account-panel-item:hover svg { color: var(--cherry); }
.account-panel-divider { height: 1px; background: var(--line); margin: 6px 4px; }
.account-panel-logout:hover { background: rgba(255, 1, 57, 0.1); }
.account-panel-logout:hover svg { color: var(--lose); }

/* ---- Coinflip animation ---- */
.coin-scene { width: 140px; height: 140px; perspective: 700px; margin: 0 auto; }
.coin { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(0.34, 1.1, 0.4, 1); }
.coin-face {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden; font-family: var(--font-display); font-size: 52px; font-weight: 800;
  color: #221805; background: var(--gold); border: 3px solid #6b4f14;
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.5);
}
.coin-tails { transform: rotateY(180deg); }
.coin-edge { position: absolute; inset: 6px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.18); pointer-events: none; }

/* ---- Roulette wheel ---- */





/* ---- Plinko board ---- */

/* ---- Cookie banner ---- */
.cookie-banner {
  position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 640px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; z-index: 250; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); animation: toastIn 0.25s ease;
}
.cookie-banner.cookie-out { animation: toastOut 0.2s ease forwards; }
.cookie-icon { font-size: 22px; flex-shrink: 0; }
.cookie-text { flex: 1; font-size: 13.5px; color: var(--text-dim); }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-actions .btn { padding: 9px 16px; font-size: 13px; white-space: nowrap; }
@media (max-width: 620px) { .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; } }

/* ---- Social login buttons ---- */
.social-login-row { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.social-login-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-raised); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-dim); }
.social-login-btn:hover { border-color: var(--cherry); color: var(--text); }
.social-login-btn svg { width: 19px; height: 19px; }
.social-login-divider { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 12px; margin: 18px 0 14px; }
.social-login-divider::before, .social-login-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---- Category tabs ---- */
.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; }
.category-tab {
  display: flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text-dim); font-size: 13.5px; font-weight: 600;
  white-space: nowrap; text-decoration: none; flex-shrink: 0;
}
.category-tab:hover, .category-tab.active { color: var(--text); border-color: var(--cherry); }
.category-tab svg { width: 15px; height: 15px; }

/* ---- Game tile cards (image-based) ---- */
.tile-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.tile-card {
  flex: 0 0 auto; width: 150px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line);
  background: var(--bg-card); text-decoration: none; color: var(--text); position: relative; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tile-card:hover { transform: translateY(-3px); border-color: var(--cherry); }
.tile-card img { width: 100%; aspect-ratio: 424 / 594; object-fit: cover; display: block; }
.tile-card .tile-card-label { padding: 8px 10px; font-size: 12.5px; font-weight: 600; }
.tile-card.tile-soon { cursor: default; }
.tile-card.tile-soon img { filter: grayscale(0.5) brightness(0.6); }
.tile-card.tile-soon:hover { transform: none; border-color: var(--line); }
.tile-card .tile-soon-badge {
  position: absolute; top: 10px; right: 10px; background: rgba(10, 10, 12, 0.85); border: 1px solid var(--line);
  color: var(--text-dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px;
}
.category-section { margin-bottom: 36px; }
.category-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.category-section-head h2 { font-family: var(--font-display); font-size: 20px; margin: 0; }

/* ---- Larger tile cards for dedicated category pages ---- */
.tile-grid-large { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.tile-card-large {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  text-decoration: none; color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease; position: relative;
}
.tile-card-large:hover { transform: translateY(-3px); border-color: var(--cherry); }
.tile-card-large img { width: 100%; aspect-ratio: 424/594; object-fit: cover; display: block; }
.tile-card-large.tile-soon img { filter: grayscale(0.5) brightness(0.6); }
.tile-card-large .tile-card-body { padding: 14px 16px 18px; }
.tile-card-large .tile-card-body h3 { margin: 0 0 6px; font-size: 16px; font-family: var(--font-display); }
.tile-card-large .tile-card-body p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.tile-card-large .tile-soon-badge {
  position: absolute; top: 12px; right: 12px; background: rgba(10, 10, 12, 0.85); border: 1px solid var(--line);
  color: var(--text-dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px;
}

/* ---- Left sidebar (always-toggle, pushes header + content) ---- */
.site-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
  background: var(--bg-raised); border-right: 1px solid var(--line); overflow-y: auto;
  padding: 24px 12px; z-index: 45;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}
.site-sidebar.open { transform: translateX(0); }
.sidebar-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); padding: 16px 12px 6px; }
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  background: transparent; border: none; color: var(--text-dim); font-family: var(--font-body); font-size: 13.5px;
  font-weight: 500; text-align: left; cursor: pointer; text-decoration: none; width: 100%;
}
.sidebar-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-item:hover { background: var(--bg-card); color: var(--text); }
.sidebar-item.sidebar-placeholder { opacity: 0.75; }
.sidebar-soon { margin-left: auto; font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; background: var(--bg-card); border: 1px solid var(--line); color: var(--text-dim); padding: 2px 6px; border-radius: 999px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 44; }
.sidebar-overlay.show { display: block; }

.with-sidebar { margin-left: 0; transition: margin-left 0.2s ease; }
body.sidebar-open .site-header,
body.sidebar-open .with-sidebar {
  margin-left: 240px;
}
@media (max-width: 700px) {
  body.sidebar-open .site-header,
  body.sidebar-open .with-sidebar {
    margin-left: 0;
  }
  .site-sidebar { width: 82vw; max-width: 280px; }
}

h1, h2, h3, .section-title, .category-section-head h2 { font-weight: 700; letter-spacing: -0.01em; }

/* ---- Icon-only buttons ----
   The global 'button { padding: 12px 20px }' rule left 38-42px icon buttons
   with zero content width, which is why the hamburger and social-login
   icons rendered as empty circles. */
.hamburger-btn, .social-login-btn, .modal-close, .fav-btn, .slider-arrow, .chat-toggle, .chat-close, .account-trigger { padding: 0; }
.account-trigger { padding: 4px 10px 4px 4px; }
.hamburger-btn svg, .social-login-btn svg, .slider-arrow svg, .fav-btn svg, .chat-toggle svg { flex-shrink: 0; }
.social-login-btn svg { width: 20px; height: 20px; }

/* ---- Custom tile slider (replaces native scrollbar) ---- */
.tile-row { scrollbar-width: none; scroll-behavior: smooth; }
.tile-row::-webkit-scrollbar { display: none; }
.tile-scrollbar {
  position: relative; height: 6px; margin-top: 12px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.tile-scrollbar-thumb {
  position: absolute; top: -1px; left: 0; height: 6px; border-radius: 999px;
  background: var(--cherry); cursor: grab; transition: background 0.15s ease;
}
.tile-scrollbar-thumb:hover, .tile-scrollbar-thumb.dragging { background: #ff3a62; }
.tile-scrollbar-thumb.dragging { cursor: grabbing; }
.category-section-head { gap: 10px; }
.category-section-head h2 { margin-right: auto; }
.slider-arrows { display: flex; gap: 6px; }
.slider-arrow {
  width: 34px; height: 34px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--line);
  color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.slider-arrow:hover:not(:disabled) { border-color: var(--cherry); color: var(--cherry); }
.slider-arrow:disabled { opacity: 0.35; cursor: default; }
.slider-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Favourite hearts ---- */
.fav-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.8); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.fav-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; display: block; }
.fav-btn:hover { color: var(--cherry); border-color: var(--cherry); }
.fav-btn.active { color: var(--cherry); border-color: var(--cherry); }
.fav-btn.active svg { fill: var(--cherry); }
.fav-btn:active { transform: scale(0.9); }
.tile-card > .fav-btn, .tile-card-large > .fav-btn { position: absolute; top: 8px; left: 8px; z-index: 2; }
.fav-inline { display: inline-flex; vertical-align: middle; margin-left: 8px; }
.game-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.game-title-row h2 { margin: 0; font-family: var(--font-display); }

/* ---- Avatars & rank badges ---- */
.avatar, .account-avatar, .chat-avatar, .activity-avatar, .settings-avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cherry); color: #fff; font-weight: 700;
}
.account-avatar.avatar-initials { font-size: 11px; }
.rank-badge {
  display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  color: var(--rank); border: 1px solid var(--rank); background: color-mix(in srgb, var(--rank) 12%, transparent);
}

/* ---- Live activity (who won/lost on what) ---- */
.activity-table { width: 100%; }
.activity-table td, .activity-table th { padding: 10px 8px; vertical-align: middle; }
.activity-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.activity-player .activity-avatar { width: 28px; height: 28px; font-size: 11px; }
.activity-player .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-game-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.activity-game-cell img { width: 26px; height: 36px; border-radius: 4px; object-fit: cover; }
.activity-game-cell a { color: var(--text); font-weight: 600; }
.activity-game-cell a:hover { color: var(--cherry); }
.outcome-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.outcome-win { color: var(--win); background: rgba(62, 207, 142, 0.12); }
.outcome-loss { color: var(--lose); background: rgba(255, 1, 57, 0.1); }
.activity-table .num { text-align: right; white-space: nowrap; }
.activity-table .when { color: var(--text-dim); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 720px) { .activity-table .hide-sm { display: none; } }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-raised); margin-top: 60px; }
.footer-main {
  max-width: 1100px; margin: 0 auto; padding: 48px 24px 36px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 32px;
}
.footer-brand img { height: 38px; width: auto; display: block; }
.footer-brand p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 14px 0 0; max-width: 300px; }
.footer-col h4 { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14.5px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--text); }
.footer-col h4 + .footer-social { margin-top: 0; }
.footer-col .footer-subhead { margin-top: 22px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; margin: 0; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
}
.footer-social a:hover { color: var(--cherry); border-color: var(--cherry); }
.footer-social svg { width: 17px; height: 17px; }
.footer-lang {
  display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 210px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
  color: var(--text); font-weight: 600; font-size: 14px; cursor: default;
}
.footer-lang svg { width: 12px; height: 12px; color: var(--text-dim); }
.footer-label { color: var(--text-dim); font-size: 14px; margin-bottom: 10px; display: block; }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom p { max-width: 1100px; margin: 0 auto; padding: 18px 24px 22px; color: var(--text-dim); font-size: 12px; line-height: 1.6; }
.footer-bottom strong { color: var(--text); font-weight: 600; }
@media (max-width: 860px) { .footer-main { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }
@media (max-width: 520px) { .footer-main { grid-template-columns: 1fr; } .footer-brand { grid-column: auto; } }

/* ---- Live chat ---- */
.chat-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 260;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--cherry); border: 1px solid var(--cherry-deep); color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.chat-toggle:hover { background: #ff1a45; }
.chat-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.chat-unread {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #fff; color: var(--cherry-deep); font-size: 11px; font-weight: 800;
  align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.chat-panel {
  position: fixed; right: 20px; bottom: 86px; z-index: 260;
  width: 360px; max-width: calc(100vw - 40px); height: 520px; max-height: calc(100vh - 120px);
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; animation: accountPanelIn 0.15s ease; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-title { font-weight: 700; flex: 1; }
.chat-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.18); }
.chat-close {
  width: 30px; height: 30px; border-radius: 8px; background: transparent; border: 1px solid var(--line);
  color: var(--text-dim); font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.chat-close:hover { color: var(--text); border-color: var(--cherry); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.chat-list::-webkit-scrollbar { width: 6px; }
.chat-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.chat-empty { color: var(--text-dim); font-size: 13px; text-align: center; margin: auto; }
.chat-msg { display: flex; gap: 10px; padding: 7px 6px; border-radius: 8px; }
.chat-msg:hover { background: var(--bg-raised); }
.chat-avatar { width: 32px; height: 32px; font-size: 12px; }
.chat-msg-body { min-width: 0; flex: 1; }
.chat-msg-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-username { font-weight: 700; font-size: 13.5px; }
.chat-msg-mine .chat-username { color: var(--cherry); }
.chat-time { color: var(--text-dim); font-size: 11px; margin-left: auto; }
.chat-text { font-size: 14px; line-height: 1.45; margin-top: 2px; color: #dcd8dc; overflow-wrap: anywhere; }
.chat-compose { border-top: 1px solid var(--line); padding: 12px; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { padding: 10px 12px; font-size: 14px; }
.chat-input-row .btn-primary { padding: 0 14px; display: flex; align-items: center; }
.chat-input-row .btn-primary svg { width: 17px; height: 17px; fill: currentColor; }
.chat-compose-foot { display: flex; justify-content: space-between; color: var(--text-dim); font-size: 11px; margin-top: 7px; }
.chat-login-btn { width: 100%; }
/* Keep toasts clear of the chat button / open panel. */
.toast-container { bottom: 88px; }
body.chat-open .toast-container { right: 396px; }
@media (max-width: 520px) { body.chat-open .toast-container { right: 20px; bottom: auto; top: 20px; } }

/* ---- Settings: profile picture + password ---- */
.profile-header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.settings-avatar { width: 84px; height: 84px; font-size: 28px; border: 2px solid var(--line); }
.profile-header .profile-meta { flex: 1; min-width: 200px; }
.profile-header .profile-name { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-header .profile-sub { color: var(--text-dim); font-size: 13.5px; margin-top: 4px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-actions .btn { padding: 9px 14px; font-size: 13.5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.form-actions { margin-top: 18px; display: flex; justify-content: flex-end; }

/* ---- My games (favourites / recently played) ---- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state .empty-icon { color: var(--text-dim); margin-bottom: 10px; display: flex; justify-content: center; }
.empty-state h3 { color: var(--text); margin: 0 0 6px; }
.tile-card-large .last-played { color: var(--text-dim); font-size: 12px; margin-top: 8px; }
.view-tabs { display: flex; gap: 8px; margin: 24px 0 0; }

/* ---- Fairness verifier ---- */
.verifier { margin-top: 28px; }
.verifier .result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.verifier .result-grid .stat-card .value { font-size: 20px; }
.verifier code { font-family: var(--font-code); font-size: 12px; word-break: break-all; color: var(--text-dim); }

/* Chat docks to the right edge on wide screens and the page shifts over,
   so it never covers buttons or content. Narrow screens keep the overlay. */
.site-header, .with-sidebar { transition: margin-left 0.2s ease, margin-right 0.2s ease; }
@media (min-width: 1100px) {
  body.chat-open .site-header, body.chat-open .with-sidebar { margin-right: 360px; }
  body.chat-open .chat-panel {
    top: 0; bottom: 0; right: 0; width: 360px; height: auto; max-height: none;
    border-radius: 0; border-width: 0 0 0 1px; z-index: 46; box-shadow: none; animation: none;
  }
  body.chat-open .chat-toggle { display: none; }
  body.chat-open .toast-container { right: 380px; bottom: 20px; }
}

/* Desktop: the page slides right instead of being covered, so no dimming
   overlay — which also kept the hamburger unclickable for closing. */
@media (min-width: 701px) { .sidebar-overlay.show { display: none; } }
.sidebar-mobile-head { display: none; }
@media (max-width: 700px) {
  /* On phones the sidebar sits over the hamburger, so give it its own close. */
  .sidebar-mobile-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 10px; }
  .sidebar-mobile-head span { font-weight: 700; }
  .sidebar-mobile-head button {
    width: 34px; height: 34px; padding: 0; border-radius: 8px; background: transparent; border: 1px solid var(--line);
    color: var(--text); font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
  }
}

/* Hearts top-right: real games have no "Soon" badge there, and the tile
   art's own corner badge sits top-left. */
.tile-card > .fav-btn, .tile-card-large > .fav-btn { left: auto; right: 8px; }


/* Spacing: gap under game titles, and labels inside form-grid columns
   (the global label:first-of-type rule was zeroing their top margin). */
.game-title-row { margin-bottom: 18px; }
.form-grid label, .form-grid label:first-of-type { margin-top: 16px; }

/* ---- Phones: nothing may be wider than the screen ---- */
@media (max-width: 720px) {
  nav.top { gap: 8px; padding: 10px 12px; }
  nav.top .nav-right > a.btn-ghost[href="/"] { display: none; } /* logo already links home */
  .logo img { height: 28px; }
  .hamburger-btn { width: 34px; height: 34px; }
  .balance-pill { padding: 6px 10px; font-size: 13px; gap: 4px; }
  nav.top .nav-right { gap: 8px; }
  nav.top .nav-right .btn { padding: 8px 12px; font-size: 13px; }
}
@media (max-width: 800px) {
  .dice-layout { grid-template-columns: minmax(0, 1fr); }
  .bet-panel { position: static; }
}
.dice-layout > div > .card, .category-section .card { overflow-x: auto; }

/* Plinko scales with the screen: peg spacing is a fraction of the board
   width (bottom row of 18 pegs spans the board), and the bucket row is
   exactly as wide as the board instead of as wide as its labels. */
@media (max-width: 800px) { .roll-stage { padding: 20px 14px; } }
@media (max-width: 520px) {
    }

/* Signup: 18+ / terms confirmation */
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; cursor: pointer; color: var(--text-dim); font-size: 13px; line-height: 1.45; }
.check-row input { width: 17px; height: 17px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--cherry); }
.check-row a { color: var(--cherry); }
input[type=date] { width: 100%; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 14px; color: var(--text); font-family: var(--font-body); font-size: 15px; outline: none; color-scheme: dark; }
input[type=date]:focus { border-color: var(--cherry); }
.age-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; margin-right: 8px;
  border: 1.5px solid var(--text-dim); border-radius: 999px; font-size: 10.5px; font-weight: 800; color: var(--text); vertical-align: middle; }

/* ---- Public player profile ---- */
.back-btn { padding: 8px 14px; font-size: 13px; margin-bottom: 18px; }
.profile-card { display: flex; align-items: center; gap: 20px; }
.profile-avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; font-size: 26px; flex-shrink: 0; }
.profile-card-name { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-card-sub { color: var(--text-dim); font-size: 13.5px; margin-top: 4px; }
.profile-game-link { color: var(--text); font-weight: 600; }
.profile-game-link:hover { color: var(--cherry); }
a.activity-username, a.chat-username { color: inherit; }
a.activity-username:hover, a.chat-username:hover { color: var(--cherry); }
.profile-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ---- Two-factor authentication ---- */
.hidden { display: none !important; }
.twofa-step { text-align: center; }
.twofa-step h3 { margin: 10px 0 6px; font-size: 19px; }
.twofa-step p { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.twofa-icon { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; background: rgba(255, 1, 57, 0.12); color: var(--cherry); display: flex; align-items: center; justify-content: center; }
.twofa-icon svg { width: 24px; height: 24px; }
input.code-input { text-align: center; font-size: 26px; letter-spacing: 0.35em; font-weight: 700; padding: 12px; }
input.code-input::placeholder { color: #4a4549; letter-spacing: 0.35em; }
.link-btn { background: none; border: none; padding: 0; margin-top: 14px; color: var(--text-dim); font-size: 13px; text-decoration: underline; cursor: pointer; font-weight: 500; }
.link-btn:hover { color: var(--text); }
.resend-box { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.resend-box input { flex: 1; min-width: 160px; padding: 9px 12px; font-size: 13px; }
.resend-box .btn { padding: 9px 12px; font-size: 13px; }
.resend-box a { color: var(--cherry); font-weight: 600; }
.security-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.security-status.on { color: var(--win); background: rgba(62, 207, 142, 0.12); }
.security-status.off { color: var(--text-dim); background: var(--bg-raised); border: 1px solid var(--line); }
.qr-box { background: #fff; border-radius: 12px; padding: 10px; width: 200px; height: 200px; margin: 6px auto 14px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.secret-text { font-family: var(--font-code); font-size: 13px; letter-spacing: 0.08em; background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; word-break: break-all; text-align: center; user-select: all; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.recovery-grid code { font-family: var(--font-code); font-size: 14px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: center; }
.modal-steps { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; text-align: left; margin: 0 0 14px; padding-left: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
.twofa-field { display: none; }
.twofa-field.show { display: block; }
.modal-title { margin: 0 0 14px; font-size: 19px; padding-right: 30px; }
.modal-card.modal-wide { max-width: 480px; }
.modal-card { max-height: calc(100vh - 40px); overflow-y: auto; }

/* ---- Settings tabs ---- */
.settings-hero { padding-bottom: 20px; border-bottom: none; }
.settings-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 26px; scrollbar-width: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; color: var(--text-dim);
  padding: 12px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; margin-bottom: -1px; }
.settings-tabs button:hover { color: var(--text); }
.settings-tabs button.active { color: var(--text); border-bottom-color: var(--cherry); }
.settings-panel { display: none; padding-bottom: 40px; }
.settings-panel.active { display: block; animation: accountPanelIn 0.15s ease; }
.tf-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tf-actions .btn { padding: 9px 14px; font-size: 13.5px; }
.settings-row .label-block .title { display: flex; align-items: center; gap: 10px; }
.btn-danger:hover { border-color: var(--lose); color: var(--lose); }
.btn-danger-solid { background: var(--lose); }
.form-note { color: var(--text-dim); font-size: 12.5px; margin: 14px 0 0; }
@media (max-width: 600px) { .settings-row { flex-direction: column; align-items: flex-start; gap: 12px; } .tf-actions { justify-content: flex-start; } }


/* ================= Wallet ================= */
.cur-icon { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; line-height: 1; color: #fff; font-family: var(--font-body); }
.cur-icon.cur-fiat { background: var(--bg-raised); border: 1px solid var(--line); color: var(--text); font-size: 10.5px; }
.cur-icon.cur-sm { width: 16px; height: 16px; font-size: 9px; }
.cur-icon.cur-lg { width: 26px; height: 26px; font-size: 13px; }
.ticker-item .cur-icon { margin-right: 1px; }

.wallet-widget { position: relative; display: flex; align-items: stretch; background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; }
.wallet-trigger { display: flex; align-items: center; gap: 9px; background: transparent; border: none; color: var(--text);
  padding: 7px 12px; border-radius: 10px 0 0 10px; cursor: pointer; min-width: 0; }
.wallet-trigger:hover { background: var(--bg-raised); }
.wallet-amounts { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.wallet-amount { font-weight: 700; font-size: 14px; white-space: nowrap; }
.wallet-fiat { font-size: 11px; color: var(--text-dim); font-weight: 500; white-space: nowrap; }
.wallet-chevron { color: var(--text-dim); flex-shrink: 0; }
.wallet-open { border-radius: 0 9px 9px 0; padding: 0 16px; font-size: 13.5px; box-shadow: none; border: none; }
.wallet-open:active { transform: none; }

.wallet-panel { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 300px; z-index: 70;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.55);
  animation: accountPanelIn .14s ease; overflow: hidden; }
.wpanel-body { display: flex; padding: 6px 4px 6px 6px; gap: 2px; }
.wpanel-scroll { flex: 1; max-height: 320px; overflow-y: auto; scrollbar-width: none; }
.wpanel-scroll::-webkit-scrollbar { display: none; }
.wpanel-bar { width: 5px; margin: 6px 2px; border-radius: 999px; background: var(--bg-raised); position: relative; flex-shrink: 0; }
.wpanel-thumb { position: absolute; left: 0; right: 0; top: 0; border-radius: 999px; background: var(--cherry); cursor: grab; }
.wpanel-label { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); padding: 10px 10px 4px; }
.wrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; background: transparent; border: none;
  color: var(--text); font-size: 13.5px; cursor: pointer; text-align: left; }
.wrow:hover { background: var(--bg-raised); }
.wrow.active { background: rgba(255,1,57,.12); }
.wrow-code { font-weight: 700; }
.wrow.active .wrow-code { color: var(--cherry); }
.wrow-amt { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font-weight: 600; }
.wrow-fiat { font-size: 11px; color: var(--text-dim); font-weight: 500; }
.wpanel-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-dim); cursor: pointer; margin: 0; }
.wpanel-toggle > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.switch.switch-sm { width: 38px; height: 22px; }
.switch.switch-sm .switch-track::before { width: 14px; height: 14px; }
.switch.switch-sm input:checked + .switch-track::before { left: 19px; }

/* Deposit / withdraw window */
.wm-tabs { display: flex; gap: 4px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.wm-tabs button { flex: 1; padding: 9px 0; border-radius: 7px; background: transparent; border: none; color: var(--text-dim); font-weight: 600; font-size: 14px; cursor: pointer; }
.wm-tabs button.active { background: var(--cherry); color: #fff; }
.demo-banner { background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.35); color: #e8d9a8; border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.5; margin-bottom: 4px; }
.demo-banner strong { color: var(--gold); }
.money-input { display: flex; align-items: center; gap: 8px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; padding: 0 6px 0 12px; }
.money-input:focus-within { border-color: var(--cherry); }
.money-input input { border: none !important; background: transparent !important; padding: 12px 0 !important; flex: 1; min-width: 0; outline: none; }
.mi-btn { background: var(--bg-card); border: 1px solid var(--line); color: var(--text); padding: 6px 10px; font-size: 12.5px; border-radius: 6px; cursor: pointer; flex-shrink: 0; }
.mi-btn:hover { border-color: var(--cherry); }
.money-sub { font-size: 12px; color: var(--text-dim); min-height: 16px; margin-top: 5px; }
.quick-amounts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.quick-amounts button { flex: 1; min-width: 60px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text); padding: 8px 6px; font-size: 13px; border-radius: 8px; cursor: pointer; }
.quick-amounts button:hover { border-color: var(--cherry); }
.cur-picker { position: relative; }
.cur-picker-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; color: var(--text); font-size: 14px; cursor: pointer; }
.cur-picker-btn:hover { border-color: var(--cherry); }
.cp-code { font-weight: 700; }
.cp-name { color: var(--text-dim); font-size: 12.5px; }
.cp-bal { margin-left: auto; color: var(--text-dim); font-size: 13px; }
.cur-picker-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.5); padding: 6px; max-height: 280px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--cherry) var(--bg-raised); }
.cur-picker-list button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; color: var(--text); padding: 8px 10px; border-radius: 7px; font-size: 13.5px; cursor: pointer; }
.cur-picker-list button:hover { background: var(--bg-raised); }

@media (max-width: 720px) {
  .wallet-open { padding: 0 10px; font-size: 12.5px; }
  .wallet-trigger { padding: 6px 8px; gap: 6px; }
  .wallet-amount { font-size: 12.5px; }
  .wallet-panel { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; transform: none; }
}

/* ================= Game pages (shared) ================= */
.game-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; padding: 28px 0 50px; align-items: start; }
.game-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.game-side .game-title-row { margin-bottom: 0; }
.game-side label { margin: 0 0 6px; }
.bet-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bet-label-fiat { font-size: 12px; color: var(--text-dim); }
.bet-input input { font-weight: 600; }
.seg { display: flex; gap: 4px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 7px; background: transparent; border: none; color: var(--text-dim); font-weight: 600; font-size: 13.5px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.active { background: var(--cherry); color: #fff; }
.seg button:not(.active):hover { color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.stat-box { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; min-width: 0; }
.stat-box .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.stat-box .v { font-weight: 700; font-size: 14px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-box input { background: transparent !important; border: none !important; padding: 2px 0 0 !important; font-weight: 700; font-size: 14px; width: 100%; outline: none; }
.stat-box:focus-within { border-color: var(--cherry); }
.bet-btn { width: 100%; padding: 15px; font-size: 16px; font-weight: 800; letter-spacing: .01em; position: relative; overflow: hidden; }
.hotkey-hint { text-align: center; font-size: 11.5px; color: var(--text-dim); margin-top: -6px; }
.hotkey-hint kbd { background: var(--bg-raised); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-family: var(--font-body); font-size: 11px; }
.game-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stage { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 26px; position: relative; overflow: hidden; min-height: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.stage-result { font-size: 14px; color: var(--text-dim); min-height: 20px; text-align: center; }
.stage-result .w { color: var(--win); font-weight: 700; }
.stage-result .l { color: var(--lose); font-weight: 700; }
.recent-strip { display: flex; gap: 6px; overflow: hidden; min-height: 26px; width: 100%; justify-content: flex-end; }
.recent-pill { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--line); animation: pillIn .25s ease; }
.recent-pill.win { color: var(--win); border-color: rgba(62,207,142,.35); background: rgba(62,207,142,.08); }
.recent-pill.loss { color: var(--text-dim); }
.recent-pill.red { background: #b3122a; border-color: #b3122a; color: #fff; }
.recent-pill.black { background: #161616; border-color: #333; color: #fff; }
.recent-pill.green { background: #1c7a4c; border-color: #1c7a4c; color: #fff; }
@keyframes pillIn { from { opacity: 0; transform: translateX(-10px) scale(.9); } to { opacity: 1; transform: none; } }
.stage-top { position: absolute; top: 14px; left: 16px; right: 16px; }
.history-card { padding: 6px 18px !important; overflow-x: auto; }
.history-card h3 { font-size: 15px; margin: 12px 0 4px; }
.empty-cell { color: var(--text-dim); }
.dim { color: var(--text-dim); }
.win-tag-soft { color: var(--win); font-weight: 600; }
details.seed-box { margin-top: 0; font-family: var(--font-body); padding: 0; }
details.seed-box summary { cursor: pointer; padding: 11px 12px; font-size: 13px; font-weight: 600; color: var(--text-dim); list-style: none; display: flex; align-items: center; gap: 8px; }
details.seed-box summary::after { content: '▾'; margin-left: auto; transition: transform .15s; }
details.seed-box[open] summary::after { transform: rotate(180deg); }
details.seed-box summary::-webkit-details-marker { display: none; }
.seed-row { display: flex; flex-direction: column; gap: 3px; padding: 0 12px 10px; font-size: 11.5px; color: var(--text-dim); }
.seed-row code { font-family: var(--font-code); color: var(--text); font-size: 11.5px; word-break: break-all; }
.seed-links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 2px 12px 12px; font-size: 12px; }
.seed-links a { color: var(--gold); }
@media (max-width: 860px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .game-side { position: static; order: 2; }
  .game-main { order: 1; }
  .stage { min-height: 300px; padding: 18px 12px; }
  .hotkey-hint { display: none; }
}

/* ---- Dice ---- */
.dice-stage { gap: 26px; padding-top: 56px; }
.dice-result { font-size: 64px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; transition: color .2s, transform .2s; }
.dice-result.rolling { color: var(--text); }
.dice-result.win { color: var(--win); animation: popIn .3s ease; }
.dice-result.lose { color: var(--lose); animation: shake .3s ease; }
@keyframes popIn { 50% { transform: scale(1.08); } }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.dice-track-wrap { width: 100%; max-width: 620px; padding: 0 12px; }
.dice-track { position: relative; height: 14px; border-radius: 999px; background: var(--bg-raised); margin: 34px 0 10px; }
.dice-zone { position: absolute; top: 0; bottom: 0; transition: background .2s; }
#zoneLeft { left: 0; border-radius: 999px 0 0 999px; }
#zoneRight { right: 0; border-radius: 0 999px 999px 0; }
.dice-zone.win { background: var(--win); }
.dice-zone.lose { background: var(--lose); }
.dice-track input[type=range] { position: absolute; inset: -12px 0; width: 100%; height: 38px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: grab; z-index: 2; }
.dice-track input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 38px; }
.dice-track input[type=range]::-moz-range-track { background: transparent; }
.dice-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: 4px; border-radius: 8px; background: #fff;
  border: 3px solid var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,.5), inset 0 0 0 2px #d8d4d8; cursor: grab; }
.dice-track input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 8px; background: #fff; border: 3px solid var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,.5); cursor: grab; }
.dice-marker { position: absolute; bottom: calc(100% + 10px); transform: translateX(-50%); opacity: 0; z-index: 1;
  transition: left .42s cubic-bezier(.2,.8,.2,1), opacity .2s; pointer-events: none; }
.dice-marker.show { opacity: 1; }
.dice-marker span { display: block; background: var(--bg-raised); border: 2px solid var(--line); color: var(--text); font-weight: 800; font-size: 13px;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap; }
.dice-marker::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--line); }
.dice-marker.win span { border-color: var(--win); color: var(--win); }
.dice-marker.win::after { border-top-color: var(--win); }
.dice-marker.lose span { border-color: var(--lose); color: var(--lose); }
.dice-marker.lose::after { border-top-color: var(--lose); }
.dice-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); font-weight: 600; }
@media (max-width: 600px) { .dice-result { font-size: 48px; } }
.stat-box input { color: var(--text); font-family: var(--font-body); }
label.stat-box { margin: 0 !important; display: block; cursor: text; }
.money-input input { color: var(--text); font-family: var(--font-body); font-size: 15px; }

/* ---- Coinflip ---- */
.coin-arena { position: relative; width: 190px; height: 260px; display: flex; align-items: flex-end; justify-content: center; perspective: 900px; }
.coin3d { position: absolute; bottom: 50px; width: 170px; height: 170px; transform-style: preserve-3d; }
.coin3d-face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: flex; align-items: center; justify-content: center; }
.coin3d-face svg { width: 46%; height: 46%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.coin3d-face.front { background: #e0002f; box-shadow: inset 0 0 0 6px #b80026; color: #ffe3ea;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.18), inset 0 0 0 11px rgba(0,0,0,.18), 0 0 40px rgba(255,1,57,.35); }
.coin3d-face.back { transform: rotateY(180deg); background: #ecebed; box-shadow: inset 0 0 0 6px #cfccd1; color: #e2002f;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.4), inset 0 0 0 11px rgba(0,0,0,.12), 0 0 40px rgba(255,255,255,.18); }
.coin-shadow { width: 130px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(4px); opacity: .6; }
.coin3d.glow-win .coin3d-face { animation: coinWin .7s ease; }
.coin3d.glow-lose .coin3d-face { animation: coinLose .5s ease; }
@keyframes coinWin { 40% { box-shadow: inset 0 0 0 7px rgba(255,255,255,.3), 0 0 70px rgba(62,207,142,.8); } }
@keyframes coinLose { 40% { filter: grayscale(.7) brightness(.8); } }
.mini-coin { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mini-coin svg { width: 11px; height: 11px; }
.mini-coin.heads { background: #e2002f; color: #fff; }
.mini-coin.tails { background: #e8e6e8; color: #e2002f; }


/* ---- Roulette ---- */
.roulette-stage { padding-top: 54px; }
.roulette-wheel-wrap { position: relative; width: min(340px, 78vw); aspect-ratio: 1; margin: 0 auto; }
.roulette-wheel { position: absolute; inset: 0; filter: drop-shadow(0 14px 40px rgba(0,0,0,.6)); }
.roulette-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 4; width: 0; height: 0;
  border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 20px solid var(--gold); filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.roulette-ball-track { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.roulette-ball { position: absolute; left: 50%; width: 4.2%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: #e6e4e7; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.rt-wrap label { display: flex; gap: 6px; }
.rt-grid { display: grid; grid-template-columns: 1.1fr repeat(12, 1fr); grid-template-rows: repeat(3, 26px); gap: 3px; }
.rt-num { padding: 0; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; border: 2px solid transparent; cursor: pointer; min-width: 0; }
.rt-num.red { background: #b3122a; } .rt-num.black { background: #1f1d21; } .rt-num.green { background: #1c7a4c; }
.rt-num:hover { filter: brightness(1.25); }
.rt-num.picked { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,175,55,.35); transform: scale(1.08); position: relative; z-index: 1; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch.red { background: #b3122a; } .swatch.black { background: #0f0e10; border: 1px solid #444; }
.result-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
  font-weight: 800; color: #fff; font-size: 16px; vertical-align: middle; margin-right: 6px; }
.result-chip.sm { min-width: 26px; height: 24px; font-size: 12px; border-radius: 6px; margin: 0; }
.result-chip.red { background: #b3122a; } .result-chip.black { background: #1f1d21; border: 1px solid #3a363c; } .result-chip.green { background: #1c7a4c; }

/* ---- Limbo ---- */
.limbo-stage { padding: 56px 18px 22px; gap: 10px; }
.limbo-canvas { width: 100%; height: 260px; display: block; }
.limbo-readout { position: absolute; top: 74px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.limbo-mult { font-size: 64px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 4px 24px rgba(0,0,0,.6); transition: color .15s; }
.limbo-mult.passed, .limbo-mult.win { color: var(--win); }
.limbo-mult.win { animation: popIn .35s ease; }
.limbo-mult.lose { color: var(--lose); animation: shake .3s ease; }
.limbo-target-tag { font-size: 12.5px; color: var(--text-dim); background: rgba(10,10,12,.7); border: 1px solid rgba(212,175,55,.4); border-radius: 999px; padding: 3px 10px; }
.limbo-target-tag strong { color: var(--gold); }
.stepper input { text-align: center; font-weight: 700; }
.stepper .mi-btn { width: 32px; font-size: 16px; padding: 4px 0; }
.chip-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chip-row button { flex: 1; min-width: 44px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text-dim); padding: 6px 4px; font-size: 12.5px; font-weight: 700; border-radius: 7px; cursor: pointer; }
.chip-row button:hover { color: var(--text); border-color: var(--cherry); }
.chip-row button.active { color: #fff; background: var(--cherry); border-color: var(--cherry); }
@media (max-width: 600px) { .limbo-mult { font-size: 46px; } .limbo-canvas { height: 220px; } }


/* ---- Plinko ---- */
.plinko-stage { padding: 52px 14px 18px; gap: 10px; }
.plinko-canvas { width: 100%; max-width: 640px; display: block; }
.bucket-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; color: #1a0a0e; font-weight: 800; font-size: 12px; }
.amt-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---- Settings: wallet tab ---- */
.wallet-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wallet-summary .k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); }
.wallet-total { font-size: 30px; font-weight: 800; margin: 4px 0; }
.wallet-summary-actions { display: flex; gap: 10px; }
.balances-table td { padding: 11px 8px; }
.balances-table .num { text-align: right; }
.balances-table .amt-cell .dim { font-size: 12.5px; margin-left: 2px; }
.balances-table tr.zero td { opacity: .5; }
.balances-table tr.zero:hover td { opacity: 1; }
.cur-picker-inline { width: 240px; max-width: 100%; }

/* ---- Keno ---- */
.keno-stage { padding-top: 54px; gap: 16px; }
.keno-board { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; width: 100%; max-width: 560px; }
.keno-tile { aspect-ratio: 1; padding: 0; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text);
  font-weight: 800; font-size: clamp(13px, 2.2vw, 17px); cursor: pointer; transition: transform .12s, background .15s, border-color .15s; position: relative; }
.keno-tile:hover { border-color: var(--cherry); transform: translateY(-2px); }
.keno-tile.picked { background: rgba(255,1,57,.16); border-color: var(--cherry); color: #ffd3dc; }
.keno-tile.drawn { animation: kenoFlip .3s ease; }
.keno-tile.drawn.miss { background: #29262b; border-color: #3a363c; color: var(--text-dim); }
.keno-tile.drawn.hit { background: var(--win); border-color: var(--win); color: #062b1a; box-shadow: 0 0 22px rgba(62,207,142,.45); }
@keyframes kenoFlip { 0% { transform: rotateY(90deg) scale(.9); } 100% { transform: none; } }
.keno-payouts { display: flex; gap: 6px; width: 100%; max-width: 560px; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.kp { flex: 1; min-width: 46px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kp-m { font-weight: 800; font-size: 12.5px; color: var(--text-dim); }
.kp.pays .kp-m { color: var(--text); }
.kp-h { font-size: 10.5px; color: var(--text-dim); }
.kp.hit { border-color: var(--win); background: rgba(62,207,142,.12); }
.kp.hit .kp-m { color: var(--win); }
.kp-empty { color: var(--text-dim); font-size: 13px; }
.keno-pick-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); }
.keno-pick-row strong { color: var(--text); }
.keno-pick-btns { display: flex; gap: 6px; }
@media (max-width: 600px) { .keno-board { gap: 5px; } .keno-tile { border-radius: 7px; } }

/* ---- Mines ---- */
.game-side select { width: 100%; padding: 11px 12px; background: var(--bg-raised); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 600; }
.game-side select:disabled, .bet-input input:disabled { opacity: .55; }
.mines-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mines-stats > div { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.mines-stats span { font-size: 12px; color: var(--text-dim); }
.mines-stats strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.cashout-btn { background: var(--win); color: #062b1a; border: none; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cashout-btn:disabled { opacity: .5; cursor: not-allowed; }
.cash-amt { font-size: 12.5px; font-weight: 700; opacity: .85; }
.mines-stage { padding-top: 54px; }
.mines-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; max-width: 470px; }
.mine-tile { aspect-ratio: 1; padding: 0; border-radius: 12px; border: none; cursor: default; position: relative;
  background: #2b272e; box-shadow: inset 0 -5px 0 rgba(0,0,0,.35); transition: transform .12s, background .15s; }
.mines-board.live .mine-tile:not(.gem):not(.mine) { cursor: pointer; }
.mines-board.live .mine-tile:not(.gem):not(.mine):hover { transform: translateY(-3px); background: #35303a; }
.mine-tile.pending { animation: minePulse .6s ease-in-out infinite alternate; }
@keyframes minePulse { to { background: #403b45; } }
.mine-tile.gem, .mine-tile.mine { background: #121114; box-shadow: inset 0 0 0 1px var(--line); }
.mine-tile.gem:not(.dim) { box-shadow: inset 0 0 0 2px rgba(62,207,142,.6), 0 0 18px rgba(62,207,142,.18); }
.mine-tile.mine:not(.dim) { background: rgba(255,1,57,.14); box-shadow: inset 0 0 0 2px var(--cherry), 0 0 26px rgba(255,1,57,.4); }
.mt-face { position: absolute; inset: 22%; display: flex; }
.mt-face svg { width: 100%; height: 100%; }
.mine-tile.dim .mt-face { opacity: .35; transform: scale(.82); }
.mine-tile.pop .mt-face { animation: minePop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes minePop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.mines-board.shake { animation: boardShake .45s; }
@keyframes boardShake { 0%,100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.mines-board.won { animation: boardWin .6s; }
@keyframes boardWin { 50% { filter: drop-shadow(0 0 22px rgba(62,207,142,.45)); } }
@media (max-width: 600px) { .mines-board { gap: 7px; } .mine-tile { border-radius: 9px; } }

/* ---- Blackjack ---- */
.outcome-push { color: var(--text-dim); background: rgba(161,155,160,.12); }
.bj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bj-act { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.bj-act kbd { font: 600 11px var(--font-body); color: var(--text-dim); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.bj-act:not(:disabled):hover { border-color: var(--cherry); }
.bj-act:disabled { opacity: .4; cursor: not-allowed; }
.bj-actions.live .bj-act:not(:disabled) { border-color: rgba(255,1,57,.5); }
.bj-rules { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.bj-stage { padding-top: 54px; }
.bj-table { width: 100%; max-width: 640px; min-height: 380px; display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: #163a2a; border-radius: 18px 18px 160px 160px / 18px 18px 90px 90px;
  border: 1px solid #2a5a42; padding: 22px 16px 34px; position: relative; }
.bj-seat, .bj-hand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bj-label { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #cfe6d9; font-weight: 600; flex-wrap: wrap; justify-content: center; }
.bj-total { background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 28px; text-align: center; }
.bj-total:empty { display: none; }
.bj-bet { color: #f1d98a; font-variant-numeric: tabular-nums; }
.bj-outcome { border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: 12px; background: rgba(0,0,0,.4); }
.out-win .bj-outcome, .out-blackjack .bj-outcome { background: var(--win); color: #062b1a; }
.out-lose .bj-outcome, .out-bust .bj-outcome { background: var(--cherry); color: #fff; }
.out-lose .bj-cards, .out-bust .bj-cards { opacity: .6; }
.bj-felt-text { color: rgba(241,217,138,.35); font-size: 11px; letter-spacing: .25em; font-weight: 700; }
.bj-hands { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.bj-hand { padding: 8px; border-radius: 14px; border: 2px solid transparent; transition: border-color .2s; }
.bj-hand.active { border-color: rgba(241,217,138,.6); background: rgba(0,0,0,.12); }
.bj-cards { display: flex; min-height: 112px; padding-left: 34px; }
.pcard { width: 78px; height: 110px; margin-left: -34px; border-radius: 9px; background: #fbfaf7; color: #1b1a1e; position: relative; flex: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.4), inset 0 0 0 1px rgba(0,0,0,.08); font-family: var(--font-display); }
.pcard.red { color: #d4002c; }
.pc-corner { position: absolute; top: 6px; left: 7px; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pc-corner b { font-size: 17px; font-weight: 800; }
.pc-corner i { font-style: normal; font-size: 14px; }
.pc-corner.br { top: auto; left: auto; bottom: 6px; right: 7px; transform: rotate(180deg); }
.pc-pip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.pcard.back { background: #d4002c; padding: 5px; }
.pc-back { width: 100%; height: 100%; border-radius: 6px; border: 2px solid rgba(255,255,255,.55);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 6px, transparent 6px 12px); }
.pcard.incoming { opacity: 0; transform: translate(120px, -160px) rotate(-14deg); }
.pcard.dealt { animation: cardIn .32s cubic-bezier(.2,.8,.3,1); }
@keyframes cardIn { from { opacity: 0; transform: translate(120px, -160px) rotate(-14deg); } to { opacity: 1; transform: none; } }
.pcard.flip { animation: cardFlip .4s ease; }
@keyframes cardFlip { 0% { transform: rotateY(90deg); } 100% { transform: none; } }
.bj-insurance { display: flex; flex-direction: column; align-items: center; gap: 8px; background: rgba(0,0,0,.45); border: 1px solid rgba(241,217,138,.4);
  border-radius: 12px; padding: 12px 16px; color: #f1d98a; font-weight: 600; font-size: 14px; }
.bj-insurance > div { display: flex; gap: 8px; }
.bj-insurance .btn { padding: 8px 16px; }
@media (max-width: 600px) {
  .pcard { width: 60px; height: 86px; margin-left: -28px; }
  .bj-cards { min-height: 88px; padding-left: 28px; }
  .pc-pip { font-size: 26px; } .pc-corner b { font-size: 14px; }
  .bj-table { min-height: 320px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .pcard.dealt, .pcard.flip, .mine-tile.pop .mt-face, .mines-board.shake, .keno-tile.drawn { animation: none; } }

/* Fairness verifier: multi-number results */
.result-grid-wide { grid-template-columns: 1fr !important; margin-top: 10px; }
.value-sm { font-size: 15px !important; word-break: break-word; line-height: 1.5; }

/* ---- Footer language picker ---- */
.lang-picker { position: relative; width: 100%; max-width: 210px; }
button.footer-lang { cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; text-align: left; }
button.footer-lang:hover, button.footer-lang[aria-expanded="true"] { border-color: var(--cherry); }
button.footer-lang[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; z-index: 50;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.lang-menu li { padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; outline: none; }
.lang-menu li:hover, .lang-menu li:focus { background: var(--bg-raised); }
.lang-menu li[aria-selected="true"] { color: var(--cherry); }
.lang-check { font-size: 13px; }

/* Phones: stage first, then the bet controls, then history. Header fits 360px. */
@media (max-width: 860px) {
  .game-main { display: contents; }
  .game-main > .stage { order: 1; }
  .game-side { order: 2; }
  .game-main > .history-card { order: 3; }
}
@media (max-width: 440px) {
  .account-chevron { display: none; }
  .account-trigger { padding: 3px; }
  nav.top .nav-right { gap: 6px; }
  .wallet-open { padding: 0 8px; }
  .logo img { height: 24px; }
  nav.top { column-gap: 6px; }
}

/* ===================================================================
   Round 3 — restrained pass. Flat surfaces, sentence-case labels,
   colour only where it carries meaning (rank, win/loss, cherry for
   the one primary action on screen).
   =================================================================== */
.btn-primary { border-color: transparent; box-shadow: none; }
.btn-primary:hover { background: #e8002f; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost:hover { border-color: #4a454c; background: rgba(255,255,255,.03); }
.btn-xs { padding: 5px 10px; font-size: 12px; }
.danger-btn { color: #ff6b85; }
.danger-btn:hover { border-color: var(--cherry); color: var(--cherry); }

/* Labels: sentence case, no tracking. */
.stat-card .label, th, .footer-col h4, .wpanel-label, .stat-box .k, .wallet-summary .k, .sidebar-title, .sidebar-soon {
  text-transform: none; letter-spacing: 0;
}
th { font-size: 12.5px; }
.footer-col h4 { font-size: 14px; }
.sidebar-title { font-size: 12px; font-weight: 600; }
.outcome-pill { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.home-section .eyebrow { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.home-section .eyebrow::before { content: none; }

/* ---- Home hero ---- */
.home-hero { text-align: left; border-top: none; padding: 56px 24px 44px; }
.home-hero .hero-ctas { justify-content: flex-start; }
.home-hero p.tagline { margin: 0 0 26px; max-width: 520px; }
.hero-title { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 12px; }
.hero-note { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13px; margin: 18px 0 0; }
.hero-note .dot-ind { width: 6px; height: 6px; border-radius: 50%; background: var(--win); }
.home-hero .social-login-row { justify-content: flex-start; }
.home-hero.is-welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 32px; align-items: end; padding-top: 44px; padding-bottom: 36px; }
.hw-rank { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "em text" "em bar" "em next"; column-gap: 12px; row-gap: 4px;
  max-width: 420px; color: var(--text); margin-top: 6px; }
.hw-rank .rank-emblem { grid-area: em; align-self: center; }
.hw-rank-text { grid-area: text; font-size: 14px; color: var(--text-dim); }
.hw-rank-text strong { color: var(--text); font-weight: 600; }
.hw-bar { grid-area: bar; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.hw-bar span { display: block; height: 100%; border-radius: 2px; }
.hw-next { grid-area: next; font-size: 12px; color: var(--text-dim); }
.hw-rank:hover .hw-rank-text strong { text-decoration: underline; text-underline-offset: 3px; }
.hw-side { display: flex; flex-direction: column; gap: 8px; }
.hw-reward { display: grid; grid-template-columns: 18px 1fr auto auto; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.hw-reward .ui-icon { color: var(--gold); }
.hw-reward strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.hw-reward em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--cherry); }
button.hw-reward:hover { border-color: #4a454c; }
.hw-reward.is-wait em, .hw-reward.is-wait .ui-icon { color: var(--text-dim); }
.hw-reward.is-done em, .hw-reward.is-done .ui-icon { color: var(--win); }
.hw-play { text-align: center; }
@media (max-width: 760px) {
  .home-hero.is-welcome { grid-template-columns: 1fr; gap: 22px; padding-top: 32px; padding-bottom: 28px; }
}

/* ---- Toasts ---- */
.toast { border: 1px solid #343036; border-left-width: 1px; border-radius: 10px; background: #1f1d22; padding: 11px 12px 11px 14px;
  align-items: center; box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.toast-icon { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; }
.toast-success .toast-icon { background: rgba(62,207,142,.14); }
.toast-error .toast-icon { background: rgba(255,1,57,.14); }
.toast-info .toast-icon { background: rgba(212,175,55,.14); }
.toast-msg { color: var(--text); }
.toast-close { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.toast-close:hover { background: rgba(255,255,255,.06); }

/* ---- Rank chip, role tags ---- */
.rank-badge, .rank-chip { all: unset; }
.rank-chip { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; font-size: 11.5px; font-weight: 600;
  color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1; }
.rank-emblem { flex: none; display: inline-block; vertical-align: middle; }
.role-tag { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 3px 6px 3px 5px; border-radius: 5px; white-space: nowrap; }
.role-owner { color: #ffc2cf; background: rgba(255,1,57,.16); }
.role-admin { color: #ffd98a; background: rgba(255,176,32,.15); }
.role-mod, .role-staff { color: #c9d6ff; background: rgba(122,168,255,.14); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--bg-raised); color: var(--text-dim); vertical-align: middle; }
.tag-ok { color: var(--win); background: rgba(62,207,142,.12); }
.tag-warn { color: #f1c75b; background: rgba(241,199,91,.12); }
.tag-bad { color: #ff6b85; background: rgba(255,1,57,.12); }

/* ---- Chat ---- */
.chat-msg-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-username.is-staff { color: #fff; }
.chat-msg, .chat-event { position: relative; }
.chat-del { margin-left: auto; width: 20px; height: 20px; padding: 0; border: none; border-radius: 5px; background: transparent; color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center; opacity: 0; cursor: pointer; }
.chat-msg:hover .chat-del, .chat-event:hover .chat-del, .chat-del:focus-visible { opacity: 1; }
.chat-del:hover { background: rgba(255,1,57,.14); color: var(--cherry); }
.chat-event { margin: 6px 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line); font-size: 13px; }
.chat-event-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.chat-event-head strong { font-weight: 600; }
.chat-event-head .chat-time { margin-left: auto; }
.chat-event-head .chat-del { margin-left: 4px; }
.chat-rain { border-color: rgba(122,168,255,.35); background: rgba(122,168,255,.07); }
.chat-rain .chat-event-head .ui-icon { color: #9db9ff; }
.chat-rain-amt { font-weight: 700; color: var(--text); }
.chat-rain-names { color: var(--text-dim); font-size: 12px; margin-top: 4px; line-height: 1.5; }
.chat-rain-names a { color: var(--text); }
.chat-announce { border-color: rgba(255,1,57,.3); background: rgba(255,1,57,.06); }
.chat-announce .chat-event-head .ui-icon { color: var(--cherry); }
.chat-note { margin: 6px 4px; padding: 9px 12px; border-radius: 10px; border: 1px dashed #3d393f; font-size: 13px; color: var(--text); }
.chat-note-tag { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.chat-note-error { border-color: rgba(255,1,57,.45); color: #ffb3c1; }
.chat-help { display: grid; gap: 6px; }
.chat-help > div { display: grid; gap: 1px; }
.chat-help code { font-family: var(--font-code); font-size: 12px; color: #fff; }
.chat-help span { color: var(--text-dim); font-size: 12px; }
.admin-cmds { gap: 12px; }
.admin-cmds > div { grid-template-columns: minmax(220px, 320px) 1fr; gap: 16px; align-items: baseline; }
@media (max-width: 640px) { .admin-cmds > div { grid-template-columns: 1fr; } }

/* ---- Badges ---- */
.badge-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.badge-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-raised); opacity: .45; }
.badge-item.earned { opacity: 1; }
.badge-ic { width: 36px; height: 36px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #262329; color: var(--text-dim); }
.badge-item.earned .badge-ic { color: var(--gold); background: rgba(212,175,55,.12); }
.badge-txt { display: flex; flex-direction: column; min-width: 0; }
.badge-txt strong { font-size: 13.5px; font-weight: 600; }
.badge-txt small { font-size: 12px; color: var(--text-dim); line-height: 1.35; }
.badge-item.badge-owner { border-color: rgba(255,1,57,.45); background: rgba(255,1,57,.07); }
.badge-item.badge-owner .badge-ic { color: #fff; background: var(--cherry); }
.badge-item.badge-admin { border-color: rgba(255,176,32,.4); background: rgba(255,176,32,.06); }
.badge-item.badge-admin .badge-ic { color: #1a1206; background: #ffb020; }
.badge-item.badge-mod .badge-ic, .badge-item.badge-staff .badge-ic { color: #c9d6ff; background: rgba(122,168,255,.16); }
.section-count { font-size: 13px; font-weight: 500; color: var(--text-dim); margin-left: 6px; }

/* ---- Rank card ---- */
.rank-card { padding: 22px 24px; }
.rank-card-top { display: flex; align-items: center; gap: 16px; }
.rank-card-main { flex: 1; min-width: 0; }
.rank-card-name { font-size: 20px; font-weight: 700; line-height: 1.1; }
.rank-card-level { color: var(--text-dim); font-size: 13.5px; margin-top: 3px; }
.rank-card-next { text-align: right; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.rank-card-next strong { color: var(--text); font-weight: 600; }
.rank-card .xp-bar-track { height: 6px; border: none; margin-top: 16px; }
.rank-ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 16px; }
.rank-step { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 9px; opacity: .35; filter: grayscale(.6); }
.rank-step span { font-size: 12px; font-weight: 600; }
.rank-step small { font-size: 11px; color: var(--text-dim); }
.rank-step.reached { opacity: 1; filter: none; }
.rank-step.current { background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--line); }
.rank-note { color: var(--text-dim); font-size: 12.5px; margin: 14px 0 0; }
@media (max-width: 520px) { .rank-step span { font-size: 10.5px; } .rank-card-next { display: none; } }

/* ---- Account menu rank ---- */
.account-rank { display: flex; align-items: center; gap: 10px; margin: 2px 8px 6px; padding: 10px; border-radius: 9px; background: var(--bg-raised); color: var(--text); }
.account-rank:hover { background: #29262b; }
.account-rank-main { flex: 1; min-width: 0; }
.account-rank-row { display: flex; justify-content: space-between; font-size: 12.5px; }
.account-rank-row strong { font-weight: 600; }
.account-rank-row span { color: var(--text-dim); }
.account-rank-bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.account-rank-bar span { display: block; height: 100%; }
.account-panel-item .ui-icon { width: 18px; height: 18px; color: var(--text-dim); }

/* ---- Profile ---- */
.profile-card-main { min-width: 0; }
.profile-card-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-card-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-suspended { margin-top: 8px; font-size: 13px; color: #ff6b85; }
#profileRank { margin-top: 16px; }
.profile-stats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ---- Rewards (settings) ---- */
.demo-banner { font-size: 13px; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; line-height: 1.5; }
.demo-banner strong { color: var(--text); }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.reward-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.reward-card.is-off { opacity: .6; }
.reward-head, .admin-reward-head { display: flex; gap: 12px; align-items: flex-start; }
.reward-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(212,175,55,.12); color: var(--gold); }
.reward-title { font-weight: 600; font-size: 15px; }
.reward-sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; margin-top: 2px; }
.reward-amt { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.reward-card .btn { width: 100%; }
.reward-off { font-size: 13px; color: var(--text-dim); }
.reward-status { font-size: 13.5px; color: var(--text-dim); }
.reward-status.ok { color: var(--win); }
.promo-form { display: flex; gap: 8px; }
.promo-form input { flex: 1; text-transform: uppercase; }
.promo-form .btn { width: auto; }

/* ---- Verification (demo) ---- */
.kyc-steps { display: grid; gap: 12px; }
.kyc-step { display: flex; gap: 16px; padding: 20px 22px; }
.kyc-num { width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: var(--bg-raised); border: 1px solid var(--line); }
.kyc-step.done .kyc-num { background: rgba(62,207,142,.14); border-color: transparent; color: var(--win); }
.kyc-step.current .kyc-num { background: var(--cherry); border-color: transparent; color: #fff; }
.kyc-step.locked { opacity: .5; }
.kyc-main { flex: 1; min-width: 0; }
.kyc-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kyc-sub { color: var(--text-dim); font-size: 13px; margin-top: 3px; line-height: 1.5; }
.kyc-form { margin-top: 14px; max-width: 360px; }
.kyc-form select { width: 100%; padding: 11px 12px; background: var(--bg-raised); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.kyc-check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; margin: 14px 0; cursor: pointer; }
.kyc-check input { width: auto; }
.kyc-fake-upload { margin: 14px 0; padding: 18px; border: 1px dashed #3d393f; border-radius: 10px; color: var(--text-dim); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.kyc-reset { margin-top: 4px; justify-self: start; }

/* ---- Pages: leaderboard, admin ---- */
.page-pad { padding-top: 32px; padding-bottom: 48px; }
.page-head h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 6px; }
.page-sub { color: var(--text-dim); margin: 0 0 22px; font-size: 14.5px; }
.lb-controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.lb-controls .seg { flex: 0 1 auto; }
.seg-sm button { padding: 7px 12px; font-size: 13px; }
.lb-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.lb-podium:empty { display: none; }
.lb-top { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "pos pos" "av name" "av val" "av sub"; column-gap: 12px;
  padding: 16px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--line); color: var(--text); }
.lb-top:hover { border-color: #4a454c; }
.lb-top-pos { grid-area: pos; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; }
.lb-top-1 .lb-top-pos { color: var(--gold); }
.lb-top-1 { border-color: rgba(212,175,55,.4); }
.lb-top-avatar { grid-area: av; width: 44px; height: 44px; border-radius: 50%; font-size: 15px; align-self: center; }
.lb-top-name { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-top-val { grid-area: val; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-top-sub { grid-area: sub; font-size: 12px; color: var(--text-dim); }
.lb-card { padding: 4px 18px; overflow-x: auto; }
.lb-table { width: 100%; }
.lb-table td, .lb-table th { padding: 11px 8px; vertical-align: middle; }
.lb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-pos { width: 36px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.lb-player { display: inline-flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.lb-player:hover .lb-name { text-decoration: underline; text-underline-offset: 3px; }
.lb-avatar { width: 26px; height: 26px; border-radius: 50%; font-size: 10px; flex: none; }
.lb-name { font-weight: 600; }
@media (max-width: 640px) { .lb-podium { grid-template-columns: 1fr; } .lb-table .hide-sm { display: none; } }

.admin-head .page-sub { display: flex; align-items: center; gap: 6px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.admin-quick { display: grid; gap: 16px; }
.admin-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-inline > label { margin: 0; width: 110px; flex: none; color: var(--text-dim); font-size: 13px; }
.admin-inline input, .admin-inline select { width: auto; flex: 1 1 160px; min-width: 0; padding: 9px 11px; background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 14px; }
.admin-inline select { flex: 0 1 150px; }
.admin-inline .money-input { flex: 0 1 160px; }
.mi-prefix { padding-left: 12px; color: var(--text-dim); }
.admin-hint { font-size: 12.5px; flex-basis: 100%; padding-left: 120px; }
.admin-rewards { display: grid; gap: 12px; }
.admin-reward { padding: 20px 22px; }
.admin-reward.is-off .admin-fields { opacity: .5; }
.admin-reward-head .switch { margin-left: auto; }
.admin-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.admin-fields label { margin: 0 0 5px; font-size: 12.5px; }
.admin-fields input { width: 100%; }
.admin-fields small { display: block; font-size: 11.5px; margin-top: 4px; }
.admin-search { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-search input { flex: 1 1 260px; }
.admin-players { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
.admin-list { padding: 6px; max-height: 640px; overflow-y: auto; }
.admin-user { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: none; border-radius: 8px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.admin-user:hover { background: var(--bg-raised); }
.admin-user.active { background: #29262b; }
.admin-user-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-id { margin-left: auto; font-size: 12px; }
.admin-detail { padding: 22px; min-width: 0; }
.admin-detail-head { display: flex; gap: 14px; align-items: center; }
.admin-detail-head .dim { font-size: 13px; }
.admin-detail-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-detail-name a { color: var(--text); }
.admin-note { margin-top: 12px; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.admin-note.bad { background: rgba(255,1,57,.1); color: #ffb3c1; }
.admin-note.warn { background: rgba(241,199,91,.1); color: #f1d98a; }
.admin-mini-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.admin-mini-stats > div { background: var(--bg-raised); border-radius: 9px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-mini-stats span { font-size: 12px; color: var(--text-dim); }
.admin-mini-stats strong { font-size: 14px; overflow-wrap: anywhere; }
.admin-mini-stats .w { color: var(--win); } .admin-mini-stats .l { color: var(--lose); }
.admin-actions { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-log-mini { list-style: none; padding: 0; margin: 0; font-size: 13px; display: grid; gap: 6px; }
.admin-table-card { padding: 4px 16px; overflow-x: auto; margin-top: 14px; }
.admin-table-card td { font-size: 13.5px; vertical-align: top; }
.admin-table-card code { font-family: var(--font-code); font-size: 13px; }
.admin-msg { max-width: 420px; overflow-wrap: anywhere; }
tr.is-deleted td { opacity: .5; }
.admin-grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.admin-grid-form label { margin: 0 0 5px; }
.admin-grid-submit .btn { width: 100%; }
#filterWords { width: 100%; background: var(--bg-raised); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 13.5px var(--font-code); resize: vertical; }
@media (max-width: 860px) {
  .admin-players { grid-template-columns: 1fr; }
  .admin-list { max-height: 300px; }
  .admin-hint { padding-left: 0; }
  .admin-inline > label { width: 100%; }
}
input[type="search"] { width: 100%; padding: 11px 12px; background: var(--bg-raised); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; }
input[type="search"]:focus { outline: none; border-color: #4a454c; }
.admin-detail .settings-avatar { width: 56px; height: 56px; font-size: 18px; }
.admin-detail .section-title { font-size: 15px; margin: 22px 0 10px; }
.admin-detail .admin-table-card { padding: 0; margin-top: 0; }
.seg button { white-space: nowrap; }
.reward-card .btn-primary:disabled { background: var(--bg-raised); color: var(--text-dim); border-color: var(--line); opacity: 1; }

/* ===== Round 4 ===== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Toasts: filled status badges ---- */
.toast-icon { width: 20px; height: 20px; background: none !important; flex: none; }
.toast-icon svg { display: block; }
.toast-themed { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.toast-success .toast-themed { background: rgba(62,207,142,.18); color: var(--win); }
.toast-error .toast-themed { background: rgba(255,1,57,.18); color: #ff5577; }
.toast-info .toast-themed { background: rgba(212,175,55,.18); color: var(--gold); }
.toast-msg { font-size: 13.5px; }

/* ---- Signed-out hero: sliding cards ---- */
.home-hero:not(.is-welcome) { padding-top: 28px; padding-bottom: 28px; }
.promo-viewport { overflow: hidden; border-radius: 16px; }
.promo-track { display: flex; gap: 16px; transition: transform .55s cubic-bezier(.22,.8,.24,1); will-change: transform; }
.promo-card { flex: 0 0 calc((100% - 16px) / 2); min-height: 236px; display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px;
  padding: 26px 26px 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-card); position: relative; overflow: hidden; }

.promo-body, .promo-visual { position: relative; }
.promo-body { display: flex; flex-direction: column; min-width: 0; }
.promo-kicker { font-size: 13px; font-weight: 600; color: var(--tone); margin-bottom: 8px; }
.promo-title { font-size: clamp(21px, 2.1vw, 26px); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 8px; }
.promo-text { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin: 0 0 18px; max-width: 46ch; }
.promo-ctas { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.promo-visual { display: flex; align-items: center; justify-content: center; color: var(--tone); }
.promo-art { width: 104px; height: 104px; opacity: .9; }
.promo-art-fill { width: 92px; height: 92px; }
.promo-logo { width: 112px; height: 112px; object-fit: contain; }
.tone-cherry { --tone: #ff4d6d; }
.tone-gold { --tone: #e2c158; }
.tone-discord { --tone: #8c96ff; }
.tone-telegram { --tone: #4fb8ea; }
.tone-blue { --tone: #9db9ff; }
.tone-green { --tone: #5fdca6; }
.tone-discord .btn-primary { background: #5865F2; }
.tone-discord .btn-primary:hover { background: #4752c4; }
.tone-telegram .btn-primary { background: #229ED9; }
.tone-telegram .btn-primary:hover { background: #1b87bb; }
.promo-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.promo-dots { display: flex; gap: 6px; }
.promo-dots button { width: 8px; height: 8px; padding: 0; border: none; border-radius: 4px; background: #3a363c; cursor: pointer; transition: width .25s, background .25s; }
.promo-dots button.active { width: 22px; background: var(--text); }
.promo-arrows { display: flex; gap: 8px; }
.promo-arrow { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-card); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.promo-arrow:hover { border-color: #4a454c; }
@media (max-width: 899px) { .promo-card { flex-basis: 100%; } }
@media (max-width: 560px) {
  .promo-card { grid-template-columns: 1fr; min-height: 0; padding: 22px 20px; }
  .promo-visual { position: absolute; right: 14px; top: 14px; opacity: .35; }
  .promo-art, .promo-art-fill, .promo-logo { width: 64px; height: 64px; }
  .promo-title { padding-right: 54px; }
}
@media (prefers-reduced-motion: reduce) { .promo-track { transition: none; } }

/* ---- Login window: social buttons, forgot password ---- */
.social-stack { display: grid; gap: 8px; }
.social-wide { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-raised); color: var(--text); font-weight: 600; font-size: 14px; }
.social-wide svg { width: 18px; height: 18px; flex: none; }
.social-wide:hover { border-color: #4a454c; background: #232026; }
.social-wide.is-unavailable { opacity: .55; }
.forgot-link { display: block; margin: 8px 0 0 auto; font-size: 13px; }
.auth-step h3 { margin: 0 0 6px; font-size: 20px; }
.auth-step-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 16px; line-height: 1.5; }
.auth-step .link-btn { margin-top: 12px; }
.dev-link-btn { display: block; text-align: center; margin-top: 12px; }
.dev-note { display: block; margin-top: 8px; color: var(--text-dim); font-size: 12px; }
#authShell { min-height: 60vh; }

/* ---- Verify-email banner ---- */
.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 24px;
  background: rgba(212,175,55,.1); border-bottom: 1px solid rgba(212,175,55,.25); font-size: 13.5px; }
.vb-text { display: flex; align-items: center; gap: 8px; color: var(--text); }
.vb-text .ui-icon { color: var(--gold); flex: none; }
.vb-actions { display: flex; align-items: center; gap: 6px; }
.vb-close { width: 28px; height: 28px; padding: 0; border: none; border-radius: 7px; background: transparent; color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vb-close:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* ---- Settings: connected accounts ---- */
.connected-list { padding: 8px 20px; }
.connected-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.connected-row:last-of-type { border-bottom: none; }
.connected-ic svg { width: 24px; height: 24px; display: block; }
.connected-main { flex: 1; min-width: 0; }
.connected-name { font-weight: 600; }
.connected-sub { font-size: 12.5px; color: var(--text-dim); }

/* ---- Crash ---- */
.crash-stage { padding: 54px 14px 16px; }
.crash-graph-wrap { position: relative; width: 100%; height: clamp(300px, 46vh, 440px); }
#crashCanvas { width: 100%; height: 100%; display: block; }
.crash-center { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.crash-mult { font-size: clamp(46px, 7vw, 76px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; color: #fff; transition: color .2s; }
.crash-mult.is-warm { color: #ff6b85; }
.crash-mult.is-hot { color: #ffd166; }
.crash-mult.is-crashed { color: var(--cherry); animation: crashPop .45s cubic-bezier(.3,1.6,.5,1); }
.crash-mult.is-wait { color: var(--text-dim); font-size: clamp(36px, 5vw, 52px); }
@keyframes crashPop { from { transform: scale(1.25); } to { transform: none; } }
.crash-sub { margin-top: 8px; font-size: 14px; color: var(--text-dim); font-weight: 600; }
.crash-progress { width: 200px; height: 4px; border-radius: 2px; background: var(--line); margin: 12px auto 0; overflow: hidden; visibility: hidden; }
.crash-progress span { display: block; height: 100%; background: var(--cherry); transform-origin: left; }
.crash-history { gap: 6px; }
.crash-pill { text-decoration: none; }
.crash-pill.big { color: #1f1500; background: #ffd166; }
.auto-input { display: flex; align-items: center; }
.auto-input input { flex: 1; }
.mi-suffix { padding: 0 12px; color: var(--text-dim); font-weight: 700; }
.auto-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.auto-chips button { padding: 7px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text-dim); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.auto-chips button:hover { color: var(--text); }
.auto-chips button.active { color: var(--text); border-color: #4a454c; background: #29262b; }
.crash-action { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.crash-action.is-cashout { background: var(--win); color: #062b1a; }
.crash-action.is-cashout:hover { background: #35b97e; }
.crash-action.is-cancel { background: var(--bg-raised); color: var(--text); border: 1px solid var(--line); }
.crash-note { min-height: 18px; font-size: 12.5px; color: var(--text-dim); text-align: center; margin-top: -6px; }
.crash-players-card { padding: 16px 18px; }
.crash-players-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.crash-players-head h3 { margin: 0; font-size: 16px; }
.crash-players-head .dim { font-size: 13px; }
.crash-players { max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a363c transparent; }
.crash-player { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(110px, auto); gap: 12px; align-items: center; padding: 8px 6px; border-radius: 8px; font-size: 13.5px; }
.crash-player + .crash-player { border-top: 1px solid var(--line); }
.crash-player.is-me { background: rgba(255,255,255,.03); }
.cp-user { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); font-weight: 600; }
.cp-user > span:not(.rank-chip) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-bet { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.cp-res { text-align: right; display: flex; gap: 8px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.cp-x { color: var(--text); font-weight: 600; }
.cp-win { color: var(--win); font-weight: 600; }
.cp-lost { color: var(--lose); font-weight: 600; }
.crash-player.is-lost { opacity: .7; }
.fair-last { word-break: break-all; }
.crash-round-bets { max-height: 280px; overflow-y: auto; margin-bottom: 12px; }
@media (max-width: 860px) {
  .game-main > .crash-players-card { order: 3; }
  .game-main > .history-card { order: 4; }
  .crash-graph-wrap { height: 300px; }
}
@media (max-width: 480px) { .crash-player { grid-template-columns: minmax(0, 1fr) auto; } .cp-bet { display: none; } }
.auto-input .mi-suffix { display: none; }
.auto-input.has-value .mi-suffix { display: inline; }
.setup-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center; }
.setup-row:last-child { border-bottom: none; }
.setup-row.sub { padding-top: 0; color: var(--text-dim); font-size: 13px; }
.setup-row code { font-family: var(--font-code); font-size: 12.5px; overflow-wrap: anywhere; }
.copyable { cursor: copy; }
@media (max-width: 640px) { .setup-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---- Staff help groups, role picker ---- */
.help-group { margin: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.help-group:first-child { margin-top: 0; }
.seg-mini { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--bg-raised); border: 1px solid var(--line); }
.seg-mini button { border: none; background: transparent; color: var(--text-dim); font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg-mini button:hover { color: var(--text); }
.seg-mini button.active { background: var(--cherry); color: #fff; }

/* ---- Bet page (/bet/<game>-<id>) ---- */
.bp-wrap { max-width: 860px; }
.bp-card-main { padding: 24px; margin-top: 14px; }
.bp-head { display: flex; align-items: center; gap: 16px; }
.bp-tile { flex: none; width: 72px; height: 96px; border-radius: 4px; overflow: hidden; display: block; }
.bp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-head-main { flex: 1; min-width: 0; }
.bp-kicker { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.bp-title { font-size: clamp(22px, 4vw, 30px); margin: 2px 0 6px; letter-spacing: -0.02em; }
.bp-who { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14px; }
.bp-who a { color: var(--text); font-weight: 600; text-decoration: none; }
.bp-who a:hover { text-decoration: underline; }
.bp-copy { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.bp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.bp-stats > div { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.bp-stats span { display: block; font-size: 12px; color: var(--text-dim); }
.bp-stats strong { display: flex; align-items: center; gap: 5px; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-stats .w { color: var(--win); } .bp-stats .l { color: var(--text-dim); }
.bp-picture { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 26px 20px; }
.bp-caption { text-align: center; margin: 14px 0 0; color: var(--text); font-size: 14px; }
.bp-caption.dim { color: var(--text-dim); margin-top: 4px; font-size: 13px; }
.bp-big { text-align: center; font-size: clamp(44px, 9vw, 72px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.bp-big.is-win { color: var(--win); } .bp-big.is-loss { color: var(--cherry); }
.bp-row-center { display: flex; align-items: center; justify-content: center; gap: 22px; }
.bp-vs { color: var(--text-dim); font-size: 22px; }
.bp-coin-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bp-coin-wrap small { color: var(--text-dim); font-size: 12px; }
.bp-coin { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px;
  background: #d4af37; color: #3b2c05; box-shadow: inset 0 0 0 5px #b8952a; }
.bp-coin-tails { background: #c9ccd3; color: #2a2c31; box-shadow: inset 0 0 0 5px #a9adb6; }
.bp-pocket { min-width: 56px; height: 56px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; background: #26232a; color: #fff; }
.bp-pocket-lg { min-width: 76px; height: 76px; font-size: 30px; }
.bp-red { background: #d1123f; } .bp-black { background: #1d1b20; border: 1px solid #3a363d; } .bp-green { background: #13965b; }
.bp-dice { max-width: 560px; margin: 0 auto; padding-top: 30px; }
.bp-dice-track { position: relative; height: 14px; border-radius: 999px; background: rgba(255,1,57,.55); }
.bp-dice-zone { position: absolute; top: 0; bottom: 0; background: var(--win); border-radius: 999px; }
.bp-dice-mark { position: absolute; top: 50%; width: 4px; height: 30px; margin-left: -2px; transform: translateY(-50%); background: #fff; border-radius: 2px; box-shadow: 0 0 0 3px rgba(0,0,0,.35); }
.bp-dice-mark b { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); background: #fff; color: #111; font-size: 13px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.bp-dice-scale { display: flex; justify-content: space-between; color: var(--text-dim); font-size: 12px; margin-top: 10px; }
.bp-plinko { display: grid; grid-template-columns: repeat(17, 1fr); gap: 3px; max-width: 640px; margin: 0 auto; }
.bp-plinko-cell { height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: #fff;
  background: color-mix(in srgb, var(--cherry) calc(var(--t) * 100%), #3a2a10); opacity: .55; }
.bp-plinko-cell.hit { opacity: 1; outline: 2px solid #fff; transform: translateY(-3px); }
.bp-keno { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-width: 420px; margin: 0 auto; }
.bp-keno-cell { aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: #1d1b20; color: var(--text-dim); }
.bp-keno-cell.pick { background: #2a272d; color: #fff; box-shadow: inset 0 0 0 2px var(--cherry); }
.bp-keno-cell.drawn { background: #2a272d; color: #fff; }
.bp-keno-cell.hit { background: var(--win); color: #062b1a; }
.bp-legend { display: flex; justify-content: center; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.bp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bp-legend i.hit { background: var(--win); } .bp-legend i.pick { box-shadow: inset 0 0 0 2px var(--cherry); } .bp-legend i.drawn { background: #4a464e; }
.bp-mines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 330px; margin: 0 auto; }
.bp-mine-cell { aspect-ratio: 1; border-radius: 10px; background: #26232a; display: flex; align-items: center; justify-content: center; }
.bp-mine-cell svg { width: 46%; height: 46%; }
.bp-mine-cell.gem { background: rgba(62,207,142,.16); color: var(--win); }
.bp-mine-cell.mine { background: rgba(255,1,57,.14); color: var(--cherry); }
.bp-bj { display: grid; gap: 18px; justify-items: center; }
.bp-bj-hand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bp-bj-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.bp-total { background: #2a272d; color: #fff; font-weight: 700; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.bp-cards { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bp-card { width: 52px; height: 74px; border-radius: 8px; background: #f7f5f2; color: #16141a; display: flex; flex-direction: column; justify-content: space-between; padding: 5px 7px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.bp-card b { font-size: 17px; line-height: 1; } .bp-card i { font-style: normal; font-size: 20px; align-self: flex-end; line-height: 1; }
.bp-card.red { color: #d1123f; }
.bp-fair { margin-top: 14px; padding: 20px 24px; }
.bp-fair-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 13.5px; }
.bp-fair-row span { color: var(--text-dim); }
.bp-fair-row code { font-family: var(--font-code); font-size: 12px; word-break: break-all; color: var(--text); }
.bp-fair .btn { margin-top: 14px; display: inline-block; }
.bp-cta { text-align: center; margin: 22px 0 0; }
@media (max-width: 640px) {
  .bp-head { flex-wrap: wrap; }
  .bp-tile { width: 54px; height: 72px; }
  .bp-copy { width: 100%; justify-content: center; }
  .bp-stats { grid-template-columns: repeat(2, 1fr); }
  .bp-fair-row { grid-template-columns: 1fr; gap: 2px; }
  .bp-plinko { gap: 2px; } .bp-plinko-cell { font-size: 8px; height: 26px; }
  .bp-card-main, .bp-fair { padding: 16px; }
}

/* history rows / activity rows that open a bet page */
tr[data-bet] { cursor: pointer; }
tr[data-bet]:hover td { background: rgba(255,255,255,.025); }

/* ---- Link-your-Discord banner ---- */
.discord-banner { display: flex; align-items: center; gap: 14px; padding: 10px 24px; flex-wrap: wrap;
  background: #1a1c33;
  border-bottom: 1px solid rgba(88,101,242,.35); font-size: 13.5px; transition: opacity .2s, transform .2s; }
.discord-banner.is-leaving { opacity: 0; transform: translateY(-6px); }
.db-logo { width: 34px; height: 34px; flex: none; border-radius: 9px; background: #5865f2; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.db-logo svg { width: 20px; height: 20px; }
.db-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 1px; }
.db-text strong { font-weight: 600; color: #fff; }
.db-text span { color: #c6cbf5; }
.db-actions { display: flex; align-items: center; gap: 6px; }
.btn.db-link { background: #5865f2; color: #fff; border: none; padding: 8px 16px; font-weight: 600; text-decoration: none; border-radius: 8px; }
.btn.db-link:hover { background: #4752c4; }
.db-later { border: none; background: transparent; color: #c6cbf5; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.db-later:hover { background: rgba(255,255,255,.07); color: #fff; }
@media (max-width: 640px) {
  .discord-banner { padding: 10px 16px; }
  .db-actions { width: 100%; }
  .btn.db-link { flex: 1; text-align: center; }
}

/* ---- Settings → Security: sessions ---- */
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title-row .btn { text-transform: none; letter-spacing: 0; font-weight: 500; }
.session-list { padding: 6px 20px; }
.session-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.session-row:last-child { border-bottom: none; }
.session-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--bg-raised); color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; }
.session-row.is-current .session-ic { color: var(--win); background: rgba(62,207,142,.1); }
.session-main { flex: 1; min-width: 0; }
.session-name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-sub { font-size: 12.5px; color: var(--text-dim); overflow-wrap: anywhere; }
.session-row .btn { display: inline-flex; align-items: center; gap: 5px; flex: none; }

/* ---- Display in fiat (wallet menu + bet box) ---- */
.bet-fiat-sym { color: var(--text-dim); font-weight: 600; margin-right: -4px; white-space: nowrap; }
.wpanel-display { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 8px 10px 8px 4px; }
.wpanel-display .wpanel-toggle { border-top: none; padding: 4px 6px; flex: 1; margin: 0; }
.wpanel-fiat { position: relative; }
.wpanel-fiat.is-off .wpanel-fiat-btn { opacity: .55; }
.wpanel-fiat-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wpanel-fiat-btn:hover { border-color: #46404a; }
.wpanel-fiat-list { position: absolute; left: 6px; right: 6px; top: 6px; bottom: 58px; overflow-y: auto; z-index: 5; padding: 5px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.wpanel-fiat-list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: none; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.wpanel-fiat-list button:hover, .wpanel-fiat-list button.active { background: var(--bg-raised); }
.wpanel-fiat-list button span { font-weight: 600; width: 36px; }
.wpanel-fiat-list small { color: var(--text-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vip-admin-grid { display: grid; grid-template-columns: 90px repeat(3, 1fr); gap: 8px 10px; align-items: center; font-size: 13px; }
.vip-admin-grid input { margin: 0; }
@media (max-width: 640px) { .vip-admin-grid { grid-template-columns: 70px repeat(3, 1fr); font-size: 12px; } }
.admin-fields > .vip-admin-grid { grid-column: 1 / -1; }

/* ---- VIP & Affiliates ---- */
.vip-wrap { max-width: 1040px; }
.vip-hero { display: flex; align-items: center; gap: 26px; padding: 28px; position: relative; overflow: hidden;
  background: var(--bg-card); border-left: 3px solid var(--rank, var(--cherry)); }
.vip-hero h1 { font-size: clamp(26px, 4vw, 36px); margin: 2px 0 6px; letter-spacing: -0.02em; }
.vip-hero p { color: var(--text-dim); max-width: 620px; }
.vip-hero .btn { margin-top: 14px; }
.vip-hero-rank { flex: none; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--rank) 60%, transparent)); }
.vip-hero-main { flex: 1; min-width: 0; }
.vip-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.vip-bar { height: 10px; border-radius: 999px; background: var(--bg-raised); overflow: hidden; margin-top: 14px; }
.vip-bar span { display: block; height: 100%; border-radius: 999px; transition: width .6s ease; }
.vip-bar-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--text-dim); }
.vip-bar-meta span { display: inline-flex; align-items: center; gap: 5px; }
.vip-bar-meta strong { color: var(--text); }
.vip-claims { display: grid; gap: 10px; margin-top: 14px; }
.vip-claim { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-top: 0; }
.vip-claim.is-hot { border-color: rgba(255,1,57,.45); }
.vip-claim-main { flex: 1; min-width: 0; }
.vip-claim-act { display: flex; align-items: center; gap: 12px; flex: none; }
.vip-claim-act strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.vip-table-card { padding: 0; overflow: hidden; }
.vip-table-scroll { overflow-x: auto; }
.vip-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.vip-table th, .vip-table td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.vip-table tbody tr:last-child td { border-bottom: none; }
.vip-table .vip-row-label { text-align: left; color: var(--text-dim); font-size: 13px; }
.vip-th { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vip-th small { color: var(--text-dim); font-weight: 500; font-size: 11.5px; }
.vip-table .is-current { background: color-mix(in srgb, var(--rank, var(--cherry)) 9%, transparent); }
.vip-table td.is-current { font-weight: 600; }
.vip-table td.is-locked { color: var(--text-dim); }
.vip-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.vip-how .card { padding: 20px; }
.vip-how h3 { margin: 10px 0 4px; font-size: 16px; }
.vip-how p { color: var(--text-dim); font-size: 13.5px; margin: 0; }
.vip-how-ic { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,1,57,.12); color: var(--cherry); }
.aff-link { display: flex; gap: 8px; align-items: stretch; }
.aff-link code { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line);
  font-family: var(--font-code); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aff-link .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.aff-code { margin-top: 14px; max-width: 420px; }
.aff-code-row { display: flex; gap: 8px; }
.aff-code-row input { margin: 0; }
.aff-stats { grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.aff-stats .stat-card { padding: 14px 16px; }
.aff-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
@media (max-width: 720px) {
  .vip-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 14px; }
  .vip-how { grid-template-columns: 1fr; }
  .aff-stats { grid-template-columns: repeat(2, 1fr); }
  .vip-claim { flex-wrap: wrap; }
  .vip-claim-act { width: 100%; justify-content: space-between; }
}
.aff-code-row .btn { white-space: nowrap; flex: none; }

/* Section headers without the subtitle/divider */
.hero.hero-plain { padding: 36px 0 4px; border-bottom: none; }
.hero.hero-plain h1 { margin: 0; }
/* Page loading spinner */
.page-loading { display: flex; justify-content: center; padding: 80px 0; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--cherry); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Built-in profile pictures */
.avatar-picker { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.avatar-picker-label { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.avatar-picker-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-choice { width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; overflow: hidden; }
.avatar-choice img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.avatar-choice:hover { border-color: var(--line); }
.avatar-choice.active { border-color: var(--cherry); }
.legal-doc a { color: var(--cherry); }
.legal-doc code { font-family: var(--font-code); font-size: 12.5px; background: var(--bg-raised); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.btn.danger-fill { background: #b3001f; }
.btn.danger-fill:hover { background: #8f0019; }
