/*
  CrownPredicts design system (light)
  VOICE   friendly, trustworthy, social; numbers first
  IDEA    a bright Kenyan market board: purple brand, green YES, red NO
  COLOUR  white surfaces on a soft lilac-white page, purple #6d28d9 brand, green for yes/money, red for no
  TYPE    Plus Jakarta Sans (bundled). Phone sizes 12 / 13 / 15 / 17 / 20+
  LAYOUT  phone first, single column; two columns from 900px with a sticky trade panel
*/

@font-face {
  font-family: "Jakarta";
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.7660bd9909fb.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f6fb;
  --surface: #ffffff;
  --surface-2: #f4f2fa;
  --line: #e7e4f0;
  --line-2: #d6d1e6;
  --text: #17122b;
  --muted: #6b6784;
  --brand: #6d28d9;
  --brand-2: #5b21b6;
  --brand-soft: #f1ebff;
  --brand-ink: #ffffff;
  --go: #2fd27a;
  --go-2: #22b968;
  --go-ink: #052e16;
  --yes: #15803d;
  --yes-soft: #dcfce7;
  --no: #dc2626;
  --no-soft: #fee2e2;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --gold: #f59e0b;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --shadow: 0 1px 2px rgba(23, 18, 43, .04), 0 4px 14px rgba(23, 18, 43, .05);
  --r: 16px;
  --r-sm: 11px;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .9375rem;
  --fs-h2: 1.0625rem;
  --fs-h1: clamp(1.3rem, 1rem + 1.6vw, 1.85rem);
  --fs-hero: clamp(1.55rem, 1.05rem + 2.8vw, 2.6rem);
  --tap: 44px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-md); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) { body { font-size: 1rem; } }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; display: flex; align-items: center; gap: .45rem; }
h3 { font-size: var(--fs-md); font-weight: 700; }
p, li, label, legend { overflow-wrap: anywhere; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.container { max-width: 1160px; margin: 0 auto; padding: 1rem .875rem 1.5rem; }
@media (min-width: 760px) { .container { padding: 1.5rem 1.25rem 2.5rem; } }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.mt { margin-top: 1.25rem; }
.inline { display: inline; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icons */
.i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.i.h { width: 1.2em; height: 1.2em; color: var(--brand); }
.i.h.hot { color: #ea580c; }
.i.lg { width: 1.5rem; height: 1.5rem; }
.i.xl { width: 2.25rem; height: 2.25rem; color: var(--line-2); }
.i.navicon { width: 1.4rem; height: 1.4rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .6rem .875rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .4rem; font-size: 1.45rem; font-weight: 800; color: var(--text); letter-spacing: -.05em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand .word, .brand .word span { color: var(--text); }
.nav { display: flex; gap: .15rem; align-items: center; margin-left: .75rem; }
.nav a { color: var(--muted); padding: .45rem .75rem; border-radius: 999px; font-weight: 600; font-size: var(--fs-md); }
.nav a:hover, .nav a.active { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.top-right { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.balance-chip {
  display: inline-flex; gap: .45rem; align-items: center; height: 38px; padding: 0 .3rem 0 .7rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-weight: 800; font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.balance-chip > .i { color: var(--text); width: 1.15rem; height: 1.15rem; }
.balance-chip:hover { text-decoration: none; border-color: var(--brand); }
.balance-chip .plus { background: var(--go); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.balance-chip .plus .i { width: 15px; height: 15px; stroke-width: 3; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; text-transform: uppercase; font-size: .9rem;
}
.avatar:hover { text-decoration: none; }
.avatar.lg { width: 68px; height: 68px; font-size: 1.6rem; }
.avatar.sm { width: 28px; height: 28px; font-size: .72rem; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.test-banner { background: var(--amber-soft); color: var(--amber); text-align: center; font-weight: 700; padding: .3rem .5rem; font-size: var(--fs-xs); border-bottom: 1px solid #fde68a; }

/* Bottom navigation (phones) */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .nav, .hide-mobile { display: none !important; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: .2rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: .35rem .35rem calc(.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(23, 18, 43, .05);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 50px; border-radius: 14px; color: var(--muted); font-size: .6875rem; font-weight: 600; }
  .bottom-nav a:hover { text-decoration: none; color: var(--brand); }
  .bottom-nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 800; }
  .bottom-nav .fab { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; box-shadow: 0 0 0 4px #fff, 0 8px 20px rgba(109, 40, 217, .35); transform: translateY(-12px); }
  .bottom-nav .fab .i { width: 24px; height: 24px; stroke-width: 2.6; }
}
@media (max-width: 380px) {
  .topbar { padding: .55rem .625rem; gap: .5rem; }
  .brand { font-size: 1.2rem; }
  .brand img { width: 28px; height: 28px; }
  .balance-chip > .i { display: none; }
}

/* Cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin-bottom: .875rem; min-width: 0; box-shadow: var(--shadow); }
@media (min-width: 760px) { .card { padding: 1.25rem; } }
.card.flat { background: var(--surface-2); box-shadow: none; }
.grid { display: grid; gap: .875rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid > * { min-width: 0; margin-bottom: 0; }
.row { display: flex; gap: .875rem; flex-wrap: wrap; }
.row > * { flex: 1 1 260px; min-width: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.25rem; align-items: start; }
.two-col > *, .main-col > * { min-width: 0; }
.sticky { position: sticky; top: 76px; }
@media (max-width: 900px) {
  .two-col { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .main-col { display: contents; }
  .main-col > * { order: 4; }
  .main-col > .first { order: 1; }
  .main-col > .second { order: 2; }
  .two-col > aside { display: contents; }
  .two-col > aside > * { order: 3; }
  .two-col > aside > .share-card { order: 5; }
  .sticky { position: static; }
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1.4rem 0 .7rem; }
.section-head h2 { margin: 0; font-size: 1.15rem; }
.section-head .see-all { font-weight: 700; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: .25rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .875rem; }
.page-head h1 { margin: 0; }

/* Hero */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 1.4rem 1.15rem 1.3rem; margin-bottom: 1rem; color: #fff;
  background: linear-gradient(125deg, #4c1d95 0%, #6d28d9 55%, #7c3aed 100%);
}
.hero .deco { position: absolute; right: -60px; top: -30px; width: 240px; height: 240px; pointer-events: none; }
.hero .deco span { position: absolute; width: 230px; height: 58px; border-radius: 40px; transform: rotate(-35deg); }
.hero .deco span:first-child { background: rgba(167, 139, 250, .45); top: 40px; left: 10px; }
.hero .deco span:last-child { background: rgba(74, 222, 128, .5); top: 100px; left: 40px; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.08; max-width: 15ch; margin-bottom: .55rem; position: relative; z-index: 1; color: #fff; }
.hero p { color: #e4dbff; max-width: 36ch; margin: 0 0 1rem; font-size: var(--fs-md); position: relative; z-index: 1; }
.hero .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; position: relative; z-index: 1; max-width: 420px; }
.hero .actions .btn { white-space: nowrap; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.8); background: transparent; }
.hero .btn.ghost:hover { background: rgba(255,255,255,.1); }
@media (min-width: 760px) {
  .hero { padding: 2.4rem 2.2rem; }
  .hero .deco { right: 10px; top: 0; width: 380px; height: 260px; }
  .hero .deco span { width: 320px; height: 80px; }
  .hero .deco span:last-child { top: 130px; left: 70px; }
}

/* Search & category chips */
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px 0; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; height: 38px; padding: 0 .9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: var(--fs-sm); scroll-snap-align: start;
}
.chip .i { width: 1.05rem; height: 1.05rem; color: var(--text); }
.chip:hover { text-decoration: none; border-color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.active .i { color: #fff; }
button.chip { font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin-bottom: 1rem; }
.search { position: relative; display: flex; min-width: 260px; }
.search .i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 1.2rem; height: 1.2rem; }
.search input { padding: 0 1rem 0 2.6rem; height: 46px; min-height: 46px; border-radius: 14px; background: var(--surface); }
@media (max-width: 760px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { min-width: 0; width: 100%; order: -1; }
  .chips { width: 100%; }
}

/* Market cards */
.mcard { display: flex; flex-direction: column; gap: .7rem; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.mcard:hover { text-decoration: none; border-color: var(--line-2); box-shadow: 0 8px 24px rgba(23, 18, 43, .08); }
@media (hover: hover) { .mcard:hover { transform: translateY(-2px); } }
.mcard-top { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: .8rem; align-items: start; }
.thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .i { width: 2rem; height: 2rem; color: #fff; }
.thumb[data-cat=politics] { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }
.thumb[data-cat=trends] { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.thumb[data-cat=sports] { background: linear-gradient(135deg, #22c55e, #15803d); }
.thumb[data-cat=games] { background: linear-gradient(135deg, #fb923c, #ea580c); }
.thumb[data-cat=music] { background: linear-gradient(135deg, #f472b6, #db2777); }
.thumb[data-cat=stocks] { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.thumb[data-cat=news] { background: linear-gradient(135deg, #94a3b8, #475569); }
.thumb[data-cat=crypto] { background: linear-gradient(135deg, #fbbf24, #d97706); }
.thumb[data-cat=entertainment] { background: linear-gradient(135deg, #f87171, #b91c1c); }
.thumb[data-cat=other] { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.mcard-body { min-width: 0; }
.mcard .tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .35rem; }
.mcard h3 { margin: 0 0 .2rem; font-size: var(--fs-md); font-weight: 800; line-height: 1.28; }
.mcard .sub { margin: 0; color: var(--muted); font-size: var(--fs-xs); }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.yn > span { display: grid; place-items: center; gap: 1px; padding: .45rem .5rem; border-radius: 10px; text-align: center; }
.yn b { font-size: 1.02rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.yn small { font-size: var(--fs-xs); color: var(--text); opacity: .75; font-variant-numeric: tabular-nums; }
.yn .y { background: var(--yes-soft); color: var(--yes); }
.yn .n { background: var(--no-soft); color: var(--no); }
.opts { display: grid; gap: .45rem; }
.opt-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: var(--fs-sm); font-weight: 600; }
.opt-row span:first-child { min-width: 0; overflow-wrap: anywhere; }
.opt-row .pct { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-bar { height: 5px; background: var(--surface-2); border-radius: 5px; overflow: hidden; margin-top: .2rem; }
.mini-bar span { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.more-opts { color: var(--muted); font-size: var(--fs-xs); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-xs); border-top: 1px solid var(--line); padding-top: .6rem; margin-top: auto; }
.card-foot span { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.card-foot b { color: var(--text); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; height: 24px; padding: 0 .55rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge .i { width: .95rem; height: .95rem; }
.badge.open { background: var(--yes-soft); color: var(--yes); }
.badge.disputed { background: var(--no-soft); color: var(--no); }
.badge.pending, .badge.closing { background: var(--amber-soft); color: var(--amber); }
.badge.settled { background: var(--blue-soft); color: var(--blue); }
.badge.hot { background: var(--brand-soft); color: var(--brand); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 100% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } html { scroll-behavior: auto; } }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: var(--fs-xs); }

/* Buttons & forms */
.btn, button[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: var(--tap);
  background: var(--go); color: var(--go-ink); border: 0; border-radius: 12px; padding: 0 1.1rem;
  font: inherit; font-weight: 800; font-size: var(--fs-md); cursor: pointer; transition: background .12s, transform .05s; text-align: center;
}
.btn:hover, button[type=submit]:hover { background: var(--go-2); text-decoration: none; }
.btn:active, button[type=submit]:active { transform: scale(.98); }
.btn.small { min-height: 36px; padding: 0 .8rem; font-size: var(--fs-sm); border-radius: 10px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); }
.btn.secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.danger, button.danger { background: var(--no); color: #fff; }
.btn.danger:hover, button.danger:hover { background: #b91c1c; }
.btn.whatsapp { background: #25d366; color: #052e16; }
button:disabled { opacity: .45; cursor: not-allowed; }
form p { margin: 0 0 .85rem; }
label { display: block; font-size: var(--fs-sm); color: var(--muted); margin-bottom: .3rem; font-weight: 700; }
input, select, textarea {
  width: 100%; max-width: 100%; min-height: var(--tap); padding: .55rem .8rem; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 90px; }
input::placeholder, textarea::placeholder { color: #9a96ad; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 40, 217, .15); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; margin: 0 .5rem 0 0; accent-color: var(--brand); vertical-align: middle; }
.helptext { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: .25rem; }
.helptext ul { margin: .2rem 0; padding-left: 1.1rem; }
.errorlist { color: var(--no); list-style: none; padding: 0; margin: .25rem 0; font-size: var(--fs-sm); }

.alert { padding: .75rem .9rem; border-radius: var(--r-sm); margin-bottom: .875rem; background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-md); box-shadow: var(--shadow); }
.alert.success { border-left: 4px solid #22c55e; }
.alert.error { border-left: 4px solid var(--no); }
.alert.warning { border-left: 4px solid var(--gold); }

/* Market page header */
.market-head { display: flex; gap: .875rem; align-items: flex-start; }
.market-head > div:last-child { min-width: 0; flex: 1; }
.market-icon { flex: 0 0 64px; }
.market-icon .thumb { width: 64px; height: 64px; }
.market-icon .thumb .i { width: 1.6rem; height: 1.6rem; }
@media (max-width: 600px) { .market-icon { flex-basis: 56px; } .market-icon .thumb { width: 56px; height: 56px; } }
.market-head .badges { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .45rem; }
.stat-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
@media (min-width: 600px) { .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-strip div { font-size: var(--fs-xs); color: var(--muted); min-width: 0; }
.stat-strip b { display: block; color: var(--text); font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Prediction: chance rows */
.chance-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; padding: .75rem .8rem; border-radius: 12px; background: var(--surface-2); margin-bottom: .5rem; border: 2px solid transparent; }
.chance-row.is-yes { background: var(--yes-soft); }
.chance-row.is-no { background: var(--no-soft); }
.chance-row.winner { border-color: var(--gold); }
.chance-row.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 40, 217, .15); }
.chance-label strong { display: block; font-size: var(--fs-md); overflow-wrap: anywhere; }
.chance-label .mini-bar { margin-top: .4rem; background: rgba(255,255,255,.75); }
.chance-pct { font-size: 1.2rem; font-weight: 800; color: var(--brand); min-width: 3rem; text-align: right; font-variant-numeric: tabular-nums; }
.is-yes .chance-pct { color: var(--yes); }
.is-yes .mini-bar span { background: #22c55e; }
.is-no .chance-pct { color: var(--no); }
.is-no .mini-bar span { background: var(--no); }
.chance-row .btn { white-space: nowrap; }
.chance-row .buy-pick { min-width: 6.4rem; }
.is-no .buy-pick { background: var(--no); color: #fff; }
.is-no .buy-pick:hover { background: #b91c1c; }
@media (max-width: 420px) { .chance-row { gap: .6rem; padding: .7rem; } .chance-pct { font-size: 1.05rem; min-width: 2.6rem; } .chance-row .btn.small { padding: 0 .6rem; } }
@media (max-width: 340px) {
  .chance-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: .6rem; }
  .chance-row .buy-pick { grid-column: 1 / -1; width: 100%; }
}

/* Pool (custom bet) options */
.outcome-btn {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; text-align: left;
  padding: .75rem .9rem; border-radius: 12px; background: var(--surface-2); border: 2px solid transparent; min-height: 56px;
  color: var(--text); font: inherit; cursor: pointer; margin-bottom: .5rem; position: relative; overflow: hidden;
}
.outcome-btn .fill { position: absolute; inset: 0 auto 0 0; background: rgba(109, 40, 217, .08); z-index: 0; }
.outcome-btn > *:not(.fill) { position: relative; z-index: 1; min-width: 0; }
.outcome-btn strong { overflow-wrap: anywhere; }
.outcome-btn:hover:not(:disabled) { border-color: var(--line-2); }
.outcome-btn.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 40, 217, .15); }
.outcome-btn.winner { border-color: var(--gold); }
.outcome-btn:disabled { cursor: default; opacity: 1; }
.outcome-btn .odds { text-align: right; white-space: nowrap; }
.outcome-btn .odds b { display: block; font-size: 1.05rem; color: var(--brand); font-variant-numeric: tabular-nums; }

/* Trade panel / bet slip */
.slip h2 { justify-content: space-between; }
.slip .pick { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: .65rem .8rem; margin-bottom: .8rem; font-size: var(--fs-md); }
.slip .pick b { color: var(--brand); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin: .5rem 0 .9rem; }
.quick button { min-height: 38px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.quick button:hover { border-color: var(--brand); color: var(--brand); }
.amount-input { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.slip-line { display: flex; justify-content: space-between; gap: .75rem; font-size: var(--fs-sm); padding: .28rem 0; color: var(--muted); }
.slip-line b { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.slip-line.big { align-items: baseline; }
.slip-line.big b { color: var(--yes); font-size: 1.25rem; }
.slip hr { border: 0; border-top: 1px solid var(--line); margin: .6rem 0 .8rem; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.tabs a { display: grid; place-items: center; min-height: 36px; padding: 0 .9rem; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: var(--fs-sm); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(23,18,43,.1); }
.tabs.full { display: flex; width: 100%; }
.tabs.full a { flex: 1; }

/* Chart */
.chart-wrap { position: relative; width: 100%; height: 200px; }
@media (min-width: 760px) { .chart-wrap { height: 240px; } }
.chart-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.legend { display: flex; gap: .4rem 1rem; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); margin-top: .6rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }

/* Share */
.share { display: flex; gap: .5rem; }
.share input { flex: 1; min-width: 0; font-size: var(--fs-sm); background: var(--surface-2); }

/* Activity & comments */
.activity { display: flex; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.activity:last-child { border-bottom: 0; }
.activity > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.comment { display: flex; gap: .7rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .avatar { width: 34px; height: 34px; font-size: .8rem; }
.comment .body { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-md); }
.comment .body a { color: var(--text); }
.comment .body p { margin: .15rem 0 0; }
.comment button.link { min-width: 36px; min-height: 36px; display: grid; place-items: center; }
.comment-form { display: flex; gap: .5rem; margin-bottom: .5rem; }
.comment-form input { flex: 1; min-width: 0; }

/* Tables */
@media (max-width: 600px) { .col-opt { display: none; } }
.table-wrap { overflow-x: auto; margin: 0 -.25rem; padding: 0 .25rem; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { text-align: left; padding: .65rem .45rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: var(--fs-xs); white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
td a { color: var(--text); font-weight: 600; }
.pos { color: var(--yes); font-weight: 800; }
.neg { color: var(--no); font-weight: 800; }

/* Leaderboard */
.rank { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); background: var(--surface-2); }
.rank.r1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #451a03; }
.rank.r2 { background: linear-gradient(135deg, #f1f5f9, #cbd5e1); color: #1e293b; }
.rank.r3 { background: linear-gradient(135deg, #fed7aa, #f97316); color: #431407; }
.lb-user { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); min-width: 0; overflow-wrap: anywhere; }

/* Wallet & stats */
.wallet-card { background: linear-gradient(125deg, #4c1d95, #6d28d9); border: 0; color: #fff; }
.wallet-card .muted { color: #ddd3ff; }
.balance { font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: .6rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .85rem; min-width: 0; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { color: var(--muted); font-size: var(--fs-xs); }

/* Create bet */
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.label-like { font-size: var(--fs-sm); color: var(--muted); font-weight: 700; margin: 0 0 .4rem; }
fieldset.options { border: 1px solid var(--line); border-radius: 14px; padding: .9rem; margin: 0 0 .9rem; min-width: 0; }
fieldset.options legend { font-size: var(--fs-sm); color: var(--muted); font-weight: 700; padding: 0 .3rem; }
.option-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.option-row[hidden] { display: none; }
.option-row .num { flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-xs); }
.option-row input { flex: 1; min-width: 0; }

/* How it works */
.steps { display: grid; gap: .875rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps .card { margin-bottom: 0; }
.step .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: .6rem; }
.step .ico .i { width: 1.4rem; height: 1.4rem; }
.step h3 { margin-bottom: .3rem; }
.step p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.faq details { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: .5rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: .5rem 0 0; color: var(--muted); font-size: var(--fs-sm); }

/* Auth */
.auth { max-width: 420px; margin: 1.5rem auto; }
.auth .brand { justify-content: center; margin-bottom: 1rem; font-size: 1.6rem; }

.empty { text-align: center; padding: 1.75rem 1rem; color: var(--muted); }
.empty .big { display: grid; place-items: center; margin-bottom: .5rem; }

/* Footer */
.footer { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin-top: 1rem; }
.footer .links { margin: 0; padding: 1rem 1rem .5rem; }
.footer .links a { color: var(--brand); }
.footer .age-band { background: linear-gradient(90deg, #4c1d95, #6d28d9); color: #fff; font-weight: 700; padding: .75rem 1rem calc(.75rem + 78px + env(safe-area-inset-bottom)); margin: 0; }
@media (min-width: 761px) { .footer .age-band { padding-bottom: .75rem; } }
.footer .age-band .age { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; font-size: .62rem; margin-right: .4rem; vertical-align: middle; }
#install-box .btn { gap: .4rem; }
@media (max-width: 759px) { .hero .deco { right: -120px; top: -50px; opacity: .8; } }
.market-head h1 { font-size: clamp(1.2rem, .95rem + 1.4vw, 1.75rem); }

/* ===== Compact phone layout (cards, hero, type) ===== */
.show-mobile { display: none; }
.mcard h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  :root { --fs-xs: .6875rem; --fs-sm: .75rem; --fs-md: .875rem; --fs-h2: .9375rem; --fs-h1: 1.25rem; --fs-hero: 1.3rem; }
  body { font-size: .875rem; }
  .container { padding: .75rem .75rem 1.25rem; }
  .show-mobile { display: block; }

  /* Hero: short and tidy */
  .hero { padding: 1rem .95rem; border-radius: 16px; margin-bottom: .75rem; }
  .hero h1 { max-width: 19ch; margin-bottom: .35rem; line-height: 1.15; }
  .hero p { font-size: .78rem; margin-bottom: .75rem; max-width: 34ch; }
  .hero .actions { grid-template-columns: 1fr 1fr; gap: .45rem; }
  .hero .actions .btn { min-height: 38px; font-size: .8125rem; padding: 0 .6rem; border-radius: 10px; }
  .hero .deco { right: -95px; top: -40px; transform: scale(.75); transform-origin: top right; opacity: .7; }

  /* Search & chips */
  .search input { height: 40px; min-height: 40px; border-radius: 12px; font-size: .875rem; }
  .search .i { width: 1.05rem; height: 1.05rem; }
  .chip { height: 32px; padding: 0 .7rem; font-size: .75rem; gap: .3rem; }
  .chip .i { width: .9rem; height: .9rem; }
  .section-head { margin: 1rem 0 .5rem; }
  .section-head h2 { font-size: .9375rem; }

  /* Market cards: compact rows */
  .grid { gap: .6rem; }
  .card { padding: .8rem; border-radius: 14px; margin-bottom: .65rem; }
  .mcard { gap: .5rem; }
  .mcard-top { grid-template-columns: 56px minmax(0, 1fr); gap: .65rem; }
  .thumb { width: 56px; height: 56px; border-radius: 10px; }
  .thumb .i { width: 1.4rem; height: 1.4rem; }
  .mcard .tags { gap: .25rem; margin-bottom: .2rem; }
  .badge { height: 20px; padding: 0 .45rem; font-size: .65rem; gap: .2rem; }
  .badge .i { width: .75rem; height: .75rem; }
  .mcard h3 { font-size: .8125rem; line-height: 1.3; margin-bottom: .1rem; -webkit-line-clamp: 2; }
  .mcard .sub { font-size: .6875rem; }
  .opts { gap: .3rem; }
  .opt-extra { display: none; }
  .opt-row { font-size: .75rem; }
  .mini-bar { height: 3px; margin-top: .15rem; }
  .yn { gap: .4rem; }
  .yn > span { padding: .3rem .4rem; border-radius: 8px; grid-auto-flow: column; justify-content: center; align-items: baseline; gap: .35rem; }
  .yn b { font-size: .8125rem; }
  .yn small { font-size: .65rem; }
  .card-foot { padding-top: .45rem; font-size: .6875rem; }
  .card-foot b { font-size: .6875rem; }
  .more-opts { font-size: .65rem; }

  /* Market page */
  .market-icon { flex-basis: 48px; }
  .market-icon .thumb { width: 48px; height: 48px; }
  .market-head h1 { font-size: 1.05rem; line-height: 1.25; }
  .stat-strip b { font-size: .8125rem; }
  .chance-row { padding: .55rem .65rem; border-radius: 10px; margin-bottom: .4rem; }
  .chance-label strong { font-size: .8125rem; }
  .chance-pct { font-size: .95rem; min-width: 2.4rem; }
  .chance-row .btn.small, .chance-row .buy-pick { min-height: 32px; min-width: 5.4rem; font-size: .75rem; }
  .btn { min-height: 42px; font-size: .875rem; }
  .amount-input { font-size: 1.1rem; }

  /* Top bar */
  .brand { font-size: 1.25rem; }
  .brand img { width: 28px; height: 28px; }
  .balance-chip { height: 34px; font-size: .75rem; }
  .avatar { width: 34px; height: 34px; }
}
@media (max-width: 760px) { .show-mobile { display: block; } .opt-extra { display: none; } }
.show-mobile-inline { display: none; }
.grid > .card { margin-bottom: 0; }
@media (max-width: 760px) { .show-mobile-inline { display: inline; } }
/* Hero headline: always one line, sized from the screen width (text is ~16.4x its font size) */
.hero h1 { white-space: nowrap; max-width: none; letter-spacing: -.02em; font-size: min(2.6rem, calc((100vw - 130px) / 16.8)); }
@media (max-width: 760px) { .hero h1 { font-size: min(1.6rem, calc((100vw - 62px) / 16.8)); } }
@media (min-width: 1200px) { .hero h1 { font-size: 2.6rem; } }

/* Chart inside the market header */
.market-desc { margin: .8rem 0 0; }
.chart-box { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.chart-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.chart-top h2 { margin: 0; font-size: var(--fs-h2); }
.tabs.range { padding: 3px; gap: 2px; }
.tabs.range a { min-height: 28px; padding: 0 .6rem; font-size: var(--fs-xs); }
.chart-box .legend { margin: 0 0 .4rem; }
.chart-box .chart-wrap { height: 190px; }
@media (min-width: 760px) { .chart-box .chart-wrap { height: 230px; } }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: var(--fs-sm); }

/* ===== Predict box (under the question) ===== */
.predict { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); max-width: 560px; }
.pick-yn { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: .8rem; }
.pick-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 54px; border-radius: 14px;
  font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; border: 2px solid transparent; transition: transform .05s, box-shadow .12s, background .12s;
}
.pick-btn b { font-variant-numeric: tabular-nums; font-weight: 800; }
.pick-btn.yes { background: var(--yes-soft); color: var(--yes); }
.pick-btn.no { background: var(--no-soft); color: var(--no); }
.pick-btn:active { transform: scale(.98); }
.pick-btn.yes.selected { background: #22c55e; color: #fff; box-shadow: 0 6px 16px rgba(34,197,94,.3); }
.pick-btn.no.selected { background: var(--no); color: #fff; box-shadow: 0 6px 16px rgba(220,38,38,.28); }
.pick-list { display: grid; gap: .45rem; margin-bottom: .8rem; }
.pick-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; width: 100%; text-align: left;
  padding: .6rem .75rem; border-radius: 12px; background: var(--surface-2); border: 2px solid transparent; color: var(--text); font: inherit; cursor: pointer;
}
.pick-row b { color: var(--brand); font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.pick-row .pr-label { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.pick-row .mini-bar { display: block; margin-top: .3rem; background: #fff; }
.pick-row.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(109,40,217,.12); }
.pick-row.winner { border-color: var(--gold); }
.result .pick-row { cursor: default; }
.amount-label { display: flex; justify-content: space-between; gap: .5rem; }
.amount-label .muted { font-weight: 600; }
.predict .quick { margin: .45rem 0 .7rem; }
.win-box { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .75rem; }
.win-box > div { background: var(--surface-2); border-radius: 12px; padding: .55rem .7rem; min-width: 0; }
.win-box span { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.win-box b { display: block; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.win-box > div:first-child b { color: var(--yes); }
.predict-btn { min-height: 50px; font-size: 1rem; }
.predict-btn.is-no { background: var(--no); color: #fff; }
.predict-btn.is-no:hover { background: #b91c1c; }
.more { margin-top: .6rem; }
.more summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: var(--fs-sm); list-style: none; display: inline-flex; gap: .3rem; align-items: center; min-height: 32px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "▸"; transition: transform .12s; }
.more[open] summary::before { transform: rotate(90deg); }
@media (max-width: 600px) {
  .pick-btn { min-height: 48px; font-size: .95rem; border-radius: 12px; }
  .win-box b { font-size: 1rem; }
  .predict-btn { min-height: 46px; font-size: .9375rem; }
}

.predict-panel { animation: panelIn .18s ease-out; }
.predict-panel[hidden] { display: none; }
.pick-yn, .pick-list { margin-bottom: 0; }
.predict-panel { margin-top: .8rem; }
@keyframes panelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .predict-panel { animation: none; } }

.amount-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.amount-head label { margin: 0; }
.panel-hide {
  display: inline-flex; align-items: center; gap: .25rem; min-height: 32px; padding: 0 .7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer;
}
.panel-hide:hover { color: var(--brand); border-color: var(--brand); }
.panel-hide .i { width: .95rem; height: .95rem; }
.balance-note { margin: .3rem 0 0; font-size: var(--fs-xs); color: var(--muted); text-align: right; }

/* Sell panel */
.sell-card .pick { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: .65rem .8rem; margin-bottom: .8rem; }
.sell-card .pick b { color: var(--brand); }
.sell-card .slip-line { display: flex; justify-content: space-between; gap: .75rem; font-size: var(--fs-sm); padding: .28rem 0; color: var(--muted); }
.sell-card .slip-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.sell-card .slip-line.big b { color: var(--yes); font-size: 1.2rem; }
.sell-actions { display: grid; grid-template-columns: 1fr 2fr; gap: .5rem; margin-top: .6rem; }
.sell-actions .btn { min-height: 48px; }
.sell-card .share input { font-size: 1.05rem; font-weight: 800; }

/* ===== Filters ===== */
.filter-btn {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .8rem; border-radius: 999px; flex: none;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
}
.filter-btn .i { width: 1rem; height: 1rem; color: var(--brand); }
.filter-btn:hover, .filter-btn.on { border-color: var(--brand); color: var(--brand); }
.filter-btn .count { background: var(--brand); color: #fff; min-width: 20px; height: 20px; }

.subchips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding: 2px 0 .25rem; margin: -.1rem 0 .5rem; }
.subchips::-webkit-scrollbar { display: none; }
.subchip {
  display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; height: 30px; padding: 0 .7rem; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: var(--fs-xs); border: 1px solid transparent;
}
.subchip .i { width: .85rem; height: .85rem; }
.subchip .n, .chip .n { opacity: .65; font-weight: 600; }
.subchip:hover { text-decoration: none; border-color: var(--brand); }
.subchip.active { background: var(--brand); color: #fff; }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 .6rem; }
.afchip { display: inline-flex; align-items: center; gap: .25rem; height: 28px; padding: 0 .55rem 0 .7rem; border-radius: 999px; background: var(--text); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.afchip .i { width: .8rem; height: .8rem; }
.afchip:hover { text-decoration: none; background: var(--brand); }
.clear-all { font-size: var(--fs-xs); font-weight: 700; margin-left: .2rem; }

/* Slide-up sheet */
body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(23, 18, 43, .45); animation: fadeIn .15s ease-out; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(23,18,43,.2); animation: sheetUp .2s ease-out;
}
@media (min-width: 761px) { .sheet-panel { left: 50%; right: auto; bottom: auto; top: 8vh; width: min(560px, 92vw); transform: translateX(-50%); border-radius: 20px; animation: fadeIn .15s ease-out; } }
.sheet-panel form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1rem .5rem; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 0; color: var(--text); cursor: pointer; }
.sheet-body { overflow-y: auto; padding: .4rem 1rem 1rem; -webkit-overflow-scrolling: touch; }
.fgroup { border: 0; padding: 0; margin: .8rem 0 0; min-width: 0; }
.fgroup legend { font-weight: 800; font-size: var(--fs-sm); color: var(--text); margin-bottom: .5rem; padding: 0; }
.fgroup .chips.wrap { margin-bottom: 0; }
.sub-label { margin-top: .7rem; }
.chip.check { cursor: pointer; user-select: none; height: 34px; }
.chip.check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip.check:has(input:checked), .chip.check.is-checked { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.check:has(input:checked) .i, .chip.check.is-checked .i { color: #fff; }
.chip.check:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: .5rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet-panel, .sheet-backdrop { animation: none; } }
.topic-line { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin: .8rem 0 0; padding: .55rem .7rem; border-radius: 10px; background: var(--brand-soft); color: var(--text); font-size: var(--fs-sm); }
.topic-line .i { color: var(--brand); }
.group-label { margin: .6rem 0 .35rem; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: none; }
.chip.check.zero { opacity: .55; }
.chip.check.zero.is-checked, .chip.check.zero:has(input:checked) { opacity: 1; }

/* ---------- Portfolio: one compact line per prediction ---------- */
.plist { display: flex; flex-direction: column; }
.plist-head, .prow { display: grid; grid-template-columns: minmax(0, 1fr) 5.6rem 5.6rem; gap: .6rem; align-items: center; }
.plist-head { font-size: var(--fs-xs); color: var(--muted); padding: 0 0 .45rem; border-bottom: 1px solid var(--line); }
.plist-head span:not(:first-child), .prow-num { text-align: right; }
.prow { padding: .65rem 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.prow:last-child { border-bottom: 0; }
.prow:hover .prow-title { color: var(--brand); }
.prow-main { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.prow-title { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-pick { align-self: flex-start; max-width: 100%; font-size: var(--fs-xs); font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-num b { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plist-note { font-size: var(--fs-xs); margin: .6rem 0 0; }
@media (max-width: 360px) { .plist-head, .prow { grid-template-columns: minmax(0, 1fr) 4.9rem 4.9rem; gap: .4rem; } }

/* ---------- Wallet ---------- */
.w-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.w-top h1 { margin: 0; }
.w-hero { background: linear-gradient(135deg, #4c1d95, #6d28d9 55%, #7c3aed); color: #fff; border-radius: var(--r); padding: 1rem 1.1rem 1.1rem; margin-bottom: .875rem; box-shadow: 0 8px 24px rgba(109, 40, 217, .25); }
.w-hero-label { display: flex; align-items: center; gap: .4rem; font-size: var(--fs-sm); opacity: .85; }
.w-hero-label .i { width: 1rem; height: 1rem; }
.w-hero-amount { font-size: clamp(1.7rem, 1.2rem + 3vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: .15rem 0 .9rem; overflow-wrap: anywhere; }
.w-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.w-act { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; border-radius: 12px; border: 0; background: var(--go); color: var(--go-ink); font: inherit; font-weight: 800; font-size: var(--fs-sm); cursor: pointer; }
.w-act.ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.w-act[aria-expanded="true"] { outline: 2px solid #fff; outline-offset: 2px; }
.w-act .i { width: 1.05rem; height: 1.05rem; }
.w-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.w-panel-head h2 { margin: 0; }
.w-form { margin-top: .6rem; }
.w-form input[type=text] { margin-bottom: .9rem; }
.w-form .balance-note { margin-bottom: .7rem; }

.w-level { padding: .9rem 1rem; }
.w-level-top { display: flex; align-items: center; gap: .7rem; }
.w-medal { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--lvl-soft, var(--surface-2)); color: var(--lvl, var(--muted)); }
.w-medal .i { width: 1.4rem; height: 1.4rem; }
.w-level-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.w-level-name b { font-size: 1.1rem; color: var(--lvl, var(--text)); }
.w-xp { font-weight: 800; font-size: var(--fs-sm); background: var(--surface-2); border-radius: 999px; padding: .2rem .65rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .8rem 0 .4rem; }
.w-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lvl, var(--brand)), var(--brand)); min-width: 4px; }
.w-level-next { margin: 0; color: var(--muted); }
.w-level-next b { color: var(--text); }
.w-how { margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.w-how summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--brand); min-height: 32px; display: flex; align-items: center; }
.w-how ul { margin: .3rem 0 .7rem; padding-left: 1.1rem; color: var(--muted); }
.w-ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-bottom: .5rem; }
.w-ladder span { border: 1px solid var(--line); border-radius: 10px; padding: .35rem .5rem; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.w-ladder b { display: block; color: var(--text); font-size: var(--fs-sm); }
.w-ladder .done { background: var(--surface-2); }
.w-ladder .on { border-color: var(--brand); background: var(--brand-soft); }
.lvl-rookie { --lvl: #64748b; --lvl-soft: #f1f5f9; }
.lvl-bronze { --lvl: #b45309; --lvl-soft: #fef3c7; }
.lvl-silver { --lvl: #64748b; --lvl-soft: #e2e8f0; }
.lvl-gold { --lvl: #ca8a04; --lvl-soft: #fef9c3; }
.lvl-platinum { --lvl: #0891b2; --lvl-soft: #cffafe; }
.lvl-diamond { --lvl: #7c3aed; --lvl-soft: #ede9fe; }

.w-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: .875rem; }
.w-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .75rem .8rem; min-width: 0; box-shadow: var(--shadow); color: var(--text); display: flex; flex-direction: column; gap: .1rem; position: relative; }
a.w-stat:hover { text-decoration: none; border-color: var(--brand); }
.w-stat .lbl { font-size: var(--fs-xs); color: var(--muted); padding-left: .9rem; }
.w-stat b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-stat small { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: .2rem; }
.w-stat small .i { width: .8rem; height: .8rem; }
.w-dot { position: absolute; left: .8rem; top: 1.08rem; width: 8px; height: 8px; border-radius: 50%; }
.w-dot.dep { background: var(--no); } .w-dot.earn { background: var(--yes); } .w-dot.ref { background: var(--brand); } .w-dot.rec { background: var(--gold); }

.w-chart-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.w-chart-top .tabs { padding: 3px; gap: 2px; flex: none; }
.w-chart-top .tabs a { min-height: 30px; padding: 0 .55rem; font-size: var(--fs-xs); gap: .3rem; display: inline-flex; align-items: center; }
.w-chart-top .tabs .i { width: .95rem; height: .95rem; }
.w-chart .legend { margin: .7rem 0 .3rem; min-height: 1.2rem; }
.w-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; margin: 0; }

.tx-filters { margin: -.1rem 0 .4rem; }
.tx-list { display: flex; flex-direction: column; }
.tx { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.tx:last-of-type { border-bottom: 0; }
.tx[hidden] { display: none; }
.tx-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.tx-ico .i { width: 1.05rem; height: 1.05rem; }
.tx-ico.g-deposit { background: var(--no-soft); color: var(--no); }
.tx-ico.g-earn { background: var(--yes-soft); color: var(--yes); }
.tx-ico.g-predict { background: var(--brand-soft); color: var(--brand); }
.tx-ico.g-withdraw { background: var(--amber-soft); color: var(--amber); }
.tx-ico.g-referral { background: var(--blue-soft); color: var(--blue); }
.tx-main { display: flex; flex-direction: column; min-width: 0; }
.tx-title { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { display: flex; flex-direction: column; align-items: flex-end; }
.tx-amt b { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-panel[hidden] { display: none; }
.tx-ico .i, .w-medal .i { display: block; }

/* ---------- Top tabs (Leaderboard | Refer & earn) and Refer page ---------- */
.top-tabs { margin-bottom: 1rem; }
.top-tabs a { gap: .4rem; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; }
.top-tabs .i { width: 1.05rem; height: 1.05rem; }
.r-hero { background: linear-gradient(135deg, #4c1d95, #6d28d9 55%, #7c3aed); color: #fff; border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: .875rem; position: relative; overflow: hidden; }
.r-hero h1 { margin: .5rem 0 .3rem; }
.r-hero p { margin: 0; font-size: var(--fs-sm); opacity: .92; max-width: 34rem; }
.r-hero-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.r-hero-ico .i { display: block; width: 1.3rem; height: 1.3rem; }
.r-code-label { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; margin: 0 0 .3rem; }
.r-code-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.r-code { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.35rem; font-weight: 800; letter-spacing: .14em; text-align: center; background: var(--brand-soft); color: var(--brand); border: 1.5px dashed var(--brand); }
.r-code-row .btn, .share .btn { flex: none; display: inline-flex; align-items: center; gap: .3rem; }
.r-share { display: flex; gap: .5rem; margin-top: .7rem; }
.r-share .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.r-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.r-tier { border: 1px solid var(--line); border-radius: 12px; padding: .55rem .6rem; display: flex; flex-direction: column; min-width: 0; }
.r-tier b { font-size: 1.15rem; }
.r-tier span { font-size: var(--fs-sm); font-weight: 700; }
.r-tier small { font-size: var(--fs-xs); color: var(--muted); }
.r-tier.on { border-color: var(--brand); background: var(--brand-soft); }
.r-tier.on b { color: var(--brand); }
.r-av { width: 34px; height: 34px; font-size: .85rem; }
.tx .rank { width: 30px; height: 30px; }
.r-steps { margin: 0 0 .8rem; padding-left: 1.2rem; font-size: var(--fs-sm); display: grid; gap: .45rem; }
.r-example { background: var(--surface-2); border-radius: 12px; padding: .7rem .8rem; }
.r-example p { margin: .2rem 0 0; font-size: var(--fs-sm); }
.r-rules summary { cursor: pointer; font-weight: 700; min-height: 28px; }
.r-rules ul { margin: .6rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.r-cta p { margin-top: 0; }
.r-inline-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; color: var(--brand); }
.brand .word b { color: var(--brand); font-weight: 800; }
/* Header fit for the longer CrownPredicts name on small phones */
@media (max-width: 480px) {
  .brand { font-size: 1.12rem; letter-spacing: -.04em; gap: .3rem; }
  .topbar .top-right { gap: .35rem; }
}
@media (max-width: 400px) { .balance-chip > .i { display: none; } .balance-chip { padding-left: .55rem; } }
@media (max-width: 345px) { .brand .word { display: none; } }

/* ---------- Sign-up ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.su-card { padding: 1.25rem 1.1rem 1.1rem; }
.su-card h1 { margin-bottom: .2rem; }
.su-lead { margin: 0 0 1rem; font-size: var(--fs-sm); }
.su-field { margin-bottom: .95rem; }
.su-field label { margin-bottom: .3rem; }
.su-input-wrap { position: relative; }
.su-input-wrap input { padding-right: 2.6rem; }
.su-hint { margin: .3rem 0 0; font-size: var(--fs-xs); color: var(--muted); }
.su-hint.ok { color: var(--yes); font-weight: 700; }
.su-hint.bad { color: var(--no); font-weight: 600; }
.su-err { margin: .3rem 0 0; font-size: var(--fs-xs); color: var(--no); font-weight: 600; }
input.is-ok { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }
input.is-bad { border-color: var(--no); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.su-state { position: absolute; right: .75rem; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; pointer-events: none; }
.su-state.ok { background: #22c55e; }
.su-state.ok::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.su-state.bad { background: var(--no); }
.su-state.bad::before, .su-state.bad::after { content: ""; position: absolute; left: 9px; top: 5px; width: 2.5px; height: 10px; background: #fff; border-radius: 2px; transform: rotate(45deg); }
.su-state.bad::after { transform: rotate(-45deg); }
.su-state.wait { border: 2.5px solid var(--line-2); border-top-color: var(--brand); animation: su-spin .7s linear infinite; }
@keyframes su-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .su-state.wait { animation: none; } }
.su-eye { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.su-eye:hover { color: var(--brand); }
.su-eye .i { width: 1.15rem; height: 1.15rem; display: block; }

/* Password checklist: one line of small pills that glow green */
.pw-rules { list-style: none; margin: .45rem 0 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: space-between; gap: .2rem; }
.pw-rules li { font-size: .6rem; letter-spacing: -.01em; min-width: 0; flex: 0 0 auto; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .32rem .2rem .26rem; display: inline-flex; align-items: center; gap: .18rem; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; white-space: nowrap; }
.pw-rules li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); transition: background .2s; }
.pw-rules li.ok { color: var(--yes); background: var(--yes-soft); border-color: #86efac; box-shadow: 0 0 6px rgba(34, 197, 94, .35); }
.pw-rules li.ok::before { background: #22c55e; }
.pw-rules li.bad { color: var(--no); background: var(--no-soft); border-color: #fca5a5; }
.pw-rules li.bad::before { background: var(--no); }

/* Phone: flag + code button and number */
.phone-row { display: flex; gap: .5rem; }
.phone-row > input { flex: 1; min-width: 0; }
.cc { position: relative; flex: none; }
.cc-native { max-width: 8.5rem; }
.cc-btn { display: inline-flex; align-items: center; gap: .4rem; height: 100%; min-height: 46px; padding: 0 .6rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font: inherit; font-weight: 700; font-size: var(--fs-md); color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; }
.cc-btn:hover, .cc-btn[aria-expanded="true"] { border-color: var(--brand); }
.cc-btn:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 40, 217, .15); }
.flag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); flex: none; display: block; }
.cc-caret { width: .9rem; height: .9rem; color: var(--muted); }
.cc-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(320px, calc(100vw - 2.5rem)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(23, 18, 43, .18); padding: .5rem; }
.cc-pop input { margin-bottom: .4rem; }
.cc-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.cc-list li[data-iso] { display: flex; align-items: center; gap: .55rem; padding: .5rem .5rem; border-radius: 9px; cursor: pointer; font-size: var(--fs-sm); }
.cc-list li[data-iso]:hover, .cc-list li[data-iso]:focus { background: var(--brand-soft); outline: none; }
.cc-list li[aria-selected="true"] { font-weight: 800; color: var(--brand); }
.cc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-dial { color: var(--muted); font-variant-numeric: tabular-nums; }
.cc-sep { height: 1px; background: var(--line); margin: .3rem .2rem; }
.cc-none { padding: .6rem; color: var(--muted); font-size: var(--fs-sm); }

.su-ref { margin: .2rem 0 1rem; }
.su-ref summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--brand); min-height: 28px; display: flex; align-items: center; }
.su-ref input { margin-top: .4rem; text-transform: uppercase; letter-spacing: .08em; }
.su-check { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--text); font-weight: 500; margin: 0 0 1rem; cursor: pointer; }
.su-check input[type=checkbox] { margin: .15rem 0 0; flex: none; }
.su-submit { margin-top: .2rem; }
.su-foot { text-align: center; margin: .9rem 0 0; font-size: var(--fs-sm); }

/* ---------- Terms & Privacy ---------- */
.legal { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem 1.1rem; box-shadow: var(--shadow); font-size: var(--fs-md); line-height: 1.65; }
.legal-head { text-align: center; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1rem; }
.legal-head h1 { margin: .5rem 0 .2rem; }
.legal-head p { margin: 0 0 .8rem; font-size: var(--fs-sm); }
.legal-ico { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.legal-ico .i { width: 1.4rem; height: 1.4rem; display: block; }
.legal-switch { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.legal-switch a { padding: .35rem .9rem; border-radius: 9px; font-weight: 700; font-size: var(--fs-sm); color: var(--muted); }
.legal-switch a.active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(23,18,43,.1); }
.legal-switch a:hover { text-decoration: none; color: var(--text); }
.legal-summary { background: var(--brand-soft); border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1rem; }
.legal-summary h2 { font-size: var(--fs-h2); margin-bottom: .4rem; }
.legal-summary ul { margin: 0 0 .4rem; padding-left: 1.1rem; }
.legal-summary li { margin-bottom: .2rem; }
.legal-toc { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; margin-bottom: 1.2rem; }
.legal-toc summary { cursor: pointer; font-weight: 800; }
.legal-toc ol { margin: .5rem 0 .2rem; padding-left: 1.3rem; columns: 2 220px; column-gap: 1.5rem; font-size: var(--fs-sm); }
.legal-toc li { break-inside: avoid; margin-bottom: .2rem; }
.legal section { scroll-margin-top: 80px; padding-top: .4rem; }
.legal section h2 { font-size: 1.12rem; margin: 1.2rem 0 .5rem; }
.legal section h3 { font-size: var(--fs-md); margin: .9rem 0 .3rem; }
.legal section p { margin: 0 0 .65rem; overflow-wrap: anywhere; }
.legal section ul { margin: 0 0 .7rem; padding-left: 1.2rem; }
.legal section li { margin-bottom: .3rem; }
.legal-table { overflow-x: auto; margin-bottom: .7rem; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: .5rem .55rem; border-bottom: 1px solid var(--line); }
.legal-table th { background: var(--surface-2); }

@media (max-width: 340px) { .pw-rules { flex-wrap: wrap; } }
@media (max-width: 400px) { .su-card { padding-left: .85rem; padding-right: .85rem; } .pw-rules { gap: .15rem; } }

/* ---------- Desktop: full-width layout and Menu ---------- */
.menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: .4rem; height: 38px; padding: 0 .8rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.menu-btn .i { width: 1.15rem; height: 1.15rem; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: min(720px, calc(100vw - 2rem)); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 48px rgba(23, 18, 43, .18); padding: 1rem 1.1rem; }
.menu-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem 1.25rem; }
.menu-h { margin: 0 0 .35rem; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.menu-h2 { margin-top: .9rem; }
.menu-col a, .menu-link { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .45rem .55rem; border-radius: 10px; color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-col a:hover, .menu-link:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.menu-col .i { width: 1.05rem; height: 1.05rem; color: var(--brand); flex: none; }
.menu-col form { margin: 0; }
@media (max-width: 760px) { .menu { display: none; } }   /* phones keep the bottom menu */

@media (min-width: 1100px) {
  .container { max-width: none; padding-left: 2rem; padding-right: 2rem; }
  .topbar { padding-left: 2rem; padding-right: 2rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
  .hero { padding: 2.4rem 2.6rem; }
  .hero h1 { max-width: none; }
  .hero p { max-width: 52ch; font-size: 1.05rem; }
  .two-col { grid-template-columns: minmax(0, 1fr) 400px; gap: 1.5rem; }
  .legal { max-width: 860px; }
}
@media (min-width: 1500px) { .grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); } }
.menu-col button.menu-link, .menu-col button.menu-link:hover { min-height: 0; justify-content: flex-start; font-weight: 600; box-shadow: none; transform: none; }
.menu-col button.menu-link { background: none; color: var(--text); }
.menu-col button.menu-link:hover { background: var(--brand-soft); color: var(--brand); }
.menu-col button.menu-link { font-size: var(--fs-sm); padding: .45rem .55rem; border-radius: 10px; width: 100%; }
