/* Room2rest: house style.
   Night (default): deep indigo, soft light text, a warm moonlight accent.
   Day: warm paper, indigo ink, a sun instead of the moon.
   Fraunces for headings, Instrument Sans for text.
   Learn = periwinkle, Plan = moonlight / sunlight, Practice = sage.

   All colours are tokens. ".night" gives a part of the page the night colours in both themes
   (the takeaway side of a card, the finished plan, the stream). */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-soft-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ----- night ----- */
:root,
.night {
  color-scheme: dark;
  --bg: #0b0d1f;
  --text: #efedf8;
  --text-2: #dcdaf0;
  --muted: #b4b3d2;
  --faint: #8a88ad;
  --line: rgba(196, 198, 255, 0.14);
  --line-2: rgba(196, 198, 255, 0.26);
  --accent: #f7d9a6;
  --accent-hover: #fde6bd;
  --on-accent: #1a1530;
  --accent-text: #f7d9a6;
  --accent-glow: rgba(247, 217, 166, 0.2);
  --moon: #f7d9a6;
  --peri: #9aa5ff;
  --lav: #c3b3ff;
  --sage: #97d9c6;
  --rose: #f0a3b4;
  --amber: #f5c283;
  --sage-fill: #97d9c6;
  --sage-hover: #b0e6d6;
  --on-sage: #0e2a25;
  --on-c: #14122b;
  --soft: rgba(255, 255, 255, 0.05);
  --soft-2: rgba(255, 255, 255, 0.1);
  --track: rgba(255, 255, 255, 0.1);
  --track-2: rgba(255, 255, 255, 0.18);
  --card: rgba(18, 21, 52, 0.74);
  --chip: rgba(27, 30, 68, 0.82);
  --chip-hover: rgba(44, 48, 98, 0.9);
  --field: rgba(7, 8, 22, 0.55);
  --bar: rgba(9, 11, 28, 0.72);
  --tile: linear-gradient(160deg, rgba(36, 40, 92, 0.8), rgba(15, 17, 42, 0.86));
  --card-plan: linear-gradient(155deg, rgba(58, 48, 108, 0.72), rgba(18, 21, 52, 0.8));
  --card-plan-line: rgba(247, 217, 166, 0.26);
  --feature: linear-gradient(150deg, rgba(78, 70, 170, 0.62), rgba(28, 31, 78, 0.82));
  --feature-line: rgba(154, 165, 255, 0.42);
  --feature-sage: linear-gradient(150deg, rgba(44, 92, 88, 0.5), rgba(22, 26, 60, 0.84));
  --feature-sage-line: rgba(151, 217, 198, 0.42);
  --fcard: linear-gradient(165deg, #2a2e68, #14163a 78%);
  --fcard-dot: rgba(196, 198, 255, 0.2);
  --keep: linear-gradient(165deg, #3b3275, #171a3d);
  --closing: linear-gradient(180deg, rgba(30, 33, 80, 0.5), rgba(12, 14, 34, 0.4));
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --lift: none;
  --toast-bg: #f1eefb;
  --toast-fg: #17132b;
  --focus: #f7d9a6;
  --thumb: #fff3da;
  --view-tint: rgba(106, 88, 216, 0.2);
  --sky:
    radial-gradient(120% 70% at 88% 108%, rgba(245, 194, 131, 0.14), transparent 55%),
    radial-gradient(90% 60% at 8% 0%, rgba(90, 96, 220, 0.3), transparent 60%),
    radial-gradient(80% 60% at 72% 40%, rgba(84, 64, 153, 0.22), transparent 65%),
    #090b1c;
}

/* ----- day ----- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f1ea;
  --text: #1c1938;
  --text-2: #2f2b55;
  --muted: #57537c;
  --faint: #7c799d;
  --line: rgba(42, 37, 96, 0.13);
  --line-2: rgba(42, 37, 96, 0.26);
  --accent: #2a2560;
  --accent-hover: #3a3480;
  --on-accent: #fff8ec;
  --accent-text: #a4530e;
  --accent-glow: rgba(42, 37, 96, 0.2);
  --moon: #a4530e;
  --peri: #4853c4;
  --lav: #6a52c8;
  --sage: #1c7a66;
  --rose: #b4476a;
  --amber: #a4530e;
  --sage-fill: #1f8872;
  --sage-hover: #24997f;
  --on-sage: #ffffff;
  --on-c: #ffffff;
  --soft: rgba(42, 37, 96, 0.05);
  --soft-2: rgba(42, 37, 96, 0.1);
  --track: rgba(42, 37, 96, 0.11);
  --track-2: rgba(42, 37, 96, 0.2);
  --card: rgba(255, 255, 255, 0.76);
  --chip: rgba(255, 255, 255, 0.88);
  --chip-hover: #ffffff;
  --field: rgba(255, 255, 255, 0.85);
  --bar: rgba(250, 246, 240, 0.8);
  --tile: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 243, 0.72));
  --card-plan: linear-gradient(155deg, rgba(255, 240, 214, 0.96), rgba(255, 255, 255, 0.82));
  --card-plan-line: rgba(164, 83, 14, 0.3);
  --feature: linear-gradient(150deg, rgba(222, 226, 255, 0.96), rgba(255, 255, 255, 0.84));
  --feature-line: rgba(72, 83, 196, 0.4);
  --feature-sage: linear-gradient(150deg, rgba(210, 240, 231, 0.96), rgba(255, 255, 255, 0.84));
  --feature-sage-line: rgba(28, 122, 102, 0.4);
  --fcard: linear-gradient(165deg, #ffffff, #eceeff 78%);
  --fcard-dot: rgba(72, 83, 196, 0.24);
  --closing: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.4));
  --shadow: 0 24px 60px rgba(60, 50, 120, 0.18);
  --lift: 0 10px 30px rgba(60, 50, 120, 0.08);
  --toast-bg: #231f52;
  --toast-fg: #ffffff;
  --focus: #2a2560;
  --thumb: #ffffff;
  --view-tint: rgba(255, 196, 140, 0.4);
  --sky:
    radial-gradient(120% 70% at 88% 108%, rgba(255, 190, 130, 0.55), transparent 55%),
    radial-gradient(90% 60% at 8% 0%, rgba(190, 198, 255, 0.7), transparent 60%),
    radial-gradient(80% 60% at 72% 40%, rgba(226, 214, 255, 0.6), transparent 65%),
    #f6f1ea;
}

.night { color: var(--text); }

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
html.view-open,
html.view-open body,
html.intro-on body { overflow: hidden; }

h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
canvas { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--accent-glow); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* a soft cross-fade when the theme changes */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.55s; }
html.theme-fade,
html.theme-fade *,
html.theme-fade *::before,
html.theme-fade *::after { transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease !important; }

/* ---------- sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  background: var(--sky);
}
.sky canvas { width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.sky canvas.is-live { opacity: 1; }

main { position: relative; z-index: 1; }
.wrap { width: min(100% - 40px, 1040px); margin-inline: auto; }

/* ---------- logo intro (always night) ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background-color: #1c1e38;
  transition: background-color 0.8s ease, opacity 0.5s ease 0.4s;
}
html:not(.js) .intro { display: none; }
.intro__tile {
  position: relative;
  width: min(62vw, 288px);
  aspect-ratio: 1;
  border-radius: 23%;
  background: #080a19;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: tileIn 0.9s var(--ease) both;
  transition: transform 0.95s cubic-bezier(0.7, 0, 0.25, 1);
}
.intro__tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.45s ease; }
.intro__word {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 380;
  font-size: clamp(1.9rem, 9.4vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #f6f3ff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.7s ease, transform 0.9s var(--ease);
}
.intro__word em { font-style: italic; color: #f7d9a6; padding: 0 0.02em; }
.intro.has-word .intro__word { opacity: 1; transform: none; }
.intro.is-opening { background-color: #080a19; opacity: 0; pointer-events: none; }
.intro.is-opening .intro__tile { transform: scale(var(--open-scale, 8)); }
.intro.is-opening .intro__tile canvas { opacity: 0; }
.intro.is-opening .intro__word { opacity: 0; transition-duration: 0.25s; }
@keyframes tileIn { from { opacity: 0; transform: scale(0.86); } }

/* ---------- top bar ---------- */

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  transition: background-color 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.top.is-scrolled {
  background-color: var(--bar);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand__name em { font-style: italic; color: var(--accent-text); }
.top__right { display: flex; align-items: center; gap: 10px; }
.top__nav { display: none; gap: 2px; }
.top__nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 99px;
  transition: color 0.2s, background-color 0.2s;
}
.top__nav a:hover { color: var(--text); background: var(--soft-2); }
@media (min-width: 720px) { .top { padding-inline: 28px; } .top__nav { display: flex; } }

.themeswitch {
  position: relative;
  flex: none;
  width: 64px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
}
.themeswitch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.5s var(--ease);
}
.themeswitch svg { position: relative; z-index: 1; width: 16px; height: 16px; transition: color 0.3s; }
.themeswitch .i-moon { color: var(--on-accent); }
:root[data-theme="light"] .themeswitch::before { transform: translateX(30px); }
:root[data-theme="light"] .themeswitch .i-moon { color: var(--muted); }
:root[data-theme="light"] .themeswitch .i-sun { color: var(--on-accent); }

/* ---------- type ---------- */

.eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c, var(--accent-text));
}
.h2 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 360;
  font-size: clamp(1.85rem, 6.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0.5rem 0 0.6rem;
  max-width: 20ch;
  text-wrap: balance;
}
.muted { color: var(--muted); }
.fine { font-size: 0.86rem; color: var(--faint); margin-top: 14px; }

/* ---------- hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(74px + env(safe-area-inset-top)) 22px 44px;
  width: min(100%, 1120px);
  margin-inline: auto;
}
.hero__art {
  width: min(58vw, 30vh, 280px);
  aspect-ratio: 1;
  margin: 0 auto 6px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.4s ease 0.1s, transform 1.6s var(--ease) 0.1s;
}
.hero__art canvas { width: 100%; height: 100%; transition: opacity 0.3s ease; }
canvas.is-swapping { opacity: 0; }
body.is-ready .hero__art { opacity: 1; transform: none; }
.hero .eyebrow { --c: var(--peri); }
.quote {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 340;
  font-size: clamp(2.3rem, 9.6vw, 4.7rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
  margin-top: 0.7rem;
  max-width: 13ch;
  text-wrap: balance;
}
.quote em { font-style: italic; font-weight: 340; color: var(--accent-text); }
.quote__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 4.6vw, 1.6rem);
  color: var(--lav);
  margin-top: 0.9rem;
}
.lead { margin-top: 1.1rem; max-width: 36ch; color: var(--muted); font-size: 1.06rem; }
.hero__cta { margin-top: 1.6rem; }

.js .rise {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms + 180ms);
}
.js body.is-ready .rise { opacity: 1; transform: none; }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 40px;
    padding-inline: 40px;
  }
  .hero__art { order: 2; width: min(100%, 440px); margin: 0 0 0 auto; }
}

/* ---------- buttons, chips, fields ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s, box-shadow 0.3s, border-color 0.25s, opacity 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn__icon { display: inline-flex; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 30px var(--accent-glow); }
.btn--sage { background: var(--sage-fill); color: var(--on-sage); }
.btn--ghost { background: var(--soft); border-color: var(--line-2); color: var(--text); }
.btn--sm { min-height: 42px; padding: 0.55rem 1.05rem; font-size: 0.93rem; }
.btn--lg { min-height: 56px; padding: 1rem 1.7rem; font-size: 1.06rem; }
@media (hover: hover) {
  .btn--primary:not(:disabled):hover { background: var(--accent-hover); transform: translateY(-1px); }
  .btn--ghost:not(:disabled):hover { background: var(--soft-2); }
  .btn--sage:hover { background: var(--sage-hover); }
}

.iconbtn {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}
.iconbtn:disabled { opacity: 0.3; cursor: default; }
.iconbtn--line { border: 1px solid var(--line-2); background: var(--soft); }
.iconbtn--fill { background: var(--accent); color: var(--on-accent); width: 50px; height: 50px; }
.iconbtn--sm { width: 34px; height: 34px; color: var(--faint); }
.iconbtn--sm svg { width: 16px; height: 16px; }
@media (hover: hover) { .iconbtn:not(:disabled):not(.iconbtn--fill):hover { background: var(--soft-2); } }

.linkbtn {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.92rem;
  cursor: pointer;
}
.textlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c, var(--accent-text));
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.textlink svg { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2);
  background: var(--chip);
  color: var(--text);
  padding: 0.62rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.3s;
}
.chip:active { transform: scale(0.96); }
.chip.is-on { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 4px 24px var(--accent-glow); }
.chips--lg { gap: 10px; }
.chips--lg .chip { padding: 0.8rem 1.15rem; font-size: 1.02rem; }
.chip--sm { padding: 0.5rem 0.85rem; font-size: 0.9rem; }
@media (hover: hover) { .chip:not(.is-on):hover { background: var(--chip-hover); } }

.field {
  width: 100%;
  margin-top: 10px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; border-color: var(--c, var(--accent-text)); box-shadow: 0 0 0 3px var(--accent-glow); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: var(--on-accent);
}
.badge svg { width: 12px; height: 12px; }
.badge--sage { background: var(--soft-2); background: color-mix(in srgb, var(--sage) 16%, transparent); color: var(--sage); }
.badge--line { background: none; border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- relate ---------- */

.relate, .hub, .take { padding-block: clamp(56px, 11vh, 110px); }
.relate { --c: var(--peri); }
.relate .chips { margin-top: 20px; }
.reply { margin-top: 22px; min-height: 40px; }
.reply__card {
  padding: 22px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--lift);
  animation: fadeUp 0.6s var(--ease) both;
  max-width: 620px;
}
.reply__lead { margin-bottom: 14px; }
.reply__list { display: grid; gap: 8px; margin-bottom: 16px; }
.sugg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border-radius: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.sugg__tip { display: block; font-size: 0.8rem; color: var(--muted); }
.sugg__go { display: block; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 1.18rem; line-height: 1.25; }
.sugg__arrow { color: var(--accent-text); display: inline-flex; transition: transform 0.25s var(--ease); }
@media (hover: hover) { .sugg:hover { background: var(--soft-2); border-color: var(--line-2); } .sugg:hover .sugg__arrow { transform: translateX(3px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* ---------- hub tiles ---------- */

.hub { --c: var(--accent-text); }
.tiles { display: grid; gap: 14px; margin-top: 26px; }
.tile {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "body art" "foot foot";
  gap: 6px 10px;
  padding: 22px 22px 16px;
  border-radius: 28px;
  background: var(--tile);
  border: 1px solid var(--line);
  box-shadow: var(--lift);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.3s, box-shadow 0.5s;
}
.tile::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(70% 90% at 92% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%);
  opacity: 0.8;
  transition: opacity 0.4s;
}
.tile--learn { --c: var(--peri); }
.tile--plan { --c: var(--accent-text); }
.tile--practice { --c: var(--sage); }
.tile__art { grid-area: art; width: 108px; height: 108px; margin: -6px -8px 0 0; transition: opacity 0.3s ease; }
.tile__body { grid-area: body; display: flex; flex-direction: column; gap: 6px; align-self: center; }
.tile__title { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 360; font-size: 2.15rem; line-height: 1; letter-spacing: -0.015em; }
.tile__text { color: var(--muted); font-size: 0.98rem; max-width: 30ch; }
.tile__foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.tile__meta { font-size: 0.86rem; font-weight: 600; color: var(--c); }
.tile__go {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-2);
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.tile:active { transform: scale(0.985); }
@media (hover: hover) {
  .tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 50%, transparent); box-shadow: var(--shadow); }
  .tile:hover::before { opacity: 1; }
  .tile:hover .tile__go { background: var(--c); color: var(--on-c); transform: translateX(3px); }
}
@media (min-width: 860px) {
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .tile { grid-template-columns: 1fr; grid-template-areas: "art" "body" "foot"; padding: 26px 26px 18px; min-height: 400px; }
  .tile__art { width: 150px; height: 150px; margin: -8px 0 8px -10px; }
  .tile__body { align-self: end; }
  .tile__title { font-size: 2.6rem; }
}

/* ---------- takeaways ---------- */

.take { --c: var(--lav); }
.take__grid { display: grid; gap: 14px; margin-top: 26px; }
.tcard {
  padding: 22px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--lift);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.tcard__label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); }
.tcard__serif { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 360; font-size: 1.5rem; line-height: 1.22; letter-spacing: -0.01em; }
.tcard__serif--sm { font-size: 1.25rem; }
.tcard__sub { color: var(--muted); font-size: 0.98rem; }
.tcard__sub span { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
.tcard__sub--lg { color: var(--text); font-size: 1.05rem; }
.tcard__fine { font-size: 0.86rem; color: var(--faint); }
.tcard .btn { margin-top: 6px; }
.tcard--plan { --c: var(--accent-text); background: var(--card-plan); border-color: var(--card-plan-line); }
.tcard--plan .tcard__serif { color: var(--accent-text); }
.tcard--keys { --c: var(--peri); }
.tcard--tried { --c: var(--sage); }
.tcard--phrases { --c: var(--rose); }
.tcard--home { --c: var(--lav); }
.keys { margin: 0; padding: 0; list-style: none; counter-reset: k; display: grid; gap: 12px; }
.keys li { counter-increment: k; display: grid; grid-template-columns: 28px 1fr; gap: 6px; font-size: 1rem; }
.keys li::before { content: counter(k); font-family: var(--serif); font-size: 1.3rem; line-height: 1.15; color: var(--c); }
.triedlist { display: grid; gap: 8px; width: 100%; }
.tried {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  text-decoration: none;
}
.tried strong { display: block; font-weight: 600; }
.tried em { display: block; font-style: normal; font-size: 0.85rem; color: var(--muted); }
.tried svg { color: var(--c); flex: none; }
@media (min-width: 760px) {
  .take__grid { grid-template-columns: repeat(2, 1fr); }
  .tcard--plan { grid-column: 1 / -1; padding: 30px; }
  .tcard--plan .tcard__serif { font-size: 1.9rem; max-width: 28ch; }
}

/* ---------- closing and footer ---------- */

.closing { padding-block: 10px clamp(40px, 8vh, 80px); }
.closing__card {
  text-align: center;
  padding: 36px 24px 34px;
  border-radius: 32px;
  background: var(--closing);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.closing__moon { width: 120px; height: 120px; transition: opacity 0.3s ease; }
.closing__quote {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 340;
  font-size: clamp(1.6rem, 6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}
.closing__text { color: var(--muted); max-width: 42ch; }
.closing__sign { margin-top: 10px; color: var(--muted); }
.closing__sign span { display: block; font-family: var(--serif); font-style: italic; font-size: 1.45rem; color: var(--accent-text); }
.closing__sign small { display: block; margin-top: 6px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }

.foot { padding-bottom: calc(40px + env(safe-area-inset-bottom)); font-size: 0.88rem; color: var(--faint); display: grid; gap: 14px; max-width: 760px; }
.foot__help { color: var(--muted); }
.foot__sources summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.foot__sources ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.foot .linkbtn { font-size: inherit; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 200;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border-radius: 99px;
  background: var(--toast-bg);
  color: var(--toast-fg);
  font-size: 0.93rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: relative; z-index: 2; padding: 20px; text-align: center; }

/* ---------- rooms (Learn, Plan, Practice) ---------- */

.view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(95% 55% at 88% -8%, color-mix(in srgb, var(--c) 22%, transparent), transparent 62%),
    radial-gradient(75% 45% at 0% 104%, var(--view-tint), transparent 60%);
  will-change: clip-path;
}
.view--learn { --c: var(--peri); }
.view--plan { --c: var(--accent-text); }
.view--practice { --c: var(--sage); }
.view__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 10px 6px;
}
.view__name { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c); }
.view__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.view__body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px);
}
.view__body.is-in { opacity: 1; transform: none; transition: opacity 0.55s var(--ease), transform 0.7s var(--ease); }

.vwrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 6px 22px calc(44px + env(safe-area-inset-bottom)); }
.vhead { margin-bottom: 6px; }
.vtitle {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 360;
  font-size: clamp(1.75rem, 6.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0.45rem 0 0.7rem;
  text-wrap: balance;
}
.vlead { font-size: 1.06rem; color: var(--text-2); }
.vtext { color: var(--muted); margin-top: 0.8rem; }

.meter { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 18px; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--c); transition: width 0.6s var(--ease); }
.meter__label { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

/* ---------- Learn ---------- */

.cats { display: grid; gap: 12px; margin-top: 22px; }
.cat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--lift);
  text-decoration: none;
  transition: transform 0.4s var(--ease), border-color 0.3s, background-color 0.3s;
}
.cat--feature { background: var(--feature); border-color: var(--feature-line); padding-block: 24px; }
.cat .badge { margin-bottom: 4px; }
.cat__n { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); }
.cat__title { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 360; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; }
.cat--feature .cat__title { font-size: 1.8rem; }
.cat__blurb { color: var(--muted); font-size: 0.98rem; }
.cat__foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.cat__go { margin-left: auto; display: inline-flex; color: var(--c); transition: transform 0.3s var(--ease); }
.pips { display: inline-flex; gap: 5px; }
.pips i { width: 9px; height: 9px; border-radius: 3px; background: var(--track-2); }
.pips i.is-on { background: var(--c); }
.cat:active { transform: scale(0.985); }
@media (hover: hover) { .cat:hover { transform: translateY(-3px); border-color: var(--feature-line); } .cat:hover .cat__go { transform: translateX(4px); } }
@media (min-width: 640px) { .cats { grid-template-columns: 1fr 1fr; } .cat--feature { grid-column: 1 / -1; } }

.deckwrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.deckhead { width: 100%; max-width: 680px; margin: 0 auto; padding: 4px 22px 4px; }
.decktitle { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 360; font-size: clamp(1.4rem, 5.2vw, 1.9rem); line-height: 1.15; margin-top: 0.35rem; }
.deck {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 18px max(22px, calc(50% - 195px)) 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.deck::-webkit-scrollbar { display: none; }
.fcard {
  flex: 0 0 min(84vw, 390px);
  min-height: min(60vh, 520px);
  min-height: min(60svh, 520px);
  scroll-snap-align: center;
  perspective: 1400px;
  cursor: pointer;
  opacity: 0.5;
  transform: scale(0.94);
  transition: opacity 0.45s ease, transform 0.55s var(--ease);
}
.fcard.is-current { opacity: 1; transform: none; }
.fcard__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.fcard.is-flipped .fcard__inner { transform: rotateY(180deg); }
.fcard__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 18px;
  border-radius: 30px;
  overflow: hidden;
}
.fcard__front {
  background: var(--fcard);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.fcard__front::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--fcard-dot) 1.2px, transparent 1.4px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(200deg, #000, transparent 45%);
  mask-image: linear-gradient(200deg, #000, transparent 45%);
  pointer-events: none;
}
.fcard__back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #453b9e, #251f66 80%);
  border: 1px solid rgba(247, 217, 166, 0.35);
  box-shadow: var(--shadow);
  justify-content: center;
  gap: 16px;
}
.fcard__back .btn { align-self: flex-start; }
.fcard__num { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 300; font-size: 3.4rem; line-height: 1; color: var(--peri); opacity: 0.65; }
.fcard.was-read .fcard__num { color: var(--accent-text); opacity: 1; }
.fcard__title { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 380; font-size: clamp(1.45rem, 5.6vw, 1.75rem); line-height: 1.14; letter-spacing: -0.01em; margin-top: auto; }
.fcard__body { color: var(--text-2); margin-top: 0.7rem; font-size: 1.02rem; }
.fcard__label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--peri); }
.fcard__back .fcard__label { color: #cfc8ff; }
.fcard__take { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 360; font-size: clamp(1.4rem, 5.6vw, 1.8rem); line-height: 1.22; letter-spacing: -0.01em; color: var(--accent-text); }
.fcard__flip {
  margin-top: 18px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  background: none;
  border: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--peri);
  cursor: pointer;
}
.fcard__back .fcard__flip { position: absolute; left: 24px; bottom: 18px; margin: 0; color: #cfc8ff; }
.fcard__flip svg { width: 18px; height: 18px; }
.fcard--end { cursor: default; }
.fcard__endbox {
  height: 100%;
  border: 1px dashed var(--line-2);
  border-radius: 30px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}
.decknav { flex: none; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 2px 22px calc(18px + env(safe-area-inset-bottom)); }
.deckdots { display: flex; gap: 6px; align-items: center; }
.deckdots i { width: 7px; height: 7px; border-radius: 99px; background: var(--track-2); transition: width 0.35s var(--ease), background-color 0.3s; }
.deckdots i.is-on { width: 22px; background: var(--c); }

/* ---------- Plan ---------- */

.steps { display: flex; gap: 6px; margin: 2px 0 18px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--track); }
.steps i.is-done { background: var(--c); opacity: 0.5; }
.steps i.is-on { background: var(--c); }
.choice { border: 0; padding: 0; margin: 24px 0 0; min-width: 0; }
.choice__label { display: block; padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 1.02rem; }
.choice__label--sm { font-size: 0.92rem; font-weight: 600; color: var(--muted); margin: 22px 0 10px; }
.choice .choice__label--sm { margin-top: 0; }
.example { margin: 20px 0 6px; padding: 20px; border-radius: 24px; background: var(--soft); border: 1px solid var(--line); }
.example figcaption { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); }
.example blockquote { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 1.3rem; line-height: 1.28; color: var(--accent-text); margin-top: 0.4rem; }
.preview {
  margin-top: 26px;
  padding: 20px;
  border-radius: 24px;
  background: var(--card-plan);
  border: 1px solid var(--card-plan-line);
}
.preview__label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
.preview p { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 1.35rem; line-height: 1.28; margin-top: 0.4rem; }
.preview b { font-weight: inherit; color: var(--accent-text); }
.preview b.is-empty { color: var(--faint); border-bottom: 1px dashed var(--faint); }
.plan__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.plan__nav--single { justify-content: flex-start; }
.plan__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.slider { margin-top: 6px; }
.slider output { display: block; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 1.5rem; color: var(--accent-text); margin-bottom: 10px; }
.slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  background: transparent;
  cursor: pointer;
}
.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) var(--v, 70%), var(--track-2) var(--v, 70%));
}
.slider input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--track-2); }
.slider input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--thumb);
  border: 0;
  box-shadow: 0 0 0 6px var(--accent-glow), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.slider input[type="range"]::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: var(--thumb); border: 0; box-shadow: 0 0 0 6px var(--accent-glow); }
.slider__ends { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

.plancard {
  margin: 16px 0 6px;
  padding: 6px 22px;
  border-radius: 28px;
  background: var(--keep);
  border: 1px solid rgba(247, 217, 166, 0.3);
  box-shadow: var(--shadow);
}
.plancard__row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.plancard__row:last-child { border-bottom: 0; }
.plancard__row span { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--peri); }
.plancard__row p { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 1.22rem; line-height: 1.28; margin-top: 0.25rem; }
.plancard__row--main p { font-size: 1.55rem; line-height: 1.22; color: var(--accent-text); }

/* ---------- Practice ---------- */

.practice .chips { margin-top: 18px; }
.practice .choice__label--sm + .chips { margin-top: 0; }
.listhead { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 360; font-size: 1.35rem; margin: 30px 0 12px; }
.listhead--quiet { font-family: var(--sans); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 26px; }
.exlist { display: grid; gap: 10px; }
.excard {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--lift);
  text-decoration: none;
  transition: transform 0.4s var(--ease), border-color 0.3s, background-color 0.3s;
}
.excard.is-featured { padding-block: 20px; background: var(--feature-sage); border-color: var(--feature-sage-line); }
.excard__art { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 18px; background: var(--soft-2); background: color-mix(in srgb, var(--sage) 14%, transparent); color: var(--sage); }
.excard__kind { display: block; font-size: 0.76rem; color: var(--faint); }
.excard__name { display: block; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 380; font-size: 1.28rem; line-height: 1.2; }
.excard__short { display: block; color: var(--muted); font-size: 0.93rem; margin-top: 3px; }
.excard__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.excard__tags:empty { display: none; }
.excard__go { color: var(--sage); display: inline-flex; transition: transform 0.3s var(--ease); }
.excard:active { transform: scale(0.985); }
@media (hover: hover) { .excard:hover { transform: translateY(-2px); border-color: var(--feature-sage-line); } .excard:hover .excard__go { transform: translateX(4px); } }

.facts { display: grid; gap: 10px; margin: 20px 0 18px; }
.facts div { padding: 14px 16px; border-radius: 20px; background: var(--soft); border: 1px solid var(--line); }
.facts dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); }
.facts dd { margin-top: 4px; }
@media (min-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }
.prep { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.prep li { position: relative; padding-left: 22px; color: var(--muted); }
.prep li::before { content: ""; position: absolute; left: 3px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.switch { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 0.95rem; color: var(--muted); cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 28px; margin: 0; }
.switch__track { flex: none; position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--track-2); transition: background-color 0.25s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); transition: transform 0.25s var(--ease); }
.switch input:checked + .switch__track { background: var(--sage-fill); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--focus); outline-offset: 3px; }
.exstart__go { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 28px; }
.exdone__reply { min-height: 3.2em; margin-top: 18px; }
.exdone__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.exdone .chips { margin-top: 16px; }

/* running an exercise */
.run {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom));
}
.run--braindump { padding-inline: 0; max-width: none; }
.run__bar { flex: none; display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.run__meter { flex: 1; min-width: 0; }
.run__left { font-size: 0.85rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.run__line { height: 4px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 5px; }
.run__line i { display: block; height: 100%; background: var(--c); transform-origin: left center; transform: scaleX(0); }
.run__phase { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c); }
.run__title { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 360; font-size: clamp(1.5rem, 6vw, 2.1rem); line-height: 1.14; letter-spacing: -0.01em; margin: 4px 0 8px; text-wrap: balance; }
.run__how { color: var(--muted); max-width: 36ch; }
.run__care { color: var(--amber); font-size: 0.92rem; min-height: 1.5em; margin-top: 6px; }

.stream {
  position: relative;
  flex: 1;
  min-height: 300px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(180deg, #171c52, #10233f 70%, #0d2a3c);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stream canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.run__guide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 22px 22px 46px;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-size: clamp(1.15rem, 4.7vw, 1.5rem);
  line-height: 1.3;
  background: linear-gradient(180deg, rgba(9, 11, 30, 0.88), rgba(9, 11, 30, 0.5) 65%, transparent);
  opacity: 0;
  transition: opacity 0.38s ease;
}
.run__guide.is-in { opacity: 1; }
.leafform { flex: none; display: flex; gap: 8px; margin-top: 12px; }
.leafform .field { margin: 0; flex: 1; min-width: 0; border-radius: 99px; padding-inline: 1.15rem; }
.leafform .btn { flex: none; }

.pmr, .breath { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 6px; }
.orbwrap { position: relative; width: min(54vw, 230px); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 22px; }
.orbwrap--lg { width: min(72vw, 300px); margin-bottom: 26px; }
.orb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  will-change: transform;
  background: radial-gradient(circle at 34% 28%, #eafff8, #97d9c6 38%, #4f9aa0 72%, #2c4f86);
  box-shadow: 0 0 70px rgba(151, 217, 198, 0.38), inset 0 0 40px rgba(255, 255, 255, 0.16);
  transition: box-shadow 0.9s ease, filter 0.9s ease;
}
:root[data-theme="light"] .orb { box-shadow: 0 20px 60px rgba(60, 140, 130, 0.35), inset 0 0 40px rgba(255, 255, 255, 0.2); }
.orb--pmr[data-state="tense"] { filter: hue-rotate(-118deg) saturate(1.25); }
.orb__count { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 3.2rem; line-height: 1; color: #0d1730; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--line-2); }
.orb--breath { position: absolute; inset: 0; }
.orb__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #0d1730; pointer-events: none; }
.orb__label span { font-weight: 600; font-size: 0.98rem; }
.orb__label b { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 400; font-size: 2.6rem; line-height: 1; min-height: 1em; }
.orb--heart,
:root[data-theme="light"] .orb--heart {
  background: radial-gradient(circle at 34% 28%, #fff0f3, #f0a3b4 40%, #b0669a 74%, #4a3a8c);
  box-shadow: 0 0 60px rgba(240, 163, 180, 0.4), inset 0 0 40px rgba(255, 255, 255, 0.16);
  animation: pulse 4.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(0.9); } 50% { transform: scale(1.04); } }

.addform { display: flex; gap: 8px; align-items: center; margin-top: 20px; }
.addform .field { margin: 0; flex: 1; min-width: 0; }
.dumplist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.dumplist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  animation: fadeUp 0.4s var(--ease) both;
}
.sortcard { margin-top: 20px; padding: 24px 22px; border-radius: 28px; background: var(--keep); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: fadeUp 0.45s var(--ease) both; }
.sortcard__n { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage); }
.sortcard p { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 1.55rem; line-height: 1.22; margin-top: 0.35rem; overflow-wrap: anywhere; }
.buckets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.bucket {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: var(--card);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.25s var(--ease);
}
.bucket:active { transform: scale(0.97); }
.bucket strong { font-weight: 600; }
.bucket span { font-size: 0.84rem; color: var(--muted); }
@media (hover: hover) { .bucket:hover { background: var(--chip-hover); } }
.bucketbox { margin-top: 16px; padding: 18px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.bucketbox h3 { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); margin-bottom: 8px; }
.bucketbox ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.bucketbox .vtext:first-of-type { margin-top: 0; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; font-weight: 600; font-size: 0.95rem; }
.inline--col { flex-direction: column; align-items: stretch; gap: 0; }
.field--time { width: auto; margin: 0; min-width: 120px; }
.worries { display: grid; gap: 10px; margin-top: 14px; }
.worry { padding: 14px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); }
.worry p { font-weight: 600; margin-bottom: 10px; overflow-wrap: anywhere; }

.ground { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 6px 0; width: 100%; }
.ground--end { justify-content: center; }
.ground__steps { display: flex; gap: 8px; margin-bottom: 10px; }
.ground__steps i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); font-style: normal; font-size: 0.82rem; font-weight: 600; color: var(--faint); }
.ground__steps i.is-on { background: var(--sage-fill); border-color: transparent; color: var(--on-sage); }
.ground__steps i.is-done { background: var(--soft-2); border-color: transparent; color: var(--sage); }
.ground__num { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 280; font-size: clamp(6.5rem, 36vw, 10.5rem); line-height: 0.95; color: var(--accent-text); margin-top: auto; }
.ground__num--sm { font-size: clamp(3.6rem, 19vw, 5.6rem); font-style: italic; margin-top: 0; margin-bottom: 10px; }
.taps { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px 0 0; }
.tap {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: var(--soft);
  color: transparent;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.4s var(--ease), border-color 0.3s, color 0.3s;
}
.tap.is-on { background: var(--sage-fill); border-color: transparent; color: var(--on-sage); transform: scale(1.07); }
.ground .plan__nav { width: 100%; margin-top: auto; padding-top: 26px; }
.ground--end .plan__nav { margin-top: 26px; justify-content: center; }

.comp { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 620px; margin: 0 auto; padding: 4px 6px 0; --c: var(--rose); }
.comp .orbwrap { width: 150px; margin: 6vh auto 26px; }
.phrases { display: grid; gap: 10px; margin-top: 14px; }
.phrase {
  text-align: left;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: var(--card);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-size: 1.22rem;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.phrase:active { transform: scale(0.98); }
.phrase.is-on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.said { display: grid; gap: 16px; margin: 16px 0 20px; }
.said p { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 340; font-size: clamp(1.55rem, 6.6vw, 2.2rem); line-height: 1.18; color: var(--accent-text); animation: fadeUp 0.8s var(--ease) both; }
.said p:nth-child(2) { animation-delay: 0.5s; }
.said p:nth-child(3) { animation-delay: 1s; }
.comp .plan__nav { margin-top: auto; padding-top: 26px; }

/* ---------- less motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .js .rise, .js .reveal, .view__body, .hero__art { opacity: 1; transform: none; }
}
