/* ========================================================================
   AERA — design system
   Dark editorial, organic, breath-first.
   ======================================================================== */

:root {
  /* palette — base */
  --bg:          #07080C;
  --bg-elev:     #0E1017;
  --ink:         #F4F1EA;
  --ink-dim:     rgba(244, 241, 234, 0.62);
  --ink-faint:   rgba(244, 241, 234, 0.28);
  --line:        rgba(244, 241, 234, 0.12);

  /* palette — state accents (also used by shader) */
  --c-calm:   #6FE0D0;   /* cool mint */
  --c-focus:  #F4C8A8;   /* warm peach */
  --c-energy: #FF7A59;   /* ember */
  --c-sleep:  #7B6CF6;   /* indigo violet */
  --c-reset:  #E6E2D3;   /* bone white */

  /* current accent (updated via JS) */
  --accent: var(--c-calm);

  /* type */
  --ff-display: 'Fraunces', 'Times New Roman', serif;
  --ff-ui:      'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* rhythm */
  --radius: 14px;
  --ease:   cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  /* safe areas */
  --pad-x: max(24px, env(safe-area-inset-left));
  --pad-y: max(24px, env(safe-area-inset-top));
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 87.5%; } /* 14px base = old zoom 0.87 equivalent */
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--ff-ui);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  /* idle screen is scrollable so the footer can live below the fold */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-color: rgba(244,241,234,0.18) transparent;
  scrollbar-width: thin;
}
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb {
  background: rgba(244,241,234,0.14);
  border-radius: 999px;
}
button {
  font: inherit; color: inherit;
  background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------ background */
#stage {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
}

.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='2.4' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pad-y) var(--pad-x);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-feature-settings: "ss01";
  color: var(--ink);
  cursor: pointer;
  transition: opacity .3s var(--ease);
}
.wordmark:hover { opacity: .85; }
.wordmark:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
  border-radius: 6px;
}
.wordmark__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent);
  transition: background .8s var(--ease), box-shadow .8s var(--ease);
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.navlink {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color .3s var(--ease), background .3s var(--ease);
}
.navlink:hover { color: var(--ink); background: rgba(255,255,255,.04); }

/* ============================================================
   VOLUME CONTROL — icon-only toggle that unfolds a vertical slider
   ============================================================ */
.volctl {
  position: relative;
  margin-left: 4px;
}
.volctl__btn {
  padding: 10px 12px;
  border-radius: 999px;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.volctl__btn .ic-mute { display: none; }
.volctl[data-muted="true"] .volctl__btn .ic-sound { display: none; }
.volctl[data-muted="true"] .volctl__btn .ic-mute  { display: inline; }

.volpop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 12px;
  width: 52px;
  background: rgba(14, 16, 23, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.volctl[data-open="true"] .volpop {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.volpop[hidden] { display: flex !important; } /* we show via [data-open] */

.volpop__track {
  height: 140px;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Vertical range slider (rotated so it works cross-browser) */
.volslider-v {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 3px;
  background: rgba(244, 241, 234, 0.2);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: background .3s var(--ease);
}
.volslider-v::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent), 0 0 2px rgba(0,0,0,.4);
  border: 0;
  transition: background .8s var(--ease), box-shadow .8s var(--ease), transform .2s var(--ease);
}
.volslider-v::-webkit-slider-thumb:hover { transform: scale(1.18); }
.volslider-v::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  box-shadow: 0 0 14px var(--accent);
}

.volpop__val {
  font-family: var(--ff-ui);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  font-feature-settings: "tnum";
}

.volpop__mute {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  transition: color .3s var(--ease), background .3s var(--ease);
}
.volpop__mute:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.volpop__mute .mute-mark { display: none; }
.volpop__mute[aria-pressed="true"] .mute-mark { display: inline; }
.volpop__mute[aria-pressed="true"] { color: var(--accent); }

/* ------------------------------------------------------------------ layout */
.stage-ui {
  position: relative;
  z-index: 5;
  display: block;
  pointer-events: none;
}
/* Fixed vignette behind the text on every screen, in front of the canvas */
.stage-vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse 65% 55% at 50% 52%,
    rgba(7, 8, 12, 0.72) 0%,
    rgba(7, 8, 12, 0.35) 40%,
    transparent 72%
  );
}

.screen {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  pointer-events: none;
}
.screen.is-active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.screen > * { pointer-events: auto; }

/* Idle screen lives in normal flow with full viewport height.
   Bottom padding is generous so the cards have breathing room and the
   user has to commit some scroll before the parallax kicks in. */
.screen--idle {
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
  padding: calc(var(--pad-y) + 80px) var(--pad-x) calc(var(--pad-y) + 120px);
  gap: 36px;
}

/* Other screens are fixed full-screen overlays so they cover the scrolled idle */
.screen--prep,
.screen--session,
.screen--done {
  position: fixed;
  inset: 0;
  padding: calc(var(--pad-y) + 80px) var(--pad-x) calc(var(--pad-y) + 80px);
  justify-content: center;
}

/* --------------------------------------------------------------- typography */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.eyebrow__line {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  transition: background .8s var(--ease);
}

.display {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-align: center;
  font-feature-settings: "ss01";
  text-shadow: 0 2px 30px rgba(7,8,12,.8), 0 1px 3px rgba(7,8,12,.6);
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  transition: color .8s var(--ease);
}
.display--sm {
  font-size: clamp(32px, 4.8vw, 60px);
}

.lede {
  max-width: 520px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 16px;
}

.hint {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin-top: -12px;
  transition: opacity .4s var(--ease), color .4s var(--ease);
}

.history {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(14,16,23,.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.history__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: background .8s var(--ease), box-shadow .8s var(--ease);
}

/* ---- expandable history wrap ---- */
.history-wrap { display: flex; flex-direction: column; align-items: center; gap: 0; }
.history { cursor: pointer; transition: background .3s var(--ease); }
.history:hover { background: rgba(14,16,23,.7); }
.history__chev {
  margin-left: 4px;
  transition: transform .35s var(--ease);
  color: var(--ink-faint);
}
.history[aria-expanded="true"] .history__chev { transform: rotate(180deg); }

.history-panel {
  width: 100%;
  max-width: 540px;
  margin-top: 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .55s var(--ease-out), opacity .35s var(--ease);
}
.history-panel.is-open {
  max-height: 360px;
  opacity: 1;
}
.history-panel__inner {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(14, 16, 23, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-height: 326px;
  overflow-y: auto;
}
.hentry {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(244,241,234,0.06);
  font-size: 12px;
}
.hentry:last-child { border-bottom: 0; }
.hentry__left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.hentry__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hentry__name {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 400;
}
.hentry__when {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-feature-settings: "tnum";
}
.hentry__cycles {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  font-feature-settings: "tnum";
}
.hentry__mood {
  font-size: 11px;
  margin-left: 6px;
  color: var(--ink-faint);
}
.hempty {
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
  padding: 18px 0;
}

/* ---- mood shortcuts ---- */
.shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  max-width: 760px;
}
.shortcut {
  padding: 12px 18px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14,16,23,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.shortcut:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(14,16,23,.78);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------- hero / idle */
/* Scroll-linked parallax — `--scrollY` is set on :root from JS (0..1) */
:root { --scrollY: 0; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  transform: translateY(calc(var(--scrollY) * -120px)) scale(calc(1 - var(--scrollY) * 0.08));
  opacity: calc(1 - var(--scrollY) * 1.2);
  will-change: transform, opacity;
}

.states-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  transform: translateY(calc(var(--scrollY) * -60px));
  opacity: calc(1 - var(--scrollY) * 0.6);
  will-change: transform, opacity;
}

.manifesto {
  /* fade in as user scrolls past 0.25 */
  opacity: clamp(0, calc((var(--scrollY) - 0.25) * 2.5), 1);
  transform: translateY(calc((1 - clamp(0, calc((var(--scrollY) - 0.25) * 2.5), 1)) * 80px));
  will-change: transform, opacity;
}
/* hide manifesto entirely on non-idle screens so it doesn't intercept clicks */
body.is-prep .manifesto,
body.is-session .manifesto,
body.is-done .manifesto {
  display: none;
}

.states {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 900px;
}
.state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  padding: 18px 20px 20px;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 16, 23, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  text-align: left;
  transition: transform .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease);
  position: relative;
  overflow: hidden;
}
.state__num { margin-bottom: 22px; }
.state__name { margin-bottom: 12px; }
.state::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 120%, var(--dot, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.state[data-state="calm"]   { --dot: rgba(111, 224, 208, 0.35); }
.state[data-state="focus"]  { --dot: rgba(244, 200, 168, 0.35); }
.state[data-state="energy"] { --dot: rgba(255, 122, 89,  0.35); }
.state[data-state="sleep"]  { --dot: rgba(123, 108, 246, 0.35); }
.state[data-state="reset"]  { --dot: rgba(230, 226, 211, 0.22); }

.state:hover,
.state:focus-visible,
.state.is-focused {
  transform: translateY(-3px);
  border-color: rgba(244, 241, 234, 0.28);
  background: rgba(14, 16, 23, 0.78);
  outline: none;
}
.state:hover::before,
.state:focus-visible::before,
.state.is-focused::before { opacity: 1; }
.state:focus-visible,
.state.is-focused {
  box-shadow: 0 0 0 1px var(--accent);
}

.state__num {
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.state__name {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}
.state__proto {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-feature-settings: "tnum";
}

/* --------------------------------------------------------------- prep */
.screen--prep {
  gap: 28px;
}
.back {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color .3s var(--ease);
}
.back:hover { color: var(--ink); }

.prep__title {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.prep__title em {
  font-style: italic;
  color: var(--accent);
  transition: color .8s var(--ease);
}
.prep__desc {
  max-width: 560px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 15px;
}

.durations {
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14,16,23,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.duration {
  min-width: 72px;
  padding: 14px 18px;
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 400;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.duration span {
  display: block;
  font-family: var(--ff-ui);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2px;
}
.duration:hover { background: rgba(255,255,255,.05); }
.duration.is-selected {
  background: var(--ink);
  color: var(--bg);
}
.duration.is-selected span { color: rgba(7,8,12,.55); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0c12;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform .4s var(--ease), background .8s var(--ease), opacity .3s var(--ease), filter .3s var(--ease);
}
.cta:hover:not([disabled]) { transform: translateY(-2px); filter: brightness(1.05); }
.cta[disabled] { opacity: .35; cursor: not-allowed; }
.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.cta--ghost:hover { background: rgba(255,255,255,.04); }

/* --------------------------------------------------------------- session */
.screen--session {
  gap: 0;
  justify-content: space-between;
  height: 100%;
  max-height: 80vh;
}
.session__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-feature-settings: "tnum";
}
.dot { color: var(--ink-faint); }

.phase {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 220px;
}
.phase__cue {
  font-family: var(--ff-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.phase__cue.is-on {
  opacity: 1;
  transform: translateY(0);
}
.phase__count {
  font-family: var(--ff-ui);
  font-feature-settings: "tnum";
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  min-height: 1.2em;
}

.session__controls {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

/* progress bar */
.progress {
  width: min(480px, 70vw);
  height: 2px;
  background: rgba(244,241,234,.1);
  border-radius: 999px;
  overflow: hidden;
  margin: 20px 0 24px;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width .35s linear, background .8s var(--ease), box-shadow .8s var(--ease);
}

/* pause button icon toggle */
#pauseBtn .ic-play,
#pauseBtn .lbl-play { display: none; }
#pauseBtn[aria-pressed="true"] .ic-pause,
#pauseBtn[aria-pressed="true"] .lbl-pause { display: none; }
#pauseBtn[aria-pressed="true"] .ic-play,
#pauseBtn[aria-pressed="true"] .lbl-play { display: inline; }
.iconbtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.iconbtn:hover { color: var(--ink); border-color: rgba(244,241,234,.28); }

/* --------------------------------------------------------------- done */
.screen--done {
  gap: 28px;
}
.done__actions {
  display: inline-flex;
  gap: 12px;
}

/* post-session reflection */
.reflect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.reflect.is-saved { opacity: 0.55; pointer-events: none; }
.reflect__q {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.reflect__opts {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14,16,23,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.reflect__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color .3s var(--ease), background .3s var(--ease);
}
.reflect__btn:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.reflect__btn.is-picked {
  color: #0b0c12;
  background: var(--accent);
}
.reflect__face {
  font-size: 14px;
  line-height: 1;
}

/* eyes-closed mode — fades all UI to black */
body.eyes-closed .topbar,
body.eyes-closed .bottombar,
body.eyes-closed .session__meta,
body.eyes-closed .session__controls,
body.eyes-closed .progress,
body.eyes-closed .grain,
body.eyes-closed .stage-vignette {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s var(--ease);
}
body.eyes-closed .phase__cue,
body.eyes-closed .phase__count {
  opacity: 0.35;
  transition: opacity 1.4s var(--ease);
}
body.eyes-closed #stage {
  filter: brightness(0.55);
  transition: filter 1.6s var(--ease);
}
.eyes-hint {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14,16,23,.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  transition: opacity .6s var(--ease);
  pointer-events: none;
}
.eyes-hint.is-visible {
  opacity: 1;
}

/* ------------------------------------------------------------------ bottom bar */
.bottombar {
  position: relative;
  z-index: 6;
  padding: 60px 0 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
/* Hide the footer when any non-idle screen is active */
body.is-prep .bottombar,
body.is-session .bottombar,
body.is-done .bottombar {
  opacity: 0;
  pointer-events: none;
}
/* The inner container is a TRAPEZOID — top edge is narrower than viewport
   (around the content) and the sides slope DOWN-OUT to reach the viewport
   bottom corners. The slopes form two right-triangle "wings" that read as
   half a rhombus descending from the bar's ends. */
.bottombar__inner {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 22px 20px calc(max(22px, env(safe-area-inset-bottom)) + 34px);
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(7,8,12,0.92), rgba(7,8,12,0.35));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: auto;
  font-feature-settings: "tnum";
  /* Trapezoid shape: top stretches only over the content, sides slope
     down-out to the viewport bottom corners. */
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0% 100%);
}
@media (max-width: 820px) {
  .bottombar__inner {
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0% 100%);
  }
}
.bb-brand {
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-dim);
  text-transform: none;
  letter-spacing: 0;
}
.bb-sep  { color: rgba(244, 241, 234, 0.18); }
.bb-copy { color: var(--ink-faint); }
.bb-tag  { color: rgba(244, 241, 234, 0.22); }
.bb-ver  { color: rgba(244, 241, 234, 0.2); }
.bb-donate {
  color: rgba(244, 241, 234, 0.4);
  text-decoration: none;
  transition: color 0.3s;
}
.bb-donate:hover { color: rgba(244, 241, 234, 0.7); }

/* ------------------------------------------------------------------ modal */
.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(560px, calc(100vw - 40px));
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px 36px;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
  z-index: 50;
}
.modal[open] { animation: modalIn .5s var(--ease-out); }
.modal::backdrop {
  background: rgba(7, 8, 12, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal h3 {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: 34px;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.modal p {
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.modal__close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 28px;
  line-height: 1;
  color: var(--ink-dim);
  transition: color .3s var(--ease);
}
.modal__close:hover { color: var(--ink); }

.sciblock { margin-top: 22px; }
.sciblock h4 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 19px;
  color: var(--accent);
  margin-bottom: 6px;
  transition: color .8s var(--ease);
}
.sciblock p { font-size: 14px; }

/* kbd shortcuts block in about modal */
.kbd { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.kbd h4 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 17px;
  margin-bottom: 14px;
  color: var(--ink);
}
.kbd dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-dim);
}
.kbd dt { display: flex; gap: 4px; align-items: center; }
.kbd dd { margin: 0; }
.kbd kbd {
  display: inline-block;
  min-width: 22px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(244,241,234,.08);
  border: 1px solid var(--line);
  font-family: var(--ff-ui);
  font-size: 11px;
  color: var(--ink);
  text-align: center;
}

/* ------------------------------------------------------------------ loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity .8s var(--ease), visibility .8s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__mark {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-calm);
  box-shadow: 0 0 24px var(--c-calm);
  animation: loaderPulse 2.4s var(--ease) infinite;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1);   opacity: .7; }
  50%      { transform: scale(1.6); opacity: 1; }
}

/* ------------------------------------------------------------------ noscript */
.noscript {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 40px;
  background: var(--bg);
  color: var(--ink);
  text-align: center;
  z-index: 200;
}

/* ============================================================
   TOPBAR EXTRAS — track switcher, settings, fullscreen, tooltip
   ============================================================ */
.iconlink {
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
#fullscreenBtn .ic-fs-off { display: none; }
body.is-fs #fullscreenBtn .ic-fs-on  { display: none; }
body.is-fs #fullscreenBtn .ic-fs-off { display: inline-block; }

/* Track soundtrack switcher — collapsible, only the core button visible */
.trackctl {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 4px;
}
.trackctl__core {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(14, 16, 23, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--accent);
  transition: color .8s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.trackctl__core:hover {
  border-color: var(--accent);
  background: rgba(14, 16, 23, 0.78);
}
.trackctl__wave {
  display: block;
  filter: drop-shadow(0 0 6px var(--accent));
  transition: filter .8s var(--ease);
}
.trackctl__pause {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  background: var(--bg-elev);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: color .8s var(--ease), border-color .8s var(--ease);
}
.trackctl__core .ic-play  { display: none; }
.trackctl__core[aria-pressed="true"] .ic-pause { display: none; }
.trackctl__core[aria-pressed="true"] .ic-play  { display: inline-block; }

/* Track popover — opens downward from the core button with prev / play / next */
.trackpop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px) scale(0.96);
  transform-origin: top center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(14, 16, 23, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  z-index: 40;
  white-space: nowrap;
}
.trackctl[data-open="true"] .trackpop {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}
.trackpop[hidden] { display: inline-flex !important; }
.trackpop__btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  transition: color .3s var(--ease), background .3s var(--ease);
}
.trackpop__btn:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.trackpop__toggle { color: var(--accent); transition: color .8s var(--ease); }
.trackpop__toggle .ic-play { display: none; }
.trackpop__toggle[aria-pressed="true"] .ic-pause { display: none; }
.trackpop__toggle[aria-pressed="true"] .ic-play  { display: inline-block; }

/* tooltip following the cursor */
.tooltip {
  position: fixed;
  z-index: 200;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(14, 16, 23, 0.95);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
  max-width: 280px;
}
.tooltip.is-on {
  opacity: 1;
  transform: translateY(0);
}

/* Custom cursor was removed in v1.7.1 — using the native system cursor. */

/* ============================================================
   MANIFESTO SECTION (visible after scrolling)
   ============================================================ */
.manifesto {
  position: relative;
  z-index: 5;
  max-width: 760px;
  margin: 0 auto;
  padding: 90px var(--pad-x) 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  pointer-events: auto;
}
.manifesto__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.manifesto__title {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(7,8,12,.85), 0 1px 3px rgba(7,8,12,.7);
  margin: 0;
}
.manifesto__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  transition: color .8s var(--ease);
}
.manifesto__body {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.manifesto__body p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-dim);
  text-shadow: 0 1px 8px rgba(7,8,12,.6);
}
.manifesto__close {
  color: var(--ink) !important;
  font-style: italic;
  font-family: var(--ff-display);
  font-size: 17px !important;
  font-weight: 400;
  margin-top: 8px;
}

/* ============================================================
   SETTINGS MODAL
   ============================================================ */
.setblock {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.setblock:first-of-type { border-top: 0; padding-top: 0; }
.setblock--danger { padding-top: 22px; }
.setrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}
.setrow__label {
  font-family: var(--ff-display);
  font-size: 16px;
  color: var(--ink);
}
.setrow__hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
}
.settoggle {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 20px;
  background: rgba(244,241,234,.14);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background .3s var(--ease);
  flex-shrink: 0;
}
.settoggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: var(--ink-dim);
  border-radius: 50%;
  transition: left .3s var(--ease), background .3s var(--ease);
}
.settoggle:checked { background: var(--accent); }
.settoggle:checked::after { left: 19px; background: #0b0c12; }

.setbtn {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.setbtn:hover {
  color: #ff8a72;
  border-color: rgba(255, 122, 89, 0.4);
}

/* ============================================================
   FOOTER COPY: Wu Wei pipe
   ============================================================ */
.bb-pipe {
  color: rgba(244, 241, 234, 0.18);
  margin: 0 4px;
}

/* ============================================================
   LANGUAGE PICKER (top bar — discoverable on first glance)
   ============================================================ */
.langctl {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 4px;
}
.langctl__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 16, 23, 0.62);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.langctl__btn:hover {
  border-color: var(--accent);
  background: rgba(14, 16, 23, 0.85);
  transform: translateY(-1px);
}
.langctl__btn > svg { color: var(--ink-dim); transition: transform .3s var(--ease); }
.langctl[data-open="true"] .langctl__btn > svg { transform: rotate(180deg); }

/* Inline SVG flags — fixed size, rounded, subtle border */
.langctl__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.langctl__flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.langctl__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  list-style: none;
  margin: 0;
  padding: 8px;
  width: 200px;
  max-height: 360px;
  overflow-y: auto;
  background: rgba(14, 16, 23, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
  z-index: 50;
  opacity: 0;
  transform: translateY(-8px) scale(.97);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .28s var(--ease-out), transform .28s var(--ease-out);
  scrollbar-color: rgba(244,241,234,0.18) transparent;
  scrollbar-width: thin;
}
.langctl__menu::-webkit-scrollbar { width: 6px; }
.langctl__menu::-webkit-scrollbar-thumb {
  background: rgba(244,241,234,0.14);
  border-radius: 999px;
}
.langctl[data-open="true"] .langctl__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.langctl__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  font-family: var(--ff-ui);
  text-transform: none;
  letter-spacing: 0;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.langctl__item:hover {
  background: rgba(255,255,255,.06);
}
.langctl__item.is-active {
  background: rgba(255,255,255,.04);
  color: var(--accent);
}
.langctl__item .langctl__flag {
  width: 24px;
  height: 16px;
}
.langctl__name {
  font-family: var(--ff-ui);
  font-size: 13px;
}

/* ============================================================
   AUTH MODAL
   ============================================================ */
.modal--auth { width: min(420px, calc(100vw - 40px)); }
.cta--google {
  background: #ffffff;
  color: #111;
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  margin-top: 10px;
}
.cta--google:hover:not([disabled]) { filter: brightness(0.96); }
.cta--google svg { flex-shrink: 0; }

.auth-or {
  text-align: center;
  position: relative;
  margin: 22px 0 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.auth-or::before,
.auth-or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--line);
}
.auth-or::before { left: 0; }
.auth-or::after  { right: 0; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.auth-form input {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--ff-ui);
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--ease);
}
.auth-form input:focus { border-color: var(--accent); }
.auth-error {
  color: #ff8a72;
  font-size: 12px;
  margin: 0;
}
.auth-hint {
  color: var(--accent);
  font-size: 12px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  line-height: 1.5;
  transition: color .8s var(--ease);
}
.auth-toggle {
  background: none;
  border: 0;
  color: var(--ink-dim);
  font-size: 12px;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.auth-toggle:hover { color: var(--ink); }
.auth-form .cta { width: 100%; justify-content: center; }

/* Terms checkbox row */
.auth-terms {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 2px;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 12px !important;
  color: var(--ink-dim) !important;
  line-height: 1.5;
  cursor: pointer;
}
.auth-terms input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
  position: relative;
  padding: 0;
}
.auth-terms input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.auth-terms input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #0b0c12;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-terms-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .8s var(--ease);
}
.auth-terms-link:hover { opacity: 0.85; }

/* ============================================================
   RTL SUPPORT (Arabic, Urdu)
   ============================================================ */
body.rtl .display em,
body.rtl .manifesto__title em {
  font-style: italic;
}
body.rtl .topnav { flex-direction: row-reverse; }
body.rtl .session__meta { direction: rtl; }
body.rtl .back svg { transform: scaleX(-1); }
body.rtl .langctl__menu { right: auto; left: 0; }
body.rtl .volpop { right: auto; left: 0; transform-origin: top left; }
body.rtl .hentry { direction: rtl; }
body.rtl .auth-form label { text-align: right; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .trackctl { display: none; }
}
@media (max-width: 820px) {
  .states { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .iconlink { padding: 8px 10px; }
  .manifesto { padding: 60px var(--pad-x) 30px; gap: 18px; }
  .manifesto__title { font-size: 30px; }
  .manifesto__body p { font-size: 14px; }
  .state { min-height: 120px; padding: 16px 18px 18px; }
  .state__num { margin-bottom: 18px; }
  .state__name { font-size: 22px; margin-bottom: 10px; }
  .durations { flex-wrap: wrap; justify-content: center; }
  .screen { gap: 32px; }
  .back { position: static; }
  .progress { width: 80vw; }
}
/* Mobile keeps full size (no zoom-out) */
@media (max-width: 820px) {
  body { zoom: 1; }
}
@media (max-width: 520px) {
  :root { --pad-x: 18px; }
  .display { font-size: 44px; }
  .hero { gap: 16px; }
  .lede { font-size: 14px; }
  .stage-ui { padding: 80px 16px 80px; }
  .topnav { gap: 0; }
  .navlink { padding: 8px 10px; font-size: 11px; }
  .topbar { padding: 16px; }
  .phase__cue { font-size: 44px; }
  .states { gap: 8px; }
  .state { min-height: 108px; padding: 14px 16px 16px; }
  .state__num { margin-bottom: 12px; font-size: 11px; }
  .state__name { font-size: 20px; margin-bottom: 8px; }
  .state__proto { font-size: 10px; }
  .modal { padding: 32px 22px; }
  .modal h3 { font-size: 26px; }
  .cta { padding: 14px 22px; font-size: 12px; }
  .done__actions { flex-direction: column; width: 100%; }
  .done__actions .cta { width: 100%; justify-content: center; }
}

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

/* low-end mobile: disable backdrop-filter for battery/perf */
@media (max-width: 520px) {
  .topbar, .bottombar, .popover, .langctl__menu, .volctl, .trackctl,
  .shortcut, .modal, .toast, .loader {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 12, 20, 0.88);
  }
}
