/* ============================================================
   AdsFirstGig — design system ("Ledger")
   ------------------------------------------------------------
   Cool grey paper, navy ink and one cobalt-blue accent.
   Space Grotesk for headings and money, DM Sans for text.
   Light + dark themes via <html data-theme="light|dark">
   (set before first paint by the snippet in each page's <head>).
   To change the brand colour, edit the four --accent tokens in
   both themes below.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --accent: #2D64F5;
  --accent-strong: #1F4FD6;
  --accent-soft: #E7EDFE;
  --on-accent: #FFFFFF;

  --canvas: #F3F5F8;
  --surface: #FFFFFF;
  --surface-2: #EAEEF3;
  --surface-3: #E1E6ED;
  --line: #E2E7EE;
  --line-2: #CBD3DE;
  --ink: #0E1726;
  --ink-2: #3F4B5E;
  --ink-3: #667185;

  /* Dark panels (dock, balance + membership cards) */
  --inverse: #0E1726;
  --inverse-2: #1F2B3E;
  --inverse-ink: #F3F5F8;
  --inverse-ink-2: #A3AEBF;

  --success: #0E8A4F;
  --success-soft: #DCF2E6;
  --warning: #8A5A00;
  --warning-soft: #FFF3D6;
  --danger: #C2321E;
  --danger-soft: #FAE2DD;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 1px 2px rgba(14, 23, 38, .06);
  --shadow-lg: 0 26px 50px -26px rgba(14, 23, 38, .5);
  --ring: 0 0 0 3px rgba(45, 100, 245, .32);

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --nav-h: 66px;
  --frame: 480px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --accent: #6B93FF;
  --accent-strong: #93B0FF;
  --accent-soft: rgba(107, 147, 255, .16);
  --on-accent: #081230;

  --canvas: #0A0F18;
  --surface: #111824;
  --surface-2: #182131;
  --surface-3: #1F2A3C;
  --line: #1E2838;
  --line-2: #2E3A4E;
  --ink: #EDF1F7;
  --ink-2: #B4BECC;
  --ink-3: #8794A8;

  --inverse: #141D2B;
  --inverse-2: #223047;
  --inverse-ink: #EDF1F7;
  --inverse-ink-2: #9AA6B8;

  --success: #3DD68C;
  --success-soft: rgba(61, 214, 140, .14);
  --warning: #E8B34A;
  --warning-soft: rgba(232, 179, 74, .14);
  --danger: #FF7A66;
  --danger-soft: rgba(255, 122, 102, .14);

  --shadow: none;
  --shadow-lg: 0 26px 50px -26px rgba(0, 0, 0, .85);
  --ring: 0 0 0 3px rgba(107, 147, 255, .4);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
main a:not([class]), .field__hint a, .auth__switch a, .auth__foot a, .notice a, .page__foot a {
  color: var(--ink); font-weight: 650;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
h1, h2, h3, h4, p { margin: 0; }
strong { font-weight: 700; }
.num, .money { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- App frame ---------- */
.app {
  position: relative;
  max-width: var(--frame);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--canvas);
}
@media (min-width: 520px) {
  body { background: var(--surface-3); }
  .app { box-shadow: 0 0 0 1px var(--line); }
}
.screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.page { flex: 1; padding: 6px 20px 36px; display: flex; flex-direction: column; gap: 18px; }
.app.is-app .page { padding-bottom: calc(var(--nav-h) + 44px + env(safe-area-inset-bottom)); }

/* ---------- Header: large title ---------- */
.appbar {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 8px;
}
.appbar__title {
  font-family: var(--display); font-size: 28px; line-height: 1.1;
  font-weight: 700; letter-spacing: -.025em;
}
.appbar__brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.appbar__logo { width: 32px; height: 32px; border-radius: 9px; }
.appbar__spacer { flex: 1; }
.appbar__hello { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.appbar__hi { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.appbar__phone { font-size: 13px; font-weight: 500; color: var(--ink-3); }

.iconbtn {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px;
  border-radius: 50%; border: 1.5px solid var(--line-2);
  background: transparent; color: var(--ink);
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 20px; height: 20px; }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--canvas);
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }

/* ---------- Floating dock (bottom navigation) ---------- */
.bottomnav {
  position: fixed; z-index: 30;
  left: 50%; bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 28px); max-width: calc(var(--frame) - 28px);
  height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  border-radius: 24px;
  background: var(--inverse);
  box-shadow: var(--shadow-lg);
}
.app:not(.is-app) .bottomnav { display: none; }
.navitem {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 18px;
  color: var(--inverse-ink-2); font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  transition: background .2s ease, color .2s ease;
}
.navitem:hover { color: var(--inverse-ink); }
.navitem__ico svg { width: 21px; height: 21px; }
.navitem.is-active { background: var(--accent); color: var(--on-accent); }

/* ---------- Text ---------- */
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.h1 { font-family: var(--display); font-size: 28px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; }
.h2 { font-family: var(--display); font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
.lead { font-size: 16px; color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 6px; }
.section-head h2 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.section-head span, .section-head a { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.page__foot { text-align: center; font-size: 12.5px; color: var(--ink-3); }

/* ---------- Buttons (pills) ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px;
  border-radius: 999px; border: 1.5px solid var(--line-2);
  background: transparent; color: var(--ink);
  font-size: 15px; font-weight: 700; line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease, transform .1s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.985); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.btn--primary:hover { background: var(--ink); opacity: .9; }
.btn--secondary { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.btn--secondary:hover { background: var(--accent-soft); opacity: .85; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent); opacity: .9; }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn--danger:hover { background: var(--danger-soft); }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 38px; padding: 7px 14px; font-size: 13.5px; }
.btn--lg { min-height: 56px; font-size: 16px; }
.linkbtn {
  padding: 0; border: 0; background: none; color: var(--ink); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px;
}

.ico-spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading .ico-spinner { display: block; position: absolute; color: var(--canvas); }
.btn.is-loading:not(.btn--primary) .ico-spinner { color: var(--ink); }
.btn.is-loading > :not(.ico-spinner) { visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms (filled fields) ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field__wrap {
  display: flex; align-items: center; gap: 8px;
  min-height: 54px; padding: 0 16px;
  background: var(--surface-2);
  border: 1.5px solid transparent; border-radius: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.field__wrap:focus-within { border-color: var(--ink); background: var(--surface); }
.field__input, .field__select {
  flex: 1; min-width: 0;
  height: 50px; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--ink);
}
.field__input::placeholder { color: var(--ink-3); }
.field__input[readonly], .field__select:disabled { color: var(--ink-2); }
.field__select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field__wrap--select { position: relative; }
.field__wrap--select::after {
  content: ""; width: 8px; height: 8px; margin-right: 2px; flex: none;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg) translateY(-2px); pointer-events: none;
}
.field__input--pin { letter-spacing: .6em; font-family: var(--display); font-size: 22px; font-weight: 700; text-align: center; }
.field__prefix {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 11px; margin-left: -6px;
  border: 0; border-radius: 999px; background: var(--surface);
  font-weight: 700; font-size: 14.5px; color: var(--ink);
}
html[data-theme="dark"] .field__prefix { background: var(--surface-3); }
.field__prefix svg { width: 14px; height: 14px; color: var(--ink-3); }
.field__toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; margin-right: -8px;
  border: 0; background: transparent; color: var(--ink-3); border-radius: 50%;
}
.field__toggle svg { width: 20px; height: 20px; }
.field__toggle .eye-off { display: none; }
.field__toggle.is-shown .eye-on { display: none; }
.field__toggle.is-shown .eye-off { display: block; }
.field__hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.field__hint[data-state="valid"] { color: var(--success); }
.field__hint[data-state="invalid"] { color: var(--danger); }

.form-error {
  display: none;
  padding: 11px 14px; border-radius: 14px;
  background: var(--danger-soft); color: var(--danger);
  font-size: 13.5px; font-weight: 600;
}
.form-error.is-visible { display: block; }
.form-error--action a, .form-error__link { color: inherit; font-weight: 700; text-decoration: underline; margin-left: 4px; }

.pw-checklist { display: grid; gap: 4px; margin-top: 2px; }
.pw-checklist__row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.pw-checklist__icon { width: 16px; height: 16px; flex: none; }
.pw-ico { width: 16px; height: 16px; }
.pw-ico--check { display: none; }
.pw-checklist__row[data-state="pass"] { color: var(--success); }
.pw-checklist__row[data-state="pass"] .pw-ico--check { display: block; }
.pw-checklist__row[data-state="pass"] .pw-ico--cross { display: none; }
.pw-checklist__row[data-state="fail"]:not([data-optional]) { color: var(--danger); }
.pw-checklist__row[data-state="pending"] .pw-ico--cross,
.pw-checklist__row[data-optional][data-state="fail"] .pw-ico--cross { opacity: .5; }

/* ---------- Surfaces ---------- */
.card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.card--tight { padding: 14px 16px; border-radius: var(--radius); }
.card__head, .panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__title, .panel__title { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.card__sub { font-size: 13px; color: var(--ink-3); }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: 13.5px; line-height: 1.55;
}
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent); }
.notice--warn { background: var(--warning-soft); border-color: transparent; color: var(--ink); }
.notice--warn svg { color: var(--warning); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-2);
}
.pill--brand { background: var(--accent); color: var(--on-accent); }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--warn { background: var(--warning-soft); color: var(--warning); }

/* Stats as a ledger: no boxes, hairline divider */
.stat-grid, .ledger {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 14px 4px; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }
.stat__label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.stat__value { margin-top: 4px; font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Grouped lists (settings) ---------- */
.list-head { margin: 6px 4px -10px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list__item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 58px; padding: 12px 16px; border: 0; background: transparent; text-align: left;
  color: var(--ink); font-size: 15px; font-weight: 600;
}
.list__item + .list__item, .list__item + .list__panel, .list__panel + .list__item { border-top: 1px solid var(--line); }
.list__item:hover { background: var(--surface-2); }
.list__ico { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--ink-2); }
.list__ico svg { width: 21px; height: 21px; }
.list__ico--danger { color: var(--danger); }
.list__ico--mint { color: var(--accent); }
.list__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.list__sub { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.list__chev { color: var(--ink-3); transition: transform .2s ease; }
.list__chev svg { width: 18px; height: 18px; }
.list__item[aria-expanded="true"] .list__chev { transform: rotate(90deg); }
.list__item--danger { color: var(--danger); }
.list__panel { padding: 6px 16px 18px; background: var(--surface); }

/* ---------- Balance card (dark) ---------- */
.balance-card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--inverse); color: var(--inverse-ink);
  box-shadow: var(--shadow-lg);
}
.balance-card::before {
  /* accent disc, cropped by the card corner */
  content: ""; position: absolute; z-index: -1;
  right: -70px; top: -90px; width: 210px; height: 210px; border-radius: 50%;
  background: var(--accent);
}
.balance-card::after {
  content: ""; position: absolute; z-index: -1;
  right: 34px; top: 70px; width: 64px; height: 64px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .16);
}
.balance-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.balance-card__label { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--inverse-ink-2); }
.balance-card__eye {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .18); color: var(--inverse-ink);
}
.balance-card__eye svg { width: 18px; height: 18px; }
.balance-card__amount {
  margin: 30px 0 6px;
  font-family: var(--display); font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.balance-card__amount .cur { font-size: .55em; font-weight: 600; margin-right: 3px; vertical-align: .3em; color: var(--inverse-ink-2); }
.balance-card__amount.is-hidden { filter: blur(10px); user-select: none; }
.balance-card__foot { display: flex; justify-content: space-between; margin-top: 18px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--inverse-ink-2); }

/* Statement variant (wallet / withdraw): light, ruled */
.balance-card--statement {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-top: 6px solid var(--ink);
  box-shadow: none;
}
.balance-card--statement::before, .balance-card--statement::after { content: none; }
.balance-card--statement .balance-card__label { color: var(--ink-3); }
.balance-card--statement .balance-card__eye { background: var(--surface-2); color: var(--ink); }
.balance-card--statement .balance-card__amount { margin-top: 14px; font-size: 44px; }
.balance-card--statement .balance-card__amount .cur { color: var(--ink-3); }

/* Available / locked split (built by script.js) */
.split { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.split__bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.split__part { height: 100%; }
.split__part--available { background: var(--ink); }
.split__part--locked {
  background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--accent-strong) 6px 12px);
}
.split__legend { display: flex; justify-content: space-between; gap: 12px; }
.split__item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.split__dot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--ink); }
.split__dot--locked { background: var(--accent); }
.split__item strong { display: block; font-family: var(--display); font-size: 16px; font-variant-numeric: tabular-nums; }
.split__item span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.split__item--right { text-align: right; flex-direction: row-reverse; }

.deposit-refund-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 16px; padding: 12px 16px;
  border-radius: 999px; border: 1.5px dashed var(--accent);
  background: var(--accent-soft); color: var(--ink);
  font-size: 14px; font-weight: 700;
}
.deposit-refund-btn:hover { background: var(--accent-soft); border-style: solid; }

/* ---------- Home ---------- */
.hello { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.hello__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hello__name { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }

/* Round actions under the balance card */
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.action__ico {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: background .15s ease, border-color .15s ease;
}
.action:hover .action__ico { border-color: var(--ink); }
.action__ico svg { width: 22px; height: 22px; }
.action--primary .action__ico { background: var(--ink); border-color: var(--ink); color: var(--canvas); }

/* Accent call-to-action card */
.cta-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 20px 20px 22px; border-radius: var(--radius-lg);
  background: var(--accent); color: var(--on-accent);
}
.cta-card__text { display: flex; flex-direction: column; gap: 4px; }
.cta-card__title { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.cta-card__sub { font-size: 13.5px; font-weight: 600; opacity: .8; }
.cta-card__go { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--on-accent); color: var(--accent); }
.cta-card__go svg { width: 22px; height: 22px; }

/* Editorial numbered steps */
.steps { display: grid; gap: 0; counter-reset: step; }
.step { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; }
.step + .step { border-top: 1px solid var(--line); }
.step__num {
  flex: none; min-width: 34px;
  font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
  color: var(--accent);
}
.step__title { font-size: 15px; font-weight: 700; }
.step__text { font-size: 13.5px; color: var(--ink-2); }

.features { display: grid; gap: 16px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature__ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); }
.feature__ico svg { width: 19px; height: 19px; }
.feature__title { font-size: 15px; font-weight: 700; }
.feature__text { font-size: 13.5px; color: var(--ink-2); }

/* Legacy shortcut grid (kept for any page still using it) */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick__item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.quick__ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); }
.quick__ico svg { width: 22px; height: 22px; }

/* ---------- Wallet ---------- */
.wallet-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.wallet-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 50px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.wallet-action:hover { border-color: var(--ink); }
.wallet-action svg { width: 18px; height: 18px; flex: none; }
.wallet-action--primary { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.wallet-action--primary:hover { opacity: .9; }

/* Deposit as a numbered timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline__step { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 22px; }
.timeline__step::before {
  content: ""; position: absolute; left: 16px; top: 36px; bottom: 4px;
  width: 2px; background: repeating-linear-gradient(to bottom, var(--line-2) 0 5px, transparent 5px 10px);
}
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step:last-child::before { content: none; }
.timeline__num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--canvas);
  font-family: var(--display); font-size: 15px; font-weight: 700;
}
.timeline__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 5px; }
.timeline__title { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.timeline__note { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.timeline__step--end { grid-template-columns: 1fr; }

.dest { display: grid; padding: 4px 16px; border-radius: var(--radius); background: var(--surface-2); }
.dest__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; }
.dest__row + .dest__row { border-top: 1px dashed var(--line-2); }
.dest__label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dest__value { font-family: var(--display); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; word-break: break-word; }
.copy-btn {
  flex: none; padding: 7px 14px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.copy-btn:hover { background: var(--ink); color: var(--canvas); }
.copy-btn.is-copied { background: var(--success); border-color: var(--success); color: #fff; }
.upload {
  position: relative; display: grid; place-items: center;
  min-height: 150px; border-radius: var(--radius);
  border: 2px dashed var(--line-2); background: var(--surface);
  cursor: pointer; overflow: hidden; text-align: center;
}
.upload:hover { border-color: var(--ink-3); }
.upload.has-file { border-style: solid; border-color: var(--ink); }
.upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload__placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; color: var(--ink-3); font-size: 13.5px; }
.upload__placeholder strong { color: var(--ink); }
.upload__placeholder svg { width: 30px; height: 30px; color: var(--accent); }
.upload__img { width: 100%; max-height: 260px; object-fit: contain; }
.upload__remove {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 6px 12px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--canvas); font-size: 12.5px; font-weight: 700;
}
.success-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 10px 4px; }
.success-state__ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--success); color: #fff; }
.success-state__ico svg { width: 28px; height: 28px; }

/* Activity, grouped by day */
.txns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.txns__day {
  padding: 16px 2px 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.txns__day:first-child { padding-top: 2px; }
.txn {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px; background: var(--surface);
  border: 1px solid var(--line); border-top-width: 0;
}
.txns__day + .txn { border-top-width: 1px; border-radius: var(--radius) var(--radius) 0 0; }
.txn:last-child, .txn:has(+ .txns__day) { border-radius: 0 0 var(--radius) var(--radius); }
.txns__day + .txn:last-child, .txns__day + .txn:has(+ .txns__day) { border-radius: var(--radius); }
.txn__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-2); color: var(--ink-2); }
.txn__icon svg { width: 17px; height: 17px; }
.txn--task .txn__icon, .txn--referral .txn__icon, .txn--deposit .txn__icon, .txn--game .txn__icon { border-color: var(--success); color: var(--success); }
.txn--withdraw .txn__icon, .txn--penalty .txn__icon { border-color: var(--accent); color: var(--accent-strong); }
.txn__info { flex: 1; min-width: 0; }
.txn__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txn__sub { display: flex; gap: 8px; font-size: 12px; color: var(--ink-3); }
.txn__type { font-weight: 700; }
.txn__right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.txn__amount { font-family: var(--display); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.txn__amount--pos { color: var(--success); }
.txn__amount--neg { color: var(--ink); }
.txn--status-pending .txn__amount { color: var(--warning); }
.txn--status-failed .txn__amount { color: var(--ink-3); text-decoration: line-through; }
.txn__status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.txn__status svg { width: 12px; height: 12px; }
.txn__status--completed { color: var(--success); }
.txn__status--failed { color: var(--danger); }
.txn__status--pending { color: var(--warning); }
.txn__status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.txns__empty { padding: 30px 16px; border-radius: var(--radius); border: 2px dashed var(--line-2); text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 90;
  left: 50%; top: calc(14px + env(safe-area-inset-top));
  transform: translate(-50%, -150%);
  width: calc(100% - 32px); max-width: 420px;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: 18px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-left: 5px solid var(--success);
  box-shadow: var(--shadow-lg);
  visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.toast__icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.toast__icon svg { width: 16px; height: 16px; }
.toast__body { display: flex; flex-direction: column; min-width: 0; }
.toast__title { font-size: 14px; font-weight: 800; }
.toast__msg { font-size: 13px; color: var(--ink-2); }

/* ---------- Bottom sheets ---------- */
.vip-modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  visibility: hidden; pointer-events: none;
}
.vip-modal.is-visible, .vip-modal.is-open { visibility: visible; pointer-events: auto; }
.vip-modal__backdrop {
  position: absolute; inset: 0; background: rgba(8, 13, 22, .6);
  opacity: 0; transition: opacity .2s ease;
}
.vip-modal.is-visible .vip-modal__backdrop, .vip-modal.is-open .vip-modal__backdrop { opacity: 1; }
.vip-modal__sheet {
  position: relative; width: 100%; max-width: var(--frame);
  max-height: 92vh; overflow: auto;
  padding: 12px 22px calc(22px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0; background: var(--surface);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column; gap: 14px;
}
.vip-modal.is-visible .vip-modal__sheet, .vip-modal.is-open .vip-modal__sheet { transform: translateY(0); }
.vip-modal__handle { align-self: center; width: 44px; height: 5px; border-radius: 5px; background: var(--line-2); margin-bottom: 2px; }
.vip-modal__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.vip-modal__icon svg { width: 24px; height: 24px; }
.vip-modal__icon img { border-radius: 12px; }
.vip-modal__title { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.vip-modal__msg { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.vip-modal__rows { display: grid; padding: 4px 16px; border-radius: var(--radius); background: var(--surface-2); }
.vip-modal__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.vip-modal__row + .vip-modal__row { border-top: 1px dashed var(--line-2); }
.vip-modal__row span { color: var(--ink-3); }
.vip-modal__row strong { font-family: var(--display); font-variant-numeric: tabular-nums; }
.vip-modal__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 4px; }
.fund-pin-form { display: flex; flex-direction: column; gap: 14px; }
body.imgviewer-open, body.cc-sheet-open { overflow: hidden; }
@media (min-width: 520px) {
  .vip-modal { align-items: center; }
  .vip-modal__sheet { border-radius: 30px; max-width: 440px; }
}

/* Country-code sheet (signup) */
.cc-sheet { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; }
.cc-sheet__backdrop { position: absolute; inset: 0; background: rgba(8, 13, 22, .6); }
.cc-sheet__panel {
  position: relative; width: 100%; max-width: var(--frame); max-height: 80vh;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0; background: var(--surface);
}
.cc-sheet__head { display: flex; align-items: center; justify-content: space-between; }
.cc-list { list-style: none; margin: 0; padding: 0; overflow: auto; }
.cc-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left;
}
.cc-item:hover { background: var(--surface-2); }
.cc-item.is-selected { background: var(--ink); color: var(--canvas); }
.cc-item.is-selected .cc-item__code { color: inherit; }
.cc-item__flag { font-size: 20px; }
.cc-item__name { flex: 1; font-size: 14.5px; }
.cc-item__code { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Runtime banners (built by script.js) */
.vip-shortfall-banner, .withdraw-schedule-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--warning-soft); color: var(--warning);
  font-size: 13.5px; line-height: 1.45;
}
.withdraw-schedule-banner { background: var(--danger-soft); color: var(--danger); }
.vip-shortfall-banner__icon svg, .withdraw-schedule-banner__icon svg { width: 20px; height: 20px; }
.vip-shortfall-banner__body, .withdraw-schedule-banner__body { display: flex; flex-direction: column; gap: 2px; }
.vip-shortfall-banner__body span, .withdraw-schedule-banner__body span { opacity: .9; font-size: 12.5px; }

/* ---------- Withdraw ---------- */
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount-option {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 64px; border-radius: 18px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  font-family: var(--display); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.amount-option small { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--ink-3); }
.amount-option:hover:not(:disabled) { border-color: var(--ink); }
.amount-option.is-selected { border-color: var(--ink); background: var(--ink); color: var(--canvas); }
.amount-option.is-selected small { color: var(--canvas); opacity: .75; }
.amount-option.is-locked { opacity: .4; cursor: not-allowed; }
.breakdown {
  display: grid; gap: 0; padding: 6px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.breakdown__row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; color: var(--ink-2); }
.breakdown__row + .breakdown__row { border-top: 1px dashed var(--line-2); }
.breakdown__row strong { font-family: var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.breakdown__row--total { font-weight: 700; color: var(--ink); }
.breakdown__row--total strong { font-size: 18px; }
.withdraw-locked { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 26px 18px; }
.withdraw-locked__ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.withdraw-locked__ico svg { width: 26px; height: 26px; }
.withdraw-locked__title { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.withdraw-locked__msg { font-size: 14px; color: var(--ink-2); }
.withdraw-locked__meta { font-size: 13px; color: var(--ink-3); }

/* ---------- Tasks ---------- */
.taskstats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.taskstats .stat { padding: 12px 4px; }
.taskstats .stat__value { font-size: 22px; }

/* Today's progress: ring + numbers on a dark band */
.imgtask-strip {
  display: grid; grid-template-columns: 70px 1fr; grid-template-areas: "ring row" "ring bar";
  column-gap: 16px; row-gap: 10px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--inverse); color: var(--inverse-ink);
}
.imgtask-strip::before {
  content: ""; grid-area: ring;
  width: 70px; height: 70px; border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--inverse) 72%, transparent 73% 100%),
    conic-gradient(var(--accent) calc(var(--pct, 0) * 1%), var(--inverse-2) 0);
}
.imgtask-strip__row { grid-area: row; display: flex; justify-content: space-between; gap: 12px; }
.imgtask-strip__cell { display: flex; flex-direction: column; }
.imgtask-strip__cell--right { align-items: flex-end; }
.imgtask-strip__label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--inverse-ink-2); }
.imgtask-strip__value { font-family: var(--display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.imgtask-strip__sep { color: var(--inverse-ink-2); font-weight: 500; margin: 0 3px; }
.imgtask-strip__bar { grid-area: bar; height: 6px; border-radius: 99px; background: var(--inverse-2); overflow: hidden; }
.imgtask-strip__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .4s ease; }

.imgtask-upsell {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--ink);
}
.imgtask-upsell:hover { border-style: solid; }
.imgtask-upsell__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); flex: none; }
.imgtask-upsell__icon svg { width: 19px; height: 19px; }
.imgtask-upsell__body { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); }
.imgtask-upsell__body strong { color: var(--ink); font-size: 14.5px; }
.imgtask-upsell__chev { font-size: 24px; font-weight: 700; color: var(--ink); }

.imgtasks { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 0; list-style: none; }
.imgtask {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
}
.imgtask__media { position: relative; margin: 8px 8px 0; aspect-ratio: 16 / 9; border-radius: 20px; background: var(--surface-2); overflow: hidden; }
.imgtask__img { width: 100%; height: 100%; object-fit: cover; }
.imgtask__num {
  position: absolute; left: 10px; top: 10px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--ink); color: var(--canvas);
  font-family: var(--display); font-size: 12px; font-weight: 700;
}
.imgtask__badge {
  position: absolute; right: 10px; top: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: #0E1726;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.imgtask[data-status="completed"] .imgtask__badge { background: var(--success); color: #fff; }
.imgtask[data-status="ready"] .imgtask__badge { background: var(--accent); color: var(--on-accent); }
.imgtask__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.imgtask__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.imgtask__title { font-family: var(--display); font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; overflow-wrap: anywhere; }
.imgtask__reward {
  flex: none; padding: 5px 12px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--display); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}
.imgtask__sponsor { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.imgtask__desc { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.imgtask__link { align-self: flex-start; font-size: 13px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.imgtask__btn {
  position: relative; margin-top: 8px;
  display: flex; align-items: center; justify-content: center;
  min-height: 50px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--canvas);
  font-size: 15px; font-weight: 700;
}
.imgtask__btn:hover { opacity: .9; }
.imgtask[data-status="ready"] .imgtask__btn { background: var(--accent); color: var(--on-accent); }
.imgtask__btn:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; opacity: 1; }
.imgtask__btn-spin { display: none; width: 16px; height: 16px; margin-left: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.imgtask[data-status="claiming"] .imgtask__btn-spin { display: block; }
.imgtasks-empty { padding: 30px 18px; border-radius: var(--radius-lg); border: 2px dashed var(--line-2); text-align: center; color: var(--ink-2); font-size: 14px; }
@media (min-width: 440px) { .imgtasks { grid-template-columns: 1fr 1fr; } }

.imgviewer { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 16px; }
.imgviewer__backdrop { position: absolute; inset: 0; background: rgba(6, 10, 18, .92); }
.imgviewer__shell { position: relative; width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.imgviewer__close { position: absolute; top: -6px; right: -4px; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; }
.imgviewer__close svg { width: 20px; height: 20px; }
.imgviewer__stage { border-radius: 22px; overflow: hidden; background: #000; margin-top: 42px; }
.imgviewer__img { width: 100%; max-height: 64vh; object-fit: contain; }
.imgviewer__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.imgviewer__hint { color: rgba(255, 255, 255, .8); font-size: 13.5px; }
.imgviewer__cta { min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.imgviewer__cta:disabled { background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .7); cursor: not-allowed; }

/* ---------- VIP plans as tickets ---------- */
.plan-grid { display: grid; gap: 14px; }
.vip-card {
  position: relative; padding: 18px 18px 16px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.vip-card::before {
  /* tier stripe */
  content: ""; position: absolute; left: 0; top: 22px; width: 5px; height: 34px; border-radius: 0 5px 5px 0;
  background: var(--ink-3);
}
.vip-card[data-theme="gold"]::before { background: #D49B1A; }
.vip-card[data-theme="diamond"]::before { background: var(--accent); }
.vip-card.is-current { border: 2px solid var(--ink); }
.vip-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vip-card__name { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.vip-card__current { display: none; }
.vip-card.is-current .vip-card__current { display: inline-flex; }
.vip-card__deposit { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.vip-card__deposit small { display: block; margin-top: 4px; font-family: var(--font); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.vip-card__meta {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 0 -18px; padding: 14px 18px 0;
  border-top: 2px dashed var(--line-2);
}
.vip-card__meta::before, .vip-card__meta::after {
  /* ticket notches */
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--canvas); border: 1px solid var(--line);
}
.vip-card__meta::before { left: -12px; }
.vip-card__meta::after { right: -12px; }
.vip-card__meta div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.vip-card__meta span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.vip-card__meta strong { font-family: var(--display); font-size: 17px; font-variant-numeric: tabular-nums; }
.vip-card .btn:disabled { opacity: 1; background: var(--surface-2); border-color: transparent; color: var(--ink-2); }

/* ---------- Profile: membership card ---------- */
.member-card, .profile-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 22px 18px; border-radius: var(--radius-lg);
  background: var(--inverse); color: var(--inverse-ink);
  box-shadow: var(--shadow-lg);
}
.member-card::before {
  /* striped seal in the top corner, clear of the name and avatar */
  content: ""; position: absolute; z-index: -1;
  right: -44px; top: -58px; width: 124px; height: 124px; border-radius: 50%;
  background: repeating-linear-gradient(135deg, var(--accent) 0 9px, transparent 9px 17px);
}
.member-card .profile-hero__badge { background: var(--inverse); box-shadow: 0 0 0 1.5px var(--accent); }
.member-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.member-card__brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.member-card__brand img { width: 24px; height: 24px; border-radius: 7px; }
.member-card__id { display: flex; align-items: center; gap: 16px; }
.member-card .avatar { background: var(--accent); color: var(--on-accent); }
.profile-hero__name { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.member-card__since { font-size: 12.5px; color: var(--inverse-ink-2); font-weight: 600; }
.profile-hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: var(--inverse-ink);
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.member-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.member-card__code { display: flex; flex-direction: column; gap: 2px; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: .14em; }
.member-card__code small { font-family: var(--font); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--inverse-ink-2); }
.member-card__barcode {
  width: 108px; height: 34px; border-radius: 4px; opacity: .85;
  background: repeating-linear-gradient(90deg,
    var(--inverse-ink) 0 2px, transparent 2px 4px, var(--inverse-ink) 4px 5px, transparent 5px 8px,
    var(--inverse-ink) 8px 11px, transparent 11px 12px, var(--inverse-ink) 12px 13px, transparent 13px 16px);
}

/* Stats strip under the card */
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 4px; min-width: 0; }
.profile-stat + .profile-stat { padding-left: 14px; border-left: 1px solid var(--line); }
.profile-stat__value { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.profile-stat__label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.profile-stat__hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
/* VIP plan row (built by script.js after .profile-stats) */
#profileVipCard {
  border: 0; gap: 0; margin-top: -8px;
  padding: 4px 16px; border-radius: var(--radius);
  background: var(--accent-soft);
}
#profileVipCard .profile-stat { padding: 12px 4px; }
#profileVipCard .profile-stat + .profile-stat { border-left-color: rgba(14, 23, 38, .12); }
html[data-theme="dark"] #profileVipCard .profile-stat + .profile-stat { border-left-color: var(--line-2); }
.vip-status-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; }
.vip-status-chip svg { width: 16px; height: 16px; color: var(--accent-strong); }

.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch__track { width: 50px; height: 30px; border-radius: 99px; background: var(--line-2); transition: background .2s ease; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }

/* ---------- Referral ---------- */
.ref-hero { display: flex; flex-direction: column; gap: 6px; }
.ref-hero__big { font-family: var(--display); font-size: 64px; font-weight: 700; letter-spacing: -.05em; line-height: .95; color: var(--accent); }
.ref-code {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--inverse); color: var(--inverse-ink);
}
.ref-code .muted { color: var(--inverse-ink-2); }
.ref-code .btn--secondary { background: var(--accent); color: var(--on-accent); }
.ref-code__value { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.ref-link { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.qr { display: grid; place-items: center; padding: 16px; border-radius: var(--radius); background: #fff; border: 2px solid var(--ink); width: fit-content; margin: 0 auto; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Auth & landing ---------- */
.auth { flex: 1; display: flex; flex-direction: column; padding: calc(26px + env(safe-area-inset-top)) 22px 28px; gap: 24px; }
.auth__brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.auth__brand img { width: 36px; height: 36px; border-radius: 10px; }
.auth__head { display: flex; flex-direction: column; gap: 8px; }
.auth__title { font-family: var(--display); font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: -.035em; }
.auth__sub { font-size: 15px; color: var(--ink-2); }
.auth__switch { text-align: center; font-size: 14.5px; color: var(--ink-2); }
.auth__foot { margin-top: auto; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.auth__row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }

.landing { flex: 1; display: flex; flex-direction: column; }
.landing__hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(26px + env(safe-area-inset-top)) 24px 38px;
  color: var(--inverse-ink);
  background: var(--inverse);
  border-radius: 0 0 34px 34px;
}
.landing__hero::before {
  /* corner disc, kept clear of the headline and subtitle */
  content: ""; position: absolute; z-index: -1;
  right: -100px; bottom: -110px; width: 220px; height: 220px; border-radius: 50%;
  background: var(--accent);
}
.landing__hero::after {
  content: ""; position: absolute; z-index: -1;
  right: 26px; top: calc(30px + env(safe-area-inset-top)); width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .18);
}
.landing__brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--inverse-ink); }
.landing__brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
.landing__title { margin-top: 70px; max-width: 11ch; font-family: var(--display); font-size: 40px; line-height: 1.02; font-weight: 700; letter-spacing: -.04em; }
.landing__sub { margin-top: 14px; font-size: 15.5px; color: var(--inverse-ink-2); max-width: 27ch; }
.landing__body { display: flex; flex-direction: column; gap: 20px; padding: 24px 22px 28px; flex: 1; }
.landing__actions { display: grid; gap: 10px; margin-top: auto; }

/* ---------- Sunday banner (sunday-off.js) ---------- */
.sunday-off {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 22px; border-radius: var(--radius-lg); text-align: center;
  background: var(--inverse); color: var(--inverse-ink);
}
.sunday-off svg { color: var(--accent); }
.sunday-off__title { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.sunday-off__msg { font-size: 14.5px; color: var(--inverse-ink-2); }

/* ---------- Demo account (script.js DEMO_LOGIN) ---------- */
.demo-bar {
  padding: 7px 16px; padding-top: calc(7px + env(safe-area-inset-top));
  text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  background: var(--accent); color: var(--on-accent);
}
.demo-hint {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  border: 2px dashed var(--accent); background: var(--accent-soft);
  font-size: 13.5px; color: var(--ink-2);
}
.demo-hint strong { color: var(--ink); }

/* ---------- Background refresh dot ---------- */
.refresh-pulse {
  position: fixed; z-index: 60; top: calc(12px + env(safe-area-inset-top)); right: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.refresh-pulse.is-active { opacity: 1; animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Content pages (about / help) ---------- */
.prose { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.65; }
.prose h2 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); margin-top: 4px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 0 16px; }
.faq details[open] { border-color: var(--ink); }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2);
  color: var(--ink); font-weight: 600; font-size: 17px; line-height: 1;
}
.faq details[open] summary::after { content: "–"; background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.faq p { padding: 0 0 16px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* ---------- Small details ---------- */
html[data-theme="dark"] .appbar__logo,
html[data-theme="dark"] .auth__brand img { box-shadow: 0 0 0 1px var(--line-2); }
.panel > .vip-shortfall-banner { margin-bottom: 18px; }
.panel__head .eyebrow { margin-bottom: 2px; }

/* ---------- Investments (wind-down view) ---------- */
.inv { display: flex; flex-direction: column; gap: 10px; }
.inv__row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: 13.5px; color: var(--ink-2); }
.inv__row strong { font-family: var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
