/* Layout: a dark sage "desk" (--page) with white study sheets and cards on top. */
:root {
  --page: #46604f;          /* dark sage */
  --page-deep: #3a5143;
  --on-page: #f4f1e8;
  --on-page-muted: #c9d4c8;
  --bg: #fbfaf6;            /* study sheet */
  --surface: #ffffff;       /* cards */
  --text: #26302a;
  --muted: #6f7a71;
  --line: #e3e6df;
  --accent: #46604f;
  --accent-soft: #e5ede6;
  --warm: #c9826b;          /* hearts, celebrations */
  --gold: #c8a55a;
  --verse: #9aa39b;
  --reading-size: 19px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 58px;
  color-scheme: light;
}
:root[data-style="feminine"] {
  --page: #8e6a6f; --page-deep: #7a585d; --on-page: #fbf4f2; --on-page-muted: #ead6d5;
  --accent: #8e5f66; --accent-soft: #f5e8e8; --line: #eee2e0; --text: #33282a; --muted: #8a7a7b; --warm: #c46f7c;
}
:root[data-style="masculine"] {
  --page: #3b2b20; --page-deep: #2e2119; --on-page: #f7f1e7; --on-page-muted: #d6c3a5;
  --bg: #fffdf9; --accent: #5a3e2b; --accent-soft: #efe3d0; --line: #e7dccb; --text: #2a1f18; --muted: #7d6b5c; --warm: #b8875a; --gold: #c9a978;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #1f2b24; --page-deep: #18221c; --on-page: #e6ebe4; --on-page-muted: #9fb0a3;
    --bg: #242a26; --surface: #2b322d; --text: #e7ebe4; --muted: #9ba59c;
    --line: #3a443d; --accent: #9cc0a8; --accent-soft: #2f3d34; --verse: #7f8a81;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #1f2b24; --page-deep: #18221c; --on-page: #e6ebe4; --on-page-muted: #9fb0a3;
  --bg: #242a26; --surface: #2b322d; --text: #e7ebe4; --muted: #9ba59c;
  --line: #3a443d; --accent: #9cc0a8; --accent-soft: #2f3d34; --verse: #7f8a81;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin: 0 0 .4rem; }
h2 { font-size: 1rem; font-weight: 600; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small-print { font-size: .85rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--on-page);
}
.ref-button {
  display: flex; align-items: center; gap: 4px;
  background: none; border: 0; padding: 6px 4px;
  font-family: var(--serif); font-size: 1.25rem;
}
.ref-button svg { width: 18px; height: 18px; color: var(--on-page-muted); }
.version-switch { display: flex; background: var(--page-deep); border-radius: 999px; padding: 3px; }
.version-switch button {
  border: 0; background: none; padding: 5px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; letter-spacing: .03em; color: var(--on-page-muted);
}
.version-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

/* Views */
main { max-width: 720px; margin: 0 auto; padding: 8px 12px 32px; }
.view { background: var(--bg); border-radius: 24px; padding: 22px 18px 26px; box-shadow: 0 10px 30px rgb(0 0 0 / .18); }
.view[hidden], .topbar[hidden] { display: none; }

/* Reader */
.reader {
  font-family: var(--serif);
  font-size: var(--reading-size);
  line-height: 1.75;
  min-height: 40vh;
}
.reader h3, .reader .s, .reader .s1, .reader h2 {
  font-family: var(--sans); font-size: .8em; font-weight: 600;
  letter-spacing: .02em; color: var(--muted); margin: 1.6em 0 .4em;
}
.reader p { margin: 0 0 .9em; }
.reader .v, .reader sup, .reader b.verse-num, .reader .verse-num {
  font-family: var(--sans); font-size: .6em; font-weight: 600;
  color: var(--verse); vertical-align: super; margin-right: .2em; line-height: 0;
}
.reader .chapter-num { display: none; }
.reader .q1, .reader .q, .reader .line { padding-left: 1.5em; margin: 0; }
.reader .q2 { padding-left: 3em; margin: 0; }
.reader .wj, .reader .woc { color: inherit; } /* no red letters: keep it calm */
.reader .extra_text, .reader .copyright, .reader .footnotes { display: none; }
.message {
  font-family: var(--sans); font-size: 1rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.message strong { color: var(--text); display: block; margin-bottom: 4px; }
.message button { margin-top: 12px; }
.offline-note { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-bottom: 1em; }

.reader-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 8px; flex-wrap: wrap; }
.mark-read {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: .9rem;
}
.mark-read svg { width: 18px; height: 18px; opacity: .35; }
.mark-read[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.mark-read[aria-pressed="true"] svg { opacity: 1; }
.quiet-link { background: none; border: 0; color: var(--accent); font-size: .9rem; text-decoration: none; padding: 6px 0; }

.chapter-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.chapter-nav button {
  flex: 1; background: none; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; color: var(--muted); font-size: .9rem;
}
.chapter-nav button:last-child { text-align: right; }
.chapter-nav button:disabled { visibility: hidden; }
.copyright { font-size: .72rem; color: var(--muted); margin-top: 28px; }

/* Progress */
.overall { margin-bottom: 20px; }
.overall-row { display: flex; align-items: baseline; justify-content: space-between; }
.overall-row span { color: var(--muted); font-size: .9rem; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; width: 0; transition: width .3s; }
.testament-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 24px 0 8px; }
.book-row { border-bottom: 1px solid var(--line); }
.book-row summary {
  list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 12px 2px; cursor: pointer;
}
.book-row summary::-webkit-details-marker { display: none; }
.book-row .count { color: var(--muted); font-size: .85rem; }
.book-row .bar { grid-column: 1 / -1; height: 4px; }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; padding: 4px 0 16px; }
.chapter-grid button {
  height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem;
}
.chapter-grid button.is-read { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.chapter-grid button.is-here { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Cards & settings */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.card p { margin: 0 0 .5rem; color: var(--muted); }
.path-cards { margin-top: 16px; }
.soon { font-size: .75rem; color: var(--accent); font-weight: 600; }
.field { display: block; font-size: .9rem; margin-bottom: 14px; }
.field input[type="password"], .field input[type="text"], .field select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 16px;
}
.field input[type="range"] { display: block; width: 100%; margin-top: 8px; accent-color: var(--accent); }
.small, .button-like {
  display: inline-block; background: var(--accent-soft); color: var(--accent); border: 0;
  border-radius: 10px; padding: 8px 14px; font-size: .9rem; font-weight: 500; margin-bottom: 14px; cursor: pointer;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Picker */
dialog {
  width: min(560px, 100vw); max-height: 85vh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--text);
}
@media (min-width: 700px) { dialog { margin: auto; border-radius: 20px; } }
dialog::backdrop { background: rgb(0 0 0 / .3); }
.picker-head {
  position: sticky; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.picker-head h2 { margin: 0; text-align: center; }
.picker-head #pickerClose { justify-self: end; }
#pickerBody { padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }
.picker-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 16px; }
.picker-books button {
  text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 11px 2px; font-size: 1rem; display: flex; justify-content: space-between;
}
.picker-books button small { color: var(--muted); }

/* Tab bar */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  display: flex; justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--page-deep) 96%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar button {
  flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; color: var(--on-page-muted); font-size: .7rem; padding: 4px;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--on-page); font-weight: 600; }

/* Top actions */
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: none; border: 0; padding: 6px; color: var(--on-page-muted); border-radius: 999px; }
.icon-btn svg { width: 24px; height: 24px; display: block; }
.icon-btn[aria-pressed="true"] { color: var(--page); background: var(--on-page); }

/* Reader extras */
.path-banner {
  font-size: .8rem; color: var(--accent); background: var(--accent-soft);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
}
.visit-line { font-size: .78rem; color: var(--muted); margin: 0 0 14px; min-height: 1em; }
.fav-btn { background: none; border: 0; padding: 6px; color: var(--line); margin-right: auto; }
.fav-btn svg { width: 26px; height: 26px; display: block; }
.fav-btn svg path { fill: none; stroke: var(--muted); }
.fav-btn[aria-pressed="true"] svg path { fill: var(--warm); stroke: var(--warm); }
.next-in-path {
  display: block; width: 100%; margin-top: 16px; padding: 14px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--bg); font-size: .95rem; font-weight: 500;
}
.next-in-path[hidden] { display: none; }

/* Segments */
.segments { display: flex; background: var(--line); border-radius: 12px; padding: 3px; margin: 12px 0 18px; }
.segments button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 10px; font-size: .9rem; color: var(--muted); }
.segments button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
[data-seg-panel][hidden] { display: none; }
.log-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 2px;
}
.log-row strong { font-weight: 500; }
.log-row small { color: var(--muted); font-size: .8rem; }
.log-row .tag { font-size: .75rem; color: var(--accent); align-self: center; }
.log-dates { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.empty { color: var(--muted); text-align: center; padding: 32px 12px; }

/* Study path */
.path-choice { margin-top: 16px; }
.path-choice .card h2 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; }
.path-choice .card button.small { margin: 8px 0 0; }
.path-choice details { margin-top: 8px; font-size: .88rem; }
.path-choice details summary { color: var(--accent); cursor: pointer; }
.path-choice ol { padding-left: 1.2em; margin: 8px 0 0; color: var(--muted); }
.path-head .bar { margin: 8px 0 6px; height: 8px; }
.continue-btn {
  display: block; width: 100%; margin: 16px 0 8px; padding: 16px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--bg); font-size: 1.05rem; text-align: left;
}
.continue-btn small { display: block; opacity: .85; font-size: .8rem; margin-top: 2px; }
.stage { border-bottom: 1px solid var(--line); }
.stage summary { list-style: none; padding: 14px 2px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.stage summary::-webkit-details-marker { display: none; }
.stage summary .count { color: var(--muted); font-size: .85rem; }
.stage summary .about { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.stage summary .bar { grid-column: 1 / -1; height: 4px; margin-top: 4px; }
.stage.is-done summary strong::after { content: " ✓"; color: var(--accent); }
.reading-label { font-size: .85rem; margin: 6px 0 4px; }
.path-note { font-size: .8rem; color: var(--muted); margin-top: 18px; }

/* Switches */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: .95rem; }
.switch-row small { display: block; color: var(--muted); font-size: .8rem; }
.switch-row input {
  appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 99px;
  background: var(--line); position: relative; cursor: pointer; transition: background .2s;
}
.switch-row input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .2s;
}
.switch-row input:checked { background: var(--accent); }
.switch-row input:checked::after { transform: translateX(20px); }

/* Drive mode */
.drive {
  position: fixed; inset: 0; z-index: 20; background: var(--bg);
  display: flex; flex-direction: column; gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
}
.drive[hidden] { display: none; }
.drive-top { display: flex; justify-content: space-between; align-items: center; }
.listening { font-size: .8rem; color: var(--accent); }
.listening::before { content: "● "; }
.drive-ref { font-family: var(--serif); font-size: 2rem; margin: 8px 0 0; text-align: center; }
.drive-status { color: var(--muted); text-align: center; margin: 0; min-height: 3em; font-family: var(--serif); font-size: 1.1rem; }
.drive button { border: 0; border-radius: 22px; font-size: 1.4rem; font-weight: 500; }
.drive-play { flex: 1; min-height: 160px; background: var(--accent); color: var(--bg); font-size: 2rem !important; }
.drive-row { display: flex; gap: 14px; }
.drive-row button { flex: 1; min-height: 96px; background: var(--surface); color: var(--text); border: 1px solid var(--line) !important; }
.drive-mark { min-height: 80px; background: var(--accent-soft); color: var(--accent); }
.drive-mark[aria-pressed="true"]::before { content: "✓ "; }

/* Top bar left group */
.top-left { display: flex; align-items: center; gap: 2px; min-width: 0; }

/* Learning path margin: a drawer on phones, a sidebar on wide screens */
.margin {
  position: fixed; z-index: 15; top: 0; bottom: 0; left: 0; width: min(320px, 86vw);
  background: var(--bg); color: var(--text); overflow-y: auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 8px 0 30px rgb(0 0 0 / .25);
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(-100%); } }
.margin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.margin-head strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.margin-key { font-size: .75rem; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.st { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; flex: none; }
.st.done { background: var(--accent); color: var(--bg); }
.st.part { background: var(--accent-soft); color: var(--accent); }
.st.none { border: 1px solid var(--line); color: var(--muted); }
.margin-stage { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 16px 0 4px; }
.margin-today { background: var(--accent-soft); color: var(--accent); border-radius: 12px; padding: 10px 12px; font-size: .85rem; margin-bottom: 6px; }
.margin-book {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; padding: 7px 4px; border-radius: 8px; font-size: .92rem;
}
.margin-book:hover { background: var(--accent-soft); }
.margin-book.is-here { font-weight: 600; }
.margin-book small { margin-left: auto; color: var(--muted); font-size: .75rem; }
@media (min-width: 1000px) {
  .margin { top: 0; width: 300px; box-shadow: none; border-right: 1px solid var(--line); animation: none; }
  body.margin-open main, body.margin-open .topbar { margin-left: 300px; }
  body.margin-open .topbar { padding-left: 16px; }
  #marginClose { display: none; }
}
.margin-scrim { position: fixed; inset: 0; z-index: 14; background: rgb(0 0 0 / .3); }
@media (min-width: 1000px) { .margin-scrim { display: none; } }

/* Study tools under a chapter */
.study-tools { display: grid; gap: 10px; margin-top: 22px; }
.tool-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
}
.tool-card small { display: block; color: var(--muted); font-size: .8rem; }
.tool-icon {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
}
details.tool-card { display: block; }
details.tool-card summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
details.tool-card summary::-webkit-details-marker { display: none; }
.journal textarea {
  width: 100%; min-height: 140px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); font-family: var(--serif); font-size: 1rem; line-height: 1.6; resize: vertical;
}
.journal .saved { font-size: .75rem; color: var(--muted); }
.unlock { display: flex; gap: 8px; margin-top: 12px; }
.unlock input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 16px; }
.unlock .small { margin: 0; }

/* Knowledge rating */
.knowledge { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 18px; display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; }
.knowledge .ring { grid-row: span 2; width: 54px; height: 54px; }
.knowledge strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.knowledge small { color: var(--muted); font-size: .8rem; }

/* Trivia */
.trivia-body { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.trivia-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.trivia-progress span { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.trivia-progress span.right { background: var(--accent); }
.trivia-progress span.wrong { background: var(--warm); }
.trivia-kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.trivia-q { font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; margin: 0 0 16px; }
.trivia-choices { display: grid; gap: 8px; }
.trivia-choices button {
  text-align: left; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 1rem;
  transition: background .2s, border-color .2s;
}
.trivia-choices button.right { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.trivia-choices button.wrong { border-color: var(--warm); color: var(--warm); }
.trivia-why { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.trivia-next { margin-top: 16px; width: 100%; padding: 14px; border: 0; border-radius: 12px; background: var(--accent); color: var(--bg); font-size: 1rem; }
.trivia-score { text-align: center; padding: 8px 0; }
.trivia-score .big { font-family: var(--serif); font-size: 3rem; margin: 0; }
.trivia-score p { margin: 4px 0; }
.trivia-empty { color: var(--muted); }

/* Confetti */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* Mascot (Animated style) */
.mascot {
  position: fixed; z-index: 12; right: calc(14px + env(safe-area-inset-right)); bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom));
  display: flex; align-items: flex-end; gap: 6px; pointer-events: none;
}
.mascot .lamb { width: 70px; height: 62px; animation: bob 3s ease-in-out infinite; pointer-events: auto; cursor: pointer; }
.mascot .wool { fill: #fffaf2; stroke: #d9d2c4; stroke-width: 1.2; }
.mascot .face { fill: #5b4a42; }
.mascot .eye { fill: #fff; }
.mascot .smile { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
.mascot .bubble {
  max-width: 200px; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 14px 14px 4px 14px; padding: 9px 12px; font-size: .85rem; box-shadow: 0 6px 18px rgb(0 0 0 / .15);
  animation: pop .35s ease;
}
.mascot .bubble:empty { display: none; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
:root[data-style="animated"] .tool-icon { animation: wiggle 4s ease-in-out infinite; }
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 94% { transform: rotate(-8deg); } 97% { transform: rotate(8deg); } }
@media (prefers-reduced-motion: reduce) {
  .mascot .lamb, :root[data-style="animated"] .tool-icon, .margin, .mascot .bubble { animation: none; }
}

/* Greeting and today's reading */
.greeting { color: var(--muted); margin: 0 0 4px; }
.today-card { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: 10px 0; color: var(--accent); font-size: .92rem; }
.today-card strong { display: block; font-size: 1rem; }
.tool-card.glow { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }
@media (min-width: 1000px) { body.margin-open .tabbar { margin-left: 300px; } }
.st.part { background: linear-gradient(90deg, var(--accent) 50%, var(--accent-soft) 50%); color: transparent; }
.mascot .bubble { flex: 0 1 auto; }

/* Illustrations: same drawings, recolored per look */
.scene { display: block; width: calc(100% + 36px); max-width: none; height: auto; margin: -22px -18px 16px; border-radius: 24px 24px 0 0; }
.scene .sky { fill: #eef3ea; }
.scene .hill { fill: #cfdcc8; }
.scene .sun { fill: #f2dca4; }
.leaf, .canopy { fill: #7f9a76; }
.canopy { opacity: .92; }
.olive { fill: #4d5a3a; }
.stem { fill: none; stroke: #6c7f5d; stroke-width: 2; stroke-linecap: round; }
.trunk { fill: #8a6d55; stroke: #8a6d55; stroke-linecap: round; }
.fig-leaf { fill: #6f8f5e; }
.fig { fill: #7a4a63; }
.wool { fill: #fffaf2; stroke: #d9d2c4; stroke-width: 1.2; }
.face { fill: #5b4a42; }
.eye { fill: #fff; }
.eye-dark { fill: #2b2420; }
.donkey { fill: #a39486; }
.muzzle { fill: #e6ddd2; }
.ear { fill: #8f8174; }
.mane, .tail { fill: none; stroke: #6d6157; stroke-width: 3; stroke-linecap: round; }
.fish { fill: #6f8aa0; }
.hull { fill: #6b4a33; }
.mast, .line { fill: none; stroke: #4a3526; stroke-width: 2; }
.line { stroke-width: 1; stroke-dasharray: 2 2; }
.sail { fill: #f6efe2; stroke: #c9b79c; }
.fisher { fill: #4a3526; }
.wave { fill: none; stroke: #9fb6c4; stroke-width: 2; stroke-linecap: round; }
.arch { fill: none; stroke: #d7b9a4; stroke-width: 6; }
.bloom { fill: #e5a9b0; }
.bloom-center { fill: #f3d88f; }
.fruit { fill: #b5525c; }
.flourish { display: block; width: 160px; height: 36px; margin: 18px auto 0; opacity: .9; }

:root[data-style="feminine"] .scene .sky { fill: #f8eeec; }
:root[data-style="feminine"] .scene .hill { fill: #e8d6cf; }
:root[data-style="feminine"] .leaf, :root[data-style="feminine"] .canopy { fill: #8ea283; }

:root[data-style="masculine"] .scene .sky { fill: #efe4d3; }
:root[data-style="masculine"] .scene .sun { fill: #e3c999; }
:root[data-style="masculine"] .fish { fill: #6b4a33; }
:root[data-style="masculine"] .wave { stroke: #a88b6b; }
:root[data-style="masculine"] .sail { fill: #ffffff; stroke: #b39c7d; }

:root[data-style="animated"] .scene .sky { fill: #e9f4f6; }
:root[data-style="animated"] .scene .hill { fill: #c6dcb8; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .scene .sky { fill: #2c3530; }
  :root:not([data-theme="light"]) .scene .hill { fill: #3b4a40; }
  :root:not([data-theme="light"]) .scene .sun { fill: #8f7f58; }
}
:root[data-theme="dark"] .scene .sky { fill: #2c3530; }
:root[data-theme="dark"] .scene .hill { fill: #3b4a40; }
:root[data-theme="dark"] .scene .sun { fill: #8f7f58; }

/* Gentle motion: olive branches sway in Feminine, the boat rocks in Masculine, friends move in Animated */
.sway, .bob, .swish, .swim, .rock { transform-box: fill-box; transform-origin: 50% 100%; }
:root[data-style="feminine"] .sway { animation: sway 5s ease-in-out infinite; }
:root[data-style="animated"] .sway { animation: sway 4s ease-in-out infinite; }
:root[data-style="animated"] .bob { animation: bobSvg 2.6s ease-in-out infinite; }
:root[data-style="animated"] .swish { animation: swish 1.6s ease-in-out infinite; transform-origin: 0 0; }
:root[data-style="masculine"] .rock { animation: rock 6s ease-in-out infinite; }
:root[data-style="masculine"] .swim, :root[data-style="animated"] .swim { animation: swim 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(2.5deg); } }
@keyframes bobSvg { 50% { transform: translateY(-3px); } }
@keyframes swish { 50% { transform: rotate(14deg); } }
@keyframes rock { 50% { transform: rotate(-2deg); } }
@keyframes swim { 50% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .sway, .bob, .swish, .swim, .rock { animation: none !important; } }

.mascot .friend { width: 84px; height: 68px; pointer-events: auto; cursor: pointer; animation: bob 3s ease-in-out infinite; }

/* Archive of past walks */
.archive { margin-top: 24px; }
.archive h2 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.archive-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.archive-row small { color: var(--muted); font-size: .8rem; grid-column: 1 / -1; }
.archive-row .tag { color: var(--accent); font-size: .8rem; }
.walk-again { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.confirm-box { background: var(--accent-soft); border-radius: 14px; padding: 14px; margin-top: 10px; font-size: .9rem; }
.confirm-box .row { margin-top: 10px; }
.readonly-note { background: var(--accent-soft); color: var(--accent); border-radius: 12px; padding: 10px 12px; font-size: .85rem; margin-bottom: 12px; }

/* ---------- Sea of Galilee scene and fish ---------- */
:root {
  --sky-top: #e9f1ec; --sky-low: #f6f3e8; --far-hill: #b9cbb5;
  --sea-top: #a9cfc6; --sea-deep: #3f6f6a; --seabed: #c8b48e; --grass: #5f8a5a;
  --fa-top: #4f6b5e; --fa-mid: #9db3a2; --fa-belly: #f2f4ec; --fa-fin: #6f8f7c;   /* tilapia, olive-silver */
  --fb-top: #b67a2e; --fb-mid: #e3b25c; --fb-belly: #fbf0d2; --fb-fin: #d08d3a;   /* gold */
  --fc-top: #3f6585; --fc-mid: #8fb0c8; --fc-belly: #eef4f8; --fc-fin: #5d84a3;   /* blue-silver */
}
:root[data-style="feminine"] {
  --sky-top: #f6e7e6; --sky-low: #fbf3ee; --far-hill: #dcc7c2;
  --sea-top: #c9dfe0; --sea-deep: #6f9399; --seabed: #e2cdb8; --grass: #7f9a76;
  --fa-top: #9b6a73; --fa-mid: #d9adb3; --fa-belly: #fdf3f1; --fa-fin: #c48b94;
  --fb-top: #b88a4a; --fb-mid: #e6c48a; --fb-belly: #fdf5e3; --fb-fin: #d9a86a;
  --fc-top: #6f8796; --fc-mid: #b4c6d0; --fc-belly: #f5f8f9; --fc-fin: #8ea5b3;
}
:root[data-style="masculine"] {
  --sky-top: #efe4d3; --sky-low: #f8f1e6; --far-hill: #c7ad8a;
  --sea-top: #9fb2ab; --sea-deep: #2f3e3a; --seabed: #b89b74; --grass: #6b6a44;
  --fa-top: #5a3e2b; --fa-mid: #a8835f; --fa-belly: #f4e9d8; --fa-fin: #7d5a3e;
  --fb-top: #8a6a48; --fb-mid: #cfb48e; --fb-belly: #fffaf1; --fb-fin: #a8875f;
  --fc-top: #4b4a46; --fc-mid: #a9a69e; --fc-belly: #ffffff; --fc-fin: #6e6b65;
}
:root[data-style="animated"] {
  --sky-top: #dff1f8; --sky-low: #f3fbf6; --far-hill: #b5d3a6;
  --sea-top: #9ad6e8; --sea-deep: #2f7fa6; --seabed: #ecd49a; --grass: #4fa36a;
  --fa-top: #e0703a; --fa-mid: #f6a55e; --fa-belly: #fff1dc; --fa-fin: #ef8a46;
  --fb-top: #d9a21e; --fb-mid: #f6d257; --fb-belly: #fffbe6; --fb-fin: #e9b52b;
  --fc-top: #3f7fc4; --fc-mid: #86bde8; --fc-belly: #f1f8ff; --fc-fin: #5a9ad6;
}
.sky-top { stop-color: var(--sky-top); } .sky-low { stop-color: var(--sky-low); }
.sea-top { stop-color: var(--sea-top); } .sea-deep { stop-color: var(--sea-deep); }
.fa-top { stop-color: var(--fa-top); } .fa-mid { stop-color: var(--fa-mid); } .fa-belly { stop-color: var(--fa-belly); } .fa-fin { stop-color: var(--fa-fin); }
.fb-top { stop-color: var(--fb-top); } .fb-mid { stop-color: var(--fb-mid); } .fb-belly { stop-color: var(--fb-belly); } .fb-fin { stop-color: var(--fb-fin); }
.fc-top { stop-color: var(--fc-top); } .fc-mid { stop-color: var(--fc-mid); } .fc-belly { stop-color: var(--fc-belly); } .fc-fin { stop-color: var(--fc-fin); }
.scene.sea { aspect-ratio: 360 / 170; }
.sea .far-hill { fill: var(--far-hill); }
.sea .seabed { fill: var(--seabed); }
.sea .pebble { fill: color-mix(in srgb, var(--seabed) 70%, #000); opacity: .35; }
.sea .shore { fill: var(--far-hill); }
.sea-grass { fill: none; stroke: var(--grass); stroke-width: 2.4; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; animation: grass var(--gd, 3s) ease-in-out infinite; }
.fish-skin { stroke: rgb(0 0 0 / .18); stroke-width: .6; }
.fish-fin { stroke: rgb(0 0 0 / .12); stroke-width: .4; }
.fin-ray { fill: none; stroke: rgb(0 0 0 / .18); stroke-width: .5; }
.scales { fill: none; stroke: rgb(255 255 255 / .38); stroke-width: .7; }
.lateral { fill: none; stroke: rgb(0 0 0 / .14); stroke-width: .7; }
.sheen { fill: #fff; opacity: .35; }
.gill { fill: none; stroke: rgb(0 0 0 / .3); stroke-width: .8; stroke-linecap: round; }
.fish-eye { fill: #fff; stroke: rgb(0 0 0 / .25); stroke-width: .4; }
.fish-pupil { fill: #1f2522; }
.fish-glint { fill: #fff; }
.bubble-dot { fill: none; stroke: rgb(255 255 255 / .75); stroke-width: .8; animation: rise var(--bd, 6s) linear infinite; animation-delay: var(--bdelay, 0s); }
.wave.faint { opacity: .5; }
.sea .wave { stroke: rgb(255 255 255 / .8); stroke-width: 1.6; }
.rays { animation: shimmer 7s ease-in-out infinite; }

/* Motion. Fish move in every look; branches sway gently. */
.across { animation: across var(--dur, 20s) linear infinite; animation-delay: var(--delay, 0s); }
.fish-bob { animation: fishBob var(--bob, 3s) ease-in-out infinite; }
.fish-wiggle { transform-box: fill-box; transform-origin: 40% 50%; animation: wiggle2 1.4s ease-in-out infinite; }
.fish-tail { transform-box: fill-box; transform-origin: 100% 50%; animation: tail .7s ease-in-out infinite alternate; }
.fish-pec { transform-box: fill-box; transform-origin: 100% 0; animation: pec 1.1s ease-in-out infinite alternate; }
.wave-move { animation: waveMove 6s linear infinite; }
.wave-move.slow { animation-duration: 10s; }
.circle-swim { transform-box: view-box; transform-origin: 80px 22px; animation: circleSwim 9s ease-in-out infinite; }
.circle-swim.two { animation-delay: -4.5s; }
.vine-sway { transform-box: fill-box; transform-origin: 50% 0; animation: vineSway 9s ease-in-out infinite; }
@keyframes across { from { transform: translateX(var(--from)); } to { transform: translateX(var(--to)); } }
@keyframes fishBob { 50% { transform: translateY(-4px); } }
@keyframes wiggle2 { 50% { transform: rotate(2deg); } }
@keyframes tail { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes pec { from { transform: rotate(-10deg); } to { transform: rotate(18deg); } }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: .8; } 100% { transform: translateY(calc(var(--rise) * -1)); opacity: 0; } }
@keyframes waveMove { to { transform: translateX(-30px); } }
@keyframes shimmer { 50% { opacity: .55; } }
@keyframes grass { 50% { transform: rotate(6deg); } }
@keyframes circleSwim { 0%, 100% { transform: translateX(-10px); } 50% { transform: translateX(10px) translateY(-3px); } }
@keyframes vineSway { 50% { transform: rotate(.6deg); } }
@media (prefers-reduced-motion: reduce) {
  .across, .fish-bob, .fish-wiggle, .fish-tail, .fish-pec, .wave-move, .bubble-dot, .rays, .sea-grass, .circle-swim, .vine-sway { animation: none !important; }
  .bubble-dot { opacity: .6; }
}
.fish-flourish { width: 200px; height: 55px; }

/* Olive branches framing the app on both sides */
.vine { position: fixed; top: 0; bottom: 0; width: 34px; height: 100vh; z-index: 0; pointer-events: none; opacity: .85; }
.vine-left { left: 0; }
.vine-right { right: 0; transform: scaleX(-1); }
.vine .leaf { fill: color-mix(in srgb, var(--on-page) 55%, var(--page)); }
.vine .olive { fill: color-mix(in srgb, var(--on-page) 30%, var(--page-deep)); }
.vine .vine-stem { stroke: color-mix(in srgb, var(--on-page) 40%, var(--page)); stroke-width: 2.2; }
main { position: relative; z-index: 1; padding-left: 26px; padding-right: 26px; }
@media (min-width: 760px) { .vine { width: 70px; } main { padding-left: 12px; padding-right: 12px; } }
.view { position: relative; }
.corner-sprig { position: absolute; width: 92px; height: 38px; bottom: 6px; right: 10px; opacity: .8; pointer-events: none; }
.corner-sprig.flip { right: auto; left: 10px; transform: scaleX(-1); }

/* ---------- Home ---------- */
.home-hello { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 2px; }
.home-sub { color: var(--muted); margin: 0 0 16px; }
.resume-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--accent); color: var(--bg); border: 0; border-radius: 16px; padding: 14px 16px; margin-bottom: 18px; }
.resume-card strong { display: block; font-size: 1.05rem; }
.resume-card small { opacity: .85; }
.resume-card .go { margin-left: auto; font-size: 1.4rem; }
.home-h { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 6px 0 10px; }
.path-cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 560px) { .path-cards { grid-template-columns: 1fr 1fr; } }
.path-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px 16px; text-align: left; }
.path-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.path-card .pc-top { display: flex; align-items: center; gap: 10px; }
.path-card .pc-icon { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.path-card .pc-icon svg { width: 26px; height: 26px; }
.path-card h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.12rem; }
.path-card .pc-badge { font-size: .72rem; font-weight: 600; color: var(--accent); }
.path-card p { margin: 0; font-size: .88rem; color: var(--muted); }
.path-card .bar { margin: 4px 0 0; }
.path-card .pc-meta { font-size: .78rem; color: var(--muted); }
.path-card .pc-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.jump-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 18px; }
.jump-card h2 { margin-bottom: 8px; }
.jump-row { display: flex; gap: 8px; }
.jump-row input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.jump-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.jump-results button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: .88rem; }
.jump-results .hint { font-size: .82rem; color: var(--muted); }

/* ---------- Listen bar: read aloud, volume, speed, drive mode ---------- */
.listen-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--accent-soft); border-radius: 16px; padding: 10px 12px; margin: 0 0 14px; }
.listen-play { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: var(--accent); color: var(--bg); padding: 9px 16px 9px 12px; font-weight: 600; font-size: .95rem; }
.listen-play svg { width: 20px; height: 20px; }
.listen-ctl { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--accent); }
.listen-ctl input[type="range"] { width: 92px; accent-color: var(--accent); }
.listen-ctl svg { width: 18px; height: 18px; }
.listen-note { font-size: .78rem; color: var(--muted); }
.drive-switch { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--accent); }
.drive-switch input, .home-drive input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; margin: 0; transition: background .2s; }
.drive-switch input::after, .home-drive input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s; }
.drive-switch input:checked, .home-drive input:checked { background: var(--accent); }
.drive-switch input:checked::after, .home-drive input:checked::after { transform: translateX(20px); }
.home-drive { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 18px; }
.home-drive strong { display: block; }
.home-drive small { color: var(--muted); }
.top-left { display: flex; align-items: center; gap: 2px; }
.step-btn { background: none; border: 0; color: var(--on-page-muted); font-size: 1.5rem; line-height: 1; padding: 4px 8px; border-radius: 999px; }
.step-btn:disabled { opacity: .3; }
.picker-search { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); margin: 4px 0 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-end { height: 44px; }
.mascot[hidden] { display: none; }
.ref-button { white-space: nowrap; }
@media (max-width: 430px) { .ref-button { font-size: 1.08rem; } .step-btn { padding: 4px 5px; } .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; } }
.drive-nav { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; }
.drive .drive-nav button { min-height: 64px; font-size: 1rem; font-weight: 600; background: var(--surface); color: var(--accent); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; }
.drive .drive-nav #driveExit { background: var(--accent-soft); font-size: 1.05rem; }
.drive-nav svg { width: 24px; height: 24px; }
.drive-top:has(.listening[hidden]) { display: none; }
.look-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; }
.look-chips button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
.look-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.path-card .pc-actions .quiet-link { padding: 8px 4px; }

/* ---------- Cute characters and the Galilee boat ---------- */
.eye-ink { fill: #2a211c; }
.eye-shine { fill: #fff; }
.blush { fill: #f19a9a; opacity: .55; }
.smile { fill: none; stroke: #4a3328; stroke-width: .9; stroke-linecap: round; }
.nose { fill: #b97a72; }
.lamb-face { fill: #f6e5d8; stroke: #e2cbb8; stroke-width: .6; }
.lamb-ear { fill: #efd3c4; }
.lamb-leg { fill: #6d5a50; }
.wool { fill: #fffdf8; stroke: #e4dccd; stroke-width: 1; }
.donkey { fill: #a9998a; }
.muzzle { fill: #ece2d6; }
.ear-in { fill: #e9c9c0; }
.mane-fill { fill: #6d6157; }
.hoof { fill: #5a4d44; }
.tail { fill: none; stroke: #6d6157; stroke-width: 2.6; stroke-linecap: round; }
.hull { fill: #8a5d3b; stroke: #5f3e26; stroke-width: 1.1; stroke-linejoin: round; }
.hull-line { fill: none; stroke: #5f3e26; stroke-width: 2.4; stroke-linecap: round; }
.plank { fill: none; stroke: rgb(40 20 10 / .35); stroke-width: .8; }
.rim { stroke: #c49a6c; stroke-width: 2; stroke-linecap: round; }
.mast { fill: none; stroke: #5f3e26; stroke-width: 2.6; stroke-linecap: round; }
.mast.thin { stroke-width: 1.8; }
.rope { fill: none; stroke: #6b5a45; stroke-width: .6; }
.sail { fill: #f7f0e1; stroke: #c9b593; stroke-width: .9; }
.sail-stripe { fill: #c98c5a; opacity: .7; }
.oar { fill: none; stroke: #7a5638; stroke-width: 1.8; stroke-linecap: round; }
.oar-blade { fill: #7a5638; }
.robe-a { fill: #c9a77a; } .robe-b { fill: #7f9bab; }
.arm { fill: none; stroke: #d6a07a; stroke-width: 2.2; stroke-linecap: round; }
.skin { fill: #ddaa82; }
.headcloth { fill: #f3ead9; stroke: #c9b593; stroke-width: .4; }
.headcloth.b { fill: #e6d3a8; }
.net { fill: none; stroke: #6b5a45; stroke-width: .8; stroke-linecap: round; }
.net.mesh { stroke-width: .5; opacity: .75; }
.float { fill: #e8c25e; stroke: #8a6a2e; stroke-width: .5; }
.weight { fill: #555; }
:root[data-style="masculine"] .sail-stripe { fill: #5a3e2b; }
:root[data-style="feminine"] .sail-stripe { fill: #c4848f; }
:root[data-style="animated"] .sail-stripe { fill: #e07a5f; }
.blink { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 5.5s infinite; }
.nod { transform-box: fill-box; transform-origin: 30% 90%; animation: nod 4s ease-in-out infinite; }
.ear-wiggle { transform-box: fill-box; transform-origin: 50% 100%; animation: earWiggle 3.4s ease-in-out infinite; }
.cast { transform-box: fill-box; transform-origin: 0 0; animation: cast 4.5s ease-in-out infinite; }
.bob { transform-box: fill-box; transform-origin: 50% 100%; animation: bobSvg 2.6s ease-in-out infinite; }
.bob.slow { animation-duration: 3.4s; }
.swish { transform-box: fill-box; transform-origin: 100% 0; animation: swish 1.8s ease-in-out infinite; }
.rock { transform-box: fill-box; transform-origin: 50% 100%; animation: rock 5s ease-in-out infinite; }
.sway { animation: sway 5s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes nod { 50% { transform: rotate(-5deg); } }
@keyframes earWiggle { 0%, 80%, 100% { transform: rotate(0); } 86% { transform: rotate(-12deg); } 92% { transform: rotate(6deg); } }
@keyframes cast { 0%, 100% { transform: scale(.92); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .blink, .nod, .ear-wiggle, .cast, .bob, .swish, .rock, .sway { animation: none !important; } }
.fish-strip { display: block; width: 100%; height: auto; aspect-ratio: 360 / 54; border-radius: 16px; margin: 0 0 14px; }
.drive .fish-strip { margin: auto 0 0; }
.trivia-body .fish-strip { margin-bottom: 12px; }

/* ---------- Study notes ---------- */
.notes-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 18px; }
.notes-card.is-empty { background: var(--accent-soft); border-color: transparent; }
.notes-card.is-empty .row { display: flex; gap: 8px; flex-wrap: wrap; }
.notes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.notes-head h2 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin: 0; }
.notes-intro { font-size: .92rem; color: var(--muted); margin: 6px 0 12px; }
.notes-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.notes-tabs button { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
.notes-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.note-item { padding: 10px 0; border-top: 1px solid var(--line); }
.note-item:first-child { border-top: 0; padding-top: 0; }
.note-item p { margin: 4px 0 0; font-size: .93rem; line-height: 1.55; }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.note-head strong { font-size: .98rem; }
.who { font-size: .75rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.ev { font-size: .7rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ev-strong { background: #dcebdc; color: #2f5a35; }
.ev-good { background: #e3ecf4; color: #31506b; }
.ev-debated { background: #f5e8cf; color: #7a5717; }
.ev-faith { background: #efe3f0; color: #65406a; }
.cite { border: 0; background: none; color: var(--accent); font-size: .75rem; font-weight: 600; padding: 2px 3px; line-height: 1; vertical-align: 2px; }
.word-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.word-line .orig { font-family: "SBL Hebrew", "Times New Roman", var(--serif); font-size: 1.45rem; color: var(--text); }
.word-line .say { font-style: italic; color: var(--accent); }
.word-line .means { color: var(--muted); font-size: .9rem; }
.sources { padding-left: 1.3em; font-size: .85rem; margin: 0 0 12px; }
.sources li { margin-bottom: 6px; border-radius: 6px; }
.sources li.hi { background: var(--accent-soft); }
.ev-key p { font-size: .8rem; color: var(--muted); margin: 4px 0; }
.map-toggle { display: inline-flex; background: var(--line); border-radius: 999px; padding: 3px; margin-bottom: 8px; }
.map-toggle button { border: 0; background: none; border-radius: 999px; padding: 5px 16px; font-size: .85rem; color: var(--muted); }
.map-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.notes-map { display: block; width: 100%; max-height: 420px; height: auto; margin: 0 auto; }
.map-land { fill: #efe6d2; }
.map-water { fill: #a9cbd6; stroke: #7fa9b8; stroke-width: 1; stroke-linejoin: round; }
.map-river { fill: none; stroke: #7fa9b8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-river-label { font: italic 10px var(--sans); fill: #4f7d8d; }
.map-water-label { font: italic 12px var(--serif); fill: #3f6f80; }
.map-dot { fill: #9b3d2f; stroke: #fff; stroke-width: 1.5; }
.map-dot-halo { fill: #9b3d2f; opacity: 0; }
.map-place { cursor: pointer; outline: none; }
.map-place.is-on .map-dot-halo, .map-place:focus-visible .map-dot-halo { opacity: .25; }
.map-label { font: 600 10.5px var(--sans); fill: #3b2b20; paint-order: stroke; stroke: #f7f1e4; stroke-width: 3px; stroke-linejoin: round; }
.map-note { font-size: .9rem; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin: 10px 0 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ev { filter: brightness(.85); } }
.map-island { fill: #efe6d2; stroke: #7fa9b8; stroke-width: 1; }
.staff { fill: none; stroke: #7a5638; stroke-width: 1.6; stroke-linecap: round; }
.palm-leaf { fill: #6f8f5e; }
.tent { fill: #8a6a4a; } .tent-door { fill: #4a3526; }
.dune { fill: #e6cf9f; } .dune.near { fill: #d9bd86; }
.cloud-pillar { fill: #fffaf0; opacity: .85; }
.river { fill: none; stroke: #9cc7d4; stroke-width: 4; stroke-linecap: round; opacity: .9; }
.hill.near { fill: color-mix(in srgb, var(--far-hill) 80%, #4d6b3e); }
.passage-art .hill { fill: var(--far-hill); }
.moon { fill: #f6efd2; } .sun-rise { fill: #f2c46d; opacity: .9; }
.far-hill.night { fill: #2c3b5a; }
.star { fill: #fff; animation: twinkle var(--tw, 3s) ease-in-out infinite; animation-delay: var(--td, 0s); }
@keyframes twinkle { 50% { opacity: .3; } }
.passage-caption { font: italic .78rem var(--serif); color: var(--muted); margin: -8px 0 12px; text-align: center; }

/* ---------- Top bar on every page ---------- */
.top-title { font-family: var(--serif); font-size: 1.2rem; padding: 6px 4px; display: none; }
body:not([data-view="read"]) .top-title { display: inline; }
body:not([data-view="read"]) .read-only { display: none !important; }
.top-ref { display: inline-flex; align-items: center; }
#listenBtn { display: none; }
.menu-btn { color: var(--on-page); }

/* Quick menu */
#quickMenu { width: min(440px, calc(100vw - 24px)); max-height: 86vh; border: 0; border-radius: 22px; padding: 16px 18px 20px; background: var(--bg); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
#quickMenu::backdrop { background: rgb(0 0 0 / .35); }
.qm-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }
.qm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qm-chips button, .qm-nav button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: .9rem; }
.qm-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.qm-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.qm-nav button { padding: 10px 4px; border-radius: 12px; font-weight: 600; color: var(--accent); }

/* Features someone switched off */
body.hide-listen .listen-bar, body.hide-notes .notes-card, body.hide-trivia #triviaBtn,
body.hide-journal #journalBox, body.hide-vines #vines, body.hide-pathmargin #marginBtn { display: none !important; }

/* Pictures: Simple drops cartoon faces and characters and calms the motion; None removes pictures */
:root[data-graphics="simple"] .blush, :root[data-graphics="simple"] .smile, :root[data-graphics="simple"] .fish-glint,
:root[data-graphics="simple"] .eye-shine, :root[data-graphics="simple"] .nose, :root[data-graphics="simple"] .mascot { display: none !important; }
:root[data-graphics="simple"] .blink:not(:has(.fish-eye)) { transform: scale(.6); transform-box: fill-box; transform-origin: center; }
:root[data-graphics="simple"] .fish-eye { transform: scale(.55); transform-box: fill-box; transform-origin: center; }
:root[data-graphics="simple"] .fish-pupil { transform: scale(.5); transform-box: fill-box; transform-origin: center; }
:root[data-graphics="simple"] .blink, :root[data-graphics="simple"] .fish-wiggle, :root[data-graphics="simple"] .bubble-dot,
:root[data-graphics="simple"] .nod, :root[data-graphics="simple"] .cast { animation: none !important; }
:root[data-graphics="none"] .scene, :root[data-graphics="none"] .fish-strip, :root[data-graphics="none"] .flourish,
:root[data-graphics="none"] #vines, :root[data-graphics="none"] .corner-sprig, :root[data-graphics="none"] .mascot,
:root[data-graphics="none"] .passage-caption, :root[data-graphics="none"] .art-slot { display: none !important; }
:root[data-graphics="none"] main { padding-left: 12px; padding-right: 12px; }
/* Classic pictures: everything stays still */
:root[data-graphics="simple"] svg *, :root[data-graphics="simple"] .mascot .friend { animation: none !important; }
.quiet-check { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; background: var(--surface); color: var(--gold); border: 2px solid var(--gold); display: grid; place-items: center; font-size: 2rem; z-index: 40; box-shadow: 0 8px 24px rgb(0 0 0 / .18); animation: fadeOut 1.4s ease forwards; pointer-events: none; }
@keyframes fadeOut { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* Journal boxes */
.journal-box { display: block; margin-bottom: 12px; }
.jb-label { display: block; font-weight: 600; font-size: .88rem; color: var(--accent); margin-bottom: 4px; }
.journal-box textarea { width: 100%; }
.jb-prayer textarea { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.jb-gratitude textarea { background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.answered { display: flex; align-items: center; gap: 6px; font-size: .85rem; margin-top: 4px; color: var(--muted); }
.answered input { accent-color: var(--accent); width: 18px; height: 18px; }
.journal-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.journal-filter button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
.journal-filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.log-row em { font-style: normal; font-weight: 600; color: var(--accent); }
.journal .journal-box textarea { margin-top: 0; }
.journal .jb-prayer textarea, .journal .jb-gratitude textarea { min-height: 84px; }
.journal-box:first-of-type { margin-top: 12px; }

.passage-art .sun { fill: #f2d48a; }
body.hide-diary #diaryToday, body.hide-diary .keepsake-row { display: none !important; }
body.hide-journal.hide-diary .segments [data-seg="journal"] { display: none; }
.diary-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.diary-card h2 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 0 0 4px; }
.diary-date { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.diary-card textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font-family: var(--serif); font-size: 1rem; line-height: 1.6; resize: vertical; }
.diary-card .saved { font-size: .75rem; color: var(--muted); }
.diary-read { font-family: var(--serif); line-height: 1.6; margin: 0 0 12px; }
.keepsake-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.log-row.is-daily strong { color: var(--accent); }

/* Keepsake journal book: only the book prints */
.print-book[hidden] { display: none; }
@media print {
  body.printing > *:not(#printBook) { display: none !important; }
  body.printing { background: #fff; padding: 0; color: #222; }
  body.printing .print-book { display: block !important; font-family: var(--serif); color: #222; }
  .pb-title { text-align: center; padding: 30vh 0 0; page-break-after: always; }
  .pb-title h1 { font-size: 2.2rem; font-weight: 500; margin: 0 0 8px; }
  .pb-orn { font-size: 2rem; color: #8a6d55; margin: 0; }
  .pb-range { color: #666; font-size: .9rem; }
  .pb-entry { page-break-inside: avoid; border-top: 1px solid #ddd; padding: 14px 0; }
  .pb-date { font-family: var(--sans); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: #8a6d55; margin: 0; }
  .pb-entry h3 { font-weight: 500; font-size: 1.15rem; margin: 2px 0 6px; }
  .pb-entry h4 { font-family: var(--sans); font-size: .8rem; color: #555; margin: 10px 0 2px; }
  .pb-entry p { margin: 0 0 8px; line-height: 1.55; }
}
.key-help { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.key-help summary { font-weight: 600; color: var(--accent); cursor: pointer; }
.key-help ol { padding-left: 1.2em; margin: 10px 0; font-size: .92rem; }
.key-help li { margin-bottom: 6px; }

/* ---------- First-time setup ---------- */
#setup { width: min(480px, calc(100vw - 20px)); max-height: 92vh; border: 0; border-radius: 24px; padding: 16px 18px 18px; background: var(--bg); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
#setup::backdrop { background: color-mix(in srgb, var(--page) 85%, #000); }
#setup .scene { width: 100%; margin: 6px 0 12px; border-radius: 16px; }
.setup-top { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }
.setup-dots { display: flex; gap: 6px; margin: 8px 0 10px; }
.setup-dots span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.setup-dots span.done { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.setup-dots span.on { background: var(--accent); }
.setup-h { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; margin: 6px 0 6px; }
.setup-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.setup-next { min-width: 120px; padding: 12px 20px; font-size: 1rem; }
.setup-key-status { color: var(--accent); font-weight: 600; font-size: .85rem; min-height: 1.2em; margin: 0; }
.setup-paths { display: grid; gap: 8px; }
.setup-path { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; }
.setup-path[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.setup-path .pc-icon { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.setup-path .pc-icon svg { width: 24px; height: 24px; }
.setup-path small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.setup-list { list-style: none; padding: 0; margin: 0 0 6px; }
.setup-row { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); padding: 11px 2px; text-align: left; font-size: .95rem; }
.setup-list li:first-child .setup-row { border-top: 0; }
.setup-row small { color: var(--muted); font-size: .75rem; }
.setup-row .go { margin-left: auto; color: var(--muted); }
.strongs { margin: 4px 0 0 !important; font-size: .85rem !important; color: var(--muted); }
.strongs-num { display: inline-block; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 7px; margin-right: 4px; font-size: .78rem; }
.xrefs { display: grid; gap: 8px; }
.xref, .ws-verse { display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.xref span, .ws-verse span { color: var(--muted); font-size: .85rem; }
.ws-total { margin: 12px 0 8px; }
.ws-list { display: grid; gap: 6px; }
.notes-card { margin-bottom: 18px; }

/* Strong's concordance list under every chapter */
.sc-list { display: grid; gap: 6px; margin: 8px 0; }
.sc-word { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.sc-word > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.sc-word > summary::-webkit-details-marker { display: none; }
.sc-word .orig { font-family: "SBL Hebrew", "Times New Roman", var(--serif); font-size: 1.3rem; color: var(--text); }
.sc-word .say { font-style: italic; color: var(--accent); }
.sc-word .means { color: var(--text); font-size: .92rem; }
.sc-meta { flex-basis: 100%; font-size: .78rem; color: var(--muted); }
.sc-word[open] { border-color: var(--accent); }
.sc-def { padding: 0 12px 10px; }
.sc-def p { margin: 6px 0; font-size: .92rem; }
.sc-small > summary { cursor: pointer; color: var(--muted); font-size: .88rem; padding: 6px 2px; }
.sc-credit { margin-top: 10px; }
.open-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn-link { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--accent); background: var(--bg); text-decoration: none; font-size: .88rem; font-weight: 600; }
.open-note { flex-basis: 100%; margin: 4px 0 0; }

/* ---------- Classic look: dark brown-gray desk, white pages, olive and cross, nothing moves ---------- */
:root[data-style="classic"] {
  --page: #3a3430; --page-deep: #2c2724; --on-page: #f3f1ed; --on-page-muted: #c2bab1;
  --bg: #ffffff; --surface: #ffffff; --text: #24201d; --muted: #6f6861; --line: #e3dfda;
  --accent: #4a413a; --accent-soft: #efece8; --warm: #8c6e54; --gold: #a8957a; --verse: #9b948d;
  --sky-top: #e9e7e3; --sky-low: #fbfaf8; --far-hill: #c9c3bb;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: light;
}
:root[data-still] *, :root[data-still] *::before, :root[data-still] *::after { animation: none !important; transition: none !important; }
:root[data-still] .mascot, :root[data-still] #confetti { display: none !important; }
.cl-sky-top { stop-color: #e6e3de; } .cl-sky-low { stop-color: #fbfaf8; }
.cl-hill { fill: #8f8378; } .cl-hill.far { fill: #c4bcb2; }
.cl-cross rect { fill: #4a3f36; }
.cl-stem { fill: none; stroke: #6b5c4e; stroke-width: 2; stroke-linecap: round; }
.cl-leaf { fill: #7d8a6e; stroke: #5f6b52; stroke-width: .5; }
.cl-olive { fill: #4b4a3a; }
.cl-rule { stroke: #d8d2ca; stroke-width: 1; }
.cl-band { fill: #f3f1ee; stroke: #e1dcd5; }
.classic-strip .cl-cross rect { fill: #5a4d42; }
.classic-flourish .cl-cross rect { fill: #8a7a6b; }
:root[data-style="classic"] .vine { opacity: .5; }
:root[data-style="classic"] .vine .leaf { fill: #8f8a80; }
:root[data-still] .reader { font-family: var(--serif); }
:root[data-still] .notes-card { border-top: 3px solid var(--accent); }
:root[data-still] .notes-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root[data-style="classic"]:not([data-theme="light"]) { --bg: #ffffff; --surface: #ffffff; --text: #24201d; --muted: #6f6861; --line: #e3dfda; --accent: #4a413a; --accent-soft: #efece8; --page: #2c2724; --page-deep: #221e1b; color-scheme: light; }
}
.pc-featured { grid-column: 1 / -1; border: 2px solid var(--accent); }
.pc-featured h3 { font-size: 1.3rem; }
.paths-sub { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin: 6px 0 0; }
.path-cards.four { grid-auto-rows: 1fr; }
.path-cards.four .path-card { display: flex; flex-direction: column; }
.path-cards.four .path-card .pc-actions { margin-top: auto; padding-top: 10px; }
.share-key { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.share-key > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.share-url { word-break: break-all; background: var(--accent-soft); padding: 8px; border-radius: 8px; }
.invite-toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(92vw, 460px); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: 0 12px 32px rgb(0 0 0 / .25); z-index: 60; }
.invite-toast p { margin: 0 0 8px; }

/* ---------- Fill the screen on every device ---------- */
html, body { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
.topbar { padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
main { padding-left: calc(26px + env(safe-area-inset-left)); padding-right: calc(26px + env(safe-area-inset-right)); }
@media (min-width: 760px) { main { max-width: none; padding-left: calc(78px + env(safe-area-inset-left)); padding-right: calc(78px + env(safe-area-inset-right)); } }
@media (min-width: 760px) and (max-width: 1099px) { main { max-width: 900px; } }
/* iPad landscape and bigger: Bible text on the left, the study section beside it */
@media (min-width: 1100px) {
  main { max-width: 1400px; }
  #view-read:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 38%); column-gap: 28px; align-items: start; }
  #view-read > * { grid-column: 1; min-width: 0; }
  #view-read > #studyNotes { grid-column: 2; grid-row: 1 / span 30; position: sticky; top: calc(76px + env(safe-area-inset-top)); max-height: calc(100dvh - 96px - var(--tabbar-h) - env(safe-area-inset-top)); overflow-y: auto; margin-top: 0; }
  #view-read .reader { max-width: 46em; }
}

/* ---------- Wooden Cross look: warm wood browns with gray and white, matched to the wooden cross picture ---------- */
:root[data-style="wood"] {
  /* matched to the photo: slate-blue sky, weathered gray-brown wood, golden horizon */
  --page: #3d4659; --page-deep: #2f3747; --on-page: #f3f4f8; --on-page-muted: #c2c8d6;
  --bg: #ffffff; --surface: #ffffff; --text: #23262e; --muted: #6b6f7c; --line: #e1e3ea;
  --accent: #6b5243; --accent-soft: #eef0f5; --warm: #b9855a; --gold: #c9a25a; --verse: #9a9eab;
  --sky-top: #e3e7f2; --sky-low: #f7f3ea; --far-hill: #c9ccd6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-style="wood"]:not([data-theme="light"]) { --bg: #ffffff; --surface: #ffffff; --text: #23262e; --muted: #6b6f7c; --line: #e1e3ea; --accent: #6b5243; --accent-soft: #eef0f5; --page: #2f3747; --page-deep: #252b38; color-scheme: light; }
}
:root[data-style="wood"] .cl-cross rect { fill: #6b5243; }
:root[data-style="wood"] .cl-band { fill: #eef0f5; stroke: #e1e3ea; }
:root[data-style="wood"] .cl-leaf { fill: #8d9180; stroke: #6c705f; }
:root[data-style="wood"] .vine { opacity: .4; }
:root[data-style="wood"] .vine .leaf { fill: #9aa2b6; }
:root[data-style="wood"] .pc-featured, :root[data-style="wood"] .notes-card { border-color: var(--gold); }
:root[data-style="wood"] .strongs-num { color: #6b5243; background: #f6efe2; }
.photo-scene { position: relative; display: block; width: calc(100% + 36px); margin: -22px -18px 16px; border-radius: 24px 24px 0 0; overflow: hidden; aspect-ratio: 360 / 170; background: #e9e4de; }
.photo-scene > svg, .photo-scene > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
/* Tall enough to show the gull, the whole crossbar and the horizon */
.photo-scene { aspect-ratio: 1 / 1; max-height: 62vh; }
.photo-scene > img { object-position: 50% 30%; }
@media (min-width: 760px) { .photo-scene { aspect-ratio: 16 / 10; } .photo-scene > img { object-position: 50% 17%; } }
.wood-grain { stroke: #5b3c25; stroke-opacity: .35; stroke-width: .8; fill: none; }
