/* =========================================================
   Bible Study · styles.css
   Two primaries: Midnight Indigo (#14143A) and Iris (#6366F1)
   One accent: Radiant Gold (#F5B54A)
   Instrument Serif (display) + Plus Jakarta Sans (UI)

   1 tokens · 2 base · 3 shell · 4 components · 5 illustration
   6 welcome · 7 dashboard · 8 reading · 9 history · 10 reports
   11 admin · 12 dialogs · 13 feedback · 14 depth & motion · 15 responsive
   16 dark theme (prefers-color-scheme; swaps the semantic tokens)
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  --indigo-950: #0D0D29;
  --indigo-900: #14143A;
  --indigo-800: #1D1D4E;
  --indigo-700: #2A2A6B;
  --indigo-600: #3A3A86;

  --iris-700: #4338CA;
  --iris-600: #4F46E5;
  --iris-500: #6366F1;
  --iris-400: #818CF8;
  --iris-300: #A5B4FC;
  --iris-200: #C7D2FE;
  --iris-100: #E0E7FF;
  --iris-50:  #EEF0FF;

  --gold-700: #B86E0B;
  --gold-600: #E0961F;
  --gold-500: #F5B54A;
  --gold-300: #FFD58A;
  --gold-100: #FFF3DC;

  --bg: #F5F5FA;
  --surface: #FFFFFF;
  --ink: #121230;
  --ink-2: #4B4B6A;
  --ink-3: #666685;
  --line: rgba(18, 18, 48, .07);
  --line-2: rgba(18, 18, 48, .12);
  --danger: #E5484D;

  /* Semantic tokens: these are the ones the dark theme swaps */
  color-scheme: light;
  --surface-2: #F7F7FC;
  --raised: #FFFFFF;
  --field: #FFFFFF;
  --wash: rgba(18, 18, 48, .055);
  --wash-soft: rgba(18, 18, 48, .035);
  --shimmer: rgba(255, 255, 255, .7);
  --glass: rgba(245, 245, 250, .82);
  --scrim: rgba(13, 13, 41, .62);
  --text-accent: #4F46E5;
  --text-gold: #8A5206;
  --brand-em: #9A5A06;
  --danger-text: #B4232A;
  --danger-soft: #FDECEC;
  --focus: var(--iris-500);

  --shadow-xs: 0 1px 2px rgba(18, 18, 48, .05);
  --shadow-sm: 0 1px 2px rgba(18, 18, 48, .05), 0 8px 20px -10px rgba(18, 18, 48, .14);
  --shadow-md: 0 2px 4px rgba(18, 18, 48, .04), 0 16px 32px -14px rgba(18, 18, 48, .18);
  --shadow-lg: 0 4px 8px rgba(18, 18, 48, .05), 0 32px 64px -24px rgba(18, 18, 48, .32);
  --shadow-iris: 0 10px 24px -10px rgba(79, 70, 229, .65);
  --shadow-gold: 0 10px 26px -10px rgba(224, 150, 31, .7);

  --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-xl: 32px;

  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out-quart: cubic-bezier(.25, 1, .5, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;
  --dock-space: calc(104px + var(--safe-b));
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  font: 400 15px/1.55 var(--font-ui); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
::selection { background: var(--iris-200); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 2000; top: calc(10px + var(--safe-t)); left: calc(10px + env(safe-area-inset-left, 0px)); display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: var(--indigo-900); background: var(--gold-300); box-shadow: 0 0 0 3px var(--indigo-900), var(--shadow-lg); transform: translateY(-250%); transition: transform .2s var(--ease-out-quart); }
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 0; }
/* Focus rings turn gold on the night surfaces, where iris would disappear */
.hero, .verse, .tabbar, .reading, .welcome__scene, .summary, .admin__hero, .stat--iris, body[data-view="dashboard"] .topbar { --focus: var(--gold-300); }

.display { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 9vw, 46px); line-height: 1.05; letter-spacing: -.01em; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-accent); margin-bottom: 6px; }
.eyebrow--gold { color: var(--text-gold); }
.eyebrow--light { color: var(--gold-300); }

/* ---------- 3. SHELL ---------- */
.app { min-height: 100dvh; }
.main { outline: none; padding: 12px var(--gutter) var(--dock-space); max-width: 1200px; margin: 0 auto; }
body[data-view="welcome"] .main, body[data-view="read"] .main { padding: 0; max-width: none; }
body[data-view="dashboard"] .main { padding-top: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-t);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 var(--gutter); max-width: 1200px; margin: 0 auto; }
body[data-view="welcome"] .topbar, body[data-view="read"] .topbar { display: none; }
body[data-view="dashboard"] .topbar { background: var(--indigo-900); border-bottom-color: transparent; color: #fff; }
body[data-view="dashboard"] .topbar .icon-btn { color: rgba(255, 255, 255, .8); }
body[data-view="dashboard"] .topbar .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.brand__mark { width: 36px; height: 36px; border-radius: 12px; overflow: hidden; flex: none; background: radial-gradient(circle at 50% 30%, var(--indigo-700), var(--indigo-900)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), var(--shadow-xs); }
.brand__mark .mascot__svg { width: 100%; height: 100%; }
.brand__mark .mascot__figure { animation: none; }
.brand__name { font-family: var(--font-display); font-size: 23px; letter-spacing: -.01em; white-space: nowrap; }
.brand__name em { font-style: italic; color: var(--brand-em); }
body[data-view="dashboard"] .topbar .brand__name em { color: var(--gold-300); }
.topbar__back { margin-left: -8px; }
.topnav { display: none; }
.topbar__user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar__name { font-weight: 600; font-size: 14px; max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Floating dock */
.tabbar {
  position: fixed; z-index: 40; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  width: min(calc(100% - 28px), 420px); height: 66px; padding: 0 8px;
  display: flex; align-items: center; gap: 2px;
  background: rgba(20, 20, 58, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(20px); backdrop-filter: saturate(1.4) blur(20px);
  border-radius: 24px; box-shadow: 0 20px 40px -16px rgba(13, 13, 41, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .5s var(--ease), opacity .3s;
}
body[data-view="welcome"] .tabbar, body[data-view="read"] .tabbar { transform: translate(-50%, 150%); opacity: 0; pointer-events: none; }
.tabbar__glow { position: absolute; left: 0; top: 9px; height: 48px; width: var(--w, 60px); border-radius: 16px; background: rgba(129, 140, 248, .18); transform: translateX(var(--x, 0)); opacity: 0; transition: transform .45s var(--spring), width .35s var(--ease), opacity .3s; }
.tabbar__link { position: relative; flex: 1; min-width: 0; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .68); transition: color .25s; }
.tabbar__link .icon { width: 21px; height: 21px; transition: transform .35s var(--spring); }
.tabbar__link.is-active { color: #fff; }
.tabbar__link.is-active .icon { color: var(--iris-300); }
.tabbar__link:active .icon { transform: scale(.86); }
.tabbar__read { flex: none; width: 64px; display: grid; place-items: center; }
.tabbar__read-btn { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: var(--indigo-900); background: linear-gradient(160deg, var(--gold-300), var(--gold-500)); box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .3s var(--spring); }
.tabbar__read-btn .icon { width: 22px; height: 22px; margin-left: 2px; }
.tabbar__read:active .tabbar__read-btn { transform: scale(.9); }
body.is-reading .tabbar__read-btn { animation: goldPulse 2.4s ease-in-out infinite; }

.screen { animation: screenIn .5s var(--ease) both; }
.page { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.page--wide { max-width: none; }
.page__head { padding: 14px 2px 4px; }
.page__sub { color: var(--ink-2); margin-top: 8px; }

/* ---------- 4. COMPONENTS ---------- */
.card { position: relative; min-width: 0; background: var(--surface); border-radius: var(--r-lg); padding: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.card--flush { padding: 10px; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__title { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.card__meta { color: var(--ink-3); font-size: 13px; margin-top: 2px; }

/* Buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .25s var(--spring), box-shadow .25s var(--ease), background-color .2s, color .2s, opacity .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.97); transition: transform 120ms var(--ease-out-quart), box-shadow 120ms var(--ease-out-quart); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--primary { color: #fff; background: linear-gradient(180deg, var(--iris-500), var(--iris-600)); box-shadow: 0 3px 0 var(--iris-700), var(--shadow-iris), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn--primary:hover:not(:disabled) { background: linear-gradient(180deg, #7173F4, var(--iris-500)); }
.btn--primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--iris-700), 0 4px 10px -6px rgba(79, 70, 229, .6); }
.btn--gold { color: var(--indigo-900); background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); box-shadow: 0 3px 0 var(--gold-600), var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, .5); font-weight: 700; }
.btn--gold:active:not(:disabled) { box-shadow: 0 1px 0 var(--gold-600), 0 4px 10px -6px rgba(224, 150, 31, .6); }
.btn--glass { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--glass:hover { background: rgba(255, 255, 255, .16); }
.btn--soft { color: var(--text-accent); background: var(--iris-50); }
.btn--soft:hover { background: var(--iris-100); }
.btn--ghost { color: var(--ink-2); background: transparent; }
.btn--ghost:hover { background: var(--wash); }
.btn--danger { color: #fff; background: linear-gradient(180deg, #D5353B, #BE2A30); box-shadow: 0 3px 0 #96181E, 0 10px 22px -10px rgba(229, 72, 77, .6); }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 15.5px; border-radius: 16px; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn--sm .icon { width: 17px; height: 17px; }
.btn--block { width: 100%; }
.btn.is-copied { color: var(--indigo-900); background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); box-shadow: 0 3px 0 var(--gold-600); }
.ripple { position: absolute; z-index: -1; border-radius: 50%; background: currentColor; opacity: .16; transform: scale(0); animation: ripple .7s var(--ease) forwards; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; flex: none; color: var(--ink-2); transition: background-color .2s, color .2s, transform .25s var(--spring); }
.icon-btn:hover { background: var(--wash); color: var(--ink); }
.icon-btn:active { transform: scale(.9); }
.icon-btn--glass { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.icon-btn--glass:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.link-btn { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; color: var(--text-accent); min-height: 44px; padding: 6px 4px 6px 10px; border-radius: 10px; }
.link-btn .icon { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-btn:hover .icon { transform: translateX(2px); }

/* Pills, badges */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink-2); background: var(--wash); }
.pill--iris { color: var(--text-accent); background: var(--iris-50); }
.pill--glass { color: var(--gold-300); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-gold); background: var(--gold-100); vertical-align: 2px; }
.badge--off { color: var(--ink-3); background: var(--wash); }

/* Avatar: soft hue tile */
.avatar { --h: 240; width: 42px; height: 42px; flex: none; border-radius: 14px; display: inline-grid; place-items: center; font-weight: 700; font-size: 16px; color: hsl(var(--h) 45% 32%); background: linear-gradient(150deg, hsl(var(--h) 70% 95%), hsl(var(--h) 55% 86%)); box-shadow: inset 0 0 0 1px hsl(var(--h) 40% 80% / .5); }
.avatar--sm { width: 34px; height: 34px; font-size: 14px; border-radius: 11px; }
.avatar--lg { width: 72px; height: 72px; font-size: 30px; border-radius: 22px; font-family: var(--font-display); font-weight: 400; }

/* Stat cards */
.stat { --tint: var(--iris-50); --tone: var(--text-accent); position: relative; overflow: hidden; min-width: 0; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat__icon { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; color: var(--tone); background: var(--tint); margin-bottom: 10px; }
.stat__icon .icon { width: 17px; height: 17px; }
.stat__label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.stat__value { font-size: clamp(21px, 6vw, 25px); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.stat__sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat--gold, .stat--rose { --tint: var(--gold-100); --tone: var(--text-gold); }
.stat--iris { color: #fff; border-color: transparent; background: radial-gradient(120% 100% at 100% 0%, rgba(245, 181, 74, .35), transparent 50%), linear-gradient(150deg, var(--iris-500), var(--iris-700)); box-shadow: var(--shadow-iris); }
.stat--iris .stat__icon { color: var(--indigo-900); background: var(--gold-300); }
.stat--iris .stat__label, .stat--iris .stat__sub { color: rgba(255, 255, 255, .75); }
.stat--iris .stat__value { font-size: clamp(26px, 7.5vw, 30px); }

/* Chips & segmented */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chips--tight { margin-top: 10px; flex-wrap: wrap; overflow: visible; }
.chip { position: relative; flex: none; height: 40px; padding: 0 16px; border-radius: 12px; scroll-snap-align: start; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--spring); }
.chip::after { content: ""; position: absolute; inset: -2px 0; }
.chip:hover { border-color: var(--iris-300); }
.chip:active { transform: scale(.95); }
.chip.is-active { color: #fff; background: var(--indigo-900); border-color: var(--indigo-900); }
.chips--seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin: 0; border-radius: 16px; background: var(--wash); overflow: visible; }
.chips--seg .chip { height: 44px; border: 0; background: transparent; padding: 0 6px; }
.chips--seg .chip.is-active { color: var(--ink); background: var(--raised); box-shadow: var(--shadow-sm); }
.segmented { --n: 4; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 4px; border-radius: 16px; background: var(--wash); }
.segmented__btn { position: relative; z-index: 1; height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); transition: color .25s; min-width: 0; }
.segmented__btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segmented__btn .icon { width: 17px; height: 17px; }
.segmented__btn.is-active { color: var(--ink); }
.segmented__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 12px; background: var(--raised); box-shadow: var(--shadow-sm); transform: translateX(calc(var(--i) * 100%)); transition: transform .45s var(--spring); }
.segmented--many .segmented__btn .icon { display: none; }

/* Search & fields */
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 16px; background: var(--wash); color: var(--ink-3); border: 1px solid transparent; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.search:focus-within { background: var(--field); border-color: var(--iris-400); box-shadow: 0 0 0 5px rgba(99, 102, 241, .18); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.search--compact { height: 46px; margin-bottom: 10px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field > label, .pin-info__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select { width: 100%; min-width: 0; height: 50px; padding: 0 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--line-2); font-size: 16px; color: var(--ink); outline: 0; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.field input[type="date"] { min-height: 50px; line-height: 50px; }
.field select { padding-right: 40px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%238B8BA5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 20px; }
.field select:disabled { background-color: var(--wash-soft); color: var(--ink-3); }
.field input:focus, .field select:focus { border-color: var(--iris-400); box-shadow: 0 0 0 5px rgba(99, 102, 241, .18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.optional { font-weight: 500; color: var(--ink-3); }
.field__hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: var(--iris-50); padding: 12px; border-radius: 14px; }
.field__hint .icon { width: 17px; height: 17px; margin-top: 1px; color: var(--text-accent); }
.pin-info__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.form-error { color: var(--danger-text); font-size: 13.5px; font-weight: 600; line-height: 1.4; background: var(--danger-soft); padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; animation: shake .45s var(--ease); }
.sheet__body--center .form-error, #dlg-read .form-error { text-align: center; text-wrap: balance; }
.sheet__body--center .form-error { max-width: 320px; margin: -8px auto 16px; }
.duration { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duration__box { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 16px; border-radius: 16px; background: var(--field); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.duration__box:focus-within { border-color: var(--iris-400); box-shadow: 0 0 0 5px rgba(99, 102, 241, .18); }
.duration__box input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.duration__box input::-webkit-inner-spin-button, .duration__box input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.duration__box span { color: var(--ink-3); font-weight: 600; font-size: 14px; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; margin: 0 0 12px; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--line-2); transition: background-color .3s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .35s var(--spring); }
.switch input:checked + .switch__track { background: var(--iris-500); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.switch__label { font-weight: 600; font-size: 14.5px; }

.meter { margin-top: 16px; }
.meter__bar { height: 8px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.meter__fill { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--iris-400), var(--iris-600)); transition: width 1.1s var(--ease); }
.meter__fill.is-goal { background: linear-gradient(90deg, var(--gold-300), var(--gold-500)); }
.meter__text { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

.empty { text-align: center; padding: 28px 16px; }
.empty__art { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--text-accent); background: var(--iris-50); }
.empty__art--gold { color: var(--text-gold); background: var(--gold-100); }
.empty__art .icon { width: 26px; height: 26px; }
.empty__title { font-weight: 700; font-size: 16px; }
.empty__text { color: var(--ink-2); font-size: 14px; margin-top: 4px; max-width: 300px; margin-inline: auto; }
.empty .btn { margin-top: 14px; }
.skeleton { position: relative; overflow: hidden; background: var(--wash); border-radius: 10px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--shimmer), transparent); animation: shimmer 1.4s infinite; }

.medal { width: 64px; height: 64px; margin: 6px auto 14px; border-radius: 22px; display: grid; place-items: center; color: var(--danger); background: var(--danger-soft); }
.medal .icon { width: 28px; height: 28px; }
.medal--gold { color: var(--text-gold); background: var(--gold-100); }
.medal--iris { color: #fff; background: linear-gradient(150deg, var(--iris-500), var(--iris-700)); box-shadow: var(--shadow-iris); }

/* ---------- 5. ILLUSTRATION ---------- */
.mascot { display: block; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mascot__svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.mascot__figure { animation: breathe 6s ease-in-out infinite, poseIn .7s var(--ease) both; transform-box: fill-box; transform-origin: 50% 100%; }
.sc-sparkles path { animation: twinkle 2.4s ease-in-out infinite; }
.sc-sparkles path:nth-child(2n) { animation-delay: -1.2s; }
.mascot__booklight { animation: bookGlow 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.mascot__beam { animation: beam 4s ease-in-out infinite; }
.sc-rays { animation: raysTurn 120s linear infinite; transform-origin: 200px 150px; }
.sc-glow { animation: glowBreathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sc-stars circle { fill: #fff; animation: twinkle 4s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s); }
.sc-motes circle { fill: var(--gold-300); animation: moteUp 7s linear infinite; animation-delay: calc(var(--i) * -1s); }
.sc-hill--3 { transform: translateX(calc(var(--px, 0) * -6px)); transition: transform .6s var(--ease); }
.sc-hill--2 { transform: translateX(calc(var(--px, 0) * -11px)); transition: transform .6s var(--ease); }
.sc-hill--1 { transform: translateX(calc(var(--px, 0) * -18px)); transition: transform .6s var(--ease); }
.sc-figure { transform: translateX(calc(var(--px, 0) * 5px)); transition: transform .8s var(--ease); }
.mascot.is-excited .sc-glow { animation: glowBurst 1.6s var(--ease); }
.mascot.is-excited .mascot__figure { animation: lift 1.6s var(--ease); }
.mascot--sheet { width: 112px; height: 112px; margin: 0 auto; border-radius: 32px; overflow: hidden; background: radial-gradient(circle at 50% 30%, var(--indigo-700), var(--indigo-900)); box-shadow: var(--shadow-md); }

/* ---------- 6. WELCOME ---------- */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; background: var(--indigo-900); }
.welcome__scene { position: relative; height: min(64dvh, 600px); min-height: 420px; overflow: hidden; background: radial-gradient(120% 90% at 50% 10%, var(--indigo-700) 0%, var(--indigo-900) 55%, var(--indigo-950) 100%); }
#welcome-mascot { position: absolute; inset: 0; }
.welcome__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: calc(16px + var(--safe-t)) 20px 0; pointer-events: none; text-align: center; }
.welcome__title { margin-top: 18px; font-family: var(--font-display); font-weight: 400; font-size: clamp(46px, 14vw, 76px); line-height: .95; letter-spacing: -.025em; white-space: nowrap; color: #fff; text-shadow: 0 6px 40px rgba(13, 13, 41, .8); }
.welcome__title em { font-style: italic; color: var(--gold-300); }
.welcome__sub { color: rgba(255, 255, 255, .88); margin-top: 8px; font-size: 15px; text-shadow: 0 1px 14px rgba(13, 13, 41, .7); }
#welcome-mascot { top: 22%; }
.welcome__sheet { position: relative; z-index: 2; flex: 1; margin-top: -32px; padding: 12px var(--gutter) calc(28px + var(--safe-b)); border-radius: 32px 32px 0 0; background: var(--bg); box-shadow: 0 -20px 40px -20px rgba(13, 13, 41, .6); }
.welcome__handle { display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); margin: 0 auto 16px; }
.welcome__sheet-title { font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: -.01em; line-height: 1.05; }
.welcome__greeting { color: var(--ink-2); font-size: 14px; margin: 4px 0 14px; min-height: 22px; }
.welcome__greeting.is-swapping, .bubble.is-swapping { animation: bubbleSwap .45s var(--spring); }
.member-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.member-list li { animation: rise .5s var(--ease) both; animation-delay: calc(min(var(--i, 0), 16) * 30ms); }
.member {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left;
  min-height: 56px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-xs);
  transition: transform .3s var(--spring), box-shadow .3s var(--ease), border-color .2s;
}
.member:hover { border-color: var(--iris-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.member:active { transform: scale(.97); transition: transform 120ms var(--ease-out-quart); }
.member > span:nth-child(2) { display: grid; min-width: 0; width: 100%; }
.member__name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member__meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.member__meta .icon { width: 13px; height: 13px; color: var(--gold-600); }
.member__go { position: absolute; top: 14px; right: 12px; width: 18px; height: 18px; color: var(--ink-3); opacity: .6; transition: transform .25s var(--ease), color .2s, opacity .2s; }
.member:hover .member__go { transform: translateX(2px); color: var(--text-accent); opacity: 1; }
.member[aria-busy="true"] .member__go { animation: spin .9s linear infinite; opacity: 1; color: var(--text-accent); }
.member--skeleton { pointer-events: none; }
.member--skeleton .avatar { background: var(--wash); box-shadow: none; }
.member--skeleton .sk-1 { height: 14px; width: 70%; }
.member--skeleton .sk-2 { height: 11px; width: 45%; margin-top: 8px; }
.welcome__sheet > .empty { padding: 24px 12px 8px; }
.member-list > .empty { grid-column: 1 / -1; padding: 24px 12px 8px; }

/* ---------- 7. DASHBOARD ---------- */
.dash { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 calc(var(--gutter) * -1); padding: 18px 20px 26px;
  border-radius: 0 0 32px 32px; color: #fff;
  background: radial-gradient(120% 100% at 80% 0%, var(--indigo-700), var(--indigo-900) 60%, var(--indigo-950));
}
.hero__scene { position: absolute; z-index: -2; top: 0; bottom: 0; right: -34%; width: 96%; }
.hero__shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(20, 20, 58, .96) 0%, rgba(20, 20, 58, .75) 45%, rgba(20, 20, 58, 0) 78%), linear-gradient(0deg, rgba(13, 13, 41, .7), rgba(13, 13, 41, 0) 45%); pointer-events: none; }
.hero__content { position: relative; max-width: 560px; }
.hero__date { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); }
.hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 10.5vw, 52px); line-height: 1; letter-spacing: -.015em; margin-top: 10px; max-width: 14ch; }
.hero__sub { color: rgba(255, 255, 255, .88); margin-top: 10px; font-size: 14.5px; max-width: 34ch; text-shadow: 0 1px 12px rgba(13, 13, 41, .6); }
.hero__sub.is-swapping { animation: bubbleSwap .45s var(--spring); }
.today { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 14px; border-radius: 22px; max-width: 360px; background: rgba(13, 13, 41, .62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .today { background: rgba(13, 13, 41, .9); } }
.today__ring { position: relative; width: 92px; height: 92px; flex: none; }
.today__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.today__track { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 10; }
.today__progress { fill: none; stroke: url(#ll-ring); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: var(--off, 326.73); transition: stroke-dashoffset 1.4s var(--ease); filter: drop-shadow(0 0 8px rgba(245, 181, 74, .6)); }
.today__progress.is-empty { opacity: 0; }
.today__readout { position: absolute; inset: 0; padding: 0 13px; display: grid; place-content: center; text-align: center; }
.today__value { font-size: 20px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.today__of { font-size: 11px; color: rgba(255, 255, 255, .72); font-weight: 500; }
.today__body { min-width: 0; }
.today__kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.today__msg { font-size: 15.5px; font-weight: 600; line-height: 1.35; margin-top: 4px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero__actions .btn { flex: 1 1 auto; min-height: 52px; }
.hero__actions .btn--gold { box-shadow: 0 3px 0 var(--gold-600), var(--shadow-gold), 0 0 0 6px rgba(245, 181, 74, .12), inset 0 1px 0 rgba(255, 255, 255, .5); }
.today.is-reading, .hero.is-reading .today { box-shadow: inset 0 0 0 1px rgba(245, 181, 74, .45); animation: todayBreath 2.8s ease-in-out infinite; }
body.is-reading #btn-start-reading .icon { animation: pulse 1.6s ease-in-out infinite; }

.insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; }
.insights .stat__sub { white-space: normal; line-height: 1.35; }

/* Week: seven rings */
.week__strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wday { display: grid; justify-items: center; gap: 6px; }
.wday__ring { position: relative; width: 100%; max-width: 46px; aspect-ratio: 1; }
.wday__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wday__track { fill: none; stroke: var(--wash); stroke-width: 5; }
.wday__fill { fill: none; stroke: url(#ll-iris); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: var(--off, 113.1); transition: stroke-dashoffset 1.1s var(--ease); transition-delay: calc(var(--i) * 60ms); }
.wday.is-goal .wday__fill { stroke: url(#ll-ring); }
.wday__min { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wday.is-goal .wday__min { color: var(--text-gold); }
.wday__label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.wday.is-today .wday__label { color: #fff; background: var(--indigo-900); border-radius: 8px; padding: 1px 7px; }
.wday.is-today .wday__ring { border-radius: 50%; box-shadow: 0 0 0 2px var(--gold-500); }
.wday.is-future { opacity: .45; }

/* Month: area chart */
.month__chart { position: relative; height: 130px; margin: 4px 0 6px; }
.mchart { position: absolute; inset: 0 0 20px 0; width: 100%; height: calc(100% - 20px); overflow: visible; }
.mchart__area { fill: url(#ll-area); }
.mchart__line { fill: none; stroke: var(--iris-500); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s var(--ease) .2s forwards; }
.mchart__goal { stroke: var(--gold-500); stroke-width: 1.5; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.mchart__dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 4px rgba(245, 181, 74, .25); animation: pop .5s var(--spring) 1s both; }
.mchart__x { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.mchart__goal-label { position: absolute; right: 0; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-gold); transform: translateY(-120%); }

/* Verse */
.verse { position: relative; overflow: hidden; padding: 24px 22px; border-radius: var(--r-lg); color: #fff; background: radial-gradient(90% 80% at 100% 0%, rgba(245, 181, 74, .28), transparent 55%), linear-gradient(150deg, var(--iris-600), var(--indigo-800) 70%); box-shadow: var(--shadow-iris); display: flex; flex-direction: column; justify-content: center; }
.verse::after { content: "“"; position: absolute; right: 10px; bottom: -70px; font-family: var(--font-display); font-size: 260px; line-height: 1; color: rgba(255, 255, 255, .07); pointer-events: none; }
.verse__label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-300); }
.verse__label .icon { width: 15px; height: 15px; }
.verse__text { position: relative; font-family: var(--font-display); font-style: italic; font-size: clamp(24px, 6.6vw, 28px); line-height: 1.32; text-wrap: balance; margin-top: 12px; }
.verse__ref { position: relative; margin-top: 16px; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.verse__ref::before { content: ""; display: block; width: 28px; height: 2px; border-radius: 2px; background: var(--gold-500); margin-bottom: 10px; }

/* Trophy */
.trophy .card__head { align-items: center; margin-bottom: 12px; }
.trophy { background: linear-gradient(160deg, #FFFAEE, #FFF0D2); border-color: rgba(224, 150, 31, .3); }
.trophy__medal { width: 46px; height: 46px; flex: none; border-radius: 16px; display: grid; place-items: center; color: var(--indigo-900); background: linear-gradient(160deg, var(--gold-300), var(--gold-500)); box-shadow: var(--shadow-gold); }
.trophy__medal .icon { width: 24px; height: 24px; }
.trophy__headtext { flex: 1; min-width: 0; }
.trophy__count { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; font: 700 22px/1 var(--font-ui); font-variant-numeric: tabular-nums; color: #7A4505; background: var(--gold-100); box-shadow: inset 0 0 0 1.5px rgba(224, 150, 31, .45); animation: pop .6s var(--spring) both; }
.trophy__count::after { content: "won"; font-size: 11px; font-weight: 600; }
.trophy__line { font-weight: 600; font-size: 14.5px; }
.trophy__progress { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 14px; }

/* History rows */
.history { display: grid; }
.history__item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 10px 10px 11px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--gold-500); transition: background-color .16s var(--ease), transform .16s var(--ease); animation: rise .5s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 12) * 30ms); }
.history__item:last-child { margin-bottom: 0; }
.history__item.is-manual { box-shadow: inset 3px 0 0 var(--iris-400); }
@media (hover: hover) { .history__item:hover { background: var(--surface); transform: translateX(2px); } }
.history__date { width: 48px; height: 52px; border-radius: 15px; display: grid; place-content: center; text-align: center; line-height: 1.1; color: #fff; background: linear-gradient(150deg, var(--indigo-700), var(--indigo-900)); }
.history__date b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.history__date small { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; color: var(--gold-300); }
.history__item.is-manual .history__date { color: var(--text-accent); background: var(--iris-50); }
.history__item.is-manual .history__date small { color: var(--text-accent); }
.history__main { display: grid; min-width: 0; }
.history__note { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history__sub { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.history__sub .icon { width: 13px; height: 13px; }
.history__sub > .icon { flex: none; }
.history__dur { display: inline-flex; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history__dur:has(.icon-btn) { padding: 1px 1px 1px 12px; }
.history__dur .icon-btn { position: relative; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-3); }
.history__dur .icon-btn::after { content: ""; position: absolute; inset: -4px; }
.history__dur .icon-btn:hover { color: var(--danger); background: var(--danger-soft); }
.history__dur .icon-btn .icon { width: 18px; height: 18px; }
.history .empty { padding: 18px 8px; }
.recent .card__head { align-items: center; }
.tl-month { padding: 16px 6px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.tl-month:first-child { padding-top: 6px; }
.history__more { margin-top: 10px; }
.history > .history__more, li > .history__more { margin-top: 2px; }
.tl-month span:last-child { letter-spacing: 0; text-transform: none; font-weight: 700; color: var(--text-accent); font-size: 12.5px; }

/* ---------- 8. READING ---------- */
.screen--read { animation: fadeIn .5s var(--ease) both; }
.reading { position: relative; isolation: isolate; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: calc(12px + var(--safe-t)) var(--gutter) calc(20px + var(--safe-b)); color: #fff; background: radial-gradient(120% 70% at 50% 0%, var(--indigo-700) 0%, var(--indigo-900) 50%, var(--indigo-950) 100%); }
.reading__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
.reading__aura { position: absolute; left: 50%; top: 34%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 181, 74, .22), rgba(99, 102, 241, .14) 55%, transparent); animation: glowBreathe 7s ease-in-out infinite; }
.stars { position: absolute; inset: 0; background-image: radial-gradient(1.4px 1.4px at 12% 14%, #fff, transparent), radial-gradient(1px 1px at 28% 6%, #fff, transparent), radial-gradient(1.2px 1.2px at 46% 22%, #fff, transparent), radial-gradient(1px 1px at 63% 9%, #fff, transparent), radial-gradient(1.6px 1.6px at 84% 18%, #fff, transparent), radial-gradient(1px 1px at 92% 4%, #fff, transparent), radial-gradient(1px 1px at 7% 42%, #fff, transparent), radial-gradient(1.2px 1.2px at 90% 46%, #fff, transparent), radial-gradient(1px 1px at 18% 70%, #fff, transparent), radial-gradient(1.3px 1.3px at 80% 76%, #fff, transparent); animation: twinkle 5s ease-in-out infinite; }
.motes { position: absolute; inset: 0; }
.motes i { position: absolute; bottom: -10px; width: 5px; height: 5px; border-radius: 50%; background: radial-gradient(circle, #FFF1CC, rgba(245, 181, 74, .6) 45%, transparent 70%); animation: moteRise 11s linear infinite; }
.motes i:nth-child(1) { left: 8%; } .motes i:nth-child(2) { left: 20%; animation-delay: -2s; --sway: -24px; }
.motes i:nth-child(3) { left: 32%; animation-delay: -5s; } .motes i:nth-child(4) { left: 44%; animation-delay: -7s; --sway: 30px; }
.motes i:nth-child(5) { left: 56%; animation-delay: -3s; width: 7px; height: 7px; } .motes i:nth-child(6) { left: 66%; animation-delay: -6s; --sway: -18px; }
.motes i:nth-child(7) { left: 76%; animation-delay: -1s; } .motes i:nth-child(8) { left: 88%; animation-delay: -4.5s; }
.motes i:nth-child(9) { left: 14%; animation-delay: -8s; } .motes i:nth-child(10) { left: 50%; animation-delay: -9.5s; --sway: -30px; }
.reading__head { width: 100%; max-width: 560px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.reading__title { text-align: center; font-family: var(--font-display); font-weight: 400; font-size: 24px; }

.dial { position: relative; width: min(78vw, 320px, 42dvh); aspect-ratio: 1; margin: clamp(14px, 4dvh, 36px) 0 6px; flex: none; }
.dial__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.dial__ticks { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 3; stroke-dasharray: 1.2 10.74; }
.dial__track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 7; }
.dial__progress { fill: none; stroke: url(#ll-ring); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 678.58; stroke-dashoffset: var(--ring-offset, 678.58); transition: stroke-dashoffset .6s linear; filter: drop-shadow(0 0 8px rgba(245, 181, 74, .55)); }
.reading[data-state="idle"] .dial__progress { opacity: 0; }
.dial__orbit { position: absolute; inset: 0; transform: rotate(var(--deg, 0deg)); transition: transform .6s linear; pointer-events: none; opacity: 0; }
.dial__orbit i { position: absolute; left: 50%; top: 5%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #FFF6DD; animation: orbitGlow 2.4s ease-in-out infinite; }
.reading[data-state="running"] .dial__orbit, .reading[data-state="paused"] .dial__orbit { opacity: 1; }
.dial__portal { position: absolute; inset: 10%; border-radius: 50%; overflow: hidden; background: var(--indigo-900); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 -20px 40px rgba(0, 0, 0, .35), 0 30px 60px -20px rgba(0, 0, 0, .6); -webkit-mask-image: radial-gradient(circle, #000 99%, transparent 100%); mask-image: radial-gradient(circle, #000 99%, transparent 100%); }
#read-mascot { position: absolute; inset: -6% -6% 0; }
.readout { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 10px; }
.readout__time { font-size: clamp(46px, 13vw, 62px); font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.readout__hint { color: rgba(255, 255, 255, .55); font-size: 13px; margin-top: 4px; }
.reading[data-state="paused"] .readout__time { animation: pulse 2s ease-in-out infinite; }
.reading__goal { margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--gold-300); padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: clamp(14px, 3dvh, 28px); min-height: 80px; }
.ctl { width: 62px; height: 62px; border-radius: 22px; display: grid; place-items: center; flex: none; transition: transform .3s var(--spring), box-shadow .3s; }
.ctl:active { transform: translateY(3px) scale(.96); }
.ctl .icon { width: 26px; height: 26px; }
.ctl--main { width: 80px; height: 80px; border-radius: 28px; color: var(--indigo-900); background: linear-gradient(160deg, var(--gold-300), var(--gold-500)); box-shadow: 0 5px 0 var(--gold-600), 0 20px 40px -12px rgba(245, 181, 74, .6), inset 0 1px 0 rgba(255, 255, 255, .5); }
.ctl--main .icon { width: 30px; height: 30px; margin-left: 3px; }
.reading[data-state="paused"] .ctl--main { width: 62px; height: 62px; border-radius: 22px; }
.reading[data-state="paused"] .ctl--main .icon { width: 26px; height: 26px; }
.ctl--soft { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 0 rgba(0, 0, 0, .25); }
.ctl-save { min-height: 62px; border-radius: 22px; }
.controls__label { margin-top: 10px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .5); }
.reading__foot { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.reading .btn--ghost { color: rgba(255, 255, 255, .7); }
.reading .btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.reading.is-goal .readout__time { color: var(--gold-300); }

/* ---------- 9. HISTORY ---------- */
.summary { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px; border-radius: var(--r-lg); color: #fff; background: radial-gradient(90% 100% at 100% 0%, rgba(99, 102, 241, .55), transparent 60%), linear-gradient(150deg, var(--indigo-800), var(--indigo-950)); box-shadow: var(--shadow-md); }
.summary__label { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-300); }
.summary__value { white-space: nowrap; font-size: clamp(26px, 8vw, 34px); font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 4px; }
.summary__meta { font-size: 13px; color: rgba(255, 255, 255, .65); }

/* ---------- 10. REPORTS ---------- */
.filters__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.filters__row #report-member-field { grid-column: 1 / -1; }
.report.is-refreshing { animation: refresh .45s var(--ease); }
.report__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.report__title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.report__range { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; }
.report__icon { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(150deg, var(--iris-500), var(--iris-700)); box-shadow: var(--shadow-iris); }
.report__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.report__stats .stat { padding: 12px; border-radius: 16px; box-shadow: none; background: var(--iris-50); border-color: transparent; }
.report__stats .stat__value { font-size: clamp(16px, 4.4vw, 20px); }
.report__chart { height: 120px; display: flex; align-items: flex-end; gap: 3px; padding: 10px 2px 0; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rbar { flex: 1; min-width: 2px; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--iris-400), var(--iris-600)); transform-origin: bottom; animation: growUp .7s var(--ease) both; animation-delay: calc(min(var(--i), 40) * 12ms); }
.table-wrap { overflow-x: auto; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td:last-child, .table th:last-child { text-align: right; white-space: nowrap; }
.table--grid { font-size: 12px; }
.table--grid th, .table--grid td { text-align: center; padding: 8px 6px; border: 1px solid var(--line); }
.table--grid td:first-child, .table--grid th:first-child { text-align: left; white-space: nowrap; font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.table--grid td div { white-space: nowrap; }
.table--grid td:last-child, .table--grid th:last-child { text-align: center; }
.table .is-red { color: #C0362C; font-weight: 700; }
.table .is-x { color: var(--ink-3); }
.table .arr { color: var(--ink-3); }
.report__note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.report__note .icon { width: 16px; height: 16px; margin-top: 1px; color: var(--iris-500); }
.report__actions { display: flex; justify-content: center; }
.report__actions .btn { width: 100%; max-width: 420px; }

/* ---------- 11. ADMIN ---------- */
.admin { gap: 16px; }
.admin__hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 22px; border-radius: var(--r-xl); color: #fff; background: radial-gradient(70% 120% at 100% 0%, rgba(99, 102, 241, .6), transparent 60%), radial-gradient(50% 80% at 0% 100%, rgba(245, 181, 74, .2), transparent 60%), linear-gradient(150deg, var(--indigo-800), var(--indigo-950)); box-shadow: var(--shadow-md); }
.admin__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 9vw, 44px); line-height: 1.05; }
.admin__sub { color: rgba(255, 255, 255, .7); margin-top: 6px; font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpis .stat__value { font-size: clamp(21px, 6vw, 26px); }
.admin__grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.admin__main, .admin__side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.group-ring { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--iris-50); stroke-width: 11; }
.ring__fill { fill: none; stroke: url(#ll-iris); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: var(--off, 326.73); transition: stroke-dashoffset 1.4s var(--ease); }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__label b { font-size: 26px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.ring__label small { font-size: 11px; color: var(--ink-3); font-weight: 600; margin-top: 4px; }
.group-ring__text b { display: block; font-size: 16px; }
.group-ring__text p { color: var(--ink-3); font-size: 13px; }
.group-ring__legend { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.group-ring__legend span { display: flex; align-items: center; gap: 8px; }
.group-ring__legend i { width: 10px; height: 10px; border-radius: 4px; background: var(--iris-500); }
.group-ring__legend i.is-soft { background: var(--iris-200); }
.activity { height: 170px; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; align-items: end; }
.act { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; text-align: center; }
.act__col { position: relative; display: flex; align-items: flex-end; border-radius: 8px; background: var(--wash-soft); }
.act__fill { width: 100%; height: var(--h); border-radius: 8px; background: linear-gradient(180deg, var(--iris-400), var(--iris-600)); transform-origin: bottom; animation: growUp .8s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.act.is-today .act__fill { background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); }
.act__label { font-size: 10.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.activity__foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.activity__foot b { color: var(--ink); }
.board { display: grid; gap: 2px; }
.pg { display: grid; grid-template-columns: 24px auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 0; }
.pg__rank { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--wash-soft); font-variant-numeric: tabular-nums; }
.pg__rank.is-top { color: var(--indigo-900); background: linear-gradient(160deg, var(--gold-300), var(--gold-500)); }
.pg .avatar { width: 36px; height: 36px; font-size: 14px; border-radius: 12px; }
.pg__body { min-width: 0; }
.pg__top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.pg__top span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg__top span:last-child { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.5px; }
.pg__bar { height: 8px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.pg__fill { height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--iris-400), var(--iris-600)); transform-origin: left; animation: growRight 1s var(--ease) both; animation-delay: calc(min(var(--i), 20) * 40ms); }
.pg__fill.is-goal { background: linear-gradient(90deg, var(--gold-300), var(--gold-500)); }
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.stepper__btn { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; color: var(--text-accent); background: var(--iris-50); transition: transform .25s var(--spring), background-color .2s; }
.stepper__btn:hover { background: var(--iris-100); }
.stepper__btn:active { transform: scale(.9); }
.stepper__value { flex: 1; min-width: 0; height: 52px; display: flex; align-items: baseline; justify-content: center; gap: 6px; padding-top: 8px; border-radius: 16px; background: var(--field); border: 1px solid var(--line-2); cursor: text; }
.stepper__value:focus-within { border-color: var(--iris-400); box-shadow: 0 0 0 5px rgba(99, 102, 241, .18); }
.stepper__value input { width: 3ch; min-width: 0; border: 0; outline: 0; background: none; text-align: right; font-size: 24px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper__value input::-webkit-inner-spin-button, .stepper__value input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__value span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.goal__note { margin-top: 10px; }
.shortcuts { display: grid; gap: 4px; }
.shortcuts .card__title { margin-bottom: 8px; }
.shortcut { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 16px; text-align: left; transition: background-color .2s; }
.shortcut:hover { background: var(--wash-soft); }
.shortcut > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.shortcut b { font-size: 14.5px; font-weight: 600; }
.shortcut small { font-size: 12.5px; color: var(--ink-3); }
.shortcut > .icon { color: var(--ink-3); width: 18px; height: 18px; }
.shortcut__icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--text-accent); background: var(--iris-50); flex: none; }
.shortcut__icon--gold { color: var(--text-gold); background: var(--gold-100); }
.admin-members { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.am { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 18px; transition: background-color .2s, opacity .45s, transform .45s var(--ease); animation: rise .45s var(--ease) both; animation-delay: calc(min(var(--i), 20) * 25ms); }
.am:hover { background: var(--wash-soft); }
.am.is-removing { opacity: 0; transform: translateX(-24px) scale(.97); }
.am__open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px; text-align: left; border-radius: 14px; }
.am__open > span:last-child { min-width: 0; display: grid; }
.am__name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am__meta { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am__actions { display: flex; flex: none; }
.am__actions .icon-btn { position: relative; width: 40px; height: 40px; color: var(--ink-3); }
.am__actions .icon-btn::after { content: ""; position: absolute; inset: -2px; }
.am__actions .icon-btn .icon { width: 18px; height: 18px; }
.am__actions [data-act="remove"]:hover { color: var(--danger); background: var(--danger-soft); }

/* Profile sheet */
.profile__top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile__name { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.05; }
.profile__meta { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; }
.profile__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.mini { padding: 12px; border-radius: 16px; background: var(--wash-soft); min-width: 0; }
.mini--lav { background: var(--iris-50); }
.mini--rose, .mini--gold { background: var(--gold-100); }
.mini p { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.mini b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile h3 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 4px 0 10px; }
.profile .week__strip { margin-bottom: 18px; }

/* Trophy shelf */
.shelf { display: grid; gap: 6px; margin-top: 14px; max-height: 60vh; overflow: auto; }
.shelf__row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--wash-soft); animation: rise .45s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.shelf__row.is-me { background: var(--iris-50); }
.shelf__rank { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13.5px; background: var(--raised); color: var(--ink-2); box-shadow: var(--shadow-xs); }
.shelf__row.is-1 .shelf__rank { color: var(--indigo-900); background: linear-gradient(160deg, var(--gold-300), var(--gold-500)); }
.shelf__row.is-2 .shelf__rank { color: #fff; background: linear-gradient(160deg, var(--iris-400), var(--iris-600)); }
.shelf__row.is-3 .shelf__rank { color: #fff; background: linear-gradient(160deg, var(--indigo-600), var(--indigo-800)); }
.shelf__who { flex: 1; min-width: 0; display: grid; }
.shelf__who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf__who small { color: var(--ink-3); font-size: 12.5px; }
.shelf__n { display: flex; align-items: center; gap: 5px; font-weight: 700; color: var(--text-gold); }
.shelf__n .icon { width: 18px; height: 18px; }

/* ---------- 12. DIALOGS ---------- */
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 92dvh; padding: 0; border: 0; color: var(--ink); border-radius: 30px 30px 0 0; background: var(--surface); box-shadow: 0 -20px 60px -20px rgba(13, 13, 41, .45); overflow: hidden; display: none; }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheetUp .5s var(--ease); }
dialog.sheet::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn .3s ease; }
.sheet__body { overflow-y: auto; padding: 10px 20px calc(20px + var(--safe-b)); overscroll-behavior: contain; }
.sheet__body::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); margin: 0 auto 10px; }
.sheet__body--center { text-align: center; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet__head h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.sheet__head .icon-btn { margin-right: -8px; }
.sheet__head--center { justify-content: center; position: relative; }
.sheet__head--center .icon-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.sheet__head--float { position: absolute; top: 18px; left: 20px; right: 20px; margin: 0; }
.sheet__hero { display: grid; justify-items: center; margin: 4px 0 12px; }
.sheet__foot { display: flex; gap: 10px; margin-top: 20px; }
.sheet__foot .btn { flex: 1; }
.sheet__foot--stack { flex-direction: column-reverse; }
.confirm__title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.confirm__text { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; }
.issued__digits { display: flex; justify-content: center; gap: 8px; margin: 22px 0 14px; }
.issued__digit { width: 44px; height: 58px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; background: linear-gradient(160deg, var(--indigo-700), var(--indigo-900)); box-shadow: var(--shadow-sm); animation: pop .5s var(--spring) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.issued__note { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 13px; color: var(--ink-2); background: var(--gold-100); padding: 12px; border-radius: 14px; }
.issued__note .icon { width: 17px; height: 17px; color: var(--text-gold); margin-top: 1px; }
.pin__who { font-weight: 600; color: var(--text-accent); margin-top: 4px; }
.pin__dots { display: flex; justify-content: center; gap: 14px; margin: 22px 0 24px; }
.pin__dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--line-2); transition: background-color .2s, transform .3s var(--spring); }
.pin__dots span.is-filled { background: var(--iris-500); transform: scale(1.15); }
.pin__dots.is-error { animation: shake .45s var(--ease); }
.pin__dots.is-error span { background: var(--danger); }
.pin__pad { display: grid; grid-template-columns: repeat(3, 72px); justify-content: center; gap: 12px 22px; }
.pin__key { width: 72px; height: 72px; border-radius: 24px; font-size: 26px; font-weight: 600; background: var(--wash-soft); transition: transform .2s var(--spring), background-color .15s; font-variant-numeric: tabular-nums; }
.pin__key:active { transform: scale(.9); background: var(--iris-100); }
.pin__key[data-key="⌫"] { background: none; font-size: 22px; color: var(--ink-3); }

/* ---------- 13. FEEDBACK ---------- */
.toasts { position: fixed; z-index: 1000; top: auto; bottom: calc(var(--dock-space) + 8px); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 440px); display: grid; gap: 8px; pointer-events: none; }
body[data-view="welcome"] .toasts, body[data-view="read"] .toasts { bottom: calc(24px + var(--safe-b)); }
/* A bottom sheet would cover a bottom toast, so toasts go back to the top while a dialog is open */
body:has(dialog[open]) .toasts { top: calc(12px + var(--safe-t)); bottom: auto; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 18px; background: rgba(20, 20, 58, .96); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastInUp .45s var(--spring) both; }
.toast:nth-last-child(n+3) { display: none; }
.toast .icon { width: 30px; height: 30px; padding: 6px; border-radius: 10px; color: var(--indigo-900); background: var(--gold-300); flex: none; }
.toast--info .icon { color: #fff; background: var(--iris-500); }
.toast.is-leaving { animation: toastOutDown .3s var(--ease) forwards; }
.confetti { position: fixed; inset: 0; z-index: 999; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 13px; border-radius: 3px; background: var(--c); animation: fall var(--t) var(--d) cubic-bezier(.25, .6, .45, 1) forwards; }
.confetti i:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }
.confetti i:nth-child(4n) { width: 10px; height: 10px; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); border-radius: 0; }

/* ---------- 14. DEPTH & MOTION ---------- */
[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
[data-tilt].is-tilting { transition: transform .08s linear, box-shadow .3s; box-shadow: var(--shadow-lg); }
.tilt-glare { position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 45%); mix-blend-mode: soft-light; }
[data-tilt].is-tilting .tilt-glare { opacity: 1; }

/* The dashboard is deliberately absent here: its hero and stat tiles are animated by GSAP in app.js, and the cards below do not animate in. */
.screen:not([hidden]) .page > *, .screen:not([hidden]) .admin__grid > *, .screen:not([hidden]) .kpis > * { animation: rise3d .75s var(--ease) backwards; transform-origin: 50% 100%; }
.page > :nth-child(2), .admin__grid > :nth-child(2), .kpis > :nth-child(2) { animation-delay: .07s !important; }
.page > :nth-child(3), .admin__grid > :nth-child(3), .kpis > :nth-child(3) { animation-delay: .14s !important; }
.page > :nth-child(4), .kpis > :nth-child(4) { animation-delay: .21s !important; }
.page > :nth-child(5) { animation-delay: .28s !important; }
.page > :nth-child(n+6) { animation-delay: .35s !important; }

/* Real 3D night scenes (scene3d.js). The SVG stays until the 3D scene is ready, then steps aside. */
.stage3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; animation: fadeIn .8s var(--ease) both; }
[data-stage3d]:not(.is-3d) > .stage3d { opacity: 0; }
#welcome-mascot > .stage3d { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%); mask-image: linear-gradient(to bottom, transparent 0, #000 24%); }
[data-stage3d].is-3d > .mascot__svg { display: none; }
/* The title now lives inside the 3D scene, behind the figure; the heading stays in the page for screen readers */
.welcome__scene.has-3d-title .welcome__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.welcome__scene.has-3d-title .welcome__sub { margin-top: 14px; animation: fadeIn 1s var(--ease) .9s both; }

/* Verse of the day: each word lights up in turn as the card scrolls into view (app.js sets --lit from 0 to 1) */
.verse__text .vw { display: inline-block; opacity: calc(.16 + .84 * var(--lit, 1)); transform: translateY(calc((1 - var(--lit, 1)) * 10px)); filter: blur(calc((1 - var(--lit, 1)) * 5px)); text-shadow: 0 0 calc(var(--glow, 0) * 22px) rgba(255, 213, 138, calc(var(--glow, 0) * .9)); will-change: opacity, transform; }

/* Deeper tilt: the card's contents float above its surface, so it reads as a real object */
[data-tilt] { transform-style: preserve-3d; }
[data-tilt].is-tilting > :not(.tilt-glare, .btn, a, button) { transform: translate3d(calc(var(--lx, 0) * 7px), calc(var(--ly, 0) * 7px), 26px); transition: transform .3s var(--ease); }
[data-tilt]:not(.is-tilting) > :not(.tilt-glare, .btn, a, button) { transition: transform .6s var(--ease); }

/* Screen changes: the old screen sinks back into the dark, the new one swings forward into place */
::view-transition-group(root) { animation-duration: .6s; }
::view-transition-image-pair(root) { perspective: 1400px; }
::view-transition-old(root) { animation: vtOut .4s cubic-bezier(.5, 0, .75, 0) both; }
::view-transition-new(root) { animation: vtIn .7s cubic-bezier(.16, 1, .3, 1) .1s both; }

/* Phones: cards rise gently out of the depth as you scroll to them */
@supports (animation-timeline: view()) {
  @media (hover: none) and (prefers-reduced-motion: no-preference) {
    .dash > .card, .dash > .verse { animation: scroll3d linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; transform-origin: 50% 100%; }
    .page > .card { animation: scroll3d linear both !important; animation-timeline: view(); animation-range: entry 0% cover 28%; transform-origin: 50% 100%; }
  }
}

@keyframes scroll3d {
  from { opacity: 0; transform: perspective(1000px) translateY(36px) translateZ(-50px) rotateX(10deg); }
  to { opacity: 1; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
}

@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise3d { from { opacity: 0; transform: perspective(900px) translateY(30px) rotateX(12deg) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes growUp { from { transform: scaleY(0); } to { transform: none; } }
@keyframes growRight { from { transform: scaleX(0); } to { transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes refresh { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes bubbleSwap { 0% { transform: translateY(4px); opacity: .3; } 100% { transform: none; opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012, 1.006); } }
@keyframes poseIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bookGlow { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes beam { 0%, 100% { opacity: .5; } 50% { opacity: .9; } }
@keyframes raysTurn { to { transform: rotate(360deg); } }
@keyframes glowBreathe { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes glowBurst { 0% { transform: scale(1); } 35% { transform: scale(1.35); opacity: 1; } 100% { transform: scale(1); } }
@keyframes lift { 0%, 100% { transform: none; } 40% { transform: translateY(-6px); } }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes moteUp { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-220px); opacity: 0; } }
@keyframes moteRise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-60vh) translateX(var(--sway, 20px)) scale(1); opacity: 0; } }
@keyframes orbitGlow { 0%, 100% { box-shadow: 0 0 10px 3px rgba(245, 181, 74, .8), 0 0 24px 8px rgba(245, 181, 74, .35); } 50% { box-shadow: 0 0 14px 5px rgba(245, 181, 74, .95), 0 0 36px 12px rgba(245, 181, 74, .45); } }
@keyframes goldPulse { 0%, 100% { box-shadow: var(--shadow-gold), 0 0 0 0 rgba(245, 181, 74, .5); } 50% { box-shadow: var(--shadow-gold), 0 0 0 10px rgba(245, 181, 74, 0); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastInUp { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOutDown { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes todayBreath { 50% { box-shadow: inset 0 0 0 1px rgba(245, 181, 74, .7), 0 0 28px -4px rgba(245, 181, 74, .35); } }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: 0; } }
@keyframes vtOut { to { opacity: 0; transform: translateZ(-120px); filter: brightness(.6); } }
@keyframes vtIn { from { opacity: 0; transform: translateZ(60px) translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motes, .sc-motes { display: none; }
  /* Infinite loops are switched off outright rather than left to the shortened duration above */
  .today.is-reading, .hero.is-reading .today, body.is-reading .tabbar__read-btn, body.is-reading #btn-start-reading .icon, .mascot__figure, .sc-sparkles path, .mascot__booklight, .mascot__beam, .sc-rays, .sc-glow, .sc-stars circle, .reading__aura, .stars, .dial__orbit i, .reading[data-state="paused"] .readout__time, .skeleton::after, .member[aria-busy="true"] .member__go { animation: none !important; }
  .history__item:hover, .member:hover, .btn:active:not(:disabled), .member:active { transform: none; }
  [data-tilt] { transform: none !important; }
  [data-tilt] > * { transform: none !important; }
  .stage3d { display: none; }
}

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .member-list { grid-template-columns: 1fr; }
  .pin__pad { grid-template-columns: repeat(3, 64px); gap: 10px 18px; }
  .pin__key { width: 64px; height: 64px; }
  .issued__digit { width: 38px; height: 52px; font-size: 22px; }
  .card { padding: 16px; }
  .card--flush { padding: 8px; }
  .history__item { gap: 10px; padding-right: 8px; }
  .history__date { width: 42px; height: 48px; }
  .history__dur { font-size: 13px; }
  .today { gap: 12px; }
  .today__ring { width: 84px; height: 84px; }
  .today__value { font-size: 17px; }
}
@media (max-width: 380px) {
  .hero__actions .btn { flex: 1 1 100%; }
}
@media (max-width: 767px) {
  /* Phones: the figure gets its own band above the greeting, so no text ever sits on the bright robe.
     The scene is a square (the whole 400x400 drawing shows), pulled up so the head, open arms and book fill the top ~125px. */
  .hero__scene { --scene: min(96vw, 372px); top: calc(12px - var(--scene) * .245); bottom: auto; left: 50%; right: auto; width: var(--scene); height: var(--scene); margin-left: calc(var(--scene) / -2); -webkit-mask-image: radial-gradient(50% 56% at 50% 38%, #000 46%, transparent 100%); mask-image: radial-gradient(50% 56% at 50% 38%, #000 46%, transparent 100%); }
  .hero__content { padding-top: 118px; }
  .hero__shade { background: linear-gradient(180deg, rgba(20, 20, 58, 0) 0, rgba(20, 20, 58, 0) 96px, rgba(20, 20, 58, .84) 142px, rgba(13, 13, 41, .96) 200px, rgba(13, 13, 41, .98) 100%); }
}
@media (min-width: 560px) {
  :root { --gutter: 24px; }
  .member-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters__row { grid-template-columns: 1.3fr 1fr 1fr; }
  .filters__row #report-member-field { grid-column: auto; }
  .hero { padding: 24px 28px 30px; }
  .today__ring { width: 104px; height: 104px; }
  .hero__actions .btn { flex: 0 0 auto; }
}
@media (min-width: 640px) {
  dialog.sheet { inset: 0; margin: auto; width: calc(100% - 48px); max-width: 480px; max-height: 86dvh; border-radius: 28px; height: fit-content; box-shadow: var(--shadow-lg); }
  dialog.sheet[open] { animation: modalIn .45s var(--ease); }
  dialog.sheet--small { max-width: 420px; }
  dialog.sheet--wide { max-width: 560px; }
  .sheet__body { padding: 24px 28px 28px; }
  .sheet__body::before { display: none; }
  .sheet__foot { justify-content: flex-end; }
  .sheet__foot .btn { flex: none; }
  .sheet__foot--stack .btn { flex: 1; }
  .sheet__head--float { left: 28px; right: 28px; }
}
@media (min-width: 768px) {
  .insights { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .dash { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 18px; }
  .dash > * { grid-column: 1 / -1; }
  .dash > .hero { margin: 16px 0 0; border-radius: var(--r-xl); padding: 34px 36px 36px; min-height: 380px; }
  .dash > .week { grid-column: span 7; }
  .dash > .month { grid-column: span 5; }
  .dash > .verse { grid-column: span 5; }
  .dash > .recent { grid-column: span 7; }
  .dash > .trophy { grid-column: span 5; }
  .hero__scene { right: 3%; width: auto; aspect-ratio: 1 / 1; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 88%, transparent 100%); }
  .hero__shade { background: linear-gradient(90deg, rgba(20, 20, 58, .92) 0%, rgba(20, 20, 58, .5) 40%, rgba(20, 20, 58, 0) 62%), linear-gradient(0deg, rgba(13, 13, 41, .5), rgba(13, 13, 41, 0) 40%); }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-members { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
  .card { padding: 24px; }
  .card--flush { padding: 14px; }
  .page { gap: 18px; }
  .welcome__sheet { padding-left: 32px; padding-right: 32px; }
  .welcome__sheet > * { max-width: 640px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  /* With the trophy card showing, pair it with the verse so the recent list is not left beside a gap */
  .dash:has(> .trophy:not([hidden])) > .verse { grid-column: span 7; }
  .dash:has(> .trophy:not([hidden])) > .recent { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; --dock-space: 56px; }
  .tabbar { display: none; }
  body[data-view="dashboard"] .topbar { background: var(--glass); color: var(--ink); border-bottom-color: var(--line); }
  body[data-view="dashboard"] .topbar .icon-btn { color: var(--ink-2); }
  body[data-view="dashboard"] .topbar .icon-btn:hover { background: var(--wash); color: var(--ink); }
  body[data-view="dashboard"] .topbar { --focus: inherit; }
  body[data-view="dashboard"] .topbar .brand__name em { color: var(--brand-em); }
  .main, .topbar__inner { max-width: 1240px; }
  .toasts, body[data-view="welcome"] .toasts, body[data-view="read"] .toasts { bottom: 24px; }
  .topbar__back { display: none !important; }
  .topnav { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 16px; background: var(--wash); }
  .brand { margin-right: 0; flex: 1; }
  .topbar__user { flex: 1; justify-content: flex-end; }
  .topnav__link { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: background-color .2s, color .2s; }
  .topnav__link .icon { width: 18px; height: 18px; }
  .topnav__link:hover { color: var(--ink); }
  .topnav__link.is-active { color: #fff; background: var(--indigo-900); box-shadow: var(--shadow-sm); }
  .topnav__link.is-active .icon { color: var(--gold-300); }
  .main { padding-top: 24px; }
  body[data-view="dashboard"] .main { padding-top: 0; }

  .welcome { flex-direction: row; min-height: 100vh; }
  .welcome__scene { flex: 1.1; height: auto; min-height: 100vh; }
  .welcome__sheet { flex: 1; margin: 0; border-radius: 0; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; box-shadow: none; overflow-y: auto; max-height: 100vh; }
  .welcome__handle { display: none; }
  .welcome__sub { margin-bottom: 72px; }
  .welcome__sheet-title { font-size: 44px; }
  /* Centre the sign-in column when it fits, but let a long member list scroll from the top instead of being cut off */
  .welcome__sheet { justify-content: flex-start; }
  .welcome__sheet::before, .welcome__sheet::after { content: ""; flex: 1 0 0px; }
  .welcome__sheet > * { width: 100%; flex: none; }

  /* Dashboard: main column (8) + right rail (4). Rows: 1 hero, 2 stats, 3 week, 4 month, 5 recent. */
  .dash { gap: 20px; }
  .dash > .hero { min-height: 420px; }
  .today { max-width: 400px; }
  .hero__title { font-size: 64px; }
  .insights { gap: 16px; }
  .insights .stat { padding: 20px; }
  .insights .stat__value { font-size: 28px; }
  .dash > .week { grid-column: 1 / 9; grid-row: 3; }
  .dash > .month { grid-column: 1 / 9; grid-row: 4; }
  .dash > .recent { grid-column: 1 / 9; grid-row: 5; }
  .dash > .verse { grid-column: 9 / 13; grid-row: 3 / span 2; position: sticky; top: 88px; align-self: start; min-height: 320px; }
  .dash > .trophy { grid-column: 9 / 13; grid-row: 5; align-self: start; }
  .verse__text { font-size: 28px; }

  /* Admin: main column + 360px rail, members full width underneath */
  .admin__hero { padding: 32px 36px; min-height: 160px; }
  .kpis .stat { padding: 20px; }
  .kpis .stat__value { font-size: 28px; }
  .admin__grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .admin__members { grid-column: 1 / -1; }
  .board { max-height: 520px; overflow-y: auto; }
  .dial { width: min(360px, 44dvh); }
}
@media (min-width: 1024px) and (min-height: 900px) {
  /* Only pin the rail when it fits the window; a pinned rail taller than the screen would hide its own last card */
  .admin__side { position: sticky; top: 88px; }
}
@media (min-width: 1280px) {
  .admin-members { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 16. DARK THEME (follows the device setting; there is no toggle) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0B0B24; --surface: #16163A; --surface-2: #1D1D4A; --raised: #2D2D6E; --field: #0F0F2E;
    --ink: #F1F1FA; --ink-2: #BDBDD6; --ink-3: #9A9AB8;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
    --wash: rgba(255, 255, 255, .08); --wash-soft: rgba(255, 255, 255, .05); --shimmer: rgba(255, 255, 255, .08);
    --glass: rgba(11, 11, 36, .82); --scrim: rgba(4, 4, 18, .72);
    --danger: #FF7A7F; --danger-text: #FF9CA0; --danger-soft: rgba(255, 122, 127, .14);
    --iris-50: #23235A; --iris-100: #2D2D6E; --iris-200: #3A3A86;
    --gold-100: #3A2D12;
    --text-accent: #A5B4FC; --text-gold: #FFD58A; --brand-em: #FFD58A;
    --focus: var(--iris-300);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 20px -10px rgba(0, 0, 0, .5);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 32px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .45), 0 32px 64px -24px rgba(0, 0, 0, .7);
  }

  /* Shell */
  .topbar { --focus: var(--gold-300); }
  .topnav__link.is-active { background: var(--iris-600); }
  .tabbar { box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .1); }
  .toast { background: rgba(38, 38, 96, .97); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .12); }
  dialog.sheet { box-shadow: 0 0 0 1px var(--line-2), 0 24px 64px -20px rgba(0, 0, 0, .8); }

  /* Things that were night-indigo on a light page need an edge, or a lighter fill, on a night page */
  .chip.is-active { background: var(--iris-600); border-color: var(--iris-600); }
  .chips--seg .chip.is-active { background: var(--raised); }
  .wday.is-today .wday__label { background: var(--iris-600); }
  .history__date, .issued__digit, .mascot--sheet { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
  .history__item.is-manual .history__date { box-shadow: none; }
  .summary, .admin__hero { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-md); }
  .verse { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), var(--shadow-iris); }
  .avatar { color: hsl(var(--h) 75% 88%); background: linear-gradient(150deg, hsl(var(--h) 42% 34%), hsl(var(--h) 46% 24%)); box-shadow: inset 0 0 0 1px hsl(var(--h) 55% 65% / .28); }
  .member--skeleton .avatar { background: var(--wash); box-shadow: none; }
  .pin__dots span, .switch__track { background: rgba(255, 255, 255, .24); }
  .pin__dots span.is-filled { background: var(--iris-400); }
  .pin__dots.is-error span { background: var(--danger); }
  .switch input:checked + .switch__track { background: var(--iris-500); }
  .ring__track { stroke: var(--iris-100); }
  .group-ring__legend i.is-soft { background: #6A6AB8; }

  /* Trophy card keeps its gold, in a night key */
  .trophy { background: linear-gradient(160deg, #2A2310, #201B10); border-color: rgba(245, 181, 74, .3); }
  .trophy__count { color: var(--gold-300); }

  /* The report preview is a sheet of paper (it becomes the PDF), so it stays light */
  .report {
    color-scheme: light;
    --bg: #F5F5FA; --surface: #FFFFFF; --surface-2: #F7F7FC; --raised: #FFFFFF; --field: #FFFFFF;
    --ink: #121230; --ink-2: #4B4B6A; --ink-3: #666685;
    --line: rgba(18, 18, 48, .07); --line-2: rgba(18, 18, 48, .12);
    --wash: rgba(18, 18, 48, .055); --wash-soft: rgba(18, 18, 48, .035);
    --danger: #E5484D; --danger-text: #B4232A; --danger-soft: #FDECEC;
    --iris-50: #EEF0FF; --iris-100: #E0E7FF; --iris-200: #C7D2FE;
    --gold-100: #FFF3DC;
    --text-accent: #4F46E5; --text-gold: #8A5206;
    --focus: var(--iris-500);
    color: var(--ink);
  }
}
