/* Luminous: The 7-Day Reset
   Morning light on marble. Every animation moves only transform and opacity,
   so it stays smooth on older phones. */

/* ---------- colors ---------- */
:root {
  --bg: #F7F3EC;            /* marble */
  --bg-rgb: 247, 243, 236;
  --surface: #FFFDF8;       /* paper */
  --soft: #ECE4D6;          /* linen */
  --text: #1B2440;          /* ink navy */
  --text-soft: #454C63;
  --gold: #7A5B22;          /* bronze: gold that is dark enough to read */
  --leafc: #56613F;         /* olive */
  --light: 227, 200, 143;   /* champagne, the light itself */
  --btn: #1B2440;
  --on-btn: #F7F3EC;
  --line: rgba(27, 36, 64, 0.11);
  --line-strong: rgba(27, 36, 64, 0.22);
  --field-edge: rgba(27, 36, 64, 0.55);   /* text box edges, at least 3:1 against the paper */
  --paper-edge: rgba(122, 91, 34, 0.16);
  --card-shadow: 0 1px 1px rgba(27, 36, 64, 0.04), 0 16px 36px -20px rgba(27, 36, 64, 0.24);
  --petal: #FFFDF8; --petal-edge: #CBBB9A; --vein: #E7DCC6;
  --stem: #56613F; --sepal: #6F7A55;
  --disc: #E3B85C; --disc-edge: #B98C35; --disc-dot: #A87B2C;
  --vase: #EDE5D6; --vase-edge: #C4B79F; --vase-hi: #F8F4EC; --speck: #B3A58B; --vase-shadow: #6B5A3E;
  --develop-a: #FFF9EC; --develop-b: #F3E3C1;
  --pool-a: 255, 244, 214; --pool-a-o: 0.8;
  --pool-b: 236, 196, 128; --pool-b-o: 0.42;
  --leaf-o: 0.15; --leaf-filter: none;
  --seal-a: #F2DDAE; --seal-b: #D2AE68; --seal-c: #B48B42;
  --radius-lg: 24px;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10162A; --bg-rgb: 16, 22, 42; --surface: #1A2238; --soft: #232B46; --text: #F2EBDD; --text-soft: #C9C2B4; --gold: #DDBF83; --leafc: #A9B290;
    --btn: #E3C88F; --on-btn: #10162A; --line: rgba(242, 235, 221, 0.12); --line-strong: rgba(242, 235, 221, 0.24); --field-edge: rgba(242, 235, 221, 0.5);
    --paper-edge: rgba(227, 200, 143, 0.16); --card-shadow: 0 1px 1px rgba(0, 0, 0, 0.25), 0 20px 40px -22px rgba(0, 0, 0, 0.7);
    --petal: #F5EFE3; --petal-edge: #A4977A; --vein: #DDD1B9; --stem: #8E9A73; --sepal: #7C8860;
    --vase: #D8CEBB; --vase-edge: #A69A82; --vase-hi: #E7DFD0; --speck: #968A73; --vase-shadow: #000;
    --develop-a: #3B3429; --develop-b: #242B42;
    --pool-a: 227, 196, 132; --pool-a-o: 0.2; --pool-b: 214, 160, 92; --pool-b-o: 0.16;
    --leaf-o: 0.42; --leaf-filter: brightness(0);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10162A; --bg-rgb: 16, 22, 42; --surface: #1A2238; --soft: #232B46; --text: #F2EBDD; --text-soft: #C9C2B4; --gold: #DDBF83; --leafc: #A9B290;
  --btn: #E3C88F; --on-btn: #10162A; --line: rgba(242, 235, 221, 0.12); --line-strong: rgba(242, 235, 221, 0.24); --field-edge: rgba(242, 235, 221, 0.5);
  --paper-edge: rgba(227, 200, 143, 0.16); --card-shadow: 0 1px 1px rgba(0, 0, 0, 0.25), 0 20px 40px -22px rgba(0, 0, 0, 0.7);
  --petal: #F5EFE3; --petal-edge: #A4977A; --vein: #DDD1B9; --stem: #8E9A73; --sepal: #7C8860;
  --vase: #D8CEBB; --vase-edge: #A69A82; --vase-hi: #E7DFD0; --speck: #968A73; --vase-shadow: #000;
  --develop-a: #3B3429; --develop-b: #242B42;
  --pool-a: 227, 196, 132; --pool-a-o: 0.2; --pool-b: 214, 160, 92; --pool-b-o: 0.16;
  --leaf-o: 0.42; --leaf-filter: brightness(0);
  color-scheme: dark;
}

/* The light follows the clock on most pages: dawn, day, golden hour, night. */
:root[data-phase="dawn"] { --pool-a: 250, 222, 170; --pool-b: 240, 214, 172; }
:root[data-phase="golden"] { --pool-a: 244, 205, 140; --pool-b: 232, 170, 96; --pool-b-o: 0.5; }
:root[data-phase="night"] { --pool-a: 205, 214, 234; --pool-a-o: 0.6; --pool-b: 27, 36, 64; --pool-b-o: 0.07; --leaf-o: 0.07; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-phase="night"] { --pool-a: 168, 186, 226; --pool-a-o: 0.13; --pool-b: 214, 160, 92; --pool-b-o: 0.06; --leaf-o: 0.25; }
  :root:not([data-theme="light"])[data-phase="golden"] { --pool-b-o: 0.22; }
}
:root[data-theme="dark"][data-phase="night"] { --pool-a: 168, 186, 226; --pool-a-o: 0.13; --pool-b: 214, 160, 92; --pool-b-o: 0.06; --leaf-o: 0.25; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 18px/1.62 "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
p { margin: 0 0 14px; }
#app {
  position: relative; max-width: 580px; margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-right));
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
:focus:not(:focus-visible) { outline: none; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: "Newsreader", Georgia, serif; font-optical-sizing: auto; font-weight: 400; margin: 0; letter-spacing: -0.005em; }
.h1 { font-size: clamp(34px, 9.6vw, 44px); line-height: 1.06; }
h2 { font-size: 30px; line-height: 1.15; }
h3 { font-size: 23px; line-height: 1.22; font-weight: 500; }
.label { font: 600 15px/1.3 "Figtree", sans-serif; color: var(--gold); margin: 0 0 8px; letter-spacing: 0.005em; }
.lede { color: var(--text-soft); font-size: 18px; }
.fine { color: var(--text-soft); font-size: 15px; line-height: 1.5; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px; border: 0; border-radius: 999px; background: var(--btn); color: var(--on-btn);
  font: 600 17px/1.1 "Figtree", sans-serif; text-decoration: none; text-align: center; cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: -10px; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--light), 0.6), rgba(var(--light), 0)); opacity: 0; transition: opacity 0.4s var(--ease);
}
.btn:active { transform: scale(0.975); }
.btn:active::after { opacity: 1; }
@media (hover: hover) { .btn:hover::after { opacity: 0.8; } }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn.wide { width: 100%; }
.quiet { color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 16px; }
@media (hover: hover) { .quiet:hover { color: var(--text); } }

/* ---------- header and footer ---------- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px;
  min-height: 64px; padding-top: env(safe-area-inset-top, 0px); position: relative; z-index: 2;
}
.brand { display: inline-flex; align-items: center; gap: 6px; min-height: 52px; color: var(--text); text-decoration: none; }
.brand-word { font: italic 400 24px/1 "Newsreader", Georgia, serif; letter-spacing: -0.01em; }
.brand-mark { display: block; width: 30px; height: 27px; }
.brand-mark .cosmos { width: 100%; height: 100%; }
.nav { display: flex; align-items: center; gap: 0 20px; }
.nav-link { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 16px; white-space: nowrap; }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 2px; border-radius: 2px; background: rgb(var(--light)); }
@media (hover: hover) { .nav-link:hover { color: var(--text); } }
@media (max-width: 479px) {
  .top { justify-content: center; }
  .brand { width: 100%; justify-content: center; }
  .nav { width: 100%; justify-content: center; gap: 0 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
}
.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; color: var(--text-soft); font-size: 15px; line-height: 1.5; }
.foot p { margin: 0 0 6px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 600; }
.fine a, .r-links a, .aff-line a, .quiet { position: relative; }
.fine a::after, .r-links a::after, .aff-line a::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; margin-top: -22px; }

/* ---------- the light: sky pools, olive leaves, sun arc ---------- */
.sky { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; z-index: -1; pointer-events: none; overflow: hidden; }
.pool { position: absolute; border-radius: 50%; will-change: transform, opacity; }
.pool-a {
  width: min(130vw, 1100px); height: min(95vh, 860px); right: max(-45vw, -380px); top: max(-40vh, -360px);
  background: radial-gradient(closest-side, rgba(var(--pool-a), 1), rgba(var(--pool-a), 0.45) 45%, rgba(var(--pool-a), 0) 100%);
  opacity: var(--pool-a-o);
}
.pool-b {
  width: min(120vw, 980px); height: min(80vh, 760px); left: max(-50vw, -420px); top: 18vh;
  background: radial-gradient(closest-side, rgba(var(--pool-b), 1), rgba(var(--pool-b), 0.4) 50%, rgba(var(--pool-b), 0) 100%);
  opacity: var(--pool-b-o);
}
:root[data-phase="golden"] .pool-b { top: 40vh; left: auto; right: max(-55vw, -440px); }
:root[data-phase="night"] .pool-a { right: auto; left: max(-50vw, -420px); }

.canopy { position: absolute; top: 0; right: 0; width: min(100%, 760px); height: 560px; z-index: -1; pointer-events: none; overflow: hidden; }
.canopy img { position: absolute; max-width: none; opacity: var(--leaf-o); filter: var(--leaf-filter); will-change: transform; }
.canopy .l1 { width: 560px; height: auto; top: -54px; right: -70px; transform-origin: 100% 0; animation: sway-a 10s ease-in-out infinite alternate; }
.canopy .l2 { width: 400px; height: auto; top: 110px; right: -150px; opacity: calc(var(--leaf-o) * 0.6); transform-origin: 100% 10%; animation: sway-b 13s ease-in-out infinite alternate; }
.canopy.paused img { animation-play-state: paused; }
@keyframes sway-a { from { transform: rotate(-1.4deg) translate3d(0, 0, 0); } to { transform: rotate(1.6deg) translate3d(-6px, 4px, 0); } }
@keyframes sway-b { from { transform: rotate(1.8deg) scaleX(-1); } to { transform: rotate(-1.2deg) scaleX(-1); } }

.sunarc { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 16px; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease); }
.sunarc.on { opacity: 1; }
.sunarc::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-1 * env(safe-area-inset-top, 0px)); bottom: -14px; background: linear-gradient(rgba(var(--bg-rgb), 0.94) 50%, rgba(var(--bg-rgb), 0)); }
.sunarc svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sunarc path { fill: none; stroke: var(--gold); stroke-opacity: 0.28; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 5; }
.sunarc-dot {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, #FFF6DC 0%, rgba(var(--light), 0.95) 38%, rgba(var(--light), 0) 100%);
}

.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 5; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, rgba(var(--light), 0.3), rgb(var(--light))); }

/* ---------- the cosmos ---------- */
.cosmos { position: relative; }
.cosmos-plant, .cosmos-vase { position: absolute; inset: 0; }
.cosmos-plant { transform-origin: 50% 77%; }
.cosmos svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cosmos-plant svg { overflow: visible; }
.c-stem { fill: none; stroke: var(--stem); stroke-width: 2.2; stroke-linecap: round; }
.c-leaf path { fill: none; stroke: var(--stem); stroke-width: 1.2; stroke-linecap: round; }
.c-sepal { fill: var(--sepal); stroke: var(--stem); stroke-width: 0.7; vector-effect: non-scaling-stroke; }
.c-petal-shape { fill: var(--petal); stroke: var(--petal-edge); stroke-width: 0.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.c-vein { fill: none; stroke: var(--vein); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.c-disc-fill { fill: var(--disc); stroke: var(--disc-edge); stroke-width: 0.7; vector-effect: non-scaling-stroke; }
.c-dot { fill: var(--disc-dot); }
.c-halo { opacity: 0.14; }
.c-pulse { opacity: 0; transform-box: fill-box; transform-origin: center; }
.c-vase { fill: var(--vase); stroke: var(--vase-edge); stroke-width: 0.9; }
.c-vase-hi { fill: var(--vase-hi); }
.c-vase-lip { fill: var(--vase-hi); stroke: var(--vase-edge); stroke-width: 0.7; }
.c-speck { fill: var(--speck); }
.cosmos.is-mark .c-vein, .cosmos.is-mark .c-dot { display: none; }
.cosmos.is-mark .c-petal-shape { stroke-width: 0.6; }
.cosmos.is-mark svg { transform-origin: 50% 44%; }
.cosmos-motes { position: absolute; inset: 0; pointer-events: none; }
.mote {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, #FFF7E0, rgba(var(--light), 0.9) 45%, rgba(var(--light), 0));
}
.emblem { display: block; width: 100%; height: 100%; }
.emblem .e-petal { fill: rgba(255, 250, 238, 0.5); stroke: rgba(122, 91, 34, 0.6); stroke-width: 1; vector-effect: non-scaling-stroke; }
.emblem .e-disc { fill: rgba(122, 91, 34, 0.35); }

/* ---------- photos that develop in the light ---------- */
.ph { position: relative; overflow: hidden; margin: 0; background: var(--soft); isolation: isolate; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.7s var(--ease); }
.ph-glow {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.3s var(--ease);
  background: radial-gradient(120% 90% at 72% 18%, var(--develop-a) 0%, var(--develop-b) 70%);
}
.ph.ph-wait .ph-glow { opacity: 1; transition: none; }
.ph.ph-wait img { transform: scale(1.07); transition: none; }

/* ---------- reveal on scroll ---------- */
.rv { transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.rv.rv-wait { opacity: 0; transform: translate3d(0, 16px, 0); transition: none; }

/* ---------- welcome ---------- */
.welcome { min-height: calc(100vh - 40px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 0 20px; }
.portrait { position: relative; width: 156px; height: 156px; margin: 0 auto 22px; }
.portrait-halo {
  position: absolute; inset: -46px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--light), 0.75), rgba(var(--light), 0.25) 55%, rgba(var(--light), 0));
}
.portrait .ph { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--paper-edge); }
.welcome .eyebrow { margin: 0; color: var(--text-soft); font-size: 17px; }
.wordmark { font: italic 400 clamp(64px, 19vw, 88px)/1 "Newsreader", Georgia, serif; letter-spacing: -0.02em; margin: 4px 0 6px; text-shadow: 0 0 34px rgba(var(--light), 0.55); }
.wordmark .ch { display: inline-block; }
.subtitle { font: 400 24px/1.2 "Newsreader", Georgia, serif; margin: 0 0 22px; }
.welcome .lede { max-width: 34ch; margin: 0 auto 26px; }
.welcome .btn { min-width: 220px; }
.welcome .fine { max-width: 34ch; margin: 30px auto 0; }

/* the opening sunrise */
.intro .pool-a, .intro .pool-b { opacity: 0; transform: translate3d(0, 14vh, 0); }
.intro .canopy img { opacity: 0; }
.intro .w-in { opacity: 0; transform: translate3d(0, 10px, 0); }
.intro .wordmark .ch { opacity: 0; transform: translate3d(0, 0.12em, 0); }
.intro.go .pool-a, .intro.go .pool-b { transform: none; transition: opacity 1.8s var(--ease), transform 2.2s var(--ease); }
.intro.go .pool-a { opacity: var(--pool-a-o); }
.intro.go .pool-b { opacity: var(--pool-b-o); }
.intro.go .canopy img { opacity: var(--leaf-o); transition: opacity 1.6s ease 0.4s; }
.intro.go .canopy .l2 { opacity: calc(var(--leaf-o) * 0.6); }
.intro.go .w-in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.intro.go .wordmark .ch { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }

/* ---------- focus quiz ---------- */
.quiz { padding-top: 6px; }
.quiz .lede { margin: 14px 0 26px; }
.choices { display: grid; gap: 12px; }
.choice {
  position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; width: 100%;
  min-height: 84px; padding: 16px 18px; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--line); border-radius: 20px; box-shadow: var(--card-shadow);
  transition: transform 0.25s var(--ease);
}
.choice:active { transform: scale(0.985); }
.choice.on { border-color: rgba(var(--light), 0.95); }
.choice .orb { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, #fff 0%, var(--orb) 48%, rgba(255, 255, 255, 0) 100%); box-shadow: inset 0 0 0 1px rgba(122, 91, 34, 0.12); }
.choice .c-label { display: block; font-weight: 600; font-size: 19px; line-height: 1.3; }
.choice .c-cap { display: block; margin-top: 3px; font-size: 16px; line-height: 1.4; color: var(--text-soft); }
.flood { position: fixed; left: 0; top: 0; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; z-index: 30; pointer-events: none; opacity: 0; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 44%; align-items: end; gap: 10px; padding: 4px 0 30px; }
.hero-text { padding-bottom: 6px; }
.hero-text .h1 { margin-bottom: 20px; }
.hero-flower { position: relative; }
.hero-flower .cosmos { width: 100%; aspect-ratio: 200 / 272; cursor: pointer; }
@supports not (aspect-ratio: 1) { .hero-flower .cosmos { height: 0; padding-top: 136%; } }
.hero .btn { padding: 0 26px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); }

/* the rituals */
.rituals { position: relative; padding: 22px 18px 20px; margin: 0 0 34px; }
.rituals-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.rituals-head h2 { font-size: 27px; }
.rituals-head .quiet { white-space: nowrap; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.rlist { list-style: none; margin: 0; padding: 0; }
.r { position: relative; border-top: 1px solid var(--line); }
.r:first-child { border-top: 0; }
.r-row { position: relative; display: flex; align-items: flex-start; gap: 6px; }
.r-wash { position: absolute; inset: 0 -18px; pointer-events: none; opacity: 0; background: linear-gradient(90deg, rgba(var(--light), 0.38), rgba(var(--light), 0.08) 70%, rgba(var(--light), 0)); }
.r-check { position: relative; flex: 0 0 48px; width: 48px; height: 56px; }
.r-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.r-box {
  position: absolute; left: 9px; top: 14px; width: 28px; height: 28px; border-radius: 50%;
  border: 1.6px solid var(--line-strong); background: var(--surface);
}
.r-box::before {
  content: ""; position: absolute; inset: -1.6px; border-radius: 50%; transform: scale(0); opacity: 0;
  background: radial-gradient(circle at 38% 32%, #F6E2B3, #D9B56D 70%, #C29A4E);
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}
.r-box svg { position: absolute; left: 6px; top: 7px; width: 14px; height: 12px; opacity: 0; transform: scale(0.4); transition: opacity 0.3s var(--ease) 0.08s, transform 0.4s var(--ease) 0.08s; }
.r-box svg path { fill: none; stroke: #1B2440; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.r-check input:checked + .r-box { border-color: rgba(var(--light), 0.9); }
.r-check input:checked + .r-box::before { transform: scale(1); opacity: 1; }
.r-check input:checked + .r-box svg { opacity: 1; transform: scale(1); }
.r-check input:focus-visible + .r-box { outline: 3px solid var(--gold); outline-offset: 4px; }
.r-halo {
  position: absolute; left: 1px; top: 6px; width: 44px; height: 44px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(var(--light), 0.95), rgba(var(--light), 0.35) 55%, rgba(var(--light), 0));
}
.r-title {
  flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline;
  min-height: 56px; padding: 15px 0 13px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--text);
}
.r-num { font: 500 17px/1 "Newsreader", Georgia, serif; color: var(--gold); }
.r-name { font-weight: 600; font-size: 18px; line-height: 1.35; }
.r-for { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--gold); }
.r-for::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--light)); box-shadow: 0 0 8px 2px rgba(var(--light), 0.8); }
.r-hint { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.r-hint svg { width: 14px; height: 14px; transition: transform 0.35s var(--ease); }
.r-title[aria-expanded="true"] .r-hint svg { transform: rotate(180deg); }
.r-why { padding: 0 0 16px 54px; }
.r-why p { margin: 0; color: var(--text-soft); font-size: 17px; line-height: 1.6; }
.r-why .btn { margin-top: 14px; min-height: 48px; padding: 0 22px; font-size: 16px; }
.r-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: -4px 0 14px 54px; font-size: 16px; }
.r-links a { display: inline-block; padding: 4px 0; font-weight: 600; }
.r-links .aff-btn { display: inline-flex; padding: 10px 20px; }
.r-links .aff-btn::after { inset: -10px; height: auto; margin-top: 0; }
/* the NMN button: outlined and quiet, never the filled primary style */
.aff-btn { max-width: 100%; min-height: 48px; padding: 10px 20px; font-size: 16px; line-height: 1.35; }
.aff-btn .tag { margin-left: 2px; font-size: 14px; white-space: nowrap; }
.aff-cta { margin: 4px 0 26px; }
.tag { color: var(--text-soft); font-size: 14px; font-weight: 600; }
.aff-pair, .nw { white-space: nowrap; }
.streak { display: flex; align-items: baseline; gap: 8px; margin: 12px 2px 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 16px; line-height: 1.45; }
.streak-n { position: relative; display: inline-block; min-width: 0.6em; overflow: hidden; vertical-align: bottom; font: 500 32px/1.1 "Newsreader", Georgia, serif; color: var(--text); }
.streak-n span { display: inline-block; }
.streak-n span + span { position: absolute; left: 0; top: 0; }
.closing { margin: 14px 2px 0; font: italic 400 18px/1.55 "Newsreader", Georgia, serif; color: var(--text-soft); }
.ribbon-dot {
  position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, #FFF8E4, rgba(var(--light), 0.95) 40%, rgba(var(--light), 0));
}
.spark {
  position: fixed; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; pointer-events: none; z-index: 40;
  background: radial-gradient(closest-side, #FFF9E6, rgba(var(--light), 0.95) 40%, rgba(var(--light), 0));
}
.r.shimmer .r-wash { animation: shimmer 1.6s var(--ease) both; }
@keyframes shimmer { 0% { opacity: 0; transform: translateX(-30%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(20%); } }

/* the seven days, as a thread of light */
.week h2 { margin: 0 0 14px; }
.thread-wrap { position: relative; }
.thread { list-style: none; margin: 0; padding: 0; }
.thread-track, .thread-fill { position: absolute; left: 15px; top: 30px; width: 2px; border-radius: 2px; }
.thread-track { bottom: 30px; background: var(--line-strong); }
.thread-fill { height: 0; transform-origin: 50% 0; background: linear-gradient(rgba(var(--light), 0.6), rgb(var(--light))); box-shadow: 0 0 10px rgba(var(--light), 0.7); }
.d-row { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; align-items: center; min-height: 60px; padding: 8px 0; color: var(--text); text-decoration: none; }
a.d-row { cursor: pointer; }
.node { position: relative; justify-self: center; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 1.6px solid var(--line-strong); z-index: 1; }
.is-past .node { background: rgb(var(--light)); border-color: rgb(var(--light)); }
.is-today .node { width: 20px; height: 20px; background: #FFF6DE; border: 0; box-shadow: 0 0 0 3px rgba(var(--light), 0.9), 0 0 16px 6px rgba(var(--light), 0.75); }
.node-glow { position: absolute; inset: -12px; border-radius: 50%; opacity: 0; background: radial-gradient(closest-side, rgba(var(--light), 0.9), rgba(var(--light), 0)); }
.d-n { display: block; font-weight: 600; font-size: 15px; color: var(--gold); line-height: 1.3; }
.d-t { display: block; font: 400 21px/1.25 "Newsreader", Georgia, serif; }
.is-ahead .d-n { color: var(--text-soft); }
.d-row .d-arrow { position: absolute; right: 2px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--text-soft); opacity: 0.6; }

/* ---------- day page ---------- */
.day-head { display: grid; grid-template-columns: minmax(0, 1fr) 44%; align-items: end; gap: 16px; padding: 6px 0 4px; }
.day-head .h1 { font-size: clamp(32px, 9vw, 42px); view-transition-name: day-title; }
.day-photo { border-radius: 20px; aspect-ratio: 4 / 5; box-shadow: var(--card-shadow); }
@supports not (aspect-ratio: 1) { .day-photo { height: 0; padding-top: 125%; } .day-photo img { position: absolute; inset: 0; } .day-photo.is-wide { padding-top: 38.06%; } }
.day-head.is-wide { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.day-head.is-wide .day-photo { order: -1; aspect-ratio: 1440 / 548; border-radius: 18px; }

.letter { position: relative; margin: 30px 0 36px; perspective: 1500px; }
.letter .paper { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.panel { position: absolute; left: 0; right: 0; height: calc(33.34% + 1px); background: var(--surface); box-shadow: var(--card-shadow); }
.panel.pa { top: 0; border-radius: 22px 22px 2px 2px; border: 1px solid var(--paper-edge); border-bottom: 0; transform-origin: 50% 100%; }
.panel.pb { top: 33.33%; border-left: 1px solid var(--paper-edge); border-right: 1px solid var(--paper-edge); box-shadow: var(--card-shadow), inset 0 1px 0 rgba(122, 91, 34, 0.08); }
.panel.pc { bottom: 0; border-radius: 2px 2px 22px 22px; border: 1px solid var(--paper-edge); border-top: 0; transform-origin: 50% 0; box-shadow: var(--card-shadow), inset 0 1px 0 rgba(122, 91, 34, 0.08); }
.panel .shade { position: absolute; inset: 0; border-radius: inherit; opacity: 0; background: linear-gradient(rgba(27, 36, 64, 0.1), rgba(27, 36, 64, 0.02)); }
.letter-text { position: relative; z-index: 1; padding: 30px 26px 32px; }
.letter-body { margin: 0; font: italic 400 21px/1.62 "Newsreader", Georgia, serif; }
.letter .s { transition: opacity 1s var(--ease); }
.letter-light { position: absolute; left: 6%; right: 6%; top: 0; height: 150px; margin-top: -75px; z-index: 2; pointer-events: none; opacity: 0; background: radial-gradient(closest-side, rgba(var(--light), 0.5), rgba(var(--light), 0)); }
.seal {
  position: absolute; left: 50%; top: 66.66%; width: 48px; height: 48px; margin: -30px 0 0 -24px; z-index: 3; border-radius: 50%;
  display: grid; place-items: center; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 36% 30%, var(--seal-a), var(--seal-b) 62%, var(--seal-c));
  box-shadow: 0 3px 8px rgba(122, 91, 34, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.seal .emblem { width: 32px; height: 32px; }
.letter.is-folded .pa { transform: rotateX(-180deg) translateZ(-1px); }
.letter.is-folded .pc { transform: rotateX(180deg) translateZ(-0.5px); }
.letter.is-folded .shade { opacity: 1; }
.letter.is-folded .seal { opacity: 1; }
.letter.is-folded .letter-text, .letter.is-writing .s { opacity: 0; }
.letter.is-writing .letter-label { opacity: 0; }
.letter .letter-label { transition: opacity 0.8s var(--ease); }
.letter .s.in, .letter .letter-label.in { opacity: 1; }
.letter.is-instant .s, .letter.is-instant .letter-label { transition: none; }
.letter.is-sealed { text-align: center; perspective: none; }
.sealed { position: relative; width: min(260px, 78%); height: 128px; margin: 16px auto 40px; }
.sealed-paper { position: absolute; inset: 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--paper-edge); box-shadow: var(--card-shadow); }
.sealed-paper::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(122, 91, 34, 0.12); }
.sealed::after { content: ""; position: absolute; left: 50%; bottom: -44px; width: 96px; height: 96px; margin-left: -48px; z-index: 2; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(var(--light), 0.75), rgba(var(--light), 0)); animation: seal-glow 4.5s ease-in-out infinite alternate; }
.sealed .seal { top: auto; bottom: -24px; margin: 0 0 0 -24px; opacity: 1; }
.sealed-msg { max-width: 30ch; margin: 0 auto; font: italic 400 21px/1.5 "Newsreader", Georgia, serif; }
.note-next { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 34ch; margin: -14px auto 36px; font: italic 400 19px/1.45 "Newsreader", Georgia, serif; color: var(--text-soft); transition: opacity 1s var(--ease); }
.note-next-seal { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 36% 30%, var(--seal-a), var(--seal-b) 62%, var(--seal-c)); box-shadow: 0 2px 6px rgba(122, 91, 34, 0.3); }
.note-next-seal .emblem { width: 22px; height: 22px; }
.letter.is-writing + .note-next { opacity: 0; }
@keyframes seal-glow { from { opacity: 0.35; } to { opacity: 0.95; } }
.letter.is-fading { animation: fade-in 0.7s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }

.day-block { margin: 0 0 30px; }
.why-today p:last-child { margin: 0; }
.affirm-wrap { position: relative; margin: 8px 0 34px; padding: 26px 22px 28px; border-radius: var(--radius-lg); }
.affirm-glow { position: absolute; inset: -10px -20px; z-index: -1; pointer-events: none; opacity: 0.55; background: radial-gradient(60% 70% at 50% 50%, rgba(var(--light), 0.55), rgba(var(--light), 0)); transition: opacity 1.4s var(--ease); }
.affirm { margin: 0; font: 400 clamp(25px, 7vw, 30px)/1.3 "Newsreader", Georgia, serif; }
.affirm .w { transition: opacity 0.8s var(--ease); }
.affirm-wrap.is-waiting .w { opacity: 0; }
.affirm-wrap.is-waiting .affirm-glow { opacity: 0; }
.affirm-wrap .w.in { opacity: 1; }
.intention p:last-child { margin: 0; font-size: 19px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 44px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-head .meta { color: var(--text-soft); font-size: 16px; }
.intro-text { color: var(--text-soft); }
.safety { position: relative; margin: 0 0 18px; padding: 16px 18px 16px 50px; border-radius: 16px; background: var(--soft); font-size: 16px; line-height: 1.55; }
.safety svg { position: absolute; left: 16px; top: 17px; width: 22px; height: 22px; color: var(--gold); }

.ex, .meal { margin: 16px 0 22px; overflow: hidden; }
.ex-body, .meal-body { padding: 18px 20px 22px; }
.ex-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.reps { flex: 0 0 auto; padding: 4px 12px; border-radius: 999px; background: var(--soft); font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap; }
.ex p, .meal p { font-size: 17px; }
.run { font-weight: 600; color: var(--text); }
.ex .cue, .ex .ex-why { color: var(--text-soft); }
.ex p:last-child, .meal-body > :last-child { margin-bottom: 0; }

/* Exercise photos: the start and finish positions fade into each other, forever, in pure CSS,
   so the motion keeps going while the page scrolls. Each half is shown whole (600 x 805). */
.demo { position: relative; display: block; margin: 0; aspect-ratio: 600 / 805; overflow: hidden; background: var(--soft); --ka: 1; --kb: 1; --ax: 0%; --ay: 0%; --bx: 0%; --by: 0%; }
@supports not (aspect-ratio: 1) { .demo { height: 0; padding-top: 134.17%; } }
.demo-a, .demo-b { position: absolute; inset: 0; overflow: hidden; }
.demo .demo-a img, .demo .demo-b img { position: absolute; top: 0; left: 0; width: 200%; max-width: none; height: auto; transition: none; }
.demo .demo-a img { transform-origin: 25% 50%; transform: translate(var(--ax), var(--ay)) scale(var(--ka)); }
.demo .demo-b img { transform-origin: 75% 50%; transform: translate(calc(-50% + var(--bx)), var(--by)) scale(var(--kb)); }
.demo-b { opacity: 0; will-change: opacity; animation: demo-fade 5.6s infinite; }
@keyframes demo-fade {
  0%, 14% { opacity: 0; animation-timing-function: ease-in-out; }
  40%, 60% { opacity: 1; animation-timing-function: ease-in-out; }
  86%, 100% { opacity: 0; }
}

.meal .ph, .ex .ex-photo { aspect-ratio: 1200 / 805; }
@supports not (aspect-ratio: 1) { .meal .ph, .ex .ex-photo { height: 0; padding-top: 67.08%; } .meal .ph img, .ex .ex-photo img { position: absolute; inset: 0; } }
.meal h3 { margin: 0 0 8px; }
.meal-intro { font-style: italic; color: var(--text-soft); }
.meal-why { color: var(--text-soft); }
.seg {
  position: relative; display: inline-grid; grid-template-columns: repeat(3, minmax(76px, 1fr)); margin: 6px 0 14px; padding: 4px;
  border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
}
.seg-pill { position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc((100% - 8px) / 3); border-radius: 999px; background: var(--btn); transition: transform 0.45s var(--ease); }
.seg[data-sel="full"] .seg-pill { transform: translateX(100%); }
.seg[data-sel="double"] .seg-pill { transform: translateX(200%); }
.seg button { position: relative; z-index: 1; min-height: 44px; padding: 0 14px; border: 0; background: none; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 16px; color: var(--text-soft); }
.seg button[aria-checked="true"] { color: var(--on-btn); }
.ing { list-style: none; margin: 0 0 18px; padding: 0; font-size: 17px; }
.ing li { padding: 8px 0; border-top: 1px dashed var(--line-strong); }
.ing li:first-child { border-top: 0; }
.ing .amt { display: inline-block; font-weight: 600; }
.steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: step; font-size: 17px; }
.steps li { position: relative; margin: 0 0 10px; padding-left: 40px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font: 500 16px/1 "Newsreader", Georgia, serif; color: var(--gold); }
.tip { margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--soft); font-size: 16px; }
.veg { color: var(--text-soft); font-size: 16px; }

.shop-link-wrap { margin: 0 0 14px; }
.shop-link { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--text); font-weight: 600; font-size: 16px; text-decoration: none; }
.shop-link svg { width: 20px; height: 20px; color: var(--gold); }
.day-nav { margin: 40px 0 0; text-align: center; }
.day-nav .btn { min-width: 250px; }

/* ---------- finish, about, learn ---------- */
.finish { text-align: center; padding-top: 4px; }
.finish-flower { width: 210px; margin: 0 auto 6px; }
.finish-flower .cosmos { width: 100%; aspect-ratio: 200 / 272; cursor: pointer; }
@supports not (aspect-ratio: 1) { .finish-flower .cosmos { height: 0; padding-top: 136%; } }
.finish .lede { margin: 16px auto 8px; max-width: 36ch; }
.big-streak { margin: 26px auto 30px; }
.big-streak .streak-n { font-size: 84px; line-height: 1; overflow: hidden; text-shadow: 0 0 40px rgba(var(--light), 0.6); }
.big-streak p { margin: 6px auto 0; color: var(--text-soft); max-width: 30ch; }
.finish > .btn { display: flex; width: 100%; max-width: 330px; margin: 12px auto; }
/* the waitlist and NMN cards: quieter than the celebration above them */
.fin-card { margin: 44px 0 0; padding: 26px 22px 24px; text-align: left; }
.fin-card + .fin-card { margin-top: 22px; }
.fin-card h2 { font-size: 27px; margin: 0 0 12px; text-wrap: balance; }
.wl-form { margin: 18px 0 0; }
.wl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.wl-input {
  flex: 999 1 200px; min-width: 0; min-height: 54px; padding: 0 22px; border: 1.5px solid var(--field-edge); border-radius: 999px;
  background: var(--bg); color: var(--text); font: 400 17px/1.2 "Figtree", sans-serif; -webkit-appearance: none; appearance: none;
}
.wl-input::placeholder { color: var(--text-soft); opacity: 1; }
.wl-input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 999px; }
.wl-btn { flex: 1 1 auto; }
.wl-btn[disabled] { opacity: 0.6; cursor: default; }
.wl-msg { margin: 14px 0 0; color: var(--text); }
.wl-msg:empty { margin: 0; }
.wl-msg:focus { outline: none; }
.wl-msg.is-done { margin-top: 20px; font: 400 26px/1.2 "Newsreader", Georgia, serif; }
.wl-fine { margin: 12px 0 0; }
.fin-nmn .aff-cta { margin: 18px 0 0; }



.about { padding-top: 6px; }
.about .portrait { width: 132px; height: 132px; margin: 8px 0 26px; }
.about .portrait-halo { inset: -38px; }
.about .h1 { margin-bottom: 12px; }
.about h2 { font-size: 28px; margin: 36px 0 12px; }
.creator { position: relative; margin: 26px 0 8px; padding: 26px 24px 28px; }
.creator h2 { margin: 0 0 14px; }
.creator p { color: var(--text); }
.signoff { margin: 20px 0 0; }
.signoff .with { margin: 0 0 2px; font-style: italic; color: var(--text-soft); }
.signature { position: relative; display: inline-block; margin: 0; font: italic 400 34px/1.1 "Newsreader", Georgia, serif; }
.sig-cover { position: absolute; top: -6px; bottom: -6px; left: -8px; width: calc(100% + 60px); pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, var(--surface) 44px); }
.aff-line { font-size: 17px; }
.aff-line a { font-weight: 600; }
.privacy b { color: var(--text); }

.learn { padding-top: 6px; }
.learn .h1 { font-size: clamp(32px, 8.6vw, 40px); margin-bottom: 26px; }
.learn p { font-size: 18px; }
.learn p b { font-weight: 600; }
.learn .aff-cta { margin: 26px 0 22px; }
.fda { font-style: italic; color: var(--text-soft); font-size: 16px; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- shopping list ---------- */
.shop { padding-top: 6px; }
.shop .lede { margin: 12px 0 18px; }
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.shop-tools .seg { margin: 0; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 16px; }
.shop-sec { margin: 30px 0 0; }
.shop-sec h2 { font-size: 26px; margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-list li { break-inside: avoid; }
.shop-item { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 11px 2px; border-bottom: 1px dashed var(--line-strong); cursor: pointer; }
.shop-item input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
.shop-box { position: relative; flex: 0 0 26px; width: 26px; height: 26px; margin-top: 1px; border-radius: 8px; border: 1.6px solid var(--line-strong); background: var(--surface); }
.shop-box::before { content: ""; position: absolute; inset: -1.6px; border-radius: 8px; transform: scale(0); opacity: 0; background: radial-gradient(circle at 38% 32%, #F6E2B3, #D9B56D 70%, #C29A4E); transition: transform 0.4s var(--ease), opacity 0.3s var(--ease); }
.shop-box svg { position: absolute; left: 5px; top: 6px; width: 14px; height: 12px; opacity: 0; transform: scale(0.4); transition: opacity 0.3s var(--ease) 0.06s, transform 0.35s var(--ease) 0.06s; }
.shop-box svg path { fill: none; stroke: #1B2440; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.shop-item input:checked + .shop-box { border-color: rgba(var(--light), 0.9); }
.shop-item input:checked + .shop-box::before { transform: scale(1); opacity: 1; }
.shop-item input:checked + .shop-box svg { opacity: 1; transform: scale(1); }
.shop-item input:focus-visible + .shop-box { outline: 3px solid var(--gold); outline-offset: 3px; }
.shop-txt { font-size: 17px; line-height: 1.45; padding-top: 1px; }
.shop-txt .amt { display: inline-block; font-weight: 600; }
.shop-item.is-done .shop-txt, .shop-item.is-done .amt { color: var(--text-soft); text-decoration: line-through; text-decoration-color: rgba(122, 91, 34, 0.6); }
@media (min-width: 700px) { .shop-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; } }

/* ---------- dialogs: breathing guide and restart ---------- */
.modal-open { overflow: hidden; }
.breath {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom)); text-align: center; color: #F2EBDD;
  background: radial-gradient(120% 80% at 50% 38%, #1C2644 0%, #10162A 62%, #0B1020 100%);
}
.breath-stage { position: relative; width: min(72vw, 320px); height: min(72vw, 320px); margin-bottom: 18px; }
.breath-light { position: absolute; inset: 0; border-radius: 50%; transform: scale(0.42); opacity: 0.5; will-change: transform, opacity; background: radial-gradient(closest-side, #FFF6DC 0%, rgba(227, 200, 143, 0.9) 34%, rgba(227, 200, 143, 0.28) 66%, rgba(227, 200, 143, 0) 100%); }
.breath-ring { position: absolute; inset: 4%; border-radius: 50%; opacity: 0; box-shadow: inset 0 0 0 1px rgba(227, 200, 143, 0.28); }
.breath-dot { position: absolute; left: 50%; top: -5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #FFF3D6; box-shadow: 0 0 12px 4px rgba(227, 200, 143, 0.8); }
.breath-count { position: absolute; inset: 0; display: grid; place-items: center; font: 400 64px/1 "Newsreader", Georgia, serif; color: #1B2440; }
.breath-phase { margin: 0; font: 400 28px/1.2 "Newsreader", Georgia, serif; min-height: 1.3em; }
.breath-progress { margin: 0 0 26px; font-size: 16px; color: #C9C2B4; }
.breath-end { max-width: 26ch; margin: 0 0 26px; font: italic 400 22px/1.4 "Newsreader", Georgia, serif; color: #F2EBDD; }
.breath .btn { min-width: 180px; background: #E3C88F; color: #10162A; }
.breath .btn:focus-visible { outline-color: #E3C88F; }

.dialog-back { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); background: rgba(16, 22, 42, 0.45); }
.dialog { width: 100%; max-width: 420px; padding: 28px 24px 20px; text-align: center; }
.dialog h2 { font-size: 28px; margin: 0 0 10px; }
.dialog p { color: var(--text-soft); margin: 0 0 20px; }
.dialog .btn { display: flex; width: 100%; margin: 10px 0 0; }
@media (min-width: 560px) { .dialog-back { align-items: center; } }

/* ---------- narrow phones ---------- */
@media (max-width: 350px) {
  .hero, .day-head { grid-template-columns: minmax(0, 1fr) 40%; }
  .r-why, .r-links { padding-left: 0; margin-left: 0; }
}
@media (min-width: 700px) {
  #app { padding-top: 12px; }
  .hero, .day-head { grid-template-columns: minmax(0, 1fr) 42%; }
}

/* ---------- page transitions (browsers that support them) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.3s ease-in both; }
::view-transition-new(root) { animation: vt-in 0.45s var(--ease) both; }
::view-transition-group(day-title) { animation-duration: 0.55s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- reduced motion: fades only ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .canopy img, .sealed::after { animation: none !important; }
  .demo { aspect-ratio: 1200 / 805; }
  .demo .demo-a img { width: 100%; }
  .demo-b { display: none; animation: none; }
  .shop-box::before, .shop-box svg { transform: none !important; }
  .rv, .rv.rv-wait { transform: none !important; }
  .ph img, .ph.ph-wait img { transform: none !important; }
  .btn, .choice, .seg-pill, .r-hint svg, .r-box::before, .r-box svg { transition-property: opacity !important; }
  .r-check input:checked + .r-box::before, .r-box::before { transform: none; }
  .r-box svg { transform: none; }
  .seg-pill { transition: none !important; }
}
@supports not (aspect-ratio: 1) { @media (prefers-reduced-motion: reduce) { .demo { padding-top: 67.08%; } } }

/* ---------- printing (the shopping list prints cleanly on one or two pages) ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000 !important; }
  .sky, .canopy, .sunarc, .progress, .nav, .brand-mark, .shop-tools, .foot a, .demo-b { display: none !important; }
  #app { max-width: none; padding: 0; }
  .top { min-height: 0; }
  .brand { min-height: 0; }
  .brand-word { font-size: 16pt; }
  .shop .h1 { font-size: 24pt; }
  .shop .lede { color: #333; margin: 4pt 0 0; }
  .shop-sec { margin-top: 12pt; break-inside: auto; }
  .shop-sec h2 { font-size: 14pt; border-bottom: 1px solid #999; }
  .shop-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18pt; }
  .shop-item { min-height: 0; padding: 2pt 0; border-bottom: 0; gap: 6pt; }
  .shop-item.is-done .shop-txt, .shop-item.is-done .amt { color: #000 !important; }
  .shop-box { flex-basis: 11pt; width: 11pt; height: 11pt; border: 1px solid #444; border-radius: 2pt; }
  .shop-box::before { display: none; }
  .shop-box svg { left: 1pt; top: 2pt; width: 8pt; height: 7pt; }
  .shop-txt { font-size: 11pt; color: #000 !important; }
  .foot { margin-top: 16pt; font-size: 9pt; color: #333; }
}
