/* Word & Worship, new design. Every value comes from the custom properties that
   lib/v2/tokens.ts generates from packages/design. Do not add raw colors here. */

/* Scripture type never re-wraps after it is on screen: Literata is preloaded and
   used when it arrives before first paint, otherwise from the next page on. A
   late swap moved every verse on a cold visit (CLS 0.36 on /bible/john/3). */
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-latin-wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: optional;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin-wght.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-ground);
  color: var(--c-ink);
  font-family: var(--t-body-family);
  font-size: var(--t-body-size);
  line-height: var(--t-body-line);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--c-green); }
img, svg { display: block; }
:focus-visible {
  outline: var(--size-focus-ring-width) solid var(--c-focus);
  outline-offset: var(--size-focus-ring-offset);
  border-radius: 6px;
}
.v2-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.v2-skip {
  position: fixed; left: var(--space-4); top: var(--space-2); z-index: var(--layer-toast);
  background: var(--c-raised); color: var(--c-ink); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control); transform: translateY(-200%);
}
.v2-skip:focus { transform: none; }

/* Type */
.t-display { font-family: var(--t-display-family); font-size: var(--t-display-size); line-height: var(--t-display-line); font-weight: var(--t-display-weight); letter-spacing: var(--t-display-tracking); margin: 0; }
.t-title { font-family: var(--t-title-family); font-size: var(--t-title-size); line-height: var(--t-title-line); font-weight: var(--t-title-weight); letter-spacing: var(--t-title-tracking); margin: 0; }
.t-heading { font-family: var(--t-heading-family); font-size: var(--t-heading-size); line-height: var(--t-heading-line); font-weight: var(--t-heading-weight); letter-spacing: var(--t-heading-tracking); margin: 0; }
.t-subheading { font-family: var(--t-subheading-family); font-size: var(--t-subheading-size); line-height: var(--t-subheading-line); font-weight: var(--t-subheading-weight); margin: 0; }
.t-body { font-family: var(--t-body-family); font-size: var(--t-body-size); line-height: var(--t-body-line); margin: 0; }
.t-strong { font-weight: var(--t-body-strong-weight); }
.t-label { font-family: var(--t-label-family); font-size: var(--t-label-size); line-height: var(--t-label-line); font-weight: var(--t-label-weight); }
.t-meta { font-family: var(--t-meta-family); font-size: var(--t-meta-size); line-height: var(--t-meta-line); font-weight: var(--t-meta-weight); color: var(--c-ink-2); margin: 0; }
.t-caption { font-family: var(--t-caption-family); font-size: var(--t-caption-size); line-height: var(--t-caption-line); font-weight: var(--t-caption-weight); color: var(--c-ink-2); margin: 0; }
.scripture {
  font-family: var(--font-scripture);
  font-size: var(--scripture-size);
  line-height: var(--scripture-line);
  font-weight: 400;
}

/* App frame */
.v2-app { min-height: 100dvh; display: flex; flex-direction: column; }
.v2-main {
  flex: 1;
  width: 100%;
  max-width: var(--size-page-max-width);
  margin: 0 auto;
  padding: var(--space-6) var(--size-page-gutter) calc(var(--size-tab-bar-height) + var(--space-9) + env(safe-area-inset-bottom));
}
.v2-pagehead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-6); }
.v2-brand { font-family: var(--t-subheading-family); font-size: var(--t-subheading-size); font-weight: 600; color: var(--c-ink); text-decoration: none; }
.v2-stack { display: grid; gap: var(--space-5); }
.v2-section-title { margin: var(--space-7) 0 var(--space-3); }

/* Tabs live in /ww-shell.css, shared with every route. */
@media (min-width: 900px) {
  .v2-main { padding-top: calc(var(--size-tab-bar-height) + var(--space-7)); padding-bottom: var(--space-9); }
}

/* Buttons */
.v2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--size-touch-target); min-width: var(--size-touch-target);
  padding: 0 var(--space-5);
  border-radius: var(--radius-chip);
  border: var(--size-hairline) solid transparent;
  font-family: var(--t-label-family); font-size: var(--t-label-size); font-weight: var(--t-label-weight);
  text-decoration: none; user-select: none;
  background: var(--c-green-soft); color: var(--c-ink);
}
.v2-btn[data-kind="primary"] { background: var(--c-green); color: var(--c-on-green); }
.v2-btn[data-kind="quiet"] { background: transparent; color: var(--c-green); }
.v2-btn[data-kind="outline"] { background: transparent; border-color: var(--c-line); color: var(--c-ink); }
.v2-btn[disabled], .v2-btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.v2-btn[data-block] { width: 100%; }
.v2-icon-btn {
  display: inline-grid; place-items: center;
  width: var(--size-touch-target); height: var(--size-touch-target);
  border-radius: var(--radius-chip); border: 0; background: transparent; color: var(--c-ink);
}
.v2-icon-btn svg { width: 22px; height: 22px; }

/* Cards */
.v2-card {
  background: var(--c-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: var(--size-hairline) solid var(--c-line);
  padding: var(--space-6);
}
.v2-card-link { display: block; color: inherit; text-decoration: none; }
.v2-row {
  display: flex; align-items: center; gap: var(--space-4);
  min-height: 64px; padding: var(--space-4) var(--space-5);
  background: var(--c-surface); border: var(--size-hairline) solid var(--c-line);
  border-radius: var(--radius-control); color: var(--c-ink); text-decoration: none;
}
.v2-row + .v2-row { margin-top: var(--space-2); }
/* The first-run invitation is in the server's HTML; a returning reader's device hides it before paint. */
html[data-returning] .v2-invite { display: none; }
.v2-row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.v2-row svg { width: 22px; height: 22px; color: var(--c-green); flex: none; }

/* Daily Bread card */
.v2-bread { position: relative; overflow: hidden; padding: var(--space-7) var(--space-6) var(--space-6); }
.v2-bread-eyebrow { display: flex; align-items: center; gap: var(--space-2); color: var(--c-green); font-weight: 600; font-size: var(--t-meta-size); margin: 0 0 var(--space-3); }
.v2-bread-eyebrow svg { width: 18px; height: 18px; }
.v2-bread h2 { margin-bottom: var(--space-2); }
.v2-bread-ref { margin-bottom: var(--space-4); }
.v2-bread-verse { color: var(--c-ink); margin: 0 0 var(--space-6); font-size: 18px; line-height: 1.6; }
.v2-bread-actions { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.v2-bread[data-done="true"] .v2-bread-eyebrow { color: var(--c-ink-2); }

/* Lamps */
.v2-lamps { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--size-lamp-gap); flex-wrap: wrap; }
.v2-lamp { display: grid; justify-items: center; gap: var(--space-1); }
.v2-lamp-mark {
  width: var(--size-lamp); height: var(--size-lamp); border-radius: var(--radius-lamp);
  border: 2px solid var(--c-lamp-off); display: grid; place-items: center;
}
.v2-lamp-mark svg { width: 16px; height: 16px; opacity: 0; }
.v2-lamp[data-lit="true"] .v2-lamp-mark { background: var(--c-lamp); border-color: var(--c-lamp-edge); color: var(--c-lamp-ink); }
.v2-lamp[data-lit="true"] .v2-lamp-mark svg { opacity: 1; }
.v2-lamp[data-today="true"] .v2-lamp-day { color: var(--c-ink); font-weight: 700; }
.v2-lamp-day { font-size: var(--t-caption-size); color: var(--c-ink-2); font-weight: 600; }

/* Session */
.v2-session {
  position: fixed; inset: 0; z-index: var(--layer-sheet);
  background: var(--c-ground); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
}
.v2-session-top {
  position: sticky; top: 0; z-index: 2; background: var(--c-ground);
  display: flex; align-items: center; gap: var(--space-3);
  padding: calc(var(--space-3) + env(safe-area-inset-top)) var(--size-page-gutter) var(--space-3);
}
.v2-progress { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.v2-seg { position: relative; height: 6px; border-radius: 6px; background: var(--c-line); overflow: hidden; }
.v2-seg-fill { position: absolute; inset: 0; background: var(--c-green); transform-origin: left center; transform: scaleX(0); }
.v2-seg[data-done="true"] .v2-seg-fill { transform: scaleX(1); }
.v2-seg-glint { position: absolute; top: 0; bottom: 0; width: 28px; left: -28px; background: linear-gradient(90deg, transparent, var(--c-glint), transparent); opacity: 0; }
.v2-flame { position: relative; width: var(--size-touch-target); height: var(--size-touch-target); display: grid; place-items: center; flex: none; }
.v2-flame-glow { position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle, var(--c-lamp) 0%, transparent 70%); opacity: 0.3; }
.v2-flame svg { position: relative; width: 24px; height: 24px; color: var(--c-lamp-edge); fill: var(--c-lamp); }
.v2-session-body { flex: 1; width: 100%; max-width: var(--size-page-max-width); margin: 0 auto; padding: var(--space-5) var(--size-page-gutter) calc(var(--space-9) + env(safe-area-inset-bottom)); }
.v2-step { display: grid; gap: var(--space-5); }
.v2-step-label { color: var(--c-green); font-weight: 600; font-size: var(--t-meta-size); margin: 0; }
.v2-passage p { margin: 0 0 var(--space-4); }
.v2-vnum { font-family: var(--font-interface); font-size: var(--t-verse-number-size); font-weight: var(--t-verse-number-weight); color: var(--c-ink-2); vertical-align: super; margin-right: 3px; line-height: 0; }
.v2-note-box { background: var(--c-green-soft); border-radius: var(--radius-control); padding: var(--space-4) var(--space-5); color: var(--c-ink); }
.v2-textarea {
  width: 100%; min-height: 120px; resize: vertical;
  background: var(--c-raised); color: var(--c-ink);
  border: var(--size-hairline) solid var(--c-line); border-radius: var(--radius-control);
  padding: var(--space-4); font-size: var(--t-body-size); line-height: var(--t-body-line);
}
.v2-input {
  width: 100%; min-height: var(--size-touch-target);
  background: var(--c-raised); color: var(--c-ink);
  border: var(--size-hairline) solid var(--c-line); border-radius: var(--radius-control);
  padding: 0 var(--space-4);
}
.v2-check { display: flex; align-items: center; gap: var(--space-3); min-height: var(--size-touch-target); }
.v2-check input { width: 22px; height: 22px; accent-color: var(--c-green); }
.v2-prayer { font-style: italic; }

/* Finish */
.v2-finish { position: relative; display: grid; justify-items: center; text-align: center; gap: var(--space-4); padding-top: var(--space-7); }
.v2-burst { position: relative; width: 240px; height: 240px; display: grid; place-items: center; }
.v2-burst > * { position: absolute; }
.v2-bloom { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--c-lamp) 0%, transparent 68%); opacity: 0.32; }
.v2-ring { width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--c-lamp); opacity: 0; }
.v2-rays { width: 260px; height: 260px; opacity: 0; }
.v2-rays line { stroke: var(--c-lamp); stroke-width: 3; stroke-linecap: round; opacity: 0.28; }
.v2-finish-flame { width: 64px; height: 64px; color: var(--c-lamp-edge); }
.v2-finish-flame svg { width: 64px; height: 64px; fill: var(--c-lamp); }
.v2-finish-title { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 0.28em; }
.v2-finish-title span { display: inline-block; }
.v2-week-count { font-weight: 600; color: var(--c-ink); }
.v2-finish-actions { display: grid; gap: var(--space-3); width: 100%; max-width: 360px; margin-top: var(--space-4); }
.v2-signin { width: 100%; max-width: 420px; text-align: left; margin-top: var(--space-5); }

/* Effects */
#v2-effects { position: fixed; inset: 0; pointer-events: none; z-index: var(--layer-celebration); overflow: hidden; }
.v2-spark { position: absolute; border-radius: 50%; will-change: transform, opacity; }
.v2-particle { position: absolute; will-change: transform, opacity; }

/* Sheets */
.v2-scrim { position: fixed; inset: 0; background: var(--c-scrim); z-index: var(--layer-scrim); }
.v2-sheet {
  position: fixed; left: 0; right: 0; z-index: var(--layer-sheet);
  bottom: var(--ww-keyboard-inset, 0px);
  margin: 0 auto; width: 100%; max-width: var(--size-page-max-width);
  /* The visual viewport, so an open keyboard shortens the sheet instead of covering its foot. */
  max-height: calc(var(--ww-visible-height, 100dvh) * var(--size-sheet-max-height-fraction));
  display: flex; flex-direction: column;
  background: var(--c-raised); color: var(--c-ink);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: var(--shadow-sheet);
  padding-bottom: env(safe-area-inset-bottom);
}
/* The tail: extra surface below the sheet so the rise's overshoot never shows a gap. */
.v2-sheet::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--size-sheet-tail); background: var(--c-raised); }
.v2-sheet-handle { display: grid; place-items: center; height: 28px; touch-action: none; cursor: grab; flex: none; }
.v2-sheet-handle span { width: var(--size-sheet-handle-width); height: var(--size-sheet-handle-height); border-radius: 3px; background: var(--c-line); }
.v2-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 0 var(--space-3) var(--space-2) var(--space-6); touch-action: none; flex: none; }
.v2-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--space-6) var(--space-6); }

/* Reader */
.v2-reader-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-5); }
.v2-chooser { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--size-touch-target); padding: 0 var(--space-3); border: 0; background: transparent; border-radius: var(--radius-control); }
.v2-chooser svg { width: 18px; height: 18px; color: var(--c-ink-2); }
.v2-chapter { max-width: var(--measure-scripture); }
.v2-chapter p { margin: 0 0 var(--space-4); }
.v2-verse { cursor: pointer; border-radius: 4px; transition: none; }
.v2-verse[data-selected="true"] { text-decoration: underline; text-decoration-color: var(--c-green); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.v2-verse[data-highlighted="true"] .v2-verse-text, .v2-verse-text.v2-sweeping {
  background-image: linear-gradient(var(--c-highlight), var(--c-highlight));
  background-repeat: no-repeat; background-size: 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.v2-verse-text.v2-sweeping { background-size: 0% 100%; }
.v2-verse[data-noted="true"] .v2-vnum { color: var(--c-green); }
.v2-flash { position: relative; }
.v2-flash-layer { position: absolute; inset: -2px -4px; border-radius: 6px; background: var(--c-highlight); pointer-events: none; opacity: 0; }
.v2-chapter-nav { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-7); }
.v2-attrib { margin-top: var(--space-6); }
.v2-versebar {
  position: fixed; left: 50%; bottom: calc(var(--size-tab-bar-height) + var(--space-3) + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: var(--layer-verse-bar);
  display: flex; gap: var(--space-1); padding: var(--space-1);
  background: var(--c-raised); border: var(--size-hairline) solid var(--c-line);
  border-radius: var(--radius-chip); box-shadow: var(--shadow-sheet);
  max-width: calc(100vw - 2 * var(--space-3)); overflow-x: auto;
}
.v2-versebar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 56px; min-height: 52px; padding: 0 var(--space-1);
  border: 0; background: transparent; border-radius: var(--radius-control);
  font-size: var(--t-caption-size); font-weight: 600; color: var(--c-ink);
}
.v2-versebar button svg { width: 20px; height: 20px; color: var(--c-green); }
.v2-versebar button[aria-pressed="true"] { background: var(--c-green-soft); }
@media (min-width: 900px) { .v2-versebar { bottom: var(--space-6); } }
.v2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: var(--space-2); }
.v2-grid a, .v2-grid button { min-height: var(--size-touch-target); display: grid; place-items: center; border-radius: var(--radius-control); background: var(--c-surface); border: var(--size-hairline) solid var(--c-line); color: var(--c-ink); text-decoration: none; font-weight: 600; }
.v2-grid [aria-current="true"] { background: var(--c-green); color: var(--c-on-green); border-color: var(--c-green); }
.v2-books { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--space-3); }
.v2-books a { display: flex; align-items: center; min-height: var(--size-touch-target); padding: 0 var(--space-3); border-radius: var(--radius-control); color: var(--c-ink); text-decoration: none; break-inside: avoid; }
.v2-books a[aria-current="true"] { background: var(--c-green-soft); font-weight: 600; }
.v2-size { display: flex; align-items: center; gap: var(--space-3); }

/* Philip */
/* The transcript scrolls. The composer is the flex sibling under that scroller,
   so it stays put and cannot cover the doctrine footer, at any text size. */
.v2-sheet-body:has(.v2-philip) {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
  overflow: hidden; padding-bottom: 0;
}
.v2-philip { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: 100%; }
.v2-philip-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.v2-philip-end { height: var(--space-4); }
.v2-chat { display: grid; gap: var(--space-4); padding-bottom: var(--space-4); }
.v2-msg { max-width: 92%; padding: var(--space-3) var(--space-4); border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.v2-msg[data-role="user"] { justify-self: end; background: var(--c-green); color: var(--c-on-green); border-bottom-right-radius: 6px; }
.v2-msg[data-role="assistant"] { justify-self: start; background: var(--c-surface); border: var(--size-hairline) solid var(--c-line); border-bottom-left-radius: 6px; }
.v2-cite {
  display: inline; padding: 0 2px; border: 0; background: transparent; color: var(--c-green);
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  min-height: 0;
}
.v2-chat-form { display: flex; gap: var(--space-2); align-items: flex-end; position: sticky; bottom: 0; background: var(--c-raised); padding-top: var(--space-3); }
.v2-philip .v2-chat-form { position: static; flex: none; bottom: auto; padding-bottom: var(--space-6); }
.v2-chat-form textarea { min-height: var(--size-touch-target); max-height: 160px; flex: 1; resize: none; padding: var(--space-3) var(--space-4); }
.v2-help-inline { margin-top: var(--space-3); }

/* Toast */
.v2-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--size-tab-bar-height) + var(--space-5) + env(safe-area-inset-bottom));
  z-index: var(--layer-toast); background: var(--c-ink); color: var(--c-ground);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-chip); font-weight: 600;
  max-width: calc(100vw - 2 * var(--space-5));
}

/* Install offer: sits just above the tab bar, under the verse bar and any sheet. */
.v2-install {
  position: fixed; left: var(--space-4); right: var(--space-4);
  bottom: calc(var(--size-tab-bar-height) + var(--space-3) + env(safe-area-inset-bottom));
  z-index: var(--layer-tab-bar); margin: 0 auto; max-width: 480px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  background: var(--c-raised); color: var(--c-ink);
  border: var(--size-hairline) solid var(--c-line); border-radius: var(--radius-card);
  box-shadow: var(--shadow-sheet); padding: var(--space-4);
}
.v2-install-text { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; }
.v2-install-actions { display: flex; gap: var(--space-2); margin-left: auto; }
@media (min-width: 900px) { .v2-install { left: auto; right: var(--space-6); bottom: var(--space-6); margin: 0; } }

/* Help sheet and care */
.v2-help p { margin: 0 0 var(--space-4); }
.v2-help-btn { position: fixed; right: var(--space-4); top: calc(var(--space-3) + env(safe-area-inset-top)); z-index: var(--layer-verse-bar); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
.v2-help-btn ~ .v2-main { padding-top: calc(var(--space-6) + var(--size-touch-target) + var(--space-3)); }
@media (min-width: 900px) {
  .v2-help-btn { top: calc(var(--size-tab-bar-height) + var(--space-3)); }
  .v2-help-btn ~ .v2-main { padding-top: calc(var(--size-tab-bar-height) + var(--space-7) + var(--size-touch-target)); }
}
.v2-note-box summary svg, .v2-btn svg { width: 20px; height: 20px; flex: none; }
.v2-note-box summary::-webkit-details-marker { display: none; }
.v2-brand { display: inline-flex; align-items: center; min-height: var(--size-touch-target); }
.v2-reader-head h1 .v2-chooser { font: inherit; }

/* Explore */
.v2-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.v2-explore-section { padding-top: var(--space-7); scroll-margin-top: var(--space-4); }
.v2-explore-section > .t-meta { margin-top: var(--space-1); }
.v2-sub { margin: var(--space-6) 0 var(--space-3); }
.v2-shelf { list-style: none; margin: 0 calc(-1 * var(--size-page-gutter)); padding: 0 var(--size-page-gutter) var(--space-2); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 68%); gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.v2-shelf li { scroll-snap-align: start; }
.v2-video-card { width: 100%; display: grid; gap: var(--space-1); text-align: left; padding: 0; border: 0; background: transparent; color: var(--c-ink); }
.v2-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-control); overflow: hidden; background: var(--c-surface); border: var(--size-hairline) solid var(--c-line); margin-bottom: var(--space-2); }
.v2-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v2-play { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--c-raised); color: var(--c-green); box-shadow: var(--shadow-card); }
.v2-play svg { width: 18px; height: 18px; }
.v2-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-control); overflow: hidden; background: var(--c-surface); border: var(--size-hairline) solid var(--c-line); }
.v2-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* You */
.v2-you-section { padding-top: var(--space-7); }
.v2-you-section > h2 { margin-bottom: var(--space-3); }
.v2-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.v2-stats li { background: var(--c-green-soft); color: var(--c-ink); border-radius: var(--radius-chip); padding: var(--space-2) var(--space-4); }
.v2-check input[role="switch"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 52px; height: 44px; position: relative; cursor: pointer; background: transparent;
}
.v2-check input[role="switch"]::before {
  content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 26px; border-radius: 13px;
  background: var(--c-line); border: 2px solid var(--c-lamp-off);
}
.v2-check input[role="switch"]::after {
  content: ""; position: absolute; top: 14px; left: 5px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--c-lamp-off); transition: transform 160ms cubic-bezier(0.2, 0, 0, 1);
}
.v2-check input[role="switch"]:checked::before { background: var(--c-green); border-color: var(--c-green); }
.v2-check input[role="switch"]:checked::after { background: var(--c-on-green); transform: translateX(22px); }
.v2-check input[role="switch"]:focus-visible { outline: var(--size-focus-ring-width) solid var(--c-focus); outline-offset: 2px; border-radius: 16px; }
.v2-check input[role="switch"]:disabled { cursor: not-allowed; opacity: 0.45; }
@media (prefers-reduced-motion: reduce) { .v2-check input[role="switch"]::after { transition: none; } }
.v2-care-passage { margin-top: var(--space-3); }
.v2-care-passage summary { min-height: var(--size-touch-target); display: flex; align-items: center; color: var(--c-green); cursor: pointer; }

/* Reader: translations and the printed layout of a chapter */
.v2-translation { padding: 0 var(--space-2); margin-left: calc(-1 * var(--space-2)); color: var(--c-ink-2); }
.v2-translations { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.v2-translations a { display: grid; gap: 2px; min-height: var(--size-touch-target); padding: var(--space-3); border-radius: var(--radius-control); color: var(--c-ink); text-decoration: none; }
.v2-translations a[aria-current="true"] { background: var(--c-green-soft); }
.v2-chapter .v2-blk-heading { font-family: var(--font-interface); color: var(--c-ink); margin: var(--space-6) 0 var(--space-3); }
.v2-chapter .v2-blk-heading:first-child { margin-top: 0; }
.v2-chapter .v2-blk-ref { margin: calc(-1 * var(--space-2)) 0 var(--space-3); }
.v2-chapter .v2-blk-d { font-style: italic; color: var(--c-ink-2); }
.v2-chapter .v2-blk-q { margin: 0; padding-left: 1.5em; text-indent: -1.5em; }
.v2-chapter .v2-blk-q2, .v2-chapter .v2-blk-li2 { padding-left: 3em; }
.v2-chapter .v2-blk-qr { text-align: right; }
.v2-chapter .v2-blk-pc { text-align: center; }
.v2-chapter .v2-blk-pi, .v2-chapter .v2-blk-li { padding-left: 1.5em; }
.v2-chapter .v2-blk-li, .v2-chapter .v2-blk-li2 { margin-bottom: var(--space-1); }
.v2-chapter .v2-blk-q + .v2-blk:not(.v2-blk-q), .v2-chapter .v2-blk-li + .v2-blk:not(.v2-blk-li):not(.v2-blk-li2) { margin-top: var(--space-4); }
.v2-blk-break { height: var(--space-4); }
.v2-wj { color: var(--c-words-of-jesus); }
.v2-supplied, .v2-selah { font-style: italic; }
.v2-divine { font-variant-caps: small-caps; letter-spacing: 0.02em; }

/* Notebook */
.v2-notebook-group { margin-top: var(--space-5); }
.v2-notebook-group > h3 { margin: 0 0 var(--space-2); }
.v2-notebook-text { font-family: var(--font-scripture); color: var(--c-ink); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.v2-notebook-note { white-space: pre-wrap; margin: 2px 0 0; }

/* Depth Dial */
.v2-depth { gap: var(--space-1); padding: 0 var(--space-2); color: var(--c-ink-2); }
.v2-depth-num { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: var(--radius-chip); background: var(--c-green-soft); color: var(--c-ink); font-family: var(--font-interface); font-size: var(--t-caption-size); font-weight: 600; }
.v2-depth-now { display: flex; align-items: baseline; gap: var(--space-3); }
.v2-depth-range { width: 100%; min-height: var(--size-touch-target); accent-color: var(--c-green); }
.v2-depth-bands { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.v2-depth-bands button { display: grid; gap: 2px; width: 100%; text-align: left; min-height: var(--size-touch-target); padding: var(--space-3); border: var(--size-hairline) solid var(--c-line); border-radius: var(--radius-control); background: transparent; color: var(--c-ink); }
.v2-depth-bands button[data-on="true"] { border-color: var(--c-green); }
.v2-depth-bands button[aria-pressed="true"] { background: var(--c-green-soft); }
.v2-depth-card { display: grid; gap: var(--space-3); margin: var(--space-5) 0; padding: var(--space-5); max-width: var(--measure-scripture); }
.v2-chapter-guide p, .v2-chapter-guide h2, .v2-chapter-guide h3 { margin: 0; }
.v2-chapter-guide-questions { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-2); }
.v2-depth-people { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-1); }
.v2-depth-people summary { min-height: var(--size-touch-target); display: flex; align-items: center; cursor: pointer; }
.v2-depth-people details p { margin: 0 0 var(--space-2); }
.v2-depth-verses { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-2); }
.v2-depth-verses .v2-btn { min-height: var(--size-touch-target); padding: 0 var(--space-3); }
.v2-depth-words { margin: 0 0 var(--space-3); }
.v2-depth-words button { font: inherit; color: var(--c-green); background: transparent; border: 0; padding: 2px 0; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.v2-depth-words button[aria-pressed="true"] { background: var(--c-green-soft); border-radius: 4px; text-decoration-style: solid; }

/* First-run */
.v2-first-run-progress { margin-top: var(--space-2); max-width: 240px; }
.v2-first-run-progress span { height: 4px; border-radius: 2px; background: var(--c-line); }
.v2-first-run-progress span[data-on="true"] { background: var(--c-green); }
.v2-first-run-choices { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.v2-first-run-choice { display: flex; align-items: center; gap: var(--space-3); min-height: var(--size-touch-target); padding: var(--space-4); border: var(--size-hairline) solid var(--c-line); border-radius: var(--radius-control); background: var(--c-surface); cursor: pointer; }
.v2-first-run-choice[data-on="true"] { border-color: var(--c-green); background: var(--c-green-soft); }
.v2-first-run-choice input { width: 22px; height: 22px; flex: none; accent-color: var(--c-green); }
.v2-first-run-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.v2-first-run-title { margin: var(--space-5) 0 var(--space-4); }
.v2-first-run-title:focus { outline: none; }
/* Prayers */
.v2-prayer-private { display: flex; gap: var(--space-2); align-items: flex-start; margin-top: var(--space-3); }
.v2-prayer-private svg { width: 18px; height: 18px; margin-top: 2px; flex: none; color: var(--c-green); }
.v2-prayer-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.v2-prayer-tabs [role="tab"] {
  min-height: var(--size-touch-target);
  padding: 0 var(--space-4);
  border-radius: var(--radius-chip);
  border: var(--size-hairline) solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-ink);
  font: inherit;
  font-weight: 600;
}
.v2-prayer-tabs [role="tab"][aria-selected="true"] { background: var(--c-green); color: var(--c-on-green); border-color: var(--c-green); }
.v2-prayer-tabs [role="tab"]:focus-visible { outline: var(--size-focus-ring-width) solid var(--c-focus); outline-offset: 2px; }
.v2-prayer-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.v2-field { display: grid; gap: var(--space-2); min-width: 0; }
.v2-prayer-body, .v2-prayer-note, .v2-card h3 { overflow-wrap: anywhere; }
.v2-prayer-body, .v2-prayer-note { white-space: pre-wrap; }
.v2-timeline { list-style: none; margin: 0; padding: 0 0 0 var(--space-5); display: grid; gap: var(--space-4); border-left: 2px solid var(--c-line); }
.v2-timeline > li { position: relative; min-width: 0; }
.v2-timeline > li::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: calc(-1 * var(--space-5) - 5px);
  top: var(--space-6);
  border-radius: 50%;
  background: var(--c-green);
}

/* Scripture memory */
.v2-memory-tr { margin-left: var(--space-1); font-weight: 600; white-space: nowrap; }
.v2-memory-summary { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.v2-memory-card h3, .v2-memory-practice h2 { overflow-wrap: anywhere; }
.v2-memory-text { margin: var(--space-2) 0; overflow-wrap: anywhere; }
.v2-memory-peek { margin-top: var(--space-2); }
.v2-memory-peek summary { display: flex; align-items: center; min-height: var(--size-touch-target); color: var(--c-green); cursor: pointer; }
.v2-memory-peek summary:focus-visible { outline: var(--size-focus-ring-width) solid var(--c-focus); outline-offset: 2px; border-radius: var(--radius-control); }
.v2-memory-practice:focus { outline: none; }
.v2-memory-input { width: 100%; min-height: 9em; font-family: var(--font-scripture); line-height: 1.6; }
/* Seven verse actions fit a 390px screen without scrolling the bar. */
@media (max-width: 440px) {
  /* Sized by its labels, not by the half screen to the right of its left edge, so a label wraps only when the bar is full. */
  .v2-versebar { gap: 0; width: max-content; }
  .v2-versebar button { min-width: 46px; max-width: 64px; padding: 0 1px; font-size: 11px; letter-spacing: 0; }
}
