/* =========================================================================
   Anointed — "studio" design system
   Crisp grotesk UI · serif scripture · one copper accent · glass + pills
   ========================================================================= */

:root {
  --sans: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --reading-size: 20px;

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* fluid out */
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --fast: 180ms;
  --med: 380ms;
  --slow: 620ms;

  --copper: #c8692c;
  --copper-2: #8f3d14;
  --copper-grad: linear-gradient(135deg, #e08a4a 0%, #c8692c 42%, #8f3d14 100%);
  --copper-glow: rgba(214, 118, 52, 0.55);
}

/* ---------- themes ---------- */
:root,
[data-theme="light"] {
  --bg: #e8e9eb;
  --canvas: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #efefed;
  --ink: #0d0d0e;
  --ink-2: #3b3b3d;
  --muted: #8a8a8e;
  --faint: #b9b9bd;
  --line: rgba(13, 13, 14, 0.08);
  --line-2: rgba(13, 13, 14, 0.14);
  --glass: rgba(246, 246, 244, 0.8);
  --glass-line: rgba(255, 255, 255, 0.7);
  --hero: #0b0b0c;
  --hero-ink: #f4f4f2;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.04), 0 18px 40px -18px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.45);
  --accent: var(--copper);
  --accent-grad: var(--copper-grad);
  --wordmark-gray: #9a9a9e;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #060607;
  --canvas: #0f0f11;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --ink: #f3f3f1;
  --ink-2: #c9c9cc;
  --muted: #8d8d93;
  --faint: #55555b;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --glass: rgba(23, 23, 26, 0.72);
  --glass-line: rgba(255, 255, 255, 0.08);
  --hero: #000;
  --hero-ink: #f4f4f2;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  --wordmark-gray: #6e6e74;
  color-scheme: dark;
}
[data-theme="ivory"] {
  --bg: #e9e2d3;
  --canvas: #f7f2e8;
  --surface: #fdfaf3;
  --surface-2: #efe7d7;
  --ink: #1f1a15;
  --ink-2: #473e34;
  --muted: #8e8170;
  --faint: #bcae98;
  --line: rgba(60, 40, 10, 0.1);
  --line-2: rgba(60, 40, 10, 0.16);
  --glass: rgba(247, 242, 232, 0.82);
  --glass-line: rgba(255, 255, 255, 0.75);
  --hero: #1b1611;
  --hero-ink: #f7efe0;
  --accent: #a87b2f;
  --accent-grad: linear-gradient(135deg, #d9b772 0%, #b08236 45%, #7e5719 100%);
  --copper-glow: rgba(214, 170, 90, 0.5);
  --shadow-sm: 0 1px 2px rgba(60, 40, 10, 0.05);
  --shadow-md: 0 18px 40px -18px rgba(60, 40, 10, 0.25);
  --shadow-lg: 0 30px 80px -30px rgba(60, 40, 10, 0.45);
  --wordmark-gray: #a89a86;
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background var(--med) var(--ease), color var(--med) var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 0.86em; background: var(--surface-2); padding: 2px 7px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--glass-line);
}

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px 4px 9px;
}
.chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.chip.accent i { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.chip.dark { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8); border-color: rgba(255, 255, 255, 0.12); }
.chip.dark i { background: #fff; }

.eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: -0.005em; }
.display { font-weight: 500; letter-spacing: -0.045em; line-height: 0.95; margin: 0; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 6px 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform var(--med) var(--spring), background var(--fast), box-shadow var(--med) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn .btn-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: transform var(--med) var(--spring); }
.btn:hover .btn-dot { transform: translateX(3px) rotate(-45deg); }
.btn-light { background: #fff; color: #0d0d0e; }
.btn-light .btn-dot { background: #0d0d0e; color: #fff; }
.btn-dark { background: var(--ink); color: var(--canvas); }
.btn-dark .btn-dot { background: var(--canvas); color: var(--ink); }
.btn-ghost { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.14); padding: 0 22px; backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.btn-soft { background: var(--surface-2); color: var(--ink); padding: 0 20px; height: 42px; }
.btn-soft:hover { background: var(--line-2); }

.round-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform var(--med) var(--spring), background var(--fast), box-shadow var(--med) var(--ease);
}
.round-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.round-btn:active { transform: scale(0.94); }
.round-btn.disabled { opacity: 0.35; pointer-events: none; }

/* ---------- shell + top bar ---------- */
.shell { max-width: 1480px; margin: 0 auto; padding: 16px 16px 40px; }
.topbar {
  position: sticky; top: 12px; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: 64px; padding: 0 12px 0 18px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; padding-left: 6px; }
/* logo: lowercase grotesk, "anoint" in ink, "ed." in gray */
.wordmark { font-family: var(--sans); font-weight: 500; font-size: 25px; line-height: 1; letter-spacing: -0.06em; color: var(--ink); white-space: nowrap; }
.wordmark span { color: var(--wordmark-gray); }
.brand .wordmark { transition: letter-spacing var(--slow) var(--ease); }
.brand:hover .wordmark { letter-spacing: -0.045em; }
.splash { display: grid; place-items: center; min-height: 62vh; }
.splash .wordmark { font-size: clamp(44px, 7vw, 76px); animation: breatheText 1.6s var(--ease) infinite alternate; }
@keyframes breatheText { from { opacity: 0.35; } to { opacity: 1; } }

.segmented { position: relative; display: flex; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.segmented a { position: relative; z-index: 1; padding: 9px 18px; font-size: 13.5px; font-weight: 500; color: var(--muted); border-radius: 999px; transition: color var(--med) var(--ease); }
.segmented a:hover { color: var(--ink); }
.segmented a.active { color: var(--ink); }
.seg-indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
  transition: transform var(--slow) var(--ease), width var(--slow) var(--ease);
}

.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.clock { display: flex; flex-direction: column; line-height: 1.15; padding: 0 14px; margin-right: 4px; border-left: 1px solid var(--line-2); }
.clock-k { font-size: 10px; color: var(--muted); }
.clock-v { font-size: 12px; font-weight: 500; white-space: nowrap; }
.menu-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease);
}
.menu-pill:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.menu-pill svg { width: 16px; height: 16px; }

.demo-chip {
  width: fit-content; margin: 14px auto 0; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.demo-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

.app { margin-top: 16px; }
.view { animation: rise var(--slow) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.995); } to { opacity: 1; transform: none; } }
::view-transition-old(root) { animation: 220ms var(--ease) both fadeout; }
::view-transition-new(root) { animation: 420ms var(--ease) both fadein; }
@keyframes fadeout { to { opacity: 0; transform: translateY(-6px); } }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } }

/* ---------- hero (dark) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--hero); color: var(--hero-ink);
  border-radius: var(--r-xl); min-height: 540px; padding: 40px 44px 0;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); grid-template-rows: 1fr auto; gap: 24px;
}
.hero::before { /* copper light */
  content: ""; position: absolute; z-index: -1; width: 780px; height: 780px; right: -140px; top: -260px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--copper-glow), rgba(214, 118, 52, 0.12) 45%, transparent 72%);
  filter: blur(10px); animation: breathe 9s ease-in-out infinite alternate;
}
.hero::after { /* fine grain */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.22; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes breathe { from { transform: translate(0, 0) scale(1); opacity: 0.9; } to { transform: translate(-40px, 30px) scale(1.08); opacity: 1; } }
.hero-giant {
  position: absolute; z-index: -1; left: 0; right: 0; bottom: 34px; text-align: center; white-space: nowrap; pointer-events: none;
  font-weight: 700; letter-spacing: -0.06em; line-height: 0.8; text-transform: uppercase;
  font-size: clamp(90px, 17vw, 250px);
  color: transparent; -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.22);
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 92%); mask-image: linear-gradient(180deg, #000 10%, transparent 92%);
}
.hero-main { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding-bottom: 30px; max-width: 640px; }
.hero-title { font-size: clamp(56px, 8.4vw, 118px); color: #fff; }
.hero-title .dot { color: rgba(255, 255, 255, 0.38); }
.hero-sub { font-size: 17px; color: rgba(255, 255, 255, 0.62); max-width: 460px; margin: 0; letter-spacing: -0.015em; }
.hero-sub b { color: #fff; font-weight: 500; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hero-side { align-self: center; display: flex; flex-direction: column; gap: 14px; }
.hero-strip {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  height: 58px; margin: 0 -44px; padding: 0 44px; font-size: 12.5px; color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(8px);
}
.hero-strip span { display: inline-flex; align-items: center; gap: 8px; }
.hero-strip span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

.feature-card {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 12px; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(20px);
  transition: transform var(--med) var(--spring), background var(--med);
}
a.feature-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.11); }
.feature-tile {
  aspect-ratio: 1; border-radius: 16px; background: #000; display: grid; place-items: center; position: relative; overflow: hidden;
  font-weight: 600; font-size: 44px; letter-spacing: -0.05em; color: #fff; border: 1px solid rgba(255, 255, 255, 0.08);
}
.feature-tile::after { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 80%; background: radial-gradient(closest-side, var(--copper-glow), transparent); }
.feature-body { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 4px 2px 0; min-width: 0; }
.feature-body .k { font-size: 11px; color: rgba(255, 255, 255, 0.45); }
.feature-body .t { font-size: 20px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; color: #fff; }
.feature-body .s { font-size: 13px; color: rgba(255, 255, 255, 0.6); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-style: italic; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stat { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.mini-stat b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -0.04em; color: #fff; }
.mini-stat span { font-size: 11px; color: rgba(255, 255, 255, 0.5); }

/* ---------- canvas section ---------- */
.canvas { background: var(--canvas); border-radius: var(--r-xl); margin-top: 12px; padding: 44px; border: 1px solid var(--line); }
.canvas + .canvas { margin-top: 12px; }

/* reading layout */
.reading { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }
.reading-meta { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.reading-meta h3 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; }
.reading-meta h3 .soft { color: var(--faint); }
.chap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.chap-grid a {
  height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; font-weight: 500; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); font-variant-numeric: tabular-nums;
  transition: transform var(--med) var(--spring), background var(--fast), color var(--fast);
}
.chap-grid a:hover { transform: translateY(-2px); }
.chap-grid a.active { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.chap-grid a.has-notes::after { content: ""; position: absolute; }
.chap-grid a { position: relative; }
.chap-grid a.has-notes::before { content: ""; position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.meta-row { display: flex; gap: 8px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); transition: border-color var(--fast), transform var(--med) var(--spring); }
.tag-cloud a:hover { border-color: var(--accent); transform: translateY(-1px); }
.tag-cloud a b { font-weight: 500; color: var(--muted); margin-left: 4px; }

.verses { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.verse {
  position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 0; padding: 12px 14px 12px 0; margin: 0 -14px 0 0;
  border-radius: var(--r-md); scroll-margin-top: 110px; transition: background var(--med) var(--ease);
}
.verse:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.verse .num {
  justify-self: center; margin-top: 5px; min-width: 28px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--line);
  transition: all var(--fast);
}
.verse.noted .num { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.verse.target { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.verse .body { min-width: 0; }
.scripture { font-size: var(--reading-size); line-height: 1.6; color: var(--ink); letter-spacing: -0.01em; }
[data-scripture="serif"] .scripture { font-family: var(--serif); letter-spacing: -0.003em; line-height: 1.58; }
[data-scripture="sans"] .scripture { font-family: var(--sans); letter-spacing: -0.02em; font-weight: 400; }
.verse.first .scripture::first-letter { font-size: 2.9em; float: left; line-height: 0.86; padding: 6px 10px 0 0; font-weight: 500; letter-spacing: -0.05em; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.verse.noted .scripture { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.studied-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: 3px; }

.note-card {
  margin: 14px 0 4px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.note-head .chip { padding: 3px 10px 3px 8px; font-size: 11px; }
.note-text { font-family: var(--serif); font-style: italic; font-size: calc(var(--reading-size) - 2px); line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; }
.note-text a { text-decoration: underline; text-decoration-color: var(--accent); }
.note-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.note-tags a { font-size: 11.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); transition: background var(--fast); }
.note-tags a:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.verse-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.verse-tags a { font-size: 11px; font-weight: 500; color: var(--accent); }
.verse-open {
  position: absolute; right: 8px; top: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); opacity: 0; transform: scale(0.9); transition: all var(--med) var(--spring); background: var(--surface); border: 1px solid var(--line);
}
.verse-open svg { width: 14px; height: 14px; }
.verse:hover .verse-open { opacity: 1; transform: none; }
.hide-nums .verse { grid-template-columns: 0 1fr; }
.hide-nums .verse .num { display: none; }

.notice {
  margin-top: 36px; padding: 18px 20px; border-radius: var(--r-md); border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; max-width: 760px;
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}

.chapter-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; max-width: 760px; }
.pager-card {
  flex: 1; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease);
}
.pager-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pager-card .k { font-size: 11.5px; color: var(--muted); }
.pager-card .t { font-size: 20px; font-weight: 500; letter-spacing: -0.035em; }
.pager-card.next { text-align: right; }

/* ---------- page header (light sections) ---------- */
.page-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 36px; }
.page-top .display { font-size: clamp(44px, 6vw, 84px); margin-top: 14px; }
.page-top .display .soft { color: var(--faint); }
.page-top p { max-width: 380px; margin: 0; color: var(--muted); font-size: 15px; }

/* word pills (We · Create → Future) */
.word-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 44px; }
.word-pills > * {
  height: 96px; border-radius: 999px; display: grid; place-items: center; font-size: clamp(22px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.04em;
  transition: transform var(--slow) var(--spring);
}
.word-pills > *:hover { transform: scale(1.03); }
.wp-1 { background: var(--surface); border: 1px solid var(--line); }
.wp-2 { background: var(--accent-grad); color: #fff; box-shadow: 0 20px 40px -20px var(--copper-glow); }
.wp-3 { background: var(--ink); color: var(--canvas); }
.wp-3 svg { width: 46px; height: 46px; stroke-width: 1.4; }
.wp-4 { background: var(--surface-2); color: var(--faint); }

/* stats */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 40px; }
.stat-card { padding: 22px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.stat-card b { display: block; font-size: 46px; font-weight: 500; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card span { font-size: 13px; color: var(--muted); }
.stat-card.dark { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.stat-card.dark span { color: color-mix(in srgb, var(--canvas) 60%, transparent); }

.section-label { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 14px; }
.section-label h4 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.035em; }

/* book grid */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.book-card {
  position: relative; padding: 18px 18px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease), border-color var(--fast);
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.book-card .n { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.book-card .name { font-size: 19px; font-weight: 500; letter-spacing: -0.035em; margin-top: 18px; }
.book-card .meta { font-size: 12px; color: var(--muted); }
.book-card .ring { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; }
.book-card .ring circle { stroke-width: 3; fill: none; }
.book-card .ring .bg { stroke: var(--surface-2); }
.book-card .ring .fg { stroke: var(--accent); transition: stroke-dashoffset var(--slow) var(--ease); }
.book-card.done { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.book-card.done .meta, .book-card.done .n { color: color-mix(in srgb, var(--canvas) 55%, transparent); }
.book-card.done .ring .bg { stroke: rgba(255, 255, 255, 0.15); }

/* topics */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.topic-card {
  position: relative; min-height: 180px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease);
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.topic-card .count { font-size: 64px; font-weight: 500; letter-spacing: -0.06em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.topic-card .name { font-size: 22px; font-weight: 500; letter-spacing: -0.035em; }
.topic-card .go { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); transition: transform var(--med) var(--spring); }
.topic-card:hover .go { transform: rotate(-45deg); }
.topic-card.featured { background: var(--hero); color: #fff; border-color: transparent; }
.topic-card.featured::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, var(--copper-glow), transparent); z-index: 0; }
.topic-card.featured > :not(.go) { position: relative; z-index: 1; }
.topic-card.featured .go { z-index: 1; }
.topic-card.featured .go { background: rgba(255, 255, 255, 0.1); }
.topic-card.featured .muted { color: rgba(255, 255, 255, 0.55); }

/* verse cards (notes / topic / search) */
.vcards { display: grid; gap: 10px; max-width: 900px; }
.vcard {
  position: relative; display: block; padding: 20px 60px 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease);
}
.vcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.vcard .ref { font-size: 12px; font-weight: 600; letter-spacing: -0.005em; display: flex; align-items: center; gap: 8px; }
.vcard .ref::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.vcard .scripture { font-size: calc(var(--reading-size) - 2px); margin-top: 6px; }
.vcard .note-text { margin-top: 10px; font-size: calc(var(--reading-size) - 4px); color: var(--muted); padding-left: 14px; border-left: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.vcard .go { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); transition: transform var(--med) var(--spring); }
.vcard:hover .go { transform: rotate(-45deg); }
.vcard mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.group-title { margin: 28px 0 10px; font-size: 13px; color: var(--muted); font-weight: 500; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state .display { font-size: 38px; color: var(--ink); margin-bottom: 10px; }
.empty-state p { max-width: 440px; margin: 0 auto 18px; }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.32); backdrop-filter: blur(4px); animation: fade var(--med) var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 70; right: 16px; top: 16px; bottom: 16px; width: min(520px, calc(100vw - 32px));
  background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; animation: slideIn var(--slow) var(--ease) both;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.sheet.closing { animation: slideOut 260ms var(--ease) both; }
@keyframes slideOut { to { transform: translateX(40px); opacity: 0; } }
.sheet-grip { display: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 26px 26px 14px; }
.sheet-head h2 { margin: 12px 0 0; font-size: 34px; font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.sheet-filter { flex: none; margin: 0 26px 10px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 18px; font: inherit; color: var(--ink); outline: none; }
.sheet-filter:focus { border-color: var(--line-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.sheet-body { flex: 1; overflow-y: auto; padding: 6px 26px 30px; }
.book-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.book-pick a {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; letter-spacing: -0.02em; transition: transform var(--med) var(--spring), border-color var(--fast);
}
.book-pick a:hover { transform: translateY(-1px); border-color: var(--line-2); }
.book-pick a.active { background: var(--ink); color: var(--canvas); }
.book-pick a small { font-size: 11px; color: var(--muted); font-weight: 400; }
.book-pick a.active small { color: color-mix(in srgb, var(--canvas) 55%, transparent); }
.book-pick a .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* settings */
.set-group { margin-bottom: 26px; }
.set-group > .eyebrow { margin-bottom: 10px; display: block; }
.set-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; min-height: 58px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .l { font-size: 14px; font-weight: 500; letter-spacing: -0.015em; }
.set-row .l small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.choice { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.choice button { padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--muted); transition: all var(--med) var(--ease); }
.choice button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.theme-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 16px; }
.swatch { border-radius: 14px; border: 1.5px solid var(--line); padding: 8px; text-align: left; transition: border-color var(--fast), transform var(--med) var(--spring); }
.swatch:hover { transform: translateY(-2px); }
.swatch.on { border-color: var(--accent); }
.swatch .prev { height: 54px; border-radius: 9px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.swatch span { display: block; font-size: 12px; font-weight: 500; margin-top: 7px; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); transition: background var(--med) var(--ease); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform var(--med) var(--spring); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }
.range { display: flex; align-items: center; gap: 10px; }
.range input { width: 140px; accent-color: var(--accent); }
.range output { font-size: 12px; color: var(--muted); width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.preview-text { padding: 16px; font-size: var(--reading-size); line-height: 1.55; border-top: 1px solid var(--line); }
[data-scripture="serif"] .preview-text { font-family: var(--serif); }
.set-link { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.set-link svg { color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3fb56b; margin-right: 6px; box-shadow: 0 0 0 3px rgba(63, 181, 107, 0.18); }

/* ---------- command palette ---------- */
.palette-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(6px); display: flex; justify-content: center; padding: 11vh 16px 16px; animation: fade var(--med) var(--ease) both; }
.palette { width: 100%; max-width: 720px; max-height: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; background: color-mix(in srgb, var(--canvas) 86%, transparent); animation: pop var(--slow) var(--spring) both; }
@keyframes pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-input svg { color: var(--muted); width: 20px; height: 20px; }
.palette-input input { flex: 1; height: 64px; border: 0; outline: none; background: transparent; font: inherit; font-size: 19px; letter-spacing: -0.025em; color: var(--ink); }
.palette-input kbd { font: inherit; font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }
.palette-results { overflow-y: auto; padding: 10px; display: grid; gap: 6px; }
.palette-results .vcard { padding: 14px 52px 14px 18px; border-radius: var(--r-md); }
.palette-results .vcard .go { top: 12px; right: 12px; width: 30px; height: 30px; }
.palette-hint { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translateX(-50%); background: var(--ink); color: var(--canvas); padding: 11px 18px; border-radius: 999px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pop var(--med) var(--spring) both; }

.loading { display: grid; place-items: center; min-height: 60vh; }
.loader { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-xl); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- tab bar (mobile) ---------- */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .clock { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .reading { grid-template-columns: 1fr; gap: 28px; }
  .reading-meta { position: static; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .shell { padding: 10px 10px 110px; }
  .topbar { grid-template-columns: 1fr auto; height: 56px; top: 8px; padding: 0 8px 0 14px; }
  .brand .wordmark { font-size: 23px; }
  .segmented { display: none; }
  .menu-pill span { display: none; }
  .menu-pill { width: 42px; padding: 0; justify-content: center; }
  .hero { min-height: 460px; padding: 26px 22px 0; border-radius: 26px; }
  .hero-strip { margin: 0 -22px; padding: 0 22px; font-size: 11.5px; }
  .hero-strip span:nth-child(2) { display: none; }
  .hero-giant { bottom: 44px; }
  .btn { height: 46px; }
  .canvas { padding: 24px 18px; border-radius: 26px; }
  .verse { grid-template-columns: 36px 1fr; padding-right: 6px; }
  .verse-open { display: none; }
  .word-pills { grid-template-columns: repeat(2, 1fr); }
  .word-pills > * { height: 72px; }
  .stat-card b { font-size: 36px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .vcard { padding: 18px 50px 18px 18px; }
  .sheet { left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 88vh; border-radius: 28px 28px 0 0; animation-name: sheetUp; }
  .sheet.closing { animation-name: sheetDown; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  @keyframes sheetDown { to { transform: translateY(100%); } }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 10px auto 0; }
  .sheet-head { padding: 16px 20px 12px; }
  .sheet-filter { margin: 0 20px 10px; }
  .sheet-body { padding: 6px 20px 30px; }
  .theme-swatches { grid-template-columns: repeat(2, 1fr); }
  .palette-wrap { padding-top: 12px; }
  .tabbar {
    position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr); height: 66px; border-radius: 24px; box-shadow: var(--shadow-md); padding: 6px;
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 18px; font-size: 10.5px; font-weight: 500; color: var(--muted); transition: all var(--med) var(--ease); }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }
}
/* =========================================================================
   Notes · Words · Writing
   ========================================================================= */

/* tappable words */
.scripture .w { cursor: pointer; border-radius: 4px; transition: background var(--fast), color var(--fast); }
.scripture .w:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.scripture .w.studied { text-decoration: underline dotted; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.scripture .w.active { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.scripture i.add { font-style: italic; color: var(--ink-2); }
.verse.noted .scripture { text-decoration: none; }

/* notes under a verse */
.note-stack { display: grid; gap: 8px; margin-top: 12px; }
.note-mini {
  display: block; text-align: left; width: 100%; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease), border-color var(--fast);
}
.note-mini:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.note-mini .nm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.note-mini .nm-title { font-size: 13px; font-weight: 600; letter-spacing: -0.015em; }
.note-mini .nm-kind { font-size: 11px; color: var(--muted); }
.note-mini .note-text { font-size: calc(var(--reading-size) - 3px); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-mini .nm-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.pill.word { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.pill.word .orig { font-family: var(--serif); font-size: 11px; opacity: 0.6; font-weight: 400; }
.lookup-results .orig { font-family: var(--serif); font-size: 12px; color: var(--muted); }
a.pill:hover, button.pill:hover { background: var(--line-2); }
.cited { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cited button { font-size: 12.5px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.cited button:hover { color: var(--accent); }
.word-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* verse actions */
.verse-actions { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; opacity: 0; transform: translateY(-2px); transition: all var(--med) var(--ease); }
.verse:hover .verse-actions, .verse:focus-within .verse-actions { opacity: 1; transform: none; }
.verse-actions button, .verse-actions a { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.verse-actions svg { width: 14px; height: 14px; }
.verse-actions button:hover, .verse-actions a:hover { color: var(--accent); }
.verse-actions .on { color: var(--accent); }
.verse { padding-right: 116px; }

/* chapter studies */
.chapter-studies { display: grid; gap: 8px; margin-bottom: 26px; max-width: 760px; }

/* detail panel */
.sheet.wide { width: min(640px, calc(100vw - 32px)); }
.panel-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; }
.panel-head { padding: 6px 0 8px; }
.panel-head h2 { margin: 12px 0 6px; font-size: 32px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; }
.panel-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.panel-section { margin-top: 26px; }
.panel-section > .eyebrow { display: block; margin-bottom: 10px; }
.note-body { font-family: var(--serif); font-size: calc(var(--reading-size) - 1px); line-height: 1.6; color: var(--ink); }
.note-body p, .note-body li, .note-body blockquote { margin: 0 0 10px; white-space: pre-wrap; }
.note-body h1, .note-body h2, .note-body h3 { font-family: var(--sans); letter-spacing: -0.03em; font-weight: 600; margin: 22px 0 8px; line-height: 1.2; }
.note-body h1 { font-size: 24px; }
.note-body h2 { font-size: 20px; }
.note-body h3 { font-size: 17px; }
.note-body ul, .note-body ol { padding-left: 22px; margin: 0 0 10px; }
.note-body blockquote { border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); padding-left: 14px; color: var(--ink-2); font-style: italic; }
.note-body .callout { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.note-body hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.note-body a { color: var(--accent); }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }

/* word panel */
.xlit-big { font-size: 60px; font-weight: 500; letter-spacing: -0.05em; line-height: 1; margin: 14px 0 8px; }
.orig-sub { font-size: 14px; color: var(--muted); }
.orig-sub span { font-family: var(--serif); font-size: 16px; color: var(--ink-2); }
.lemma { font-family: var(--serif); font-size: 64px; line-height: 1.05; margin: 12px 0 6px; }
.xlit { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; }
.xlit small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.def { font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--ink); margin: 0; }
.renderings { display: flex; flex-wrap: wrap; gap: 6px; }
.renderings span { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.renderings b { font-weight: 600; margin-left: 5px; color: var(--accent); font-variant-numeric: tabular-nums; }
.mini-verse { display: block; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; transition: border-color var(--fast); }
.mini-verse:hover { border-color: var(--line-2); }
.mini-verse .ref { font-size: 12px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.mini-verse .scripture { font-size: 16px; line-height: 1.5; margin-top: 3px; }
.mini-verse mark { background: color-mix(in srgb, var(--accent) 20%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.dot-note { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* word cards */
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.word-card {
  text-align: left; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-height: 170px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease);
}
.word-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.word-card .x { font-size: 34px; font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; }
.word-card .orig { font-family: var(--serif); font-size: 15px; color: var(--muted); margin-top: 6px; }
.word-card .meta { font-size: 12px; color: var(--muted); }
.lookup { display: flex; gap: 8px; margin-bottom: 28px; max-width: 560px; }
.lookup input, .field input, .field textarea {
  flex: 1; height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 20px; font: inherit; color: var(--ink); outline: none;
}
.lookup input:focus, .field input:focus, .field textarea:focus { border-color: var(--line-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.lookup-results { display: grid; gap: 6px; margin: -18px 0 28px; max-width: 560px; }
.lookup-results button { text-align: left; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.lookup-results button:hover { border-color: var(--line-2); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 26px; }
.filters button { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: all var(--fast); }
.filters button.on { background: var(--ink); color: var(--canvas); border-color: var(--ink); }

/* compose */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 500; color: var(--muted); }
.field textarea { height: 220px; border-radius: 18px; padding: 14px 18px; resize: vertical; font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.field small { font-size: 12px; color: var(--muted); }
.error-text { color: #c0392b; font-size: 13px; }

@media (max-width: 760px) {
  .verse { padding-right: 6px; }
  .verse-actions { position: static; opacity: 1; transform: none; margin-top: 10px; grid-column: 2; }
  .lemma { font-size: 48px; }
  .sheet.wide { width: 100%; }
}

/* =========================================================================
   Floating motion: headlines rise word by word out of a soft blur; content floats in on scroll
   ========================================================================= */
.fw {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.45em) rotate(0.5deg);
  animation: floatIn 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 55ms + var(--base, 0ms));
  will-change: transform, opacity, filter;
}
@keyframes floatIn { to { opacity: 1; filter: blur(0); transform: none; } }

.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(22px);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 1100ms cubic-bezier(0.16, 1, 0.3, 1), filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; filter: blur(0); transform: none; }
.hero-sub.reveal, .hero-actions.reveal, .hero-side.reveal { --d: 380ms; }
.hero-actions.reveal { --d: 520ms; }
.hero-side.reveal { --d: 640ms; }

/* gentle idle float on the hero's feature card */
.hero .feature-card.in { animation: idleFloat 7s ease-in-out 1.6s infinite; }
@keyframes idleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

[data-motion="reduced"] .fw, [data-motion="reduced"] .reveal { opacity: 1 !important; filter: none !important; transform: none !important; animation: none !important; }

/* The top bar and tab bar stay perfectly still during page transitions; only the content moves. */
.topbar { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
::view-transition-group(topbar), ::view-transition-group(tabbar),
::view-transition-old(topbar), ::view-transition-new(topbar),
::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; }
::view-transition-old(topbar), ::view-transition-old(tabbar) { display: none; }

/* Installed on a phone's home screen: keep clear of the notch / status bar and home indicator. */
@media (display-mode: standalone) {
  .shell { padding-top: calc(10px + env(safe-area-inset-top)); }
  .topbar { top: calc(8px + env(safe-area-inset-top)); }
  .sheet { padding-top: env(safe-area-inset-top); }
}
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* whole chapters listed under a topic */
.chapter-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; max-width: 900px; }
.chapter-links .eyebrow { width: 100%; }
.chapter-link { display: inline-flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: transform var(--med) var(--spring), box-shadow var(--med) var(--ease); }
.chapter-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.chapter-link b { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; }
.chapter-link span { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); }

/* =========================================================================
   Scripture in the app's own typeface (Inter Tight), tuned for long reading
   ========================================================================= */
[data-scripture="sans"] .scripture {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -0.014em;
  line-height: 1.62;
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
}
[data-scripture="sans"] .verse .scripture { font-size: calc(var(--reading-size) + 1px); }
[data-scripture="sans"] .scripture i.add { font-style: italic; font-weight: 300; color: var(--ink-2); }
[data-scripture="sans"] .verse.first .scripture::first-letter { font-weight: 600; letter-spacing: -0.06em; padding-right: 8px; }
[data-scripture="sans"] .note-text { font-family: var(--sans); font-style: normal; letter-spacing: -0.01em; }
[data-scripture="sans"] .feature-body .s { font-family: var(--sans); font-style: normal; }

/* verse number opens the verse panel */
.verse button.num { cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600; transition: transform var(--med) var(--spring), background var(--fast), color var(--fast); }
.verse button.num:hover { transform: scale(1.1); background: var(--accent); color: #fff; border-color: var(--accent); }
.panel-verse { font-size: calc(var(--reading-size) + 2px); line-height: 1.6; margin: 4px 0 6px; }

/* suggested topics */
.suggest-list { display: grid; gap: 8px; }
.suggest { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px dashed var(--line-2); }
.suggest-name { font-size: 17px; font-weight: 500; letter-spacing: -0.03em; }
.suggest-name a:hover { color: var(--accent); }
.suggest-why { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.add-btn { height: 36px; padding: 0 14px; font-size: 13px; gap: 6px; flex: none; }
.add-btn svg { width: 14px; height: 14px; }
.add-btn.done { background: var(--ink); color: var(--canvas); }

/* topic exploration */
.explore-hint { font-size: 12px; font-weight: 500; color: var(--accent); margin-top: 6px; }
.topic-card.featured .explore-hint { color: #f0a870; }
.explore-groups button small { font-weight: 400; opacity: 0.6; }
.explore-testament { margin-top: -14px; }
.explore-card { padding-right: 22px; }
.explore-card .ref { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.explore-card .ref::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.explore-card mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.explore-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.explore-card.added { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }

/* long words or links inside notes wrap instead of stretching the card */
.vcards > *, .note-stack > * { min-width: 0; }
.vcard, .note-mini, .note-body { overflow-wrap: anywhere; }
.cited .cited-toggle { text-decoration: none; font-weight: 600; color: var(--accent); }

/* =========================================================================
   Smooth on phones
   ========================================================================= */

/* Taps: no grey flash, no 300 ms double-tap delay, clear pressed feedback. */
a, button, [data-strong], [data-verse] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:active, .btn:active, .pill:active, .note-mini:active, .vcard:active, .topic-card:active, .word-card:active, .book-card:active { transform: scale(0.98); }

/* Long chapters: only draw verses that are on (or near) the screen. */
.verse { content-visibility: auto; contain-intrinsic-size: auto 96px; }
.vcard, .note-mini, .mini-verse, .book-card { contain: layout paint; }

/* Panels scroll on their own without dragging the page behind them. */
.sheet-body, .palette-results, #panel-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet { max-height: 100dvh; }
.sheet.dragging { transition: none !important; animation: none !important; }

@media (max-width: 760px), (hover: none) {
  /* Blur is the most expensive thing a phone can draw while scrolling: float without it. */
  .reveal { filter: none; transform: translateY(14px); transition-duration: 520ms, 620ms, 0ms; }
  .reveal.in { filter: none; }
  .fw { filter: blur(4px); animation-duration: 800ms; }
  .hero::before { animation: none; filter: none; }
  .hero::after { display: none; }
  .hero .feature-card.in { animation: none; }
  .topbar, .tabbar { backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); }
  [data-theme="light"] .topbar, [data-theme="light"] .tabbar { background: rgba(246, 246, 244, 0.9); }
  [data-theme="dark"] .topbar, [data-theme="dark"] .tabbar { background: rgba(23, 23, 26, 0.9); }
  [data-theme="ivory"] .topbar, [data-theme="ivory"] .tabbar { background: rgba(247, 242, 232, 0.92); }
  .scrim, .palette-wrap { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0, 0, 0, 0.42); }
  .glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .card:hover, .vcard:hover, .topic-card:hover, .word-card:hover, .book-card:hover, .note-mini:hover, .pager-card:hover { transform: none; box-shadow: none; }
}

@media (max-width: 760px) {
  /* iPhone zooms into any text field under 16px: keep them at 16px. */
  input, textarea, select, .sheet-filter, .palette-input input, .lookup input { font-size: 16px !important; }

  /* Bigger, easier tap targets. */
  .verse button.num { min-width: 34px; height: 30px; font-size: 12.5px; }
  .verse { grid-template-columns: 42px 1fr; }
  .verse-actions button, .verse-actions a { width: 38px; height: 38px; }
  .verse-actions svg { width: 16px; height: 16px; }
  .chap-grid a { height: 42px; }
  .round-btn { width: 44px; height: 44px; }
  .pill { padding: 6px 12px; font-size: 12.5px; }
  .add-btn { height: 40px; }
  .scripture .w { padding: 1px 0; }

  /* Sheets: full width, rounded top, grab handle, safe area at the bottom. */
  .sheet { max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); }
  .sheet-grip { width: 44px; height: 5px; margin: 10px auto 2px; cursor: grab; touch-action: none; }
  .panel-bar { padding-top: 6px; touch-action: none; }

  /* Tab bar respects the home indicator; content never hides behind it. */
  .shell { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

  /* Hero a little shorter so the text comes sooner. */
  .hero { min-height: 400px; }
  .hero-title { font-size: clamp(48px, 15vw, 72px); }
  .hero-giant { font-size: 26vw; }
}

/* Swipe between chapters: a subtle slide hint */
.verses.swiping { transition: none; }
.verses.swipe-out-left { transform: translateX(-24px); opacity: 0.4; transition: transform 180ms ease, opacity 180ms ease; }
.verses.swipe-out-right { transform: translateX(24px); opacity: 0.4; transition: transform 180ms ease, opacity 180ms ease; }
.cited button { text-align: left; }

/* Phones: verse buttons live in the verse panel (tap the verse number) instead of under every verse */
@media (max-width: 760px) { .verse-actions { display: none; } }
.btn.studied-on, .btn[data-studied].on { background: var(--ink); color: var(--canvas); }
[data-scripture="sans"] .def { font-family: var(--sans); font-size: 17px; letter-spacing: -0.012em; }

/* topic page: interchangeable + related topics */
.related-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,0.55); }
.related-row span { margin-left: 4px; }
.related-row span:first-child { margin-left: 0; }
.chip.dark.ghost { background: transparent; border-style: dashed; }
.chip.dark:hover { background: rgba(255,255,255,0.16); }

/* word meaning (English first after the transliteration) */
.meaning { font-size: 26px; font-weight: 500; letter-spacing: -0.035em; color: var(--accent); margin: -2px 0 6px; }
.meaning span { color: var(--faint); font-weight: 400; margin-right: 4px; }
.also { font-size: 14px; color: var(--muted); margin-bottom: 8px; line-height: 1.45; }
.also b { color: var(--ink-2); font-weight: 500; }
.translations button { font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: all var(--fast); }
.translations button.on { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.translations button.on b { color: inherit; opacity: 0.7; }
.mini-verse .rendering { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 2px 8px; border-radius: 999px; }
.word-card .mean { font-size: 17px; font-weight: 500; color: var(--accent); letter-spacing: -0.02em; margin-top: 2px; }
.word-card .also { font-size: 12.5px; margin: 0; }
.mean-inline { color: var(--accent); }

/* =========================================================================
   Quiz
   ========================================================================= */
.quiz-step { display: flex; align-items: center; gap: 12px; margin: 30px 0 14px; }
.quiz-step h4 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.035em; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--ink); color: var(--canvas); flex: none; }
.quiz-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quiz-type, .quiz-source { text-align: left; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; transition: all var(--med) var(--ease); }
.quiz-type b, .quiz-source b { font-size: 22px; font-weight: 500; letter-spacing: -0.04em; }
.quiz-type span, .quiz-source span { font-size: 13px; color: var(--muted); }
.quiz-type.on, .quiz-source.on { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.quiz-type.on span, .quiz-source.on span { color: color-mix(in srgb, var(--canvas) 60%, transparent); }
.quiz-source:disabled { opacity: 0.4; cursor: not-allowed; }
.quiz-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quiz-picks { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.quiz-pick { display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; letter-spacing: -0.015em; transition: all var(--fast); }
.quiz-pick small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.quiz-pick.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.quiz-pick.on small { color: rgba(255, 255, 255, 0.75); }
.quiz-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.quiz-history { display: grid; gap: 8px; }
.quiz-past { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.quiz-past b { display: block; font-weight: 500; letter-spacing: -0.02em; }
.quiz-past span { font-size: 12.5px; color: var(--muted); }
.quiz-score-mini { font-size: 20px; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* playing */
.quiz-play { max-width: 760px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.quiz-progress { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; background: var(--accent-grad); border-radius: 3px; transition: width var(--slow) var(--ease); }
.quiz-count { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-card { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 34px; }
.quiz-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.quiz-prompt { font-size: clamp(26px, 3.4vw, 36px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.12; margin: 18px 0 18px; }
.quiz-context { padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; }
.quiz-context .scripture { font-size: calc(var(--reading-size) + 1px); line-height: 1.6; }
.quiz-context .note-text { margin-top: 10px; font-size: var(--reading-size); color: var(--ink); }
.quiz-context .blank { display: inline-block; min-width: 80px; border-bottom: 2px solid var(--accent); color: transparent; }
.quiz-ref { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.quiz-options { display: grid; gap: 8px; }
.quiz-option { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--line); font-size: 16px; line-height: 1.4; transition: transform var(--med) var(--spring), border-color var(--fast), background var(--fast), opacity var(--fast); }
.quiz-option:hover:not(:disabled) { border-color: var(--line-2); transform: translateY(-1px); }
.quiz-option .opt-key { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.quiz-option.right { border-color: #3fb56b; background: color-mix(in srgb, #3fb56b 10%, var(--surface)); }
.quiz-option.right .opt-key { background: #3fb56b; color: #fff; }
.quiz-option.wrong { border-color: #d0493a; background: color-mix(in srgb, #d0493a 8%, var(--surface)); }
.quiz-option.wrong .opt-key { background: #d0493a; color: #fff; }
.quiz-option.dim { opacity: 0.45; }
.quiz-option:disabled { cursor: default; }
.quiz-explain { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-md); border-left: 3px solid #3fb56b; background: var(--surface); }
.quiz-explain.no { border-left-color: #d0493a; }
.quiz-explain p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* results */
.results-hero { position: relative; width: 170px; height: 170px; margin: 10px auto 18px; }
.score-ring { width: 100%; height: 100%; }
.score-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.score-ring .bg { stroke: var(--surface-2); }
.score-ring .fg { stroke: var(--accent); transition: stroke-dashoffset 1.2s var(--ease); }
.score-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-num b { font-size: 52px; font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.score-num span { font-size: 13px; color: var(--muted); }
.quiz-review .ref { font-weight: 500; }
.quiz-review .pill { margin-top: 10px; }

@media (max-width: 760px) {
  .quiz-types, .quiz-sources { grid-template-columns: 1fr; }
  .quiz-type, .quiz-source { flex-direction: row; justify-content: space-between; align-items: center; padding: 16px 18px; }
  .quiz-type b, .quiz-source b { font-size: 19px; }
  .quiz-card { padding: 22px 18px; border-radius: 26px; }
  .quiz-option { font-size: 15px; padding: 13px 14px; }
  .quiz-row .btn-dark { width: 100%; justify-content: space-between; }
}
.quiz-context, .quiz-explain, .quiz-option { overflow-wrap: anywhere; }

/* =========================================================================
   Quiz · Flashcards · Memorize
   ========================================================================= */
.mode-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); margin-bottom: 22px; }
.mode-switch a { padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: all var(--med) var(--ease); }
.mode-switch a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.memory-stats { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-bottom: 8px; }
.memory-stats .stat-card { flex: 1; min-width: 130px; padding: 16px 18px; }
.memory-stats .stat-card b { font-size: 34px; }
.memory-stats .review-now { align-self: center; }
.deck-types { grid-template-columns: repeat(3, 1fr); }

/* flashcard with a 3D flip */
.flashcard { perspective: 1400px; cursor: pointer; outline: none; transition: transform 220ms var(--ease), opacity 220ms var(--ease); min-height: 340px; }
.fc-inner { position: relative; width: 100%; min-height: 340px; transform-style: preserve-3d; transition: transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-xl); padding: 34px 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 14px; background: var(--canvas); border: 1px solid var(--line); box-shadow: var(--shadow-md); overflow-y: auto; }
.fc-front { background: var(--hero); color: var(--hero-ink); border-color: transparent; }
.fc-front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(500px 300px at 80% 0%, var(--copper-glow), transparent 60%); opacity: 0.6; }
.fc-back { transform: rotateY(180deg); }
.fc-ref { font-size: clamp(34px, 6vw, 52px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; position: relative; z-index: 1; }
.fc-ref.small { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.fc-text { font-size: calc(var(--reading-size) + 2px); line-height: 1.55; letter-spacing: -0.012em; max-width: 560px; position: relative; z-index: 1; }
.fc-text.small { font-size: 15px; color: var(--muted); }
.fc-text.note { font-size: var(--reading-size); }
.fc-hint { font-size: 13px; color: rgba(255, 255, 255, 0.5); position: relative; z-index: 1; }
.fc-xlit { font-size: clamp(44px, 8vw, 64px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; position: relative; z-index: 1; }
.fc-xlit.small { font-size: 22px; color: var(--muted); }
.fc-orig { font-family: var(--serif); font-size: 22px; opacity: 0.7; position: relative; z-index: 1; }
.fc-mean { font-size: clamp(30px, 5vw, 42px); font-weight: 500; letter-spacing: -0.04em; color: var(--accent); }
.fc-also { font-size: 15px; color: var(--muted); }
.flashcard.out-left { transform: translateX(-60px) rotate(-6deg); opacity: 0; }
.flashcard.out-right { transform: translateX(60px) rotate(6deg); opacity: 0; }
.fc-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.fc-rate { flex: 1; max-width: 190px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); transition: transform var(--med) var(--spring); }
.fc-rate b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.fc-rate span { font-size: 12px; color: var(--muted); }
.fc-rate.again { border-color: color-mix(in srgb, #d0493a 45%, transparent); }
.fc-rate.good { border-color: color-mix(in srgb, #3fb56b 55%, transparent); background: color-mix(in srgb, #3fb56b 8%, var(--surface)); }
.fc-rate.easy { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* memorize */
.mem-stages { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.mem-stages span { font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.mem-stages span.on { background: var(--ink); color: var(--canvas); }
.mem-stages span.done { background: color-mix(in srgb, #3fb56b 14%, transparent); color: #2f8a52; }
.mem-ref { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.mem-text { font-size: calc(var(--reading-size) + 3px); line-height: 1.75; letter-spacing: -0.012em; min-height: 120px; }
.mem-text.letters { font-size: calc(var(--reading-size) + 6px); letter-spacing: 0.02em; word-spacing: 0.25em; }
.mem-gap { font: inherit; color: var(--accent); border-bottom: 2px solid var(--accent); padding: 0 2px; line-height: 1.2; }
.mem-gap.letter { border-bottom: none; color: var(--ink); font-weight: 500; }
.mem-gap.shown { color: var(--ink); border-bottom-color: transparent; background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; }
.mem-text.built { min-height: 90px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px dashed var(--line-2); }
.mem-caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -3px; margin-left: 3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mem-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mem-chip { padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); font-size: 16px; font-weight: 500; transition: transform var(--med) var(--spring), opacity var(--fast); }
.mem-chip.used { opacity: 0.2; pointer-events: none; }
.mem-chip.shake { border-color: #d0493a; animation: shake 360ms; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.mem-tip { font-size: 13px; margin: 14px 0 0; }
.verse button.num.mem { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }

@media (max-width: 760px) {
  .deck-types { grid-template-columns: 1fr; }
  .flashcard, .fc-inner { min-height: 58dvh; }
  .fc-face { padding: 26px 20px; }
  .memory-stats .review-now { width: 100%; justify-content: space-between; }
  .mode-switch { display: flex; }
  .mode-switch a { flex: 1; text-align: center; padding: 9px 8px; }
}

/* =========================================================================
   Other Bibles: picker, original-words strip, folded verses
   ========================================================================= */
.bible-list { padding: 6px; }
.bible-lang { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.bible-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 11px 12px; border-radius: var(--r-md); transition: background var(--fast); }
.bible-row:hover { background: var(--surface-2); }
.bible-row .bid { flex: none; min-width: 64px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-align: center; }
.bible-row .l { flex: 1; min-width: 0; font-weight: 500; display: flex; flex-direction: column; gap: 2px; }
.bible-row .l small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.bible-row .tick { opacity: 0; color: var(--accent); width: 20px; height: 20px; }
.bible-row .tick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.bible-row.on { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.bible-row.on .bid { background: var(--ink); color: var(--canvas); }
.bible-row.on .tick { opacity: 1; }
.bible-list .set-row { border-top: 1px solid var(--line); margin-top: 6px; }
.set-note { font-size: 13px; color: var(--muted); margin: 10px 4px 0; line-height: 1.5; }

.orig-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.orig-strip button { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid var(--line); font-size: 13.5px; transition: background var(--fast), border-color var(--fast), transform var(--med) var(--spring); }
.orig-strip button b { font-weight: 600; letter-spacing: -0.01em; }
.orig-strip button span { color: var(--muted); font-size: 12px; }
.orig-strip button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.orig-strip button:active { transform: scale(0.96); }
.scripture.folded { color: var(--muted); font-size: 15px; font-style: italic; }
.scripture:lang(grc) { font-family: var(--serif), Georgia, serif; font-size: calc(var(--reading-size) + 1px); }
.scripture:lang(he) { font-family: "Noto Serif Hebrew", var(--serif), serif; font-size: calc(var(--reading-size) + 4px); line-height: 1.9; }
.scripture:lang(zh-Hant) { letter-spacing: 0.04em; line-height: 1.9; }

@media (max-width: 760px) {
  .orig-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .orig-strip::-webkit-scrollbar { display: none; }
  .orig-strip button { flex: none; }
}
/* no drop cap in right-to-left Hebrew */
.verse.first .scripture:lang(he)::first-letter { font-size: inherit; float: none; padding: 0; background: none; color: inherit; -webkit-background-clip: border-box; background-clip: border-box; letter-spacing: 0; }
.bible-row .bid { min-width: 74px; }
