:root {
  color-scheme: dark;
  --bg: #070b1d;
  --bg-raised: #0c1330;
  --surface: rgb(19 28 62 / .72);
  --surface-strong: rgb(26 37 80 / .9);
  --border: rgb(160 186 255 / .13);
  --border-strong: rgb(160 186 255 / .26);
  --text: #eef1ff;
  --text-muted: #a2acce;
  --text-dim: #707ca3;
  --gold: #ffcf5c;
  --gold-light: #ffe49a;
  --gold-deep: #f2a62a;
  --gold-ink: #2b1900;
  --teal: #5ef0dc;
  --violet: #9d7bff;
  --danger: #ff7088;
  --success: #3ddc97;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px -24px rgb(0 0 0 / .7);
  --header-height: 64px;
  --container: 1200px;
  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px; min-height: 100dvh; display: flex; flex-direction: column;
  font: 15px/1.6 var(--font); color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(1100px 560px at 85% -12%, rgb(118 82 255 / .2), transparent 62%),
    radial-gradient(900px 520px at -5% 8%, rgb(40 200 230 / .13), transparent 62%);
  background-attachment: fixed;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background:
    radial-gradient(circle at 12% 30%, #d6f6ff 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 12%, #ffe9b8 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 78%, #b9c8ff 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 58%, #fff 0 .8px, transparent 1.3px);
  background-size: 310px 310px, 420px 420px, 380px 380px, 260px 260px;
}
main { flex: 1; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
svg { flex-shrink: 0; }
.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.muted { color: var(--text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Buttons */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap; text-decoration: none; background: none;
  transition: transform .15s, box-shadow .2s, background-color .2s, border-color .2s, color .2s, filter .2s;
}
.btn:not(:disabled):active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm { --h: 36px; padding: 0 15px; font-size: 14px; }
.btn-lg { --h: 52px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-gold {
  color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 8px 24px -10px rgb(255 190 70 / .75), inset 0 1px 0 rgb(255 255 255 / .55);
}
.btn-gold:hover:not(:disabled) { color: var(--gold-ink); filter: brightness(1.06); box-shadow: 0 10px 30px -10px rgb(255 190 70 / .95), inset 0 1px 0 rgb(255 255 255 / .55); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); background: rgb(255 255 255 / .03); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: rgb(160 186 255 / .45); background: rgb(255 255 255 / .07); }
.btn-text { color: var(--text-muted); padding-inline: 10px; }
.btn-text:hover:not(:disabled) { color: var(--text); background: rgb(255 255 255 / .05); }
.btn-danger { color: #ffd6dd; border-color: rgb(255 112 136 / .45); background: rgb(255 112 136 / .08); }
.btn-danger:hover:not(:disabled) { color: #fff; background: rgb(255 112 136 / .18); }
.btn[aria-busy="true"]::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30; height: var(--header-height);
  background: rgb(7 11 29 / .78); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.header-inner { height: 100%; width: min(var(--container), 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { border-radius: 22%; box-shadow: 0 0 16px -2px rgb(157 123 255 / .45); }
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-size: 18px; letter-spacing: .06em; }
.brand-text small { font-size: 9.5px; letter-spacing: .32em; color: var(--text-muted); font-weight: 600; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: var(--text-muted); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.main-nav a:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.main-nav a[aria-current="page"] { color: var(--text); background: rgb(255 255 255 / .08); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid transparent; background: none; color: var(--text-muted); font-size: 13px; font-weight: 600;
}
.lang-toggle:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.lang-toggle svg, .balance-pill svg, .avatar-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.balance-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 10px; border-radius: 999px;
  color: var(--gold-light); background: rgb(255 207 92 / .09); border: 1px solid rgb(255 207 92 / .28);
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}
.balance-pill:hover { color: var(--gold-light); background: rgb(255 207 92 / .15); }
.user-menu { position: relative; }
.avatar-button {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border-radius: 999px;
  border: 1px solid var(--border); background: rgb(255 255 255 / .03); color: var(--text-muted);
}
.avatar-button:hover, .avatar-button[aria-expanded="true"] { color: var(--text); border-color: var(--border-strong); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: 14px; color: var(--gold-ink); background: linear-gradient(140deg, var(--gold-light), var(--gold-deep));
}
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 14px; font-weight: 500; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px;
  background: #121a3d; border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow);
  display: grid;
}
.menu-head { padding: 10px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: grid; }
.menu-head small { color: var(--text-dim); }
.menu a, .menu button {
  display: block; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--text-muted);
  font-size: 14px; border: 0; background: none; width: 100%;
}
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { color: var(--text); background: rgb(255 255 255 / .06); outline: none; }
.menu button[data-action="logout"] { color: #ffb3c0; border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; margin-top: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 72px; background: rgb(5 8 22 / .6); }
.footer-inner { width: min(var(--container), 100% - 32px); margin-inline: auto; padding: 32px 0 36px; display: grid; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-brand span { color: var(--text-dim); font-size: 14px; }
.footer-note { color: var(--text-muted); font-size: 13px; max-width: 760px; }
.footer-copy { color: var(--text-dim); font-size: 12px; }

/* Shared pieces */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); background: rgb(94 240 220 / .08); border: 1px solid rgb(94 240 220 / .25);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 4px 11px; border-radius: 999px; font-size: 13px; color: var(--text-muted);
  background: rgb(255 255 255 / .05); border: 1px solid var(--border);
}
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.section { margin-top: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; }
.section-head p { color: var(--text-muted); }

/* Toasts */
.toast-host { position: fixed; z-index: 60; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; gap: 10px; width: min(420px, 100% - 32px); pointer-events: none; }
.toast {
  padding: 13px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; text-align: center;
  background: #18224a; border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  animation: toastIn .25s ease-out; transition: opacity .3s, transform .3s;
}
.toast-success { border-color: rgb(61 220 151 / .5); color: #c9ffe5; }
.toast-error { border-color: rgb(255 112 136 / .55); color: #ffd6dd; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* Home: hero */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--border); }
/* Slides stack in one grid cell and crossfade; only .is-active is visible and focusable. */
.hero-track { display: grid; }
.hero-slide { grid-area: 1 / 1; position: relative; isolation: isolate; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 56px; z-index: 2; display: flex; gap: 8px; }
.hero-dots button {
  width: 26px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgb(255 255 255 / .25);
  transition: width .3s, background-color .3s;
}
.hero-dots button:hover { background: rgb(255 255 255 / .45); }
.hero-dots button[aria-current="true"] { width: 44px; background: var(--gold); }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(7 11 29 / .96) 0%, rgb(7 11 29 / .82) 38%, rgb(7 11 29 / .2) 72%, rgb(7 11 29 / .45) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: center; gap: 48px; min-height: 540px; padding: 64px 0 72px; }
.hero-copy { display: grid; gap: 20px; justify-items: start; max-width: 600px; }
.hero-title, .detail-copy h1 {
  font-size: clamp(40px, 6vw, 68px); font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff 30%, #ffe2a0); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgb(0 0 0 / .5));
}
.hero-lead { font-size: 19px; color: #dfe5ff; }
.hero-desc { color: var(--text-muted); max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero-note { font-size: 13px; color: var(--text-dim); }
.hero-poster {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10;
  border: 1px solid rgb(255 220 150 / .35); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .8), 0 0 60px -10px rgb(255 190 80 / .3);
  transform: rotate(1.5deg);
}
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.hero-poster figcaption {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgb(7 11 29 / .75); border: 1px solid var(--border-strong); backdrop-filter: blur(6px);
}
.hero-skeleton { min-height: 540px; }

/* Home: welcome / join strip */
.welcome {
  margin-top: -36px; position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 24px 28px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgb(32 44 96 / .95), rgb(22 30 70 / .95));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.welcome h2 { font-size: 21px; }
.welcome p { color: var(--text-muted); margin-top: 4px; }
.welcome-balance { display: grid; }
.welcome-balance small { color: var(--text-muted); font-size: 13px; }
.welcome-balance strong { font-size: 30px; color: var(--gold-light); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.welcome-user { display: flex; align-items: center; gap: 16px; }
.welcome-user .avatar { width: 52px; height: 52px; font-size: 22px; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Home: game grid */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.game-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.game-card:not(.is-soon):hover { transform: translateY(-4px); border-color: rgb(255 207 92 / .4); box-shadow: 0 24px 50px -24px rgb(255 190 80 / .35); }
.game-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0e1636; }
.game-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.game-card:hover .game-card-media img { transform: scale(1.04); }
.card-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.badge {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4;
  color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-light), var(--gold));
}
.badge-new { color: #03231e; background: linear-gradient(180deg, #a8fff2, var(--teal)); }
.fav-button {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; border: 1px solid rgb(255 255 255 / .22);
  background: rgb(7 11 29 / .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .15s, color .2s, background-color .2s;
}
.fav-button:hover { background: rgb(7 11 29 / .8); }
.fav-button:active { transform: scale(.92); }
.fav-button svg, .fav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fav-button[aria-pressed="true"], .fav-toggle[aria-pressed="true"] { color: #ff7088; }
.fav-button[aria-pressed="true"] svg, .fav-toggle[aria-pressed="true"] svg { fill: currentColor; }
.fav-toggle[aria-pressed="true"] { border-color: rgb(255 112 136 / .5); }
.game-card-body { display: grid; gap: 12px; padding: 18px 20px 20px; flex: 1; align-content: start; }
.game-card-body h3 { font-size: 19px; }
.game-card-body h3 a { color: var(--text); }
.game-card-body h3 a:hover { color: var(--gold-light); }
.game-card-body p { color: var(--text-muted); font-size: 14px; }
.game-card-actions { display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.card-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: var(--gold-light);
  background: radial-gradient(circle at 50% 45%, rgb(255 207 92 / .2), transparent 60%), linear-gradient(150deg, #1b2556, #0b1230);
}
.card-fallback img { width: 40%; height: auto; object-fit: contain; }
.game-card.is-soon { border-style: dashed; background: rgb(19 28 62 / .4); }
.soon-art { display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgb(157 123 255 / .25), transparent 60%), #0b1230; }
.soon-art svg { width: 54px; height: 54px; fill: none; stroke: rgb(190 175 255 / .7); stroke-width: 1.2; }
.soon-art .badge { color: var(--text); background: rgb(157 123 255 / .35); }

/* Home: filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filters:empty { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 15px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgb(255 255 255 / .03); color: var(--text-muted); font-size: 14px; font-weight: 600;
  transition: color .2s, background-color .2s, border-color .2s;
}
.filter-chip span { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 12px; background: rgb(255 255 255 / .08); text-align: center; }
.filter-chip:hover { color: var(--text); border-color: rgb(160 186 255 / .45); }
.filter-chip[aria-pressed="true"] { color: var(--gold-ink); border-color: transparent; background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.filter-chip[aria-pressed="true"] span { background: rgb(43 25 0 / .15); }
.game-grid > .empty { grid-column: 1 / -1; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }

/* Home: recently played */
#recent-section { margin-top: 48px; }
.recent-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.recent-tile {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius);
  color: var(--text); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.recent-tile:hover { color: var(--text); border-color: rgb(255 207 92 / .4); transform: translateY(-2px); }
.recent-thumb { position: relative; flex-shrink: 0; width: 76px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #0e1636; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-thumb .card-fallback { font-size: 22px; }
.recent-text { display: grid; flex: 1; min-width: 0; }
.recent-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-text small { color: var(--text-dim); font-size: 12.5px; }
.recent-go { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-size: 14px; font-weight: 600; }
.recent-go svg { width: 14px; height: 14px; fill: currentColor; }

/* Game detail */
.detail-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--border); padding: 28px 0 56px; }
.detail-media { position: absolute; inset: 0; z-index: -1; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; filter: blur(2px) saturate(1.1); transform: scale(1.04); }
.detail-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(7 11 29 / .7), rgb(7 11 29 / .9) 60%, var(--bg)); }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--text-dim); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--text); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 44px; align-items: center; margin-top: 28px; }
.detail-art {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: #0e1636;
  border: 1px solid rgb(255 220 150 / .3); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .8), 0 0 60px -10px rgb(255 190 80 / .25);
}
.detail-art img { width: 100%; height: 100%; object-fit: cover; }
.detail-art .card-fallback { font-size: 96px; }
.detail-copy { display: grid; gap: 18px; justify-items: start; }
.detail-copy .card-badges { position: static; }
.detail-hint { font-size: 13px; color: var(--text-dim); }
.detail-about { margin-top: 40px; padding: 26px 28px; display: grid; gap: 14px; }
.detail-about h2 { font-size: 20px; }
.detail-about p { color: #cfd6f5; max-width: 760px; }
.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 6px 0 0; font-size: 14px; }
.facts-list dt { color: var(--text-dim); }
.facts-list dd { margin: 0; }

/* Home: perks */
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.perk { padding: 24px; display: grid; gap: 10px; align-content: start; }
.perk-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  color: var(--teal); background: rgb(94 240 220 / .09); border: 1px solid rgb(94 240 220 / .25);
}
.perk-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.perk h3 { font-size: 17px; }
.perk p { color: var(--text-muted); font-size: 14px; }

/* Auth pages */
.auth-page { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100dvh - var(--header-height)); }
.auth-art { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; padding: 48px; }
.auth-art img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.auth-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(7 11 29 / .95), rgb(7 11 29 / .2) 60%), linear-gradient(270deg, var(--bg), transparent 30%); }
.auth-art-copy { display: grid; gap: 10px; max-width: 460px; }
.auth-art-copy h2 { font-size: 30px; }
.auth-art-copy p { color: #cfd6f5; }
.auth-panel { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: min(420px, 100%); display: grid; gap: 18px; }
.auth-card h1 { font-size: 30px; }
.auth-card .switch { color: var(--text-muted); margin-top: -8px; }
.form-alert {
  padding: 11px 14px; border-radius: 12px; font-size: 14px;
  color: #ffd6dd; background: rgb(255 112 136 / .1); border: 1px solid rgb(255 112 136 / .4);
}
.field { display: grid; gap: 7px; }
.field label, .field .label { font-size: 14px; font-weight: 600; color: #d6dcf5; }
.field-hint { font-size: 12.5px; color: var(--text-dim); }
.field-error { font-size: 12.5px; color: var(--danger); }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgb(6 10 28 / .65); color: var(--text); font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--text-dim); }
.input:hover { border-color: rgb(160 186 255 / .4); }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgb(94 240 220 / .18); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(255 112 136 / .2); }
.input:read-only { color: var(--text-muted); background: rgb(255 255 255 / .03); }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 50px; }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 9px;
  border: 0; background: none; color: var(--text-dim); display: grid; place-items: center;
}
.reveal:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.reveal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.reveal .icon-hide, .reveal[aria-pressed="true"] .icon-show { display: none; }
.reveal[aria-pressed="true"] .icon-hide { display: block; }
.strength { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; align-items: center; }
.strength i { height: 4px; border-radius: 4px; background: rgb(255 255 255 / .1); transition: background-color .2s; }
.strength span { font-size: 12px; color: var(--text-dim); min-width: 84px; text-align: right; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--gold); }
.strength[data-level="3"] i { background: var(--success); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); flex-shrink: 0; }

/* Account */
.account-page { padding-top: 36px; }
.profile {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: radial-gradient(600px 200px at 0% 0%, rgb(255 207 92 / .14), transparent 70%), linear-gradient(120deg, rgb(30 42 92 / .9), rgb(18 26 62 / .9));
}
.profile .avatar { width: 72px; height: 72px; font-size: 30px; box-shadow: 0 0 0 4px rgb(255 207 92 / .18); }
.profile-text { display: grid; gap: 2px; flex: 1; min-width: 200px; }
.profile-text h1 { font-size: 26px; overflow-wrap: anywhere; }
.profile-text p { color: var(--text-muted); font-size: 14px; }
.tabs { display: flex; gap: 4px; margin: 26px 0 22px; box-shadow: inset 0 -1px 0 var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 12px 16px; color: var(--text-muted); font-weight: 600; font-size: 15px; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr); gap: 18px; }
.wallet-card {
  padding: 24px; display: grid; gap: 14px; align-content: start;
  background: linear-gradient(150deg, rgb(255 207 92 / .14), rgb(19 28 62 / .7) 55%); border-color: rgb(255 207 92 / .3);
}
.wallet-card h2 { font-size: 15px; color: var(--text-muted); font-weight: 600; }
.wallet-amount { font-size: 38px; font-weight: 800; color: var(--gold-light); font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.wallet-amount small { font-size: 15px; font-weight: 600; color: var(--text-muted); margin-left: 6px; letter-spacing: 0; }
.wallet-note { font-size: 13px; color: var(--text-dim); }
.wallet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; display: grid; gap: 4px; }
.stat span { font-size: 13px; color: var(--text-muted); }
.stat strong { font-size: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.panel { padding: 22px 24px; margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 18px; }
.table-wrap { overflow-x: auto; }
.rounds { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rounds th { text-align: left; font-weight: 600; color: var(--text-dim); font-size: 12.5px; padding: 0 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rounds td { padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rounds tr:last-child td { border-bottom: 0; }
.rounds .num { text-align: right; }
.rounds .win-positive { color: var(--success); font-weight: 600; }
.round-type { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: rgb(255 255 255 / .06); color: var(--text-muted); }
.round-type.is-bonus { background: rgb(157 123 255 / .16); color: #d6c9ff; }
.round-type.is-trigger { background: rgb(255 207 92 / .15); color: var(--gold-light); }
.empty { padding: 36px 12px; text-align: center; color: var(--text-muted); display: grid; gap: 14px; justify-items: center; }
.load-more { display: flex; justify-content: center; margin-top: 16px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings-card { padding: 24px; display: grid; gap: 16px; }
.settings-card h2 { font-size: 18px; }
.settings-card > p { color: var(--text-muted); font-size: 14px; margin-top: -8px; }
.settings-card form { display: grid; gap: 14px; }
.settings-card form .btn { justify-self: start; }
.rg-card { grid-column: 1 / -1; }
.rg-card h3 { font-size: 16px; }
.limit-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rg-divider { height: 1px; background: var(--border); margin: 4px 0; }
.exclusion-row { display: flex !important; gap: 10px; align-items: center; flex-wrap: wrap; }
.exclusion-row .input { width: auto; min-width: 160px; }
select.input { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.funds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.round-type.kind-deposit, .round-type.kind-win { background: rgb(61 220 151 / .14); color: #a6f5cf; }
.round-type.kind-withdrawal { background: rgb(255 207 92 / .14); color: var(--gold-light); }
.round-type.kind-withdrawal_refund, .round-type.kind-adjustment { background: rgb(157 123 255 / .16); color: #d6c9ff; }

/* Play */
.play-body { height: 100dvh; overflow: hidden; }
.play-page { display: flex; flex-direction: column; height: calc(100dvh - var(--header-height)); }
.play-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: rgb(7 11 29 / .6); }
.play-toolbar h1 { font-size: 16px; font-weight: 700; }
.play-toolbar .btn svg { width: 16px; height: 16px; }
.conn-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); margin-left: auto; }
.conn-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.conn-status[data-state="connected"]::before { background: var(--success); box-shadow: 0 0 10px var(--success); }
.conn-status[data-state="error"] { color: #ffb3c0; }
.conn-status[data-state="error"]::before { background: var(--danger); }
.conn-status[data-state="connecting"]::before { animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .3; } }
.play-frame-wrap { position: relative; flex: 1; min-height: 0; background: #050a1c; }
.play-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.play-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(5 8 22 / .82); backdrop-filter: blur(6px); }
.play-overlay .card { padding: 28px; max-width: 400px; display: grid; gap: 12px; text-align: center; justify-items: center; }
.play-overlay h2 { font-size: 21px; }
.play-overlay p { color: var(--text-muted); }

/* 404 */
.not-found { display: grid; place-items: center; text-align: center; padding: 96px 16px; gap: 14px; }
.not-found strong { font-size: 96px; line-height: 1; font-weight: 800; background: linear-gradient(180deg, #fff, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h1 { font-size: 26px; }
.not-found p { color: var(--text-muted); }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding: 48px 0 72px; }
  .hero-poster { display: none; }
  .hero-dots { bottom: 52px; }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .detail-art { max-width: 560px; width: 100%; }
  .overview-grid, .settings-grid, .funds-grid { grid-template-columns: 1fr; }
  .limit-row { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
/* Phone layout: bottom tab bar, compact lobby, full-screen play. */
.tabbar { display: none; }
@media (max-width: 720px) {
  :root { --header-height: 58px; --tabbar-height: 60px; }
  .header-inner { gap: 12px; }
  .main-nav, .user-name { display: none; }
  .brand-text small { display: none; }
  .avatar-button { padding-right: 6px; }
  .lang-toggle { padding: 0 8px; }

  /* Bottom navigation, clear of the home indicator. */
  body.has-tabbar { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgb(7 11 29 / .92); border-top: 1px solid var(--border);
    backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--text-dim); font-size: 11px; font-weight: 600; }
  .tabbar a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--gold); }
  .tabbar a[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgb(255 207 92 / .55)); }
  .has-tabbar .toast-host { bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 14px); }
  .site-footer { margin-top: 48px; }

  /* Lobby: a short banner, then games as soon as possible. */
  .hero-inner { padding: 28px 0 60px; gap: 0; }
  .hero-copy { gap: 12px; }
  .hero-slide .chips { display: none; }
  .hero-title { font-size: 34px; }
  .hero-lead { font-size: 15px; }
  .hero-actions { margin-top: 2px; }
  .hero-actions .btn-lg { --h: 44px; padding: 0 20px; font-size: 15px; }
  .hero-dots { bottom: 44px; }
  .hero-media::after { background: linear-gradient(180deg, rgb(7 11 29 / .5), rgb(7 11 29 / .82) 55%, var(--bg)); }
  .welcome { margin-top: -28px; padding: 16px; gap: 14px; }
  .welcome h2 { font-size: 17px; }
  .welcome-balance strong { font-size: 24px; }
  .welcome-user { gap: 12px; }
  .welcome-user .avatar { width: 44px; height: 44px; font-size: 18px; }
  .welcome-actions .btn { --h: 38px; padding: 0 16px; font-size: 14px; }
  .section { margin-top: 36px; }
  #recent-section { margin-top: 28px; }
  .section-head { margin-bottom: 14px; gap: 6px; }
  .section-head h2 { font-size: 21px; }
  .section-head p { font-size: 13px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding-inline: 16px; scroll-margin-top: calc(var(--header-height) + 12px); }
  .filter-chip { flex-shrink: 0; height: 34px; }

  /* Two compact cards per row; the whole card opens the detail page. */
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .game-card { border-radius: 16px; }
  .game-card-media { aspect-ratio: 4 / 3; }
  .game-card-body { padding: 10px 12px 12px; gap: 2px; }
  .game-card-body h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .game-card-body h3 a::after { content: ''; position: absolute; inset: 0; }
  .game-card-body > p, .game-card .chips, .game-card-actions { display: none; }
  .fav-button { z-index: 2; top: 8px; right: 8px; width: 34px; height: 34px; }
  .card-badges { top: 8px; left: 8px; gap: 4px; }
  .badge { padding: 2px 8px; font-size: 11px; }
  .card-fallback { font-size: 44px; }
  .soon-art svg { width: 40px; height: 40px; }
  /* A trailing placeholder alone on the last row of two is just noise. */
  .game-grid > .is-soon:last-child:nth-child(odd) { display: none; }
  .recent-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; gap: 10px; }
  .recent-tile { flex: 0 0 82%; scroll-snap-align: start; }
  .perks { grid-template-columns: 1fr; gap: 12px; }
  .perk { padding: 18px; }

  /* Detail page */
  .detail-hero { padding: 18px 0 36px; }
  .detail-grid { margin-top: 16px; }
  .detail-copy { gap: 14px; }
  .detail-copy h1 { font-size: 34px; }
  .detail-copy .hero-actions { width: 100%; }
  .detail-copy .hero-actions .btn { flex: 1; }
  .detail-about { margin-top: 28px; padding: 20px; }

  /* Account */
  .profile { padding: 20px; gap: 14px; }
  .profile .avatar { width: 56px; height: 56px; font-size: 24px; }
  .profile-text h1 { font-size: 22px; }
  .tabs { margin: 18px 0 16px; }
  .wallet-amount { font-size: 32px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat strong { font-size: 19px; }
  .panel { padding: 18px 16px; }
  .rounds th, .rounds td { padding-inline: 8px; }

  /* Forms: 16px text stops iOS from zooming into a focused field. */
  .input { font-size: 16px; }
  .auth-panel { padding: 28px 16px 40px; place-items: start center; }

  /* Play: the game gets the whole screen; a slim bar keeps the way back. */
  .play-body .site-header { display: none; }
  .play-page { height: 100dvh; }
  .play-toolbar { padding: max(6px, env(safe-area-inset-top)) 10px 6px; gap: 8px; }
  .play-toolbar h1 { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .play-toolbar [data-action="fullscreen"] { display: none; }
}
@media (max-width: 420px) {
  .header-actions { gap: 6px; }
  .balance-pill { padding: 0 10px 0 8px; font-size: 13px; }
  .header-actions .btn-sm { padding: 0 12px; }
  /* Room for the brand name next to the balance: the globe alone switches language. */
  .lang-toggle span { display: none; }
  .brand { min-width: 0; flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Funds: wallets and deposits */
.settings-card .label, .wallet-list .label, .recent-deposits .label, .wallet-picker .label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.network-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.wallet-list, .recent-deposits, .wallet-picker { display: grid; gap: 6px; }
.wallet-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.wallet-row code, .direct-transfer code { font-size: 13px; color: var(--text); background: rgb(255 255 255 / .06); padding: 3px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.wallet-row strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.wallet-choice img { border-radius: 5px; }
.deposit-form { display: grid; gap: 12px; }
.deposit-form .btn { justify-self: start; }
.deposit-status { min-height: 1.4em; font-size: 14px; color: var(--teal); }
.direct-transfer { border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 8px; }
.direct-transfer summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.direct-transfer[open] { gap: 10px; }

/* Phone wallets (WalletConnect) */
.wallet-choice svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wc-panel { display: grid; gap: 10px; justify-items: start; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: rgb(6 10 28 / .5); }
.wc-apps { display: flex; flex-wrap: wrap; gap: 8px; }
.wc-qr { width: 232px; aspect-ratio: 1; padding: 12px; border-radius: 14px; background: #fff; display: grid; place-items: center; }
.wc-qr svg { width: 100%; height: 100%; display: block; }
.wc-qr-wait { font-size: 13px; color: #555; }

/* Sign-in pop-up and shared auth pieces (auth-ui.js) */
.auth-dialog {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 34px 28px 28px; overflow-y: auto;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); color: var(--text);
  background: radial-gradient(500px 220px at 0% 0%, rgb(255 207 92 / .1), transparent 70%), linear-gradient(160deg, #141c44, #0b1130);
  box-shadow: 0 40px 120px -30px rgb(0 0 0 / .9);
}
.auth-dialog::backdrop { background: rgb(3 6 18 / .72); backdrop-filter: blur(4px); }
.auth-dialog[open] { animation: dialog-in .22s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.auth-dialog .auth-card { width: 100%; }
.auth-dialog .auth-card h1 { font-size: 26px; padding-right: 36px; }
.dialog-open { overflow: hidden; }
.dialog-close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 10px; border: 0;
  display: grid; place-items: center; color: var(--text-muted); background: rgb(255 255 255 / .04);
}
.dialog-close:hover { color: var(--text); background: rgb(255 255 255 / .09); }
.dialog-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.auth-card form { display: grid; gap: 16px; }
.auth-card form[hidden] { display: none; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-link { font-size: 13px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; border-radius: 12px; background: rgb(6 10 28 / .6); border: 1px solid var(--border); }
.segmented button { height: 38px; border: 0; border-radius: 9px; background: none; color: var(--text-muted); font-weight: 600; font-size: 14px; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-selected="true"] { color: var(--text); background: rgb(255 255 255 / .09); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.code-row .input { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.code-send { height: 48px; min-width: 116px; white-space: nowrap; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-alt { display: grid; gap: 10px; }
.auth-alt .btn, .auth-google { gap: 10px; }
.auth-alt svg, .auth-google svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-alt svg.brand-icon, .auth-google svg.brand-icon { stroke: none; }
.auth-consent { font-size: 12.5px; color: var(--text-dim); text-align: center; }
.auth-card .wallet-picker:not([hidden]) { display: grid; gap: 10px; }

/* Account → sign-in methods and devices (account-security.js) */
.method-list { list-style: none; margin: 0; padding: 0; display: grid; }
.method-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.method-list li:first-child { border-top: 0; padding-top: 0; }
.method-list li > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.method-list strong { font-size: 14.5px; }
.method-list small { color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.method-status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--text-dim); background: rgb(255 255 255 / .05); white-space: nowrap; }
.method-status.is-on { color: var(--success); background: rgb(61 220 151 / .1); }
#email-form { padding-top: 14px; border-top: 1px solid var(--border); }
#email-form[hidden] { display: none; }
.row-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 420px) {
  .auth-dialog { padding: 28px 18px 22px; }
  .code-send { min-width: 0; padding-inline: 12px; }
}

/* Sports and esports (sports.js, sport-event.js, betslip.js) */
.sports-page { display: grid; grid-template-columns: 210px minmax(0, 1fr) 310px; gap: 22px; align-items: start; padding-top: 26px; padding-bottom: 48px; }
.sports-page.is-detail { grid-template-columns: minmax(0, 1fr) 310px; }
.sports-rail { position: sticky; top: calc(var(--header-height) + 16px); display: grid; gap: 14px; }
.sports-mode { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 12px; background: rgb(6 10 28 / .6); border: 1px solid var(--border); }
.sports-mode a { text-align: center; padding: 8px 0; border-radius: 9px; color: var(--text-muted); font-weight: 700; font-size: 14px; }
.sports-mode a[aria-current="page"] { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
#sports-rail { display: grid; gap: 2px; }
.rail-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--text-muted); font-size: 14px; font-weight: 600; }
.rail-item:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.rail-item.is-active { color: var(--text); background: rgb(255 255 255 / .08); }
.rail-item.is-sub { padding-left: 24px; font-weight: 500; font-size: 13.5px; }
.rail-leagues { display: grid; gap: 2px; }
.rail-count { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px rgb(255 112 136 / .2); }
.live-pill { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .03em; color: #fff; background: var(--danger); vertical-align: 1px; }
.sports-heading { font-size: 24px; margin-bottom: 14px; }
.sports-empty { padding: 48px 12px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.match-group { margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.match-group-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.9fr) 64px; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / .02); }
.match-group-head h2 { font-size: 15px; grid-column: 1 / 3; }
.col-heads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; color: var(--text-dim); text-align: center; }
.match-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.9fr) 64px; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.match-group-head + .match-row, .league-head + .match-row { border-top: 0; }
/* Status column: minute / set / map or kick-off time, with a small line under it. */
.match-clock { display: grid; gap: 2px; align-content: center; min-width: 0; }
.match-clock b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-clock span { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-clock.is-live b { color: var(--danger); }
.match-clock.is-live span { color: rgb(255 112 136 / .8); }
/* One heading per league inside a group. */
.league-head { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--border); background: rgb(255 255 255 / .025); font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.match-group-head + .league-head { border-top: 0; }
.league-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-count { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.league-icon { font-size: 14px; line-height: 1; }
.game-tag { padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); font-size: 10.5px; font-weight: 800; letter-spacing: .02em; color: var(--gold-light); }
/* All of a row's markets suspended: one quiet line instead of a grid of locks. */
.match-markets.is-off { display: block; }
.mkt-off { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 10px; background: rgb(255 255 255 / .03); color: var(--text-dim); font-size: 13px; }
.mkt-off svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.match-row.is-live { background: linear-gradient(90deg, rgb(255 112 136 / .06), transparent 40%); }
.match-teams { display: grid; gap: 5px; color: var(--text); min-width: 0; }
.match-teams:hover { color: var(--text); }
.match-teams:hover .team-name { color: var(--gold-light); }
.match-status { font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.map-score { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.team-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.team-score { font-variant-numeric: tabular-nums; color: var(--gold-light); min-width: 14px; text-align: right; }
.team-badge {
  --team: #5b6aa8; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  font-size: 9.5px; font-weight: 800; letter-spacing: -.02em; color: #fff; background: var(--team);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); text-shadow: 0 1px 2px rgb(0 0 0 / .5);
}
/* Logos sit on a light disc so dark crests stay visible on the dark theme. */
.team-badge.has-logo { background: #f4f6fb; padding: 3px; box-shadow: none; overflow: hidden; }
.team-badge.has-logo img { width: 100%; height: 100%; object-fit: contain; }
.match-markets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mkt-cell { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.mkt-cell.is-empty { place-items: center; color: var(--text-dim); }
.match-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 3px; text-align: center; font-size: 12px; line-height: 1.4; color: var(--text-muted); font-weight: 600; }
.match-more b { color: var(--text); }
.match-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.match-more:hover { color: var(--gold-light); }
.odds-btn {
  display: grid; gap: 1px; justify-items: center; align-content: center; min-height: 48px; padding: 5px 4px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: rgb(6 10 28 / .55); color: var(--text); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.odds-btn:hover:not(:disabled) { border-color: rgb(255 207 92 / .55); background: rgb(255 207 92 / .06); }
.odds-btn[aria-pressed="true"] { border-color: var(--gold); background: rgb(255 207 92 / .16); box-shadow: inset 0 0 0 1px var(--gold); }
.odds-btn:disabled { cursor: not-allowed; opacity: .5; }
.odds-label { font-size: 11.5px; color: var(--text-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds-value { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--gold-light); }
.odds-value svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; }
.odds-btn.is-compact .odds-label { font-size: 11px; }
.odds-btn.is-up { animation: odds-up 1.6s ease-out; }
.odds-btn.is-down { animation: odds-down 1.6s ease-out; }
@keyframes odds-up { from { border-color: var(--success); background: rgb(61 220 151 / .18); } }
@keyframes odds-down { from { border-color: var(--danger); background: rgb(255 112 136 / .18); } }
.scoreboard { padding: 18px 20px 22px; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); display: grid; gap: 14px;
  background: radial-gradient(500px 200px at 50% 0%, rgb(255 207 92 / .1), transparent 70%), linear-gradient(160deg, rgb(30 42 92 / .9), rgb(16 23 56 / .9)); }
.scoreboard.is-live { border-color: rgb(255 112 136 / .45); }
.sb-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.sb-team { display: grid; justify-items: center; gap: 8px; text-align: center; min-width: 0; }
.sb-team strong { font-size: 17px; overflow-wrap: anywhere; }
.sb-team .team-badge { width: 54px; height: 54px; font-size: 15px; }
.sb-center { display: grid; justify-items: center; gap: 4px; }
.sb-score { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sb-score span { color: var(--text-dim); margin: 0 6px; }
.sb-time { font-size: 20px; font-weight: 700; }
.sb-status { font-size: 13px; }
.sb-maps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font-size: 13px; color: var(--text-muted); }
.sb-maps b { color: var(--text); font-variant-numeric: tabular-nums; }
.market-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 18px 0 12px; }
.market-tabs button { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: none; color: var(--text-muted); font-weight: 600; font-size: 13.5px; }
.market-tabs button[aria-selected="true"] { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-light), var(--gold)); border-color: transparent; }
.market-tabs button[aria-selected="true"] .muted { color: inherit; opacity: .7; }
.market-list { display: grid; gap: 12px; margin-top: 16px; }
.market-tabs + .market-list { margin-top: 0; }
.market-card { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: grid; gap: 10px; }
.market-card h3 { font-size: 14.5px; }
.market-sels { display: grid; gap: 8px; }
.market-sels.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-sels.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sports-note { margin-top: 18px; font-size: 12.5px; color: var(--text-dim); }
.bet-slip { position: sticky; top: calc(var(--header-height) + 16px); border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-strong); overflow: hidden; }
.slip-head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / .03); color: var(--text); font-weight: 700; font-size: 15px; pointer-events: none; }
.slip-count { min-width: 22px; height: 22px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 12px; color: var(--gold-ink); background: var(--gold); }
.slip-body { display: grid; gap: 14px; padding: 16px; }
.slip-empty { color: var(--text-muted); font-size: 14px; text-align: center; padding: 18px 0; }
.slip-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: rgb(6 10 28 / .55); border: 1px solid var(--border); }
.slip-pick > div:first-child { display: grid; gap: 2px; min-width: 0; }
.slip-pick small { font-size: 12px; overflow-wrap: anywhere; }
.slip-odds { font-size: 18px; font-weight: 800; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.slip-odds.is-changed { color: var(--teal); }
.slip-x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgb(255 255 255 / .06); color: var(--text-muted); font-size: 18px; line-height: 1; }
.slip-x:hover { color: var(--text); background: rgb(255 255 255 / .12); }
.slip-note { font-size: 13px; color: var(--teal); }
.quick-stakes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.quick-stakes .btn { padding-inline: 0; }
.slip-return { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--text-muted); }
.slip-return strong { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.slip-alert[hidden] { display: none; }
.slip-receipt { display: grid; gap: 6px; padding: 14px; border-radius: 12px; border: 1px solid rgb(61 220 151 / .4); background: rgb(61 220 151 / .08); }
.slip-receipt strong { color: var(--success); }
.bets-list { display: grid; gap: 10px; }
.bet-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: rgb(6 10 28 / .4); }
.bet-item small { color: var(--text-muted); font-size: 12.5px; }
.bet-item .bet-money { text-align: right; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.bet-status-won { color: var(--success); }
.bet-status-lost { color: var(--text-dim); }
.bet-status-void { color: var(--text-muted); }
.bet-status-open { color: var(--gold-light); }

@media (max-width: 1100px) {
  .sports-page, .sports-page.is-detail { grid-template-columns: 190px minmax(0, 1fr); }
  .sports-page.is-detail { grid-template-columns: minmax(0, 1fr); }
  /* The slip becomes a bottom sheet that appears once something is picked. */
  .bet-slip { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; z-index: 45; max-width: 460px; margin: 0 auto; box-shadow: 0 -10px 40px rgb(0 0 0 / .55); display: none; background: #141c44; }
  .bet-slip.has-pick { display: block; }
  .bet-slip:not(.is-open) .slip-body { display: none; }
  .bet-slip .slip-head { pointer-events: auto; cursor: pointer; border-bottom: 0; }
  .bet-slip.is-open .slip-head { border-bottom: 1px solid var(--border); }
  .bet-slip .slip-body { max-height: min(70dvh, 520px); overflow-y: auto; }
}
@media (max-width: 720px) {
  .sports-page { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 16px; }
  .sports-rail { position: static; }
  #sports-rail { display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .rail-leagues { display: contents; }
  .rail-item { flex-shrink: 0; border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 12px; }
  .rail-item.is-sub { padding-left: 12px; }
  .match-group-head { grid-template-columns: minmax(0, 1fr); }
  .col-heads { display: none; }
  .match-group-head h2 { grid-column: auto; }
  .match-row { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 10px; }
  .match-markets { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
  .match-markets .mkt-cell:not(:first-child) { display: none; }
  .match-markets .odds-btn.is-compact { grid-auto-flow: column; justify-content: space-between; align-items: center; min-height: 40px; padding: 0 10px; }
  .match-markets .odds-btn.is-compact .odds-label { font-size: 12.5px; }
  .match-more { grid-column: 1 / -1; justify-content: flex-end; margin-top: -2px; }
  .bet-slip { bottom: calc(var(--tabbar-height, 64px) + 10px + env(safe-area-inset-bottom)); }
  .sb-score { font-size: 30px; }
  .sb-team .team-badge { width: 44px; height: 44px; }
  .market-sels.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Home: category tiles and match cards (home-matches.js) */
.live-count { font-size: 13px; font-weight: 600; color: var(--danger); margin-left: 6px; }
.mrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; scroll-snap-type: x proximity; }
.mcard { scroll-snap-align: start; display: grid; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.mcard.is-live { border-color: rgb(255 112 136 / .4); }
.mcard-main { display: grid; gap: 7px; color: var(--text); }
.mcard-main:hover { color: var(--text); }
.mcard-main:hover .team-name { color: var(--gold-light); }
.mcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12px; }
.mcard-league { color: var(--text-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-odds { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.mcard-odd { display: grid; justify-items: center; padding: 6px 4px; border-radius: 9px; border: 1px solid var(--border-strong); background: rgb(6 10 28 / .55); color: var(--gold-light); font-weight: 700; font-variant-numeric: tabular-nums; }
.mcard-odd small { font-size: 11px; color: var(--text-muted); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-odd:hover { color: var(--gold-light); border-color: rgb(255 207 92 / .55); background: rgb(255 207 92 / .06); }
.mcard-odd.is-off { color: var(--text-dim); }
@media (max-width: 720px) {
  .mrow { grid-auto-columns: minmax(230px, 78%); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Sports rail with the full category tree */
.rail-search { height: 40px; font-size: 14px; }
.rail-title { margin: 10px 12px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.rail-empty { padding: 8px 12px; color: var(--text-dim); font-size: 13px; }
.rail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.rail-toggle { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--text-dim); display: grid; place-items: center; }
.rail-toggle:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.rail-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
.rail-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sports-rail { max-height: calc(100dvh - var(--header-height) - 32px); overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 720px) {
  .sports-rail { max-height: none; overflow: visible; }
  .rail-search { display: none; }
  .rail-title, .rail-toggle { display: none; }
  .rail-group, .rail-row { display: contents; }
  /* Leagues move to their own row under the sports. */
  #sports-rail .rail-leagues { display: none; }
  .sports-subrail:not([hidden]) { display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; margin-top: -4px; }
  .sports-subrail .rail-item { font-size: 13px; font-weight: 500; padding: 5px 11px; background: rgb(255 255 255 / .03); }
  .sports-subrail .rail-item.is-active { color: var(--gold); border-color: currentColor; background: rgb(255 255 255 / .08); }
}
.sports-subrail { display: none; }

/* Official live streams (stream.js) */
.stream-slot { margin-top: 16px; display: grid; gap: 6px; }
.stream-slot[hidden] { display: none; }
.stream-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--border-strong); }
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-note { font-size: 12px; color: var(--text-dim); }
.live-hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 22px; padding: 14px; border-radius: var(--radius-lg); border: 1px solid rgb(255 112 136 / .35); background: linear-gradient(140deg, rgb(40 20 60 / .7), rgb(16 23 56 / .9)); }
.live-hero[hidden] { display: none; }
.live-hero .stream-slot { margin-top: 0; }
.live-hero-info { display: grid; gap: 10px; align-content: start; padding-top: 4px; }
.live-hero-info .team-name { font-size: 16px; }
.live-hero-info .team-score { font-size: 18px; }
.live-hero-info .mkt-cell { margin-top: 4px; }
.live-hero-links { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .live-hero { grid-template-columns: minmax(0, 1fr); } }
.sports-main > .stream-slot { max-width: 760px; margin-inline: auto; width: 100%; }
/* Live carousel: arrows over the video, a counter, and dots under the info. */
.hero-stage { position: relative; min-width: 0; }
.hero-nav:empty { display: none; }
.hero-arrow { position: absolute; top: calc(50% - 18px); width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); background: rgb(6 10 28 / .7); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; transition: background-color .15s; }
.hero-arrow:hover { background: rgb(6 10 28 / .9); }
.hero-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.hero-arrow.is-prev { left: 8px; }
.hero-arrow.is-next { right: 8px; }
.hero-count { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 2px 8px; border-radius: 999px; background: rgb(6 10 28 / .7); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; }
.hero-league { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-clock { margin-left: auto; color: var(--danger); font-weight: 700; white-space: nowrap; }
.live-dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding-top: 2px; }
.live-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgb(255 255 255 / .25); cursor: pointer; transition: width .2s, background-color .2s; }
.live-dots button[aria-selected="true"] { width: 20px; background: var(--gold); }

/* Live support widget (support-widget.js) */
.support { position: fixed; right: 20px; bottom: 20px; z-index: 44; display: grid; justify-items: end; gap: 12px; }
.support-fab {
  position: relative; width: 54px; height: 54px; border-radius: 50%; border: 0; display: grid; place-items: center; color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); box-shadow: 0 12px 30px -8px rgb(255 190 70 / .7);
}
.support-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }
.support-dot[hidden] { display: none; }
.support.is-open .support-fab { order: 2; }
.support-panel {
  width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 120px)); display: grid; grid-template-rows: auto 1fr auto auto auto;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: #10173a; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .8); overflow: hidden;
}
.support-panel[hidden] { display: none; }
.support-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / .03); }
.support-head div { display: grid; gap: 2px; min-width: 0; }
.support-head small { color: var(--text-muted); font-size: 12.5px; }
.support-x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgb(255 255 255 / .06); color: var(--text-muted); font-size: 18px; }
.support-log { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.support-empty { color: var(--text-muted); font-size: 13.5px; text-align: center; margin: auto 0; padding: 20px; }
.support-sys { align-self: center; font-size: 12px; color: var(--text-dim); padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / .04); }
.support-msg { max-width: 82%; display: grid; gap: 4px; padding: 8px 11px; border-radius: 14px; font-size: 14px; overflow-wrap: anywhere; }
.support-msg p { white-space: pre-wrap; }
.support-msg.is-me { align-self: flex-end; background: rgb(255 207 92 / .16); border-bottom-right-radius: 4px; }
.support-msg.is-agent { align-self: flex-start; background: rgb(255 255 255 / .07); border-bottom-left-radius: 4px; }
.support-msg small { font-size: 11.5px; color: var(--teal); font-weight: 600; }
.support-msg time { font-size: 10.5px; color: var(--text-dim); justify-self: end; }
.support-msg img { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; }
.support-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
.support-cats button { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: none; color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.support-cats button[aria-pressed="true"] { color: var(--gold-ink); background: var(--gold); border-color: transparent; }
.support-pending { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.support-pending:empty { display: none; }
.support-thumb { position: relative; padding-top: 8px; }
.support-thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
.support-thumb button { position: absolute; top: 2px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 13px; line-height: 1; }
.support-compose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 10px 12px 12px; }
.support-compose textarea { resize: none; max-height: 120px; min-height: 40px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgb(6 10 28 / .65); color: var(--text); font: inherit; font-size: 14px; }
.support-compose textarea:focus { outline: none; border-color: var(--teal); }
.support-attach { width: 38px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--text-muted); cursor: pointer; }
.support-attach:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.support-attach svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) {
  .support { right: 12px; bottom: calc(var(--tabbar-height, 60px) + 12px + env(safe-area-inset-bottom)); }
  .support-fab { width: 48px; height: 48px; }
  .support-panel { height: min(520px, calc(100dvh - var(--tabbar-height, 60px) - 100px)); }
}

/* Legal pages (privacy.html, terms.html) */
.legal-page { max-width: 820px; padding-top: 36px; padding-bottom: 56px; }
.legal-page article[hidden] { display: none; }
.legal-page h1 { font-size: 30px; margin-bottom: 6px; }
.legal-page h2 { font-size: 18px; margin: 28px 0 10px; }
.legal-page p, .legal-page li { color: var(--text-muted); line-height: 1.75; }
.legal-page ul { padding-left: 20px; display: grid; gap: 6px; margin: 0; }
.legal-page strong { color: var(--text); }
.legal-meta { font-size: 13px; color: var(--text-dim) !important; margin-bottom: 18px; }
.footer-copy a { color: var(--text-muted); }
.footer-copy a:hover { color: var(--text); }

/* Home layout v2: category chips, live strip, phone tuning */
.lobby-nav { position: sticky; top: var(--header-height); z-index: 20; margin-top: 18px; background: linear-gradient(180deg, rgb(7 11 29 / .96), rgb(7 11 29 / .88)); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.lobby-nav-inner { display: flex; gap: 8px; padding-top: 10px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.lobby-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgb(255 255 255 / .03); color: var(--text); font-weight: 700; font-size: 14.5px; }
.lobby-chip:hover { color: var(--text); border-color: rgb(255 207 92 / .55); }
.lobby-chip small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lobby-chip small:empty { display: none; }
.chip-icon { width: 10px; height: 10px; border-radius: 50%; }
.chip-slots { background: var(--gold); box-shadow: 0 0 10px rgb(255 207 92 / .7); }
.chip-sports { background: var(--success); box-shadow: 0 0 10px rgb(61 220 151 / .7); }
.chip-esports { background: #aa78ff; box-shadow: 0 0 10px rgb(170 120 255 / .7); }
.section-tight { margin-top: 28px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.support { transition: transform .25s ease, opacity .25s ease; }
@media (max-width: 720px) {
  .hide-phone { display: none !important; }
  .hero-inner { padding: 18px 0 44px; }
  .hero-title { font-size: 28px; }
  .hero-lead { font-size: 14px; }
  .hero-dots { bottom: 30px; }
  .welcome { margin-top: -18px; }
  .lobby-nav { margin-top: 12px; }
  .lobby-chip { height: 36px; padding: 0 12px; font-size: 14px; }
  .section-tight { margin-top: 18px; }
  .support.is-tucked { transform: translateY(calc(100% + 90px)); opacity: 0; pointer-events: none; }
  .support-fab { width: 44px; height: 44px; }
  .support-fab svg { width: 22px; height: 22px; }
}
@media (max-width: 720px) { #slots .section-head p { display: none; } }
.reg-sent { font-size: 13px; color: var(--text-muted); margin-top: -6px; }
.reg-rest { display: grid; gap: 16px; }
.reg-rest[hidden] { display: none; }
.rail-name { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.rail-icon { width: 18px; text-align: center; font-size: 15px; line-height: 1; flex-shrink: 0; }
.match-league { color: var(--text-dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.match-league::before { content: '·'; margin-right: 6px; }
@media (max-width: 720px) { .rail-icon { width: auto; font-size: 14px; } }
.rail-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.auth-google:hover:not(:disabled) { background: #f6f8fc; color: #1f1f1f; }
.auth-card .auth-consent { margin-top: -6px; }
.return-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid rgb(255 207 92 / .4); background: rgb(255 207 92 / .08); color: var(--text); font-size: 14px; }
