/* =====================================================================
   DAWN: styles
   1. Themes (colour tokens)     5. Today (sky hero, verse)
   2. Base & type                6. Check-in, Words
   3. Components                 7. Circles (feed, comments)
   4. Shell & navigation         8. Me, onboarding, dialogs, motion
   To add a theme: copy a [data-theme] block, change the colours, and add
   it to `themes` in assets/js/config.js.
   ===================================================================== */

/* ---------- 1. THEMES ---------- */
:root, [data-theme="dawn"] {
  --bg: #FFF7F0; --surface: #FFFFFF; --surface-2: #FFF0E6; --glass: rgb(255 255 255 / .74);
  --ink: #2B1B2E; --ink-soft: #5E4A60; --muted: #76667A; --line: #F1DFD4;
  --accent: #CF4527; --accent-2: #C2366C; --accent-ink: #FFFFFF; --accent-soft: #FFE3D6;
  --sky-1: #FFE0B8; --sky-2: #FFB49A; --sky-3: #E6A6E2; --sky-ink: #2B1B2E; --sun: #FFC062;
  --glow-1: rgb(255 170 130 / .32); --glow-2: rgb(201 155 240 / .24);
  --shadow: 74 38 52;
  color-scheme: light;
}
[data-theme="midnight"] {
  --bg: #0D0A1F; --surface: #161230; --surface-2: #201A44; --glass: rgb(22 18 48 / .78);
  --ink: #F5F0FF; --ink-soft: #D0C6EC; --muted: #A498C8; --line: #2B2554;
  --accent: #FFC46B; --accent-2: #FF8FA8; --accent-ink: #1A1230; --accent-soft: #2E2652;
  --sky-1: #1A1442; --sky-2: #3B2A78; --sky-3: #8A55B8; --sky-ink: #F5F0FF; --sun: #F8E7B0;
  --glow-1: rgb(123 92 255 / .22); --glow-2: rgb(255 143 168 / .12);
  --shadow: 0 0 0;
  color-scheme: dark;
}
[data-theme="lagos"] {
  --bg: #FFF6EC; --surface: #FFFFFF; --surface-2: #FFEBD8; --glass: rgb(255 255 255 / .76);
  --ink: #2A160E; --ink-soft: #5E3F30; --muted: #7D5D4C; --line: #F5DAC3;
  --accent: #C2410C; --accent-2: #BE185D; --accent-ink: #FFFFFF; --accent-soft: #FFE1C7;
  --sky-1: #FFD43B; --sky-2: #FF8A2A; --sky-3: #E0306E; --sky-ink: #2A160E; --sun: #FFF3B0;
  --glow-1: rgb(255 138 42 / .28); --glow-2: rgb(224 48 110 / .18);
  --shadow: 94 40 14;
  color-scheme: light;
}
[data-theme="sage"] {
  --bg: #F3F8F2; --surface: #FFFFFF; --surface-2: #E5F0E3; --glass: rgb(255 255 255 / .76);
  --ink: #1B2A20; --ink-soft: #45594B; --muted: #617366; --line: #D6E5D3;
  --accent: #2B7A50; --accent-2: #5C8A2B; --accent-ink: #FFFFFF; --accent-soft: #D9EEDC;
  --sky-1: #E8F7E5; --sky-2: #A7DDB3; --sky-3: #5FB389; --sky-ink: #1B2A20; --sun: #FFE7A0;
  --glow-1: rgb(95 179 137 / .22); --glow-2: rgb(255 231 160 / .3);
  --shadow: 27 60 38;
  color-scheme: light;
}
[data-theme="ocean"] {
  --bg: #F1F8FC; --surface: #FFFFFF; --surface-2: #E1F1F8; --glass: rgb(255 255 255 / .76);
  --ink: #0E2433; --ink-soft: #3D5A6C; --muted: #5A7484; --line: #D1E6F0;
  --accent: #0B6A96; --accent-2: #12807A; --accent-ink: #FFFFFF; --accent-soft: #D4EEF7;
  --sky-1: #D6F3FA; --sky-2: #8FD6EA; --sky-3: #4BA3D6; --sky-ink: #0E2433; --sun: #FFF1B8;
  --glow-1: rgb(75 163 214 / .22); --glow-2: rgb(18 128 122 / .14);
  --shadow: 14 50 74;
  color-scheme: light;
}
[data-theme="lavender"] {
  --bg: #F8F4FF; --surface: #FFFFFF; --surface-2: #EFE6FF; --glass: rgb(255 255 255 / .76);
  --ink: #261C3D; --ink-soft: #57496F; --muted: #73668B; --line: #E4D8FA;
  --accent: #6D3FE0; --accent-2: #C02B76; --accent-ink: #FFFFFF; --accent-soft: #EADFFF;
  --sky-1: #F1E8FF; --sky-2: #CDB4FF; --sky-3: #F6A8C8; --sky-ink: #261C3D; --sun: #FFE3A3;
  --glow-1: rgb(160 120 255 / .22); --glow-2: rgb(246 168 200 / .24);
  --shadow: 60 40 110;
  color-scheme: light;
}
[data-theme="ankara"] {
  --bg: #0B1F16; --surface: #12291E; --surface-2: #1A3628; --glass: rgb(18 41 30 / .8);
  --ink: #F7F1E1; --ink-soft: #DCD2B6; --muted: #B0A68A; --line: #24453A;
  --accent: #F2B705; --accent-2: #F0663F; --accent-ink: #1A1405; --accent-soft: #2B3E22;
  --sky-1: #0E3B2B; --sky-2: #1F7A55; --sky-3: #C99A04; --sky-ink: #F7F1E1; --sun: #FFD54F;
  --glow-1: rgb(242 183 5 / .14); --glow-2: rgb(240 102 63 / .12);
  --shadow: 0 0 0;
  color-scheme: dark;
}

:root {
  --display: 'DM Serif Display', 'Times New Roman', Georgia, serif;   /* big headlines */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;            /* scripture & reading */
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; /* interface */
  /* fluid type scale: grows smoothly from small phones to big monitors */
  --fs-xs: clamp(.72rem, .69rem + .12vw, .8rem);
  --fs-sm: clamp(.85rem, .81rem + .16vw, .94rem);
  --fs-base: clamp(.97rem, .93rem + .18vw, 1.06rem);
  --fs-md: clamp(1.06rem, 1rem + .3vw, 1.22rem);
  --fs-lg: clamp(1.22rem, 1.1rem + .55vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2.15rem);
  --fs-2xl: clamp(2.05rem, 1.55rem + 2.2vw, 3.2rem);
  --fs-3xl: clamp(2.45rem, 1.7rem + 3.3vw, 4.4rem);
  --r-sm: 12px; --r: 20px; --r-lg: 28px; --pill: 999px;
  --gutter: 16px;
  --nav-h: 68px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --card-shadow: 0 1px 2px rgb(var(--shadow) / .05), 0 8px 24px -12px rgb(var(--shadow) / .18);
  --lift-shadow: 0 2px 4px rgb(var(--shadow) / .06), 0 18px 40px -16px rgb(var(--shadow) / .28);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --focus: var(--accent);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.025em; }
h1 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; line-height: 1.02; font-size: clamp(2.4rem, 9.5vw, 3.4rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
.ob-card h2, .ob-pane-title, .ob-form-title { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; line-height: 1.05; }
body { font-feature-settings: 'ss01', 'cv11'; }
p { margin: 0 0 .9rem; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 8px; }
.hint { color: var(--ink-soft); font-size: .95rem; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.optional { color: var(--muted); font-weight: 400; font-size: .85em; }
.error { color: #D33A3A; font-size: .9rem; margin: .4rem 0 .6rem; font-weight: 500; }
[data-theme="midnight"] .error, [data-theme="ankara"] .error { color: #FF9C9C; }
.error:empty { display: none; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: var(--label-track); text-transform: var(--label-case); color: var(--muted); margin: 0 0 .35rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* icons */
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; overflow: visible; }
.ico--sm { width: 18px; height: 18px; }
.ico--lg { width: 28px; height: 28px; }
.ico--xl { width: 40px; height: 40px; }

/* ---------- 3. COMPONENTS ---------- */
.card {
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  box-shadow: var(--card-shadow);
  transition: background-color .5s var(--ease), border-color .5s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.stack > * + * { margin-top: 1rem; }
.card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.card-head h2, .card-head h3 { margin: 0; }
.badge-ico {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; flex: none;
  background: var(--accent-soft); color: var(--accent);
}
.badge-ico--grad { background: var(--grad); color: var(--accent-ink); }
.label { font-size: .74rem; font-weight: 700; letter-spacing: var(--label-track); text-transform: var(--label-case); color: var(--muted); margin: 0; }

/* buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: 0 1.5rem;
  border: 0; border-radius: var(--btn-r);
  background: var(--grad); color: var(--accent-ink);
  font-weight: 700; font-size: 1rem; letter-spacing: .01em; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -10px var(--accent);
  transition: transform .25s var(--spring), box-shadow .25s var(--ease), opacity .2s;
}
.btn::after { /* shine sweep */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px var(--accent); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--block { width: 100%; }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn--danger { color: #C93030; }
[data-theme="midnight"] .btn--danger, [data-theme="ankara"] .btn--danger { color: #FF9C9C; }
.btn .ico { width: 20px; height: 20px; transition: transform .3s var(--spring); }
.btn:hover .ico--arrow, .btn:hover .ico--send { transform: translateX(3px); }

.icon-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 40px; padding: 0 .8rem; border-radius: var(--pill);
  background: transparent; border: 0; cursor: pointer; color: var(--ink-soft);
  font-size: .9rem; font-weight: 600;
  transition: background .2s, color .2s, transform .2s var(--spring);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.icon-btn--round { width: 42px; padding: 0; justify-content: center; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }

/* form fields */
.field { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
.field > label, legend { display: block; font-weight: 700; margin-bottom: .6rem; padding: 0; font-size: .98rem; }
input[type=text], input[type=time], textarea {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 16px;
  padding: .85rem 1rem; min-height: 50px;
  transition: border-color .2s, box-shadow .2s, background-color .5s;
}
input[type=time] { max-width: 190px; }
textarea { resize: vertical; line-height: 1.55; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
::placeholder { color: var(--muted); opacity: .9; }

/* chips: real radios/checkboxes styled as pills */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.chip > span {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 46px; padding: .55rem 1.05rem;
  border: 1.5px solid var(--line); border-radius: var(--chip-r);
  background: var(--surface);
  font-size: .95rem; font-weight: 600; line-height: 1.25;
  transition: background .25s var(--ease), border-color .25s, color .25s, transform .3s var(--spring), box-shadow .25s;
  user-select: none;
}
.chip > span .ico { width: 19px; height: 19px; color: var(--accent); transition: color .25s, transform .4s var(--spring); }
.chip .chip-text { display: flex; flex-direction: column; }
.chip small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.chip em { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); background: var(--grad); padding: .15rem .5rem; border-radius: var(--pill); margin-left: auto; }
.chip:hover > span { border-color: var(--accent); }
.chip input:active + span { transform: scale(.95); }
.chip input:checked + span { background: var(--grad); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 20px -10px var(--accent); }
.chip input:checked + span .ico { color: var(--accent-ink); transform: rotate(-8deg) scale(1.12); }
.chip input:checked + span small { color: var(--accent-ink); opacity: .85; }
.chip input:checked + span em { background: var(--accent-ink); color: var(--accent); }
.chip input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.chips--stack { flex-direction: column; }
.chips--stack .chip > span { width: 100%; border-radius: 18px; padding: .8rem 1.1rem; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips--scroll .chip { flex: none; scroll-snap-align: start; }
.chips--scroll .chip > span { white-space: nowrap; }

/* switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.switch-row > label { margin: 0; display: flex; align-items: center; gap: .6rem; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; border-radius: 99px; margin: 0; background: var(--line); position: relative; cursor: pointer; transition: background .3s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .25); transition: transform .35s var(--spring); }
.switch:checked { background: var(--grad); }
.switch:checked::after { transform: translateX(22px); }

/* mood faces */
.face { width: 100%; height: 100%; overflow: visible; }
.face-bg { fill: var(--mood); opacity: .22; stroke: var(--mood); stroke-width: 1.2; }
.face .eye { fill: var(--ink); }
.face path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.face .fill { fill: var(--ink); }
.face .tear { stroke: #5B8DEF; stroke-width: 1.8; }
.face--1 { --mood: #6C7AE0; } .face--2 { --mood: #8FA0C0; } .face--3 { --mood: #F2B84B; } .face--4 { --mood: #F5934F; } .face--5 { --mood: #F2668B; }

.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.mood { position: relative; }
.mood input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.mood > span {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: .7rem .2rem .6rem; border-radius: 20px; border: 1.5px solid transparent;
  font-size: .78rem; font-weight: 700; color: var(--ink-soft);
  transition: background .25s, border-color .25s, transform .3s var(--spring);
}
.mood .face { width: 46px; height: 46px; transition: transform .45s var(--spring); }
.mood:hover .face { transform: translateY(-3px) rotate(-6deg); }
.mood input:checked + span { background: var(--surface-2); border-color: var(--accent); color: var(--ink); }
.mood input:checked + span .face { animation: moodPop .6s var(--spring); transform: scale(1.12); }
.mood input:checked + span .face-bg { opacity: .55; }
.mood input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: .6rem;
  transform: translate(-50%, 20px) scale(.95); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg);
  padding: .75rem 1.2rem; border-radius: var(--pill); font-size: .92rem; font-weight: 600;
  max-width: calc(100vw - 32px); box-shadow: var(--lift-shadow);
  transition: opacity .3s var(--ease), transform .4s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast .ico { color: var(--accent); }

/* ---------- 4. SHELL ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .7rem var(--gutter);
  background: var(--bg);
  transition: background-color .5s var(--ease);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.brand .logo { width: 34px; height: 34px; color: var(--accent); }
.brand .logo .rays { transform-origin: 12px 16px; animation: raysPulse 4s ease-in-out infinite; }
.brand .logo .sunball { animation: sunBob 4s ease-in-out infinite; }
.top-actions { display: flex; align-items: center; gap: .4rem; }
.streak-chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .75rem .35rem .55rem;
  border-radius: var(--pill); background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .9rem; text-decoration: none;
}
.streak-chip .ico { width: 18px; height: 18px; }
.streak-chip .flicker { transform-origin: 12px 20px; animation: flicker 1.6s ease-in-out infinite; }

/* floating bottom nav (mobile) */
.tabbar {
  position: fixed; z-index: 30;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--lift-shadow);
}
.tab-indicator {
  position: absolute; top: 6px; bottom: 6px; left: 6px;
  width: calc((100% - 12px) / 5);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .5s var(--spring);
  pointer-events: none;
}
.tab-indicator::before { content: ''; position: absolute; inset: 0 6px; border-radius: 20px; background: var(--accent-soft); }
.tab {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 700;
  transition: color .3s;
  -webkit-tap-highlight-color: transparent;
}
.tab .ico { width: 24px; height: 24px; transition: transform .45s var(--spring); }
.tab:hover { color: var(--ink); }
.tab[aria-current=page] { color: var(--accent); }
.tab[aria-current=page] .ico { transform: translateY(-1px) scale(1.08); }
/* each tab icon has its own little animation when selected */
.tab[aria-current=page] .ico--sunrise .sunball { animation: sunRise .8s var(--spring); }
.tab[aria-current=page] .ico--sunrise .rays { transform-origin: 12px 16px; animation: raysIn .8s var(--ease); }
.tab[aria-current=page] .ico--check .draw { stroke-dasharray: 14; animation: draw .6s var(--ease) both; }
.tab[aria-current=page] .ico--book .page { transform-origin: 12px 12px; animation: pageFlip .7s var(--ease); }
.tab[aria-current=page] .ico--users .bob { animation: bob .7s var(--spring); }
.tab[aria-current=page] .ico--users .bob--2 { animation-delay: .1s; }
.tab[aria-current=page] .ico--user { animation: wiggle .6s var(--spring); }

.main { max-width: 1120px; margin: 0 auto; padding: .5rem var(--gutter) calc(var(--nav-h) + 3rem); }
.view { animation: viewIn .55s var(--ease) both; }
.page-head { margin: .5rem 0 1.25rem; }
.page-head h1 { margin-bottom: .25rem; }
.footer { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) calc(var(--nav-h) + 2.5rem); color: var(--muted); font-size: .82rem; }
.footer p { margin-bottom: .35rem; }
.footer a { color: inherit; font-weight: 600; }

/* stagger: children fade up one after another */
.stagger > * { animation: riseIn .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }

/* ---------- 5. TODAY ---------- */
.sky {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg);
  min-height: 230px; padding: 1.4rem 1.35rem 1.25rem;
  background: linear-gradient(165deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  color: var(--sky-ink);
  box-shadow: var(--lift-shadow);
  display: flex; flex-direction: column; justify-content: space-between;
}
.sky--night { /* night keeps a hint of the theme's own colours */
  --sky-ink: #F5F0FF; --sun: #F8E7B0;
  background: linear-gradient(165deg, #0E0B24 0%, color-mix(in srgb, var(--sky-2) 32%, #1C1648) 60%, color-mix(in srgb, var(--sky-3) 45%, #2A2058) 100%);
}
[data-theme="ankara"] .sky::before { /* subtle Ankara-inspired pattern */
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .12;
  background:
    repeating-linear-gradient(45deg, #F2B705 0 2px, transparent 2px 22px),
    repeating-linear-gradient(-45deg, #F0663F 0 2px, transparent 2px 22px);
}
.sky-sun {
  position: absolute; z-index: -1; right: -14px; top: -14px;
  width: 104px; height: 104px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff 0%, var(--sun) 45%, transparent 72%);
  box-shadow: 0 0 60px 20px color-mix(in srgb, var(--sun) 55%, transparent);
  animation: sunRiseBig 2.2s var(--ease) both;
}
.sky--night .sky-sun { /* the moon */
  width: 52px; height: 52px; right: 18px; top: 16px; bottom: auto;
  background: radial-gradient(circle at 35% 35%, #FFFBEA 0%, var(--sun) 60%);
  box-shadow: 0 0 40px 8px rgb(248 231 176 / .35), inset -10px -6px 0 rgb(0 0 0 / .08);
  animation: fadeIn 1.5s var(--ease) both;
}
.sky-stars { position: absolute; inset: 0; z-index: -1; }
.sky-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 3s ease-in-out infinite; }
.sky-clouds { position: absolute; z-index: -1; left: 0; right: 0; bottom: 30%; height: 60px; pointer-events: none; }
.sky-clouds svg { position: absolute; fill: rgb(255 255 255 / .55); animation: drift 38s linear infinite; }
.sky-clouds svg:nth-child(2) { animation-duration: 55s; animation-delay: -20s; top: 26px; opacity: .7; }
.sky--night .sky-clouds svg { fill: rgb(255 255 255 / .08); }
.sky-hills { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; width: 100%; height: 70px; }
.sky-hills path:first-child { fill: rgb(255 255 255 / .22); }
.sky-hills path:last-child { fill: rgb(255 255 255 / .35); }
.sky--night .sky-hills path { fill: rgb(0 0 0 / .18); }
.sky .eyebrow { color: inherit; opacity: .8; }
.sky h1 { font-size: clamp(2rem, 8.5vw, 2.9rem); max-width: 14ch; margin-bottom: .2rem; }
.sky-sub { font-size: .98rem; font-weight: 500; opacity: .85; margin: 0; max-width: 28ch; }
.sky-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.sky-chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem;
  border-radius: var(--pill); font-size: .85rem; font-weight: 700; text-decoration: none; color: inherit;
  background: rgb(255 255 255 / .38); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / .45);
  transition: transform .25s var(--spring), background .2s;
}
.sky--night .sky-chip, [data-theme="ankara"] .sky-chip, [data-theme="midnight"] .sky-chip { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .18); }
.sky-chip:hover { transform: translateY(-2px); }
.sky-chip .ico { width: 17px; height: 17px; }
.sky-chip .flicker { transform-origin: 12px 20px; animation: flicker 1.6s ease-in-out infinite; }
.sky-chip .face { width: 20px; height: 20px; }

.today-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.mini-grid { display: grid; gap: 1rem; }

/* verse cards */
.verse { margin: 0; position: relative; }
.verse-card { padding: 1.5rem 1.35rem 1.1rem; overflow: hidden; }
.verse-card::before { /* soft gradient wash */
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, var(--accent-soft), transparent 60%);
  opacity: .8;
}
.verse-card > * { position: relative; }
.verse .quote-mark { width: 38px; height: 38px; color: var(--accent); fill: var(--accent); stroke: none; opacity: .9; margin-bottom: .6rem; }
.verse .quote-mark path { fill: url(#gradFill); }
.verse blockquote { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.28rem; line-height: 1.45; font-weight: 500; letter-spacing: -.01em; }
.verse--big blockquote { font-size: clamp(1.45rem, 5.6vw, 1.95rem); line-height: 1.35; }
.original { color: var(--ink-soft); margin: 0 0 .75rem; font-size: 1.2rem; line-height: 1.8; }
.original[lang=ar] { font-family: 'Amiri', 'Traditional Arabic', serif; font-size: 1.5rem; line-height: 2.05; text-align: right; }
.original[lang=he] { font-family: 'Frank Ruhl Libre', 'David', serif; font-size: 1.45rem; text-align: right; }
.original[lang=sa] { font-family: 'Noto Serif Devanagari', serif; }
.original[lang=pa] { font-family: 'Noto Sans Gurmukhi', sans-serif; }
.original[lang=pi] { font-style: italic; font-family: var(--serif); }
.verse--big .original[lang=ar], .verse--big .original[lang=he] { font-size: clamp(1.6rem, 6vw, 2.05rem); }
.verse figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.verse-cite { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 700; color: var(--ink-soft); }
.verse-cite::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--grad); }
.verse-actions { display: inline-flex; gap: .1rem; margin-right: -.5rem; }
.verse-actions .icon-btn { width: 40px; padding: 0; justify-content: center; }
.verse-actions [aria-pressed="true"] .ico { fill: currentColor; animation: pop .5s var(--spring); }
.verse-actions .is-spinning .spin { transform-origin: 12px 12px; animation: spin .7s var(--ease); }
.verse.is-loading blockquote { min-height: 4.4em; position: relative; }
.verse.is-loading blockquote::after {
  content: ''; position: absolute; inset: .3em 0 auto 0; height: 3.4em; border-radius: 6px;
  background: repeating-linear-gradient(var(--surface-2) 0 .85em, transparent .85em 1.3em);
  animation: breathe 1.4s ease-in-out infinite;
}
.verse-list { display: grid; gap: 1rem; }

.tile { display: flex; gap: .9rem; align-items: flex-start; }
.tile p:last-child { margin: 0; }
.tile h3 { margin-bottom: .25rem; }
.note-text { font-family: var(--serif); font-size: 1.2rem; line-height: 1.4; font-weight: 500; }
.ico--sparkles .twinkle { transform-origin: center; animation: twinkleIco 2.4s ease-in-out infinite; }
.ico--sparkles .twinkle--2 { animation-delay: 1.2s; }
.ico--leaf { animation: sway 4s ease-in-out infinite; transform-origin: 20% 90%; }
.ico--wind .drift { animation: windDrift 3s ease-in-out infinite; }
.ico--cloudrain .rain { stroke-dasharray: 2 3; animation: rain 1s linear infinite; }
.ico--bell .ring { transform-origin: 12px 3px; animation: ring 3.5s ease-in-out infinite; }
.ico--compass .spin-slow { transform-origin: 12px 12px; animation: spin 8s linear infinite; }
.ico--pulse .draw { stroke-dasharray: 60; animation: draw 2.5s var(--ease) infinite; }

.quick-moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; margin-top: .25rem; }
.quick-moods a { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-decoration: none; color: var(--ink-soft); font-size: .72rem; font-weight: 700; padding: .4rem 0; border-radius: 16px; transition: background .2s, transform .3s var(--spring); }
.quick-moods a:hover { background: var(--surface-2); transform: translateY(-3px); }
.quick-moods .face { width: 40px; height: 40px; }
.quick-moods a:hover .face { animation: moodPop .6s var(--spring); }

/* ---------- 6. CHECK-IN & WORDS ---------- */
.two-col { display: grid; gap: 1rem; }
.celebrate { position: relative; text-align: left; overflow: hidden; }
.celebrate .burst { position: absolute; inset: 0; pointer-events: none; }
.celebrate .burst i {
  position: absolute; left: var(--x); top: 40%; width: 8px; height: 8px; border-radius: 2px;
  background: var(--c); opacity: 0;
  animation: confetti 1.4s var(--ease) var(--d) both;
}
.celebrate-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .75rem; }
.celebrate-head .face { width: 56px; height: 56px; animation: moodPop .8s var(--spring); }
.celebrate-head h2 { margin: 0; }
.practice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border-radius: 18px; background: var(--surface-2); margin-top: 1rem; }
.practice p { margin: 0; }
.reflection { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin: 1rem 0 0; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; margin: .5rem 0 1rem; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; color: var(--muted); }
.week-day .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1.5px dashed var(--line); }
.week-day .dot .face { width: 34px; height: 34px; }
.week-day.has .dot { border: 0; background: none; }
.week-day.today { color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.stat { text-align: center; padding: .9rem .4rem; border-radius: 18px; background: var(--surface-2); }
.stat b { display: block; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.history { list-style: none; padding: 0; margin: 1rem 0 0; }
.history li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.history .face { width: 30px; height: 30px; flex: none; }
.history .muted { margin-left: auto; text-align: right; }

/* ---------- 7. CIRCLES ---------- */
.circle-picker { display: flex; gap: .75rem; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 1rem; padding: 4px var(--gutter) 12px; scrollbar-width: none; scroll-snap-type: x proximity; }
.circle-picker::-webkit-scrollbar { display: none; }
.circle-opt { position: relative; flex: none; scroll-snap-align: start; }
.circle-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.circle-opt > span { display: flex; flex-direction: column; align-items: center; gap: .45rem; width: 82px; text-align: center; font-size: .74rem; font-weight: 700; line-height: 1.2; color: var(--ink-soft); }
.circle-opt .ring {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--accent);
  transition: transform .4s var(--spring), background .3s, box-shadow .3s;
}
.circle-opt .ring .ico { width: 26px; height: 26px; }
.circle-opt .ring::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid transparent; transition: border-color .3s; }
.circle-opt:hover .ring { transform: translateY(-3px); }
.circle-opt input:checked + span { color: var(--ink); }
.circle-opt input:checked + span .ring { background: var(--grad); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 22px -10px var(--accent); transform: scale(1.05); }
.circle-opt input:checked + span .ring::after { border-color: var(--accent); }
.circle-opt input:focus-visible + span .ring { outline: 2.5px solid var(--focus); outline-offset: 6px; }
.circle-opt .mine-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-2); border: 2px solid var(--bg); }

.circle-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.circle-hero .badge-ico { width: 56px; height: 56px; border-radius: 18px; }
.circle-hero .badge-ico .ico { width: 28px; height: 28px; }
.circle-hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); margin: 0; }
.mode-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .6rem; border-radius: var(--pill); background: var(--surface-2); color: var(--muted); }
.mode-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mode-badge[data-mode=live] { color: #1E9E62; background: rgb(30 158 98 / .12); }
.mode-badge[data-mode=live]::before { animation: livePulse 1.8s ease-out infinite; }

.avatar {
  --h: 20;
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 85% 72%), hsl(calc(var(--h) + 50) 80% 60%));
  color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: .02em;
  text-shadow: 0 1px 2px rgb(0 0 0 / .25);
}
.avatar--sm { width: 32px; height: 32px; font-size: .72rem; }
.composer { display: flex; gap: .8rem; align-items: flex-start; }
.composer-body { flex: 1; min-width: 0; }
.composer textarea { min-height: 84px; border-radius: 18px; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .6rem; }
.composer-foot .btn { min-height: 44px; padding: 0 1.15rem; }

.feed { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
.post { padding: 1.1rem 1.15rem .6rem; }
.post.is-new { animation: postIn .7s var(--spring) both; }
.post-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .65rem; }
.post-who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.post-who strong { font-size: .95rem; }
.post-who time { font-size: .78rem; color: var(--muted); font-weight: 600; }
.post-head .more { margin-left: auto; }
.post-text { font-size: 1.02rem; line-height: 1.55; overflow-wrap: anywhere; margin-bottom: .6rem; white-space: pre-line; }
.post-example { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: .15rem .55rem; border-radius: var(--pill); margin-bottom: .5rem; }
.post-actions { display: flex; gap: .25rem; border-top: 1px solid var(--line); padding-top: .4rem; margin: 0 -.4rem; }
.post-actions .icon-btn { flex: 1; justify-content: center; }
.heart-btn { position: relative; }
.heart-btn[aria-pressed="true"] { color: #E0457B; }
.heart-btn[aria-pressed="true"] .ico { fill: currentColor; }
.heart-btn.pop .ico { animation: heartPop .6s var(--spring); }
.heart-btn.pop::after { /* burst ring */
  content: ''; position: absolute; left: calc(50% - 26px); top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%; border: 2px solid #E0457B; animation: ringBurst .6s var(--ease) forwards;
}
.count { font-variant-numeric: tabular-nums; }
.count.bump { display: inline-block; animation: countBump .4s var(--spring); }
.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: 100%; z-index: 5; min-width: 170px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .35rem;
  box-shadow: var(--lift-shadow); animation: menuIn .25s var(--spring) both; transform-origin: top right;
}
.menu-list button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .65rem .8rem; border: 0; background: none; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); text-align: left; }
.menu-list button:hover { background: var(--surface-2); }
.post-hidden { padding: .9rem 1.1rem; font-size: .88rem; color: var(--muted); display: flex; gap: .6rem; align-items: center; }

.thread { margin: .4rem -.2rem .5rem; padding-top: .6rem; border-top: 1px solid var(--line); animation: threadIn .4s var(--ease) both; }
.comment { display: flex; gap: .6rem; padding: .45rem 0; animation: riseIn .4s var(--ease) both; }
.comment-bubble { background: var(--surface-2); border-radius: 4px 16px 16px 16px; padding: .5rem .8rem; min-width: 0; flex: 1; }
.comment-bubble strong { font-size: .82rem; }
.comment-bubble time { font-size: .72rem; color: var(--muted); margin-left: .35rem; }
.comment-bubble p { margin: .1rem 0 0; font-size: .93rem; overflow-wrap: anywhere; }
.comment .del { align-self: center; }
.reply { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.reply input { min-height: 44px; border-radius: var(--pill); padding: .5rem 1rem; }
.reply .icon-btn--round { flex: none; background: var(--grad); color: var(--accent-ink); }
.reply .icon-btn--round:disabled { opacity: .4; }
.thread .empty { font-size: .85rem; color: var(--muted); margin: .2rem 0 .4rem; }

.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.rules li { display: flex; gap: .65rem; align-items: flex-start; font-size: .93rem; color: var(--ink-soft); }
.rules .ico { color: var(--accent); width: 20px; height: 20px; margin-top: 2px; }

/* ---------- 8. ME, ONBOARDING, DIALOG ---------- */
.profile { display: flex; align-items: center; gap: 1rem; }
.profile .avatar { width: 64px; height: 64px; font-size: 1.4rem; }
.profile h1 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.4rem); }
.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.theme-opt { position: relative; }
.theme-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.theme-opt > span {
  display: flex; flex-direction: column; gap: .55rem; padding: .6rem .6rem .75rem;
  border-radius: 20px; border: 2px solid var(--line); background: var(--surface);
  transition: border-color .25s, transform .35s var(--spring), box-shadow .25s;
}
.theme-swatch { position: relative; height: 64px; border-radius: 14px; overflow: hidden; }
.theme-swatch::after { /* tiny sun */
  content: ''; position: absolute; right: 14px; bottom: 12px; width: 18px; height: 18px; border-radius: 50%;
  background: rgb(255 255 255 / .85); box-shadow: 0 0 14px 4px rgb(255 255 255 / .5);
  transition: transform .5s var(--spring);
}
.theme-opt b { font-size: .92rem; padding: 0 .2rem; }
.theme-opt small { font-size: .76rem; color: var(--muted); padding: 0 .2rem; line-height: 1.3; }
.theme-opt:hover > span { transform: translateY(-3px); }
.theme-opt input:checked + span { border-color: var(--accent); box-shadow: 0 10px 24px -14px var(--accent); }
.theme-opt input:checked + span .theme-swatch::after { transform: translateY(-14px) scale(1.15); }
.theme-opt input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.theme-opt .tick { position: absolute; top: 10px; left: 10px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; transform: scale(0); transition: transform .4s var(--spring); }
.theme-opt .tick .ico { width: 15px; height: 15px; stroke-width: 3; }
.theme-opt input:checked ~ .tick { transform: scale(1); }

.crisis-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.crisis-list li a {
  display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: 18px;
  background: var(--surface-2); color: var(--ink); text-decoration: none;
  transition: transform .25s var(--spring), background .2s;
}
.crisis-list li a:hover { transform: translateX(3px); }
.crisis-list .badge-ico { width: 38px; height: 38px; border-radius: 12px; }
.crisis-list .badge-ico .ico { width: 19px; height: 19px; }
.crisis-list .ci-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.crisis-list .ci-text small { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crisis-list .ci-text strong { font-size: .92rem; }
.crisis-list .ci-num { margin-left: auto; font-weight: 800; color: var(--accent); white-space: nowrap; font-size: .92rem; }

/* onboarding */
.onboarding { min-height: 100svh; display: grid; place-items: start center; padding: 1rem var(--gutter) 2.5rem; }
.ob-wrap { width: 100%; max-width: 540px; }
.ob-sky { min-height: 300px; margin-bottom: 1.25rem; }
.ob-sky h1 { font-size: clamp(3rem, 14vw, 4.2rem); max-width: none; }
.ob-features { display: grid; gap: .75rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.ob-features li { display: flex; gap: .85rem; align-items: center; padding: .9rem 1rem; }
.ob-features li p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.ob-features li strong { display: block; color: var(--ink); font-size: .98rem; }
.ob-card { padding: 1.5rem 1.35rem; }
.ob-top { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.progress { flex: 1; height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width .6s var(--spring); }
.step-count { font-size: .78rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.ob-icon { width: 58px; height: 58px; border-radius: 20px; margin-bottom: 1rem; animation: popIn .6s var(--spring) both; }
.ob-icon .ico { width: 28px; height: 28px; }
.ob-card h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
.ob-nav { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.75rem; }
.ob-nav .btn { flex: 1; max-width: 240px; margin-left: auto; }
.ob-step { animation: stepIn .5s var(--ease) both; }
.ob-step.back { animation-name: stepBack; }
.alias-box { display: flex; align-items: center; gap: .8rem; padding: 1rem; border-radius: 20px; background: var(--surface-2); margin-bottom: 1.25rem; }
.alias-box strong { font-family: var(--serif); font-size: 1.3rem; display: block; }
.alias-box .icon-btn { margin-left: auto; }

.dialog {
  width: min(94vw, 480px); max-height: 90vh; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink);
  padding: 1.6rem 1.35rem 1.35rem; box-shadow: var(--lift-shadow);
}
.dialog::backdrop { background: rgb(13 10 31 / .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog[open] { animation: dialogIn .45s var(--spring) both; }
.dialog .badge-ico { width: 56px; height: 56px; border-radius: 18px; margin-bottom: 1rem; }
.dialog .badge-ico .ico { width: 28px; height: 28px; }
.dialog .btn { margin-top: 1rem; }
.noscript { padding: 2rem; text-align: center; }

/* accounts & sign-up */
.splash { min-height: 70svh; display: grid; place-items: center; }
.splash .logo { width: 64px; height: 64px; color: var(--accent); animation: glowPulse 1.6s ease-in-out infinite; }
.splash .logo .sunball { animation: sunRise 1.2s var(--spring) infinite alternate; }
.ob-sky--sm { min-height: 200px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3.2rem; }
.pw-wrap .icon-btn { position: absolute; right: 4px; top: 4px; }
input[type=email] { width: 100%; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: 16px; padding: .85rem 1rem; min-height: 50px; transition: border-color .2s, box-shadow .2s; }
input[type=email]:focus-visible, input[type=password]:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=password], .pw-wrap input[type=text] { width: 100%; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: 16px; padding: .85rem 3.2rem .85rem 1rem; min-height: 50px; }
.auth-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; }
.success { color: #1E9E62; font-weight: 600; font-size: .92rem; margin: .4rem 0 .6rem; }
.success:empty { display: none; }
.demo-note { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; color: var(--muted); background: var(--surface-2); padding: .7rem .9rem; border-radius: 14px; margin: 1rem 0 0; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-busy .ico { display: none; }
.big-choices { display: grid; gap: .75rem; }
.big-choice { position: relative; }
.big-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.big-choice > span { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border-radius: 20px; border: 2px solid var(--line); background: var(--surface); transition: border-color .25s, transform .3s var(--spring), box-shadow .25s; }
.big-choice small { display: block; color: var(--muted); font-size: .86rem; }
.big-choice:hover > span { transform: translateY(-2px); border-color: var(--accent); }
.big-choice input:checked + span { border-color: var(--accent); box-shadow: 0 10px 24px -14px var(--accent); }
.big-choice input:checked + span .badge-ico { background: var(--grad); color: var(--accent-ink); animation: pop .5s var(--spring); }
.big-choice input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 140px; }
.hukam-lines { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; font-family: var(--serif); font-size: 1.08rem; line-height: 1.45; }
.hukam-lines + .hukam-lines { margin-top: .6rem; }
.hukam-lines .original { display: block; font-size: 1rem; margin: 0 0 .15rem; font-family: 'Noto Sans Gurmukhi', sans-serif; }
@keyframes glowPulse { 50% { opacity: .6; transform: scale(.94); } }

/* launch polish */
.center { text-align: center; }
.offline-pill { display: none; margin-left: auto; margin-right: .25rem; padding: .25rem .65rem; border-radius: var(--pill); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); }
.is-offline .offline-pill { display: inline-block; animation: fadeIn .4s var(--ease); }
.account-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.link-btn--danger { color: #C93030; }
[data-theme="midnight"] .link-btn--danger, [data-theme="ankara"] .link-btn--danger { color: #FF9C9C; }
.install { position: relative; overflow: hidden; }
.install::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none; }
.install-x { position: absolute; top: 10px; right: 10px; z-index: 1; }
.install .ico--download .drop { animation: dropDown 1.8s var(--ease) infinite; }
.install-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; font-size: .93rem; }
.install-steps .ico { vertical-align: -3px; color: var(--accent); }
.history details { width: 100%; }
.history summary { display: flex; align-items: center; gap: .75rem; cursor: pointer; list-style: none; border-radius: 12px; padding: .1rem 0; }
.history summary::-webkit-details-marker { display: none; }
.history summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 .3rem 0 .25rem; transition: transform .3s var(--ease); flex: none; }
.history details[open] summary::after { transform: rotate(-135deg); }
.history summary .muted { margin-left: auto; }
.history li { display: block; }
.journal { margin: .6rem 0 .3rem 2.6rem; padding: .7rem .9rem; border-radius: 14px; background: var(--surface-2); font-size: .93rem; animation: threadIn .35s var(--ease) both; white-space: pre-line; }
.journal p:last-child { margin: 0; }
.dialog--long h3 { font-family: var(--sans); font-size: .95rem; font-weight: 800; margin: 1.2rem 0 .4rem; }
.dialog--long ul { padding-left: 1.1rem; margin: 0 0 .5rem; display: grid; gap: .4rem; font-size: .93rem; color: var(--ink-soft); }
.dialog--long p { font-size: .93rem; }
@keyframes dropDown { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(2px); } }

/* ---------- LARGER SCREENS ---------- */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
  .themes { grid-template-columns: repeat(4, 1fr); }
  .verse-list { grid-template-columns: 1fr 1fr; align-items: start; }
  .sky { min-height: 260px; padding: 2rem; }
  .sky:not(.sky--night) .sky-sun { top: auto; right: 12%; bottom: 20%; width: 96px; height: 96px; }
}
.side-label, .side-me, .ob-side, .ob-pane-title, .ob-form-title { display: none; }

@media (hover: hover) {
  a.card:hover, .verse-card:hover, .post:hover { transform: translateY(-3px); box-shadow: var(--lift-shadow); }
}

@media (min-width: 720px) {
  .verse-list { display: block; columns: 2 320px; column-gap: 1.25rem; }
  .verse-list > * { break-inside: avoid; margin-bottom: 1.25rem; }
}

/* ---------- PC & LAPTOP: sidebar layout ---------- */
@media (min-width: 1024px) {
  :root { --side: 268px; --gutter: 44px; }

  /* the top bar becomes a glass sidebar */
  .topbar {
    position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 25; max-width: none; margin: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: 30px 18px 22px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(1.5) blur(20px); backdrop-filter: saturate(1.5) blur(20px);
    border-right: 1px solid var(--line);
  }
  .brand { padding: 0 12px; font-size: 1.9rem; }
  .brand .logo { width: 42px; height: 42px; }
  .offline-pill { position: absolute; top: 40px; right: 18px; margin: 0; }
  .top-actions { margin-top: auto; flex-direction: column; align-items: stretch; gap: .55rem; }
  .side-label { display: inline; }
  .streak-chip { justify-content: flex-start; padding: .7rem 1rem; border-radius: 16px; font-size: .95rem; gap: .45rem; }
  .streak-chip .side-label { font-weight: 700; margin-left: -.3rem; }
  .theme-btn { width: auto !important; justify-content: flex-start; gap: .85rem; padding: 0 1rem !important; height: 48px; border-radius: 16px; background: var(--surface-2); color: var(--ink); font-weight: 700; }
  .theme-btn:hover { background: var(--accent-soft); }
  .side-me {
    display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; margin-top: .4rem;
    border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
    text-decoration: none; color: var(--ink); transition: border-color .2s, transform .3s var(--spring);
  }
  .side-me:hover { border-color: var(--accent); transform: translateY(-2px); }
  .side-me span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .side-me strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-me small { color: var(--muted); font-size: .78rem; font-weight: 600; }

  /* the bottom tab bar becomes the sidebar menu */
  .tabbar {
    position: fixed; z-index: 26; left: 18px; top: 112px; right: auto; bottom: auto; transform: none;
    width: calc(var(--side) - 36px); height: auto; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
    background: none; border: 0; border-radius: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tab { flex-direction: row; justify-content: flex-start; gap: .9rem; height: 52px; padding: 0 16px; font-size: 1rem; font-weight: 700; border-radius: 16px; transition: color .3s, background .2s; }
  .tab .ico { width: 23px; height: 23px; }
  .tab:hover { background: var(--surface-2); }
  .tab[aria-current=page] { color: var(--accent); }
  .tab[aria-current=page] .ico { transform: scale(1.1); }
  .tab-indicator { top: 0; left: 0; bottom: auto; width: 100%; height: 52px; transform: translateY(calc(var(--i, 0) * 58px)); }
  .tab-indicator::before { inset: 0; border-radius: 16px; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }

  /* content area */
  .main { margin-left: var(--side); max-width: none; padding: 2.5rem var(--gutter) 3rem; }
  .main > .view { max-width: 1180px; margin-left: auto; margin-right: auto; }
  .footer { margin-left: var(--side); max-width: none; padding: 0 var(--gutter) 2.5rem; }
  .footer p { max-width: 1180px; margin-left: auto; margin-right: auto; }
  .toast { left: calc(50% + var(--side) / 2); bottom: 30px; }

  .sky { min-height: 320px; padding: 2.6rem 2.8rem; border-radius: 34px; }
  .sky h1 { font-size: 3.6rem; max-width: 18ch; }
  .sky-sub { font-size: 1.08rem; max-width: 42ch; }
  .page-head h1 { font-size: 3.2rem; }
  .today-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; margin-top: 1.25rem; align-items: start; }

  .verse--big blockquote { font-size: 2.15rem; }
  .verse-card { padding: 2rem 2rem 1.4rem; }
  .card { padding: 1.6rem; }
  .two-col { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
  .two-col > aside { position: sticky; top: 2.5rem; }
  .moods .face { width: 56px; height: 56px; }
  .mood > span { font-size: .85rem; padding: 1rem .2rem .8rem; }
  .chips--scroll { flex-wrap: wrap; margin: 0 0 1.5rem; padding: 4px 0 10px; }
  .circle-picker { flex-wrap: wrap; margin: 0 0 1.25rem; padding: 4px 0 12px; gap: .5rem .25rem; }
  .circle-opt > span { width: 88px; }
  .themes { grid-template-columns: repeat(4, 1fr); }

  /* sign-in & sign-up: big sky on the left, form on the right */
  .onboarding { padding: 2.5rem 44px; place-items: center; }
  .ob-wrap.ob-split { max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
  .ob-split > .ob-sky { display: flex; min-height: min(680px, calc(100svh - 5rem)); margin: 0; padding: 3rem; position: sticky; top: 2.5rem; border-radius: 36px; }
  .ob-split > .ob-sky h1 { font-size: clamp(3.4rem, 5.5vw, 5.2rem); max-width: 12ch; }
  .ob-split > .ob-sky .sky-sub { font-size: 1.2rem; }
  .ob-split > .ob-sky .sky-sun { width: 150px; height: 150px; }
  .ob-split > .ob-sky.sky--night .sky-sun { width: 80px; height: 80px; right: 40px; top: 40px; }
  .ob-pane { width: 100%; max-width: 520px; justify-self: start; }
  .ob-pane-title { display: block; font-size: 2.3rem; margin: 0 0 1.25rem; }
  .ob-form-title { display: block; font-size: 1.8rem; margin: 0 0 1.25rem; }
  .ob-split .ob-sky--sm { min-height: min(680px, calc(100svh - 5rem)); }
  .ob-card { padding: 2rem 2rem 1.75rem; }
  .ob-features li { padding: 1rem 1.15rem; }
}

@media (min-width: 1440px) {
  :root { --side: 288px; }
  .verse-list { columns: 3 300px; }
}

/* ---------- PREMIUM FINISH ---------- */
/* fine film grain over everything (very subtle) */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="midnight"] body::after, [data-theme="ankara"] body::after { opacity: .07; }

/* gradient wordmark */
.brand > span:last-child { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* glassy edge on cards in dark themes */
[data-theme="midnight"] .card, [data-theme="ankara"] .card { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), var(--card-shadow); }

/* buttons: soft inner highlight */
.btn:not(.btn--ghost) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 10px 24px -10px var(--accent); }

/* the Daily Word gets a fine gradient border */
.verse--big.verse-card {
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(140deg, var(--accent) 0%, transparent 38%, transparent 62%, var(--accent-2) 100%) border-box;
}
.verse--big .quote-mark { width: 46px; height: 46px; }

/* verse text fades in from a soft blur */
.reveal { animation: reveal .9s var(--ease) both; }

/* loading placeholders shimmer */
.verse.is-loading blockquote::after {
  background:
    linear-gradient(100deg, transparent 20%, rgb(255 255 255 / .45) 50%, transparent 80%) 0 0 / 200% 100%,
    repeating-linear-gradient(var(--surface-2) 0 .85em, transparent .85em 1.3em);
  animation: shimmer 1.4s linear infinite;
}
[data-theme="midnight"] .verse.is-loading blockquote::after, [data-theme="ankara"] .verse.is-loading blockquote::after {
  background:
    linear-gradient(100deg, transparent 20%, rgb(255 255 255 / .08) 50%, transparent 80%) 0 0 / 200% 100%,
    repeating-linear-gradient(var(--surface-2) 0 .85em, transparent .85em 1.3em);
}

/* weekly progress ring */
.week-ring { width: 20px; height: 20px; flex: none; }
.week-ring circle { fill: none; stroke-width: 4; }
.week-ring .ring-bg { stroke: currentColor; opacity: .25; }
.week-ring .ring-fg { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: calc(94.25 * (1 - var(--p))); transform: rotate(-90deg); transform-origin: 18px 18px; animation: ringFill 1.4s var(--ease) both .3s; }

/* shooting stars */
.sky-stars .shoot {
  position: absolute; width: 110px; height: 1.6px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgb(255 255 255 / .95), transparent);
  transform: rotate(-24deg); transform-origin: left center;
  animation: shoot 12s linear var(--d) infinite;
}

/* sky drifts gently with the mouse (PC) */
.sky-sun, .sky-clouds, .sky-stars { transition: translate .8s var(--ease); }
.sky-sun { translate: calc(var(--px, 0) * -22px) calc(var(--py, 0) * -14px); }
.sky-clouds { translate: calc(var(--px, 0) * 14px) 0; }
.sky-stars { translate: calc(var(--px, 0) * -8px) calc(var(--py, 0) * -5px); }

/* soft glow follows the cursor across cards (PC) */
@media (hover: hover) and (pointer: fine) {
  .card:not(.verse--big):not(.sky):hover {
    background-image: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 8%, transparent), transparent 65%);
  }
}

/* page transitions */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
.main { view-transition-name: dawn-main; }
::view-transition-old(dawn-main) { animation: vtOut .2s var(--ease) both; }
::view-transition-new(dawn-main) { animation: vtIn .5s var(--ease) both; }

/* refined scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* sidebar: glowing active item */
@media (min-width: 1024px) {
  .tab-indicator::before { background: linear-gradient(90deg, var(--accent-soft), transparent 120%); box-shadow: inset 3px 0 0 var(--accent), 0 8px 24px -14px var(--accent); }
}

/* toast: frosted */
.toast { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); background: color-mix(in srgb, var(--ink) 92%, transparent); }

/* ---------- TYPE, ICONS & LEGAL ---------- */
.sky h1, .ob-split > .ob-sky h1 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
.ob-card h2 { font-size: clamp(2.1rem, 9vw, 2.7rem); }
.ob-pane-title { font-size: 2.8rem !important; }
.ob-form-title { font-size: 2.3rem !important; }
.sky h1 { font-size: clamp(2.5rem, 10.5vw, 3.4rem); line-height: 1; }
.page-head h1 { font-size: clamp(2.6rem, 10vw, 3.6rem); }
.grad-text { font-style: italic; padding-right: .06em; }
.verse blockquote, .reflection, .note-text, .hukam-lines { font-family: var(--serif); }
.verse blockquote { font-weight: 500; letter-spacing: -.005em; }
.reflection, .lede { font-style: italic; }
.stat b { font-family: var(--display); font-weight: 400; font-size: 2.1rem; }
.stat .ico { width: 18px; height: 18px; color: var(--accent); display: block; margin: 0 auto .2rem; }
.profile h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
.profile-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: .1rem 0 0; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.profile-meta span, .account-email { display: inline-flex; align-items: center; gap: .4rem; }
.profile-meta .ico, .account-email .ico { color: var(--accent); }
.account-email { margin: 0 0 .35rem; }
legend .ico, .field > label .ico { vertical-align: -3px; color: var(--accent); margin-right: .2rem; }
.alias-box strong { font-family: var(--display); font-weight: 400; font-size: 1.5rem; }
.brand { font-family: var(--display); font-weight: 400; font-size: 1.75rem; letter-spacing: 0; }

/* inputs with an icon inside */
.input-ico { position: relative; }
.input-ico > .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; transition: color .2s; z-index: 1; }
.input-ico > input, .input-ico > .pw-wrap > input, .pw-wrap.input-ico > input { padding-left: 2.85rem !important; }
.input-ico:focus-within > .ico { color: var(--accent); }
.pw-wrap.input-ico .icon-btn .ico { position: static; transform: none; width: 20px; height: 20px; color: currentColor; }

/* consent checkboxes */
.consent { border: 0; padding: 0; margin: 1.1rem 0 .5rem; display: grid; gap: .7rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; font-size: .9rem; line-height: 1.45; color: var(--ink-soft); position: relative; }
.check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.check .box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: background .2s, border-color .2s, transform .3s var(--spring); margin-top: 1px; }
.check .box .ico { width: 14px; height: 14px; stroke-width: 3; color: var(--accent-ink); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--spring); }
.check input:checked + .box { background: var(--grad); border-color: transparent; }
.check input:checked + .box .ico { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.check:hover .box { border-color: var(--accent); }
.check .link-btn { font-size: inherit; }

/* legal sheet */
.sheet { width: min(96vw, 720px); height: min(92svh, 900px); max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet .sheet-body { flex: 1; min-height: 0; }
@media (max-width: 600px) { .sheet-foot .consent { gap: .5rem; } .sheet-foot .check { font-size: .84rem; } .sheet-foot > .hint { font-size: .8rem; } }
.sheet:not([open]) { display: none; }
.sheet-head { display: flex; align-items: center; gap: .85rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.8rem; }
.sheet-head .eyebrow { margin: 0; }
.sheet-head .icon-btn { margin-left: auto; }
.sheet-head .badge-ico { width: 44px; height: 44px; margin: 0; }
.sheet-body { overflow-y: auto; padding: 1.25rem 1.25rem 1.5rem; overscroll-behavior: contain; scroll-behavior: smooth; }
.sheet-foot { padding: 1rem 1.25rem 1.2rem; border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .consent { margin-top: .6rem; }
.sheet-foot .btn-row { margin-top: .8rem; }
.sheet-foot > .hint { display: flex; gap: .45rem; margin: 0; }
.legal-updated { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.legal-summary { list-style: none; padding: 1rem; margin: 0 0 1rem; display: grid; gap: .6rem; border-radius: 18px; background: var(--surface-2); }
.legal-summary li { display: flex; gap: .65rem; align-items: flex-start; font-weight: 600; font-size: .93rem; }
.legal-summary .ico { color: var(--accent); width: 20px; height: 20px; margin-top: 1px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.25rem; }
.legal-toc a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; border-radius: var(--pill); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--ink-soft); text-decoration: none; transition: border-color .2s, color .2s; }
.legal-toc a:hover { border-color: var(--accent); color: var(--accent); }
.legal-sec { padding: 1.1rem 0; border-top: 1px solid var(--line); scroll-margin-top: .5rem; }
.legal-sec h3 { display: flex; align-items: center; gap: .65rem; font-size: 1.05rem; margin-bottom: .75rem; }
.legal-sec h3 .badge-ico { width: 34px; height: 34px; border-radius: 11px; margin: 0; }
.legal-sec h3 .badge-ico .ico { width: 17px; height: 17px; }
.legal-sec p { font-size: .93rem; color: var(--ink-soft); }
.legal-items { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.legal-items li { display: flex; gap: .75rem; align-items: flex-start; }
.legal-items .badge-ico { width: 34px; height: 34px; border-radius: 11px; margin: 0; }
.legal-items .badge-ico .ico { width: 17px; height: 17px; }
.legal-items strong { font-size: .93rem; }
.legal-items p { margin: .1rem 0 0; font-size: .89rem; }
.legal-after { display: flex; gap: .5rem; align-items: flex-start; margin-top: .9rem; padding: .7rem .85rem; border-radius: 14px; background: var(--surface-2); font-size: .88rem !important; }
.legal-after .ico { color: var(--accent); flex: none; margin-top: 2px; }

/* install guide */
.sheet.guide { width: min(96vw, 560px); height: auto; max-height: min(92svh, 860px); }
.guide .sheet-head h2 { font-size: 1.6rem; line-height: 1.05; }
.guide-perks { list-style: none; padding: 0; margin: 0 0 1.1rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.guide-perks li { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; padding: .8rem .4rem; border-radius: 16px; background: var(--surface-2); font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.guide-perks .ico { color: var(--accent); }
.guide-perks li:first-child .ico { animation: zapPulse 2.4s ease-in-out infinite; }
.guide-auto { padding: 1rem; border-radius: 20px; margin-bottom: 1.1rem; background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--line); }
.guide-auto p { margin: 0 0 .7rem; font-size: .93rem; }
.guide-auto .hint { margin: .7rem 0 0; }
.guide-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--surface-2); margin-bottom: 1rem; }
.guide-tab { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 40px; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink-soft); font-weight: 700; font-size: .85rem; cursor: pointer; transition: background .25s, color .25s, box-shadow .25s; }
.guide-tab[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--card-shadow); }
.guide-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; counter-reset: none; }
.guide-steps li { position: relative; display: flex; gap: .8rem; align-items: flex-start; padding: .9rem .9rem .9rem 1rem; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); animation: riseIn .45s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.guide-steps li:not(:last-child)::after { content: ''; position: absolute; left: 2.15rem; bottom: -.7rem; width: 2px; height: .7rem; background: var(--line); }
.guide-num { position: absolute; top: -8px; left: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--accent-ink); font-size: .72rem; font-weight: 800; box-shadow: 0 4px 10px -4px var(--accent); }
.guide-steps .badge-ico { width: 42px; height: 42px; border-radius: 14px; }
.guide-steps strong { display: block; font-size: .95rem; }
.guide-steps p { margin: .15rem 0 0; font-size: .86rem; color: var(--ink-soft); }
.guide-steps li:first-child .badge-ico .ico { animation: nudge 2s ease-in-out infinite; }
.guide-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.guide-foot .btn { min-height: 44px; }
@keyframes zapPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- TRANSITIONS THAT NEVER BREAK THE LAYOUT ---------- */
/* sliding steps and views can never cause sideways scrolling */
.onboarding, .main, .ob-card, .card { overflow-x: clip; }
.dialog.closing { animation: dialogOut .22s var(--ease) both; }
.dialog.closing::backdrop { animation: fadeOut .22s var(--ease) both; }
.dialog[open]::backdrop { animation: fadeIn .3s var(--ease) both; }
/* pages slide gently in the direction you are moving through the tabs */
[data-nav="back"]::view-transition-new(dawn-main) { animation-name: vtInBack; }
[data-nav="fwd"]::view-transition-new(dawn-main) { animation-name: vtInFwd; }
@media (max-width: 1023px) { /* phones: shorter, smaller movement */
  ::view-transition-new(dawn-main) { animation-duration: .38s; }
}


/* ---------- MORE THEMES ---------- */
[data-theme="harmattan"] {
  --bg: #F7F0E6; --surface: #FFFDF9; --surface-2: #F1E6D6; --glass: rgb(255 253 249 / .78);
  --ink: #2E2416; --ink-soft: #5F5040; --muted: #75654F; --line: #E8DAC6;
  --accent: #A65A17; --accent-2: #8C3B1F; --accent-ink: #FFFFFF; --accent-soft: #F6E2CB;
  --sky-1: #FBE9C6; --sky-2: #F0C38E; --sky-3: #D98E5C; --sky-ink: #2E2416; --sun: #FFF0C2;
  --glow-1: rgb(217 142 92 / .22); --glow-2: rgb(240 195 142 / .26);
  --shadow: 80 55 25; color-scheme: light;
}
[data-theme="rose"] {
  --bg: #FDF6F4; --surface: #FFFFFF; --surface-2: #F9E9E5; --glass: rgb(255 255 255 / .78);
  --ink: #33201F; --ink-soft: #66484A; --muted: #7F6466; --line: #F1DCD7;
  --accent: #A84A57; --accent-2: #A8673A; --accent-ink: #FFFFFF; --accent-soft: #F8E0DE;
  --sky-1: #FFE8E0; --sky-2: #F5BFB5; --sky-3: #D9967F; --sky-ink: #33201F; --sun: #FFF4E6;
  --glow-1: rgb(217 150 127 / .22); --glow-2: rgb(245 191 181 / .26);
  --shadow: 90 40 40; color-scheme: light;
}
[data-theme="nordic"] {
  --bg: #F4F6F8; --surface: #FFFFFF; --surface-2: #E9EEF2; --glass: rgb(255 255 255 / .8);
  --ink: #17212B; --ink-soft: #44525F; --muted: #5C6B78; --line: #DCE3E9;
  --accent: #2F5D7C; --accent-2: #3F6F7E; --accent-ink: #FFFFFF; --accent-soft: #DDE8F0;
  --sky-1: #EEF4F8; --sky-2: #C7D8E5; --sky-3: #9DB8CC; --sky-ink: #17212B; --sun: #FFFFFF;
  --glow-1: rgb(157 184 204 / .25); --glow-2: rgb(199 216 229 / .3);
  --shadow: 23 33 43; color-scheme: light;
}
[data-theme="paper"] {
  --bg: #FAFAF7; --surface: #FFFFFF; --surface-2: #F0F0EC; --glass: rgb(255 255 255 / .85);
  --ink: #111111; --ink-soft: #383838; --muted: #595959; --line: #DEDED8;
  --accent: #111111; --accent-2: #3B3B3B; --accent-ink: #FFFFFF; --accent-soft: #EAEAE4;
  --sky-1: #F4F3EE; --sky-2: #E2E0D8; --sky-3: #C4C1B6; --sky-ink: #111111; --sun: #FFFFFF;
  --glow-1: transparent; --glow-2: transparent;
  --shadow: 0 0 0; color-scheme: light;
}
[data-theme="mocha"] {
  --bg: #1A1411; --surface: #241C18; --surface-2: #2F2520; --glass: rgb(36 28 24 / .82);
  --ink: #F5EDE6; --ink-soft: #D9CBBF; --muted: #B0A092; --line: #3B2F28;
  --accent: #E0A872; --accent-2: #D08560; --accent-ink: #1A1411; --accent-soft: #3A2C22;
  --sky-1: #2A1D16; --sky-2: #5A3A28; --sky-3: #B07A50; --sky-ink: #F5EDE6; --sun: #FFD8A8;
  --glow-1: rgb(224 168 114 / .14); --glow-2: rgb(208 133 96 / .1);
  --shadow: 0 0 0; color-scheme: dark;
}
[data-theme="aurora"] {
  --bg: #08131A; --surface: #0E1D25; --surface-2: #142C36; --glass: rgb(14 29 37 / .82);
  --ink: #EAFBF8; --ink-soft: #C2E4DE; --muted: #8FB6B0; --line: #1D3943;
  --accent: #5EEAD4; --accent-2: #A78BFA; --accent-ink: #052024; --accent-soft: #123A3D;
  --sky-1: #061820; --sky-2: #0E3B45; --sky-3: #3B2F7A; --sky-ink: #EAFBF8; --sun: #E6FFFA;
  --glow-1: rgb(94 234 212 / .14); --glow-2: rgb(167 139 250 / .14);
  --shadow: 0 0 0; color-scheme: dark;
}

/* each theme's signature detail in the sky */
[data-theme="harmattan"] .sky::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 20% 110%, rgb(255 236 200 / .65), transparent 60%), radial-gradient(80% 50% at 90% 0%, rgb(255 246 228 / .5), transparent 70%); filter: blur(6px); animation: haze 14s ease-in-out infinite alternate; }
[data-theme="rose"] .sky::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / .45) 48%, transparent 60%) 0 0 / 260% 100%; animation: sheen 7s ease-in-out infinite; }
[data-theme="nordic"] .sky::before { content: ''; position: absolute; inset: -40px 0 0; z-index: -1; background-image: radial-gradient(circle, rgb(255 255 255 / .95) 1.2px, transparent 1.6px), radial-gradient(circle, rgb(255 255 255 / .7) 1px, transparent 1.4px); background-size: 46px 46px, 31px 31px; background-position: 0 0, 15px 20px; animation: snow 14s linear infinite; }
[data-theme="paper"] .sky::before { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(transparent 0 27px, rgb(0 0 0 / .06) 27px 28px); }
[data-theme="paper"] .sky { box-shadow: 0 0 0 1px var(--line); }
[data-theme="paper"] .btn:not(.btn--ghost) { box-shadow: none; }
[data-theme="mocha"] .sky::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 80% 100%, rgb(255 190 130 / .22), transparent 70%); }
[data-theme="aurora"] .sky::before { content: ''; position: absolute; inset: -20%; z-index: -1; background: radial-gradient(45% 30% at 30% 35%, rgb(94 234 212 / .45), transparent 70%), radial-gradient(40% 30% at 70% 25%, rgb(167 139 250 / .45), transparent 70%); filter: blur(18px); animation: aurora 14s ease-in-out infinite alternate; }
[data-theme="aurora"] .verse--big.verse-card { box-shadow: 0 0 40px -18px var(--accent), var(--card-shadow); }

/* dark themes share these touches */
[data-mode="dark"] .error, [data-mode="dark"] .btn--danger, [data-mode="dark"] .link-btn--danger { color: #FF9C9C; }
[data-mode="dark"] .card { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), var(--card-shadow); }
[data-mode="dark"] body::after { opacity: .07; }
[data-mode="dark"] .sky-chip { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .18); }
[data-mode="dark"] .verse.is-loading blockquote::after {
  background: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / .08) 50%, transparent 80%) 0 0 / 200% 100%, repeating-linear-gradient(var(--surface-2) 0 .85em, transparent .85em 1.3em);
}

/* ---------- THEME PICKER: live mini previews ---------- */
.theme-group { display: flex; align-items: center; gap: .4rem; margin: 1.1rem 0 .6rem; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.theme-group:first-child { margin-top: 0; }
.themes { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)) !important; }
.theme-opt > span { padding: .55rem .55rem .75rem; }
.tp { display: block; position: relative; height: 92px; border-radius: 14px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.tp-sky { position: absolute; left: 6px; right: 6px; top: 6px; height: 40px; border-radius: 10px; background: linear-gradient(160deg, var(--sky-1), var(--sky-2) 55%, var(--sky-3)); overflow: hidden; }
.tp-sun { position: absolute; right: 10px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 12px 3px var(--sun); transition: transform .5s var(--spring); }
.tp-card { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 38px; border-radius: max(3px, calc(var(--r-lg) * .38)); background: var(--surface); border: var(--card-border); padding: 7px 8px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 8px; align-items: center; }
.tp-line { display: block; height: 5px; border-radius: 4px; background: var(--ink); opacity: .75; }
.tp-line--short { width: 60%; background: var(--ink-soft); opacity: .45; }
.tp-btn { grid-row: 1 / 3; grid-column: 2; width: 34px; height: 16px; border-radius: min(var(--btn-r), 99px); background: var(--grad); }
.tp-sky { border-radius: max(3px, calc(var(--r-lg) * .38)); }
.tp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tp-split .tp { height: 92px; }
.theme-opt input:checked + span .tp-sun { transform: translateY(-3px) scale(1.2); }
.theme-swatch { display: none; }

/* ---------- SIDEBAR v2 (PC) ---------- */
.side-toggle, .side-mini { display: none; }
@media (min-width: 1024px) {
  :root { --side: 276px; }
  .side-rail { --side: 88px; }
  .topbar, .tabbar, .main, .footer { transition: width .45s var(--ease), margin .45s var(--ease), padding .45s var(--ease), left .45s var(--ease); }
  .topbar { padding: 24px 16px 18px; }
  .brand { padding: 0 10px; gap: .6rem; font-size: 2rem; white-space: nowrap; }
  .side-toggle {
    display: grid; place-items: center; position: absolute; top: 32px; right: -15px; z-index: 30;
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); box-shadow: var(--card-shadow);
    transition: transform .45s var(--spring), color .2s, border-color .2s;
  }
  .side-toggle:hover { color: var(--accent); border-color: var(--accent); }
  .side-toggle .ico { width: 16px; height: 16px; }
  .side-rail .side-toggle { transform: rotate(180deg); }

  .tabbar { left: 16px; top: 120px; width: calc(var(--side) - 32px); }
  .tabbar::before { content: 'Menu'; position: absolute; top: -26px; left: 16px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
  .tab { font-size: var(--fs-base); }
  .tab span { transition: opacity .25s; white-space: nowrap; }

  .side-mini {
    display: flex; align-items: center; gap: .7rem; padding: .85rem .9rem; border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-soft), transparent 140%); border: 1px solid var(--line);
    text-decoration: none; color: var(--ink); transition: transform .3s var(--spring), border-color .2s;
  }
  .side-mini:hover { transform: translateY(-2px); border-color: var(--accent); }
  .side-mini .face, .side-mini > .ico { width: 34px; height: 34px; flex: none; color: var(--accent); }
  .side-mini span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .side-mini strong { font-size: var(--fs-sm); }
  .side-mini small { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }
  .side-mini small .ico { width: 13px; height: 13px; color: var(--accent); }
  .side-mini--cta > .ico { animation: nudge 2.4s ease-in-out infinite; }

  /* ---- slim icon rail ---- */
  .side-rail .topbar { padding: 24px 12px 18px; }
  .side-rail .brand { justify-content: center; padding: 0; }
  .side-rail .brand > span:last-child,
  .side-rail .tab span,
  .side-rail .tabbar::before,
  .side-rail .side-label,
  .side-rail .side-me span,
  .side-rail .side-mini span { display: none; }
  .side-rail .tabbar { left: 12px; width: calc(var(--side) - 24px); }
  .side-rail .tab { justify-content: center; padding: 0; }
  .side-rail .tab-indicator::before { box-shadow: inset 0 -3px 0 var(--accent); }
  .side-rail .side-mini, .side-rail .side-me, .side-rail .streak-chip, .side-rail .theme-btn { justify-content: center; padding: .65rem 0 !important; }
  .side-rail .side-mini { background: var(--accent-soft); }
  .side-rail .side-me { border: 0; background: none; }
  /* hover labels in rail mode */
  .side-rail [data-label] { position: relative; }
  .side-rail [data-label]:hover::after, .side-rail [data-label]:focus-visible::after {
    content: attr(data-label); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%);
    padding: .4rem .7rem; border-radius: 10px; white-space: nowrap; pointer-events: none;
    background: var(--ink); color: var(--bg); font-size: var(--fs-xs); font-weight: 700; z-index: 40;
    box-shadow: var(--lift-shadow); animation: tipIn .2s var(--ease) both;
  }
}

/* ---------- UPDATE NOTICE ---------- */
.update-bar {
  position: fixed; z-index: 70; left: 50%; bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 24px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: .8rem; padding: .8rem .8rem .8rem 1rem;
  border-radius: 22px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--lift-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  animation: updateIn .6s var(--spring) both;
}
.update-bar[hidden] { display: none; }
.update-bar .badge-ico { width: 40px; height: 40px; flex: none; }
.update-bar div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.update-bar strong { font-size: var(--fs-sm); }
.update-bar small { font-size: var(--fs-xs); color: var(--muted); }
.update-bar .btn { min-height: 40px; padding: 0 1rem; font-size: var(--fs-sm); }
@media (min-width: 1024px) { .update-bar { bottom: 28px; left: calc(50% + var(--side) / 2); } }
@media (max-width: 380px) { .update-bar small { display: none; } }

/* ---------- FLUID TYPE ---------- */
body { font-size: var(--fs-base); line-height: 1.6; font-feature-settings: 'cv11', 'ss01', 'ss03'; }
h1 { font-size: var(--fs-2xl); letter-spacing: -.015em; line-height: 1.04; }
h2 { font-size: var(--fs-lg); letter-spacing: -.02em; }
h3 { font-size: var(--fs-md); letter-spacing: -.015em; }
.sky h1 { font-size: var(--fs-3xl); line-height: 1; letter-spacing: -.02em; }
.page-head h1, .circle-hero h1, .profile h1 { font-size: var(--fs-2xl); }
.ob-card h2 { font-size: var(--fs-xl); }
.ob-split > .ob-sky h1 { font-size: clamp(3.2rem, 2rem + 4vw, 5.4rem); }
.sky-sub { font-size: var(--fs-md); }
.hint { font-size: var(--fs-sm); }
.small, .hint.small { font-size: var(--fs-xs); }
.label, .eyebrow { font-size: var(--fs-xs); }
.verse blockquote { font-size: var(--fs-md); line-height: 1.5; }
.verse--big blockquote { font-size: var(--fs-xl); line-height: 1.35; }
.reflection { font-size: var(--fs-md); }
.note-text { font-size: var(--fs-md); }
.chip > span { font-size: var(--fs-sm); }
.btn { font-size: var(--fs-base); }
.post-text { font-size: var(--fs-base); }
.stat b { font-size: var(--fs-xl); }
/* 16px+ in form fields stops iPhones zooming in when you tap them */
input[type=text], input[type=email], input[type=password], input[type=time], textarea { font-size: max(16px, var(--fs-base)); }

/* ---------- RESPONSIVE: every screen size ---------- */
/* grid & flex children may always shrink, so nothing can push past the screen edge */
@media (max-width: 767px) { .today-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899px) { .two-col { grid-template-columns: minmax(0, 1fr); } .two-col > aside { position: static; } }
.two-col > *, .today-grid > *, .stack > *, .mini-grid > *, .themes > *, .btn-row > *, .card-head > *, .tile > * { min-width: 0; }
.moods { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.crisis-list .ci-text { flex: 1; }
.crisis-list strong, .post-who strong, .side-me strong { overflow-wrap: anywhere; }
.btn-row .btn { min-width: min(140px, 100%); }
@media (max-width: 400px) {
  .crisis-list li a { flex-wrap: wrap; }
  .crisis-list .ci-num { margin-left: calc(38px + .8rem); }
  .btn-row { flex-direction: column; }
  .week-day .dot { width: 30px; height: 30px; }
  .week-day .dot .face { width: 28px; height: 28px; }
}
html, body { max-width: 100%; }
img, svg { max-width: 100%; }
.onboarding { min-height: 100dvh; }
/* very small phones (320–360px) */
@media (max-width: 360px) {
  :root { --gutter: 12px; --nav-h: 62px; }
  .card { padding: 1.1rem; }
  .sky { padding: 1.15rem 1.05rem 1rem; min-height: 210px; border-radius: 22px; }
  .tabbar { left: 8px; right: 8px; }
  .tab span { font-size: .64rem; }
  .moods { gap: .2rem; }
  .mood .face { width: 40px; height: 40px; }
  .mood > span { font-size: .7rem; }
  .guide-tab { font-size: .76rem; }
  .guide-tab .ico { display: none; }
  .stats { gap: .4rem; }
  .verse-actions .icon-btn { width: 36px; }
}
/* tablets (600–1023px) */
@media (min-width: 600px) and (max-width: 1023px) {
  .tabbar { left: 50%; right: auto; width: min(560px, calc(100vw - 32px)); transform: translateX(-50%); }
  .main { padding-left: max(var(--gutter), 4vw); padding-right: max(var(--gutter), 4vw); }
  .ob-wrap { max-width: 600px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .today-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) and (max-width: 1023px) {
  .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
}
/* phones held sideways */
@media (max-height: 500px) and (orientation: landscape) {
  .sky { min-height: 180px; }
  .tabbar { height: 54px; }
  .tab span { display: none; }
  .ob-split > .ob-sky { min-height: 260px !important; }
}
/* big monitors */
@media (min-width: 1600px) {
  .main > .view, .footer p { max-width: 1320px; }
  .verse-list { columns: 3 320px; }
}


/* =====================================================================
   THEME PERSONALITIES: each light theme has its own fonts, shapes,
   borders, shadows, buttons, background and sky. Fonts load only when
   that theme is chosen (see THEME_FONTS in index.html).
   ===================================================================== */
:root {
  --head: var(--sans);
  --card-border: 1px solid var(--line);
  --btn-r: var(--pill);
  --chip-r: var(--pill);
  --label-track: .14em;
  --label-case: uppercase;
  --h1-weight: 400;
  --display-style: normal;
  --pattern: none;
}
h1, .sky h1, .page-head h1, .ob-card h2, .ob-pane-title, .ob-form-title, .stat b, .brand, .alias-box strong, .sheet-head h2 {
  font-weight: var(--h1-weight); font-style: var(--display-style);
}
.sky h1 { overflow-wrap: anywhere; }

/* soft colour glows + theme pattern on their own fixed layer (no repaint while scrolling) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 110% -10%, var(--glow-1), transparent 60%),
    radial-gradient(50rem 40rem at -20% 30%, var(--glow-2), transparent 60%),
    var(--pattern);
}
body::after { transform: translateZ(0); }

/* sun & moon halo: a soft pulse that only changes opacity (smooth on every phone) */
.sky-sun::after {
  content: ''; position: absolute; inset: -45%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--sun) 55%, transparent) 0%, transparent 65%);
  animation: halo 5s ease-in-out 2s infinite;
}

/* ---------------- LAGOS SUNSET: bold, loud, sticker-style ---------------- */
[data-theme="lagos"] {
  --display: 'Bricolage Grotesque', var(--sans); --head: 'Bricolage Grotesque', var(--sans);
  --h1-weight: 800; --r-lg: 22px; --btn-r: 14px; --chip-r: 12px; --label-track: .08em;
  --card-border: 2px solid var(--ink);
  --card-shadow: 5px 5px 0 var(--ink); --lift-shadow: 8px 8px 0 var(--ink);
  --pattern: radial-gradient(rgb(194 65 12 / .09) 1.2px, transparent 1.6px) 0 0 / 16px 16px;
}
[data-theme="lagos"] h1 { letter-spacing: -.035em; }
[data-theme="lagos"] .sky, [data-theme="lagos"] .tabbar { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
[data-theme="lagos"] .btn:not(.btn--ghost) { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
[data-theme="lagos"] .btn:not(.btn--ghost):hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
[data-theme="lagos"] .btn:not(.btn--ghost):active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
[data-theme="lagos"] .btn--ghost { border: 2px solid var(--ink); }
[data-theme="lagos"] .chip input:checked + span { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
[data-theme="lagos"] .badge-ico { border: 2px solid var(--ink); border-radius: 12px; }
[data-theme="lagos"] .verse--big.verse-card { border: 2px solid var(--ink); background: var(--surface); }
[data-theme="lagos"] a.card:hover, [data-theme="lagos"] .verse-card:hover, [data-theme="lagos"] .post:hover { transform: translate(-3px, -3px); }
[data-theme="lagos"] .sky-sun::before {
  content: ''; position: absolute; inset: -70%; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(rgb(255 255 255 / .35) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
  animation: spin 40s linear infinite;
}

/* ---------------- HARMATTAN: earthy, handmade, woven ---------------- */
[data-theme="harmattan"] {
  --display: 'Fraunces', Georgia, serif; --h1-weight: 600; --r-lg: 18px; --btn-r: 12px; --chip-r: 10px; --label-track: .1em;
  --card-shadow: 0 1px 0 rgb(80 55 25 / .08), 0 12px 28px -20px rgb(80 55 25 / .45);
  --pattern: repeating-linear-gradient(115deg, rgb(166 90 23 / .035) 0 2px, transparent 2px 14px);
}
[data-theme="harmattan"] .card { outline: 1px dashed rgb(166 90 23 / .28); outline-offset: -7px; }
[data-theme="harmattan"] .sky { border-radius: 18px; }
[data-theme="harmattan"] .sky-sun { filter: blur(1.5px); }
[data-theme="harmattan"] .sky-hills path:first-child { fill: rgb(230 180 120 / .45); }
[data-theme="harmattan"] .sky-hills path:last-child { fill: rgb(247 240 230 / .75); }
[data-theme="harmattan"] body::after { opacity: .085; }
[data-theme="harmattan"] .eyebrow, [data-theme="harmattan"] .label { font-variant: small-caps; text-transform: lowercase; letter-spacing: .08em; font-size: .9rem; }

/* ---------------- ROSE GOLD: elegant, luxurious, gold edges ---------------- */
[data-theme="rose"] {
  --display: 'Cormorant Garamond', Georgia, serif; --h1-weight: 600; --display-style: italic;
  --r-lg: 24px; --label-track: .3em;
  --edge: linear-gradient(135deg, #E9B9A9, #FBEAE2 40%, #C98B6B 100%);
  --card-border: 1px solid transparent;
  --grad: linear-gradient(110deg, #9A4250, #A8673A 50%, #9A4250);
  --pattern: radial-gradient(circle at 18% 12%, rgb(233 185 169 / .35), transparent 30%), radial-gradient(circle at 85% 80%, rgb(201 139 107 / .22), transparent 32%);
}
[data-theme="rose"] .card, [data-theme="rose"] .sky { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--edge) border-box; border: 1px solid transparent; }
[data-theme="rose"] .sky { background: linear-gradient(165deg, var(--sky-1), var(--sky-2) 55%, var(--sky-3)) padding-box, var(--edge) border-box; border-width: 1.5px; }
[data-theme="rose"] h1, [data-theme="rose"] .sky h1 { font-size: calc(var(--fs-2xl) * 1.15); letter-spacing: 0; }
[data-theme="rose"] .sky h1 { font-size: calc(var(--fs-3xl) * 1.1); }
[data-theme="rose"] .btn:not(.btn--ghost) { background-size: 220% 100%; transition: background-position .8s var(--ease), transform .25s var(--spring); }
[data-theme="rose"] .btn:not(.btn--ghost):hover { background-position: 100% 0; }

/* ---------------- SAGE: organic, soft, round ---------------- */
[data-theme="sage"] {
  --sans: 'Nunito', system-ui, sans-serif; --display: 'Nunito', system-ui, sans-serif; --head: 'Nunito', system-ui, sans-serif;
  --h1-weight: 800; --r-lg: 32px; --chip-r: 999px; --label-case: none; --label-track: .02em;
  --card-border: 0 solid transparent;
  --card-shadow: 0 2px 4px rgb(43 90 60 / .05), 0 16px 34px -20px rgb(43 90 60 / .4);
  --pattern: radial-gradient(70% 50% at 100% 100%, rgb(95 179 137 / .12), transparent 60%);
}
[data-theme="sage"] h1 { letter-spacing: -.03em; }
[data-theme="sage"] .sky { border-radius: 44px 44px 44px 14px; }
[data-theme="sage"] .badge-ico { border-radius: 50%; }
[data-theme="sage"] .sky-hills path:first-child { fill: rgb(63 143 103 / .35); }
[data-theme="sage"] .sky-hills path:last-child { fill: rgb(243 248 242 / .85); }
[data-theme="sage"] .label, [data-theme="sage"] .eyebrow { font-size: .85rem; font-weight: 800; }

/* ---------------- OCEAN: fluid, fresh, waves ---------------- */
[data-theme="ocean"] {
  --display: 'Outfit', var(--sans); --head: 'Outfit', var(--sans); --h1-weight: 600; --r-lg: 24px;
  --card-border: 1px solid rgb(11 106 150 / .14);
  --card-shadow: 0 12px 30px -20px rgb(11 106 150 / .5);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24'%3E%3Cpath d='M0 12 Q30 0 60 12 T120 12' fill='none' stroke='%230B6A96' stroke-opacity='.06' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 120px 24px;
}
[data-theme="ocean"] .card { background: linear-gradient(180deg, #FFFFFF, #F5FAFD); }
[data-theme="ocean"] .sky-hills { left: -10%; width: 120%; animation: wave 6s ease-in-out infinite alternate; }
[data-theme="ocean"] .sky-hills path:first-child { fill: rgb(255 255 255 / .35); }
[data-theme="ocean"] .sky-hills path:last-child { fill: rgb(241 248 252 / .8); }
[data-theme="ocean"] .sky::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(circle, rgb(255 255 255 / .7) 2px, transparent 3px), radial-gradient(circle, rgb(255 255 255 / .5) 1.5px, transparent 2.5px); background-size: 60px 90px, 40px 70px; background-position: 10px 0, 30px 20px; animation: bubbles 9s linear infinite; }

/* ---------------- LAVENDER: dreamy, soft-focus, gradient edges ---------------- */
[data-theme="lavender"] {
  --display: 'Playfair Display', Georgia, serif; --display-style: italic; --h1-weight: 600; --r-lg: 28px;
  --edge: linear-gradient(135deg, #CDB4FF, #F6D7EA 50%, #F6A8C8);
  --card-border: 1.5px solid transparent;
  --card-shadow: 0 14px 34px -22px rgb(109 63 224 / .45);
  --pattern: radial-gradient(circle at 15% 20%, rgb(205 180 255 / .35), transparent 22%), radial-gradient(circle at 80% 65%, rgb(246 168 200 / .3), transparent 24%), radial-gradient(circle at 45% 90%, rgb(205 180 255 / .22), transparent 20%);
}
[data-theme="lavender"] .card { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--edge) border-box; }
[data-theme="lavender"] .sky { border-radius: 32px; }
[data-theme="lavender"] .sky::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 20% 70%, rgb(255 255 255 / .55) 0 14px, transparent 15px), radial-gradient(circle at 60% 30%, rgb(255 255 255 / .4) 0 22px, transparent 23px), radial-gradient(circle at 85% 75%, rgb(255 255 255 / .35) 0 10px, transparent 11px); filter: blur(3px); animation: floaty 10s ease-in-out infinite alternate; }
[data-theme="lavender"] .chip input:checked + span { box-shadow: 0 8px 22px -8px var(--accent-2); }

/* ---------------- NORDIC: minimal, flat, precise ---------------- */
[data-theme="nordic"] {
  --display: 'Space Grotesk', var(--sans); --head: 'Space Grotesk', var(--sans); --h1-weight: 600;
  --r-lg: 10px; --pill: 10px; --btn-r: 8px; --chip-r: 8px; --label-track: .22em;
  --card-shadow: none; --lift-shadow: 0 10px 26px -18px rgb(23 33 43 / .35);
  --grad: linear-gradient(var(--accent), var(--accent));
}
[data-theme="nordic"] h1 { letter-spacing: -.04em; }
[data-theme="nordic"] .sky { border-radius: 12px; box-shadow: none; border: 1px solid var(--line); }
[data-theme="nordic"] .tabbar { border-radius: 14px; }
[data-theme="nordic"] .btn:not(.btn--ghost) { box-shadow: none; }
[data-theme="nordic"] body::after { opacity: 0; }
[data-theme="nordic"] .badge-ico { border-radius: 8px; }
[data-theme="nordic"] .grad-text { font-style: normal; }

/* ---------------- PAPER: editorial newspaper, ink on paper ---------------- */
[data-theme="paper"] {
  --display: 'Newsreader', Georgia, serif; --head: 'Newsreader', Georgia, serif; --h1-weight: 600;
  --r-lg: 4px; --pill: 6px; --btn-r: 4px; --chip-r: 4px; --label-track: .18em;
  --card-border: 1px solid #111111; --card-shadow: none; --lift-shadow: 4px 4px 0 #111111;
  --grad: linear-gradient(#111111, #111111);
}
[data-theme="paper"] body::after { opacity: 0; }
[data-theme="paper"] .sky { border-radius: 4px; border: 1px solid #111; box-shadow: none; }
[data-theme="paper"] .sky-sun { background: none; border: 2px solid #111; box-shadow: none; width: 70px; height: 70px; }
[data-theme="paper"] .sky-sun::after { display: none; }
[data-theme="paper"] .tabbar { border-radius: 6px; border: 1px solid #111; box-shadow: none; }
[data-theme="paper"] .btn:not(.btn--ghost) { box-shadow: none; }
[data-theme="paper"] .btn--ghost { border: 1px solid #111; }
[data-theme="paper"] .badge-ico { border-radius: 2px; background: none; border: 1px solid #111; color: #111; }
[data-theme="paper"] .badge-ico--grad { background: #111; color: #fff; }
[data-theme="paper"] .card-head { border-bottom: 1px solid #111; padding-bottom: .7rem; }
[data-theme="paper"] .grad-text { color: #111; -webkit-text-fill-color: #111; background: none; }
[data-theme="paper"] .brand > span:last-child { background: none; color: #111; -webkit-text-fill-color: #111; }
[data-theme="paper"] a.card:hover, [data-theme="paper"] .verse-card:hover, [data-theme="paper"] .post:hover { transform: none; }
[data-theme="paper"] .chip > span { border-color: #111; }
[data-theme="paper"] .verse--big.verse-card { border: 1px solid #111; background: var(--surface); }
[data-theme="paper"] .verse blockquote { font-style: italic; }

/* the cursor glow keeps gradient-edged cards intact (Rose Gold, Lavender) */
@media (hover: hover) and (pointer: fine) {
  [data-theme="rose"] .card:not(.verse--big):not(.sky):hover,
  [data-theme="lavender"] .card:not(.verse--big):not(.sky):hover {
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 7%, transparent), transparent 65%) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--edge) border-box;
  }
  [data-theme="paper"] .card:hover, [data-theme="nordic"] .card:hover { background-image: none; }
}

/* ---------------- each theme's own night sky ---------------- */
:root { --night-1: #0E0B24; --night-2: color-mix(in srgb, var(--sky-2) 32%, #1C1648); --night-3: color-mix(in srgb, var(--sky-3) 45%, #2A2058); }
[data-theme="lagos"]     { --night-1: #1B0A1F; --night-2: #5A1240; --night-3: #B8410F; }
[data-theme="harmattan"] { --night-1: #1E140C; --night-2: #4A2E1A; --night-3: #8C5A2E; }
[data-theme="rose"]      { --night-1: #1E0E14; --night-2: #4E2233; --night-3: #9A5560; }
[data-theme="sage"]      { --night-1: #0B1A13; --night-2: #1E3B2C; --night-3: #3F6F55; }
[data-theme="ocean"]     { --night-1: #04131F; --night-2: #0B3550; --night-3: #1F6FA8; }
[data-theme="lavender"]  { --night-1: #140E2A; --night-2: #3B2A6E; --night-3: #8A5CC2; }
[data-theme="nordic"]    { --night-1: #0E1620; --night-2: #23384A; --night-3: #4C6A80; }
[data-theme="paper"]     { --night-1: #111111; --night-2: #262626; --night-3: #474747; }
.sky--night { background: linear-gradient(165deg, var(--night-1) 0%, var(--night-2) 60%, var(--night-3) 100%); }
/* gradient-edged themes keep their edge at night too, with readable white text */
[data-theme="rose"] .sky--night, [data-theme="lavender"] .sky--night {
  background: linear-gradient(165deg, var(--night-1) 0%, var(--night-2) 60%, var(--night-3) 100%) padding-box, var(--edge) border-box;
}
[data-theme="paper"] .sky--night { border-color: #111; }
[data-theme="paper"] .sky--night .sky-sun { border-color: #F5F5F0; }
[data-theme="ocean"] .sky--night .sky-hills path:last-child, [data-theme="sage"] .sky--night .sky-hills path:last-child,
[data-theme="harmattan"] .sky--night .sky-hills path:last-child { fill: rgb(0 0 0 / .2); }
[data-theme="ocean"] .sky--night .sky-hills path:first-child, [data-theme="sage"] .sky--night .sky-hills path:first-child,
[data-theme="harmattan"] .sky--night .sky-hills path:first-child { fill: rgb(255 255 255 / .08); }

/* ---------------- small UX fixes ---------------- */
/* bigger tap targets on touch screens */
@media (pointer: coarse) {
  .verse-actions .icon-btn, .icon-btn--round { min-width: 44px; min-height: 44px; }
  .link-btn { padding: .35rem 0; }
}
/* update notice sits at the top on phones so it never covers the menu or messages */
@media (max-width: 1023px) {
  .update-bar { top: calc(12px + env(safe-area-inset-top)); bottom: auto; animation-name: updateDown; }
}
/* fewer moving stars on small screens */
@media (max-width: 600px) { .sky-stars i:nth-child(n + 16) { display: none; } }

/* ---------- ENCOURAGEMENT & LISTENING ---------- */
.encourage .card-head { margin-bottom: .55rem; }
.encourage .enc-next { margin-left: auto; }
.encourage .is-spinning .spin { transform-origin: 12px 12px; animation: spin .7s var(--ease); }
.encourage-text { font-family: var(--serif); font-size: var(--fs-md); line-height: 1.5; margin: 0; }
.play-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.play-btn .ico--play path { fill: currentColor; stroke-width: 1.2; }
.verse.is-playing { box-shadow: 0 0 0 2px var(--accent), var(--lift-shadow); }
.verse.is-playing .verse-cite::after {
  content: ''; width: 18px; height: 12px; margin-left: .4rem;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 3px 40% no-repeat,
              linear-gradient(var(--accent), var(--accent)) 7px 100% / 3px 90% no-repeat,
              linear-gradient(var(--accent), var(--accent)) 14px 100% / 3px 60% no-repeat;
  animation: eq .9s ease-in-out infinite alternate;
}
@keyframes eq { 0% { background-size: 3px 30%, 3px 90%, 3px 50%; } 50% { background-size: 3px 90%, 3px 40%, 3px 80%; } 100% { background-size: 3px 50%, 3px 70%, 3px 30%; } }

/* ---------- KEYFRAMES ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes stepIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.5) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes menuIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes threadIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes postIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sunRiseBig { from { transform: translateY(140px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes glow { 50% { box-shadow: 0 0 80px 30px color-mix(in srgb, var(--sun) 45%, transparent); } }
@keyframes drift { from { transform: translateX(-140px); } to { transform: translateX(calc(100vw + 40px)); } }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.3); } }
@keyframes sunRise { from { transform: translateY(6px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes sunBob { 50% { transform: translateY(-.6px); } }
@keyframes raysIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes raysPulse { 50% { opacity: .55; transform: scale(.92); } }
@keyframes draw { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes pageFlip { 40% { transform: scaleX(.75); } }
@keyframes bob { 40% { transform: translateY(-3px); } }
@keyframes wiggle { 25% { transform: rotate(-10deg) scale(1.1); } 60% { transform: rotate(8deg) scale(1.1); } }
@keyframes moodPop { 0% { transform: scale(.7) rotate(-10deg); } 60% { transform: scale(1.2) rotate(6deg); } 100% { transform: scale(1.12); } }
@keyframes pop { 50% { transform: scale(1.35); } }
@keyframes heartPop { 0% { transform: scale(1); } 30% { transform: scale(.7); } 60% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes ringBurst { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
@keyframes countBump { 50% { transform: translateY(-4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 25% { transform: scale(1.06, .95) rotate(-3deg); } 50% { transform: scale(.96, 1.06) rotate(2deg); } 75% { transform: scale(1.04, .97) rotate(-1deg); } }
@keyframes twinkleIco { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
@keyframes sway { 50% { transform: rotate(-8deg); } }
@keyframes windDrift { 50% { transform: translateX(2px); } }
@keyframes rain { to { stroke-dashoffset: -10; } }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 82% { transform: rotate(-12deg); } 89% { transform: rotate(8deg); } }
@keyframes breathe { 50% { opacity: .45; } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgb(30 158 98 / .6); } 100% { box-shadow: 0 0 0 8px rgb(30 158 98 / 0); } }
@keyframes reveal { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } to { opacity: 1; filter: none; transform: none; } }
@keyframes shimmer { from { background-position: 150% 0, 0 0; } to { background-position: -50% 0, 0 0; } }
@keyframes ringFill { from { stroke-dashoffset: 94.25; } }
@keyframes shoot { 0% { opacity: 0; translate: 0 0; } 1.5% { opacity: 1; } 7% { opacity: 0; translate: -240px 108px; } 100% { opacity: 0; translate: -240px 108px; } }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); filter: blur(4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px) scale(.995); } }
@keyframes dialogOut { to { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes vtInFwd { from { opacity: 0; transform: translateX(18px); } }
@keyframes vtInBack { from { opacity: 0; transform: translateX(-18px); } }
@keyframes haze { from { transform: translateX(-3%); opacity: .7; } to { transform: translateX(3%); opacity: 1; } }
@keyframes sheen { 0%, 100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }
@keyframes snow { from { background-position: 0 0, 15px 20px; } to { background-position: 20px 460px, 0 330px; } }
@keyframes aurora { from { transform: translate(-4%, 0) rotate(-2deg); } to { transform: translate(4%, 6%) rotate(3deg); } }
@keyframes tipIn { from { opacity: 0; transform: translate(-6px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
@keyframes updateIn { from { opacity: 0; transform: translate(-50%, 30px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes halo { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes wave { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
@keyframes bubbles { from { background-position: 10px 120px, 30px 140px; } to { background-position: 10px -60px, 30px -40px; } }
@keyframes floaty { from { transform: translate(-6px, 4px); } to { transform: translate(6px, -6px); } }
@keyframes updateDown { from { opacity: 0; transform: translate(-50%, -30px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .sky-clouds { display: none; }
}
