/* ---------- themes ---------- */
:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --scripture-size: 19px;
  --radius: 14px;
  --tabs-h: 64px;
  --on-accent: #fff;
  --hl-gold: #f6dc8b; --hl-sage: #cfe0b8; --hl-sky: #c7dcef; --hl-rose: #f1c9c4;
  /* sepia is the default */
  --bg: #f6f1e7; --paper: #fffdf8; --ink: #2a2622; --muted: #857b6e; --line: #e6ddcd;
  --accent: #7a3b2e; --accent-soft: #f0e2d9; --ok: #5d7a4f; --miss: #c9826b;
  color-scheme: light;
}
:root[data-theme="light"] {
  --bg: #f7f7f5; --paper: #ffffff; --ink: #1d1d1f; --muted: #7a7a7d; --line: #e4e4e1;
  --accent: #8a3a2c; --accent-soft: #f4e9e6; --ok: #4f7a45; --miss: #c9826b;
}
:root[data-theme="sage"] {
  --bg: #edf2e9; --paper: #f8fbf5; --ink: #253029; --muted: #6c7b70; --line: #d6dfd0;
  --accent: #3d6a52; --accent-soft: #dce8dc; --ok: #4a7a58; --miss: #c48a6a;
  --hl-sage: #c4dcae;
}
:root[data-theme="sea"] {
  --bg: #eaf1f4; --paper: #f7fafc; --ink: #1e2a32; --muted: #687b86; --line: #d2dfe6;
  --accent: #2e6280; --accent-soft: #d9e7ef; --ok: #487c69; --miss: #c7856f;
  --hl-sky: #bcd6ec;
}
:root[data-theme="dusk"] {
  --bg: #f1edf5; --paper: #fbf9fd; --ink: #29243a; --muted: #7a7288; --line: #e0d9e9;
  --accent: #684a92; --accent-soft: #e7dff2; --ok: #5a7e5a; --miss: #c48477;
}
:root[data-theme="dark"] {
  --bg: #1c1a17; --paper: #24211d; --ink: #ece4d6; --muted: #9c9284; --line: #3a352e;
  --accent: #e0a48f; --accent-soft: #3b2c26; --ok: #9cbf88; --miss: #c98b75; --on-accent: #1c1a17;
  --hl-gold: #6b5a22; --hl-sage: #43532f; --hl-sky: #2f4a62; --hl-rose: #643b36;
  color-scheme: dark;
}
:root[data-theme="night"] {
  --bg: #121a25; --paper: #19222f; --ink: #e2e8f0; --muted: #8a97a9; --line: #2a3546;
  --accent: #93b8e0; --accent-soft: #22324a; --ok: #8cc19a; --miss: #d08f7c; --on-accent: #121a25;
  --hl-gold: #5f5427; --hl-sage: #34503d; --hl-sky: #2a4868; --hl-rose: #5a3740;
  color-scheme: dark;
}
:root[data-theme="forest"] {
  --bg: #151c18; --paper: #1c2520; --ink: #e3ebe3; --muted: #8fa194; --line: #2c3a31;
  --accent: #a9cf9a; --accent-soft: #263a2c; --ok: #a9cf9a; --miss: #d0947a; --on-accent: #151c18;
  --hl-gold: #5e5626; --hl-sage: #375437; --hl-sky: #2b4a5a; --hl-rose: #5b3a3a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #1c1a17; --paper: #24211d; --ink: #ece4d6; --muted: #9c9284; --line: #3a352e;
    --accent: #e0a48f; --accent-soft: #3b2c26; --ok: #9cbf88; --miss: #c98b75; --on-accent: #1c1a17;
    --hl-gold: #6b5a22; --hl-sage: #43532f; --hl-sky: #2f4a62; --hl-rose: #643b36;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { font-weight: 600; margin: 0; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.err { color: #b3402c; min-height: 1.5em; font-size: 14px; }
.hidden { display: none !important; }

.main { max-width: 680px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 18px calc(var(--tabs-h) + env(safe-area-inset-bottom) + 40px); }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(env(safe-area-inset-bottom) + 4px); z-index: 20; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; padding: 4px 0; }
.tabs a.on { color: var(--accent); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sync-dot { position: fixed; top: calc(env(safe-area-inset-top) + 8px); right: 10px; width: 7px; height: 7px; border-radius: 50%; background: transparent; z-index: 30; }
.sync-dot.syncing { background: #d4b25a; }
.sync-dot.offline { background: var(--miss); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 10px 18px; cursor: pointer; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.ghost { background: transparent; }
.btn.danger { background: #b3402c; border-color: #b3402c; color: #fff; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 14px; }
.link.danger { color: #b3402c; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); font-size: 24px; cursor: pointer; }
.iconbtn.off { opacity: .25; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }

/* cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.card.soft { background: var(--accent-soft); border-color: transparent; }
.card.catchup { border-color: var(--miss); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.hl-gold { background: var(--hl-gold); } .dot.hl-sage { background: var(--hl-sage); } .dot.hl-sky { background: var(--hl-sky); } .dot.hl-rose { background: var(--hl-rose); }

/* login */
.login { max-width: 340px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 18vh) 24px 40px; text-align: center; }
.login-mark { font-size: 32px; color: var(--accent); }
.login h1 { font-family: var(--serif); font-size: 32px; font-weight: 500; margin-top: 8px; }
.login form { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.login input { font: 18px var(--sans); padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-align: center; }
.boot, .spinner-wrap { display: grid; place-items: center; height: 60vh; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* day */
.day-head { text-align: center; padding-top: 4px; }
.day-nav { display: flex; align-items: center; justify-content: space-between; }
.day-meta { font-size: 13px; color: var(--muted); line-height: 1.35; }
.day-meta b { color: var(--accent); font-weight: 600; }
.day-ref { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.15; margin-top: 10px; letter-spacing: -0.01em; }
.day-titles { font-family: var(--serif); font-style: italic; color: var(--muted); margin-top: 6px; font-size: 17px; }
.day-sub { font-size: 13px; color: var(--muted); margin-top: 8px; }

.intro summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.intro summary::-webkit-details-marker { display: none; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.intro summary strong { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.intro dl { margin: 12px 0 0; }
.intro dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 10px; }
.intro dd { margin: 2px 0 0; font-size: 15px; }

/* scripture */
.scripture { font-family: var(--serif); font-size: var(--scripture-size); line-height: 1.7; margin: 22px 0 8px; }
.scripture p { margin: 0 0 0.9em; text-indent: 0; }
.scripture p.s-q1, .scripture p.s-q, .scripture p.s-pi1 { padding-left: 1.4em; margin-bottom: 0.15em; }
.scripture p.s-q2, .scripture p.s-pi2 { padding-left: 2.6em; margin-bottom: 0.15em; }
.scripture p.s-m { text-indent: 0; }
.scripture p.s-b { height: .5em; }
.scripture .c-nd, .scripture .c-sc { font-variant: small-caps; }
.scripture .c-add, .scripture .c-it { font-style: italic; }
.vn { font-family: var(--sans); font-size: 0.55em; color: var(--muted); vertical-align: 0.6em; margin: 0 2px 0 4px; cursor: pointer; }
.vn.has-note::after { content: "•"; color: var(--accent); margin-left: 1px; }
.chap { font-family: var(--sans); font-weight: 600; font-size: 0.8em; color: var(--accent); margin-right: 2px; }
.sec-h { display: block; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 1.4em 0 .4em; text-indent: 0; }
.scripture p:first-child .sec-h:first-child { margin-top: 0; }
.vt { cursor: pointer; border-radius: 3px; transition: background-color .15s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.vt.hl-gold { background: var(--hl-gold); } .vt.hl-sage { background: var(--hl-sage); } .vt.hl-sky { background: var(--hl-sky); } .vt.hl-rose { background: var(--hl-rose); }
.vt.sel { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.copyright { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-top: 18px; }
.vgrid-intro { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 12px 0; }
.vgrid-label { font-family: var(--sans); font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.vgrid-sec { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 4px; }
.vgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.vbox { font-family: var(--sans); font-size: 14px; width: 38px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.vbox.sel { outline: 2px solid var(--accent); text-decoration: none; }

/* done */
.done-wrap { margin: 18px 0 8px; }
.done-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: var(--radius); border: 1.5px dashed var(--line); background: transparent; font-size: 17px; cursor: pointer; color: var(--ink); }
.done-btn .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); display: inline-grid; place-items: center; font-size: 14px; }
.done-btn.is-done { border-style: solid; border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.done-btn.is-done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }

/* blocks */
.block { margin-top: 26px; }
.block-h { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.block-h .link { text-transform: none; letter-spacing: 0; font-weight: 500; }
.note { width: 100%; min-height: 110px; resize: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); padding: 12px 14px; font: 16px/1.5 var(--sans); }
.note:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.note-foot { min-height: 18px; text-align: right; }

/* deeper */
.deeper { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.deeper summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.deeper summary::-webkit-details-marker { display: none; }
.deeper summary::before { content: "＋"; position: absolute; right: 16px; top: 14px; color: var(--muted); font-weight: 400; }
.deeper[open] summary::before { content: "－"; }
.deeper summary .muted { font-weight: 400; }
.deeper h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin: 18px 0 6px; }
.deeper p { margin: 0 0 10px; font-size: 15.5px; }
.reading { border-left: 2px solid var(--line); padding-left: 12px; margin: 10px 0; }
.reading .who { font-size: 13px; font-weight: 600; }
.reading p { margin: 2px 0 0; }
.ponder { font-family: var(--serif); font-style: italic; font-size: 17px !important; }
.xrefs { display: flex; flex-direction: column; gap: 6px; }
.xref { text-align: left; border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; }
.xref b { color: var(--accent); font-weight: 600; font-size: 14px; }
.xref span { font-size: 13.5px; color: var(--muted); }

/* highlights */
.hl-item { background: var(--paper); border: 1px solid var(--line); border-left-width: 5px; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.hl-bar-gold { border-left-color: var(--hl-gold); } .hl-bar-sage { border-left-color: var(--hl-sage); } .hl-bar-sky { border-left-color: var(--hl-sky); } .hl-bar-rose { border-left-color: var(--hl-rose); }
.hl-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hl-ref { font-weight: 600; font-size: 14px; }
.hl-tag { font-size: 12px; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.hl-item blockquote { font-family: var(--serif); font-size: 17px; line-height: 1.55; margin: 8px 0 0; }
.hl-note { font-size: 14.5px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); white-space: pre-wrap; }
.hl-actions { display: flex; gap: 16px; margin-top: 10px; }
.group-h { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 22px 0 10px; }

/* questions */
.q-item { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.qcheck { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; display: grid; place-items: center; font-size: 13px; cursor: pointer; padding: 0; margin-top: 1px; }
.q-item.resolved .qcheck { background: var(--ok); border-color: var(--ok); color: #fff; }
.q-item.resolved .q-text { color: var(--muted); text-decoration: line-through; }
.q-body { flex: 1; min-width: 0; }
.q-meta { font-size: 13px; margin-top: 2px; }
.q-answer { font-size: 14.5px; margin-top: 8px; padding: 8px 10px; background: var(--bg); border-radius: 8px; white-space: pre-wrap; }
.q-actions { display: flex; gap: 16px; margin-top: 8px; }

/* selection bar */
.selbar { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 10px); max-width: 560px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px 12px; z-index: 25; }
.selbar-label { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 6px; }
.selbar-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.selbar .iconbtn { width: 38px; height: 38px; font-size: 18px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.hl-gold { background: var(--hl-gold); } .swatch.hl-sage { background: var(--hl-sage); } .swatch.hl-sky { background: var(--hl-sky); } .swatch.hl-rose { background: var(--hl-rose); }
.sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.selbar-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.selbar-legend span { display: inline-flex; align-items: center; gap: 4px; }
.selbar-legend .dot { width: 8px; height: 8px; }

/* pages */
.page-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 14px; gap: 10px; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a { padding: 5px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.seg a.on { background: var(--ink); color: var(--bg); }
.seg.wide { display: flex; margin-bottom: 14px; }
.seg.wide a { flex: 1; text-align: center; }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state p { margin: 4px 0; }

.stats { display: flex; justify-content: space-around; text-align: center; margin: 4px 0 10px; }
.stats b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.stats span { font-size: 12px; color: var(--muted); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.progress i { display: block; height: 100%; background: var(--ok); }

.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-nav h2 { font-family: var(--serif); font-weight: 500; font-size: 21px; }
.mg { display: grid; grid-template-columns: repeat(7, 1fr); }
.mg.big { gap: 5px; }
.mg-h { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 2px; }
.mg.big .mg-c { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); position: relative; }
.mg.big .mg-c.empty, .mg.big .mg-c.out { background: transparent; border-color: transparent; color: var(--muted); opacity: .4; }
.mg.big .mg-c.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.mg.big .mg-c.miss { border-color: var(--miss); border-width: 1.5px; }
.mg.big .mg-c.grace { border-style: dashed; border-color: var(--muted); }
.mg.big .mg-c.today { box-shadow: 0 0 0 2px var(--accent); }
.mg.big .mg-c.has-note::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); }
.lg.done { background: var(--ok); border-color: var(--ok); } .lg.miss { border-color: var(--miss); } .lg.grace { border-style: dashed; border-color: var(--muted); } .lg.today { box-shadow: 0 0 0 2px var(--accent); }
.month-list { display: flex; flex-direction: column; }
.ml-row { display: flex; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--ink); align-items: baseline; }
.ml-date { width: 64px; flex: none; font-size: 13px; color: var(--muted); }
.ml-ref { flex: 1; font-family: var(--serif); font-size: 16px; }
.ml-row.done .ml-ref { color: var(--muted); }
.ml-tick { color: var(--ok); }

.year-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px; }
.ym { color: var(--ink); }
.ym-h { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.mg.mini { gap: 2px; }
.mg.mini .mg-c { aspect-ratio: 1; border-radius: 2px; background: var(--line); }
.mg.mini .mg-c.empty, .mg.mini .mg-c.out { background: transparent; }
.mg.mini .mg-c.done { background: var(--ok); }
.mg.mini .mg-c.miss { background: var(--miss); opacity: .6; }
.mg.mini .mg-c.grace { background: var(--muted); opacity: .5; }
.mg.mini .mg-c.today { outline: 1.5px solid var(--accent); }
.books { display: flex; flex-direction: column; gap: 2px; }
.bk { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 10px; padding: 6px 0; color: var(--ink); font-size: 14px; }
.bk-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bk-bar i { display: block; height: 100%; background: var(--ok); }
.bk-n { font-size: 12px; color: var(--muted); text-align: right; }

.j-item { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; color: var(--ink); }
.j-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.j-top b { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.j-text { font-size: 14.5px; margin-top: 6px; white-space: pre-wrap; color: var(--ink); opacity: .85; }
.set-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; gap: 10px; }
.set-row select { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,0); z-index: 50; display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.sheet-wrap.open { background: rgba(0,0,0,.35); }
.sheet { width: 100%; max-width: 640px; background: var(--paper); border-radius: 20px 20px 0 0; padding: 18px 18px calc(env(safe-area-inset-bottom) + 18px); transform: translateY(100%); transition: transform .22s ease; max-height: 85vh; overflow: auto; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-h { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
.sheet-ta { min-height: 130px; }
.xref-text { margin: 8px 0; font-size: calc(var(--scripture-size) - 1px); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 20px); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: all .25s; z-index: 60; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* theme picker */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.theme-opt { border: 2px solid transparent; border-radius: 14px; padding: 0; background: none; cursor: pointer; text-align: center; }
.theme-opt.on { border-color: var(--accent); }
.theme-sw { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; border-radius: 12px; border: 1px solid rgba(0,0,0,.08); font-family: var(--serif); font-size: 20px; }
.theme-sw i { width: 18px; height: 4px; border-radius: 2px; }
.theme-name { font-size: 12px; color: var(--muted); margin: 4px 0 2px; }
.theme-opt.on .theme-name { color: var(--ink); font-weight: 600; }
