/* pause. — one visual language: Jost for all text, a flourished script (Great Vibes)
   only for accent words, thin line drawings with dotted orbits and a single lime dot.
   Fonts: Jost and Great Vibes (SIL OFL 1.1), see fonts/LICENSE.txt. */

@font-face {
  font-family: Jost;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/jost-cyrillic.woff2?v=14') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Jost;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/jost-latin.woff2?v=14') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/greatvibes-cyrillic.woff2?v=14') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/greatvibes-latin.woff2?v=14') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font: Jost, "Segoe UI", Arial, sans-serif;
  --font-display: Jost, "Segoe UI", Arial, sans-serif;
  /* accent words only: the one word that matters in a heading, the words of the day */
  --font-script: "Great Vibes", "Segoe Script", cursive;
  --bg: #f4f4f2;
  --paper: #fbfbfa;
  --panel: #e9eae5;
  --fg: #171916;
  --muted: #5f645c;
  --line: rgba(23, 25, 22, .14);
  --line-strong: rgba(23, 25, 22, .3);
  --accent: #d4ff3a;
  --accent-ink: #4a5f00;
  --on-accent: #11130f;
  --danger: #a32121;
  --wrap: 1200px;
  --gutter: clamp(20px, 5.2vw, 76px);
  --radius: 20px;
  --stroke: 1.5;
  --ease: cubic-bezier(.2, .75, .25, 1);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Repeated so a section can force the light palette inside a dark page
   (the session picks its palette from the scene, not from the site theme). */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f2;
  --paper: #fbfbfa;
  --panel: #e9eae5;
  --fg: #171916;
  --muted: #5f645c;
  --line: rgba(23, 25, 22, .14);
  --line-strong: rgba(23, 25, 22, .3);
  --accent-ink: #4a5f00;
  --on-accent: #11130f;
  --danger: #a32121;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e0d;
  --paper: #141715;
  --panel: #191d1a;
  --fg: #eff1ea;
  --muted: #a3a9a0;
  --line: rgba(239, 241, 234, .13);
  --line-strong: rgba(239, 241, 234, .3);
  --accent-ink: #d4ff3a;
  --on-accent: #10120d;
  --danger: #ff8a7a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}
body.dialog-open { overflow: hidden; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ul { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; letter-spacing: -.01em; text-wrap: balance; }
h1 em, h2 em { font-family: var(--font-script); font-size: 1.32em; font-style: normal; font-weight: 400; letter-spacing: 0; line-height: .8; color: var(--accent-ink); }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: clamp(88px, 12vw, 150px); }
.header-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Line-drawing language shared by every emblem, icon and mark */
.mode-emblem, .session-emblem, .program-emblem, .sos-button svg, .step-icon svg, .prototype-mark, .mode-open, .text-link svg, .not-found-mark {
  fill: none;
  stroke: currentColor;
  stroke-width: var(--stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.em-orbit { stroke-dasharray: 1.5 4; opacity: .7; }
.em-dot { fill: var(--accent); stroke: var(--on-accent); stroke-width: 1; }
[data-theme="dark"] .em-dot { stroke: none; }

.skip-link {
  position: fixed;
  z-index: 500;
  top: 8px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-color: var(--line); }
.logo {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -.03em;
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--accent-ink); }
.header-nav { display: flex; gap: clamp(22px, 3vw, 44px); margin-left: auto; margin-right: clamp(28px, 5vw, 64px); }
.header-nav a, .footer-inner > a:not(.logo) {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color .2s ease;
}
.header-nav a:hover, .footer-inner > a:not(.logo):hover { color: var(--fg); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  transition: background .2s ease, border-color .2s ease;
}
.icon-button:hover { background: var(--panel); border-color: var(--fg); }
.language-toggle { font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.theme-toggle svg { width: 17px; height: 17px; }
.header-cta {
  padding: 11px 19px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s ease;
}
.header-cta:hover { opacity: .85; }

/* Shared type */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-ink), 0 0 0 5px color-mix(in srgb, var(--accent) 30%, transparent); }
.accent { color: var(--accent-ink); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s var(--ease), background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(.98); }
.button:disabled { opacity: .6; cursor: progress; }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.button-secondary { border-color: var(--line-strong); background: transparent; color: var(--fg); }
.button-secondary:hover { border-color: var(--fg); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(44px, 7vw, 100px);
  padding-block: clamp(48px, 6vw, 88px) clamp(64px, 8vw, 110px);
}
.hero h1 {
  max-width: 14ch;
  margin-top: 26px;
  font-size: clamp(44px, 5.2vw, 76px);
  letter-spacing: -.02em;
  line-height: 1.06;
}
.hero-tagline { margin-top: 18px; color: var(--fg); font-family: var(--font-display); font-size: clamp(20px, 1.9vw, 26px); font-weight: 300; letter-spacing: -.015em; line-height: 1.35; }
.hero-lead { max-width: 40ch; margin-top: 18px; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; }
.hero-disclaimer {
  max-width: 44ch;
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; padding: 0; color: var(--muted); font-size: 13px; list-style: none; }
.hero-proof li { display: flex; align-items: center; gap: 9px; }
.hero-proof li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-ink); }
.hero-art figcaption { margin-top: 12px; color: var(--muted); font-size: 12px; }

/* Hero concept illustration (inline SVG, follows the theme) */
.concept-art {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  --art-bg: var(--panel);
  --art-halo: var(--bg);
  --art-fabric-a: #b9c0b3;
  --art-fabric-b: #d3d8cc;
  --art-edge: #7d867a;
  --art-fold: #eef0e9;
  --art-cuff: #c4cabd;
  --art-rib: rgba(23, 25, 22, .13);
  --art-opening: #4d544b;
  --art-tag-ink: #2f3a12;
  --art-wave: #7f9a1f;
  --art-phone: #1a1d1b;
  --art-phone-edge: #0d0f0e;
  font-family: var(--font);
}
[data-theme="dark"] .concept-art {
  --art-fabric-a: #3a423b;
  --art-fabric-b: #566056;
  --art-edge: #7c867b;
  --art-fold: #8b968a;
  --art-cuff: #4c554c;
  --art-rib: rgba(239, 241, 234, .12);
  --art-opening: #0b0d0c;
  --art-wave: var(--accent);
  --art-phone: #050606;
  --art-phone-edge: #3b423c;
}
.art-bg { fill: var(--art-bg); }
.art-halo { fill: var(--art-halo); opacity: .75; }
.art-orbit { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 2 10; }
.art-stop-fabric-a { stop-color: var(--art-fabric-a); }
.art-stop-fabric-b { stop-color: var(--art-fabric-b); }
.art-fabric { fill: url(#art-fabric); stroke: var(--art-edge); stroke-width: 2.5; }
.art-fold { fill: none; stroke: var(--art-fold); stroke-width: 4; stroke-linecap: round; opacity: .55; }
.art-seam { fill: none; stroke: var(--art-edge); stroke-width: 1.6; stroke-dasharray: 5 7; opacity: .55; }
.art-cuff { fill: var(--art-cuff); stroke: var(--art-edge); stroke-width: 2.5; }
.art-rib { stroke: var(--art-rib); stroke-width: 2; stroke-linecap: round; }
.art-opening { fill: var(--art-opening); }
.art-opening-rim { fill: none; stroke: var(--art-edge); stroke-width: 2.5; }
.art-tag-body { fill: var(--accent); stroke: var(--art-tag-ink); stroke-width: 1.5; }
.art-tag-stitch { fill: none; stroke: var(--art-tag-ink); stroke-width: 1.2; stroke-dasharray: 3 3.5; opacity: .45; }
.art-tag-coil { fill: none; stroke: var(--art-tag-ink); stroke-width: 1.6; }
.art-waves path { fill: none; stroke: var(--art-wave); stroke-width: 3; stroke-linecap: round; }
.art-phone { fill: var(--art-phone); stroke: var(--art-phone-edge); stroke-width: 3; }
.art-screen { fill: var(--paper); }
.art-ui-accent { fill: var(--accent-ink); opacity: .85; }
.art-ui-ink { fill: var(--fg); opacity: .8; }
.art-ui-orbit { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 1.5 5; }
.art-ui-ring { fill: none; stroke: var(--line); stroke-width: 3; }
.art-ui-progress { fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 68 100; }
.art-ui-breath { fill: var(--accent); opacity: .25; transform-box: fill-box; transform-origin: center; }
.art-ui-core { fill: var(--accent); opacity: .45; }
.art-ui-time { fill: var(--fg); font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.art-ui-button { fill: var(--accent); }
.art-ui-muted { fill: var(--fg); opacity: .2; }
.art-leader { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.art-leader-dot { fill: var(--accent); stroke: var(--art-tag-ink); stroke-width: 1.5; }
.art-phone-shadow rect { fill: #000; opacity: .035; }
.art-note { fill: var(--muted); font-size: 17px; font-weight: 500; }
.art-note-index { fill: var(--accent-ink); font-weight: 600; letter-spacing: .08em; }
@media (prefers-reduced-motion: no-preference) {
  .art-waves path { animation: art-wave 2.8s ease-in-out infinite; }
  .art-waves path:nth-child(2) { animation-delay: .35s; }
  .art-waves path:nth-child(3) { animation-delay: .7s; }
  .art-ui-breath { animation: breathe 10s ease-in-out infinite; }
}
@keyframes art-wave { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* How it works */
.how-section { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(0, 1.15fr); column-gap: clamp(48px, 10vw, 140px); row-gap: 40px; border-top: 1px solid var(--line); }
.section-heading { align-self: start; }
.section-heading h2, .modes-heading h2, .faq-heading h2 {
  max-width: 14ch;
  margin-top: 18px;
  font-size: clamp(36px, 4.2vw, 56px);
  letter-spacing: -.025em;
  line-height: 1.08;
}
.section-intro { max-width: 44ch; margin-top: 20px; color: var(--muted); font-size: 16px; }
.steps { padding: 0; margin: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 38px minmax(0, 1fr) 44px; align-items: start; gap: 20px; padding-block: 26px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; padding-top: 0; }
.step-number { padding-top: 7px; color: var(--accent-ink); font-size: 12px; font-weight: 600; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 23px; font-weight: 400; letter-spacing: -.02em; line-height: 1.25; }
.steps p { max-width: 46ch; margin-top: 6px; color: var(--muted); font-size: 15px; }
.step-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--fg); }
.step-icon svg { width: 20px; height: 20px; }
.technical-note { grid-column: 2; display: flex; gap: 12px; max-width: 68ch; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.note-mark { display: grid; flex: 0 0 22px; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent-ink); font-family: var(--font-display); font-size: 12px; font-weight: 600; }

/* Modes */
.modes-section { background: var(--panel); }
.modes-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.modes-heading > p { max-width: 40ch; margin-bottom: 6px; color: var(--muted); font-size: 15px; }
.mode-groups { display: grid; gap: 44px; margin-top: 46px; }
.mode-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.mode-group-head h3 { font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }
.mode-list { padding: 0; margin: 0; border-top: 1px solid var(--line-strong); list-style: none; }
.mode-list li { border-bottom: 1px solid var(--line-strong); }
.mode-button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 110px 38px;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 96px;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-align: left;
  transition: padding .3s var(--ease);
}
.mode-button:hover { padding-inline: 10px; }
.mode-emblem { width: 40px; height: 40px; color: var(--fg); }
.mode-copy { display: grid; gap: 3px; min-width: 0; }
.mode-copy strong { font-family: var(--font-display); font-size: 21px; font-weight: 400; letter-spacing: -.02em; line-height: 1.25; }
.mode-copy small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.mode-meta { display: grid; justify-items: end; gap: 4px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.mode-open { width: 38px; height: 38px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--fg); transition: background .2s ease, color .2s ease, border-color .2s ease; }
.mode-button:hover .mode-open, .mode-button:focus-visible .mode-open { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.mode-footnote { margin-top: 18px; color: var(--muted); font-size: 13px; }

/* Prototype status */
.prototype-section { padding-block: clamp(66px, 9vw, 112px); }
.prototype-card { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 5vw, 64px); padding: clamp(28px, 5vw, 56px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.prototype-mark { width: 96px; height: 96px; color: var(--fg); }
.prototype-card h2 { margin-top: 14px; font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -.025em; line-height: 1.12; }
.prototype-card > div > p:last-child { max-width: 62ch; margin-top: 14px; color: var(--muted); font-size: 15px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; max-width: 200px; color: var(--fg); font-size: 14px; font-weight: 600; text-decoration: none; }
.text-link svg { flex: 0 0 auto; width: 34px; height: 34px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 50%; }
.text-link:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* FAQ */
.faq-section { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: clamp(42px, 9vw, 120px); border-top: 1px solid var(--line); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 22px 44px 22px 0; cursor: pointer; font-family: var(--font-display); font-size: 19px; font-weight: 400; letter-spacing: -.01em; line-height: 1.35; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after { content: ""; position: absolute; top: 50%; right: 6px; width: 14px; height: 1.5px; background: var(--fg); transition: transform .25s var(--ease); }
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list details p { max-width: 66ch; padding: 0 44px 24px 0; color: var(--muted); font-size: 15px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 22px; min-height: 96px; padding-block: 22px; }
.footer-inner .logo { margin-right: auto; font-size: 22px; }
.footer-inner p { max-width: 36ch; color: var(--muted); font-size: 12px; }
.footer-year { color: var(--muted); font-size: 12px; }

/* 404 */
.not-found { display: flex; min-height: calc(100svh - 76px); flex-direction: column; align-items: center; justify-content: center; padding-block: 80px; text-align: center; }
.not-found-mark { width: 88px; height: 88px; margin-bottom: 26px; color: var(--fg); }
.not-found-code { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .16em; }
.not-found h1 { max-width: 16ch; margin-top: 20px; font-size: clamp(38px, 6vw, 62px); letter-spacing: -.025em; line-height: 1.08; }
.not-found-copy { max-width: 46ch; margin-top: 18px; margin-bottom: 30px; color: var(--muted); font-size: 16px; }

/* Ritual session */
.ritual-session {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 26px;
  background: var(--bg);
  color: var(--fg);
  --breath: 10s;
  --burn: 1;
}
.ritual-session.is-open { display: flex; }
.ritual-session[data-mode="rain"] { --breath: 8s; }
.ritual-session[data-mode="dawn"] { --breath: 9s; }
.ritual-session[data-mode="sea"] { --breath: 11s; }
.ritual-session[data-mode="deep"] { --breath: 15s; }
.ritual-session[data-mode="sleep"] { --breath: 12s; }
.ritual-session[data-mode="move"] { --breath: .98s; }
.ritual-backdrop { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent) 9%, var(--bg)) 0, var(--bg) 62%); }
/* drawn small and scaled up, which already softens it; a CSS blur on a
   full-screen layer that changes 24 times a second is heavy for weak GPUs */
.ritual-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the photograph: wider than the screen, drifting slowly one way and then back */
.ritual-photo {
  position: absolute;
  top: 0;
  left: -8%;
  width: 116%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.ritual-photo.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ritual-photo { animation: pan 20s ease-in-out infinite alternate; }
}
@keyframes pan { from { transform: translateX(-4.6%) scale(1.04); } to { transform: translateX(4.6%) scale(1.04); } }
.ritual-card {
  position: relative;
  width: min(470px, 100%);
  padding: clamp(30px, 5vw, 46px);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 28px;
  background: color-mix(in srgb, var(--paper) 34%, transparent);
  -webkit-backdrop-filter: blur(9px) saturate(1.15);
  backdrop-filter: blur(9px) saturate(1.15);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 30px 80px rgba(0, 0, 0, .22);
  text-align: center;
}
[data-theme="dark"] .ritual-card { border-color: rgba(255, 255, 255, .2); background: color-mix(in srgb, #0c0e0d 36%, transparent); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 30px 80px rgba(0, 0, 0, .35); }
.ritual-card .session-note, .ritual-card .session-prototype, .ritual-card .volume-control, .ritual-card .duration-control { color: var(--fg); opacity: .78; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ritual-card { background: color-mix(in srgb, var(--paper) 94%, transparent); }
}
.dialog-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.dialog-close::before, .dialog-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 1.5px; background: var(--muted); transform: translate(-50%, -50%) rotate(45deg); }
.dialog-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.dialog-close:hover { border-color: var(--fg); }
.session-eyebrow { justify-content: center; margin-top: 4px; color: var(--fg); }
.session-emblem { width: 22px; height: 22px; }
.ritual-card h2 { margin-top: 12px; font-size: clamp(30px, 6vw, 40px); letter-spacing: -.025em; }
.timer-wrap { position: relative; display: grid; place-items: center; width: 180px; height: 180px; margin: 18px auto 12px; }
.ritual-card .session-prototype { display: none; }
.timer-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.timer-orbit { fill: none; stroke: var(--line-strong); stroke-width: 1.2; stroke-dasharray: 1.5 6; }
.timer-track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.timer-progress { fill: none; stroke: var(--accent-ink); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100 100; transition: stroke-dashoffset .25s linear; }
.timer-breath { fill: var(--accent); opacity: .22; transform-box: fill-box; transform-origin: center; }
.timer-core { fill: var(--accent); opacity: .5; }
[data-theme="dark"] .timer-core, [data-theme="dark"] .art-ui-core { opacity: .28; }
@media (prefers-reduced-motion: no-preference) {
  .ritual-session.is-running .timer-breath { animation: breathe var(--breath) ease-in-out infinite; }
}
/* inhale for the first 40% of the cycle, exhale for the rest */
@keyframes breathe { 0%, 100% { transform: scale(.82); } 40% { transform: scale(1.18); } }
/* rings that leave the circle: one with each inhale, a fainter one with each exhale */
.timer-ripple { fill: none; stroke: var(--accent-ink); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; vector-effect: non-scaling-stroke; }
@media (prefers-reduced-motion: no-preference) {
  .ritual-session.is-running .timer-ripple { animation: ripple var(--breath) linear infinite; }
  .ritual-session.is-running .timer-ripple.is-exhale { animation-name: ripple-soft; }
}
@keyframes ripple {
  0% { opacity: 0; transform: scale(.85); }
  4% { opacity: .75; transform: scale(.95); }
  40% { opacity: .38; transform: scale(1.75); }
  75% { opacity: 0; transform: scale(2.3); }
  100% { opacity: 0; transform: scale(2.3); }
}
@keyframes ripple-soft {
  0%, 40% { opacity: 0; transform: scale(.95); }
  44% { opacity: .4; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.2); }
}
.session-time { position: relative; z-index: 1; color: var(--fg); font-size: 40px; font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.session-note { max-width: 36ch; margin: 18px auto 0; color: var(--muted); font-size: 12px; }
.duration-control { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.duration-control output { min-width: 64px; color: var(--fg); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.step-button { position: relative; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; transition: border-color .2s ease, opacity .2s ease; }
.step-button:hover:not(:disabled) { border-color: var(--fg); }
.step-button:disabled { opacity: .35; cursor: not-allowed; }
.step-button::before, .step-button.is-plus::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 1.5px; background: var(--fg); transform: translate(-50%, -50%); }
.step-button.is-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.session-rules { display: grid; gap: 8px; max-width: 34ch; margin: 14px auto 0; color: var(--fg); font-size: 13px; font-weight: 300; line-height: 1.45; opacity: .78; text-align: center; }
.session-rules span { display: block; }
.session-error { margin-top: 13px; color: var(--danger); font-size: 13px; }
.session-feedback { margin-top: 13px; color: var(--accent-ink); font-size: 13px; }
.volume-control { display: flex; align-items: center; gap: 15px; max-width: 300px; margin: 22px auto; color: var(--muted); font-size: 13px; }
.volume-control label { white-space: nowrap; }
.volume-control input { width: 100%; accent-color: var(--accent-ink); }
.session-actions { display: flex; justify-content: center; gap: 10px; }
.session-actions .button { min-width: 128px; }
/* one main action in the middle, «Завершить» as a quiet line under it */
.session-actions.is-session { flex-direction: column; align-items: center; gap: 6px; }
.session-actions.is-session .button { min-width: 168px; }
.session-finish { padding: 8px 14px; border: 0; background: none; color: var(--fg); font: inherit; font-size: 14px; opacity: .62; cursor: pointer; transition: opacity .2s ease; }
.session-finish:hover, .session-finish:focus-visible { opacity: 1; }
/* session length: values on one line */
.duration-scale { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 340px; margin: 6px auto 0; color: var(--fg); }
.duration-line { position: relative; display: flex; flex: 1; justify-content: space-between; }
.duration-line::before { content: ""; position: absolute; left: 14px; right: 14px; top: 50%; height: 1px; background: var(--line-strong); }
.duration-line button { position: relative; min-width: 30px; height: 30px; padding: 0 2px; border: 1px solid transparent; border-radius: 999px; background: var(--paper); color: var(--fg); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--fg) 72%, transparent); cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease; }
[data-theme="dark"] .duration-line button { background: #1a1c1b; }
.duration-line button:hover:not(:disabled) { color: var(--fg); border-color: var(--line-strong); }
.duration-line button[aria-checked="true"] { border-color: var(--accent-ink); background: var(--accent); color: #111; font-weight: 600; }
.duration-line button:disabled { color: color-mix(in srgb, var(--fg) 26%, transparent); cursor: not-allowed; }
.duration-line button[aria-checked="true"]:disabled { color: #111; opacity: .6; }
.duration-unit { color: var(--fg); font-size: 12px; opacity: .6; }
.ritual-moods { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.ritual-moods > p { margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.mood-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mood-button { padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; font-size: 13px; }
.mood-button:hover { border-color: var(--accent-ink); }
.session-prototype { margin-top: 24px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 36px; }
  .how-section { grid-template-columns: 1fr; gap: 40px; }
  .technical-note { grid-column: 1; }
  .prototype-card { grid-template-columns: 80px minmax(0, 1fr); }
  .prototype-mark { width: 80px; height: 80px; }
  .text-link { grid-column: 2; max-width: none; }
  .faq-section { grid-template-columns: 1fr; gap: 35px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .site-header { min-height: 66px; }
  .header-nav { display: none; }
  .header-actions { margin-left: auto; gap: 7px; }
  .icon-button { width: 38px; height: 38px; }
  .header-cta { padding: 10px 14px; font-size: 13px; }
  .hero { grid-template-columns: 1fr; align-content: start; gap: 38px; padding-top: 40px; padding-bottom: 64px; }
  .hero h1 { max-width: 11ch; margin-top: 20px; font-size: clamp(44px, 12.5vw, 64px); }
  .hero-lead { margin-top: 20px; font-size: 17px; }
  .hero-actions .button { flex: 1 1 auto; }
  .concept-art { border-radius: 14px; }
  .art-notes { display: none; }
  .section { padding-block: 80px; }
  .section-heading h2, .modes-heading h2 { font-size: 38px; }
  .steps li { grid-template-columns: 28px minmax(0, 1fr) 40px; gap: 14px; }
  .step-icon { width: 40px; height: 40px; }
  .modes-heading { display: block; }
  .modes-heading > p { margin-top: 16px; }
  .mode-groups { margin-top: 30px; gap: 34px; }
  .mode-group-head { display: grid; gap: 2px; }
  .mode-button { grid-template-columns: 34px minmax(0, 1fr) 32px; gap: 6px 14px; min-height: 0; padding-block: 20px; }
  .mode-emblem { width: 32px; height: 32px; align-self: start; }
  .mode-copy strong { font-size: 20px; }
  .mode-copy small { font-size: 13px; }
  .mode-meta { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 10px; justify-items: start; font-size: 12px; }
  .mode-open { grid-column: 3; grid-row: 1; width: 32px; height: 32px; padding: 7px; }
  .prototype-card { grid-template-columns: 1fr; gap: 22px; padding: 26px; }
  .prototype-mark { width: 60px; height: 60px; }
  .prototype-card h2 { font-size: 32px; }
  .text-link { grid-column: 1; }
  .faq-list summary { font-size: 18px; }
  .footer-inner { flex-wrap: wrap; gap: 12px 19px; }
  .footer-inner .logo { flex-basis: 100%; }
  .footer-inner p { max-width: none; flex: 1 1 100%; }
  .footer-year { margin-left: auto; }
  .ritual-session { align-items: flex-start; padding: 36px 26px; }
  .ritual-card { width: min(338px, 100%); margin-block: auto; padding: 20px 14px 14px; border-radius: 24px; }
  .ritual-card .session-rules { max-width: 30ch; font-size: 11.5px; }
  .ritual-card .volume-control { margin-block: 12px; }
  .ritual-card h2 { font-size: 28px; }
  .timer-wrap { width: 132px; height: 132px; margin-block: 10px 8px; }
  .duration-line button { min-width: 26px; height: 26px; font-size: 12px; }
  .duration-scale { gap: 5px; }
  .session-rules { margin-top: 12px; font-size: 12px; }
  .volume-control { margin-block: 14px; }
  .ritual-card .session-prototype { display: none; }
  .session-time { font-size: 30px; }
}
@media (max-width: 370px) {
  :root { --gutter: 16px; }
  .logo { font-size: 23px; }
  .header-cta { padding-inline: 11px; }
}


/* ---------------------------------------------------------------- shared bits */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--fg); }
.text-button.is-danger { color: var(--danger); }
.step-button.is-prev::before, .step-button.is-next::before { width: 8px; height: 8px; border: solid var(--fg); border-width: 0 0 1.5px 1.5px; background: none; }
.step-button.is-prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.step-button.is-next::before { transform: translate(-70%, -50%) rotate(-135deg); }

/* ------------------------------------------------------- session: two steps */
.ritual-card[data-step="word"] .session-step, .ritual-card[data-step="session"] .word-step { display: none; }
.word-step h2 { margin-top: 12px; }
.word-text { max-width: 34ch; margin: 12px auto 0; color: var(--fg); opacity: .8; font-size: 14px; }
.word-field { position: relative; margin: 28px auto 8px; max-width: 320px; }
.word-field input {
  width: 100%;
  padding: 14px 4px 10px;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-script);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
  transition: opacity .3s ease;
}
.word-field input::placeholder { color: var(--fg); opacity: .35; }
.word-field input:focus { outline: none; border-color: var(--accent-ink); }
.word-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-top: 4px; color: var(--fg); font-family: var(--font-script); font-size: 42px; font-weight: 400; letter-spacing: 0; pointer-events: none; }
.word-step.is-releasing input { opacity: 0; }
.word-stage span { display: inline-block; white-space: pre; }
.word-stage.is-dissolving span { animation: dissolve 2.4s cubic-bezier(.3, 0, .2, 1) forwards; }
@keyframes dissolve {
  0% { opacity: 1; filter: blur(0); transform: none; }
  35% { opacity: .9; }
  100% { opacity: 0; filter: blur(12px); transform: translateY(-34px) scale(1.25); }
}
.word-stage.is-dissolving.is-keeping span { animation-name: keep; animation-duration: 2.6s; }
@keyframes keep {
  0% { opacity: 1; transform: none; text-shadow: none; }
  40% { opacity: 1; color: var(--accent-ink); text-shadow: 0 0 18px var(--accent); transform: translateY(-6px); }
  100% { opacity: 0; color: var(--accent-ink); text-shadow: 0 0 34px var(--accent); transform: translateY(-40px) scale(.9); }
}
.word-done { margin: 6px 0 4px; color: var(--accent-ink); font-family: var(--font-display); font-size: 18px; font-weight: 300; }
.word-step .session-actions { margin-top: 22px; }

/* ------------------------------------------------------------- session tools */
.session-tools { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
/* phones only: a gentle pointer to the night light that keeps the screen on */
.night-hint { display: none; margin: 8px auto 0; padding: 2px 4px; border: 0; background: none; color: var(--fg); font: inherit; font-size: 12px; font-weight: 300; line-height: 1.4; opacity: .7; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--fg) 30%, transparent); text-underline-offset: 3px; cursor: pointer; }
@media (pointer: coarse) { .night-hint { display: block; } }
/* icon-only round buttons; the name appears as a small label on hover or focus */
.tool-button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--fg); transition: border-color .2s ease, background .2s ease; }
.tool-button::after { content: attr(aria-label); position: absolute; top: calc(100% + 6px); left: 50%; padding: 3px 8px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, -2px); transition: opacity .2s ease, transform .2s ease; z-index: 2; }
.tool-button:hover::after, .tool-button:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.tool-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tool-button:hover { border-color: var(--fg); }
.tool-button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tool-hint { max-width: 32ch; margin: 10px auto 0; color: var(--fg); opacity: .8; font-size: 12px; }
.together-panel { margin-top: 14px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 14px; text-align: left; }
.together-panel p { color: var(--fg); font-size: 13px; line-height: 1.45; }
.together-link { display: flex; gap: 8px; margin-top: 10px; }
.together-link input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--paper) 50%, transparent); color: var(--fg); font-size: 12px; }
.together-link .button { min-height: 36px; padding: 6px 14px; font-size: 12px; }
.together-panel .together-hint { margin-top: 8px; font-size: 12px; color: var(--muted, var(--fg)); opacity: .8; }

/* ------------------------------------------------------------------ candle */
.candle {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0a0705;
  cursor: pointer;
}
.candle[hidden] { display: none; }
.candle:focus { outline: none; }
.candle-glow { position: absolute; left: 50%; bottom: 0; width: 140vmax; height: 140vmax; transform: translate(-50%, 50%); background: radial-gradient(circle, rgba(255, 168, 82, .30) 0, rgba(255, 138, 60, .10) 20%, rgba(10, 7, 5, 0) 46%); opacity: calc(.2 + var(--burn) * .8); transition: opacity 4s ease; }
/* a dark table the candle stands on, lit only near the flame */
.candle::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30vh; background: linear-gradient(to bottom, rgba(40, 26, 16, 0), rgba(40, 26, 16, .45) 8%, rgba(10, 7, 5, .95)); pointer-events: none; }
.candle-note { position: absolute; z-index: 2; top: calc(40px + env(safe-area-inset-top, 0px)); left: 50%; width: min(86vw, 420px); transform: translateX(-50%); color: rgba(255, 220, 170, .62); font-size: 14px; line-height: 1.5; text-align: center; transition: color 1.2s ease; }
.candle-light { position: absolute; z-index: 1; left: 50%; bottom: 30vh; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); }
.candle-halo { position: absolute; left: 50%; bottom: calc(60px + var(--burn) * 150px); width: 240px; height: 240px; transform: translate(-50%, 34%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 120, .34) 0, rgba(255, 150, 70, .12) 34%, rgba(255, 120, 40, 0) 66%); transition: opacity 3s ease; pointer-events: none; }
.candle-flame { position: relative; width: 28px; height: 74px; margin-bottom: -2px; transform-origin: 50% 100%; transition: opacity 3s ease, transform 3s ease; }
.candle-flame span { position: absolute; left: 50%; transform: translateX(-50%); }
.flame-outer { bottom: 0; width: 26px; height: 72px; border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%; background: radial-gradient(ellipse 60% 70% at 50% 78%, #fff7df 0, #ffe2a0 24%, #ffb24e 52%, rgba(255, 120, 34, .55) 70%, rgba(255, 100, 30, 0) 82%); filter: blur(1.4px); }
.flame-core { bottom: 6px; width: 11px; height: 30px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 70%, #ffffff 0, #fff6d6 50%, rgba(255, 240, 200, 0) 100%); filter: blur(1px); }
.flame-base { bottom: 0; width: 12px; height: 13px; border-radius: 50%; background: radial-gradient(ellipse at 50% 70%, rgba(90, 130, 255, .55), rgba(90, 130, 255, 0) 70%); filter: blur(1.5px); }
.candle-wick { position: relative; width: 3px; height: 13px; border-radius: 2px 2px 1px 1px; background: linear-gradient(to bottom, #ff9a4a 0, #3a2414 35%, #1a110b 100%); transform: rotate(4deg); transform-origin: 50% 100%; transition: background 3s ease; }
.candle-body {
  position: relative;
  width: 74px;
  height: calc(60px + var(--burn) * 150px);
  border-radius: 4px 4px 6px 6px;
  background:
    linear-gradient(to bottom, rgba(255, 186, 110, .55) 0, rgba(255, 170, 96, .12) 22%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .35) 100%),
    linear-gradient(90deg, #5e4f3e 0, #b9a888 14%, #efe2c8 36%, #fbf2df 46%, #e6d6b8 62%, #a8967a 84%, #4f4234 100%);
  box-shadow: inset 0 6px 10px -6px rgba(255, 200, 130, .7);
  transition: filter 3s ease;
}
/* the melted pool on top, lit through the wax */
.candle-pool { position: absolute; left: 4px; right: 4px; top: -6px; height: 12px; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #ffe4b0 0, #f2d39e 45%, #d9b98a 75%, #b89a72 100%); box-shadow: 0 0 10px rgba(255, 190, 110, .5); }
.candle-drip { position: absolute; left: 14px; top: 2px; width: 6px; height: 24px; border-radius: 0 0 3px 3px / 0 0 6px 6px; background: linear-gradient(90deg, rgba(190, 172, 140, .5), rgba(252, 244, 226, .75) 50%, rgba(190, 172, 140, .5)); box-shadow: 1px 1px 2px rgba(60, 40, 20, .18); }
.candle-drip.is-second { left: auto; right: 18px; height: 14px; width: 6px; }
.candle-reflection { position: absolute; left: 50%; bottom: -14px; width: 280px; height: 30px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 170, 90, .22), rgba(255, 150, 70, 0) 70%); opacity: calc(.3 + var(--burn) * .7); transition: opacity 3s ease; }
.candle-smoke { position: absolute; left: 50%; bottom: calc(73px + var(--burn) * 150px); width: 0; height: 0; }
.candle-smoke span { position: absolute; left: -6px; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: rgba(200, 190, 180, .35); filter: blur(5px); opacity: 0; }
/* out: the flame shrinks and fades, the wick cools, a little smoke rises */
.candle.is-out .candle-flame { opacity: 0; transform: scale(.3, .2); }
.candle.is-out .candle-halo { opacity: 0; animation: none; }
.candle.is-out .candle-body { filter: brightness(.42) saturate(.8); }
.candle.is-out .candle-glow { opacity: .06; }
.candle.is-out .candle-reflection { opacity: .1; }
.candle.is-out .candle-wick { background: linear-gradient(to bottom, #4a2e1c 0, #2a1b11 35%, #1a110b 100%); }
.candle.is-out .candle-note { color: rgba(255, 220, 170, .5); }
@media (prefers-reduced-motion: no-preference) {
  .candle-flame { animation: flicker 2.6s ease-in-out infinite; }
  .flame-outer { animation: flame-sway 1.7s ease-in-out infinite alternate; }
  .candle-halo { animation: halo 3.4s ease-in-out infinite; }
  .candle.is-out .candle-flame { animation: none; }
  .candle.is-out .candle-smoke span { animation: smoke 5.5s ease-out 3 both; }
  .candle.is-out .candle-smoke span:nth-child(2) { animation-delay: 1.4s; }
  .candle.is-out .candle-smoke span:nth-child(3) { animation-delay: 2.8s; }
}
@keyframes flicker {
  0%, 100% { transform: rotate(-1deg) scale(1, 1); }
  22% { transform: rotate(.8deg) scale(.98, 1.04); }
  47% { transform: rotate(-.4deg) scale(1.02, .97); }
  71% { transform: rotate(1.2deg) scale(.99, 1.03); }
  86% { transform: rotate(-.6deg) scale(1.01, .99); }
}
@keyframes flame-sway { from { transform: translateX(-50%) skewX(-2deg); } to { transform: translateX(-50%) skewX(2.5deg); } }
@keyframes halo { 0%, 100% { opacity: .92; } 40% { opacity: 1; } 65% { opacity: .85; } }
@keyframes smoke {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  15% { opacity: .55; }
  100% { opacity: 0; transform: translate(14px, -170px) scale(3.2); }
}
/* canvas candle (candle.js): one flame lights the room, the wax and the table */
.candle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.candle.has-canvas::after,
.candle.has-canvas .candle-glow,
.candle.has-canvas .candle-light { display: none; }
.candle-time { position: absolute; z-index: 2; bottom: calc(52px + env(safe-area-inset-bottom, 0px)); color: rgba(255, 214, 160, .38); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.candle-hint { position: absolute; z-index: 2; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); color: rgba(255, 214, 160, .26); font-size: 12px; }
.ritual-session.candle-on .ritual-card { visibility: hidden; }

/* ---------------------------------------------------------------- calendar */
.calendar-section { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 8vw, 110px); border-top: 1px solid var(--line); }
.calendar-heading h2 { max-width: 12ch; margin-top: 18px; font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -.025em; line-height: 1.08; }
.calendar { min-width: 0; }
.calendar-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.calendar-bar h3 { font-size: 22px; font-weight: 400; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-weekday { padding-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.cal-day { position: relative; display: grid; align-content: space-between; min-height: 72px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-day.is-blank { border-color: transparent; }
.cal-day.is-today { border-color: var(--fg); }
.cal-day.has-word { background: var(--paper); border-color: var(--line-strong); }
.cal-number { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cal-word { overflow: hidden; color: var(--accent-ink); font-family: var(--font-script); font-size: 21px; font-weight: 400; letter-spacing: 0; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { position: absolute; top: 7px; right: 8px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 600; }
.calendar-empty { margin-top: 16px; color: var(--muted); font-size: 14px; }
.calendar-actions { margin-top: 14px; }
.calendar-confirm { color: var(--fg); font-size: 13px; }
@media (max-width: 900px) {
  .calendar-section { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .cal-day { min-height: 54px; padding: 5px; border-radius: 9px; }
  .cal-word { font-size: 16px; }
  .cal-more { top: 4px; right: 4px; }
  .session-tools { gap: 6px; margin-top: 12px; }
  .word-field input, .word-stage { font-size: 36px; }
}

/* shared pause: when to start */
.together-when { display: flex; gap: 4px; margin-top: 8px; }
.chip { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--fg); font-size: 11px; line-height: 1.6; opacity: .75; transition: opacity .2s ease, border-color .2s ease; }
.chip:hover { opacity: 1; border-color: var(--line-strong); }
.chip[aria-pressed="true"] { opacity: 1; border-color: var(--fg); }

/* calendar: all words of a day on hover, or below the grid on tap */
button.cal-day { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.cal-day:hover, .cal-day.is-selected { border-color: var(--accent-ink); }
.cal-day.has-word { overflow: visible; }
.cal-word { display: block; }
.cal-pop { position: absolute; z-index: 3; left: 50%; bottom: calc(100% + 6px); display: grid; gap: 2px; min-width: 120px; padding: 8px 14px; border-radius: 14px; background: var(--paper); box-shadow: 0 12px 34px rgba(0, 0, 0, .14); border: 1px solid var(--line); color: var(--accent-ink); font-family: var(--font-script); font-size: 22px; line-height: 1.15; text-align: center; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .2s ease, transform .2s ease; }
button.cal-day:hover .cal-pop, button.cal-day:focus-visible .cal-pop { opacity: 1; transform: translate(-50%, 0); }
.cal-detail { margin-top: 16px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: 16px; }
.cal-detail-date { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.cal-detail-words { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; color: var(--accent-ink); font-family: var(--font-script); font-size: 30px; line-height: 1.2; }
@media (hover: none) { .cal-pop { display: none; } }

/* ------------------------------------------------------------ shared pause */
.daily-section { padding-top: 0; }
/* the night room sits under the 22:00 card, from 23:00 to 6:00 */
.night-card { margin-top: 18px; background: #070814; }
.night-card[hidden] { display: none; }
.daily-card { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 5vw, 64px); padding: clamp(28px, 5vw, 56px); border-radius: var(--radius); background: #0d1024; color: #f3f4ee; }
.daily-emblem { width: 72px; height: 72px; fill: none; stroke: var(--accent); stroke-width: 1.4; }
.daily-emblem .em-dot { fill: var(--accent); stroke: none; }
.daily-card .eyebrow { color: rgba(243, 244, 238, .7); }
.daily-card h2 { margin-top: 14px; font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -.025em; line-height: 1.12; }
.daily-intro { max-width: 58ch; margin-top: 14px; color: rgba(243, 244, 238, .75); font-size: 15px; }
.daily-status { margin-top: 18px; font-size: 16px; }
.daily-count { margin-top: 6px; color: var(--accent); font-size: 15px; }
.daily-count::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); vertical-align: 1px; }
.daily-actions { display: grid; justify-items: center; gap: 14px; }
.daily-actions .text-button { color: rgba(243, 244, 238, .75); }
.daily-actions .text-button:hover { color: #fff; }
.daily-done { color: var(--accent); font-size: 13px; }
.pause-number .text-button { margin-left: 4px; font-size: inherit; color: inherit; }
@media (max-width: 900px) { .daily-card { grid-template-columns: 64px minmax(0, 1fr); } .daily-emblem { width: 56px; height: 56px; } .daily-actions { grid-column: 1 / -1; justify-items: start; } }
@media (max-width: 620px) { .daily-card { grid-template-columns: 1fr; gap: 20px; padding: 26px; } .daily-card h2 { font-size: 30px; } }

/* ------------------------------------------------------------- preorder */
.preorder-section { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 7vw, 96px); align-items: start; border-top: 1px solid var(--line); }
.preorder-heading h2 { margin-top: 14px; font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -.025em; line-height: 1.1; }
.preorder-heading .section-intro { margin-top: 16px; }
.preorder-form, .preorder-done { padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.preorder-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.preorder-wide, .preorder-sizes { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; font-size: 14px; color: var(--muted); }
.field input[type="text"], .field input[type="number"], .field textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; }
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.preorder-sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.preorder-sizes legend { width: 100%; margin-bottom: 8px; }
.preorder-sizes label { position: relative; cursor: pointer; }
.preorder-sizes input { position: absolute; opacity: 0; }
.preorder-sizes span { display: inline-block; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--fg); font-size: 15px; }
.preorder-sizes small { color: var(--muted); font-size: 13px; }
.preorder-sizes input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.preorder-sizes input:checked + span small { color: inherit; opacity: .75; }
.preorder-sizes input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.preorder-qty { max-width: 180px; }
.preorder-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.5; cursor: pointer; }
.preorder-consent input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent-ink); }
.preorder-stranger { color: var(--fg); }
.preorder-stranger[hidden] { display: none; }
.preorder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preorder-status { font-size: 14px; color: var(--muted); }
.preorder-status.is-error { color: #c4472f; }
.preorder-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.preorder-done h3 { font-size: 26px; letter-spacing: -.02em; }
.preorder-done p { margin-top: 10px; color: var(--muted); }
@media (max-width: 820px) {
  .preorder-section { grid-template-columns: 1fr; }
  .preorder-form { grid-template-columns: 1fr; }
}

/* ------------------------------------------------- session card, round two */
/* breathing rings that leave the timer and spread over the whole card */
.ritual-card { isolation: isolate; }
.card-ripples { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; clip-path: inset(0 round 28px); pointer-events: none; }
.card-ripple { fill: none; stroke: var(--accent-ink); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; vector-effect: non-scaling-stroke; }
[data-theme="dark"] .card-ripple { stroke: var(--accent); }
.card-ripple.is-exhale { stroke-width: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ritual-session.is-running .card-ripple { animation: card-ripple var(--breath) linear infinite; }
  .ritual-session.is-running .card-ripple.is-exhale { animation-name: card-ripple-soft; }
  .ritual-session[data-mode="move"].is-running .card-ripple { animation-duration: calc(var(--breath) * 4); }
}
/* one ring per breath: it spreads out with the inhale (the first 40 %),
   and a second, fainter one comes back in with the exhale */
@keyframes card-ripple {
  0% { opacity: 0; transform: scale(1); animation-timing-function: cubic-bezier(.3, .6, .5, 1); }
  4% { opacity: .6; }
  40% { opacity: .22; transform: scale(calc(var(--ripple-scale, 6) * .6)); }
  60%, 100% { opacity: 0; transform: scale(var(--ripple-scale, 6)); }
}
@keyframes card-ripple-soft {
  0%, 40% { opacity: 0; transform: scale(calc(var(--ripple-scale, 6) * .6)); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  48% { opacity: .22; }
  100% { opacity: 0; transform: scale(1); }
}

/* a gift message or the thought for a program evening */
.ritual-note { display: grid; gap: 4px; max-width: 30ch; margin: 10px auto 0; color: var(--fg); }
.ritual-note-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.ritual-note-text { font-family: var(--font-script); font-size: 26px; line-height: 1.15; letter-spacing: 0; }
.ritual-note-label + .ritual-note-text { font-family: inherit; font-size: 14px; font-weight: 300; line-height: 1.45; opacity: .85; }
.ritual-note-from { font-size: 13px; opacity: .7; }

/* swipe to confirm: a quiet pill, the knob travels to the end */
.swipe { position: relative; display: flex; align-items: center; width: min(260px, 100%); height: 52px; margin: 22px auto 0; padding: 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: color-mix(in srgb, var(--fg) 6%, transparent); --swipe: 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.swipe::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); opacity: calc(var(--swipe) * .35); pointer-events: none; }
.swipe-label { position: absolute; inset: 0 18px 0 58px; display: flex; align-items: center; justify-content: center; color: var(--fg); font-size: 13px; letter-spacing: .01em; white-space: nowrap; opacity: calc(.78 - var(--swipe) * .9); pointer-events: none; }
.swipe-knob { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #111; cursor: grab; touch-action: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.swipe-knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.swipe.is-dragging .swipe-knob { cursor: grabbing; }
.swipe.is-done .swipe-knob { background: var(--fg); color: var(--bg); }
.swipe.is-quiet { height: 46px; margin-top: 12px; background: transparent; }
.swipe.is-quiet .swipe-knob { width: 38px; height: 38px; background: transparent; border: 1px solid var(--line-strong); color: var(--fg); box-shadow: none; }
.swipe.is-quiet .swipe-label { left: 50px; font-size: 12.5px; }
@media (prefers-reduced-motion: no-preference) {
  .swipe:not(.is-dragging) .swipe-label { animation: swipe-shine 3.2s ease-in-out infinite; }
  .swipe.is-nudge .swipe-knob { animation: swipe-nudge .6s ease; }
}
@keyframes swipe-shine { 0%, 100% { opacity: .78; } 50% { opacity: .45; } }
@keyframes swipe-nudge { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(26px); } 70% { transform: translateX(-3px); } }
.swipe-hint { max-width: 30ch; margin: 10px auto 0; color: var(--fg); font-size: 12px; font-weight: 300; opacity: .6; }
.word-step .swipe { margin-top: 18px; }

/* length: one quiet line, ‹ 30 min › */
.duration-step { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 2px auto 0; color: var(--fg); }
.duration-value { min-width: 82px; font-size: 15px; font-weight: 300; letter-spacing: .02em; text-align: center; font-variant-numeric: tabular-nums; }
.duration-value output { font-weight: 400; }
.duration-arrow { position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fg); cursor: pointer; opacity: .7; transition: opacity .2s ease, background .2s ease; }
.duration-arrow::before { content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 1.4px 1.4px; }
.duration-arrow.is-less::before { transform: translate(-30%, -50%) rotate(45deg); }
.duration-arrow.is-more::before { transform: translate(-70%, -50%) rotate(-135deg); }
.duration-arrow:hover:not(:disabled) { opacity: 1; background: color-mix(in srgb, var(--fg) 8%, transparent); }
.duration-arrow:disabled { opacity: .18; cursor: default; }
.duration-step.is-locked .duration-arrow { visibility: hidden; }

/* volume: slide along the timer; the arc and the number show only meanwhile */
.timer-wrap { touch-action: none; cursor: ns-resize; border-radius: 50%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.timer-wrap:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }
.timer-volume { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100 100; opacity: 0; transition: opacity .35s ease; }
.volume-readout { position: absolute; left: 0; right: 0; bottom: 18%; z-index: 1; color: var(--fg); font-size: 11px; letter-spacing: .06em; opacity: 0; transition: opacity .35s ease; }
.timer-wrap.is-volume .timer-volume { opacity: .7; }
.timer-wrap.is-volume .volume-readout { opacity: .75; }

/* SOS minute: 4 in, 7 hold, 8 out */
.ritual-session[data-mode="sos"] { --breath: 19s; }
@media (prefers-reduced-motion: no-preference) {
  .ritual-session[data-mode="sos"].is-running .timer-breath { animation-name: breathe-478; }
}
@keyframes breathe-478 { 0%, 100% { transform: scale(.78); } 21%, 58% { transform: scale(1.22); } }
.breath-phase { min-height: 1.4em; margin: 6px auto 0; color: var(--fg); font-size: 16px; font-weight: 300; letter-spacing: .01em; }
.ritual-card[data-mode="sos"] .duration-step,
.ritual-card[data-mode="sos"] .session-rules,
.ritual-card[data-mode="sos"] #demo-together-toggle,
.ritual-card[data-mode="sos"] #demo-candle-toggle,
.ritual-card[data-mode="sos"] #demo-dark-toggle { display: none; }
.sos-button { gap: 8px; }
.hero-quick { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 4px 0; border: 0; background: none; color: var(--fg); font: inherit; font-size: 15px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; cursor: pointer; }
.hero-quick:hover { text-decoration-color: currentColor; }
.hero-quick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sos-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* the shared link is still there to copy, but not on show */
.together-input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.together-link { justify-content: center; margin-top: 6px; }
.together-panel { padding: 10px 12px; text-align: center; }
.together-panel p { font-size: 12.5px; }

/* the dark screen: black, the time very dim, everything else on a tap */
.dark-screen { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; background: #000; color: #fff; cursor: default; }
.dark-screen[hidden] { display: none; }
.dark-time { font-size: 44px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.02em; opacity: .07; transition: opacity .6s ease; }
.dark-controls { display: flex; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.dark-button { padding: 10px 18px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .7); font: inherit; font-size: 14px; }
.dark-button:disabled { opacity: .3; }
.dark-hint { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); max-width: 30ch; padding: 0 20px; color: rgba(255, 255, 255, .16); font-size: 12px; text-align: center; transition: opacity .6s ease; }
.dark-screen.is-peek .dark-time { opacity: .55; }
.dark-screen.is-peek .dark-controls { opacity: 1; pointer-events: auto; }
.ritual-session.dark-on .ritual-card { visibility: hidden; }

@media (max-width: 640px) {
  /* a smaller card, low on the screen, so the moving picture stays in view */
  .ritual-session { align-items: flex-start; padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .ritual-card { width: min(312px, 100%); margin: auto auto 0; padding: 16px 14px 12px; border-radius: 26px; }
  .card-ripples { clip-path: inset(0 round 26px); }
  [data-theme="dark"] .ritual-card { background: color-mix(in srgb, #0c0e0d 26%, transparent); }
  .ritual-card { background: color-mix(in srgb, var(--paper) 26%, transparent); }
  .dialog-close { top: 10px; right: 10px; width: 34px; height: 34px; }
  .session-eyebrow { margin-top: 6px; font-size: 11px; }
  .timer-wrap { width: 118px; height: 118px; margin-block: 8px 4px; }
  .session-time { font-size: 27px; }
  .ritual-card .session-rules { margin-top: 6px; font-size: 11px; line-height: 1.4; opacity: .7; }
  .session-tools { gap: 8px; margin-top: 10px; }
  .tool-button { width: 40px; height: 40px; }
  .tool-button svg { width: 19px; height: 19px; }
  .session-actions.is-session { margin-top: 12px; }
  .session-actions.is-session .button { min-width: 150px; min-height: 46px; }
  .swipe { height: 50px; }
  .swipe.is-quiet { height: 44px; margin-top: 8px; }
  .ritual-card h2 { margin-top: 8px; font-size: 26px; }
  .word-text { font-size: 13px; }
  .word-field { margin: 18px auto 4px; }
  .ritual-note-text { font-size: 23px; }
}

/* ---------------------------------------------------------------- programs */
.programs-section { border-top: 1px solid var(--line); }
.programs-heading h2 { margin-top: 18px; font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -.025em; line-height: 1.08; }
.programs-heading .section-intro { max-width: 52ch; margin-top: 16px; color: var(--muted); }
.program-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 36px; }
.program-card { display: grid; gap: 16px; align-content: start; padding: clamp(24px, 3.5vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.program-head { display: flex; align-items: center; gap: 14px; }
.program-head h3 { font-size: 24px; font-weight: 400; letter-spacing: -.01em; }
.program-emblem { width: 34px; height: 34px; flex: none; }
.program-text { color: var(--muted); font-size: 15px; }
.program-dots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.program-dots li { width: 100%; max-width: 34px; height: 6px; border-radius: 999px; background: var(--line); }
.program-dots li.is-done { background: var(--accent-ink); }
.program-dots li.is-next { background: color-mix(in srgb, var(--accent-ink) 30%, var(--line)); }
.program-status { font-size: 15px; }
.program-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* ---------------------------------------------------------------- gift */
.gift-section { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 7vw, 96px); align-items: start; border-top: 1px solid var(--line); }
.gift-heading h2 { margin-top: 18px; font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -.025em; line-height: 1.08; }
.gift-heading .section-intro { margin-top: 16px; color: var(--muted); }
.gift-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.gift-wide { grid-column: 1 / -1; }
.gift-form select { width: 100%; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; }
.gift-form .field textarea { min-height: 64px; }
.gift-count { justify-self: end; font-size: 12px; }
.gift-result { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.gift-result input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); font-size: 13px; }
.gift-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.gift-status { min-height: 1.4em; color: var(--accent-ink); font-size: 14px; }
.gift-hint { color: var(--muted); font-size: 13px; }
@media (max-width: 820px) {
  .gift-section { grid-template-columns: 1fr; }
  .gift-form { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- your melody */
.melody-section { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 7vw, 96px); align-items: start; border-top: 1px solid var(--line); }
.melody-heading h2 { margin-top: 18px; font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -.025em; line-height: 1.08; }
.melody-heading .section-intro { margin-top: 16px; color: var(--muted); }
.melody-quiz { display: grid; gap: 20px; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-height: 240px; align-content: center; }
.melody-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.melody-stage { display: grid; gap: 18px; }
.quiz-progress { display: flex; gap: 4px; margin: -10px 0; }
.quiz-progress > * { position: relative; flex: 1; max-width: 38px; height: 25px; padding: 0; border: 0; background: none; }
.quiz-progress > *::before { content: ""; position: absolute; left: 1px; right: 1px; top: 10px; height: 5px; border-radius: 999px; background: var(--line); transition: background .2s, transform .2s; }
.quiz-progress .is-done::before { background: var(--accent-ink); }
.quiz-progress .is-now::before { background: color-mix(in srgb, var(--accent-ink) 45%, var(--line)); transform: scaleY(1.6); }
.quiz-progress button { cursor: pointer; }
.quiz-progress button:hover::before, .quiz-progress button:focus-visible::before { transform: scaleY(1.8); background: var(--fg); }
.melody-steps { width: 100%; margin-top: 10px; }
.melody-steps-hint { margin-top: -4px; color: var(--muted); font-size: 13px; }
.quiz-question { font-size: clamp(24px, 3vw, 32px); font-weight: 400; letter-spacing: -.015em; line-height: 1.2; outline: none; }
.quiz-hint { margin-top: -8px; color: var(--muted); font-size: 14px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option { display: flex; gap: 10px; }
.quiz-choice { flex: 1; min-height: 52px; padding: 12px 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--fg); font: inherit; font-size: 17px; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.quiz-choice:hover, .quiz-choice:focus-visible { border-color: var(--fg); }
.quiz-choice.is-picked { border-color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.quiz-listen { flex: none; width: 52px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--fg); font-size: 15px; cursor: pointer; }
.quiz-listen[data-playing] { border-color: var(--accent-ink); background: var(--accent); color: var(--on-accent); animation: quiz-pulse 1.6s ease-in-out infinite; }
@keyframes quiz-pulse { 50% { opacity: .65; } }
.quiz-options.is-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quiz-options.is-colors .quiz-choice { min-height: 72px; background: var(--swatch); border-color: transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.quiz-options.is-colors .quiz-choice.is-picked { box-shadow: 0 0 0 3px var(--accent-ink); }
.quiz-word { display: flex; flex-wrap: wrap; gap: 12px; }
.quiz-word input { flex: 1 1 200px; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--fg); font: inherit; font-size: 18px; }
.quiz-back { justify-self: start; }
.melody-result { display: grid; gap: 10px; justify-items: start; --melody-color: #c9a86a; }
.melody-kicker { color: var(--muted); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.melody-name { font-family: var(--font-script); font-size: clamp(44px, 6vw, 64px); line-height: 1.1; color: var(--fg); }
.melody-name::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 14px; border-radius: 50%; background: var(--melody-color); vertical-align: middle; box-shadow: 0 0 0 6px color-mix(in srgb, var(--melody-color) 25%, transparent); }
.melody-result.is-playing .melody-name::before { animation: quiz-glow 4s ease-in-out infinite; }
@keyframes quiz-glow { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--melody-color) 12%, transparent); } }
.melody-number { font-size: 15px; letter-spacing: .06em; }
.melody-summary { color: var(--muted); font-size: 14px; line-height: 1.6; }
.melody-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 8px; }
.melody-choose { margin-top: 8px; }
.melody-fine { color: var(--muted); font-size: 13px; max-width: 46ch; }
.preorder-melody { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.preorder-melody-label { color: var(--muted); font-size: 14px; }
.preorder-melody-name { font-size: 17px; }
.ritual-card[data-mode="own"] #demo-together-toggle { display: none; }
@media (max-width: 860px) {
  .melody-section { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .quiz-options.is-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .melody-intro .button { width: 100%; }
}
.preorder-melody-none { color: var(--muted); font-size: 14px; }
.preorder-melody-none a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.preorder-melody-none[hidden] { display: none; }
.preorder-badge { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.melody-what { display: grid; gap: 14px; margin-top: 24px; }
.melody-what div { padding-left: 16px; border-left: 2px solid var(--accent); }
.melody-what dt { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.melody-what dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.melody-what div + div { border-left-color: var(--line-strong); }
.preorder-section[hidden] { display: none; }

/* ---------------------------------------------- card fling, as in Tinder */
.ritual-card { touch-action: pan-y; }
.ritual-card.is-flinging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.fling-stamp { position: absolute; top: 26px; left: 22px; z-index: 5; padding: 6px 14px; border: 2px solid var(--accent-ink); border-radius: 10px; color: var(--accent-ink); font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: rotate(-12deg); pointer-events: none; }
.fling-stamp.is-left { left: auto; right: 22px; border-color: var(--fg); color: var(--fg); transform: rotate(12deg); }
[data-theme="dark"] .fling-stamp:not(.is-left) { border-color: var(--accent); color: var(--accent); }
/* the old pill stays for keyboards and screen readers; on screen it is a hint */
.swipe.is-fling { height: auto; width: auto; margin: 14px auto 0; padding: 0; border: 0; background: none; overflow: visible; justify-content: center; }
.swipe.is-fling::before { display: none; }
.swipe.is-fling .swipe-label { position: static; inset: auto; font-size: 12.5px; opacity: .7; white-space: normal; text-align: center; animation: none; }
.swipe.is-fling .swipe-knob { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.swipe.is-fling .swipe-knob:focus-visible { position: static; width: 38px; height: 38px; clip: auto; margin-left: 10px; }
.volume-hint { margin: 2px auto 0; color: var(--fg); font-size: 11.5px; font-weight: 300; opacity: .55; }
.ritual-card[data-mode="sos"] .volume-hint { display: none; }

/* «Тихий привет»: this minute, sent with one phrase */
.hello-panel { display: grid; gap: 8px; }
.hello-panel[hidden] { display: none; }
.hello-panel .hello-title { font-weight: 500; font-size: 14px; }
.hello-input { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--paper) 50%, transparent); color: var(--fg); font: inherit; font-size: 14px; }
.hello-panel .button { min-height: 38px; padding: 6px 16px; font-size: 13px; justify-self: center; }
.hello-panel .together-hint:empty { display: none; }

/* the shared cloud of words, above the calendar */
.word-cloud { margin-bottom: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; }
.word-cloud[hidden] { display: none; }
.word-cloud h3 { font-size: 17px; font-weight: 500; }
.word-cloud-intro { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.word-cloud-words { margin-top: 12px; line-height: 1.5; text-align: center; }
.cloud-word { display: inline-block; margin: 0 6px; font-weight: 300; overflow-wrap: anywhere; }
/* «Слышу»: a word is a quiet button; one already answered keeps a warm dot */
button.cloud-word { padding: 2px 4px; border: 0; border-radius: 8px; background: none; color: inherit; font-family: inherit; line-height: inherit; cursor: pointer; transition: background .2s; }
button.cloud-word:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); }
button.cloud-word.is-heard::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: #f2b35c; vertical-align: super; }
button.cloud-word.is-mine { cursor: default; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.word-cloud-mine { margin-top: 10px; font-size: 14px; font-weight: 500; text-align: center; }
.word-cloud-mine[hidden] { display: none; }
.word-cloud-hint { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; }

/* «Неделя вдвоём» on a program card */
.program-duo { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.duo-text, .duo-invite, .duo-status { font-size: 14px; line-height: 1.5; }
.duo-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.duo-invite { font-weight: 500; }
.duo-status { color: var(--muted); }
.duo-status:empty { display: none; }
.duo-form { display: flex; flex-wrap: wrap; gap: 8px; }
.duo-input { flex: 1 1 160px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--fg); font: inherit; font-size: 14px; }
.duo-form .button { min-height: 40px; padding: 6px 18px; }
.duo-row { display: flex; align-items: center; gap: 12px; }
.duo-name { flex: 0 0 auto; max-width: 9em; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.duo-row .program-dots { flex: 1 1 auto; }
.program-dots.is-partner li.is-done { background: color-mix(in srgb, var(--accent-ink) 55%, var(--line)); }
.duo-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* a pair of bracelets */
.melody-summary { white-space: pre-line; }
.quiz-pair { color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.melody-pair-note { max-width: 46ch; color: var(--fg); font-size: 14px; line-height: 1.5; }
.melody-pair-note[hidden] { display: none; }
.pair-note { max-width: 32ch; margin: 8px auto 0; color: var(--fg); font-size: 13px; line-height: 1.45; opacity: .7; transition: opacity .6s; }
.pair-note.is-together { opacity: 1; }
.pair-note[hidden] { display: none; }

/* the others in the quiet now (company.js): one small warm light each.
   Only opacity and transform move, no blur: kind to a weak graphics chip */
.company { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 34ch; margin: 8px auto 0; color: var(--fg); font-size: 13px; line-height: 1.45; text-align: center; opacity: .82; }
.company[hidden] { display: none; }
.company-lights { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.company-lights:empty { display: none; }
.company-light { width: 6px; height: 6px; border-radius: 50%; background: #f6c06a; box-shadow: 0 0 0 3px rgba(246, 192, 106, .18), 0 0 10px 2px rgba(246, 170, 80, .35); animation: company-flicker 3.6s ease-in-out infinite; }
@keyframes company-flicker { 0%, 100% { opacity: .55; transform: scale(.85); } 45% { opacity: 1; transform: scale(1); } 70% { opacity: .75; transform: scale(.92); } }
@media (prefers-reduced-motion: reduce) { .company-light { animation: none; opacity: .85; } }

/* after a pause: a light for the next one, a hello from a stranger */
.company-after { display: grid; gap: 8px; justify-items: center; max-width: 36ch; margin: 14px auto 0; text-align: center; font-size: 14px; line-height: 1.5; }
.company-after[hidden], .company-after [hidden] { display: none; }
.after-got { font-weight: 500; }
.after-heard { color: var(--muted); font-size: 13px; }
.after-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.after-row .text-button:disabled { opacity: .45; cursor: default; }
.after-phrases { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.phrase-chip { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--paper) 50%, transparent); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.phrase-chip:hover { border-color: var(--accent-ink); }
.company-after .together-hint:empty { display: none; }
