/* Ball Knowledge: calm data-desk look. Color is for charts and small badges, not for hyping numbers.
   Barlow for reading, Barlow Condensed for headings and every number that matters. */

:root {
  --bg: #f3f5f8;          /* page */
  --card: #ffffff;        /* surfaces */
  --sunk: #eef1f5;        /* inputs, tracks, quiet fills */
  --line: #dde3eb;
  --line-strong: #c3ccd8;
  --text: #0c1a2e;        /* navy ink */
  --muted: #5a6a80;
  --brand: #e8571f;       /* hardwood orange: primary actions, active state */
  --brand-ink: #ffffff;
  --brand-soft: #fdeee6;
  --win: #0a8f57;
  --loss: #cf2f45;
  --gold: #b7791f;
  --gold-soft: #fbf1df;
  --board: #0c1a2e;       /* scoreboard band (same in both themes) */
  --board-2: #13253f;
  --board-line: #22385a;
  --board-text: #f2f6fb;
  --board-muted: #93a6c2;
  --board-win: #3ddc97;
  --shadow: 0 1px 2px rgba(12, 26, 46, .06);
  --shadow-lg: 0 18px 50px rgba(12, 26, 46, .22);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-c: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #07101d;
  --card: #0d1a2c;
  --sunk: #12223a;
  --line: #1b2c45;
  --line-strong: #2a4063;
  --text: #e9eff7;
  --muted: #8d9fb9;
  --brand: #ff6a33;
  --brand-ink: #1a0a03;
  --brand-soft: #2a1710;
  --win: #34d08e;
  --loss: #ff5d73;
  --gold: #f0b54d;
  --gold-soft: #2a2213;
  --board: #0f2140;
  --board-2: #152a4d;
  --board-line: #24406b;
  --shadow: none;
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select { font-family: inherit; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.no-anim, .no-anim * { transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* icons */
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; flex-shrink: 0; }
.ic { display: inline-flex; vertical-align: -3px; }

/* wordmark: the one loud piece of type */
.wordmark { font-family: var(--font-c); font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: .01em; }

/* ---------- app frame ---------- */
.app { height: 100vh; height: 100dvh; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); background: var(--bg); }
header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 21px; line-height: 1; white-space: nowrap; }
.logo { width: 30px; height: 30px; border-radius: 8px; display: block; }
.beta { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; font-family: var(--font); font-style: normal; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative;
  width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn.spin .i { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.theme-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-switch .t-moon, :root[data-theme="dark"] .theme-switch .t-sun { display: none; }
:root[data-theme="dark"] .theme-switch .t-moon { display: block; }
.theme-switch:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

.premium-btn, .account-btn {
  height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; cursor: pointer;
  border-radius: var(--r-sm); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.premium-btn { background: var(--text); color: var(--card); border: 1px solid var(--text); }
.premium-btn .i { color: var(--gold); fill: var(--gold); stroke: var(--gold); width: 16px; height: 16px; }
:root[data-theme="dark"] .premium-btn .i { color: #b7791f; fill: #b7791f; stroke: #b7791f; }
.premium-btn.on { background: var(--gold-soft); color: var(--text); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.premium-btn.on .i { fill: var(--gold); stroke: var(--gold); }
.account-btn { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.account-btn:hover { border-color: var(--line-strong); }
.account-btn .i { width: 17px; height: 17px; }
.account-btn.in .ab-label { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.account-btn[hidden] { display: none; }
.desk-only { display: none !important; }

nav { display: flex; background: var(--card); border-bottom: 1px solid var(--line); padding: 0 8px; }
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 11px 0 10px; font-weight: 600; font-size: 15px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--brand); }
.tab .ico { display: none; }
.tab.active .ico { color: var(--brand); }
.count { display: inline-block; min-width: 18px; text-align: center; background: var(--brand); color: #fff; border-radius: 9px; padding: 0 5px; font-size: 11px; font-weight: 700; line-height: 18px; margin-left: 4px; }
.count[hidden] { display: none; }

main { flex: 1; overflow-y: auto; }
.panel { display: none; padding: 16px 16px 28px; }
.panel.active { display: block; }
.page-head { display: none; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head > .muted:first-child { flex: 1; }
footer { padding: 8px 16px; border-top: 1px solid var(--line); background: var(--card); font-size: 12px; text-align: center; color: var(--muted); }
footer a { color: var(--muted); }
.get-app { font-weight: 600; }
footer .get-app + span::before { content: ' · '; }

/* ---------- type ---------- */
h2, h3 { font-family: var(--font-c); }
h3 { font-size: 19px; font-weight: 700; margin: 22px 0 10px; letter-spacing: .005em; }
h3 .muted { font-family: var(--font); font-size: 13px; font-weight: 400; }
.muted { color: var(--muted); font-size: 13.5px; }
.error { color: var(--loss); }

/* ---------- controls ---------- */
input, select {
  background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 9px 11px; font-size: 16px; outline: none; min-height: 40px;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.row { display: flex; gap: 8px; margin-bottom: 12px; }
.row input { flex: 1; min-width: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: var(--r-sm);
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--text); filter: none; }
.btn.ghost.on { color: var(--win); border-color: color-mix(in srgb, var(--win) 50%, transparent); }
.btn.wide { width: 100%; min-height: 46px; }
.big-cta { width: 100%; min-height: 48px; font-size: 16px; }
.premium-cta { background: var(--text); border-color: var(--text); color: var(--card); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--loss); }

.seg { display: inline-flex; background: var(--sunk); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { white-space: nowrap; background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(12,26,46,.12); }
:root[data-theme="dark"] .seg button.on { background: var(--line-strong); }
.seg-big { display: flex; margin-bottom: 16px; }
.seg-big button { flex: 1; padding: 8px 10px; font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--line-strong); }
.chip.active { background: var(--text); color: var(--card); border-color: var(--text); }
.chip.fav { font-weight: 700; }

/* ---------- cards + lists ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.card.click { cursor: pointer; }
.card.click:hover { border-color: var(--line-strong); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.market { margin-top: 4px; font-weight: 500; }
.amt, .win-amt, .hero-pnl, .stat b, .wb-pnl, .rank, .link-code { font-variant-numeric: tabular-nums; }
.amt { font-family: var(--font-c); font-weight: 700; font-size: 18px; line-height: 1; }
.buy, .pos { color: var(--win); }
.win-amt { color: var(--text); }
.sell, .neg { color: var(--loss); }
.buy, .sell { font-weight: 700; }
.win-amt { font-weight: 700; }
.actions { display: flex; gap: 12px; margin-top: 8px; }
.trades { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.trades .card { background: var(--bg); box-shadow: none; }
.who { display: flex; align-items: center; min-width: 0; flex: 1; }
.who-row { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--win); background: color-mix(in srgb, var(--win) 12%, transparent); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--r); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, var(--sunk), var(--card), var(--sunk)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r); border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

.avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: var(--sunk); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 60px; height: 60px; font-size: 24px; }

/* ---------- winners: the scoreboard ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--board); color: var(--board-text);
  border-radius: var(--r-lg); padding: 18px 18px 16px;
}
.hero-label { display: flex; align-items: center; gap: 10px; color: var(--board-muted); font-size: 14px; font-weight: 600; }
.hero-rank { font-family: var(--font-c); font-weight: 700; font-size: 15px; color: var(--board); background: var(--brand); border-radius: 4px; padding: 1px 8px; }
.hero-main { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.hero .avatar { background: var(--board-2); color: var(--board-text); border: 2px solid var(--brand); }
.hero-name { font-weight: 600; font-size: 17px; color: var(--board-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-pnl { font-family: var(--font-c); font-weight: 700; font-size: 44px; line-height: .95; letter-spacing: -.01em; color: var(--board-text); margin-top: 4px; }
.hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.hero .muted { color: var(--board-muted); }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--board-line); }
.hero-best { font-size: 14px; color: var(--board-muted); display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hero-best b { color: var(--board-text); font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.hero .btn.ghost { background: transparent; color: var(--board-text); border-color: var(--board-line); }
.hero .btn.ghost:hover { border-color: var(--board-text); }
.hero .btn.ghost.on { color: var(--board-win); border-color: color-mix(in srgb, var(--board-win) 50%, transparent); }
.hero .lead-name:hover { text-decoration: underline; cursor: pointer; }
.hero .wr-chip { background: var(--board-2); border-color: var(--board-line); color: var(--board-text); }
.hero .wr-chip.locked { color: #f0b54d; }

/* leaderboard: one ruled table instead of a stack of cards */
#win-board { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
#win-board > .card { border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); padding: 10px 14px; }
#win-board > .card:first-child { border-top: 0; }
#win-board > .card:hover { background: color-mix(in srgb, var(--sunk) 55%, var(--card)); }
#win-board > .skeleton { border-radius: 0; border: 0; border-top: 1px solid var(--line); }
.lead { display: flex; align-items: center; gap: 12px; }
.rank { width: 22px; text-align: right; font-family: var(--font-c); font-weight: 700; font-size: 18px; color: var(--muted); flex-shrink: 0; }
.lead-body { flex: 1; min-width: 0; }
.lead-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lead-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.lead-name:hover { text-decoration: underline; }
.lead-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.lead-meta .bar { flex: 1; margin-top: 0; }
.bar { height: 4px; background: var(--sunk); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--win); border-radius: 2px; }
.follow-mini { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; background: var(--card); color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.follow-mini:hover { color: var(--text); border-color: var(--text); }
.follow-mini.on { color: var(--win); border-color: color-mix(in srgb, var(--win) 50%, transparent); background: color-mix(in srgb, var(--win) 8%, var(--card)); }
.follow-mini .i { width: 16px; height: 16px; }
.win { display: flex; gap: 10px; align-items: flex-start; }
.win-side h3.first { margin-top: 22px; }

.wr-chip {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; line-height: 1;
  font-size: 12px; font-weight: 700; padding: 4px 7px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-variant-numeric: tabular-nums;
}
.wr-chip .i { width: 12px; height: 12px; }
.wr-chip.good { color: var(--win); border-color: color-mix(in srgb, var(--win) 40%, transparent); }
.wr-chip.bad { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 35%, transparent); }
.wr-chip.loading { color: var(--muted); }
.wr-chip.locked { cursor: pointer; font-family: inherit; color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); background: var(--gold-soft); }
.follow-limit { margin: -2px 2px 12px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.sync-nudge { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- alerts ---------- */
.alerts-grid { display: flex; flex-direction: column-reverse; gap: 16px; }
.settings { display: flex; flex-direction: column; gap: 12px; color: var(--muted); }
.settings label { font-weight: 500; }
.settings input[type=number] { width: 100px; margin-left: 6px; min-height: 36px; padding: 6px 9px; font-size: 15px; }
.push-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.push-head { display: flex; justify-content: space-between; align-items: center; }
.push-head b { font-family: var(--font-c); font-size: 18px; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.pill.on { background: color-mix(in srgb, var(--win) 14%, transparent); color: var(--win); }
#push-status { margin: 8px 0 12px; line-height: 1.5; }
.push-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- promos ---------- */
.promo-filters { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.promo-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; box-shadow: var(--shadow); }
.stat b { font-family: var(--font-c); font-size: 26px; font-weight: 700; line-height: 1.05; }
.stat span { color: var(--muted); font-size: 13px; line-height: 1.3; }
.stat.good b { color: var(--win); }
.stat.wide { grid-column: 1 / -1; }
.stat.warn { border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: var(--gold-soft); }
.stat.warn span { color: var(--text); font-weight: 600; }
.promo-top { display: flex; gap: 12px; align-items: flex-start; }
.promo-ava { width: 38px !important; height: 38px !important; font-size: 16px !important; color: #fff !important; border-radius: 9px !important; }
.promo-ava.sportsbook { background: #1d4ed8; }
.promo-ava.prediction { background: #6d28d9; }
.ptag { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 1px 6px; margin-left: 6px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ptag.sportsbook { color: #1d4ed8; border-color: color-mix(in srgb, #1d4ed8 35%, transparent); }
.ptag.prediction { color: #6d28d9; border-color: color-mix(in srgb, #6d28d9 35%, transparent); }
:root[data-theme="dark"] .ptag.sportsbook { color: #7aa7ff; }
:root[data-theme="dark"] .ptag.prediction { color: #b69cff; }
.offer { font-family: var(--font-c); font-weight: 700; font-size: 20px; line-height: 1.15; color: var(--text); margin-top: 4px; }
.terms { color: var(--muted); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.terms.open { display: block; }
.promo-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.status-sel { margin-left: auto; min-height: 36px; padding: 5px 8px; font-size: 14px; font-weight: 600; }
.status-sel.s-signed { border-color: var(--gold); color: var(--gold); }
.status-sel.s-claimed, .status-sel.s-done { border-color: var(--win); color: var(--win); }
.expiry { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.date-in { min-height: 34px; padding: 4px 8px; font-size: 14px; }
.warn-text { color: var(--gold); font-weight: 700; font-size: 13px; }
.card.promo.dim { opacity: .55; }
.rg { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 18px 2px 4px; }
.rg b { color: var(--text); }

/* ---------- news ---------- */
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.news-filters select { font-size: 15px; max-width: 100%; }
#news-team { flex: 1 1 220px; }
.star-btn { white-space: nowrap; }
.star-btn.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.news-count { margin: 2px 2px 10px; }
.team-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
#news-list .card-title { white-space: normal; font-size: 16px; line-height: 1.3; }

/* ---------- premium ---------- */
.premium-reason { background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: var(--r); padding: 11px 14px; font-weight: 600; margin-bottom: 14px; }
.premium-reason[hidden] { display: none; }
.premium-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.premium-card.on { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.premium-card.subtle { background: transparent; box-shadow: none; }
.premium-card.subtle p { margin: 4px 0 12px; }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pc-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-c); font-weight: 700; font-size: 24px; }
.pc-badge .i { color: var(--gold); fill: var(--gold); stroke: var(--gold); width: 20px; height: 20px; }
.pc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.plan { text-align: left; border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 12px 14px; background: var(--card); color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.plan b { font-family: var(--font-c); font-size: 22px; font-weight: 700; }
.plan.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.fine { font-size: 13px; margin: 12px 2px 0; line-height: 1.55; }
.fine a { color: var(--brand); }
.pf-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.pf { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); }
.pf:first-child { border-top: 0; }
.pf b { font-size: 16px; }
.pf-ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.pf p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.link-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.link-box[hidden] { display: none; }
.link-code { font-family: var(--font-c); font-size: 40px; font-weight: 700; letter-spacing: 8px; margin: 6px 0; }

/* ---------- accounts ---------- */
.account-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.account-card b { font-size: 16px; }
.account-card p { margin: 3px 0 0; }
.signin-card { width: min(420px, 100%); }
.signin-reason { background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: var(--r); padding: 10px 12px; font-weight: 600; font-size: 14px; line-height: 1.4; }
.google-btn { width: 100%; min-height: 48px; background: var(--card); color: var(--text); border: 1px solid var(--line-strong); font-size: 16px; margin-top: 10px; }
.google-btn:hover { border-color: var(--text); filter: none; }
.g-logo { width: 20px; height: 20px; display: block; }
.g-logo svg { width: 100%; height: 100%; display: block; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.email-row .btn { min-height: 44px; }
.email-row input { min-height: 44px; }
.code-entry { margin-top: 10px; font-size: 14px; }
.code-entry summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 8px; }
.signin-sent { margin: 12px 0 4px; font-size: 24px; }

/* ---------- welcome: sign in first ---------- */
.welcome { position: fixed; inset: 0; z-index: 35; display: grid; grid-template-rows: auto 1fr; background: var(--bg); overflow-y: auto; transition: opacity .25s ease; }
.welcome[hidden] { display: none; }
.welcome.out { opacity: 0; }
.welcome-open { overflow: hidden; }
.welcome-pitch {
  background: var(--board); color: var(--board-text);
  padding: calc(24px + env(safe-area-inset-top)) 22px 24px;
}
.welcome-brand { font-size: 22px; color: var(--board-text); }
.welcome-pitch h1 { font-family: var(--font-c); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: -.005em; margin: 20px 0 10px; max-width: 16ch; text-wrap: balance; }
.welcome-sub { color: var(--board-muted); font-size: 15px; line-height: 1.5; margin: 0; max-width: 46ch; }
@media (max-width: 899px) { .welcome-board { display: none; } }
.welcome-board { margin-top: 22px; max-width: 420px; }
.welcome-board:empty { display: none; }
.wb-head { display: flex; justify-content: space-between; color: var(--board-muted); font-size: 13px; padding: 0 2px 6px; border-bottom: 1px solid var(--board-line); }
.wb-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--board-line); }
.wb-rank { font-family: var(--font-c); font-weight: 700; font-size: 18px; color: var(--brand); }
.wb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-pnl { font-family: var(--font-c); font-weight: 700; font-size: 22px; color: var(--board-text); }
.welcome-auth { display: grid; align-items: start; justify-items: center; padding: 22px 16px calc(28px + env(safe-area-inset-bottom)); }
.welcome-card { width: min(420px, 100%); }
.welcome-card h2 { font-size: 30px; font-weight: 700; margin: 0 0 4px; line-height: 1.05; }
.welcome-card > .muted { margin: 0 0 6px; font-size: 15px; }
.welcome-skip { display: block; margin: 20px auto 0; color: var(--muted); font-weight: 500; }
@media (min-width: 900px) {
  .welcome { grid-template-rows: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .welcome-pitch { display: flex; flex-direction: column; justify-content: center; padding: 56px 64px; }
  .welcome-pitch h1 { font-size: 64px; }
  .welcome-sub { font-size: 18px; }
  .welcome-board { margin-top: 36px; }
  .welcome-auth { align-items: center; padding: 48px; }
  .welcome-card h2 { font-size: 36px; }
}

/* ---------- toast, modals, banners ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom));
  max-width: min(440px, calc(100% - 32px)); width: max-content;
  background: var(--text); color: var(--card); padding: 11px 16px; border-radius: var(--r);
  font-weight: 600; box-shadow: var(--shadow-lg); z-index: 60; cursor: pointer;
}
.toast[hidden] { display: none; }
.modal { position: fixed; inset: 0; background: rgba(7, 16, 29, .55); display: grid; place-items: center; z-index: 45; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; background: var(--card); color: var(--text); border-radius: var(--r-lg); padding: 26px 22px 20px; width: min(440px, 100%); box-shadow: var(--shadow-lg); max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal-card h2 { margin: 12px 0 6px; font-size: 28px; line-height: 1.05; }
.modal-logo { width: 48px; height: 48px; border-radius: 12px; }
.modal-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; background: none; border: 0; font-size: 24px; color: var(--muted); cursor: pointer; border-radius: var(--r-sm); }
.modal-x:hover { background: var(--sunk); color: var(--text); }
.steps { padding-left: 20px; margin: 10px 0; line-height: 1.55; }
.steps li { margin-bottom: 8px; }
.install-banner { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--r); }
.install-banner[hidden] { display: none; }
.banner-logo { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.banner-text { flex: 1; font-weight: 600; font-size: 14px; line-height: 1.35; }
.banner-x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1; }

.sponsor-slot:empty { display: none; }
.is-premium .sponsor-slot { display: none; }
.sponsor { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; background: var(--card); }
.sponsor img, .sponsor-ico { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.sponsor-ico { display: grid; place-items: center; background: var(--sunk); font-weight: 800; }
.sponsor-body { flex: 1; min-width: 0; }
.sponsor-top { display: flex; align-items: center; gap: 8px; }
.sponsor-label { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }

/* ---------- launch screen ---------- */
.splash {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; text-align: center;
  background: var(--board); color: #f2f6fb;
  transition: opacity .45s ease, visibility .45s ease;
}
.no-splash .splash { display: none; }
.splash.out { opacity: 0; visibility: hidden; }
.splash-inner { max-width: 460px; animation: splash-in .6s ease both; }
.splash-logo { width: 88px; height: 88px; border-radius: 22px; }
.splash-name { font-size: 46px; line-height: 1; margin-top: 20px; }
.splash-tag { font-size: 18px; line-height: 1.45; color: #a9bad3; margin: 12px 0 28px; text-wrap: balance; }
.splash-bar { height: 3px; width: 160px; margin: 0 auto; background: rgba(255,255,255,.12); overflow: hidden; border-radius: 2px; }
.splash-bar i { display: block; height: 100%; width: 40%; background: #e8571f; animation: splash-load 1.1s ease-in-out infinite; }
@keyframes splash-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes splash-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- first-launch agreement ---------- */
.agree { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(7,16,29,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity .3s ease; overflow-y: auto; }
.agree[hidden] { display: none; }
.agree.out { opacity: 0; }
.agree-open { overflow: hidden; }
.agree-card { background: var(--card); color: var(--text); width: min(480px, 100%); border-radius: var(--r-lg); padding: 26px 22px 20px; box-shadow: var(--shadow-lg); }
.agree-logo { width: 48px; height: 48px; border-radius: 12px; }
.agree-card h2 { margin: 12px 0 4px; font-size: 30px; line-height: 1.05; }
.agree-card > .muted { margin: 0 0 14px; line-height: 1.5; }
.agree-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; cursor: pointer; line-height: 1.45; font-size: 14.5px; }
.agree-row:has(input:checked) { border-color: color-mix(in srgb, var(--win) 55%, transparent); background: color-mix(in srgb, var(--win) 6%, var(--card)); }
.agree-row input { width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--win); }
.agree-card .big-cta { margin-top: 10px; }
.agree-no { display: block; margin: 14px auto 0; color: var(--muted); font-weight: 500; }
.agree-help { text-align: center; font-size: 12.5px; margin: 10px 0 0; }

/* ---------- tablet ---------- */
@media (min-width: 700px) and (max-width: 959px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .promo-summary { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- phones: bottom tab bar ---------- */
@media (max-width: 699px) {
  header { order: 1; padding: 10px 14px; }
  main { order: 2; }
  footer { order: 3; padding: 6px 12px; font-size: 11.5px; }
  nav { order: 4; border-bottom: 0; border-top: 1px solid var(--line); padding: 0 4px env(safe-area-inset-bottom); }
  .tab { flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 600; padding: 8px 0 7px; border-bottom: 0; position: relative; }
  .tab.active { border-bottom: 0; }
  .tab.active::before { content: ''; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--brand); border-radius: 0 0 2px 2px; }
  .tab .ico { display: block; }
  .tab .ico .i { width: 22px; height: 22px; }
  .tab .count { position: absolute; top: 4px; left: 54%; margin: 0; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .panel { padding: 14px 14px 24px; }
  .hero-pnl { font-size: 40px; }
  #win-updated { display: none; }
  footer { font-size: 11px; padding: 5px 10px; }
  #news .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 10px; padding: 0 14px 2px; scrollbar-width: none; }
  #news .chips::-webkit-scrollbar { display: none; }
  #news .chip { flex: 0 0 auto; }
  .news-filters select { flex: 1 1 45%; }
  #news-team { flex: 1 1 100%; }
  .star-btn { flex: 1 1 45%; }
}
@media (max-width: 480px) {
  #refresh { display: none; }
  .brand { font-size: 19px; gap: 8px; }
  .logo { width: 28px; height: 28px; }
  .beta, .pb-go, .ab-label { display: none; }
  .premium-btn, .account-btn { padding: 0 10px; }
  .header-actions { gap: 5px; }
  .icon-btn, .premium-btn, .account-btn { height: 34px; }
  .icon-btn { width: 34px; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 360px) { .brand .wordmark { font-size: 17px; } }

/* ---------- desktop: sidebar ---------- */
@media (min-width: 960px) {
  :root { --side: 260px; }
  .app { max-width: none; display: grid; grid-template-columns: var(--side) 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "header main" "nav main" "footer main"; }
  header, nav, footer { background: var(--card); border-right: 1px solid var(--line); }
  header { grid-area: header; flex-direction: column; align-items: stretch; gap: 16px; padding: 22px 18px 14px; border-bottom: 0; }
  .brand { font-size: 23px; }
  .header-actions { display: grid; grid-template-columns: 1fr 36px 36px; gap: 8px; }
  .header-actions .premium-btn { grid-column: 1 / -1; justify-content: center; height: 40px; font-size: 15px; }
  .header-actions .account-btn { grid-column: 1; justify-content: flex-start; min-width: 0; }
  .header-actions .account-btn .ab-label { overflow: hidden; text-overflow: ellipsis; }
  .header-actions .account-btn[hidden] + .theme-switch { grid-column: 2; }
  nav { grid-area: nav; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 8px 10px; border-bottom: 0; border-top: 1px solid var(--line); overflow-y: auto; }
  .tab { flex: 0 0 auto; justify-content: flex-start; gap: 12px; padding: 10px 12px; border: 0; border-radius: 8px; font-size: 16px; }
  .tab .ico { display: block; color: var(--muted); }
  .tab:hover { background: var(--sunk); }
  .tab.active { background: var(--brand-soft); color: var(--text); }
  .tab.active .ico { color: var(--brand); }
  .tab .count { margin-left: auto; }
  .tab.desk-only { display: flex !important; }
  footer { grid-area: footer; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px 18px 18px; border-top: 0; font-size: 12.5px; line-height: 1.5; }
  footer .get-app { text-align: left; font-size: 14px; }
  footer .get-app + span::before { content: none; }

  main { grid-area: main; overflow-y: auto; }
  .panel { max-width: 1240px; margin: 0 auto; padding: 34px 44px 56px; }
  .page-head { display: block; margin-bottom: 22px; }
  .page-head h2 { margin: 0; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.005em; }
  .page-head p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
  h3 { font-size: 21px; margin: 28px 0 12px; }

  .win-grid { max-width: 780px; }
  .hero { padding: 24px 26px 20px; border-radius: 16px; }
  .hero-main { gap: 18px; }
  .avatar.lg { width: 72px; height: 72px; font-size: 28px; }
  .hero-name { font-size: 19px; }
  .hero-pnl { font-size: 58px; }

  #alert-list, #promo-list, #news-list { display: grid; gap: 12px; }
  #alert-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  #promo-list { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); align-items: start; }
  #news-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  #news-list .card { min-height: 100px; display: flex; flex-direction: column; justify-content: space-between; }
  .empty { grid-column: 1 / -1; }
  #add-form { max-width: 640px; }

  .alerts-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
  .alerts-grid .settings { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
  .alerts-grid .settings .push-card { border: 0; padding: 0; box-shadow: none; }

  .promo-summary { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 34px; }
  .promo-filters { margin-bottom: 16px; }
  .rg { max-width: 820px; }
  #news-form { max-width: 640px; }
  .news-filters { max-width: 900px; }
  #news-team { flex: 0 1 260px; }

  #premium .premium-card, #premium .pf-grid, .premium-reason { max-width: 780px; }
  .pf-grid { grid-template-columns: 1fr 1fr; }
  .pf:nth-child(2) { border-top: 0; }
  .pf:nth-child(even) { border-left: 1px solid var(--line); }
  .install-banner { margin: 22px auto 0; max-width: 1150px; }
  .toast { bottom: 28px; left: calc(50% + var(--side) / 2); }
}
@media (min-width: 1240px) {
  .win-grid { max-width: none; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .win-side h3.first { margin-top: 0; }
}
@media (min-width: 1500px) { .panel { max-width: 1400px; } }

/* ---------- charts ---------- */
.sheet .chart-card { width: min(680px, 100%); padding: 22px 22px 18px; }
.chart-card h2 { margin: 0 34px 2px 0; font-size: 28px; line-height: 1.05; }
.chart-card #chart-sub { margin: 0 0 14px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-big { font-family: var(--font-c); font-weight: 700; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.chart-stat .muted .pos, .chart-stat .muted .neg { font-weight: 700; }
.chart { position: relative; }
.chart-tip { min-height: 20px; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-svg { display: block; width: 100%; height: 220px; touch-action: pan-y; cursor: crosshair; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke-width: 2.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-area { stroke: none; opacity: .12; }
.chart-svg.up .chart-line { stroke: var(--win); } .chart-svg.up .chart-area { fill: var(--win); }
.chart-svg.down .chart-line { stroke: var(--loss); } .chart-svg.down .chart-area { fill: var(--loss); }
.chart-ref { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.chart-cross { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-plot { position: relative; }
.chart-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; border: 2px solid var(--card); pointer-events: none; }
.chart-plot.up .chart-dot { background: var(--win); } .chart-plot.down .chart-dot { background: var(--loss); }
.chart-axis { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; margin-top: 6px; }
.chart-ref-label { color: var(--brand); font-weight: 600; }
.chart-empty { padding: 60px 0; text-align: center; }
.chart-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.chart-seg button { padding: 5px 11px; }
@media (max-width: 699px) {
  .sheet { align-items: end; padding: 0; }
  .sheet .chart-card { border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92dvh; }
  .chart-svg { height: 190px; }
  .chart-big { font-size: 38px; }
}

/* ---------- my account ---------- */
#account-body { max-width: 720px; }
.acct-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.acct-card > p { margin: 6px 0 12px; }
.acct-sec h3 { margin: 22px 0 10px; }
.acct-signin h3 { margin: 0 0 4px; font-size: 24px; }
.acct-signin > .muted { margin: 0 0 4px; }
.acct-profile { display: flex; align-items: center; gap: 14px; }
.acct-ava { width: 56px; height: 56px; border-radius: 50%; background: var(--board); color: #fff; display: grid; place-items: center; font-family: var(--font-c); font-weight: 700; font-size: 26px; border: 2px solid var(--brand); flex-shrink: 0; }
.acct-who { flex: 1; min-width: 0; }
.acct-email { font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; background: var(--sunk); color: var(--muted); margin-right: 4px; }
.plan-pill.prem { background: var(--gold-soft); color: var(--gold); }
.acct-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.acct-row + .acct-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.acct-row input { width: 110px; min-height: 36px; padding: 6px 9px; font-size: 15px; }
.acct-list { display: flex; flex-direction: column; gap: 0; }
.acct-wallet { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.acct-wname { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-list > .link-btn { align-self: flex-start; margin-top: 10px; }
@media (max-width: 699px) {
  .account-btn { display: none !important; }
  .acct-profile { flex-wrap: wrap; }
}

/* ---------- elite (locked) wallets ---------- */
.locked-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--gold); }
.locked-name .i { width: 14px; height: 14px; }
.hero .locked-name { color: #f0b54d; font-size: 18px; }
.wb-name .locked-name { color: #f0b54d; }
.locked-ava { background: var(--gold-soft) !important; color: var(--gold) !important; }
.locked-ava .ic { width: 45%; height: 45%; display: grid; }
.locked-ava .i { width: 100%; height: 100%; }
.hero .premium-cta { background: var(--brand); border-color: var(--brand); color: #fff; }
.hero .premium-cta .i { color: #fff; }
.hero .locked-ava { background: var(--board-2) !important; color: #f0b54d !important; }
.follow-mini.locked { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); }
.premium-cta .i { width: 15px; height: 15px; color: #f0b54d; }
.locked-card { border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
@media (min-width: 960px) { .pf:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ---------- date of birth ---------- */
.agree-dob { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 0 0 8px; }
.agree-dob legend { font-weight: 600; font-size: 14.5px; padding: 0 4px; }
.dob-row { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr; gap: 8px; }
.dob-row select { width: 100%; min-width: 0; }
.dob-note { margin: 8px 0 0; font-size: 12.5px; }

/* =========== cleanup pass: fewer buttons, more room =========== */
/* header: Premium + account only (dark mode lives in Account; refresh is desktop-only) */
.header-actions .theme-switch { display: none; }
@media (max-width: 959px) { #refresh { display: none; } }
@media (max-width: 699px) { footer { display: none; } }
@media (min-width: 960px) { .header-actions { grid-template-columns: 1fr 36px; } }

/* install nudge: one slim line, Winners only */
.install-banner { padding: 8px 10px; gap: 10px; }
.install-banner .banner-logo { width: 26px; height: 26px; border-radius: 6px; }
.install-banner .banner-text { font-size: 14px; }
.install-banner .btn { min-height: 32px; padding: 0 12px; font-size: 14px; }
body:not([data-tab="winners"]) .install-banner { display: none !important; }

/* tucked-away extras */
.tuck { margin-top: 12px; }
.tuck > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600; font-size: 14px; padding: 6px 0; }
.tuck > summary::-webkit-details-marker { display: none; }
.tuck > summary::after { content: '›'; font-size: 18px; line-height: 1; transition: transform .15s; }
.tuck[open] > summary::after { transform: rotate(90deg); }
.tuck > :not(summary) { margin-top: 8px; }
.more-btn { margin-top: 10px; }
.grow { flex: 1; }
.small { font-size: 13px; }

/* winners: calmer rows */
#win-board > .card { padding: 11px 14px; }
.lead { gap: 12px; }
.lead-meta { margin-top: 3px; }
.win-feed-card .card-sub, #win-feed .card-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* following page */
.follow-grid { display: flex; flex-direction: column-reverse; gap: 18px; }
.follow-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.follow-side h3.first, .follow-main h3.first { margin: 0 0 8px; }
.follow-main .panel-head { margin-bottom: 8px; }
.wallet-list { gap: 0; }
.wallet-item { border-bottom: 1px solid var(--line); }
.wallet-item:last-child { border-bottom: 0; }
.wallet-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; min-height: 48px; }
.wallet-row.locked-card { border-bottom: 1px solid var(--line); }
.wallet-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row-x { width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.row-x:hover { background: var(--sunk); color: var(--loss); }
.row-x .i { width: 16px; height: 16px; }
.wallet-item .trades { margin: 0 0 10px; }
.empty-line { margin: 4px 0; }
.follow-limit { margin: 8px 0 0; font-size: 13.5px; display: block; }
.notif-box > summary .pill { margin-left: auto; }
.notif-box > summary { color: var(--text); }
.notif-size { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.notif-size input { width: 100px; min-height: 36px; padding: 6px 9px; font-size: 15px; }
#push-status { margin: 10px 0; font-size: 14px; }
#add-form { margin: 0; }
@media (min-width: 960px) {
  .follow-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; flex-direction: initial; }
  #alert-list { grid-template-columns: 1fr; }
}

/* promos: one summary line, quiet cards */
.promo-summary { display: block; margin: 0 2px 14px; font-size: 14.5px; line-height: 1.5; }
.promo-summary b { color: var(--text); font-family: var(--font-c); font-size: 20px; }
.promo-body { flex: 1; min-width: 0; }
.promo-name { display: flex; align-items: center; gap: 6px; }
.promo-name .tag { margin-left: 0; }
.promo-actions { margin-top: 12px; }
.promo-actions .btn { min-height: 38px; }
.promo-details { margin-top: 6px; }
.promo-details .terms { margin: 0 0 6px; }
@media (min-width: 960px) { #promo-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); } }

/* news: search + one Filters button */
.search-row input { flex: 1; }
.filter-btn.on { border-color: var(--brand); color: var(--brand); }
.news-filters[hidden] { display: none; }
#news-list .card { padding: 12px 14px; }

/* sign-up form */
.signin-head { font-size: 26px; margin: 0 0 2px; }
.signin-lead { margin: 0 0 12px; }
.fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.field input { width: 100%; min-width: 0; color: var(--text); font-weight: 400; }
.promise { display: flex; gap: 10px; align-items: flex-start; background: color-mix(in srgb, var(--win) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--win) 30%, var(--line)); border-radius: var(--r); padding: 10px 12px; margin: 4px 0 10px; }
.promise .ic { color: var(--win); margin-top: 2px; }
.promise b { font-size: 14px; }
.promise p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; margin: 4px 0 6px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; min-height: 0; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.form-error { color: var(--loss); font-weight: 600; font-size: 14px; margin: 4px 0; min-height: 0; }
.form-error:empty { display: none; }
.swap-mode { text-align: center; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.signup-form > .muted { margin: 0 0 12px; }
.signin-card { width: min(460px, 100%); }

/* account page */
.acct-val { flex: 1; text-align: right; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-card > .btn { margin-top: 12px; }
.acct-signin { padding: 18px; }
.acct-foot { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.switch { width: 46px; height: 26px; border-radius: 13px; border: 0; background: var(--line-strong); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { background: var(--brand); }
.switch.on i { transform: translateX(20px); }

/* sign-up gate for guests */
.gate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 18px; background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
#win-board > .gate { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.gate-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.gate b { font-family: var(--font-c); font-size: 22px; }
.gate p { margin: 0 0 8px; max-width: 34ch; }
.gate .btn { min-width: 200px; }
.gate .link-btn { margin-top: 6px; font-weight: 500; }
#promo-list > .gate, #news-list > .gate { grid-column: 1 / -1; }

/* ---------- news: headlines that lead ---------- */
#news-list { gap: 10px; }
.news-meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.news-lead { padding: 0; overflow: hidden; border-radius: var(--r-lg); }
.news-lead-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sunk); }
.news-lead-body { padding: 16px 18px 18px; }
.news-lead:not(.has-img) .news-lead-body { padding: 20px 18px; background: var(--board); color: var(--board-text); }
.news-lead:not(.has-img) .news-meta { color: var(--board-muted); }
.news-kicker { display: inline-block; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 4px; padding: 2px 8px; }
.news-lead-title { font-family: var(--font-c); font-size: 32px; line-height: 1.05; font-weight: 700; margin: 10px 0 0; letter-spacing: -.005em; text-wrap: balance; }
.news-feature { display: flex; gap: 14px; align-items: flex-start; padding: 14px; }
.news-feature-body { flex: 1; min-width: 0; }
.news-feature-title { font-family: var(--font-c); font-size: 22px; line-height: 1.1; font-weight: 700; margin: 0; text-wrap: balance; }
.news-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; }
.news-row-body { flex: 1; min-width: 0; }
.news-row-title { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.news-thumb { width: 96px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--sunk); }
.news-thumb.sm { width: 64px; height: 64px; }
.news-alert-btn { gap: 6px; }
.news-alert-btn .i { width: 16px; height: 16px; }
.news-alert-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (max-width: 480px) {
  .news-alert-btn span { display: none; }
  .news-lead-title { font-size: 28px; }
  .news-feature-title { font-size: 19px; }
  .news-thumb { width: 80px; height: 64px; }
}
@media (min-width: 960px) {
  #news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 1100px; }
  #news-list .news-lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  #news-list .news-lead:not(.has-img) { display: block; }
  .news-lead-img { height: 100%; aspect-ratio: auto; min-height: 260px; }
  .news-lead-body { display: flex; flex-direction: column; justify-content: center; padding: 26px 28px; }
  .news-lead-title { font-size: 40px; }
  #news-list .card { min-height: 0; display: flex; }
  #news-list .news-lead.has-img { display: grid; }
}
@media (min-width: 960px) { #news-list .news-feature, #news-list .news-row { flex-direction: row; justify-content: flex-start; } }
#news-list .news-lead { padding: 0; }
#news-list .news-feature { padding: 14px; }
.news-kicker { align-self: flex-start; }
.board-explainer { margin: -4px 0 10px; font-size: 13.5px; }
.acct-foot-actions { display: flex; align-items: center; gap: 18px; }
.danger-btn { background: var(--loss); border-color: var(--loss); color: #fff; }
.modal-card .btn.wide + .btn.wide { margin-top: 8px; }

/* Email + password sign-up */
.pass-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.pass-form .field input { min-height: 44px; }
.pass-form .check-row { margin: 2px 0; }
.pass-form .form-error:empty { display: none; }
.pass-form .primary-btn { width: 100%; min-height: 46px; font-size: 16px; margin-top: 2px; }
.pass-form .primary-btn:disabled { opacity: .7; cursor: progress; }
.link-btn.forgot { display: block; margin: 8px 0 0 auto; font-size: 13px; font-weight: 500; }
#signin-body .google-btn { width: 100%; }
#signin-body .code-entry { margin-top: 12px; }
#signin-body .code-entry .email-row { margin-top: 8px; }

/* Create account / Sign in switch */
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--line); border-radius: 12px; }
.mode-tab { min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.mode-tab.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(12, 26, 46, .14); }
.mode-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Password field with show/hide */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 64px; }
.peek { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--brand); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.peek:focus-visible { outline: 2px solid var(--brand); }
.form-error .ok-note { color: var(--win); font-weight: 500; }
.form-error b { color: var(--text); }

/* Leaderboard: full record */
.hb-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hb-k { flex-shrink: 0; width: 44px; font-size: 12px; font-weight: 600; text-transform: none; color: var(--board-muted); }
.hb-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-foot { align-items: flex-end; flex-wrap: wrap; row-gap: 12px; }
.hero-best { flex: 1 1 240px; }
.hero-best:empty { display: none; }
.lead-meta .small { font-size: 13px; }
.rg-note { font-size: 13px; color: var(--muted); margin: 10px 2px 0; line-height: 1.45; }
.feed-head { margin-bottom: 10px; }
.feed-head h3 { margin: 0; }
.seg-sm button { padding: 4px 10px; font-size: 13px; }

/* Notifications: quiet hours + take a break */
.notif-calm { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.notif-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.notif-row select { max-width: 60%; }
#pause-note { margin: 0; }

/* Play responsibly */
.hide-promos .tab[data-tab="promos"] { display: none; }
.promo-disclose { font-size: 14px; color: var(--muted); background: var(--sunk); border-radius: var(--r); padding: 10px 12px; margin: 0 0 14px; line-height: 1.45; }
.promo-disclose .link-btn { font-size: 14px; }
.rg-card > p.muted { margin: 0 0 6px; font-size: 14px; line-height: 1.5; }
.rg-card small.block { display: block; font-weight: 400; font-size: 13px; margin-top: 2px; }
.rg-help { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.rg-help p { margin: 4px 0 0; }
.rg-help a { color: var(--brand); font-weight: 600; }
footer a[href^="tel"] { font-weight: 600; }

/* Win % filter */
.board-head { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-head h3 { margin: 0; }
.win-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.win-filter select { min-height: 34px; padding: 4px 28px 4px 10px; font-size: 14px; }
.win-filter select.on { border-color: var(--brand); color: var(--text); font-weight: 700; }
.filter-note { margin: 4px 2px 10px; }
.lead-row[hidden] { display: none; }

/* Phones: install the app first */
.app-gate { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 20px; background: var(--board); overflow-y: auto; }
.app-gate[hidden] { display: none; }
.app-gated { overflow: hidden; }
.app-gate-card { width: 100%; max-width: 420px; background: var(--card); color: var(--text); border-radius: 18px; padding: 28px 22px 22px; box-shadow: var(--shadow-lg); }
.app-gate-logo { width: 64px; height: 64px; border-radius: 16px; display: block; margin-bottom: 14px; }
.app-gate-card h2 { font-family: var(--font-c); font-size: 30px; line-height: 1.05; margin: 0 0 8px; }
.app-gate-card > p.muted { font-size: 15px; line-height: 1.5; margin: 0 0 6px; }
.app-gate-card .steps { font-size: 16px; }
.app-gate-card .steps li { margin-bottom: 12px; }
.app-gate-card .btn.wide { margin: 4px 0 10px; }
.app-gate-foot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
