/* Nightdraw web app — getnightdraw.com/read
   Same ink + gold as the iOS app (Nightdraw/Design/Theme.swift). No web fonts. */

:root {
  --ink-950: #050608;
  --ink-900: #08090C;
  --ink-850: #0B0D11;
  --ink-800: #0E1117;
  --ink-700: #151922;
  --ink-600: #1F2430;
  --gold-300: #F1D9A0;
  --gold-400: #E6C784;
  --gold: #D9B26A;
  --gold-600: #B8914C;
  --gold-700: #8A6A33;
  --ivory: #F3ECDD;
  --text: rgba(243, 236, 221, 0.96);
  --text-2: rgba(243, 236, 221, 0.68);
  --text-3: rgba(243, 236, 221, 0.46);
  --line: rgba(217, 178, 106, 0.25);
  --line-soft: rgba(217, 178, 106, 0.14);
  --glass: rgba(255, 255, 255, 0.03);
  --love: #D49AA6;
  --career: #9DB8A0;
  --decision: #A9A3D9;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --top: env(safe-area-inset-top);
  --bottom: env(safe-area-inset-bottom);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink-900); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  background:
    radial-gradient(52rem 30rem at 50% -10rem, rgba(217, 178, 106, 0.10), transparent 70%),
    linear-gradient(180deg, var(--ink-900) 0%, var(--ink-800) 60%, var(--ink-900) 100%);
  background-attachment: fixed;
  isolation: isolate;
}
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 8% 12%, rgba(243,238,226,.8), transparent 60%),
    radial-gradient(1px 1px at 22% 38%, rgba(243,238,226,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 35% 8%, rgba(243,238,226,.85), transparent 60%),
    radial-gradient(1px 1px at 47% 27%, rgba(243,238,226,.45), transparent 60%),
    radial-gradient(1px 1px at 63% 15%, rgba(243,238,226,.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 33%, rgba(233,207,154,.75), transparent 60%),
    radial-gradient(1px 1px at 91% 9%, rgba(243,238,226,.55), transparent 60%),
    radial-gradient(1px 1px at 14% 64%, rgba(243,238,226,.45), transparent 60%),
    radial-gradient(1px 1px at 29% 82%, rgba(243,238,226,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 56% 71%, rgba(243,238,226,.5), transparent 60%),
    radial-gradient(1px 1px at 86% 58%, rgba(243,238,226,.6), transparent 60%),
    radial-gradient(1px 1px at 4% 92%, rgba(243,238,226,.5), transparent 60%);
}
body::after {
  background-image:
    radial-gradient(1.5px 1.5px at 17% 24%, rgba(233,207,154,.85), transparent 60%),
    radial-gradient(1px 1px at 41% 52%, rgba(243,238,226,.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 67% 44%, rgba(243,238,226,.8), transparent 60%),
    radial-gradient(1px 1px at 83% 20%, rgba(243,238,226,.75), transparent 60%),
    radial-gradient(1px 1px at 52% 94%, rgba(233,207,154,.6), transparent 60%);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .3; } to { opacity: 1; } }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
a { color: var(--gold-400); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.noscript { padding: 2rem; text-align: center; }

/* ---------- Shell ---------- */
.view {
  position: relative;
  width: 100%;
  max-width: 30rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--top) + 0.75rem) max(1.25rem, env(safe-area-inset-right)) calc(var(--bottom) + 1.5rem) max(1.25rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  animation: viewIn .5s var(--ease) both;
}
.view.wide { max-width: 58rem; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view.back-in { animation-name: viewBack; }
@keyframes viewBack { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.75rem;
  margin-bottom: .5rem;
}
.bar .spacer { width: 2.75rem; }
.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  transition: color .2s, background-color .2s, transform .15s;
}
.icon-btn:hover { color: var(--gold-400); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }
.steps-dots { display: flex; gap: .35rem; }
.steps-dots i { width: .35rem; height: .35rem; border-radius: 50%; background: var(--ink-600); transition: background .3s, width .3s var(--ease); }
.steps-dots i.on { background: var(--gold); width: 1.1rem; border-radius: 1rem; }

.wordmark { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--serif); font-size: 1.2rem; color: var(--gold); letter-spacing: .02em; text-decoration: none; }
.wordmark svg { width: 1.2rem; height: 1.2rem; }

.eyebrow {
  margin: 0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.title {
  margin: .5rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.title em, .em { font-style: italic; color: var(--gold-400); }
.sub { margin: .75rem 0 0; color: var(--text-2); font-size: 1.0625rem; text-wrap: pretty; }
.center { text-align: center; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; }
.mt-s { margin-top: .75rem; } .mt-m { margin-top: 1.5rem; } .mt-l { margin-top: 2.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  min-height: 3.5rem;
  padding: .9rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-400), var(--gold) 55%, var(--gold-600));
  color: var(--ink-900);
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: .005em;
  text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(217,178,106,.55), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .15s var(--ease), filter .2s, opacity .2s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.secondary {
  background: transparent;
  color: var(--gold-400);
  box-shadow: inset 0 0 0 1px var(--line);
}
.link-btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  color: var(--gold-400);
  font-weight: 500;
}
.link-btn.muted { color: var(--text-3); font-weight: 400; font-size: .9375rem; }
.footer-actions { margin-top: auto; padding-top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.spinner { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid rgba(8,9,12,.25); border-top-color: var(--ink-900); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Intro ---------- */
.intro { justify-content: center; text-align: center; }
.intro .moon-hero { margin: 0 auto 2rem; width: 4.5rem; height: 4.5rem; color: var(--gold); filter: drop-shadow(0 0 24px rgba(217,178,106,.35)); }
.intro .title { font-size: clamp(2.6rem, 12vw, 3.4rem); }
.intro .phase { margin-top: 1rem; color: var(--text-3); font-size: .9375rem; letter-spacing: .04em; }
.fine { color: var(--text-3); font-size: .8125rem; line-height: 1.5; }

/* ---------- Topic tiles ---------- */
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2rem; }
.topic {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  min-height: 8.5rem;
  padding: 1.1rem 1rem 1rem;
  text-align: left;
  border-radius: 1.25rem;
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
  animation: rise .55s var(--ease) both;
}
.topic:hover { box-shadow: inset 0 0 0 1px var(--line); }
.topic:active { transform: scale(.97); }
.topic .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--c, var(--gold)); box-shadow: 0 0 14px var(--c, var(--gold)); margin-bottom: auto; }
.topic strong { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.15; }
.topic span { color: var(--text-2); font-size: .875rem; line-height: 1.35; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Follow-up rows ---------- */
.options { display: flex; flex-direction: column; gap: .75rem; margin-top: 2rem; }
.option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1rem .7rem .7rem;
  text-align: left;
  border-radius: 1.1rem;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: transform .2s var(--ease), box-shadow .2s;
  animation: rise .55s var(--ease) both;
}
.option:hover { box-shadow: inset 0 0 0 1px var(--line); }
.option:active { transform: scale(.98); }
.option img { width: 3.4rem; aspect-ratio: 1000/1510; height: auto; border-radius: .45rem; box-shadow: 0 0 0 1px var(--line), 0 8px 18px -8px rgba(0,0,0,.8); flex: none; }
.option strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.option span { display: block; color: var(--text-2); font-size: .9375rem; }
.chev { width: 1rem; height: 1rem; flex: none; color: var(--gold); opacity: .7; }
.option .chev { margin-left: auto; }

/* ---------- Story ---------- */
.story { text-align: center; }
.story-card { width: min(13rem, 52vw); margin: 1.5rem auto 0; }
.story .theme { margin-top: 1.25rem; font-family: var(--serif); font-style: italic; color: var(--gold-400); }

/* ---------- Card art ---------- */
.art {
  position: relative;
  aspect-ratio: 1000 / 1510;
  border-radius: 6.5% / 4.3%;
  overflow: hidden;
  background: var(--ink-850);
  box-shadow: 0 0 0 1px rgba(217,178,106,.28), 0 30px 60px -28px rgba(0,0,0,.95), 0 0 80px -30px rgba(217,178,106,.35);
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art.reversed img { transform: rotate(180deg); }
.glow-in { animation: glowIn 1s var(--ease) both; }
@keyframes glowIn { from { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- Question ---------- */
.field {
  width: 100%;
  margin-top: 1.75rem;
  min-height: 7.5rem;
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: 1.1rem;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.4;
  resize: none;
}
.field::placeholder { color: var(--text-3); font-style: italic; }
.field:focus { outline: none; box-shadow: inset 0 0 0 1px var(--gold); }
.field.small { min-height: 3.4rem; font-family: var(--sans); font-size: 1.0625rem; }
.prompts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip {
  padding: .5rem .85rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--text-2);
  font-size: .875rem;
  text-align: left;
  transition: box-shadow .2s, color .2s;
}
.chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.count { margin-top: .4rem; text-align: right; color: var(--text-3); font-size: .8125rem; }

/* ---------- Draw table ---------- */
.view.draw { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; padding-bottom: 0; }
.draw-top { text-align: center; min-height: 5.5rem; }
.draw-top .q { margin: .4rem auto 0; max-width: 26ch; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--text-2); }
.slots {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 0;
  padding: .5rem 0 1.75rem;
}
.slots .slot { max-height: 100%; width: auto; height: min(100%, calc(var(--slot-w, min(11rem, 44vw)) * 1.51)); }
.slot {
  position: relative;
  width: var(--slot-w, min(11rem, 44vw));
  aspect-ratio: 1000/1510;
  border-radius: 6.5% / 4.3%;
}
.slot.empty { box-shadow: inset 0 0 0 1px rgba(217,178,106,.22); background: rgba(255,255,255,.012); }
.slot.empty::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(217,178,106,.35); font-size: .8rem; }
.slot .label { position: absolute; left: 0; right: 0; top: calc(100% + .55rem); text-align: center; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.slot .label b { display: block; margin-top: .15rem; font-family: var(--serif); font-weight: 500; letter-spacing: 0; text-transform: none; font-size: .95rem; color: var(--text); }
.slots.three { --slot-w: min(7.2rem, 27vw); gap: .6rem; }

.flip { position: absolute; inset: 0; perspective: 1400px; cursor: pointer; }
.flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .95s var(--ease); }
.flip.turned .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6.5% / 4.3%; overflow: hidden; box-shadow: 0 0 0 1px rgba(217,178,106,.3), 0 24px 50px -22px rgba(0,0,0,.95); }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face.front { transform: rotateY(180deg); }
.face.front.reversed img { transform: rotate(180deg); }
.flip.turned .face.front { box-shadow: 0 0 0 1px rgba(217,178,106,.4), 0 24px 50px -22px rgba(0,0,0,.95), 0 0 70px -10px rgba(217,178,106,.45); }
.flip:not(.turned) .flip-inner { animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(246,227,176,.28) 50%, transparent 65%); background-size: 250% 100%; animation: shine 1.4s var(--ease) .55s both; mix-blend-mode: screen; }
@keyframes shine { from { background-position: 120% 0; } to { background-position: -40% 0; } }

.hint { min-height: 3rem; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--gold-400); font-size: .9375rem; letter-spacing: .02em; }
.hint.soft { color: var(--text-3); }

.fan {
  position: relative;
  flex: none;
  height: calc(9.5rem + var(--bottom));
  margin: 0 calc(-1 * max(1.25rem, env(safe-area-inset-left)));
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.fan-card {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bottom) - .8rem);
  width: 5.6rem;
  aspect-ratio: 1000/1510;
  margin-left: -2.8rem;
  border-radius: .45rem;
  overflow: hidden;
  transform-origin: 50% 290%;
  transform: rotate(var(--a)) translateY(var(--lift, 0));
  box-shadow: 0 0 0 1px rgba(217,178,106,.3), -6px 8px 16px -8px rgba(0,0,0,.9);
  transition: transform .45s var(--ease), opacity .3s, filter .3s;
}
.fan-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.fan-card.hot { --lift: -1.4rem; filter: brightness(1.15); z-index: 50 !important; }
.fan-card.gone { opacity: 0; pointer-events: none; }
.fan.shuffling .fan-card { transform: rotate(0deg) translateY(1rem); transition-duration: .5s; }
.fan.locked .fan-card { pointer-events: none; }
@media (min-width: 34em) { .fan-card { width: 6.2rem; margin-left: -3.1rem; } .fan { height: calc(10.5rem + var(--bottom)); } }

.flyer { position: fixed; z-index: 80; pointer-events: none; border-radius: .45rem; overflow: hidden; box-shadow: 0 0 0 1px rgba(217,178,106,.35), 0 30px 60px -20px rgba(0,0,0,.9); }
.flyer img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Reading ---------- */
.reading-head { text-align: center; }
.reading-art { width: min(12.5rem, 50vw); margin: .5rem auto 0; }
.reading-row { display: flex; justify-content: center; gap: .6rem; margin-top: .5rem; }
.reading-row .art { width: min(6.6rem, 27vw); }
.card-name { margin: 1.5rem 0 0; font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 9vw, 2.5rem); line-height: 1.1; }
.orient { margin: .2rem 0 0; font-family: var(--serif); font-style: italic; color: var(--gold-400); font-size: 1.15rem; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.tags li { padding: .3rem .75rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: .8125rem; color: var(--text); }
.qline { margin: 1.25rem auto 0; max-width: 30ch; font-family: var(--serif); font-style: italic; color: var(--text-2); font-size: 1.1rem; }
.context { margin: 1rem auto 0; max-width: 34ch; color: var(--text-2); text-align: center; }
.divider { display: flex; align-items: center; gap: .9rem; margin: 2rem 0 1.25rem; color: var(--gold); font-size: .7rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.divider::after { background: linear-gradient(90deg, var(--line), transparent); }
.short { margin: .5rem 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 6vw, 1.6rem); line-height: 1.3; color: var(--gold-300); text-align: center; text-wrap: balance; }
.answer { margin: .4rem 0 0; font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--gold-300); text-align: center; }
.answer-note { margin: .6rem auto 0; max-width: 32ch; text-align: center; color: var(--text-2); }
.prose { margin: 1rem 0 0; color: var(--text); font-size: 1.0625rem; line-height: 1.7; }
.section-block + .section-block { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); }
.section-block .pos { display: flex; align-items: center; gap: .9rem; }
.section-block .pos .art { width: 3.6rem; flex: none; border-radius: .4rem; }
.section-block .pos h3 { margin: .15rem 0 0; font-family: var(--serif); font-weight: 500; font-size: 1.35rem; line-height: 1.15; }
.affirm {
  margin-top: 2.25rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-radius: 1.25rem;
  background: radial-gradient(90% 120% at 50% 0%, rgba(217,178,106,.13), transparent 70%), var(--glass);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.affirm p { margin: .6rem 0 0; font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; }
.reflect { margin-top: 1.25rem; color: var(--text-3); font-size: .8125rem; text-align: center; }
@media (min-width: 52em) {
  .reading-split { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .reading-split .reading-head { position: sticky; top: 2rem; }
  .reading-split .reading-art { width: 100%; max-width: 18rem; }
}

/* ---------- Paywall ---------- */
.paywall { text-align: center; }
.paywall .peek { position: relative; width: 5.6rem; margin: 0 auto; }
.paywall .peek .art { transform: rotate(-6deg); }
.paywall .peek .art + .art { position: absolute; inset: 0; transform: rotate(7deg) translate(18%, 4%); z-index: -1; filter: brightness(.7); }
.benefits { margin: 1.5rem auto 0; padding: 0; list-style: none; text-align: left; max-width: 21rem; }
.benefits li { display: flex; gap: .7rem; align-items: flex-start; padding: .25rem 0; color: var(--text); font-size: .9688rem; line-height: 1.4; }
.benefits svg { width: 1.1rem; height: 1.1rem; flex: none; margin-top: .2rem; color: var(--gold); }
.plans { display: grid; gap: .7rem; margin-top: 1.75rem; text-align: left; }
.plan {
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: box-shadow .2s, background .2s;
}
.plan[aria-checked="true"] { box-shadow: inset 0 0 0 1.5px var(--gold); background: rgba(217,178,106,.07); }
.plan .radio { width: 1.35rem; height: 1.35rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-3); flex: none; display: grid; place-items: center; }
.plan[aria-checked="true"] .radio { box-shadow: inset 0 0 0 1.5px var(--gold); }
.plan[aria-checked="true"] .radio::after { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--gold); }
.plan .what { flex: 1; }
.plan strong { display: block; font-size: 1.0625rem; }
.plan small { display: block; color: var(--text-2); font-size: .875rem; }
.plan .per { text-align: right; }
.plan .per b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.plan .per small { color: var(--text-3); }
.badge { position: absolute; top: -.65rem; right: 1rem; padding: .15rem .6rem; border-radius: 999px; background: var(--gold); color: var(--ink-900); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.timeline { display: flex; justify-content: space-between; gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; text-align: center; }
.timeline li { flex: 1; font-size: .8125rem; color: var(--text-2); }
.timeline b { display: block; color: var(--text); font-weight: 600; font-size: .875rem; }
.timeline i { display: block; width: .55rem; height: .55rem; margin: 0 auto .4rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.timeline li + li i { background: var(--ink-600); box-shadow: inset 0 0 0 1px var(--gold-600); }
.pay-cta { position: sticky; bottom: 0; margin: 1.25rem calc(-1 * max(1.25rem, env(safe-area-inset-left))) 0; padding: .75rem max(1.25rem, env(safe-area-inset-left)) calc(var(--bottom) + .75rem); z-index: 5; background: linear-gradient(180deg, rgba(8,9,12,0), rgba(8,9,12,.92) 30%); }
.pay-note { margin: .5rem 0 0; color: var(--text-2); font-size: .875rem; }
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 .25rem; margin-top: .75rem; }
.legal-links a, .legal-links button { color: var(--text-3); font-size: .8125rem; text-decoration: none; padding: .5rem .5rem; }
.legal-links a:hover, .legal-links button:hover { color: var(--text-2); }

/* ---------- Home ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; }
.greet { margin: 1.25rem 0 0; font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 8vw, 2.3rem); line-height: 1.1; }
.moonline { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; color: var(--text-2); font-size: .9375rem; }
.moonline svg { width: 1.05rem; height: 1.05rem; color: var(--gold); }
.panel {
  position: relative;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 1.4rem;
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  box-shadow: inset 0 0 0 1px var(--line-soft);
  text-align: left;
  display: block;
  width: 100%;
}
button.panel { transition: transform .2s var(--ease), box-shadow .2s; }
button.panel:hover { box-shadow: inset 0 0 0 1px var(--line); }
button.panel:active { transform: scale(.985); }
.tonight { display: flex; gap: 1.1rem; align-items: center; background: radial-gradient(120% 100% at 0% 0%, rgba(217,178,106,.14), transparent 60%), linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.012)); }
.tonight .art { width: 5.4rem; flex: none; border-radius: .5rem; }
.tonight h3 { margin: .3rem 0 0; font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.15; }
.tonight p { margin: .35rem 0 0; color: var(--text-2); font-size: .9375rem; line-height: 1.45; }
.tonight .streak { margin-top: .5rem; color: var(--gold-400); font-size: .8125rem; }
.ask { display: flex; align-items: center; gap: .9rem; }
.ask .orb { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(217,178,106,.12); color: var(--gold); }
.ask .orb svg { width: 1.2rem; height: 1.2rem; }
.ask strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.ask span { color: var(--text-2); font-size: .9rem; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 2.25rem; }
.row-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.35rem; }
.row-head button { color: var(--gold-400); font-size: .9375rem; min-height: 2.75rem; padding: 0 .25rem; }
.spreads { display: grid; grid-auto-flow: column; grid-auto-columns: 10.5rem; gap: .75rem; overflow-x: auto; margin: .75rem calc(-1 * max(1.25rem, env(safe-area-inset-left))) 0; padding: .25rem max(1.25rem, env(safe-area-inset-left)) .5rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.spreads::-webkit-scrollbar { display: none; }
.spread { scroll-snap-align: start; display: flex; flex-direction: column; gap: .35rem; padding: 1rem; min-height: 10.5rem; text-align: left; border-radius: 1.2rem; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-soft); transition: transform .2s var(--ease), box-shadow .2s; }
.spread:hover { box-shadow: inset 0 0 0 1px var(--line); }
.spread:active { transform: scale(.97); }
.spread svg { width: 3.2rem; height: 2.4rem; color: var(--gold); margin-bottom: auto; }
.spread strong { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; line-height: 1.2; }
.spread span { color: var(--text-3); font-size: .8125rem; }
.lock { display: inline-flex; align-items: center; gap: .3rem; color: var(--gold-400); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.lock svg { width: .8rem; height: .8rem; }
.entries { display: flex; flex-direction: column; margin-top: .5rem; }
.entry { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; text-align: left; border-bottom: 1px solid var(--line-soft); }
.entry .art { width: 2.6rem; flex: none; border-radius: .3rem; }
.entry .meta { flex: 1; min-width: 0; }
.entry strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry span { display: block; color: var(--text-3); font-size: .8125rem; }
.entry em { display: block; color: var(--text-2); font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-note { padding: 1.25rem 0; color: var(--text-3); font-size: .9375rem; }
.library-teaser { display: flex; align-items: center; gap: 1rem; }
.library-teaser .fanlet { position: relative; width: 4.6rem; height: 4.4rem; flex: none; }
.library-teaser .fanlet .art { position: absolute; width: 2.5rem; bottom: 0; left: 1rem; border-radius: .25rem; }
.library-teaser .fanlet .art:nth-child(1) { transform: rotate(-14deg) translateX(-1rem); }
.library-teaser .fanlet .art:nth-child(3) { transform: rotate(14deg) translateX(1rem); }
.library-teaser strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.2rem; }
.library-teaser span { color: var(--text-2); font-size: .9rem; }

.app-promo { display: flex; gap: 1rem; align-items: center; margin-top: 2.25rem; }
.app-promo img.icon { width: 3.6rem; height: 3.6rem; border-radius: 22%; box-shadow: 0 0 0 1px var(--line); flex: none; }
.app-promo strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.app-promo span { display: block; color: var(--text-2); font-size: .875rem; line-height: 1.45; }
.app-promo a.store img { width: 120px; height: 40px; margin-top: .6rem; }
.app-promo .notify-link { display: inline-block; margin-top: .45rem; font-size: .9rem; font-weight: 600; }

.home-foot { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .5rem; }
.home-foot a, .home-foot button { color: var(--text-3); font-size: .875rem; padding: .6rem .5rem; text-decoration: none; }
.home-foot a:hover, .home-foot button:hover { color: var(--text-2); }

/* ---------- Library ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem .7rem; margin-top: 1.5rem; }
@media (min-width: 34em) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid button { text-align: center; animation: rise .5s var(--ease) both; }
.grid .art { border-radius: .5rem; transition: transform .25s var(--ease); }
.grid button:hover .art { transform: translateY(-3px); }
.grid small { display: block; margin-top: .45rem; color: var(--text-3); font-size: .7rem; letter-spacing: .12em; }
.grid b { display: block; font-family: var(--serif); font-weight: 500; font-size: .95rem; line-height: 1.2; }
.toggle { display: inline-flex; margin: 1.5rem auto 0; padding: .25rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-soft); }
.toggle button { padding: .45rem 1rem; border-radius: 999px; font-size: .875rem; color: var(--text-2); }
.toggle button[aria-pressed="true"] { background: rgba(217,178,106,.15); color: var(--gold-300); }
.locked-copy { position: relative; }
.locked-copy .prose { filter: blur(5px); user-select: none; -webkit-user-select: none; }
.locked-copy .unlock { position: absolute; inset: 0; display: grid; place-items: center; }

/* ---------- Journal ---------- */
.month { display: grid; grid-template-columns: repeat(7, 1.9rem); justify-content: space-between; gap: .45rem 0; margin-top: 1rem; max-width: 20rem; }
.month i { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .7rem; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line-soft); }
.month i.has { background: rgba(217,178,106,.18); color: var(--gold-300); box-shadow: inset 0 0 0 1px var(--gold-600); }
.month i.today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.note-box { margin-top: 1.5rem; }
.note-box label { display: block; margin-bottom: .5rem; }
.danger { color: #E4A0A0; }

/* ---------- Settings ---------- */
.list { margin-top: 1.5rem; border-radius: 1.2rem; box-shadow: inset 0 0 0 1px var(--line-soft); overflow: hidden; }
.list > * { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; text-align: left; text-decoration: none; color: var(--text); }
.list > * + * { border-top: 1px solid var(--line-soft); }
.list span { color: var(--text-3); font-size: .9rem; }
.switch { position: relative; width: 3rem; height: 1.8rem; border-radius: 999px; background: var(--ink-600); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ivory); transition: transform .25s var(--spring); }
.switch[aria-checked="true"] { background: var(--gold); }
.switch[aria-checked="true"]::after { transform: translateX(1.2rem); }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(5,6,8,.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 30rem; padding: 1.5rem max(1.25rem, env(safe-area-inset-left)) calc(var(--bottom) + 1.5rem); border-radius: 1.6rem 1.6rem 0 0; background: var(--ink-800); box-shadow: inset 0 1px 0 var(--line); animation: up .4s var(--ease) both; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.6rem; }
.sheet p { color: var(--text-2); }
@media (min-width: 34em) { .scrim { align-items: center; } .sheet { border-radius: 1.6rem; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 1.25rem); z-index: 100; max-width: calc(100% - 2.5rem); padding: .8rem 1.2rem; border-radius: 999px; background: var(--ink-700); box-shadow: inset 0 0 0 1px var(--line), 0 20px 40px -15px rgba(0,0,0,.9); color: var(--text); font-size: .9375rem; transform: translate(-50%, 150%); opacity: 0; transition: transform .45s var(--ease), opacity .3s; pointer-events: none; text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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