/* Netangel: two looks (classic for 18+, bright for 12–18), each with light and dark. */

:root {
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-read: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-display: var(--font-read);
  --radius: 10px;
  --radius-lg: 14px;
  --read-scale: 1;
  --top-h: 56px;
  --nav-w: 224px;
}

/* Netangel brand: navy #1d3557 and gold #e9b44c, taken from the logo. */

/* ---------- Classic look (18+) ---------- */
:root, [data-look="classic"] {
  --bg: #f6f3ec; --surface: #fffdf9; --surface-2: #ece7dc; --line: #ddd6c8;
  --ink: #1e2330; --ink-2: #4e5566; --ink-3: #697080;
  --accent: #1d3557; --accent-ink: #ffffff; --accent-soft: #e2e8f1;
  --gold: #b8862b; --danger: #a33a2c; --jesus: #9e2f27;
  --hero-bg: linear-gradient(160deg, #fffdf9, #ede6d6); --hero-ink: var(--ink);
  --shadow: 0 1px 2px rgba(29, 53, 87, .06), 0 6px 18px rgba(29, 53, 87, .07);
}
[data-look="classic"][data-theme="dark"] {
  --bg: #11172a; --surface: #182136; --surface-2: #202b43; --line: #2d3953;
  --ink: #ece8df; --ink-2: #bcc2cf; --ink-3: #8e96a8;
  --accent: #e9b44c; --accent-ink: #1b1608; --accent-soft: #3a3220;
  --gold: #e9b44c; --danger: #e48a7d; --jesus: #e8958c;
  --hero-bg: linear-gradient(160deg, #1b2540, #141c30);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
}

/* ---------- Bright look (12–18) ---------- */
[data-look="bright"] {
  --font-read: var(--font-ui);
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 14px; --radius-lg: 22px;
  --bg: #f2f5fb; --surface: #ffffff; --surface-2: #e8eef8; --line: #dce4f0;
  --ink: #14213d; --ink-2: #45526e; --ink-3: #626e89;
  --accent: #2456c8; --accent-ink: #ffffff; --accent-soft: #e1eafb;
  --gold: #e9a21f; --danger: #d0304a; --jesus: #c42a61;
  --hero-bg: linear-gradient(135deg, #1d3557 0%, #2456c8 100%); --hero-ink: #ffffff;
  --shadow: 0 1px 2px rgba(20, 40, 80, .06), 0 8px 24px rgba(20, 40, 80, .08);
}
[data-look="bright"][data-theme="dark"] {
  --bg: #0c1324; --surface: #141d33; --surface-2: #1c2742; --line: #283554;
  --ink: #eef2fb; --ink-2: #b6c0d8; --ink-3: #8a96b2;
  --accent: #f2c14e; --accent-ink: #1b1606; --accent-soft: #3a3218;
  --gold: #f2c14e; --danger: #ff7d8f; --jesus: #ff8fb6;
  --hero-bg: linear-gradient(135deg, #16294a 0%, #1f4aa8 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.ico {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Shell: top bar, navigation, main area ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 0 16px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top-actions { display: flex; gap: 2px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; border-radius: 10px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-decoration: none;
}
.nav a .ico { width: 24px; height: 24px; }
.nav a.active { color: var(--accent); }
/* Help, About and Settings are in the left menu on computers; phones use the top bar buttons instead. */
.nav .brand, .nav .nav-extra { display: none; }
/* Seven items in the bottom bar: a little smaller on narrow phones so every label fits. */
@media (max-width: 430px) {
  .nav { padding-left: 2px; padding-right: 2px; }
  .nav a { font-size: 10.5px; letter-spacing: -.01em; }
  .nav a .ico { width: 22px; height: 22px; }
}

#view {
  max-width: 760px; margin: 0 auto;
  padding: 16px 16px calc(100px + env(safe-area-inset-bottom));
}
#view > * + * { margin-top: 16px; }
#view[data-view="compare"] { max-width: 1120px; }

@media (min-width: 900px) {
  .topbar { display: none; }
  .nav {
    top: 0; right: auto; width: var(--nav-w);
    flex-direction: column; justify-content: flex-start; gap: 2px;
    padding: 22px 12px; border-top: 0; border-right: 1px solid var(--line);
  }
  .nav a { flex: none; flex-direction: row; gap: 12px; padding: 10px 12px; font-size: 15px; color: var(--ink-2); }
  .nav a .ico { width: 20px; height: 20px; }
  .nav a.active { background: var(--accent-soft); color: var(--ink); }
  .nav a.active .ico { color: var(--accent); }
  .nav .brand { display: flex; margin: 0 0 22px 8px; padding: 0; font-size: 22px; color: var(--ink); }
  .nav .nav-extra { display: flex; }
  .nav .nav-push { margin-top: auto; }
  .shell { padding-left: var(--nav-w); }
  #view { padding: 32px 32px 64px; }
}

body.in-setup .nav, body.in-setup .topbar { display: none; }
body.in-setup .shell { padding-left: 0; }
body.in-setup #view { padding: 0; max-width: none; }

/* ---------- Text helpers ---------- */
.page-title {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  margin: 4px 0 6px; letter-spacing: -.01em;
}
[data-look="bright"] .page-title { font-weight: 800; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head .page-title { margin-bottom: 2px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14px; }
.block { display: block; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 8px; }
.error { color: var(--danger); font-size: 14px; margin: 6px 0 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 6px;
}
.note-box { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.6;
  padding: 1px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent);
}

/* ---------- Buttons and controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.primary.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.btn .ico { width: 18px; height: 18px; }
[data-look="bright"] .btn { border-radius: 999px; }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .ico { width: 22px; height: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.chip .ico { width: 15px; height: 15px; stroke-width: 3; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

.seg { display: flex; gap: 3px; padding: 3px; background: var(--surface-2); border-radius: var(--radius); }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 8px 10px; cursor: pointer;
  border-radius: calc(var(--radius) - 3px); font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

.field { display: block; }
.field > .label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field > .hint { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
input:not([type="checkbox"]):not([type="range"]):not([type="file"]), select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; min-height: 44px;
}
select { cursor: pointer; }
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; cursor: pointer; }
.switch-row .text { display: flex; flex-direction: column; }
input.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s;
}
input.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s;
}
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(18px); }

/* Option lists (versions, plans, levels) */
.opt, .choice {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.opt { border-width: 1px; padding: 12px 14px; border-radius: var(--radius); }
.opt:hover, .choice:hover { border-color: var(--ink-3); }
.opt.on, .choice.on { border-color: var(--accent); background: var(--accent-soft); }
.opt .abbr { min-width: 66px; font-weight: 800; color: var(--accent); padding-top: 1px; white-space: nowrap; }
.choice { flex-direction: column; gap: 4px; }
.choice-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.choice-top b { font-size: 17px; }
.choice-emoji { font-size: 22px; line-height: 1; }

/* Progress bar */
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; min-width: 4px; }
[data-look="bright"] .bar > i { background: linear-gradient(90deg, var(--accent), var(--gold)); }

/* Loading placeholder */
.skel {
  display: block; height: .9em; margin: .7em 0; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2));
  background-size: 200% 100%; animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Today ---------- */
.hero {
  background: var(--hero-bg); color: var(--hero-ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 20px; box-shadow: var(--shadow);
}
[data-look="bright"] .hero { border: 0; }
.hero .page-title { margin: 2px 0 4px; }
.hero-date { font-size: 14px; opacity: .8; margin: 0; }
.hero-sub { opacity: .92; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
[data-look="bright"] .hero .stat { background: rgba(255, 255, 255, .16); }
.stat b { display: block; font-size: 20px; line-height: 1.2; white-space: nowrap; }
.stat span { display: block; font-size: 12.5px; opacity: .85; }

.bar-label { margin: 6px 0 0; }
.readings { margin-top: 10px; }
.reading { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.reading:first-child { border-top: 0; }
.reading-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reading.done .reading-main b { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.tick {
  width: 30px; height: 30px; flex: none; padding: 0; cursor: pointer;
  display: inline-grid; place-items: center;
  border-radius: 50%; border: 2px solid var(--ink-3); background: transparent; color: transparent;
}
.tick .ico { width: 16px; height: 16px; stroke-width: 3; }
.tick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.think { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.qs { margin: 0; padding-left: 22px; }
.qs li { margin: 6px 0; }
.qs li::marker { color: var(--accent); font-weight: 700; }

.votd-text { font-family: var(--font-read); font-size: calc(19px * var(--read-scale)); line-height: 1.6; margin: 4px 0 12px; }
.votd-ref { font-weight: 700; color: var(--accent); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.badge { text-align: center; padding: 14px 8px; border-radius: var(--radius); background: var(--surface-2); }
.badge .e { display: block; font-size: 32px; line-height: 1.1; }
.badge b { display: block; font-size: 13.5px; margin-top: 6px; line-height: 1.25; }
.badge span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.3; }
.badge.locked .e { filter: grayscale(1); opacity: .35; }
.badge.locked b { color: var(--ink-3); }
.badge-strip { display: flex; gap: 6px; font-size: 26px; line-height: 1; }

/* ---------- Plan ---------- */
.day-list { display: flex; flex-direction: column; padding: 6px; }
.day-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: inherit; cursor: pointer;
}
.day-row:last-child { border-bottom: 0; }
.day-row:hover { background: var(--surface-2); }
.day-num { width: 62px; flex: none; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.day-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.day-label { font-weight: 600; }
.day-row.done .day-label { color: var(--ink-2); }
.day-row.done .day-num { color: var(--accent); }
.day-row.catch .day-label { font-style: italic; color: var(--ink-2); font-weight: 500; }
.day-row.current { background: var(--accent-soft); border-radius: var(--radius); }
.day-row .tick { pointer-events: none; width: 26px; height: 26px; }

/* ---------- Reader ---------- */
.reader-head {
  position: sticky; top: var(--top-h); z-index: 10;
  display: flex; align-items: center; gap: 6px;
  margin: -16px -16px 0; padding: 8px 10px 8px 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .reader-head { top: 0; margin: -32px -32px 0; padding: 12px 32px 12px 26px; }
}
.ref-btn {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0;
  border: 0; background: transparent; cursor: pointer; color: var(--ink);
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  padding: 4px 8px; border-radius: 8px; white-space: nowrap;
}
.ref-btn:hover { background: var(--surface-2); }
.ref-btn { flex: 0 1 auto; }
.ref-btn span { overflow: hidden; text-overflow: ellipsis; }
.listen-btn.on, .listen-btn.on:hover { background: var(--accent); color: var(--accent-ink); }
.listen-btn:disabled { opacity: .35; cursor: default; }
.listen-btn.unavailable { opacity: .45; }
.verse.speaking { background: color-mix(in srgb, var(--gold) 28%, transparent); }
.ref-btn .ico { width: 18px; height: 18px; color: var(--ink-3); }
.aa { font-family: var(--font-read); font-weight: 700; font-size: 17px; }

.chap-head { text-align: center; margin: 22px 0 18px; }
.chap-head small { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.chap-head span { display: block; font-family: var(--font-display); font-size: 46px; line-height: 1.1; color: var(--accent); font-weight: 700; }

.passage { font-family: var(--font-read); font-size: calc(19px * var(--read-scale)); line-height: 1.75; }
[data-look="bright"] .passage { line-height: 1.7; }
.passage .para { margin: 0 0 .9em; }
.p-heading { font-family: var(--font-ui); font-size: calc(15px * var(--read-scale)); font-weight: 700; color: var(--ink-2); margin: 1.5em 0 .5em; }
.p-heading:first-child { margin-top: 0; }
.p-subtitle { font-style: italic; color: var(--ink-2); font-size: .92em; margin: 0 0 .6em; }
.vn {
  font-family: var(--font-ui); font-size: .58em; font-weight: 700; color: var(--ink-3);
  vertical-align: super; line-height: 0; margin: 0 .3em 0 .1em; user-select: none;
}
.verse { cursor: pointer; border-radius: 4px; transition: background .15s; -webkit-tap-highlight-color: transparent; }
.verse.line { display: block; padding-left: calc(1.6em + var(--ind, 0) * 1.4em); text-indent: -1.6em; }
.verse.sel { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.verse.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 40% { background: color-mix(in srgb, var(--gold) 35%, transparent); } 100% { background: transparent; } }
.red-letters .woj { color: var(--jesus); }
.fn {
  font-family: var(--font-ui); font-size: .6em; font-weight: 800; color: var(--accent);
  vertical-align: super; line-height: 0; border: 0; background: none; padding: 0 .2em; cursor: pointer;
}
.note-dot {
  display: inline-block; width: .42em; height: .42em; border-radius: 50%;
  background: var(--gold); vertical-align: .55em; margin-right: .25em;
}

.parallel { display: flex; flex-direction: column; }
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.prow.phead { font-family: var(--font-ui); font-weight: 800; color: var(--accent); font-size: 14px; letter-spacing: .04em; cursor: default; }
.pcell { font-size: .94em; line-height: 1.6; }
@media (max-width: 600px) {
  .prow { grid-template-columns: 1fr; }
  .prow.phead { display: none; }
  .pcell.alt { color: var(--ink-2); margin-top: 4px; font-size: .88em; }
  .pcell.alt::before { content: attr(data-abbr) " · "; font-family: var(--font-ui); font-weight: 800; font-size: .8em; color: var(--accent); }
}

.reader-foot { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.btn.mark.is-done { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chap-nav { display: flex; justify-content: space-between; gap: 8px; }
.chap-nav .btn { padding: 0 10px; }
.credit { color: var(--ink-3); }
/* ---------- About and Help ---------- */
.about-hero { text-align: center; padding: 28px 20px; }
.about-hero img { border-radius: 18px; }
.about-hero h1 { margin: 12px 0 4px; font-family: var(--font-display); font-size: 30px; }
.about-hero .lead { margin: 0; color: var(--ink-2); font-size: 17px; }
.about-verse { margin: 16px auto 0; max-width: 420px; font-family: var(--font-read); font-style: italic; color: var(--ink-2); }
.about-verse span { display: block; margin-top: 4px; font: 600 13px var(--font-ui); font-style: normal; color: var(--accent); }
.feature-list, .menu-guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list .ico { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.about-grid p { margin: 4px 0 0; color: var(--ink-2); }
.menu-guide li { display: flex; gap: 12px; align-items: center; }
.menu-guide-ico {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.menu-guide-ico .ico { width: 20px; height: 20px; }
.faq { border-top: 1px solid var(--line); }
.faq:first-of-type { border-top: 0; }
.faq summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer;
  font-weight: 600; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 20px; font-weight: 400; color: var(--accent); }
.faq[open] summary::after { content: "−"; }
.faq ol, .faq p { margin: 0 0 14px; color: var(--ink-2); }
.faq ol { padding-left: 22px; }
.faq li + li { margin-top: 6px; }
.about-foot { text-align: center; }

/* Copyright line under a verse from a licensed version (NKJV, NIV). */
.licence { margin: 10px 0 0; font: normal 12px/1.4 var(--font-ui); color: var(--ink-3); }
.mini-note {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px;
}
.mini-note b { color: var(--accent); font-size: 14px; }
.mini-note span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.selbar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(78px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 2px; max-width: calc(100% - 20px);
  background: var(--ink); color: var(--bg); border-radius: 999px; padding: 5px 5px 5px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.selbar-ref { font-weight: 700; font-size: 14px; margin-right: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selbar button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: inherit;
  padding: 9px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.selbar button:hover { background: color-mix(in srgb, var(--bg) 16%, transparent); }
.selbar .ico { width: 17px; height: 17px; }
@media (max-width: 480px) {
  .selbar { padding-left: 14px; }
  .selbar button { flex-direction: column; gap: 1px; padding: 5px 8px; font-size: 10.5px; }
}
@media (min-width: 900px) { .selbar { bottom: 28px; left: calc(50% + var(--nav-w) / 2); } }

/* Book & chapter picker */
.go-form { display: flex; gap: 8px; }
.book-group h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 18px 0 8px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 6px; }
.book-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 6px; text-align: left;
  padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); font-size: 14.5px; cursor: pointer; color: var(--ink);
}
.book-btn:hover { border-color: var(--accent); }
.book-btn small { color: var(--ink-3); font-size: 11.5px; }
.book-btn.cur { border-color: var(--accent); background: var(--accent-soft); }
.book-btn.done small { color: var(--accent); font-weight: 700; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; margin-top: 10px; }
.ch-btn {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  text-decoration: none; font-weight: 600;
}
.ch-btn:hover { border-color: var(--accent); }
.ch-btn.read { background: var(--accent-soft); border-color: transparent; }
.ch-btn.cur { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- Compare ---------- */
.cmp-controls { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 640px) {
  .cmp-controls { grid-template-columns: 1fr 1fr; }
  .cmp-controls > :first-child, .cmp-controls > :nth-child(4) { grid-column: 1 / -1; }
}
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.cmp-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.cmp-head .abbr { font-weight: 800; color: var(--accent); letter-spacing: .02em; white-space: nowrap; }
.cmp-text { font-family: var(--font-read); font-size: calc(18px * var(--read-scale)); line-height: 1.6; margin: 0; }
.cmp-text .vn { font-size: .62em; }

/* ---------- Notes ---------- */
.note-card { cursor: pointer; }
.note-card:hover { border-color: var(--ink-3); }
.note-meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.note-ref { font-weight: 700; color: var(--accent); }
.note-ref.general { color: var(--ink-3); }
.ref-controls { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.note-vids { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.quote {
  margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-read); font-size: calc(17px * var(--read-scale)); line-height: 1.6;
}
.vthumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
  border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer;
}
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 14px;
  background: rgba(0, 0, 0, .72); display: grid; place-items: center; color: #fff;
}
.vthumb .play .ico { width: 26px; height: 26px; }
.vframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }
.vid-item { display: flex; gap: 10px; align-items: center; }
.vid-item img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.vid-item span { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }

/* ---------- Prayer ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; }
.topic {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 600; line-height: 1.25;
}
.topic:hover { border-color: var(--accent); }
.topic.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.topic-emoji { font-size: 22px; line-height: 1; flex: none; }
.part { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; }
.part-head { display: flex; align-items: center; gap: 8px; }
.part-num {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800;
}
.part-why { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 8px; }
textarea.part-text {
  min-height: 0; resize: none; overflow: hidden;
  font-family: var(--font-read); font-size: calc(17px * var(--read-scale)); line-height: 1.55;
}
.prayer-text {
  white-space: pre-wrap; overflow-wrap: anywhere; margin: 0;
  font-family: var(--font-read); font-size: calc(17px * var(--read-scale)); line-height: 1.6;
  background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px;
}
.prayer-item {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.prayer-item:hover { border-color: var(--ink-3); }
.prayer-item .topic-emoji { font-size: 24px; }
.prayer-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.help-box { border-left: 4px solid var(--danger); }
.how-pray summary { display: flex; align-items: center; cursor: pointer; list-style: none; }
.how-pray summary::-webkit-details-marker { display: none; }
.how-pray summary h2 { margin: 0; }
.how-pray summary::after { content: "Show"; margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent); }
.how-pray[open] summary::after { content: "Hide"; }
.tips { margin: 0; padding-left: 20px; }
.tips li { margin: 4px 0; }

/* ---------- Find encouragement ---------- */
.enc-message { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
.enc-verse { padding: 16px 0; border-top: 1px solid var(--line); }
.enc-verse:first-child { border-top: 0; padding-top: 4px; }
.enc-text { font-family: var(--font-read); font-size: calc(18px * var(--read-scale)); line-height: 1.6; margin: 0 0 6px; }
.enc-ref { font-weight: 700; color: var(--accent); font-size: 14px; margin: 0 0 2px; }
.enc-note { color: var(--ink-2); font-size: 14.5px; margin: 0 0 10px; }
a.topic { text-decoration: none; }
a.chip { text-decoration: none; }

/* ---------- Videos ---------- */
.subscribe { display: flex; gap: 16px; align-items: flex-start; border: 2px solid var(--gold); }
.subscribe-icon {
  width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: #c4302b; color: #fff;
}
.subscribe-icon .ico { width: 26px; height: 26px; }
.subscribe-text { flex: 1; min-width: 0; }
.subscribe-text h2 { margin: 2px 0 6px; }
.btn.yt { background: #c4302b; border-color: #c4302b; color: #fff; }
.btn.yt:hover { filter: brightness(1.08); }
@media (max-width: 480px) { .subscribe-icon { display: none; } }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.video-tile {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  padding: 0; border: 0; background: transparent; color: var(--ink);
}
.video-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #000; }
.latest-video { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.latest-video:hover { border-color: var(--ink-3); }
.latest-video img { width: 132px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); flex: none; background: #000; }
.latest-video > span { display: flex; flex-direction: column; min-width: 0; }
.latest-video .card-title { margin-bottom: 2px; }
.pick-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pick-video {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 600;
}
.pick-video:hover { border-color: var(--accent); }
.pick-video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) - 4px); background: #000; }

/* ---------- Learn ---------- */
.articles { margin: 0; padding: 0; list-style: none; counter-reset: art; }
.articles li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.articles li:first-child { border-top: 0; }
.articles li::before {
  counter-increment: art; content: counter(art, upper-roman);
  flex: none; width: 42px; font-family: var(--font-display); font-weight: 700; color: var(--accent);
}
.articles b { display: block; }
.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.method div { background: var(--surface-2); border-radius: var(--radius); padding: 12px; }
.method b { display: block; color: var(--accent); }

/* ---------- Setup ---------- */
.setup {
  max-width: 540px; margin: 0 auto; min-height: 100vh;
  padding: 36px 20px 48px; display: flex; flex-direction: column;
}
.setup > * + * { margin-top: 16px; }
.setup .dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .2s; }
.dots i.on { background: var(--accent); width: 24px; }
.setup .page-title { font-size: 30px; text-align: center; }
.setup .lead { text-align: center; color: var(--ink-2); font-size: 17px; }
.setup .foot { display: flex; gap: 10px; margin-top: auto; padding-top: 24px; }
.setup .foot .btn { flex: 1; }
.welcome-logo { width: 96px; height: 96px; border-radius: 26px; margin: 24px auto 0; display: block; box-shadow: var(--shadow); }
.verse-quote { text-align: center; font-family: var(--font-read); font-style: italic; color: var(--ink-2); font-size: 17px; }
.age-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.age-cards .choice { align-items: center; text-align: center; padding: 22px 14px; }
.age-cards .big { font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1.1; }

/* ---------- Sheets (pop-up panels) ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto;
  width: min(560px, calc(100% - 32px)); max-width: none; max-height: min(88vh, 900px);
  background: var(--surface); color: var(--ink);
  border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); overflow: hidden;
}
dialog.sheet.wide { width: min(860px, calc(100% - 32px)); }
dialog.sheet.confirm { width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(8, 10, 20, .5); }
.sheet-inner { display: flex; flex-direction: column; max-height: inherit; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 10px 10px 20px; border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-body { padding: 16px 20px 22px; overflow: auto; overscroll-behavior: contain; }
.sheet-body > * + * { margin-top: 14px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) {
  dialog.sheet:not(.confirm), dialog.sheet.wide {
    width: 100%; margin: auto 0 0; max-height: 92vh; border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---------- Toast and confetti ---------- */
#toast {
  display: none; position: fixed; inset: auto auto calc(92px + env(safe-area-inset-bottom)) 50%;
  transform: translateX(-50%); margin: 0; border: 0; z-index: 100;
  max-width: calc(100% - 32px); width: max-content;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
#toast.show { display: block; }
#toast:popover-open { display: block; animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (min-width: 900px) { #toast { bottom: 30px; left: calc(50% + var(--nav-w) / 2); } }

.confetti {
  position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; pointer-events: none; z-index: 200;
}
.confetti i {
  position: absolute; top: -16px; width: 9px; height: 15px; border-radius: 2px;
  animation: fall var(--t, 1.8s) cubic-bezier(.25, .6, .4, 1) forwards;
}
@keyframes fall { to { transform: translate(var(--dx), 108vh) rotate(var(--r)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
