/* =====================================================================
   LUMEN — Rewards prototype
   Tokens map 1:1 to theme.json (settings.color.palette / typography)
   ===================================================================== */
:root {
  /* palette — light */
  --paper: #F4F1E9;
  --paper-2: #ECE7DB;
  --surface: #FFFDF8;
  --surface-2: #F8F5EE;
  --ink: #14211B;
  --ink-2: #4B5B53;
  --ink-3: #6F7D75;
  --line: #DDD6C6;
  --line-2: #E8E2D5;
  --emerald: #0F4D38;
  --emerald-hi: #166148;
  --emerald-deep: #0A3024;
  --emerald-soft: #DDEAE2;
  --on-emerald: #F6F2E8;
  --gold: #B3862F;
  --gold-ink: #7E5C1C;
  --gold-soft: #F3E7CC;
  --pos: #1D7A4E;
  --neg: #A3402C;
  --warn: #9A5F0C;
  --warn-soft: #F7EAD2;
  --ring: #9FB5A8;
  --ring-hi: #C79A43;
  --shadow: 0 1px 2px rgba(20, 33, 27, .06), 0 8px 24px -12px rgba(20, 33, 27, .18);
  --shadow-lg: 0 24px 60px -24px rgba(10, 48, 36, .45);

  /* tiers */
  --t-bronze: #9A5B34;
  --t-silver: #7E878D;
  --t-gold: #B3862F;
  --t-platinum: #4F5E68;

  /* category hues (reward art) */
  --c-travel: #2F5D7C;
  --c-hotel: #7A4E3A;
  --c-education: #4B4F86;
  --c-practice: #2E6B5E;
  --c-lifestyle: #7E3F55;
  --c-giving: #5E6B3A;
  --c-club: #0F4D38;

  /* type */
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.35rem, 1.1rem + .9vw, 1.65rem);
  --fs-2xl: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem);
  --fs-3xl: clamp(2.6rem, 1.6rem + 4.2vw, 4.9rem);

  /* shape & space */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --gutter: clamp(16px, 4vw, 40px);
  --sidebar: 252px;
  --tabbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0B1511;
    --paper-2: #101C17;
    --surface: #13211B;
    --surface-2: #172821;
    --ink: #EDE8DB;
    --ink-2: #AEB9B1;
    --ink-3: #8B988F;
    --line: #26382F;
    --line-2: #1E2F27;
    --emerald: #6CC59C;
    --emerald-hi: #86D4AF;
    --emerald-deep: #0A3024;
    --emerald-soft: #173A2C;
    --on-emerald: #06140E;
    --gold: #D6AE62;
    --gold-ink: #E0BD78;
    --gold-soft: #2E2715;
    --pos: #6CC59C;
    --neg: #E48A76;
    --warn: #E3AE5A;
    --warn-soft: #2C2213;
    --ring: #3B5A4B;
    --ring-hi: #D6AE62;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    --t-silver: #A5AEB4;
    --t-platinum: #93A4AF;
    --t-bronze: #C28258;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0B1511;
  --paper-2: #101C17;
  --surface: #13211B;
  --surface-2: #172821;
  --ink: #EDE8DB;
  --ink-2: #AEB9B1;
  --ink-3: #8B988F;
  --line: #26382F;
  --line-2: #1E2F27;
  --emerald: #6CC59C;
  --emerald-hi: #86D4AF;
  --emerald-deep: #0A3024;
  --emerald-soft: #173A2C;
  --on-emerald: #06140E;
  --gold: #D6AE62;
  --gold-ink: #E0BD78;
  --gold-soft: #2E2715;
  --pos: #6CC59C;
  --neg: #E48A76;
  --warn: #E3AE5A;
  --warn-soft: #2C2213;
  --ring: #3B5A4B;
  --ring-hi: #D6AE62;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --t-silver: #A5AEB4;
  --t-platinum: #93A4AF;
  --t-bronze: #C28258;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-md)/1.6 var(--f-body);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--emerald-deep); color: #F6F2E8; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
.display, .h1, .h2, .h3, .h4 { font-family: var(--f-display); font-weight: 500; letter-spacing: -.01em; text-wrap: balance; margin: 0; line-height: 1.12; font-optical-sizing: auto; }
.display { font-size: var(--fs-3xl); font-weight: 400; letter-spacing: -.025em; line-height: 1.02; }
.display em { font-style: italic; color: var(--gold-ink); font-weight: 400; }
.h1 { font-size: var(--fs-2xl); }
.h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.25rem); }
.h3 { font-size: var(--fs-xl); }
.h4 { font-size: var(--fs-lg); }
.eyebrow, .label { font: 600 var(--fs-xs)/1.3 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .6rem; }
.eyebrow--gold { color: var(--gold); }
.label { margin: 0; }
.lede { font-size: var(--fs-lg); color: var(--ink-2); max-width: 36rem; margin: 1.25rem 0 0; }
p { margin: 0; }
.link { color: var(--emerald); font-weight: 500; font-size: var(--fs-sm); text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; }
.fineprint { font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: .5em; align-items: flex-start; line-height: 1.5; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 44px; padding: .6em 1.2em; border-radius: 999px;
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font-weight: 550; font-size: var(--fs-sm); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .15s var(--ease), box-shadow .2s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn--primary { --b-bg: var(--emerald); --b-fg: var(--on-emerald); --b-bd: var(--emerald); }
.btn--primary:hover { --b-bg: var(--emerald-hi); border-color: var(--emerald-hi); }
.btn--gold { --b-bg: linear-gradient(135deg, #E2C27F, #B3862F 60%, #94691F); --b-fg: #1C140A; --b-bd: transparent; background: var(--b-bg); }
.btn--danger { --b-bg: var(--neg); --b-fg: #fff; --b-bd: var(--neg); }
.btn--ghost { --b-bg: var(--surface); }
.btn--sm { min-height: 38px; padding: .45em 1em; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.iconbtn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--paper-2); color: var(--ink); }
.iconbtn__badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--gold); color: #1C140A; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.iconbtn__badge:empty { display: none; }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); cursor: pointer; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; }
.lang span { padding: 4px 8px; border-radius: 999px; color: var(--ink-3); }
html[lang="de"] .lang [data-lang-de], html[lang="en"] .lang [data-lang-en] { background: var(--ink); color: var(--paper); }

/* ---------- form ---------- */
.field { display: grid; gap: .4rem; min-width: 0; }
.field label, .field legend { font-size: var(--fs-sm); font-weight: 550; color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], input[type="url"], input[type="tel"], input[type="month"], select {
  width: 100%; min-height: 44px; padding: .55rem .85rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-md);
}
input:focus-visible, select:focus-visible { outline: 2px solid var(--emerald); outline-offset: 1px; border-color: transparent; }
input[readonly] { background: var(--paper-2); color: var(--ink-2); }
input[type="range"] { width: 100%; accent-color: var(--emerald); height: 28px; }
.check { display: inline-flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--emerald); flex: none; }
.check--block { display: flex; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: end; }
.form-grid .field--full, .form-grid > .btn, .form-grid > .field-error { grid-column: 1 / -1; }
.form-grid > .btn { justify-self: start; }
.field-error { color: var(--neg); font-size: var(--fs-sm); }
fieldset { border: 0; padding: 0; margin: 0; }

.switch { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; font-size: var(--fs-sm); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--line); flex: none; transition: background .2s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + .switch__track { background: var(--emerald); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--gold); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .6; }
.switch--row { align-items: flex-start; }
.switch--row .switch__track { margin-top: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .45em; min-height: 36px; padding: .35em .95em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .ic { width: 1em; height: 1em; }

.pill { display: inline-flex; align-items: center; gap: .35em; padding: .15em .6em; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.pill--ok { background: var(--emerald-soft); color: var(--pos); }
.pill--pending { background: var(--warn-soft); color: var(--warn); }
.pill--neutral { background: var(--paper-2); color: var(--ink-2); }
.pill--gold { background: var(--gold-soft); color: var(--gold-ink); }
.pill--neg { background: color-mix(in srgb, var(--neg) 14%, transparent); color: var(--neg); }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: clamp(1.1rem, 2.5vw, 1.6rem); min-width: 0; display: grid; gap: 1rem; align-content: start; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.panel__sub { color: var(--ink-3); font-size: var(--fs-sm); max-width: 60ch; }
.panel--gold { background: linear-gradient(160deg, var(--gold-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--gold) 35%, var(--line-2)); }
.notice { display: flex; gap: .75rem; align-items: center; padding: .75rem 1rem; border-radius: var(--r-md); font-size: var(--fs-sm); flex-wrap: wrap; }
.notice:empty { display: none; }
.notice--warn { background: var(--warn-soft); color: var(--ink); }
.notice--warn .ic { color: var(--warn); }
.notice .link { margin-left: auto; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.split--wide { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.bullets li { position: relative; padding-left: 1.4rem; color: var(--ink-2); font-size: var(--fs-sm); }
.bullets li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--gold); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* =====================================================================
   PUBLIC
   ===================================================================== */
.pub-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line-2); }
.pub-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 26px; height: 26px; border-radius: 50%; flex: none; background:
  radial-gradient(circle, var(--gold) 0 3px, transparent 3.5px),
  repeating-radial-gradient(circle, transparent 0 3px, var(--emerald) 3px 4.2px, transparent 4.2px 5.5px); border: 1.5px solid var(--emerald); }
.brand__word { font-family: var(--f-display); font-style: italic; font-size: 1.45rem; font-weight: 500; letter-spacing: -.01em; }
.pub-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.pub-nav a { text-decoration: none; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.pub-nav a:hover { color: var(--ink); }
.pub-actions { display: flex; gap: .75rem; align-items: center; }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.trust { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: var(--fs-sm); color: var(--ink-2); }
.trust li { display: inline-flex; gap: .45rem; align-items: center; }
.trust .ic { color: var(--emerald); }
.hero__art { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; }
.hero__art .rings { width: 100%; height: 100%; }
.hero__card { position: absolute; right: -2%; bottom: 4%; width: 68%; transform: rotate(-6deg); }
.hero__card .mcard { box-shadow: var(--shadow-lg); }

.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band__head { margin-bottom: 2.25rem; max-width: 44rem; }
.band--deep { background: var(--emerald-deep); color: #EDE8DB; }
.band--deep .h2 { color: #F6F2E8; }
.band--deep p { color: #B9C7BE; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; counter-reset: s; }
.step { position: relative; padding: 1.6rem 1.5rem 1.7rem; border-top: 2px solid var(--ink); display: grid; gap: .6rem; align-content: start; }
.step__n { font-family: var(--f-display); font-size: 3.2rem; font-style: italic; line-height: 1; color: var(--gold); font-weight: 300; }
.step p { color: var(--ink-2); font-size: var(--fs-sm); max-width: 34ch; }
.years { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.years > div:first-child { display: grid; gap: 1rem; }
.milestones { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 360px; }
.milestones th, .milestones td { padding: .8rem .6rem; border-bottom: 1px solid rgba(237, 232, 219, .14); text-align: left; }
.milestones th { font-weight: 600; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: #8FA79A; }
.milestones td { color: #E4DFD1; }
.milestones td.num, .milestones th.num { text-align: right; font-variant-numeric: tabular-nums; }
.milestones .ms-ring { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #5E8A74; vertical-align: -1px; margin-right: .6rem; }
.milestones tr.gold .ms-ring { border-color: #D6AE62; box-shadow: 0 0 0 3px rgba(214, 174, 98, .2); }
.milestones tr.gold td { color: #F3DDAF; }

.tierband { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tier { position: relative; padding: 1.4rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: .5rem; align-content: start; overflow: hidden; }
.tier::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tc); }
.tier__name { font-family: var(--f-display); font-size: 1.5rem; }
.tier__min { font-size: var(--fs-sm); color: var(--ink-3); }
.tier__mult { font-family: var(--f-display); font-size: 2.4rem; font-weight: 300; line-height: 1; color: var(--tc); font-variant-numeric: tabular-nums; }
.tier ul { margin: .5rem 0 0; padding: 0; list-style: none; display: grid; gap: .35rem; font-size: var(--fs-sm); color: var(--ink-2); }
.tier li { display: flex; gap: .45rem; }
.tier li .ic { color: var(--tc); margin-top: .2em; }

.partner-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.partner-strip li { display: flex; align-items: center; gap: .8rem; padding: 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-2); min-width: 0; }
.partner-strip strong { display: block; font-size: var(--fs-sm); font-weight: 600; }
.partner-strip span.muted { font-size: var(--fs-xs); }
.mono { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; flex: none; background: var(--pc, var(--emerald)); color: #F6F2E8; font-family: var(--f-display); font-style: italic; font-size: 1.05rem; letter-spacing: -.02em; }
.mono--lg { width: 56px; height: 56px; font-size: 1.4rem; }

.faq__list { display: grid; border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; font-family: var(--f-display); font-size: var(--fs-lg); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; translate: 0 -50%; font-family: var(--f-body); font-size: 1.4rem; color: var(--gold); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 0 1.3rem; color: var(--ink-2); max-width: 62ch; }

.cta-band { border-radius: calc(var(--r-lg) + 6px); padding: clamp(2rem, 5vw, 3.5rem); background:
  radial-gradient(90% 120% at 100% 0%, rgba(214, 174, 98, .28), transparent 60%),
  repeating-radial-gradient(circle at 92% 12%, rgba(214, 174, 98, .10) 0 1px, transparent 1px 11px),
  linear-gradient(140deg, #124A37, #0A3024 70%);
  color: #EDE8DB; display: grid; gap: 1rem; justify-items: start; }
.cta-band .h2 { color: #F6F2E8; }
.cta-band p { color: #B9C7BE; max-width: 46ch; }

.login { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(2rem, 6vw, 5rem); }
.login__form { display: grid; gap: 1.1rem; }
.login__form .h1 { margin-bottom: .5rem; }
.login__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--ink-3); font-size: var(--fs-xs); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login__art { position: relative; aspect-ratio: 1; max-width: 480px; width: 100%; justify-self: center; }
.login__art .rings { width: 100%; height: 100%; }
.login__card { position: absolute; left: 50%; top: 50%; width: 72%; translate: -50% -50%; rotate: 4deg; }
.login__card .mcard { box-shadow: var(--shadow-lg); }

.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-footer__org { font-size: var(--fs-sm); color: var(--ink-3); }
.legal-links { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; margin-left: auto; }
.legal-links button { background: none; border: 0; padding: .35rem 0; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.legal-links button:hover { color: var(--ink); text-decoration-color: currentColor; }

/* =====================================================================
   MEMBERSHIP CARD
   ===================================================================== */
.mcard {
  --foil: linear-gradient(100deg, #E7CB8B 0%, #B3862F 35%, #F1DDAE 55%, #A77A26 80%);
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 1.586; border-radius: 18px; overflow: hidden;
  padding: 7% 7.5%; color: #EDE8DB; isolation: isolate; container-type: inline-size;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(214, 174, 98, .30), transparent 55%),
    linear-gradient(150deg, #155340, #0B3326 55%, #071F17);
  display: grid; grid-template-rows: auto 1fr auto; box-shadow: var(--shadow);
  transform-style: preserve-3d; transition: transform .4s var(--ease);
}
.mcard[data-tier="platinum"] { --foil: linear-gradient(100deg, #E9EEF1, #93A4AF 40%, #F4F7F8 60%, #7C8C96); background: radial-gradient(120% 90% at 100% 0%, rgba(200, 214, 222, .28), transparent 55%), linear-gradient(150deg, #36434B, #1D272D 60%, #12191D); }
.mcard[data-tier="silver"] { --foil: linear-gradient(100deg, #E3E6E8, #9AA3A9 45%, #F2F4F5 60%, #858E94); }
.mcard[data-tier="bronze"] { --foil: linear-gradient(100deg, #E2B08D, #9A5B34 45%, #F0CBAF 60%, #8A4E2B); }
.mcard__rings { position: absolute; right: -22%; top: -30%; width: 88%; aspect-ratio: 1; opacity: .5; z-index: -1; }
.mcard__rings path { fill: none; stroke: rgba(214, 174, 98, .35); stroke-width: 1.1; }
.mcard__rings path.m { stroke: rgba(231, 203, 139, .75); stroke-width: 2; }
.mcard__sheen { position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .10) 45%, transparent 60%); background-size: 250% 100%; background-position: var(--sx, 100%) 0; transition: background-position .4s var(--ease); }
.mcard__top { display: flex; justify-content: space-between; align-items: flex-start; }
.mcard__word { font-family: var(--f-display); font-style: italic; font-size: clamp(1.1rem, 9cqi, 2rem); line-height: 1; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mcard__tier { font-size: clamp(.6rem, 3.3cqi, .8rem); letter-spacing: .28em; font-weight: 700; text-transform: uppercase; padding: .35em .8em; border-radius: 999px; background: var(--foil); color: #1C140A; }
.mcard__years { align-self: center; display: flex; align-items: baseline; gap: .4em; }
.mcard__years b { font-family: var(--f-display); font-weight: 300; font-size: clamp(1.6rem, 13cqi, 3rem); line-height: 1; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mcard__years span { font-size: clamp(.55rem, 3cqi, .75rem); letter-spacing: .14em; text-transform: uppercase; color: rgba(237, 232, 219, .7); }
.mcard__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.mcard__name { font-size: clamp(.75rem, 4.2cqi, 1rem); font-weight: 600; letter-spacing: .02em; }
.mcard__no { font-family: var(--f-mono); font-size: clamp(.6rem, 3.4cqi, .82rem); letter-spacing: .14em; color: rgba(237, 232, 219, .75); margin-top: .2em; }
.mcard__since { font-size: clamp(.55rem, 3cqi, .72rem); text-align: right; color: rgba(237, 232, 219, .7); letter-spacing: .05em; }

/* =====================================================================
   RINGS
   ===================================================================== */
.rings path { fill: none; stroke: var(--ring); stroke-width: 1.3; transition: stroke .2s, stroke-width .2s; }
.rings path.m { stroke: var(--ring-hi); stroke-width: 2.6; }
.rings path.cur { stroke: var(--emerald); stroke-width: 2.2; stroke-dasharray: 5 6; }
.rings .core { fill: var(--gold); }
.rings text { font-family: var(--f-display); fill: var(--ink); }
.rings--interactive path.hit { stroke: transparent; stroke-width: 14; cursor: pointer; pointer-events: stroke; }
.rings--interactive path.on { stroke: var(--emerald); stroke-width: 3.2; }
.band--deep .rings path { stroke: #2F5A47; }

/* =====================================================================
   APP SHELL
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.4rem 1rem; border-right: 1px solid var(--line-2); background: var(--paper-2); }
.sidebar > .brand { padding: .2rem .7rem; }
.sidenav { display: grid; gap: .15rem; }
.sidenav a, .navlink { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 10px; text-decoration: none; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.sidenav a:hover, .navlink:hover { background: var(--surface); color: var(--ink); }
.sidenav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sidenav a[aria-current="page"] .ic { color: var(--emerald); }
.sidebar__foot { margin-top: auto; display: grid; gap: .5rem; }
.sidebar__card { display: grid; gap: .5rem; padding: .75rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.sidebar__card:hover { border-color: var(--gold); }
.sidebar__cardlabel { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }
.mini-card { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1.586; border-radius: 8px; padding: 10px 12px; color: #EDE8DB; background: radial-gradient(120% 90% at 100% 0%, rgba(214, 174, 98, .35), transparent 55%), linear-gradient(150deg, #155340, #0A3024); }
.mini-card__tier { font-size: 10px; letter-spacing: .25em; font-weight: 700; text-transform: uppercase; color: #E7CB8B; }
.mini-card__no { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; opacity: .8; }

.app-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; display: flex; align-items: center; gap: 1rem; min-height: 64px; padding-inline: var(--gutter); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.brand--mobile { display: none; }
.topbar__title { font-family: var(--f-display); font-size: var(--fs-lg); opacity: 0; transition: opacity .2s; }
.topbar.scrolled .topbar__title { opacity: 1; }
.topbar__actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.points-pill { display: inline-flex; align-items: center; gap: .5rem; min-height: 38px; padding: .3rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 650; font-size: var(--fs-sm); }
.points-pill__dot { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F1DDAE, #B3862F); box-shadow: 0 0 0 3px var(--gold-soft); }
.points-pill__unit { color: var(--ink-3); font-weight: 500; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--emerald); color: var(--on-emerald); font-weight: 650; font-size: var(--fs-sm); cursor: pointer; }

.popover { margin: 0; inset: auto; position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); right: var(--gutter); width: min(360px, calc(100vw - 32px)); padding: 1rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.popover::backdrop { background: transparent; }
.popover__h { font-weight: 650; font-size: var(--fs-sm); margin-bottom: .5rem; }
.popover__name { font-weight: 650; }
.popover__meta { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: .75rem; overflow-wrap: anywhere; }
.popover--user { width: min(280px, calc(100vw - 32px)); }
.popover__link { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .7rem .6rem; border-radius: 10px; border: 0; background: none; text-decoration: none; font-size: var(--fs-sm); cursor: pointer; text-align: left; }
.popover__link:hover { background: var(--paper-2); }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; }
.notif-list li { display: grid; grid-template-columns: auto 1fr; gap: .75rem; padding: .75rem .25rem; border-top: 1px solid var(--line-2); font-size: var(--fs-sm); }
.notif-list .ic { color: var(--gold); margin-top: .15em; }
.notif-list time { display: block; font-size: var(--fs-xs); color: var(--ink-3); }

.app-main { flex: 1; padding: clamp(1.25rem, 3vw, 2.25rem) var(--gutter) 3rem; display: block; outline: none; }
.app-main > .view { display: grid; gap: 1.5rem; max-width: 1180px; margin-inline: auto; }
.app-main > .view[hidden] { display: none; }
.viewhead { display: grid; gap: .2rem; }
.viewhead--row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; }
.viewhead__sub { color: var(--ink-2); max-width: 62ch; margin-top: .5rem; }
.viewhead__meta { font-size: var(--fs-sm); color: var(--ink-2); }
.viewhead__meta strong { color: var(--ink); font-size: var(--fs-lg); }
.app-footer { padding: 1.25rem var(--gutter) 1.5rem; border-top: 1px solid var(--line-2); }
.app-footer .legal-links { margin-left: 0; }

.tabbar { display: none; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.25rem; grid-template-areas: "bal card" "st rings" "picks picks" "act quests"; }
.balance { grid-area: bal; align-content: space-between; background:
  radial-gradient(80% 100% at 100% 0%, var(--gold-soft), transparent 60%), var(--surface); }
.balance__num { font-family: var(--f-display); font-weight: 300; font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: .95; letter-spacing: -.03em; }
.balance__eq { color: var(--ink-2); font-size: var(--fs-sm); }
.balance__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.dash__card { grid-area: card; display: grid; gap: .75rem; align-content: center; justify-items: center; }
.dash__cardactions { display: flex; gap: .5rem; }
.dash__status { grid-area: st; }
.dash__rings { grid-area: rings; }
.dash__picks { grid-area: picks; }
.dash__quests { grid-area: quests; }
.dash__act { grid-area: act; }

.sbar { display: grid; gap: .9rem; }
.sbar__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.sbar__now { font-family: var(--f-display); font-size: 1.6rem; }
.sbar__now small { font-family: var(--f-body); font-size: var(--fs-sm); color: var(--ink-3); margin-left: .35rem; }
.sbar__track { position: relative; height: 12px; border-radius: 6px; background: var(--paper-2); overflow: visible; }
.sbar__fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, var(--emerald), var(--gold)); width: 0; transition: width 1.2s var(--ease); }
.sbar__tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--surface); }
.sbar__labels { position: relative; height: 2.4rem; font-size: var(--fs-xs); color: var(--ink-3); }
.sbar__labels span { position: absolute; translate: -50% 0; white-space: nowrap; text-align: center; line-height: 1.3; }
.sbar__labels span:first-child { translate: 0 0; }
.sbar__labels span:last-child { translate: -100% 0; text-align: right; }
.sbar__labels b { display: block; color: var(--ink-2); font-weight: 600; }
.sbar__labels .is-cur b { color: var(--gold-ink); }
.sbar__note { font-size: var(--fs-sm); color: var(--ink-2); }
.sbar--lg .sbar__track { height: 16px; }

.ringbox { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.ringbox__svg { position: relative; }
.ringbox__svg .rings { width: 100%; aspect-ratio: 1; display: block; }
.ringtip { position: absolute; left: 50%; bottom: -.4rem; translate: -50% 100%; font-size: var(--fs-xs); white-space: nowrap; color: var(--ink-2); }
.ringbox__txt { display: grid; gap: .75rem; }
.ringbox__big { font-family: var(--f-display); font-size: 2.2rem; line-height: 1; }
.ringbox__big small { font-family: var(--f-body); font-size: var(--fs-sm); color: var(--ink-3); display: block; margin-top: .35rem; }
.kv { display: grid; gap: .1rem; font-size: var(--fs-sm); }
.kv dt { color: var(--ink-3); font-size: var(--fs-xs); }
.kv dd { margin: 0; font-weight: 550; }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; margin-inline: -.25rem; padding-inline: .25rem; }
.scroller > * { scroll-snap-align: start; }

.quests { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.quest { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .35rem .9rem; align-items: center; }
.quest__ic { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--emerald-soft); color: var(--emerald); }
.quest__t { font-weight: 600; font-size: var(--fs-sm); }
.quest__r { font-weight: 650; font-size: var(--fs-sm); color: var(--gold-ink); white-space: nowrap; }
.quest__bar { grid-column: 2 / -1; height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.quest__bar i { display: block; height: 100%; background: var(--emerald); border-radius: 3px; }
.quest__meta { grid-column: 2 / -1; font-size: var(--fs-xs); color: var(--ink-3); }
.quests--full .quest { padding: 1rem; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.quests--full { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.txlist { list-style: none; margin: 0; padding: 0; display: grid; }
.tx { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line-2); }
.tx:first-child { border-top: 0; }
.tx__t { font-size: var(--fs-sm); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx__m { font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tx__p { font-weight: 650; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); text-align: right; white-space: nowrap; }
.plus { color: var(--pos); }
.minus { color: var(--ink-2); }

/* ---------- earn ---------- */
.earn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.way { display: grid; gap: .6rem; align-content: start; padding: 1.3rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.way__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--emerald-soft); color: var(--emerald); }
.way__ic .ic { width: 1.35em; height: 1.35em; }
.way h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.2rem; margin: 0; }
.way p { font-size: var(--fs-sm); color: var(--ink-2); }
.way__rate { font-weight: 650; color: var(--gold-ink); font-size: var(--fs-sm); }
.way .btn { justify-self: start; margin-top: .25rem; }
.way--feature { background: linear-gradient(160deg, var(--emerald-deep), #0E3F2F); color: #EDE8DB; border-color: transparent; }
.way--feature p { color: #B9C7BE; }
.way--feature .way__ic { background: rgba(214, 174, 98, .16); color: #E7CB8B; }
.way--feature .way__rate { color: #E7CB8B; }
.refcode { display: flex; gap: .5rem; align-items: center; padding: .4rem .4rem .4rem .8rem; border: 1px dashed var(--gold); border-radius: var(--r-sm); font-family: var(--f-mono); font-size: var(--fs-sm); justify-content: space-between; }
.refcode .iconbtn { width: 32px; height: 32px; }

.calc { display: grid; gap: 1.1rem; }
.calc output { font-weight: 650; color: var(--ink); }
.calc__result { padding: 1.1rem 1.2rem; border-radius: var(--r-md); background: var(--emerald-soft); display: grid; gap: .25rem; }
.calc__num { font-family: var(--f-display); font-size: 2.4rem; line-height: 1.05; color: var(--emerald); }
.calc__eq { font-size: var(--fs-sm); color: var(--ink-2); }

/* ---------- rewards ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; }
.toolbar__right { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .ic { position: absolute; left: .85rem; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 2.5rem; border-radius: 999px; }
.select-sm { width: auto; min-height: 40px; border-radius: 999px; padding-inline: .9rem 2rem; font-size: var(--fs-sm); }
.result-count { font-size: var(--fs-sm); color: var(--ink-3); }

.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.reward-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.rcard { position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line-2); transition: transform .25s var(--ease), box-shadow .25s; container-type: inline-size; min-width: 0; }
.rcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rcard__art { position: relative; aspect-ratio: 16 / 9; background:
  radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%),
  repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 12px),
  linear-gradient(150deg, var(--cc), color-mix(in srgb, var(--cc) 55%, #000)); color: rgba(246, 242, 232, .92); display: flex; align-items: flex-end; padding: 1rem; }
.rcard__glyph { position: absolute; right: -6%; top: -10%; width: 56%; height: auto; aspect-ratio: 1; opacity: .22; stroke-width: 1; }
.rcard__partner { position: relative; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.rcard__badges { position: absolute; left: .75rem; top: .75rem; display: flex; gap: .35rem; }
.rcard__badges .pill { background: rgba(10, 20, 16, .55); color: #F6F2E8; backdrop-filter: blur(6px); }
.rcard__badges .pill--gold { background: linear-gradient(100deg, #E7CB8B, #B3862F); color: #1C140A; }
.rcard__wish { position: absolute; right: .6rem; top: .6rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(10, 20, 16, .45); color: #F6F2E8; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
.rcard__wish[aria-pressed="true"] .ic { fill: #E7CB8B; stroke: #E7CB8B; }
.rcard__body { display: grid; gap: .5rem; padding: 1rem 1.1rem 1.15rem; align-content: start; }
.rcard__title { font-family: var(--f-display); font-size: 1.15rem; font-weight: 500; line-height: 1.2; margin: 0; }
.rcard__title button { all: unset; cursor: pointer; }
.rcard__title button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rcard__title button::after { content: ""; position: absolute; inset: 0; }
.rcard__price { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; margin-top: auto; }
.rcard__pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.rcard__alt { font-size: var(--fs-xs); color: var(--ink-3); }
.rcard__gap { display: grid; gap: .3rem; font-size: var(--fs-xs); color: var(--ink-3); }
.rcard__gap i { display: block; height: 4px; border-radius: 2px; background: var(--paper-2); overflow: hidden; }
.rcard__gap i b { display: block; height: 100%; background: var(--gold); }
.rcard--locked .rcard__art { filter: saturate(.4); }
.empty { padding: 3rem 1rem; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--r-lg); grid-column: 1 / -1; }

/* ---------- partners ---------- */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.pcard { display: grid; gap: 1rem; padding: 1.3rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); align-content: start; }
.pcard__head { display: flex; gap: .9rem; align-items: center; }
.pcard__name { font-family: var(--f-display); font-size: 1.2rem; }
.pcard__cat { font-size: var(--fs-xs); color: var(--ink-3); }
.pcard__rate { display: flex; align-items: baseline; gap: .4rem; }
.pcard__rate b { font-family: var(--f-display); font-size: 1.8rem; font-weight: 400; color: var(--gold-ink); }
.pcard__rate span { font-size: var(--fs-sm); color: var(--ink-2); }
.pcard p { font-size: var(--fs-sm); color: var(--ink-2); }
.pcard__foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding-top: .9rem; border-top: 1px solid var(--line-2); }

/* ---------- activity ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kpi { padding: 1.1rem 1.2rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: .3rem; }
.kpi__v { font-family: var(--f-display); font-size: 1.7rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__v.plus { color: var(--pos); }
.kpi__v.warn { color: var(--warn); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; padding: .7rem 1rem; font-size: var(--fs-sm); font-weight: 550; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--emerald); }
.txtable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); border-radius: var(--r-lg); overflow: hidden; min-width: 600px; }
.txtable th { text-align: left; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: .9rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.txtable td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.txtable tr:last-child td { border-bottom: 0; }
.txtable .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.txtable td:first-child { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.txtable .tx__sub { display: block; font-size: var(--fs-xs); color: var(--ink-3); }

/* ---------- status matrix ---------- */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); min-width: 640px; }
.matrix th, .matrix td { padding: .9rem 1rem; border-bottom: 1px solid var(--line-2); text-align: center; }
.matrix tr:last-child td, .matrix tr:last-child th { border-bottom: 0; }
.matrix th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink-2); }
.matrix thead th { font-family: var(--f-display); font-size: 1.15rem; font-weight: 500; vertical-align: bottom; }
.matrix thead th small { display: block; font-family: var(--f-body); font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }
.matrix thead th i { display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--tc); margin: 0 auto .6rem; }
.matrix .is-cur { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.matrix thead .is-cur::after { content: attr(data-you); display: block; font-family: var(--f-body); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); font-weight: 700; margin-top: .3rem; }
.matrix .yes { color: var(--emerald); }
.matrix .no { color: var(--ink-3); }
.life__you { font-weight: 600; color: var(--gold-ink); }

/* ---------- privacy ---------- */
.consents { list-style: none; margin: 0; padding: 0; display: grid; }
.consent { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; padding: 1rem 0; border-top: 1px solid var(--line-2); }
.consent:first-child { border-top: 0; padding-top: 0; }
.consent__t { font-weight: 600; font-size: var(--fs-sm); }
.consent__d { grid-column: 1; font-size: var(--fs-sm); color: var(--ink-2); }
.consent__m { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: .4rem .9rem; flex-wrap: wrap; }
.consent .switch { grid-row: 1 / span 2; grid-column: 2; align-self: start; }
.rights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.right { display: grid; gap: .45rem; align-content: start; text-align: left; padding: 1.1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-decoration: none; transition: border-color .2s, background .2s; }
.right:hover { border-color: var(--emerald); background: var(--surface); }
.right .ic { color: var(--emerald); width: 1.4em; height: 1.4em; }
.right__t { font-weight: 650; font-size: var(--fs-sm); }
.right__d { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }
.right--danger .ic { color: var(--neg); }
.right--danger:hover { border-color: var(--neg); }
.simple { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 420px; }
.simple th, .simple td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.simple th { font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.log { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; max-height: 280px; overflow: auto; }
.log li { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--line-2); font-size: var(--fs-sm); }
.log li:first-child { border-top: 0; }
.log time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: var(--fs-xs); padding-top: .15em; white-space: nowrap; }

/* =====================================================================
   DIALOGS
   ===================================================================== */
.dlg { border: 0; padding: 0; border-radius: calc(var(--r-lg) + 4px); background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow-lg); }
.dlg--wide { width: min(720px, calc(100vw - 32px)); }
.dlg--reward { width: min(760px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(6, 18, 13, .55); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg-in .3s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.dlg__body { display: grid; gap: 1.1rem; padding: clamp(1.25rem, 3vw, 1.75rem); }
.dlg__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.dlg__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.dlg--card [data-card] { justify-self: center; width: 100%; max-width: 440px; }
.cardcode { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: center; padding: 1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-2); }
.cardcode canvas { width: 116px; height: 116px; border-radius: 8px; background: #fff; padding: 6px; }
.cardcode__no { font-family: var(--f-mono); letter-spacing: .12em; font-size: var(--fs-md); margin: .25rem 0 .4rem; }
.code { margin: 0; max-height: 50vh; overflow: auto; padding: 1rem; border-radius: var(--r-md); background: var(--paper-2); font: 12px/1.55 var(--f-mono); white-space: pre; }
.prose { display: grid; gap: .9rem; font-size: var(--fs-sm); color: var(--ink-2); max-height: 60vh; overflow: auto; }
.prose h3 { font-family: var(--f-display); font-weight: 500; font-size: var(--fs-lg); color: var(--ink); margin: .5rem 0 0; }

/* reward dialog */
.rd { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0; margin: calc(-1 * clamp(1.25rem, 3vw, 1.75rem)); }
.rd .rcard__art { aspect-ratio: auto; min-height: 100%; border-radius: 0; padding: 1.5rem; align-items: flex-end; }
.rd__main { display: grid; gap: 1rem; padding: clamp(1.25rem, 3vw, 1.75rem); align-content: start; }
.rd__close { position: absolute; right: .75rem; top: .75rem; z-index: 2; background: var(--surface); }
.rd__desc { color: var(--ink-2); font-size: var(--fs-sm); }
.mix { display: grid; gap: .6rem; padding: 1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-2); }
.mix__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.mix__pts { font-family: var(--f-display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.mix__cash { font-weight: 650; font-variant-numeric: tabular-nums; }
.mix__after { font-size: var(--fs-xs); color: var(--ink-3); }
.terms { font-size: var(--fs-xs); color: var(--ink-3); display: grid; gap: .25rem; }
.success { display: grid; gap: 1rem; justify-items: center; text-align: center; padding: 1rem 0 .5rem; }
.success__badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--emerald); color: var(--on-emerald); }
.success__badge .ic { width: 30px; height: 30px; stroke-width: 2.2; }
.voucher { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; text-align: left; padding: 1rem; border: 1px dashed var(--gold); border-radius: var(--r-md); width: 100%; background: var(--gold-soft); }
.voucher canvas { width: 96px; height: 96px; background: #fff; border-radius: 6px; padding: 5px; }
.voucher__code { font-family: var(--f-mono); font-size: 1.05rem; letter-spacing: .12em; font-weight: 600; }

/* =====================================================================
   COOKIE + TOAST
   ===================================================================== */
.cookie { position: fixed; z-index: 60; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; width: min(880px, calc(100vw - 32px)); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.cookie__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem 2rem; padding: 1.25rem 1.4rem; align-items: end; }
.cookie__txt { display: grid; gap: .5rem; }
.cookie__txt p { font-size: var(--fs-sm); color: var(--ink-2); max-width: 62ch; }
.cookie__prefs { display: grid; gap: .8rem; margin-top: .5rem; font-size: var(--fs-sm); }
.cookie__actions { display: grid; gap: .5rem; min-width: 210px; }
.toasts { position: fixed; z-index: 70; left: 50%; translate: -50% 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: .5rem; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: .7rem; align-items: center; padding: .85rem 1.1rem; border-radius: var(--r-md); background: var(--ink); color: var(--paper); font-size: var(--fs-sm); box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); pointer-events: auto; }
.toast .ic { color: var(--gold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* view transitions */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "bal card" "st st" "rings quests" "picks picks" "act act"; }
  .rights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tierband { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ringbox { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .ringbox__svg { width: min(220px, 100%); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .brand--mobile { display: inline-flex; }
  .brand--mobile .brand__word { font-size: 1.25rem; }
  .topbar__title { display: none; }
  .app-main { padding-bottom: calc(var(--tabbar-h) + 2.5rem + env(safe-area-inset-bottom, 0px)); }
  .app-footer { padding-bottom: calc(var(--tabbar-h) + 1.5rem + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; border-radius: 10px; font-size: 11px; font-weight: 550; color: var(--ink-3); text-decoration: none; cursor: pointer; min-height: 52px; align-content: center; }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--emerald); }
  .tabbar [aria-current="page"] .ic { stroke-width: 2.1; }
  .popover--sheet { top: auto; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px)); right: 16px; left: auto; width: min(300px, calc(100vw - 32px)); }
  .pub-nav { display: none; }
  .pub-actions { margin-left: auto; }
  .hero, .login, .years { grid-template-columns: minmax(0, 1fr); }
  .hero__art { max-width: 420px; }
  .login__art { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .split, .split--wide { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quests--full { grid-template-columns: minmax(0, 1fr); }
  .cookie__inner { grid-template-columns: minmax(0, 1fr); }
  .cookie__actions { min-width: 0; }
  .cookie { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .app .cookie, body.in-app .cookie { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  body.in-app .toasts { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bal" "card" "st" "rings" "picks" "quests" "act"; }
  .points-pill__unit, .topbar .lang { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .rights { grid-template-columns: minmax(0, 1fr); }
  .tierband { grid-template-columns: minmax(0, 1fr); }
  .rd { grid-template-columns: minmax(0, 1fr); }
  .rd .rcard__art { min-height: 150px; }
  .cardcode { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .voucher { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .pub-header__inner { gap: .75rem; }
  .pub-actions .btn { padding-inline: .9em; }
  .hero__card { width: 74%; right: 0; }
  .sbar__labels span { font-size: 10px; }
  .toolbar__right { width: 100%; justify-content: space-between; }
  .search { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- late fixes & small-screen table ---------- */
[hidden] { display: none !important; }
h1[tabindex="-1"]:focus { outline: none; }
.dlg { overflow: auto; }
.rd__main { position: relative; }
.rd__main > .eyebrow, .rd__main > .h3 { padding-right: 2.75rem; }
.dash__card > [data-card] { width: 100%; max-width: 420px; }
.mcard__rings path.cur { display: none; }
@media (max-width: 640px) {
  .txtable, .txtable tbody { display: block; min-width: 0; background: var(--surface); }
  .txtable thead { display: none; }
  .txtable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); }
  .txtable td { padding: 0; border: 0; }
  .txtable td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .txtable td:nth-child(4) { grid-column: 2; grid-row: 1; }
  .txtable td:nth-child(1) { grid-column: 1; grid-row: 2; font-size: var(--fs-xs); }
  .txtable td:nth-child(3) { grid-column: 2; grid-row: 2; justify-self: end; }
  .txtable { border-radius: var(--r-lg); border: 1px solid var(--line-2); }
}

.sbar__src { list-style: none; margin: 0; padding: .9rem 0 0; border-top: 1px solid var(--line-2); display: grid; gap: .45rem; font-size: var(--fs-sm); }
.sbar__src li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; color: var(--ink-2); }
.sbar__src i { width: 8px; height: 8px; border-radius: 50%; }
.sbar__src b { font-weight: 600; color: var(--ink); }
.sbar__keep { display: flex; gap: .5rem; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); }
.sbar__keep .ic { color: var(--emerald); }
