/* Luckwell v3 — the approved skin: the Outperform system with every colour inverted (op_skin/).
   Dark paper #0B0C11, gold #E0B01F accents, light "night" sections, Bricolage Grotesque + Instrument Sans + Geist Mono,
   glass capsule header, 12–22 px radii, golden caustics behind everything (assets/backdrop.js).
   Behaviour hooks (ids, data-*, .stage/.ritual/.dissolve/.charged/.under/.ring/.tint/.veilgrain …) are unchanged from v2. */
:root {
  --paper: #0B0C11; --paper-2: #15171E; --surface: #000000;
  --ink: #EAE8E3; --ink-2: #B4AFA8; --ink-3: #858079;
  --line: rgba(234,232,227,.1); --line-2: rgba(234,232,227,.2);
  --night: #EDEBE7; --night-2: #E4E1DB; --on-night: #0B0C11; --on-night-2: rgba(11,12,17,.64);
  --gold: #E0B01F; --gold-hover: #E8BF43; --on-gold: #000000;
  --sun: #0A3ABD; --paid: #F085B4; --alert: #47C6D3; --seal: #7A2228;
  --metal: #B08D57; --metal-light: #E8D3A2; /* the sigil's own metals (lib/metal.js) */
  --tint: #3F4C8A; /* planetary tint, set per sigil, used only at ≤12 % */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.09), 0 8px 20px -14px rgba(0,0,0,.36);
  --shadow: 0 2px 4px rgba(0,0,0,.09), 0 24px 60px -30px rgba(0,0,0,.63);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.14), 0 40px 90px -40px rgba(0,0,0,.9);
  --g-blur: blur(18px) saturate(150%);
  --g-fill: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.2) 60%), rgba(11,12,17,.45);
  --g-fill-strong: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.1) 60%), rgba(11,12,17,.78);
  --g-edge: rgba(0,0,0,.8);
  --g-rim: inset 1px 1px 0 rgba(0,0,0,.95), inset -1px -1px 0 rgba(0,0,0,.4), inset 0 0 0 1px rgba(0,0,0,.25);
  --g-shadow: 0 12px 30px -16px rgba(0,0,0,.63), 0 0 0 1px rgba(0,0,0,.14);
  --g-hover: rgba(234,232,227,.07);
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1.02rem, .98rem + .2vw, 1.1rem);
  --step-1: clamp(1.18rem, 1.08rem + .45vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2.05rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.2vw, 5.2rem);
  --step-5: clamp(3rem, 1.6rem + 6vw, 6.6rem);
  --ease: cubic-bezier(.25, 1, .5, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --t-fast: 160ms; --t: 220ms; --t-slow: 340ms;
  --radius: 16px; --max: 78rem; --hd-h: 80px; --altar: 46rem;
  /* v2 names kept as aliases: inline styles, learn pages and the server-rendered share page still use them */
  --obsidian: var(--paper); --bone: var(--ink); --bone-dim: var(--ink-2); --bone-60: var(--ink-3); --smoke: var(--line-2);
  --gold-light: #F0CF6A; --gold-dim: rgba(224,176,31,.45); --oxblood: var(--seal);
  --display: var(--f-display); --ui: var(--f-body); --mono: var(--f-mono); --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  background: radial-gradient(70% 50% at 85% 0%, rgba(224,176,31,.07), transparent 60%) fixed,
              radial-gradient(50% 40% at 0% 100%, rgba(10,58,189,.12), transparent 60%) fixed, var(--paper); }
body { margin: 0; background: transparent; color: var(--ink); font: 400 var(--step-0)/1.6 var(--f-body); min-height: 100dvh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: #000; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
p { margin: 0; }
b, strong { font-weight: 600; color: var(--ink); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* backdrop: golden caustics on the paper (assets/backdrop.js) */
#backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#backdrop canvas { position: absolute; inset: 0; display: block; }

/* ---------- type ---------- */
h1, h2, h3, .display { font-family: var(--f-display); font-weight: 700; letter-spacing: -.032em; line-height: .98; text-wrap: balance; margin: 0; font-variation-settings: "opsz" 96, "wdth" 100; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -.04em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.15; letter-spacing: -.015em; font-variation-settings: "opsz" 24, "wdth" 100; }
em, .it { font-style: normal; color: var(--gold); }
.lede { font-size: var(--step-1); color: var(--ink-2); line-height: 1.45; max-width: 34rem; text-wrap: pretty; }
.lede b { color: var(--ink); }
.eyebrow, .lab, .caps { font: 500 var(--step--1)/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.dim, .muted { color: var(--ink-2); }
.mono { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .04em; font-weight: 400; color: var(--ink-3); font-feature-settings: "tnum"; }
.mono.gold, .gold.mono { color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }
.disc { font-size: var(--step--1); color: var(--ink-3); max-width: 46rem; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.sticker { display: inline-block; background: var(--gold); color: #000; padding: .02em .22em .06em; border-radius: .16em; transform: rotate(-1.6deg); line-height: 1; box-shadow: 0 .08em 0 rgba(0,0,0,.45); }
.night .sticker { box-shadow: none; }
.callout { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; font-weight: 500; color: var(--ink-2); }
.pill-tag, .callout .pill { display: inline-block; font: 500 .74rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line-2); padding: .45rem .65rem; border-radius: 999px; color: var(--gold); }
.wrap { max-width: var(--max); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- glass capsule header (filled by app.js) ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); color: var(--ink); }
.top::before { content: ""; position: absolute; inset: 0 0 -26px; pointer-events: none; background: linear-gradient(180deg, var(--paper) 0%, rgba(11,12,17,.92) 70%, rgba(11,12,17,0) 100%); opacity: 0; transition: opacity var(--t-slow) ease; }
.top.is-condensed::before { opacity: 1; }
.hd-row { position: relative; display: flex; align-items: center; gap: .8rem; height: var(--hd-h); transition: height var(--t-slow) var(--ease); }
.top.is-condensed .hd-row { height: 64px; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; font: 700 1.25rem/1 var(--f-display); letter-spacing: -.035em; flex: none; font-variation-settings: "opsz" 24; color: var(--ink); }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo small { font: 500 .62rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-left: .2rem; }
.capsule { position: relative; margin-inline: auto; padding: 5px 7px; border-radius: 999px; }
.glass-layer { position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: var(--g-fill); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow); transition: background var(--t-slow) ease; }
.top.is-condensed .glass-layer { background: var(--g-fill-strong); }
.glass-layer::before, .burger::before, .mnav::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: var(--g-rim); }
.nav { position: relative; display: flex; align-items: center; gap: 2px; }
.nav .pill { position: relative; z-index: 1; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: .93rem; color: var(--ink-2); white-space: nowrap; transition: color var(--t-fast) ease, background var(--t-fast) ease; }
body:not([data-user]) .top .only-user { display: none; }
.nav .pill:hover, .nav .pill[aria-current="page"] { color: var(--ink); background: var(--g-hover); }
.lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.35); flex: none; }
.lang button { font: 500 .68rem/1 var(--f-mono); letter-spacing: .08em; color: var(--ink-3); padding: .45rem .5rem; border-radius: 999px; transition: color var(--t-fast), background var(--t-fast); }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: #000; background: var(--gold); }
.hd-cta { flex: none; padding: .66rem 1.05rem; font-size: .92rem; min-height: 0; }
.burger { display: none; flex: none; width: 44px; height: 44px; padding: 0; position: relative; align-items: center; justify-content: center; background: var(--g-fill); border: 1px solid var(--g-edge); border-radius: 12px; -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); box-shadow: var(--g-shadow); color: inherit; transition: transform var(--t-fast) var(--ease); }
.burger:active { transform: scale(.94); }
.mnav { position: absolute; top: calc(100% - 8px); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); display: grid; gap: 2px; padding: .5rem; border-radius: 16px; background: var(--g-fill-strong); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow); transform-origin: top right; animation: sheet var(--t) var(--ease); }
.mnav[hidden] { display: none; }
.mnav a:not(.btn) { position: relative; z-index: 3; padding: .8rem 1rem; border-radius: 10px; font-weight: 500; color: var(--ink-2); }
.mnav a:not(.btn):hover, .mnav a[aria-current="page"] { background: var(--g-hover); color: var(--ink); }
.mnav .btn { position: relative; z-index: 3; margin-top: .4rem; width: 100%; }
@keyframes sheet { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 980px) { .top .capsule, .top .hd-cta { display: none; } .top .burger { display: inline-flex; } .top .lang { margin-left: auto; } }
@media (max-width: 520px) { .logo small { display: none; } }
@media (prefers-reduced-transparency: reduce) { .glass-layer, .burger, .mnav { background: #000 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; } }
/* static headers (learn pages, server-rendered /s/:id): <header class="top"><a class="brand">…<nav><a>… */
.top:not(.hd) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--hd-h); padding-inline: max(16px, env(safe-area-inset-left, 0px)); max-width: var(--max); margin: 0 auto; }
.top:not(.hd) .brand { font: 700 1.25rem/1 var(--f-display); letter-spacing: -.035em; }
.top:not(.hd) .brand::before { content: ""; display: inline-block; width: 22px; height: 22px; margin-right: .5rem; vertical-align: -4px; border: 1.5px solid currentColor; border-radius: 50%; }
.top:not(.hd) nav { display: flex; gap: 2px; padding: 5px 7px; border-radius: 999px; background: var(--g-fill); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow); }
.top:not(.hd) nav a { padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: .9rem; color: var(--ink-2); white-space: nowrap; }
.top:not(.hd) nav a:hover { color: var(--ink); background: var(--g-hover); }

/* ---------- buttons ---------- */
.btn, .cta { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: .85rem 1.35rem; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(0,0,0,.5); color: var(--ink); font: 600 1rem/1.15 var(--f-body); letter-spacing: -.005em; text-align: center; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.btn:hover, .btn:focus-visible { background: var(--surface); border-color: var(--ink); }
.btn:active, .cta:active { transform: scale(.97); }
.btn .sub, .cta .sub { font: 400 .7rem/1.3 var(--f-mono); letter-spacing: .02em; color: var(--ink-3); }
.btn.primary, .btn-primary, .cta { background: var(--gold); color: var(--on-gold); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px -12px rgba(224,176,31,.7); }
.btn.primary:hover, .btn-primary:hover, .cta:hover, .cta:focus-visible { background: var(--gold-hover); color: #000; border-color: transparent; }
.btn.primary .sub, .btn-primary .sub { color: rgba(0,0,0,.62); }
.btn-ghost { background: rgba(0,0,0,.5); color: var(--ink); border-color: var(--line-2); }
.btn-lg { padding: 1.05rem 1.5rem; font-size: 1.06rem; min-height: 56px; }
.btn[disabled] { opacity: .4; cursor: default; transform: none; }
.btn.quiet { color: var(--ink-2); }
.cta.small { min-height: 48px; padding: .7rem 1.2rem; font-size: .98rem; }
.link { color: var(--ink-2); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--line-2); transition: color var(--t-fast), text-decoration-color var(--t-fast); }
.link:hover { color: var(--ink); text-decoration-color: var(--gold); }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; }

/* ---------- sections ---------- */
.sec { padding-block: clamp(3.5rem, 8vw, 7rem); }
.sec-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.sec-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 52rem; }
.night { background: var(--night); color: var(--on-night); border-radius: clamp(18px, 3vw, 28px); margin-inline: max(6px, env(safe-area-inset-left, 0px)); }
.night .lede, .night .muted { color: var(--on-night-2); }
.night .eyebrow { color: var(--sun); }
.night b { color: var(--on-night); }

/* ---------- landing ---------- */
.hero-well { position: relative; isolation: auto; padding-top: calc(var(--hd-h) + env(safe-area-inset-top, 0px) + clamp(1.5rem, 4vw, 3.5rem)); }
.hero-well #water { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; touch-action: manipulation; cursor: none; mix-blend-mode: lighten; opacity: .9;
  -webkit-mask: linear-gradient(180deg, #000 60%, transparent); mask: linear-gradient(180deg, #000 60%, transparent); }
.hero-well .cursor { position: absolute; width: 18px; height: 18px; border: 1px solid var(--gold); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); opacity: 0; transition: opacity .6s; z-index: 3; }
.hero-well.hover .cursor { opacity: .8; }
.hero { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; padding-bottom: clamp(3rem, 7vw, 5.5rem); pointer-events: none; }
.hero a, .hero button { pointer-events: auto; }
.hero-callout { grid-column: 1 / -1; margin-bottom: -.4rem; }
.hero h1 { font-size: var(--step-5); max-width: 12ch; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.hero h1 .w > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease-out) forwards; }
.hero h1 .w.stk { overflow: visible; }
.hero h1 .w.stk > span { transform: none; opacity: 0; animation: stick .6s cubic-bezier(.34, 1.56, .64, 1) forwards; }
.hero h1 .l2 { display: block; font-weight: 500; font-size: .42em; letter-spacing: -.02em; color: var(--ink-2); margin-top: .5em; line-height: 1.15; max-width: 22ch; font-variation-settings: "opsz" 48; opacity: 0; animation: fade .9s var(--ease) 1.6s forwards; }
@keyframes rise { to { transform: none; } }
@keyframes stick { from { opacity: 0; transform: scale(1.25) rotate(4deg); } to { opacity: 1; transform: rotate(-1.6deg); } }
@keyframes fade { to { opacity: 1; } }
.hero-side { display: grid; gap: 1.3rem; padding-bottom: .4rem; }
.hero-side .edition { color: var(--gold); }
.hero .calib { min-height: 1.2em; transition: opacity .8s; }
.hero-well .heard { position: absolute; left: 0; right: 0; top: 46%; z-index: 2; text-align: center; font: 700 var(--step-3)/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); opacity: 0; transition: opacity .9s var(--ease); pointer-events: none; }
.hero-well.touched .heard { opacity: 1; }
.hero-well.touched .hero h1, .hero-well.touched .hero-side, .hero-well.touched .hero-callout { opacity: 0; transition: opacity 1.1s var(--ease-in); }
.veil-out { position: fixed; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; transition: opacity 1.1s var(--ease-in); z-index: 80; }
body.descending .veil-out { opacity: 1; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; align-items: start; } }

.sigils3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); }
.sigils3 figure { margin: 0; }
.sigils3 figcaption { margin-top: .7rem; font-family: var(--f-mono); font-size: var(--step--1); color: var(--ink-3); }
.sigil-frame { position: relative; aspect-ratio: 1; background: #0B0A0C; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.sigil-frame svg { width: 100%; height: 100%; }
@media (max-width: 720px) { .sigils3 { grid-template-columns: 1fr; } .sigils3 figure { max-width: 26rem; } }

.made { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.made article { padding: 1.4rem; border: 1px solid rgba(11,12,17,.14); border-radius: 18px; }
.made .y { font: 700 2.2rem/1 var(--f-display); letter-spacing: -.035em; }
.made .src { font-family: var(--f-mono); font-size: var(--step--1); opacity: .7; margin: .4rem 0 .6rem; }
.made .role { font-size: .98rem; }
.made.dark article { border-color: var(--line); background: rgba(0,0,0,.35); }
@media (max-width: 720px) { .made { grid-template-columns: 1fr; } }

.steps { padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.steps li { list-style: none; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: .95rem; color: var(--ink-2); }
.steps li b { display: block; font: 700 1.15rem/1.15 var(--f-display); letter-spacing: -.015em; color: var(--ink); margin: .4rem 0; }
.steps li .n { font-family: var(--f-mono); color: var(--gold); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); gap: 1rem; align-items: stretch; }
.tier { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; position: relative; transition: border-color var(--t) ease, box-shadow var(--t) ease; }
.tier:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.tier.feature { border-color: var(--ink); box-shadow: var(--shadow); }
.tier .tag { position: absolute; top: -.75rem; left: 1.4rem; background: var(--sun); color: var(--ink); font: 500 .7rem/1 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; padding: .4rem .6rem; border-radius: 6px; }
.tier h3 { font-size: var(--step-2); }
.tier .for { color: var(--ink-2); font-size: .95rem; }
.tier .price { font: 700 2.2rem/1 var(--f-display); letter-spacing: -.035em; }
.tier .btn { margin-top: auto; }
.final { text-align: center; }
.final .cta-row { justify-content: center; margin-top: 1.4rem; }

/* ---------- footer (filled by app.js) ---------- */
footer { border-top: 1px solid var(--line); padding-block: 3rem 5rem; font-size: .92rem; color: var(--ink-2); background: var(--paper); margin-top: clamp(2rem, 5vw, 4rem); }
.ft .wrap { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.ft .ft-brand .disc { margin-top: .8rem; max-width: 26rem; }
.ft h4 { margin: 0 0 .6rem; font: 500 .74rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.ft a:not(.logo) { display: block; padding: .2rem 0; }
.ft a:not(.logo):hover { color: var(--ink); text-decoration: underline; }
/* static footers (learn, share page): <footer><div class="row">…</div><p class="disc"> */
footer:not(.ft) { padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
footer:not(.ft) > * { max-width: var(--max); margin-inline: auto; }
footer:not(.ft) .row { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
footer:not(.ft) .row a:hover { color: var(--ink); }
footer:not(.ft) .disc { margin-top: 14px; }

/* ---------- the altar: one column for every flow page ---------- */
.altar { position: relative; z-index: 1; max-width: var(--altar); margin: 0 auto; padding: calc(var(--hd-h) + env(safe-area-inset-top, 0px) + clamp(1.5rem, 4vw, 3rem)) max(16px, env(safe-area-inset-left, 0px)) clamp(3rem, 6vw, 5rem); min-height: 100svh; overflow-x: clip; }
.altar.wide { max-width: var(--max); }
.altar .crumb { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.altar h1 { font-size: var(--step-4); }
.altar > h1 + .dim, .altar .page-sub { font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); }

/* /start: one question per screen */
.ritual { min-height: calc(100svh - 220px); display: flex; flex-direction: column; justify-content: center; }
.qstep { display: none; }
.qstep.on { display: block; animation: rise-in .7s var(--ease-out) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.qstep .num { display: inline-block; font: 500 .74rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line-2); border-radius: 999px; padding: .45rem .7rem; margin-bottom: 1.4rem; }
.qstep label, .qstep .q { display: block; font: 800 var(--step-4)/.98 var(--f-display); letter-spacing: -.04em; margin-bottom: .9rem; text-wrap: balance; font-variation-settings: "opsz" 96; }
.qstep .hint { color: var(--ink-2); font-size: var(--step-0); margin-bottom: 1.6rem; max-width: 40ch; }
.bare { width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: .55em .7em; font: 600 clamp(1.5rem, 5.4vw, 2.2rem)/1.15 var(--f-display); letter-spacing: -.02em; caret-color: var(--gold); color: var(--ink);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; -webkit-appearance: none; appearance: none; }
.bare:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(224,176,31,.15); }
.bare::placeholder { color: var(--ink-3); opacity: .55; }
.date { display: flex; align-items: center; gap: 10px; }
.date .bare { font-family: var(--f-mono); font-weight: 500; letter-spacing: .04em; text-align: center; padding-inline: .3em; }
.date .d, .date .m { width: 3.6ch; flex: none; } .date .y { width: 5.8ch; flex: none; }
.date .dot { color: var(--gold); font: 500 1.4rem var(--f-mono); }
.fmt { margin-top: 10px; }
.err { color: var(--ink); font-size: .9rem; margin-top: 12px; display: none; }
.err::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--paid); margin-right: 10px; vertical-align: 1px; }
.invalid .err { display: block; }
.invalid .bare { border-color: var(--paid); }
.wheel { position: relative; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; min-height: 150px; margin: 4px 0 8px; padding: 1rem .6rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; }
.wheel .word { text-align: center; font: 800 clamp(2.3rem, 10vw, 4.2rem)/1 var(--f-display); letter-spacing: -.04em; color: var(--ink); cursor: pointer; padding: 10px 0; transition: color var(--t-fast); user-select: none; overflow-wrap: anywhere; }
.wheel .word:hover { color: var(--gold-hover); }
.wheel .word .pl { display: table; margin: 14px auto 0; font: 500 .7rem/1 var(--f-mono); letter-spacing: .1em; color: var(--gold); text-transform: uppercase; border: 1px solid var(--line-2); border-radius: 999px; padding: .4rem .6rem; }
.wheel .arrow { font: 500 1.6rem/1 var(--f-body); color: var(--ink); height: 48px; width: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0,0,0,.5); transition: border-color var(--t-fast), color var(--t-fast); }
.wheel .arrow:hover { border-color: var(--gold); color: var(--gold); }
.wheel .idx { position: absolute; right: 14px; bottom: 10px; font-size: .68rem; }
.intents { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.own { margin-top: 1.4rem; }
.own .bare { font-size: 1.2rem; font-family: var(--f-body); font-weight: 500; letter-spacing: 0; }
.stepnav { display: flex; justify-content: space-between; align-items: center; margin-top: 2.2rem; gap: 16px; }
.stepnav .back { font: 500 .78rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: .8rem .9rem; border-radius: 10px; border: 1px solid var(--line); }
.stepnav .back:hover { color: var(--ink); border-color: var(--line-2); }
.marks { display: flex; gap: 6px; }
.marks i { display: block; width: 22px; height: 6px; border-radius: 999px; background: var(--line-2); transition: background .5s; }
.marks i.on { background: var(--gold); }

/* /birth: the forge */
.forge-page { text-align: center; }
.stage { position: relative; width: min(100%, 540px); aspect-ratio: 1; margin: 0 auto; }
.stage svg { width: 100%; height: 100%; transition: filter 1.1s var(--ease-out), transform .7s var(--ease-out); }
.stage > svg { border-radius: 24px; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
.stage .tint { position: absolute; inset: -18%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--tint) 14%, transparent), transparent 62%); }
.stage .bloom { position: absolute; inset: -14%; pointer-events: none; mix-blend-mode: screen; opacity: 0; background: radial-gradient(circle, rgba(232,211,162,.55), rgba(176,141,87,.12) 38%, transparent 62%); }
.stage .sparks { position: absolute; inset: 0; pointer-events: none; }
.stage .seal { position: absolute; left: 50%; bottom: 3.5%; width: 23%; aspect-ratio: 1; transform: translate(-50%, 50%) scale(1.6); opacity: 0; pointer-events: none; }
.stage .seal svg { border-radius: 0; box-shadow: none; }
.stage .seal.on { animation: stamp .42s cubic-bezier(.34, 1.56, .64, 1) forwards; }
@keyframes stamp { from { transform: translate(-50%, 50%) scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-50%, 50%) scale(1); opacity: 1; } }
.stage .grainburst { position: absolute; inset: 0; pointer-events: none; opacity: 0; background-image: inherit; }
.stage.veiled svg { filter: blur(14px) saturate(.8); }
.stage .veilgrain { position: absolute; inset: -2%; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease-out); -webkit-mask: radial-gradient(circle, #000 38%, transparent 66%); mask: radial-gradient(circle, #000 38%, transparent 66%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .90 0 0 0 0 .84 .3 .3 .3 0 -.1'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stage.veiled .veilgrain { opacity: .16; }
.calibrate { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .8s; border-radius: 24px; border: 1px dashed var(--line-2); }
.calibrate .mono { color: var(--gold); font-size: .85rem; }
.forge-cap { text-align: center; margin-top: 2.6rem; min-height: 1.4em; color: var(--ink-2); }
.forge-cap .ch { opacity: 0; transition: opacity .5s; }
.forge-cap .ch.on { opacity: 1; }
.reveal { text-align: center; margin-top: 1.6rem; opacity: 0; transition: opacity 1.2s var(--ease-out); display: grid; justify-items: center; gap: 1rem; }
.reveal.on { opacity: 1; }
.reveal .other { display: inline-block; }
.sound { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30; color: var(--ink-2); padding: .55rem .8rem; border-radius: 999px; background: var(--g-fill-strong); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border: 1px solid var(--line); transition: color var(--t-fast); }
.sound:hover { color: var(--ink); }
.sound[aria-pressed="true"] { color: var(--gold); }

/* /pay: three plan cards */
.pay-page .crumb .mono:first-child { color: var(--gold); }
.plans { display: grid; gap: 1rem; margin: clamp(1.8rem, 4vw, 2.6rem) 0 1.2rem; }
.plan { position: relative; display: grid; grid-template-columns: 76px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem 1rem 1rem; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink); transition: border-color var(--t) ease, box-shadow var(--t) ease; }
.plan:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.plan[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.plan[aria-pressed="true"]::before { content: ""; position: absolute; top: 1rem; right: 1rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(224,176,31,.2); }
.plan .thumb { width: 76px; height: 76px; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: #0B0A0C; }
.plan .thumb svg { width: 100%; height: 100%; }
.plan .t { display: block; font: 700 var(--step-1)/1.1 var(--f-display); letter-spacing: -.02em; }
.plan .d { color: var(--ink-2); font-size: .88rem; margin-top: 4px; display: block; max-width: 32ch; line-height: 1.4; }
.plan .amt { font: 700 1.5rem/1 var(--f-display); letter-spacing: -.035em; align-self: end; }
@media (min-width: 760px) {
  .pay-page { max-width: 60rem; }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plan { grid-template-columns: 1fr; align-content: start; gap: .9rem; padding: 1.2rem; }
  .plan .thumb { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; }
  .plan .amt { font-size: 2.2rem; align-self: start; }
  .pay-page .payrow, .pay-page .fine, .pay-page .consent, .pay-page .notice, .pay-page .err, .pay-page .hint-line { max-width: 40rem; }
}
.payrow { display: grid; gap: 12px; margin-top: 1.2rem; }
.pay-page #great { margin: 0 0 .2rem; }
.payrow .btn { width: 100%; }
.notice { display: none; margin-top: 1.2rem; padding: 1rem 1.1rem; border: 1px solid var(--line-2); border-left: 3px solid var(--gold); border-radius: 12px; background: rgba(0,0,0,.45); color: var(--ink-2); font-size: .94rem; }
.notice.on { display: block; }
.notice.err { border-left-color: var(--paid); }
.fine { color: var(--ink-3); font-size: .86rem; margin-top: 1.1rem; line-height: 1.55; }
.fine.c { text-align: center; margin-inline: auto; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; margin: 1.3rem 0 .4rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.35); color: var(--ink-2); font-size: .88rem; line-height: 1.5; cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); margin: 1px 0 0; cursor: pointer; display: grid; place-items: center; }
.consent input:checked { border-color: var(--gold); background: var(--gold); }
.consent input:checked::after { content: ""; width: 6px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.consent.invalid { color: var(--ink); border-color: var(--paid); } .consent.invalid input { border-color: var(--paid); }

/* /me */
.me-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.me-head .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.me-head .meta > div:not(:empty) { font: 500 .72rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .45rem .7rem; }
.me-head .meta > div:first-child:not(:empty) { color: var(--gold); }
.stage.faded svg { filter: grayscale(.7) brightness(.55); }
.panel { border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,.55); padding: clamp(1.1rem, 3vw, 1.5rem); margin-top: 1rem; }
.panel .lab { margin-bottom: .7rem; }
.key { font: 700 clamp(1.5rem, 5.4vw, 2rem)/1.2 var(--f-display); letter-spacing: -.02em; color: var(--gold); overflow-wrap: anywhere; }
.key-say { font-family: var(--f-mono); font-size: .8rem; color: var(--ink); margin-top: .7rem; line-height: 1.7; letter-spacing: .02em; }
.key-mean { color: var(--ink-2); font-size: .94rem; margin-top: .5rem; }
.buff { display: flex; align-items: center; gap: 16px; }
.buff .ring { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; font: 700 1.3rem var(--f-display); color: var(--gold); flex: none; position: relative; }
.share, .dl { display: flex; flex-wrap: wrap; gap: 8px; }
.share .btn, .dl .btn { width: auto; min-height: 44px; padding: .55rem 1rem; font-size: .9rem; }
details.made-of { margin-top: 1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,.55); }
details.made-of summary { cursor: pointer; padding: 1.1rem 1.3rem; font: 700 var(--step-1)/1.2 var(--f-display); letter-spacing: -.015em; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.made-of summary::-webkit-details-marker { display: none; }
details.made-of summary::after { content: ""; width: .9rem; height: .9rem; flex: none; margin-top: .3rem; background: linear-gradient(currentColor, currentColor) center/100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center/1.5px 100% no-repeat; transition: transform var(--t) var(--ease); color: var(--gold); }
details[open].made-of summary::after { transform: rotate(45deg); }
details.made-of .body { padding: 0 1.3rem 1.2rem; display: grid; gap: 12px; }
.ex { border-top: 1px solid var(--line); padding-top: 12px; }
.ex .t { font: 700 1.1rem/1.2 var(--f-display); letter-spacing: -.015em; }
.ex .v { font-size: .95rem; margin-top: 2px; color: var(--ink-2); }
.ex .s { font-family: var(--f-mono); font-size: .7rem; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.empty { text-align: center; padding: clamp(2rem, 8vw, 5rem) 0; display: grid; justify-items: center; gap: 1.4rem; }
.empty h2 { font-size: var(--step-3); max-width: 18ch; }
.share-page .stage { width: min(100%, 460px); }
.share-page h1 { text-align: center; margin-top: 16px; font-size: var(--step-3); }

/* legal */
.legal { max-width: 46rem; }
.legal h1 { font-size: var(--step-4); margin-bottom: 1.2rem; }
.legal h2 { font-size: var(--step-2); margin: 2.2rem 0 .6rem; }
.legal p, .legal li { color: var(--ink-2); font-size: 1.02rem; line-height: 1.7; }
.legal ul, .legal ol { padding-left: 1.3rem; display: grid; gap: .4rem; }
.legal a { color: var(--gold); }
.legal [data-lang] { display: none; }
.legal [data-lang].on { display: block; }

@media (min-width: 640px) { .payrow { grid-template-columns: 1fr 1fr; } .me-head { flex-direction: row; justify-content: space-between; align-items: end; } }

/* ===== gate 2: wearing, charging, streak, share sheet, grimoire, journal, login ===== */
.meta-line { text-align: center; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font: 500 .7rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #000; background: var(--gold); padding: .42rem .65rem; border-radius: 999px; }
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); }
.badge:empty { display: none; }
.badge.common { color: var(--ink-2); background: transparent; border: 1px solid var(--line-2); }
.me-acct { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.me-acct a, .me-acct button { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.me-acct a:hover, .me-acct button:hover { color: var(--ink); }
/* the sigil under water (charged) */
.stage.charged svg { filter: blur(16px) brightness(.55) saturate(.7); transition: filter 1.6s var(--ease-in); }
.stage.charged .tint { opacity: .5; }
.stage .under { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; opacity: 0; transition: opacity 1.2s var(--ease-out) .6s; pointer-events: none; padding: 1rem; }
.stage.charged .under { opacity: 1; }
.stage .under .mono { color: var(--ink); }
.stage .under .seal-mini { width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--gold); background: radial-gradient(circle, rgba(122,34,40,.95), rgba(122,34,40,.5) 70%, transparent 72%); display: grid; place-items: center; font: 700 1.2rem var(--f-display); color: var(--gold); margin: 0 auto 12px; }
/* ritual overlay */
.stage .rit { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .9s var(--ease-out); }
.stage.ritual .rit { opacity: 1; }
.stage .rit svg.ring { position: absolute; inset: -3%; width: 106%; height: 106%; filter: none; }
.stage .rit .ring circle { fill: none; stroke-width: 1.2; }
.stage .rit .ring .track { stroke: var(--line-2); }
.stage .rit .ring .prog { stroke: var(--gold); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .25s linear; }
.stage.ritual svg:not(.ring) { transition: transform 10s var(--ease-out); transform: scale(1.025); }
.stage.dissolve svg:not(.ring) { filter: blur(18px) brightness(.5); opacity: .35; transition: filter 1.8s var(--ease-in), opacity 1.8s var(--ease-in); }
.rit-copy { text-align: center; min-height: 3.6em; margin-top: 1.4rem; }
.rit-copy .line { font: 700 var(--step-2)/1.15 var(--f-display); letter-spacing: -.025em; color: var(--ink); opacity: 0; transition: opacity .8s var(--ease-out); display: block; text-wrap: balance; }
.rit-copy .line.on { opacity: 1; }
.rit-copy .sub { display: block; margin-top: 8px; color: var(--gold); }
.rit-row { text-align: center; margin-top: 1.2rem; display: grid; gap: 12px; justify-items: center; }
.rit-row .best { max-width: 42ch; }
.rit-row .btn { width: auto; min-width: 220px; }
.rit-row .btn.forget { border-color: var(--line-2); }
.rit-row .btn.forget:hover { border-color: var(--gold); }
.loc { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.loc:hover { color: var(--ink); text-decoration-color: var(--gold); }
/* streak */
.streak { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; }
.streak .num { font: 800 3rem/1 var(--f-display); letter-spacing: -.04em; color: var(--gold); min-width: 2ch; text-align: center; }
.streak .num small { display: block; font: 500 .62rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.streak .t { font-family: var(--f-display) !important; font-weight: 700; letter-spacing: -.015em; }
.embers { display: inline-flex; gap: 6px; vertical-align: middle; margin: 0 6px 0 10px; }
.embers i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.embers i.on { background: var(--gold); box-shadow: 0 0 8px rgba(224,176,31,.6); }
.rings { display: inline-flex; gap: 5px; align-items: center; margin-left: 10px; vertical-align: middle; }
.rings i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.rings i.on { border-color: var(--gold); background: rgba(224,176,31,.25); }
.streak .d { color: var(--ink-2); font-size: .9rem; margin-top: 6px; line-height: 1.5; }
.streak .decay { color: var(--ink); font-size: .92rem; margin-top: 8px; padding: .5rem .7rem; border-left: 3px solid var(--paid); background: rgba(0,0,0,.35); border-radius: 8px; }
/* share sheet */
.sheet { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.sheet .btn { width: 100%; min-height: 48px; padding: .55rem .7rem; font-size: .9rem; }
.sheet .btn .sub { font-size: .62rem; }
.cap-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; font-size: .92rem; color: var(--ink-2); line-height: 1.55; display: none; background: rgba(0,0,0,.35); }
.cap-box.on { display: block; }
.cap-box .who { margin-bottom: 6px; color: var(--gold); }
.pair-row { display: grid; gap: 10px; margin-top: 1rem; }
@media (min-width: 560px) { .pair-row { grid-template-columns: 1fr 1fr; } }
.pair-row .btn { width: 100%; }
.hint-line { margin-top: 8px; color: var(--ink-3); font-size: .86rem; max-width: 52ch; }
.hint-line .link { color: var(--gold); }
/* journal */
.journal .q { font: 700 var(--step-2)/1.15 var(--f-display); letter-spacing: -.025em; }
.journal .opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.journal .opts .btn { width: auto; min-height: 44px; padding: .5rem 1.1rem; font-size: .92rem; border-radius: 999px; }
.journal .opts .btn[aria-pressed="true"] { background: var(--gold); color: #000; border-color: var(--gold); }
.journal .bare { font: 500 1.05rem var(--f-body); letter-spacing: 0; margin-top: 1rem; }
.journal .row2 { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 1rem; flex-wrap: wrap; }
/* login */
.login { max-width: 36rem; }
.login form { display: grid; gap: 12px; }
.login .bare { font: 500 clamp(1.1rem, 4.4vw, 1.4rem) var(--f-mono); letter-spacing: 0; }
.login .btn { width: 100%; }
@media (min-width: 560px) { .login form { grid-template-columns: 1fr auto; align-items: stretch; } .login .btn { width: auto; min-width: 180px; } }
.keep { margin-top: 1rem; padding: clamp(1.1rem, 3vw, 1.5rem); border: 1px solid var(--gold-dim); border-radius: 18px; background: rgba(0,0,0,.55); text-align: left; }
.keep p { color: var(--ink-2); font-size: .95rem; max-width: 50ch; }
.keep form { display: grid; gap: 10px; grid-template-columns: 1fr auto; align-items: stretch; margin-top: 1rem; }
.keep .bare { font: 500 1.05rem var(--f-mono); letter-spacing: 0; padding: .7rem .85rem; }
.keep .btn { width: auto; min-height: 48px; padding: .55rem 1.1rem; font-size: .92rem; background: var(--gold); color: #000; border-color: transparent; }
@media (max-width: 480px) { .keep form { grid-template-columns: 1fr; } .keep .btn { width: 100%; } }
/* grimoire */
.grim-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 1rem; }
.grim-head a.mono { font-size: .8rem; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .5rem .8rem; }
.grim-head a.mono:hover { color: var(--ink); border-color: var(--ink); }
.grim-stats { margin: 1rem 0 1.8rem; display: flex; flex-wrap: wrap; gap: 8px; }
.grim-stats > span:not(:empty) { border: 1px solid var(--line); border-radius: 999px; padding: .4rem .7rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.card { position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); padding: .7rem; display: grid; gap: 8px; align-content: start; transition: border-color var(--t), box-shadow var(--t); }
.card:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.card .thumb { aspect-ratio: 1; background: #0B0A0C; position: relative; overflow: hidden; border-radius: 10px; }
.card .thumb svg { width: 100%; height: 100%; }
.card.uncharged .thumb svg { filter: grayscale(.6) brightness(.6); }
.card .thumb .mark { position: absolute; right: 8px; bottom: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--seal); border: 1px solid rgba(234,232,227,.3); }
.card .thumb .mark.on { background: var(--gold); box-shadow: 0 0 6px rgba(224,176,31,.6); }
.card .t { font: 700 1.1rem/1.1 var(--f-display); letter-spacing: -.015em; padding-inline: .2rem; }
.card .m { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .04em; color: var(--ink-3); line-height: 1.6; padding-inline: .2rem; }
.card .m .r { color: var(--gold); }
.card .j { font-size: .9rem; color: var(--ink-2); line-height: 1.35; padding-inline: .2rem; }
.card .j::before { content: "“"; color: var(--gold); }
.card .j::after { content: "”"; color: var(--gold); }
.card .dl { margin-top: 2px; gap: 6px; padding-inline: .2rem; }
.card .dl a { font: 500 .64rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .35rem .5rem; }
.card .dl a:hover { color: #000; background: var(--gold); border-color: var(--gold); }
/* gift / twin pages */
.scroll-page .stage { width: min(100%, 460px); }
.scroll-page .qstep label, .scroll-page .qstep .q { font-size: var(--step-2); letter-spacing: -.025em; margin-bottom: .6rem; }
.scroll-page .wheel { min-height: 120px; }
.scroll-page .wheel .word { font-size: clamp(2rem, 8vw, 3rem); }
.twin-keys { display: grid; gap: 14px; margin-top: 4px; }
@media (min-width: 560px) { .twin-keys { grid-template-columns: 1fr 1fr; } }
.initials { font: 800 var(--step-3)/1 var(--f-display); color: var(--gold); letter-spacing: .2em; text-align: center; margin: 1rem 0 1.4rem; }
.learn-link { font: 500 .7rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
/* 404 */
.lost .code { font: 800 clamp(5rem, 22vw, 11rem)/.9 var(--f-display); letter-spacing: -.05em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .hero h1 .w > span, .hero h1 .l2 { transform: none; opacity: 1; }
}

/* === mantra (mt-) === */
.mt-panel .key { font-family: var(--f-display); font-size: var(--step-2); line-height: 1.15; color: var(--ink); letter-spacing: -.01em; }
.mt-units { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; margin-top: 1.1rem; }
.mt-unit { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; background: rgba(255,255,255,.02); }
.mt-orig { font-size: 1.6rem; line-height: 1.2; color: var(--gold); }
.mt-word { font-family: var(--f-display); font-size: var(--step-1); margin-top: .25rem; }
.mt-say { font-size: .72rem; letter-spacing: .06em; color: var(--ink-2); margin-top: .2rem; }
.mt-mean { font-size: var(--step--1); color: var(--ink-3); margin-top: .45rem; line-height: 1.45; }
.mt-how { font-size: var(--step--1); margin-top: 1rem; max-width: 60ch; }
.mt-act { text-align: center; display: grid; gap: .8rem; justify-items: center; }
.mt-lab { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.mt-line { font-family: var(--f-display); font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.6rem); line-height: 1.2; margin: 0; max-width: 22ch; }
.mt-w { color: var(--ink-3); transition: color .6s var(--ease, ease), text-shadow .6s var(--ease, ease); }
.mt-w.on { color: var(--gold); text-shadow: 0 0 24px rgba(224,176,31,.45); }
.mt-w.past { color: var(--ink); }
.mt-dot { color: var(--ink-3); }
.mt-sayline { font-size: .78rem; letter-spacing: .06em; color: var(--ink-2); margin: 0; max-width: 46ch; }
.mt-pass { font-size: .8rem; color: var(--ink-2); margin: .3rem 0 0; }
.mt-seals { display: flex; gap: .6rem; }
.mt-seals i { font-style: normal; font-family: var(--f-mono); font-size: .8rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--ink-3); transition: all .6s var(--ease, ease); }
.mt-seals i.lit { border-color: var(--gold); color: var(--on-gold); background: var(--gold); box-shadow: 0 0 22px rgba(224,176,31,.5); }
.mt-row { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.mt-mic.live { border-color: var(--gold); color: var(--gold); }
.mt-hint { font-size: .68rem; color: var(--ink-3); max-width: 44ch; margin: 0; }
.pay-mantra { margin-top: 14px; color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .mt-w, .mt-seals i { transition: none; } }
