/* The Holy Bible — reader styles
   Design notes: the text is the hero; chrome is glass that steps aside while reading.
   One luminous moment per chapter (the drop numeral). Everything else stays quiet. */

@font-face { font-family: "Literata"; src: url("../fonts/Literata.woff") format("woff"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/Literata-Italic.woff") format("woff"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/EBGaramond.woff") format("woff"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/EBGaramond-Italic.woff") format("woff"); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/Atkinson-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/Atkinson-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/Atkinson-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --read-font: "Literata", ui-serif, Georgia, serif;
  --font-scale: 1;
  --read-size: 20px;
  --read-leading: 1.7;
  --measure: 35em;
  --bar-h: 52px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --r-s: 4px; --r-m: 6px; --r-l: 8px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Color profiles ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-2: #f5f5f7; --bg-3: #e8e8ed; --raised: #ffffff;
  --text: #1d1d1f; --text-2: #6e6e73; --text-3: #a1a1a6; --hair: rgba(0,0,0,.09);
  --glass: rgba(255,255,255,.74); --glass-strong: rgba(255,255,255,.9);
  --accent: #2a4bd7; --accent-soft: rgba(42,75,215,.1); --on-accent: #fff;
  --wj: #b3261e; --gold: #b7862a;
  --num-grad: linear-gradient(160deg, #2a4bd7 8%, #7b4fe0 52%, #e3a23e 96%);
  --aura-a: rgba(42,75,215,.09); --aura-b: rgba(227,162,62,.09);
  --shadow: 0 18px 50px rgba(0,0,0,.14), 0 2px 10px rgba(0,0,0,.06);
  --hl-gold: rgba(247,201,72,.42); --hl-green: rgba(126,196,96,.36); --hl-blue: rgba(86,166,245,.32); --hl-rose: rgba(244,120,150,.32); --hl-violet: rgba(154,116,245,.32);
}
html[data-theme="vellum"] {
  color-scheme: light;
  --bg: #f6f0e3; --bg-2: #ede5d3; --bg-3: #e2d8c2; --raised: #fbf7ee;
  --text: #2b2420; --text-2: #776a5c; --text-3: #a89b8a; --hair: rgba(60,40,20,.12);
  --glass: rgba(246,240,227,.76); --glass-strong: rgba(250,246,237,.92);
  --accent: #8f3b1f; --accent-soft: rgba(143,59,31,.1); --on-accent: #fff;
  --wj: #a3271b; --gold: #9a6b1c;
  --num-grad: linear-gradient(160deg, #8f3b1f 8%, #b0582a 50%, #c99231 96%);
  --aura-a: rgba(143,59,31,.07); --aura-b: rgba(201,146,49,.1);
  --shadow: 0 18px 50px rgba(60,40,20,.16), 0 2px 10px rgba(60,40,20,.08);
  --hl-gold: rgba(232,183,52,.42); --hl-green: rgba(120,170,80,.34); --hl-blue: rgba(80,140,210,.3); --hl-rose: rgba(220,110,130,.32); --hl-violet: rgba(140,110,210,.3);
}
html[data-theme="galilee"] {
  color-scheme: light;
  --bg: #e9eff3; --bg-2: #dde6ec; --bg-3: #cfdbe3; --raised: #f3f7fa;
  --text: #13202a; --text-2: #566978; --text-3: #8b9cab; --hair: rgba(10,40,60,.1);
  --glass: rgba(233,239,243,.76); --glass-strong: rgba(243,247,250,.92);
  --accent: #1d6a8a; --accent-soft: rgba(29,106,138,.12); --on-accent: #fff;
  --wj: #b02a2a; --gold: #9a7420;
  --num-grad: linear-gradient(160deg, #1d6a8a 8%, #4673d6 52%, #9a7fe0 96%);
  --aura-a: rgba(29,106,138,.09); --aura-b: rgba(154,127,224,.09);
  --shadow: 0 18px 50px rgba(10,40,60,.16), 0 2px 10px rgba(10,40,60,.07);
  --hl-gold: rgba(240,196,70,.45); --hl-green: rgba(110,190,110,.36); --hl-blue: rgba(70,150,235,.32); --hl-rose: rgba(240,115,145,.32); --hl-violet: rgba(150,110,240,.32);
}
html[data-theme="olive"] {
  color-scheme: light;
  --bg: #eef0e6; --bg-2: #e3e7d8; --bg-3: #d6dbc8; --raised: #f6f7f0;
  --text: #22261b; --text-2: #626a55; --text-3: #979e88; --hair: rgba(40,50,20,.11);
  --glass: rgba(238,240,230,.76); --glass-strong: rgba(246,247,240,.92);
  --accent: #55712a; --accent-soft: rgba(85,113,42,.12); --on-accent: #fff;
  --wj: #a8332a; --gold: #8f7020;
  --num-grad: linear-gradient(160deg, #55712a 8%, #8f8a32 52%, #c98a2e 96%);
  --aura-a: rgba(85,113,42,.09); --aura-b: rgba(201,138,46,.09);
  --shadow: 0 18px 50px rgba(40,50,20,.16), 0 2px 10px rgba(40,50,20,.07);
  --hl-gold: rgba(238,192,64,.45); --hl-green: rgba(120,180,80,.36); --hl-blue: rgba(80,150,220,.3); --hl-rose: rgba(230,115,140,.32); --hl-violet: rgba(145,115,225,.3);
}
html[data-theme="dusk"] {
  color-scheme: dark;
  --bg: #1c1c1e; --bg-2: #2c2c2e; --bg-3: #3a3a3c; --raised: #2c2c2e;
  --text: #f2f2f7; --text-2: #a1a1a6; --text-3: #6e6e73; --hair: rgba(255,255,255,.1);
  --glass: rgba(28,28,30,.72); --glass-strong: rgba(44,44,46,.92);
  --accent: #8ea6ff; --accent-soft: rgba(142,166,255,.16); --on-accent: #10142a;
  --wj: #ff8a7a; --gold: #e2b65a;
  --num-grad: linear-gradient(160deg, #8ea6ff 8%, #c49bff 52%, #ffc77a 96%);
  --aura-a: rgba(142,166,255,.1); --aura-b: rgba(255,199,122,.07);
  --shadow: 0 18px 50px rgba(0,0,0,.5), 0 2px 10px rgba(0,0,0,.3);
  --hl-gold: rgba(240,190,60,.34); --hl-green: rgba(110,190,90,.3); --hl-blue: rgba(80,160,245,.32); --hl-rose: rgba(240,110,140,.32); --hl-violet: rgba(160,120,250,.34);
}
html[data-theme="midnight"] {
  color-scheme: dark;
  --bg: #000000; --bg-2: #161618; --bg-3: #262628; --raised: #161618;
  --text: #e5e5ea; --text-2: #8e8e93; --text-3: #5a5a5f; --hair: rgba(255,255,255,.09);
  --glass: rgba(0,0,0,.7); --glass-strong: rgba(22,22,24,.94);
  --accent: #7f9bff; --accent-soft: rgba(127,155,255,.16); --on-accent: #0b0f22;
  --wj: #ff7b6b; --gold: #d8a94c;
  --num-grad: linear-gradient(160deg, #7f9bff 8%, #b48cff 52%, #f2b25f 96%);
  --aura-a: rgba(127,155,255,.08); --aura-b: rgba(242,178,95,.05);
  --shadow: 0 18px 50px rgba(0,0,0,.7), 0 2px 10px rgba(0,0,0,.5);
  --hl-gold: rgba(240,190,60,.3); --hl-green: rgba(110,190,90,.27); --hl-blue: rgba(80,160,245,.3); --hl-rose: rgba(240,110,140,.3); --hl-violet: rgba(160,120,250,.32);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font-family: var(--ui); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .45s var(--ease), color .45s var(--ease);
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; }
::selection { background: var(--accent-soft); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: calc(var(--bar-h) + var(--safe-t)); padding: var(--safe-t) 12px 0;
  display: grid; grid-template-columns: 1fr minmax(0, max-content) 1fr; align-items: center; gap: 8px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 34%, transparent), color-mix(in srgb, var(--bg) 0%, transparent));
  border-bottom: 0;
  transition: transform .35s var(--ease), background-color .45s var(--ease);
}
.bars-hidden .topbar { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 9px; justify-self: start; padding: 6px 8px; border-radius: 6px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; border-radius: 4px; }
.passage-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 16px; border-radius: 8px;
  font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap;
  transition: background-color .2s;
}
.passage-btn:hover { background: var(--bg-2); }
.passage-group { justify-self: center; display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.passage-btn { min-width: 0; }
#passageLabel { display: inline-flex; min-width: 0; }
#passageLabel .pl-bk { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#passageLabel .pl-ch { flex: none; margin-left: .28em; }
@media (min-width: 761px) and (max-width: 1040px) { .brand span { display: none; } }
.passage-group .icon-btn { width: 36px; height: 36px; }
.passage-group .icon-btn svg.i { width: 20px; height: 20px; }
.passage-btn svg.i { width: 16px; height: 16px; color: var(--text-2); stroke-width: 2.2; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 2px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--text);
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn .aa { font-family: var(--read-font); font-size: 19px; line-height: 1; letter-spacing: -.02em; }
.icon-btn .aa small { font-size: 14px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 6px; background: var(--bg-2); margin-right: 6px; }
.seg button {
  height: 28px; padding: 0 11px; border-radius: 4px; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--text-2);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px var(--hair); }
.seg button.locked { color: var(--text-3); }
.trans-btn { height: 32px; padding: 0 12px; border-radius: 8px; background: var(--bg-2); font-size: 13px; font-weight: 700; letter-spacing: .02em; }

/* ---------- Reader ---------- */
main { position: relative; overflow-x: hidden; overflow-x: clip; }
.reader {
  position: relative; isolation: isolate;
  max-width: calc(var(--measure) + 48px); margin: 0 auto;
  padding: calc(var(--bar-h) + var(--safe-t) + 56px) 24px calc(140px + var(--safe-b));
  font-family: var(--read-font); font-size: calc(var(--read-size) * var(--font-scale)); line-height: var(--read-leading);
  font-optical-sizing: auto;
}
.reader::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; left: 50%; width: min(980px, 100vw); height: 520px; transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 32% 40%, var(--aura-a), transparent 72%),
    radial-gradient(closest-side at 70% 30%, var(--aura-b), transparent 70%);
  filter: blur(30px);
}
.reader.justify .para, .reader.justify .vline { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }

.ch-head { margin: 0 0 1.1em; font-family: var(--ui); }
.ch-h1 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.012em; color: var(--text-2); }
.ch-head.intro .ch-h1 { font-size: clamp(40px, 8vw, 60px); line-height: 1.04; font-weight: 700; letter-spacing: -.035em; color: var(--text); }
.ch-kjv-title { margin: .55em 0 0; font-family: var(--read-font); font-style: italic; font-size: 17px; color: var(--text-2); line-height: 1.4; }
.ch-head.intro { margin-bottom: 1.6em; }

.dropnum {
  float: left; display: block;
  font-family: "Literata", Georgia, serif; font-style: normal; font-weight: 200; font-variation-settings: "opsz" 72;
  font-size: calc(var(--read-leading) * 2.62em); line-height: 1.2;
  margin: -.2em .1em -.27em -.08em; padding: .02em .06em .1em .04em;
  font-variant-numeric: lining-nums;
  background: var(--num-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
  animation: numIn 1.1s var(--ease) both;
}
.dropnum.two { margin-right: .2em; }
.dropnum.three { margin-right: .2em; font-size: calc(var(--read-leading) * 2.2em); }
@keyframes numIn { from { opacity: 0; transform: translateY(.06em); } to { opacity: 1; transform: none; } }

.para { margin: 0 0 .85em; }
.vline { margin: 0 0 .5em; }
.poem { margin: 0 0 .35em; }
.poem + .para, .poem + .vline { margin-top: .8em; }
.poem.has-drop, .para:has(> .dropnum):has(+ .poem) { display: flow-root; margin-bottom: .5em; }
.poem.has-drop .dropnum { margin-bottom: 0; }
.poem.has-drop .ln, .poem.has-drop > .v { padding-left: 0 !important; text-indent: 0 !important; }
.poem.has-drop .ln.ind { padding-left: 1.6em !important; }
.v { border-radius: 3px; cursor: pointer; transition: background-color .25s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
div.v { display: block; }
.ln { display: block; padding-left: 1.6em; text-indent: -1.6em; }
.ln.ind { padding-left: 3.2em; }
.poem > .v:not(:has(.ln)) { display: block; padding-left: 1.6em; text-indent: -1.6em; }
.vn {
  font-family: var(--ui); font-size: .56em; font-weight: 600; color: var(--text-3);
  vertical-align: .62em; line-height: 0; margin: 0 .3em 0 .12em; font-variant-numeric: tabular-nums; letter-spacing: 0;
  text-indent: 0; user-select: none; -webkit-user-select: none; white-space: nowrap;
}
.no-vnum .vn { display: none; }
.v.first .vn { display: none; }
.sc { font-variant-caps: small-caps; letter-spacing: .03em; }
.show-italics .add { font-style: italic; }
.red .wj { color: var(--wj); }
.v.sel { text-decoration: underline dotted var(--accent) 2px; text-underline-offset: .24em; background: var(--accent-soft); }
.v.hl-gold { background: var(--hl-gold); } .v.hl-green { background: var(--hl-green); } .v.hl-blue { background: var(--hl-blue); }
.v.hl-rose { background: var(--hl-rose); } .v.hl-violet { background: var(--hl-violet); }
.v.bm .vn::before, .v.bm.first::before {
  content: ""; display: inline-block; width: .62em; height: .95em; margin-right: .22em; vertical-align: -.08em;
  background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}
.v.bm.first::before { width: .38em; height: .58em; margin-right: .3em; vertical-align: .05em; }
.v.flash { animation: flash 2.2s var(--ease); }
@keyframes flash { 0%, 30% { background-color: var(--accent-soft); box-shadow: 0 0 0 .18em var(--accent-soft); } 100% { background-color: transparent; box-shadow: none; } }

.sec { margin: 1.7em 0 .55em; font-family: var(--ui); font-size: 17px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; color: var(--text); }
.sec.s2 { font-size: 15px; font-weight: 600; color: var(--text-2); margin-top: 1.2em; }
.superscript { margin: .2em 0 .9em; font-style: italic; font-size: .9em; color: var(--text-2); line-height: 1.5; }
.ch-head + .sec { margin-top: .4em; }

.ch-foot { margin: 3em 0 0; font-family: var(--ui); font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.ch-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2.4em; font-family: var(--ui); }
.cn {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--r-m); background: var(--bg-2);
  transition: background-color .2s, transform .2s var(--ease);
}
.cn:hover { background: var(--bg-3); }
.cn:active { transform: scale(.98); }
.cn small { font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 2px; }
.cn small svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.cn strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.cn.next { text-align: right; align-items: flex-end; grid-column: 2; }

.notice {
  margin: 1em 0; padding: 22px 22px 20px; border-radius: var(--r-l); background: var(--bg-2);
  font-family: var(--ui); font-size: 16px; line-height: 1.5;
}
.notice h2 { margin: 0 0 .35em; font-size: 20px; letter-spacing: -.015em; }
.notice p { margin: 0 0 .8em; color: var(--text-2); }
.notice ol { margin: 0 0 1em; padding-left: 1.2em; color: var(--text-2); }
.sheet-body .notice { background: transparent; padding: 0; margin: 0; }
.notice code { font-size: .92em; background: var(--bg-3); padding: 1px 6px; border-radius: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; transition: filter .2s, transform .2s var(--ease);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.quiet { background: var(--bg-3); color: var(--text); }
.btn.danger { background: #d83a34; color: #fff; }

.loading { padding-top: 2em; }
.loading i { display: block; height: .9em; margin: .7em 0; border-radius: 4px; background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Edge arrows (wide screens) */
.edge {
  position: fixed; top: 50%; z-index: 10; width: 46px; height: 46px; margin-top: -23px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-2); background: transparent; transition: background-color .2s, color .2s, opacity .3s;
}
.edge:hover { background: var(--bg-2); color: var(--text); }
.edge.prev { left: 20px; } .edge.next { right: 20px; }
.edge svg.i { width: 26px; height: 26px; stroke-width: 1.6; }

/* ---------- Dock (phones) ---------- */
.dock {
  position: fixed; z-index: 30; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  display: none; align-items: center; gap: 2px; padding: 5px; border-radius: 8px;
  background: var(--glass); box-shadow: var(--shadow); border: .5px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  transition: transform .35s var(--ease), opacity .35s;
}
.dock .icon-btn { width: 50px; height: 46px; border-radius: 8px; }
.dock .sep { width: 1px; height: 22px; background: var(--hair); margin: 0 2px; }
.bars-hidden .dock, .selecting .dock { transform: translate(-50%, calc(100% + 30px)); opacity: 0; pointer-events: none; }

/* ---------- Verse action bar ---------- */
.verse-bar {
  position: fixed; z-index: 35; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%);
  width: min(560px, calc(100% - 20px)); padding: 10px 10px 10px 18px; border-radius: 8px;
  background: var(--glass-strong); box-shadow: var(--shadow); border: .5px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  display: flex; align-items: center; gap: 10px; font-family: var(--ui);
  animation: barIn .32s var(--ease);
}
@keyframes barIn { from { transform: translate(-50%, 20px); opacity: 0; } }
.vb-ref { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.vb-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.swatches { display: flex; gap: 7px; padding: 0 6px; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.15); transition: transform .15s var(--ease); }
.sw:hover { transform: scale(1.12); }
.sw[aria-pressed="true"] { border-color: var(--text); }
.sw.gold { background: #f6c945; } .sw.green { background: #8ccc6a; } .sw.blue { background: #5aa9f6; } .sw.rose { background: #f47e9a; } .sw.violet { background: #a07cf6; }
.vb-actions .icon-btn { width: 38px; height: 38px; }
.vb-actions .icon-btn.on { color: var(--gold); }


/* ---------- Mood light (Phase 3): a lava lamp of color behind everything, following the passage ---------- */
@property --bg { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
@property --text { syntax: '<color>'; inherits: true; initial-value: #1d1d1f; }
@property --text-2 { syntax: '<color>'; inherits: true; initial-value: #6e6e73; }
@property --text-3 { syntax: '<color>'; inherits: true; initial-value: #a1a1a6; }
@property --hair { syntax: '<color>'; inherits: true; initial-value: rgba(0,0,0,.09); }
@property --bg-2 { syntax: '<color>'; inherits: true; initial-value: #f5f5f7; }
@property --bg-3 { syntax: '<color>'; inherits: true; initial-value: #e8e8ed; }
@property --raised { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
@property --glass { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,.74); }
@property --glass-strong { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,.9); }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #2a4bd7; }
@property --wj { syntax: '<color>'; inherits: true; initial-value: #b3261e; }
@property --say { syntax: '<color>'; inherits: true; initial-value: #a26f1c; }
html[data-theme="mood"] {
  color-scheme: light;
  --bg: #dcebef; --bg-2: rgba(255,255,255,.4); --bg-3: rgba(18,48,58,.08); --raised: rgba(255,255,255,.58);
  --text: #12303a; --text-2: rgba(18,48,58,.7); --text-3: rgba(18,48,58,.46); --hair: rgba(18,48,58,.12);
  --glass: rgba(232,243,245,.5); --glass-strong: rgba(238,246,247,.84);
  --accent: #1d6a84; --accent-soft: rgba(29,106,132,.12); --on-accent: #fff; --wj: #a3302a; --say: #8a560f; --gold: #8a6a1c;
  --aura-a: transparent; --aura-b: transparent;
  --shadow: 0 18px 50px rgba(40,30,20,.16), 0 2px 10px rgba(40,30,20,.07);
  /* text and controls change color a moment after the lava starts to, so they cross while it is mid-way */
  transition: --bg 1.8s ease .7s, --text 1.8s ease .7s, --text-2 1.8s ease .7s, --text-3 1.8s ease .7s, --hair 1.8s ease .7s,
    --bg-2 1.8s ease .7s, --bg-3 1.8s ease .7s, --raised 1.8s ease .7s, --glass 1.8s ease .7s, --glass-strong 1.8s ease .7s,
    --accent 1.8s ease .7s, --wj 1.8s ease .7s, --say 1.8s ease .7s;
}
html[data-theme="mood"] body { background: transparent; transition: none; }
.moodlight { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100vh; height: 100lvh; display: block; pointer-events: none; }
html[data-theme="mood"] .reader::before { display: none; }
html[data-theme="mood"] .reader { text-shadow: 0 1px 6px color-mix(in srgb, var(--bg) 50%, transparent); }
/* Over the moving light, frosted glass would have to be blurred again on every frame, which makes the page stutter:
   the bars are drawn in the room's own color instead */
html[data-theme="mood"] :is(.player, .dock, .verse-bar, .toast, .say-card, .sheet-card, .touch-label) {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong);
}
.theme-sw .disc.mood { background: conic-gradient(from 200deg, #b7ddd3, #ffcf86, #ffb39e, #a83c17, #84642a, #221550, #2f3a6a, #b7ddd3); color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.35); }

/* ---------- Read aloud: like Peacemaker's captions, each word comes into focus as it is spoken ---------- */
.reader { --ink: var(--text); }
html { --say: #a26f1c; }
html[data-theme="dusk"], html[data-theme="midnight"] { --say: #f0c674; }
.reader.red .wj { --ink: var(--wj); }
.reader.listening .v { transition: opacity .7s var(--ease); }
.reader.listening .v:not(.reading) { opacity: .34; }
.reader.listening .v.reading .w {
  position: relative; top: .1em; opacity: .12;
  transition: opacity .35s ease, top .4s var(--ease), color .35s ease;
}
.reader.listening .v.reading .w.on { opacity: 1; top: 0; }
.reader.listening .v.reading .w.now { color: var(--say); }
.reader.listening .v.reading.instant .w { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .reader.listening .v.reading .w { filter: none; top: 0; transition: opacity .2s linear, color .2s linear; }
}
.player {
  position: fixed; z-index: 34; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%);
  width: min(620px, calc(100% - 20px)); display: flex; align-items: center; gap: 2px; padding: 6px 8px 6px 6px; border-radius: 8px;
  background: var(--glass-strong); box-shadow: var(--shadow); border: .5px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  font-family: var(--ui); animation: barIn .32s var(--ease); transition: bottom .35s var(--ease);
}
.player .icon-btn { width: 40px; height: 40px; flex: none; color: var(--text); }
.player { width: min(720px, calc(100% - 20px)); }
.pl-nav { display: flex; align-items: center; gap: 0; flex: none; }
.player .pl-step { width: 36px; color: var(--text-2); }
.player .pl-step:hover:not(:disabled) { color: var(--text); }
.player .pl-step:disabled { opacity: .3; cursor: default; }
.player .pl-step svg.i { width: 19px; height: 19px; }
.player .pl-play { margin: 0 4px; }
.player.idle .pl-close { display: none; }
.player.idle .pl-info span { color: var(--text-3); }
/* a verse the bar has marked (Play starts there) */
.reader:not(.listening) .v.reading { background: var(--accent-soft); }
/* while reading undisturbed the bar steps back a little */
.bars-hidden .player.idle:not(:hover):not(:focus-within) { opacity: .62; }
.player { transition: bottom .35s var(--ease), opacity .4s ease; }
.player .icon-btn svg.i { width: 21px; height: 21px; }
.player .pl-play { width: 44px; height: 44px; background: var(--accent); color: var(--on-accent); }
.player .pl-play:hover { background: var(--accent); filter: brightness(1.08); }
.player .pl-play svg.i { width: 18px; height: 18px; }
.player .pl-music { color: var(--text-3); }
.player .pl-music.on { color: var(--accent); }
.pl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 4px 8px; border-radius: 4px; line-height: 1.25; transition: background-color .2s; }
.pl-info:hover { background: var(--bg-2); }
.pl-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pl-info strong, .pl-info span { max-width: 100%; }
.pl-info strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-info span { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.has-player .verse-bar { bottom: calc(84px + var(--safe-b)); }
.has-player .reader { padding-bottom: calc(200px + var(--safe-b)); }
.listening-on .reader { padding-bottom: calc(220px + var(--safe-b)); }
.size-row .lbl { width: 52px; flex: none; font-size: 15px; color: var(--text-2); }
.size-row .val { width: 48px; flex: none; text-align: right; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.btn svg.i { width: 18px; height: 18px; }

/* ---------- Pronunciation ---------- */
.say-btn {
  position: fixed; z-index: 45; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; border-radius: 8px;
  background: var(--text); color: var(--bg); font-family: var(--ui); font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  animation: barIn .2s var(--ease);
}
.say-btn svg.i { width: 18px; height: 18px; }
.say-card {
  position: fixed; z-index: 46; width: min(360px, calc(100vw - 20px)); max-height: 70vh; overflow-y: auto; padding: 12px 14px 14px 18px; border-radius: 8px;
  background: var(--glass-strong); box-shadow: var(--shadow); border: .5px solid var(--hair); font-family: var(--ui);
  -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
}
.say-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.say-head strong { font-size: 13px; font-weight: 600; color: var(--text-2); }
.say-head .icon-btn { width: 30px; height: 30px; background: var(--bg-3); }
.say-head .icon-btn svg.i { width: 14px; height: 14px; stroke-width: 2.4; color: var(--text-2); }
.say-list { list-style: none; margin: 0; padding: 0; }
.say-list li + li { border-top: .5px solid var(--hair); margin-top: 8px; padding-top: 8px; }
.say-word { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--read-font); font-size: 22px; }
.say-word .icon-btn { width: 38px; height: 38px; color: var(--accent); background: var(--accent-soft); }
.say-resp { margin-top: 2px; font-size: 19px; letter-spacing: .01em; color: var(--text); }
.say-resp b { font-weight: 700; color: var(--accent); }
.say-resp i { font-style: normal; color: var(--text-3); padding: 0 1px; }
.say-resp .or { font-size: 14px; color: var(--text-2); }
.say-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.say-slow { height: 26px; padding: 0 10px; border-radius: 6px; background: var(--bg-3); font-size: 12.5px; font-weight: 600; color: var(--accent); }
.say-all { width: 100%; margin-top: 12px; height: 38px; }
.say-tip { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(var(--bar-h) + var(--safe-t) + 14px); transform: translate(-50%, -12px);
  width: max-content; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 8px; font-size: 15px; font-weight: 500; text-align: center;
  background: var(--glass-strong); box-shadow: var(--shadow); border: .5px solid var(--hair);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Sheets ---------- */
dialog.sheet {
  padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; overflow: visible;
  width: min(640px, calc(100vw - 32px)); margin: calc(var(--bar-h) + var(--safe-t) + 18px) auto auto;
}
dialog.sheet::backdrop { background: rgba(0,0,0,.22); opacity: 0; transition: opacity .25s; }
dialog.sheet.in::backdrop { opacity: 1; }
.sheet-card {
  display: flex; flex-direction: column; max-height: calc(100vh - var(--bar-h) - var(--safe-t) - 48px); max-height: calc(100dvh - var(--bar-h) - var(--safe-t) - 48px);
  border-radius: var(--r-l); background: var(--glass-strong); box-shadow: var(--shadow); border: .5px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  opacity: 0; transform: translateY(-8px) scale(.985); transition: opacity .22s var(--ease), transform .3s var(--ease);
  overflow: hidden;
}
dialog.sheet.in .sheet-card { opacity: 1; transform: none; }
dialog.sheet.tall .sheet-card { min-height: min(620px, calc(100dvh - var(--bar-h) - var(--safe-t) - 48px)); }
dialog.sheet.panel { width: 380px; margin: calc(var(--bar-h) + var(--safe-t) + 10px) 14px auto auto; }
dialog.sheet.panel::backdrop { background: transparent; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 6px 22px; flex: none; }
.sheet-head h2 { margin: 0; flex: 1; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.sheet-head .icon-btn { background: var(--bg-3); width: 32px; height: 32px; }
.sheet-head .icon-btn svg.i { width: 16px; height: 16px; stroke-width: 2.4; color: var(--text-2); }
.sheet-head .back { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 10px 0 4px; border-radius: 8px; color: var(--accent); font-size: 16px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 22px 22px; -webkit-overflow-scrolling: touch; }
.grabber { display: none; }

.field {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 6px; background: var(--bg-3);
  color: var(--text-2); margin: 4px 0 14px;
}
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 17px; }
.field input::placeholder { color: var(--text-3); }
.field input::-webkit-search-cancel-button, .field input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.field svg.i { width: 19px; height: 19px; }
.field .clear { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--text-3); color: var(--bg); }
.field .clear svg.i { width: 12px; height: 12px; stroke-width: 3; }

.tabs { display: flex; padding: 3px; gap: 2px; border-radius: 6px; background: var(--bg-3); margin: 0 0 16px; }
.tabs button { flex: 1; white-space: nowrap; padding: 0 12px; height: 32px; border-radius: 4px; font-size: 14px; font-weight: 600; color: var(--text-2); transition: background-color .2s, color .2s; }
.tabs button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.group-label { margin: 18px 4px 8px; font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: -.005em; }
.group-label:first-child { margin-top: 2px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 6px; }
.book-grid button {
  height: 44px; padding: 0 12px; border-radius: 6px; background: var(--raised); text-align: left; font-size: 15px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 0 0 .5px var(--hair);
  transition: background-color .15s, transform .15s var(--ease);
}
.book-grid button:hover { background: var(--bg-3); }
.book-grid button:active { transform: scale(.97); }
.book-grid button.current { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.chap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 7px; }
.chap-grid button {
  aspect-ratio: 1; border-radius: 6px; background: var(--raised); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 .5px var(--hair); transition: background-color .15s, transform .15s var(--ease);
}
.chap-grid button:hover { background: var(--bg-3); }
.chap-grid button:active { transform: scale(.94); }
.chap-grid button.current { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.chap-book-title { margin: 0 4px 12px; font-family: var(--read-font); font-style: italic; color: var(--text-2); font-size: 15px; }

.list { margin: 0; padding: 0; list-style: none; border-radius: var(--r-m); background: var(--raised); box-shadow: 0 0 0 .5px var(--hair); overflow: hidden; }
.list > li + li { border-top: .5px solid var(--hair); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 11px 16px; text-align: left; font-size: 16px;
  transition: background-color .15s;
}
button.row:hover, a.row:hover { background: var(--bg-2); }
.row .grow { flex: 1; min-width: 0; }
.row .sub { display: block; margin-top: 2px; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.row .chev { color: var(--text-3); width: 16px; height: 16px; stroke-width: 2.4; }
.row .check { color: var(--accent); width: 20px; height: 20px; stroke-width: 2.6; }
.row .ref { font-weight: 600; color: var(--accent); }
.row .tag { margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--text-3); }
.row .snip { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--read-font); font-size: 15.5px; color: var(--text); margin-top: 3px; line-height: 1.5; }
.row .note { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); font-style: italic; }
.row .meta { font-size: 12.5px; color: var(--text-3); }
.row mark { background: var(--hl-gold); color: inherit; border-radius: 3px; padding: 0 1px; }

.result-count { margin: 4px 4px 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.empty { padding: 28px 8px; text-align: center; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.hint-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 8px; background: var(--raised);
  font-size: 14px; font-weight: 500; box-shadow: 0 0 0 .5px var(--hair); transition: background-color .15s; white-space: nowrap;
}
.chip:hover { background: var(--bg-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -22px 14px; padding: 0 22px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.more { display: block; width: 100%; margin-top: 12px; height: 44px; border-radius: 6px; background: var(--bg-3); font-weight: 600; color: var(--accent); }

/* Appearance */
.themes { display: flex; gap: 12px; overflow-x: auto; margin: 0 -22px 6px; padding: 4px 22px 8px; scrollbar-width: none; }
@media (min-width: 761px) { .themes { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 14px; overflow: visible; margin: 0 0 6px; padding: 4px 0 8px; } }
.themes::-webkit-scrollbar { display: none; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 500; color: var(--text-2); }
.theme-sw .disc {
  width: 52px; height: 52px; border-radius: 8px; display: grid; place-items: center; font-family: var(--read-font); font-size: 19px;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); transition: transform .2s var(--ease), box-shadow .2s;
}
.theme-sw[aria-pressed="true"] .disc { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--accent); }
.theme-sw[aria-pressed="true"] { color: var(--text); }
.theme-sw:hover .disc { transform: scale(1.05); }
.font-row { font-size: 18px; }
.size-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.size-row .a-s { font-family: var(--read-font); font-size: 14px; }
.size-row .a-l { font-family: var(--read-font); font-size: 24px; }
input[type="range"] { flex: 1; accent-color: var(--accent); height: 28px; }
.seg-row { padding: 10px 12px; }
.seg-row .tabs { margin: 0; background: var(--bg-2); }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 8px; background: var(--bg-3); transition: background-color .25s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fineprint { margin: 8px 4px 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.textarea { width: 100%; min-height: 140px; padding: 12px 14px; border-radius: 6px; border: 0; outline: 0; background: var(--bg-3); color: var(--text); font-size: 16px; line-height: 1.5; resize: vertical; }
.sheet-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }

/* ---------- "You" page ---------- */
.you {
  max-width: 720px; margin: 0 auto; padding: calc(var(--bar-h) + var(--safe-t) + 28px) 20px calc(130px + var(--safe-b));
}
.you-head { margin: 0 4px 24px; }
.you-head h1 { margin: 0; font-family: var(--display); font-size: clamp(34px, 6vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.you-head p { margin: 8px 0 0; color: var(--text-2); font-size: 16px; }
.you section { margin-bottom: 30px; }
.you h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 10px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.you h2 .count { font-size: 15px; font-weight: 500; color: var(--text-2); }
.you .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.you .toolbar .field { flex: 1 1 220px; margin: 0; height: 38px; background: var(--bg-2); }
.you .toolbar .field input { font-size: 15px; }
.you .list { background: var(--bg-2); box-shadow: none; }
.you .row-actions { display: flex; gap: 2px; flex: none; align-self: flex-start; margin: -6px -8px 0 0; }
.you .row-actions .icon-btn { width: 36px; height: 36px; color: var(--text-2); }
.you .row-actions .icon-btn svg.i { width: 19px; height: 19px; }
.continue {
  display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--r-l); position: relative; overflow: hidden; isolation: isolate;
  background: var(--bg-2); transition: transform .25s var(--ease);
}
.continue::before { content: ""; position: absolute; inset: -40%; z-index: -1; background: radial-gradient(closest-side at 20% 30%, var(--aura-a), transparent), radial-gradient(closest-side at 85% 70%, var(--aura-b), transparent); filter: blur(10px); }
.continue:active { transform: scale(.99); }
.continue small { font-size: 13px; font-weight: 600; color: var(--text-2); }
.continue strong { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.025em; }
.continue p { margin: 0; font-family: var(--read-font); color: var(--text-2); font-size: 16px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.hl-dot.gold { background: #f6c945; } .hl-dot.green { background: #8ccc6a; } .hl-dot.blue { background: #5aa9f6; } .hl-dot.rose { background: #f47e9a; } .hl-dot.violet { background: #a07cf6; }
.confirm-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; }
.confirm-row p { margin: 0; flex: 1 1 200px; font-size: 15px; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  :root { --bar-h: 50px; }
  .topbar { padding-inline: 8px; }
  .brand span, .top-actions .desk { display: none; }
  .dock { display: flex; }
  .edge { display: none; }
  .reader { padding-left: 20px; padding-right: 20px; padding-top: calc(var(--bar-h) + var(--safe-t) + 34px); }
  .verse-bar { flex-wrap: wrap; bottom: calc(12px + var(--safe-b)); padding: 12px 12px 8px 16px; row-gap: 6px; }
  .vb-ref { flex-basis: calc(100% - 50px); }
  .vb-close { order: 2; }
  .vb-actions { order: 3; width: 100%; justify-content: space-between; }
  .player { bottom: calc(80px + var(--safe-b)); padding: 5px 4px 5px 5px; }
  .bars-hidden .player, .selecting .player { bottom: calc(12px + var(--safe-b)); }
  .player .icon-btn { width: 36px; }
  .has-player .verse-bar { bottom: calc(140px + var(--safe-b)); }
  .player { justify-content: space-between; }
  .player .pl-step { width: 34px; }
  .player .pl-play { margin: 0 2px; width: 42px; height: 42px; }
  .player .pl-info { display: none; }
  .swatches { padding: 0; gap: 9px; }
  dialog.sheet, dialog.sheet.panel { width: 100%; margin: auto 0 0 0; }
  dialog.sheet.panel::backdrop { background: rgba(0,0,0,.18); }
  .sheet-card {
    border-radius: 10px 10px 0 0; max-height: 90vh; max-height: 90dvh; padding-bottom: var(--safe-b);
    transform: translateY(100%); opacity: 1; transition: transform .38s var(--ease);
  }
  dialog.sheet.in .sheet-card { transform: none; }
  dialog.sheet.tall .sheet-card { height: 92vh; height: 92dvh; min-height: 0; }
  .grabber { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--text-3); opacity: .5; margin: 8px auto 0; flex: none; }
  .sheet-head { padding-top: 8px; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .ch-nav { grid-template-columns: 1fr 1fr; }
  .cn { padding: 12px 14px; }
}
@media (min-width: 761px) { .mob { display: none !important; } }
@media (min-width: 761px) and (max-width: 1040px) { .edge { display: none; } }
@media (hover: none) { .edge { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .dock, .edge, .verse-bar, .ch-nav, .toast { display: none !important; }
  .reader { padding-top: 0; }
  .reader::before { display: none; }
}

/* natural voices: install card in Listen settings */
.nv-card { border-radius: var(--r-m); background: var(--raised); box-shadow: 0 0 0 .5px var(--hair); padding: 14px 16px 16px; margin-bottom: 4px; }
.nv-card p { margin: 10px 0 12px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.nv-card .fineprint { margin: 10px 0 0; }
.nv-top { display: flex; gap: 12px; align-items: center; }
.nv-top strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.nv-top .sub { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }
.nv-badge { flex: none; width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; color: var(--on-accent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.nv-badge svg.i { width: 19px; height: 19px; }
.nv-bar { position: relative; height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; margin: 14px 0 8px; }
.nv-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--accent); transition: width .8s var(--ease); }
.nv-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: nvshine 1.6s linear infinite; }
.nv-bar.busy i { width: 35%; animation: nvslide 1.4s var(--ease) infinite alternate; }
@keyframes nvshine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes nvslide { from { left: 0; } to { left: 65%; } }
.nv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nv-log summary { cursor: pointer; font-size: 13px; color: var(--text-2); margin: -4px 0 8px; }
.nv-log pre { white-space: pre-wrap; font-size: 11.5px; line-height: 1.4; background: var(--bg-3); border-radius: 6px; padding: 10px; margin: 0 0 12px; max-height: 160px; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .nv-bar i::after, .nv-bar.busy i { animation: none; } }
.nv-cmd { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; background: var(--bg-3); border-radius: 6px; padding: 10px 12px; margin: 0 0 4px; user-select: all; }

/* Preview of the mood light's touches */
.touch-label { position: fixed; left: 50%; top: calc(var(--bar-h) + 14px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60;
  display: flex; gap: 8px; align-items: center; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px; border-radius: 8px;
  background: var(--glass-strong); color: var(--text); font: 500 14px/1.25 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.touch-label .name { flex: 1; min-width: 0; }
.touch-label button { flex: none; border: 0; border-radius: 8px; padding: 6px 12px; background: var(--bg-3); color: var(--text); font: inherit; cursor: pointer; }
.touch-label .stop { background: var(--accent); color: var(--on-accent); }

/* the smallest phones: the bar keeps its steps and Play */
@media (max-width: 400px) {
  .player .pl-step { width: 31px; }
  .player .pl-music { width: 32px; }
  .player .pl-book { display: none; }
}

/* ---------- Other scripts ---------- */
/* The reading fonts have no Chinese, Japanese, Devanagari, Bengali or Arabic letters, so each language gets a fitting face of its own */
:root:lang(zh) .reader { font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif; }
:root:lang(ja) .reader { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }
:root:lang(hi) .reader { font-family: "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Serif Devanagari", serif; }
:root:lang(bn) .reader { font-family: "Kohinoor Bangla", "Bangla Sangam MN", "Noto Serif Bengali", serif; }
:root:lang(ar) .reader { font-family: "Geeza Pro", "Noto Naskh Arabic", "Damascus", serif; font-size: calc(var(--read-size) * var(--font-scale) * 1.1); }
:root:lang(zh) .reader .para, :root:lang(ja) .reader .para { line-break: strict; }
/* Arabic: the page reads right to left (the drop number, poetry indents and verse numbers turn around with it) */
.reader[dir="rtl"] .dropnum { float: right; margin: -.2em -.08em -.27em .1em; padding: .02em .04em .1em .06em; }
.reader[dir="rtl"] .ln, .reader[dir="rtl"] .poem > .v:not(:has(.ln)) { padding-left: 0; padding-right: 1.6em; }
.reader[dir="rtl"] .ln.ind { padding-left: 0; padding-right: 3.2em; }
.reader[dir="rtl"] .poem.has-drop .ln.ind { padding-left: 0 !important; padding-right: 1.6em !important; }
.reader[dir="rtl"] .vn { margin: 0 .12em 0 .3em; }
/* the ten languages, in Listen settings */
.lang-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 10px; margin: 4px 0 14px; }
.lang-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 0; color: var(--text-2); transition: color .2s; }
.lang-grid .flag { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.12); filter: saturate(.8); transition: filter .25s, box-shadow .25s, transform .25s; }
.lang-grid .lang-name { max-width: 100%; font-size: 11.5px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-grid button:hover .flag { filter: none; transform: translateY(-1px); }
.lang-grid button[aria-pressed="true"] { color: var(--text); }
.lang-grid button[aria-pressed="true"] .flag { filter: none; box-shadow: 0 0 0 2px var(--raised), 0 0 0 3.5px var(--accent), 0 3px 10px rgba(0,0,0,.15); }
.lang-grid button[aria-pressed="true"] .lang-name { font-weight: 600; }
.lang-grid button:focus-visible { outline: none; }
.lang-grid button:focus-visible .flag { box-shadow: 0 0 0 2px var(--raised), 0 0 0 3.5px var(--accent); }
@media (prefers-reduced-motion: reduce) { .lang-grid .flag { transition: none; } .lang-grid button:hover .flag { transform: none; } }
.flag-mini { display: inline-block; width: 18px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; box-shadow: 0 0 0 .5px rgba(0,0,0,.18); }
.seg button[data-langs] { position: relative; margin-left: 5px; font-weight: 600; color: color-mix(in srgb, #f5c400 64%, var(--text)); }
.seg button[data-langs]::before { content: ""; position: absolute; left: -4px; top: 7px; bottom: 7px; width: 1px; background: var(--hair); }
.seg button[data-langs]:hover { background: color-mix(in srgb, #f5c400 14%, transparent); }

/* ---------- Views: Text, Mood light, Vision (the View button on the reading bar) ---------- */
.player .pl-view.on { color: var(--accent); }
.view-menu {
  position: fixed; z-index: 50; min-width: 250px; padding: 6px; border-radius: 8px;
  background: var(--glass-strong); box-shadow: var(--shadow); border: .5px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  font-family: var(--ui); animation: barIn .22s var(--ease);
}
.view-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit;
}
.view-menu button:hover, .view-menu button:focus-visible { background: var(--accent-soft); outline: none; }
.view-menu .vm-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; border: 1.5px solid var(--text-2, currentColor); opacity: .55; }
.view-menu [aria-checked="true"] .vm-dot { background: var(--accent); border-color: var(--accent); opacity: 1; }
.view-menu .vm-text { display: flex; flex-direction: column; }
.view-menu .vm-text strong { font-weight: 600; font-size: .98rem; }
.view-menu .vm-text span { font-size: .82rem; color: var(--text-2, inherit); opacity: .8; }
/* the scene fills the page behind the top bar and the reading bar */
.vision-layer { position: fixed; inset: 0; z-index: 20; background: #03060d; }
.vision-layer iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
body.vision-on { overflow: hidden; }
body.vision-on .topbar { background: linear-gradient(to bottom, rgba(3, 6, 13, .26), rgba(3, 6, 13, 0)); border-bottom-color: transparent; }
body.vision-on .topbar, body.vision-on .topbar .icon-btn, body.vision-on .topbar .passage-btn, body.vision-on .topbar .brand { color: #e9f6ff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
body.vision-on .topbar .icon-btn svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
body.vision-on .edge { display: none; }
body.vision-on .topbar .trans-btn, body.vision-on .topbar .seg { color: var(--text); text-shadow: none; }
/* over the moving scene, no blur behind the bars (blurring a live 3D picture every frame costs sharpness and smoothness) */
body.vision-on .topbar, body.vision-on .player, body.vision-on .dock, body.vision-on .view-menu { -webkit-backdrop-filter: none; backdrop-filter: none; }
body.vision-on .player, body.vision-on .dock, body.vision-on .view-menu { background: rgba(236, 242, 248, .9); }
body.vision-on .reader, body.vision-on .moodlight { visibility: hidden; }

/* ---------- Bottom bar: text size, voice and music on/off ---------- */
.player .pl-voice, .player .pl-music { color: var(--text-3); }
.player .pl-voice.on, .player .pl-music.on { color: var(--accent); }
.size-pop {
  position: fixed; z-index: 50; width: 300px; padding: 12px 14px 10px; border-radius: 8px;
  background: var(--glass-strong); box-shadow: var(--shadow); border: .5px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  font-family: var(--ui); animation: barIn .22s var(--ease);
}
.size-pop .sp-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 6px; }
.size-pop .sp-head strong { font-size: 14px; font-weight: 600; }
.size-pop .sp-head span { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.size-pop .sp-row { display: flex; align-items: center; gap: 8px; }
.size-pop .sp-step { width: 36px; height: 36px; flex: none; border-radius: 6px; display: grid; place-items: center; font-family: var(--read-font); color: var(--text); background: var(--bg-3); }
.size-pop .sp-step:hover { filter: brightness(1.06); }
html[data-theme="mood"] .size-pop, body.vision-on .size-pop { -webkit-backdrop-filter: none; backdrop-filter: none; }
.view-menu .vm-sep { height: 1px; margin: 6px 8px; background: var(--hair); }
.view-menu .vm-check { width: 14px; height: 14px; flex: none; display: grid; place-items: center; border-radius: 3px; border: 1.5px solid var(--text-2); opacity: .55; color: var(--on-accent); }
.view-menu .vm-check svg.i { width: 11px; height: 11px; stroke-width: 3; visibility: hidden; }
.view-menu [data-pages][aria-checked="true"] .vm-check { opacity: 1; background: var(--accent); border-color: var(--accent); }
.view-menu [data-pages][aria-checked="true"] .vm-check svg.i { visibility: visible; }
.view-menu button:disabled { opacity: .4; cursor: default; }

/* ---------- Page view: the chapter as pages, two side by side like an open book ---------- */
body.pages { overflow: hidden; }
body.pages .reader {
  position: fixed; left: 0; right: 0; top: calc(var(--bar-h) + var(--safe-t) + 26px); bottom: calc(104px + var(--safe-b));
  max-width: none; margin: 0; overflow: hidden; overscroll-behavior: none;
  --spread: calc(var(--measure) * 2 * .86 + 4.5em);
  --pad: max(100px, calc((100vw - var(--spread)) / 2));
  padding: 0 var(--pad);
  column-count: 2; column-gap: 4.5em; column-fill: auto; column-rule: 1px solid var(--hair);
  /* only the two pages showing: the next spread waits out of sight */
  clip-path: inset(0 calc(var(--pad) - 8px) 0 calc(var(--pad) - 8px));
}
body.pages .reader::before { display: none; }
body.pages .reader .ch-nav { display: none; }
body.pages .reader .sec { break-after: avoid; }
body.pages .reader .para, body.pages .reader .vline { orphans: 2; widows: 2; }
body.pages .reader .ch-head.intro .ch-h1 { font-size: clamp(34px, 5vw, 48px); }
body.pages .reader .ch-foot { margin-top: 1.5em; }
@media (min-width: 761px) { body.pages .edge { display: grid; } }
.page-count {
  position: fixed; z-index: 12; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%);
  font-family: var(--ui); font-size: 12px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; pointer-events: none;
}
@media (max-width: 760px) {
  body.pages .reader { --pad: 20px; column-count: 1; column-gap: 40px; column-rule: none; padding: 0 20px; top: calc(var(--bar-h) + var(--safe-t) + 16px); bottom: calc(150px + var(--safe-b)); }
  .page-count { bottom: calc(130px + var(--safe-b)); }
}

/* ---------- Account ---------- */
.acct-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: var(--r-l);
  background: var(--bg-2); font-family: var(--ui);
}
.acct-card .acct-text { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acct-card .acct-text strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.acct-card .acct-text span { font-size: 14px; color: var(--text-2); line-height: 1.4; overflow-wrap: anywhere; }
.acct-card .acct-actions { display: flex; gap: 8px; flex: none; }
.acct-avatar, .acct-initial {
  display: grid; place-items: center; flex: none; border-radius: 6px; font-weight: 700; color: var(--on-accent); background: var(--accent);
}
.acct-avatar { width: 42px; height: 42px; font-size: 18px; }
#youBtn { position: relative; }
#youBtn.signed-in svg.i { display: none; }
#youBtn .acct-initial { width: 26px; height: 26px; font-size: 13px; }
.acct-form { display: flex; flex-direction: column; font-family: var(--ui); }
.acct-label { margin: 10px 2px 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.acct-label span { font-weight: 400; color: var(--text-3); }
.acct-input { height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; background: var(--bg-3); color: var(--text); font-size: 16px; outline: 0; }
.acct-input:focus { border-color: var(--accent); }
.acct-error { margin: 12px 2px 0; padding: 10px 12px; border-radius: 6px; background: rgba(216,58,52,.12); color: #d83a34; font-size: 14px; }
html[data-theme="dusk"] .acct-error, html[data-theme="midnight"] .acct-error { color: #ff8a80; }
.acct-switch { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--text-2); }
.linkish { color: var(--accent); font-weight: 600; }
.linkish:hover { text-decoration: underline; }
@media (max-width: 760px) { .player .pl-size { display: none; } }

/* the speaker on the reading bar: voice and music volume */
.vol-pop { width: 320px; padding: 12px 14px; }
.vol-pop .vp-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.vol-pop .vp-lbl { display: inline-flex; align-items: center; gap: 7px; width: 76px; flex: none; font-size: 14px; font-weight: 600; }
.vol-pop .vp-lbl svg.i { width: 18px; height: 18px; color: var(--accent); }
.vol-pop .vp-val { width: 40px; flex: none; text-align: right; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.vol-pop .vp-more { display: block; width: 100%; margin-top: 8px; padding: 8px 0 2px; border-top: .5px solid var(--hair); font-size: 13px; font-weight: 600; color: var(--accent); text-align: center; }
.vol-pop .vp-more:hover { text-decoration: underline; }

/* ---------- Warm panels (heart search, help): early fall morning light, slowly drifting ---------- */
dialog.sheet.warm .sheet-card {
  position: relative; isolation: isolate; overflow: hidden; color: #33231a;
  background: linear-gradient(165deg, #fbe6cc 0%, #f7d3ad 32%, #dfe6ef 70%, #bcd2ea 100%);
  border: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
}
dialog.sheet.warm .sheet-card::before, dialog.sheet.warm .sheet-card::after {
  content: ""; position: absolute; z-index: -1; inset: -35%; pointer-events: none; will-change: transform;
}
dialog.sheet.warm .sheet-card::before {
  background:
    radial-gradient(30% 26% at 24% 26%, rgba(244,163,88,.62), transparent 70%),
    radial-gradient(28% 24% at 72% 22%, rgba(250,208,128,.6), transparent 70%),
    radial-gradient(26% 24% at 34% 70%, rgba(214,112,72,.32), transparent 70%);
  animation: warmDrift 38s ease-in-out infinite alternate;
}
dialog.sheet.warm .sheet-card::after {
  background:
    radial-gradient(30% 28% at 78% 72%, rgba(118,165,216,.5), transparent 70%),
    radial-gradient(24% 22% at 58% 46%, rgba(255,236,206,.55), transparent 70%),
    radial-gradient(26% 24% at 16% 82%, rgba(86,128,182,.28), transparent 70%);
  animation: warmDrift2 46s ease-in-out infinite alternate;
}
@keyframes warmDrift { from { transform: translate3d(-4%, -3%, 0) rotate(0deg) scale(1); } to { transform: translate3d(5%, 4%, 0) rotate(14deg) scale(1.08); } }
@keyframes warmDrift2 { from { transform: translate3d(4%, 3%, 0) rotate(0deg) scale(1.05); } to { transform: translate3d(-5%, -4%, 0) rotate(-12deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { dialog.sheet.warm .sheet-card::before, dialog.sheet.warm .sheet-card::after { animation: none; } }
dialog.sheet.warm .sheet-head { justify-content: center; position: relative; }
dialog.sheet.warm .sheet-head h2 { text-align: center; color: #33231a; font-size: 21px; padding-left: 32px; }
dialog.sheet.warm .sheet-head .icon-btn { background: rgba(255,255,255,.55); }
dialog.sheet.warm .sheet-head .icon-btn svg.i { color: #5a3f2e; }
dialog.sheet.warm .grabber { background: #8a6a55; }
dialog.sheet.warm .sheet-body { padding: 2px 22px 20px; text-align: center; }

/* heart search */
.g-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: -2px 0 12px; }
.g-art { width: 140px; height: 75px; }
.g-lead { margin: 0; font-size: 15.5px; line-height: 1.45; color: #5a3f2e; }
.g-form { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.g-q {
  width: 100%; min-height: 86px; padding: 14px 16px; border-radius: 8px; border: 1px solid rgba(120,80,50,.16); outline: 0; resize: vertical;
  background: rgba(255,255,255,.78); color: #2b1d15; font: 17px/1.5 var(--ui); text-align: center;
  box-shadow: 0 6px 20px rgba(120,70,30,.10), inset 0 1px 0 rgba(255,255,255,.8); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.g-q::placeholder { color: #8b6c58; }
.g-q:focus { border-color: #2f7a62; background: rgba(255,255,255,.9); box-shadow: 0 0 0 3px rgba(47,122,98,.18), 0 8px 24px rgba(120,70,30,.12); }
.g-go {
  height: 48px; padding: 0 30px; border-radius: 8px; background: #2c7a61; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .005em;
  box-shadow: 0 8px 20px rgba(44,122,97,.32), inset 0 1px 0 rgba(255,255,255,.18); transition: background-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.g-go:hover { background: #256a54; box-shadow: 0 10px 24px rgba(44,122,97,.38); }
.g-go:active { transform: scale(.97); }
.g-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.g-chip { height: 32px; padding: 0 13px; border-radius: 6px; background: rgba(255,255,255,.5); color: #4a3022; font-size: 14px; font-weight: 500; box-shadow: 0 0 0 .5px rgba(120,80,50,.18); transition: background-color .15s; }
.g-chip:hover { background: rgba(255,255,255,.8); }
.g-out:empty { display: none; }
.g-out { margin-top: 6px; }
.g-wait, .h-wait { display: flex; justify-content: center; gap: 8px; padding: 22px 0 8px; }
.g-wait span, .h-wait span { width: 8px; height: 8px; border-radius: 50%; background: #c47a45; animation: gBlink 1.1s ease-in-out infinite; }
.g-wait span:nth-child(2), .h-wait span:nth-child(2) { animation-delay: .15s; } .g-wait span:nth-child(3), .h-wait span:nth-child(3) { animation-delay: .3s; }
@keyframes gBlink { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.g-topic { margin-top: 16px; }
.g-topic h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; letter-spacing: -.015em; color: #33231a; }
.g-intro { margin: 0 auto 10px; max-width: 34em; color: #5a3f2e; font-size: 15px; line-height: 1.5; }
.g-cards { display: flex; flex-direction: column; gap: 8px; }
.g-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 13px 16px; border-radius: 8px; text-align: center;
  background: rgba(255,255,255,.62); box-shadow: 0 2px 10px rgba(120,70,30,.07); transition: background-color .15s, transform .15s var(--ease);
}
.g-card:hover { background: rgba(255,255,255,.82); }
.g-card:active { transform: scale(.99); }
.g-ref { font-size: 13.5px; font-weight: 700; color: #2c7a61; letter-spacing: .01em; }
.g-text { font-family: var(--read-font); font-size: 16.5px; line-height: 1.5; color: #2b1d15; }
.g-note { font-size: 13.5px; color: #6b4a35; line-height: 1.4; }
.g-help { margin-top: 14px; padding: 13px 16px; border-radius: 8px; background: rgba(255,255,255,.7); font-size: 15px; line-height: 1.45; box-shadow: inset 3px 0 0 #2c7a61; }
.g-help.urgent { box-shadow: inset 3px 0 0 #c0392b; background: rgba(255,244,240,.85); }
.g-help strong { display: block; margin-bottom: 2px; font-size: 16px; }
.g-help p { margin: 3px 0 0; }
.g-disclaimer { margin: 16px auto 0; max-width: 32em; padding: 10px 14px; border-radius: 8px; background: rgba(255,255,255,.45); color: #5a3f2e; font-size: 13.5px; line-height: 1.5; }
.player .pl-guide { color: var(--accent); }
.player .pl-guide svg.i { width: 26px; height: 26px; }
.dock [data-open="guide"] svg.i { width: 26px; height: 26px; }
@media (max-width: 760px) { .player .pl-guide { display: none; } }

/* help: one simple page at a time */
dialog.sheet.help .sheet-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
dialog.sheet.help .sheet-head { justify-content: flex-end; padding-bottom: 0; }
.h-pages { min-height: 372px; display: flex; flex-direction: column; justify-content: center; }
.h-page { display: flex; flex-direction: column; align-items: center; }
.h-page.from-r { animation: hIn .45s var(--ease) both; } .h-page.from-l { animation: hInL .45s var(--ease) both; }
@keyframes hIn { from { opacity: 0; transform: translateX(26px); } }
@keyframes hInL { from { opacity: 0; transform: translateX(-26px); } }
.h-art { width: 200px; height: 110px; margin: -8px 0 4px; }
.h-title { margin: 4px 0 10px; font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.025em; color: #2b1d15; }
.h-verse { margin: 0 auto; max-width: 30em; }
.h-verse p { margin: 0 0 8px; font-family: var(--read-font); font-size: 21px; line-height: 1.5; color: #2b1d15; }
.h-verse.small p { font-size: 17px; }
.h-ref { font-size: 14px; font-weight: 700; color: #2c7a61; }
.h-ref span { font-weight: 500; color: #6b4a35; }
.h-ref:hover { text-decoration: underline; }
.h-text { margin: 0 auto 12px; max-width: 28em; font-size: 17px; line-height: 1.55; color: #3b2a1f; }
.h-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 2px 0 16px; }
.h-step { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: 8px; background: rgba(255,255,255,.6); box-shadow: 0 4px 14px rgba(120,70,30,.08); }
.h-step strong { font-size: 16px; color: #2b1d15; }
.h-step > span:last-child { font-size: 13.5px; line-height: 1.4; color: #5a3f2e; }
.h-ic { width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.h-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.s1 .h-ic { background: linear-gradient(140deg, #f2a06b, #d65f43); }
.s2 .h-ic { background: linear-gradient(140deg, #7fb0e0, #3f74b3); }
.s3 .h-ic { background: linear-gradient(140deg, #6cc19c, #2c7a61); }
.h-prayer { margin: 0 auto; max-width: 30em; padding: 10px 14px; border-radius: 8px; background: rgba(255,255,255,.55); }
.h-prayer summary { cursor: pointer; font-weight: 700; color: #2c7a61; list-style: none; }
.h-prayer summary::-webkit-details-marker { display: none; }
.h-prayer summary::after { content: " \25BE"; font-size: .8em; }
.h-prayer[open] summary::after { content: " \25B4"; }
.h-prayer p { margin: 8px 0 2px; font-family: var(--read-font); font-style: italic; font-size: 16.5px; line-height: 1.55; color: #2b1d15; }
.h-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.h-btn { height: 48px; padding: 0 34px; border-radius: 8px; background: #2c7a61; color: #fff; font-size: 17px; font-weight: 700; box-shadow: 0 8px 20px rgba(44,122,97,.32); }
.h-btn:hover { background: #256a54; }
.h-link { font-size: 15px; font-weight: 600; color: #2f5f93; }
.h-link:hover { text-decoration: underline; }
.h-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.h-back, .h-next { min-width: 76px; height: 38px; padding: 0 14px; border-radius: 8px; font-size: 15px; font-weight: 600; }
.h-back { color: #5a3f2e; background: rgba(255,255,255,.4); }
.h-next { color: #fff; background: #2c7a61; }
.h-dots { display: flex; gap: 8px; }
.h-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(90,63,46,.28); transition: width .25s var(--ease), background-color .25s; }
.h-dot[aria-current="step"] { width: 22px; border-radius: 4px; background: #2c7a61; }
@media (max-width: 760px) {
  .h-pages { min-height: 0; }
  .h-steps { grid-template-columns: 1fr; }
  .h-step { flex-direction: row; text-align: left; padding: 10px 12px; gap: 12px; }
  .h-step strong { min-width: 64px; }
  .h-title { font-size: 26px; }
  .h-verse p { font-size: 19px; }
}

/* ---------- Your Bible: back to reading ---------- */
.you { position: relative; }
.you-exit {
  position: sticky; top: calc(var(--bar-h) + var(--safe-t) + 8px); z-index: 5; float: right; margin: -6px 0 0 12px;
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px; border-radius: 8px;
  background: var(--bg-2); color: var(--text); font-size: 14px; font-weight: 600; box-shadow: 0 0 0 .5px var(--hair);
}
.you-exit:hover { background: var(--bg-3); }
.you-exit svg.i { width: 18px; height: 18px; stroke-width: 2.2; }
/* the reading bar shows only the passage (no voice or mood line under it) */
.pl-info { justify-content: center; }
.pl-info #plSub { display: none; }

/* ---------- The welcome (first visit, and from Help): the choice, the song, the tour ---------- */
.tour { position: fixed; inset: 0; z-index: 100; opacity: 0; transition: opacity .5s var(--ease); font-family: var(--display); -webkit-tap-highlight-color: transparent; }
.tour.in { opacity: 1; }
.tour.leaving { opacity: 0; pointer-events: none; }
.tour .out { opacity: 0 !important; transition: opacity .7s ease !important; pointer-events: none; }
@keyframes tourFade { from { opacity: 0; } to { opacity: 1; } }

/* the choice: early morning light, as in Help */
.tour-sky { position: absolute; inset: 0; overflow: hidden; isolation: isolate; background: linear-gradient(165deg, #fbe6cc 0%, #f7d3ad 32%, #dfe6ef 70%, #bcd2ea 100%); transition: opacity .8s ease; }
.tour-sky::before, .tour-sky::after { content: ""; position: absolute; inset: -35%; z-index: -1; pointer-events: none; will-change: transform; }
/* the morning sky slowly turns between warm orange and soft blue */
.tour-sky .sky-wash {
  position: absolute; left: 0; right: 0; top: 0; height: 300%; z-index: -2; pointer-events: none; will-change: transform;
  background: linear-gradient(172deg, #f6b97e 0%, #fad8b0 14%, #fbe8d2 24%, #e4e9f1 38%, #c5d8ee 50%, #a9c6e8 58%, #dfe6ef 70%, #fbe2c4 84%, #f6bd84 100%);
  animation: skyTurn 26s ease-in-out infinite alternate;
}
@keyframes skyTurn { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -66.6%, 0); } }
.tour-sky::before {
  background: radial-gradient(30% 26% at 24% 26%, rgba(244,163,88,.6), transparent 70%), radial-gradient(28% 24% at 72% 22%, rgba(250,208,128,.58), transparent 70%), radial-gradient(26% 24% at 34% 70%, rgba(214,112,72,.3), transparent 70%);
  animation: warmDrift 38s ease-in-out infinite alternate;
}
.tour-sky::after {
  background: radial-gradient(30% 28% at 78% 72%, rgba(118,165,216,.5), transparent 70%), radial-gradient(24% 22% at 58% 46%, rgba(255,236,206,.55), transparent 70%), radial-gradient(26% 24% at 16% 82%, rgba(86,128,182,.28), transparent 70%);
  animation: warmDrift2 46s ease-in-out infinite alternate;
}
.tour-choose {
  position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  padding: max(28px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); text-align: center; color: #33231a;
  transition: opacity .6s ease;
}
.tour-choose > * { animation: tourRise .8s var(--ease) both; }
.tour-choose > :nth-child(2) { animation-delay: .1s; } .tour-choose > :nth-child(3) { animation-delay: .16s; } .tour-choose > :nth-child(4) { animation-delay: .26s; } .tour-choose > :nth-child(5) { animation-delay: .36s; }
@keyframes tourRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tour-hello { margin: 0; font-size: 16px; font-weight: 600; color: #8a6248; letter-spacing: .01em; }
.tour-name { margin: 0 0 4px; font-family: "EB Garamond", Georgia, serif; font-weight: 600; font-size: clamp(42px, 9.5vw, 72px); line-height: 1.02; letter-spacing: -.012em; color: #2c1c12; }
.tour-sub { margin: 6px 0 24px; font-size: 17px; color: #5d4434; }
.tour-art { width: 190px; height: auto; margin: 0 0 2px; overflow: visible; }
/* the Bible floats gently, as if it were glad to see you */
.tour-choose > .tour-art { animation: tourRise .8s var(--ease) both, taFloat 3.4s ease-in-out .8s infinite; }
@keyframes taFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(-7px) rotate(-1.2deg); } 60% { transform: translateY(-3px) rotate(.8deg); } }
.tour-art .ta-rays { transform-origin: 100px 64px; animation: taRays 10s ease-in-out infinite alternate; }
.tour-art .ta-glow { transform-origin: 100px 66px; animation: taGlow 5s ease-in-out infinite alternate; }
.tour-art .ta-sp { transform-box: fill-box; transform-origin: center; animation: taSpark 2.6s ease-in-out infinite; }
.tour-art .ta-sp.b { animation-delay: .9s; } .tour-art .ta-sp.c { animation-delay: 1.7s; }
@keyframes taRays { from { transform: rotate(-5deg); opacity: .8; } to { transform: rotate(5deg); opacity: 1; } }
@keyframes taGlow { from { transform: scale(.94); } to { transform: scale(1.05); } }
@keyframes taSpark { 0%, 100% { transform: scale(.55); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
.tour-options { display: flex; flex-direction: column; align-items: center; width: min(600px, 100%); }
.to-big, .to-songs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.to-songs { width: min(470px, 100%); gap: 10px; }
.to-or { margin: 20px 0 10px; font-size: 14px; font-weight: 600; color: #7a5a44; }
.tour-opt {
  display: flex; align-items: center; gap: 14px; text-align: left; color: #33231a; border-radius: 8px;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 10px 28px rgba(120,70,30,.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
}
.tour-opt.big { padding: 20px 20px; min-height: 104px; }
.tour-opt.song { padding: 10px 14px 10px 10px; gap: 12px; }
.tour-opt:hover { background: rgba(255,255,255,.85); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(120,70,30,.16); }
.tour-opt:active { transform: scale(.98); }
.tour-opt:focus-visible { outline: 3px solid rgba(44,122,97,.55); outline-offset: 2px; }
.to-ic { flex: none; display: block; width: 64px; height: 64px; border-radius: 10px; box-shadow: 0 6px 16px rgba(90,50,20,.18); }
.tour-opt.song .to-ic { width: 46px; height: 46px; border-radius: 8px; }
.to-ic svg { display: block; width: 100%; height: 100%; border-radius: inherit; }
.tour-opt:hover .to-ic svg { animation: toWiggle .5s var(--ease); }
.to-ic .tt-rip { transform-box: fill-box; transform-origin: center; opacity: 0; animation: ttRip 3s ease-out infinite; }
.to-ic .tt-rip.b { animation-delay: 1s; } .to-ic .tt-rip.c { animation-delay: 2s; }
@keyframes ttRip { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(2.1); opacity: 0; } }
.to-ic .tt-echo { opacity: 0; animation: ttEcho 3s ease-out infinite; }
.to-ic .tt-echo.b { animation-delay: 1.5s; }
@keyframes ttEcho { 0% { transform: translate(0, 0); opacity: .45; } 100% { transform: translate(9px, -7px); opacity: 0; } }
.to-ic .fb-m { transform-box: fill-box; transform-origin: center; animation: fbTurn 3s linear infinite; }
@keyframes fbTurn { 0% { transform: scaleX(1); } 50% { transform: scaleX(.04); } 100% { transform: scaleX(1); } }
.to-ic .fb-tile { animation: fbSlide 3s linear infinite; }
@keyframes fbSlide { 0% { transform: translateX(-17px) scaleX(.3); opacity: 0; } 20% { opacity: .9; } 50% { transform: translateX(0) scaleX(1); } 80% { opacity: .9; } 100% { transform: translateX(17px) scaleX(.3); opacity: 0; } }
.to-ic .fb-beams { transform-box: view-box; transform-origin: 32px 31px; animation: fbBeams 4s ease-in-out infinite alternate; }
@keyframes fbBeams { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.to-ic .fs { transform-box: fill-box; transform-origin: center; animation: fbStar 2.4s ease-in-out infinite; }
.to-ic .fs.b { animation-delay: -.6s; } .to-ic .fs.c { animation-delay: -1.2s; } .to-ic .fs.d { animation-delay: -1.8s; }
@keyframes fbStar { 0%, 100% { transform: translate(0, 0) scale(.6) rotate(0deg); opacity: .55; } 50% { transform: translate(1px, -1.5px) scale(1.1) rotate(45deg); opacity: 1; } }
@keyframes toWiggle { 0% { transform: rotate(0); } 35% { transform: rotate(-4deg) scale(1.04); } 70% { transform: rotate(3deg) scale(1.04); } 100% { transform: none; } }
.to-tx strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.25; }
.to-tx > span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.35; color: #6d5444; }
.tour-opt.big .to-tx strong { font-size: 20px; }
.tour-opt.big .to-tx > span { font-size: 15px; margin-top: 3px; }
@media (max-width: 600px) {
  .tour-art { width: 150px; }
  .to-big { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tour-opt.big { min-height: 0; padding: 16px; }
  .tour-opt.big .to-ic { width: 58px; height: 58px; }
  .tour-opt.big .to-tx strong { font-size: 19px; }
  .tour-opt.song { flex-direction: column; text-align: center; gap: 8px; padding: 12px 8px; }
  .tour-opt.song .to-ic { width: 42px; height: 42px; }
  .tour-opt.song .to-tx strong { font-size: 15px; }
  .to-or { margin: 16px 0 8px; }
  .tour-sub { margin-bottom: 16px; }
}
}

/* the song: light that moves with the music, and its words */
.tour.song { background: #140b05; }
.tour.song.funky { background: #150a2c; }
.tour.song .tour-choose { opacity: 0; pointer-events: none; }
.tour-light { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: saturate(1.15); animation: tourFade 1.2s ease both; transition: opacity .8s ease; }
.tour-song { position: absolute; inset: 0; color: #fff; text-align: center; pointer-events: none; animation: tourFade 1s ease both; transition: opacity .7s ease; }
.tour-song::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 34% at 50% 47%, rgba(8,6,20,.34), rgba(8,6,20,0) 100%); pointer-events: none; }
.tour.traditional .tour-song::before { background: radial-gradient(62% 36% at 50% 47%, rgba(36,16,4,.46), rgba(36,16,4,0) 100%); }
.ts-title { z-index: 1; position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); transform-origin: 50% 0; transition: top 1.1s var(--ease), transform 1.1s var(--ease); }
.tour.song .tour-hello { color: rgba(255,255,255,.78); }
.tour.song .tour-name { color: #fff; text-shadow: 0 2px 34px rgba(0,0,0,.25); }
.tour.sung .ts-title { top: max(70px, 9vh); transform: translateY(0) scale(.56); }
@media (max-height: 520px) { .tour.sung .ts-title { opacity: 0; } .tour-lyrics { top: 54%; } .ly-next { margin-top: 8px; } }
.ts-title { transition: top 1.1s var(--ease), transform 1.1s var(--ease), opacity .8s ease; }
.ts-title .tour-hello, .ts-title .tour-name { transition: opacity .8s ease; }
.tour.sung .ts-title .tour-hello { opacity: 0; }
.tour.sung.in-chorus .ts-title .tour-name { opacity: 0; }
.tour-lyrics { z-index: 1; position: absolute; left: 16px; right: 16px; top: 47%; transform: translateY(-50%); opacity: 0; transition: opacity .7s ease; }
.tour.sung .tour-lyrics { opacity: 1; }
.ly-now {
  display: block; margin: 0; font-family: "EB Garamond", Georgia, serif; font-weight: 600; color: #fff;
  font-size: clamp(32px, min(8.4vw, 10.5vh), 76px); line-height: 1.16; letter-spacing: -.008em; text-wrap: balance;
  filter: drop-shadow(0 2px 20px rgba(0,0,0,.32));
}
.ly-now .lw { color: rgba(255,255,255,.62); transition: color .14s ease, text-shadow .14s ease; }
.ly-now .lw.lit { color: #fff; text-shadow: 0 0 26px rgba(255,255,255,.4); }
.ly-now.in { animation: lyIn .4s var(--ease) both; }
.ly-now.again { animation: lyAgain .8s var(--ease) both; }
.ly-now.chorus .ly-small { display: block; font-size: .46em; font-weight: 500; line-height: 1.3; }
.ly-now.chorus .ly-big { display: block; }
@keyframes lyIn { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: drop-shadow(0 2px 20px rgba(0,0,0,.32)); } }
@keyframes lyAgain { 0% { transform: scale(1); } 30% { transform: scale(1.045); } 100% { transform: scale(1); } }
.ly-next { position: relative; margin: 16px 0 0; min-height: 1.35em; font-family: "EB Garamond", Georgia, serif; font-style: italic; font-size: clamp(19px, 2.8vw, 26px); color: rgba(255,255,255,.58); }
.ts-wait { position: absolute; left: 0; right: 0; top: 64%; margin: 0; font-size: 15px; color: rgba(255,255,255,.75); }
.tour-songbar { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: flex; gap: 6px; animation: tourFade 1s ease .4s both; transition: opacity .6s ease; }
.tour-chip { height: 36px; padding: 0 14px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tour-chip:hover { background: rgba(255,255,255,.26); }
.tour-chip.quiet { background: transparent; border-color: transparent; color: rgba(255,255,255,.75); -webkit-backdrop-filter: none; backdrop-filter: none; }
.tour-chip.quiet:hover { color: #fff; text-decoration: underline; }

/* the tour: the site, with what she's talking about lit up, and her words */
.tour.steps { background: transparent; }
.tour-spot {
  position: fixed; border-radius: 8px; pointer-events: none; box-shadow: 0 0 0 200vmax rgba(16,12,26,.56);
  animation: tourFade .7s ease both; transition: left .5s var(--ease), top .5s var(--ease), width .5s var(--ease), height .5s var(--ease);
}
.tour-spot.on::after { content: ""; position: absolute; inset: -3px; border-radius: 10px; border: 2px solid rgba(255,206,128,.95); animation: spotPulse 1.9s ease-in-out infinite; }
@keyframes spotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,206,128,.5); } 50% { box-shadow: 0 0 0 9px rgba(255,206,128,0); } }
.tour-card {
  position: fixed; left: 12px; top: 40%; width: min(460px, calc(100vw - 24px)); padding: 14px 18px 12px;
  border-radius: 8px; color: #33231a; background: linear-gradient(165deg, #fdf0de 0%, #f8ddbf 45%, #e2e9f2 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,.34), 0 2px 8px rgba(0,0,0,.12); transition: top .5s var(--ease), left .5s var(--ease); animation: tourRise .6s var(--ease) both;
}
.tour-card.turn .tour-caption { animation: tourFade .35s ease both; }
.tour-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tour-step-title { margin: 0; font-size: 14px; font-weight: 700; color: #a2592b; }
.tour-skip { padding: 4px 6px; margin: -4px -6px 0 0; font-size: 13px; font-weight: 600; color: #7a5f4e; border-radius: 4px; }
.tour-skip:hover { text-decoration: underline; }
.tour-caption { margin: 6px 0 14px; font-size: 18px; line-height: 1.5; text-wrap: pretty; }
.tour-caption .tw { color: rgba(51,35,26,.36); transition: color .18s ease; }
.tour-caption .tw.said { color: #33231a; }
.tour-caption .tw.now { color: #2c7a61; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-back { height: 40px; padding: 0 16px; border-radius: 8px; font-size: 15px; font-weight: 600; color: #4a3426; background: rgba(255,255,255,.62); }
.tour-back:hover { background: rgba(255,255,255,.9); }
.tour-next { height: 40px; min-width: 92px; padding: 0 22px; border-radius: 8px; font-size: 15px; font-weight: 700; color: #fff; background: #2c7a61; box-shadow: 0 6px 16px rgba(44,122,97,.3); transition: background-color .2s, transform .2s var(--ease); }
.tour-next:hover { background: #256a54; }
.tour-next:active, .tour-back:active { transform: scale(.97); }
.tour-count { font-size: 13px; color: #7a5f4e; font-variant-numeric: tabular-nums; }
.tour :focus-visible { outline: 3px solid rgba(44,122,97,.55); outline-offset: 2px; }
@media (max-width: 600px) { .tour-caption { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) {
  .tour-sky::before, .tour-sky::after, .tour-sky .sky-wash, .tour-spot.on::after, .tour-art *, .tour-choose > .tour-art, .tour-opt:hover .to-ic svg, .to-ic .tt-rip, .to-ic .tt-echo, .to-ic .fb-m, .to-ic .fb-tile, .to-ic .fb-beams, .to-ic .fs { animation: none; }
  .tour-choose > *, .ly-now.in, .ly-now.again, .tour-card { animation-duration: .01s; }
  .ts-title, .tour-spot, .tour-card { transition-duration: .01s; }
}

/* Help: watch the welcome again */
.h-tour { display: inline-flex; align-items: center; gap: 8px; height: 36px; margin: 0 auto 6px; padding: 0 15px 0 11px; border-radius: 8px; font-size: 15px; font-weight: 600; color: #2c7a61; background: rgba(255,255,255,.62); box-shadow: 0 4px 14px rgba(120,70,30,.1); }
.h-tour:hover { background: rgba(255,255,255,.9); }
.h-tour svg.i { width: 18px; height: 18px; }

/* the lyric timer (?time-lyrics): tap along to time the welcome songs' words */
.lt { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; overflow-y: auto; color: #33231a; font-family: var(--display); background: linear-gradient(165deg, #fbe6cc 0%, #f7d3ad 35%, #dfe6ef 75%, #bcd2ea 100%); }
.lt-box { width: min(560px, 100%); text-align: center; }
.lt-box h2 { margin: 0 0 8px; font-family: "EB Garamond", Georgia, serif; font-size: 34px; font-weight: 600; }
.lt-box p { margin: 0 0 14px; font-size: 16px; line-height: 1.5; color: #5d4434; }
.lt-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.lt-row.small { margin-top: 18px; }
.lt-btn { height: 48px; padding: 0 22px; border-radius: 8px; font-size: 16px; font-weight: 700; color: #fff; background: #2d8cf0; box-shadow: 0 8px 20px rgba(45,140,240,.3); }
.lt-quiet { padding: 8px 12px; font-size: 14px; font-weight: 600; color: #6d5444; border-radius: 6px; }
.lt-quiet:hover { text-decoration: underline; }
.lt-name { font-weight: 700; } .lt-clock { margin-left: 8px; font-variant-numeric: tabular-nums; color: #8a6248; font-weight: 600; }
.lt-hint { margin-bottom: 2px !important; font-size: 14px !important; }
.lt-line { margin: 0 0 6px !important; font-family: "EB Garamond", Georgia, serif; font-size: clamp(30px, 7vw, 48px) !important; font-weight: 600; line-height: 1.2 !important; color: #2c1c12 !important; }
.lt-after { min-height: 1.5em; font-style: italic; }
.lt-tap { width: min(320px, 80vw); height: 150px; margin: 8px auto 0; display: block; border-radius: 8px; font-size: 26px; font-weight: 800; color: #fff; background: #2c7a61; box-shadow: 0 12px 30px rgba(44,122,97,.35); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.lt-tap.hit { animation: ltHit .25s ease; }
@keyframes ltHit { 0% { transform: scale(.94); background: #3fa07f; } 100% { transform: none; } }
.lt-count { margin-top: 12px !important; font-size: 14px !important; }
.lt-out { width: 100%; margin: 4px 0 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(90,60,40,.2); background: rgba(255,255,255,.7); font: 13px/1.5 ui-monospace, Menlo, monospace; color: #33231a; resize: vertical; }

/* search: spelling help, and the stories and subjects a search describes */
.s-fix { margin: 2px 4px 14px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.s-fix strong { color: var(--text); }
.s-orig { display: inline; padding: 0; font-size: inherit; font-weight: 600; color: var(--accent); }
.s-orig:hover { text-decoration: underline; }
.s-alts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.s-alts > span { margin-right: 2px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.s-label { margin-top: 14px; }
.row.story .st-title { display: block; font-size: 16px; font-weight: 650; color: var(--text); margin-bottom: 1px; }
.row.story .ref { font-size: 13.5px; }
.s-help { margin: 4px 0 12px; padding: 12px 14px; border-radius: var(--r-l); background: color-mix(in srgb, #d9603f 12%, var(--bg-2, transparent)); font-size: 14.5px; line-height: 1.5; }
.s-help strong { display: block; margin-bottom: 2px; }
.s-help p { margin: 2px 0 0; }
.row.story .st-v { margin-right: 5px; font-family: var(--display); font-size: 11px; font-weight: 600; color: var(--text-3); vertical-align: 2px; }

/* Listen settings: the cinema music card */
.list.cine > li.cine-art { padding: 0; border: 0; line-height: 0; }
.cine-art .cm-art { display: block; width: 100%; height: 120px; }
.cine-title { display: block; font-size: 17px; font-weight: 650; color: var(--text); }
.cm-art .cm-note { animation: cmNote 6s ease-in-out infinite; opacity: 0; }
.cm-art .cm-note.b { animation-delay: -1.5s; } .cm-art .cm-note.c { animation-delay: -3s; } .cm-art .cm-note.d { animation-delay: -4.5s; }
@keyframes cmNote { 0% { opacity: 0; translate: 0 8px; } 25% { opacity: .9; } 80% { opacity: .5; } 100% { opacity: 0; translate: 6px -14px; } }
.cm-art .cm-baton { transform-box: view-box; transform-origin: 167px 76px; animation: cmBaton 2.2s ease-in-out infinite alternate; }
@keyframes cmBaton { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
.cm-art .cm-bow { transform-box: fill-box; transform-origin: 0 100%; animation: cmBow 1.6s ease-in-out infinite alternate; }
@keyframes cmBow { from { transform: translate(-1.5px, 1px); } to { transform: translate(1.5px, -1px); } }
.cm-art .cm-spot { animation: cmSpot 5s ease-in-out infinite alternate; }
@keyframes cmSpot { from { opacity: .75; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cm-art * { animation: none !important; } .cm-art .cm-note { opacity: .8; } }

/* Help, "You are forgiven": a celebration. The colors turn between the morning light and a Caribbean splash
   (turquoise, hibiscus pink, lime, mango, sky), and confetti bursts from the cross and keeps falling softly. */
dialog.sheet.help .sheet-head, dialog.sheet.help .sheet-body { position: relative; z-index: 1; }
dialog.sheet.warm .sheet-card > .h-fiesta {
  position: absolute; inset: -25%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.4s ease;
  background:
    radial-gradient(28% 26% at 18% 22%, rgba(0,194,199,.62), transparent 70%),
    radial-gradient(26% 24% at 82% 20%, rgba(255,92,168,.5), transparent 70%),
    radial-gradient(30% 28% at 78% 78%, rgba(123,211,137,.55), transparent 70%),
    radial-gradient(26% 24% at 22% 80%, rgba(255,182,39,.6), transparent 70%),
    radial-gradient(24% 22% at 52% 48%, rgba(79,195,247,.42), transparent 70%),
    radial-gradient(20% 18% at 60% 12%, rgba(255,111,97,.4), transparent 70%);
}
dialog.sheet.warm .sheet-card.festive > .h-fiesta { opacity: 1; animation: fiestaTurn 9s ease-in-out infinite alternate, fiestaDrift 16s ease-in-out infinite alternate; }
@keyframes fiestaTurn { 0% { opacity: .1; } 45% { opacity: .95; } 100% { opacity: .3; } }
@keyframes fiestaDrift { from { transform: translate3d(-4%, -3%, 0) rotate(0deg) scale(1); } to { transform: translate3d(4%, 3%, 0) rotate(10deg) scale(1.06); } }
.sheet-card > .h-confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: opacity .5s ease; }
.sheet-card > .h-confetti.out { opacity: 0; }
@media (prefers-reduced-motion: reduce) { dialog.sheet.warm .sheet-card.festive > .h-fiesta { animation: none; opacity: .6; } }

/* ---------- Giving: the Donate button (top right) and its panel ---------- */
:root { --sky-top: #9fdcff; --sky: #5cc4f7; --sky-deep: #1e8fe0; --sky-ink: #05304f; --sky-mist: #dff3ff; }
.give-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; margin-left: 6px; padding: 0 14px 0 11px; border-radius: 8px;
  background: linear-gradient(180deg, var(--sky-top), var(--sky)); color: var(--sky-ink); font: 700 14px/1 var(--ui); letter-spacing: .005em; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(5, 48, 79, .16), 0 6px 18px rgba(56, 182, 245, .26);
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.give-btn svg.i { width: 16px; height: 16px; fill: currentColor; stroke: none; }
@media (hover: hover) { .give-btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(5, 48, 79, .16), 0 10px 24px rgba(56, 182, 245, .36); } }
.give-btn:active { transform: scale(.97); }
.give-btn:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 2px; }
body.vision-on .topbar .give-btn { color: var(--sky-ink); text-shadow: none; }

dialog.sheet.give { width: min(460px, calc(100vw - 32px)); }
dialog.sheet.give .sheet-card { position: relative; z-index: 1; }
/* (confetti over the whole screen, behind the card) */
.dn-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; transition: opacity .5s ease; }
.dn-confetti.out { opacity: 0; }

.dn-top { text-align: center; }
.dn-art { display: block; width: 188px; height: auto; margin: -8px auto 0; overflow: visible; }
.dn-art .dn-rays { stroke: var(--sky); stroke-width: 2; stroke-linecap: round; opacity: .45; transform-origin: 100px 64px; animation: dnRays 40s linear infinite; }
.dn-art .dn-glow { transform-origin: 100px 64px; animation: dnGlow 5s ease-in-out infinite; }
.dn-art .dn-heart { transform-origin: 100px 66px; animation: dnBeat 3s ease-in-out infinite; filter: drop-shadow(0 6px 12px rgba(35, 134, 230, .32)); }
.dn-art .dn-cross { stroke: #fff; stroke-width: 4.4; stroke-linecap: round; }
.dn-art .dn-shine { stroke: rgba(255, 255, 255, .75); stroke-width: 2.6; stroke-linecap: round; }
.dn-art .dn-sparks path { fill: var(--sky); transform-box: fill-box; transform-origin: center; animation: dnSpark 3.8s ease-in-out infinite both; }
.dn-art .dn-sparks path:nth-child(2) { animation-delay: -1s; } .dn-art .dn-sparks path:nth-child(3) { animation-delay: -2.1s; }
.dn-art .dn-sparks path:nth-child(4) { animation-delay: -2.9s; } .dn-art .dn-sparks path:nth-child(5) { animation-delay: -1.6s; fill: #ffcf4a; }
@keyframes dnRays { to { transform: rotate(360deg); } }
@keyframes dnGlow { 0%, 100% { opacity: .7; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes dnBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.07); } 24% { transform: scale(1); } 36% { transform: scale(1.045); } 54% { transform: scale(1); } }
@keyframes dnSpark { 0% { opacity: 0; transform: translateY(7px) scale(.5); } 40% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-12px) scale(.6); } }
.dn-lead { margin: 2px auto 0; max-width: 21em; font: 500 19px/1.45 var(--read-font); letter-spacing: -.005em; color: var(--text); text-wrap: balance; }
.dn-uses { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dn-uses li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg-2); font-size: 13.5px; line-height: 1.3; color: var(--text);
  animation: dnIn .55s var(--ease) both; animation-delay: calc(.15s + var(--i) * .08s);
}
.dn-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, var(--sky-mist), #a8dffc); color: #0b5e96; }
.dn-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@keyframes dnIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dn-form { margin-top: 20px; min-width: 0; }
dialog.sheet.give .sheet-body { overflow-x: hidden; }
.dn-label { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.dn-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dn-pre {
  height: 50px; border-radius: 8px; background: var(--bg-2); color: var(--text); font: 700 18px/1 var(--display); letter-spacing: -.01em;
  box-shadow: inset 0 0 0 1px var(--hair); transition: background-color .2s, color .2s, box-shadow .2s;
}
@media (hover: hover) { .dn-pre:hover:not(:disabled) { background: var(--bg-3); } }
.dn-pre[aria-pressed="true"], .dn-pre[aria-pressed="true"]:hover { background: linear-gradient(180deg, var(--sky-top), var(--sky)); color: var(--sky-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 14px rgba(56, 182, 245, .3); animation: dnPop .34s var(--ease); }
.dn-pre:focus-visible, .dn-give:focus-visible, .dn-actions button:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 2px; }
@keyframes dnPop { 0% { transform: scale(.93); } 60% { transform: scale(1.04); } 100% { transform: none; } }
.dn-other {
  display: flex; align-items: center; gap: 4px; height: 56px; margin-top: 10px; padding: 0 16px; border-radius: 8px; background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--hair); cursor: text; transition: box-shadow .2s, background-color .2s;
}
.dn-other:focus-within { background: var(--raised); box-shadow: inset 0 0 0 2px var(--sky), 0 0 0 4px rgba(92, 196, 247, .2); }
.dn-other input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: 650 22px/1 var(--display); letter-spacing: -.01em; text-align: center; outline: none; }
.dn-other input::placeholder { color: var(--text-2); opacity: 1; font-weight: 500; font-size: 17px; letter-spacing: 0; }
/* the card: one block, the name on it (first, last), its number, then its expiry, security code and ZIP */
.dn-label-card { margin-top: 16px; }
.dn-card { position: relative; overflow: hidden; border-radius: 8px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hair); }
.dn-card > * + * { border-top: 1px solid var(--hair); }
.dn-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
.dn-row.dn-names, .dn-row.dn-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dn-country select {
  flex: 1; min-width: 0; height: 100%; padding: 0 26px 0 0; border: 0; background: transparent; color: var(--text); font: 500 17px/1 var(--ui);
  -webkit-appearance: none; appearance: none; outline: none; cursor: pointer;
}
.dn-chev { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.dn-row .dn-cf + .dn-cf { border-left: 1px solid var(--hair); }
.dn-cf { position: relative; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; cursor: text; transition: background-color .2s, box-shadow .2s; }
.dn-cf:focus-within { z-index: 1; background: var(--raised); box-shadow: inset 0 0 0 2px var(--sky); }
/* (the block's rounded corners hold its fields: a field ringed in blue at a corner keeps the curve) */
.dn-names .dn-cf:first-child { border-top-left-radius: 8px; } .dn-names .dn-cf:last-child { border-top-right-radius: 8px; }
.dn-card > .dn-row:last-child .dn-cf:first-child { border-bottom-left-radius: 8px; } .dn-card > .dn-row:last-child .dn-cf:last-child { border-bottom-right-radius: 8px; }
.dn-card > .dn-cf:first-child { border-radius: 8px 8px 0 0; } .dn-card > .dn-cf:last-child { border-radius: 0 0 8px 8px; }
.dn-cf input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: 500 17px/1 var(--ui); letter-spacing: .01em; font-variant-numeric: tabular-nums; outline: none; }
.dn-cf input::placeholder { color: var(--text-2); opacity: 1; font-weight: 400; letter-spacing: 0; }
.dn-cardic { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--sky-deep); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dn-brand { flex: none; font: 700 12px/1 var(--ui); letter-spacing: .02em; color: var(--text-2); }
.dn-brand:not(:empty) { animation: dnIn .3s var(--ease); }
.dn-give {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; margin-top: 14px; border-radius: 8px;
  background: linear-gradient(180deg, #8fd6ff, #45b6f2); color: var(--sky-ink); font: 700 17px/1 var(--ui);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 22px rgba(56, 182, 245, .34); transition: filter .2s, transform .15s, box-shadow .2s;
}
.dn-give::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .5) 50%, transparent 68%); transform: translateX(-120%); pointer-events: none; }
.dn-give:not(:disabled)::after { animation: dnSheen 3.6s ease-in-out .6s infinite; }
@keyframes dnSheen { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
.dn-give:hover:not(:disabled) { filter: brightness(1.04); }
.dn-give:active:not(:disabled) { transform: scale(.985); }
.dn-give:disabled { background: var(--bg-3); color: var(--text-3); box-shadow: none; cursor: default; }
.dn-form.busy .dn-give:disabled { background: linear-gradient(180deg, #8fd6ff, #45b6f2); color: var(--sky-ink); }
.dn-give.tick .dn-give-t { animation: dnTick .35s var(--ease); }
@keyframes dnTick { from { opacity: .2; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dn-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid rgba(5, 48, 79, .22); border-top-color: var(--sky-ink); animation: dnSpin .8s linear infinite; }
.dn-form.busy .dn-spin { display: block; }
@keyframes dnSpin { to { transform: rotate(360deg); } }
.dn-err { margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--wj); text-align: center; }

.dn-done { text-align: center; padding: 6px 0 2px; }
/* the thank you: a seed falls from the sky (0.1s) and rests; rain blows in from the side (0.9s); the seed opens as a
   stem grows from it (2.2s), leaves open (2.75s) and a flower blooms (3.25s). From 4s it sways in the wind while a
   little rain still blows past and drips on it. (each piece's resting style is how it ends, so with reduced motion
   the grown flower simply shows) */
.dn-grow { display: block; width: 210px; height: auto; margin: -6px auto 6px; overflow: visible; }
/* the rain over the whole card, behind its words, with a soft sky glow behind the flower; both thin out toward the
   card's top and bottom so nothing ends in an edge (on a dark page, the rain alone) */
dialog.sheet.give .sheet-head, dialog.sheet.give .sheet-body { position: relative; z-index: 1; }
.sheet-card > .dn-rainfx {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; color: #4fb8f0;
  background: radial-gradient(300px 220px at 50% 150px, rgba(214, 238, 255, .95), rgba(214, 238, 255, .6) 38%, rgba(214, 238, 255, .22) 66%, rgba(214, 238, 255, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 78%, transparent 100%);
  animation: dnFadeIn .8s ease both; transition: opacity .5s ease;
}
.sheet-card > .dn-rainfx.out { opacity: 0; }
@keyframes dnFadeIn { from { opacity: 0; } to { opacity: 1; } }
html[data-theme="dusk"] .sheet-card > .dn-rainfx, html[data-theme="midnight"] .sheet-card > .dn-rainfx { background: none; }
.dn-grow .dn-seed { transform-box: fill-box; transform-origin: center; opacity: 0; animation: dnSeed 2.6s .1s both; }
@keyframes dnSeed {
  0% { transform: translateY(-112px) rotate(-30deg); opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  4% { opacity: 1; }
  26% { transform: none; animation-timing-function: ease-out; }
  30% { transform: translateY(-5px) rotate(8deg); animation-timing-function: ease-in; }
  34% { transform: none; opacity: 1; }
  80% { transform: none; opacity: 1; animation-timing-function: ease-in; }
  100% { transform: scale(.2); opacity: 0; }
}
.dn-grow .dn-drop { stroke: #4fb8f0; stroke-width: 2; stroke-linecap: round; opacity: 0; }
.dn-grow .dn-splash { fill: none; stroke: #7cc9f2; stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.dn-grow .dn-stem { stroke: #3e9a4c; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 1 2; stroke-dashoffset: 0; animation: dnStem 1.1s cubic-bezier(.3, .7, .3, 1) 2.2s both; }
@keyframes dnStem { from { stroke-dashoffset: 1; opacity: 0; } 2% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
.dn-grow .dn-leaf.l { transform-origin: 99.5px 113px; animation: dnLeafL .6s cubic-bezier(.34, 1.4, .6, 1) 2.75s both; }
.dn-grow .dn-leaf.r { transform-origin: 101px 99px; animation: dnLeafR .6s cubic-bezier(.34, 1.4, .6, 1) 3s both; }
@keyframes dnLeafL { from { transform: scale(0) rotate(25deg); } to { transform: none; } }
@keyframes dnLeafR { from { transform: scale(0) rotate(-25deg); } to { transform: none; } }
.dn-grow .dn-leaf.l .dn-flut { transform-origin: 99.5px 113px; animation: dnFlutL 2.6s ease-in-out 4.2s infinite; }
.dn-grow .dn-leaf.r .dn-flut { transform-origin: 101px 99px; animation: dnFlutR 2.9s ease-in-out 4.6s infinite; }
@keyframes dnFlutL { 0%, 100% { transform: none; } 50% { transform: rotate(-6deg); } }
@keyframes dnFlutR { 0%, 100% { transform: none; } 50% { transform: rotate(6deg); } }
.dn-grow .dn-flower { transform-origin: 100px 70px; animation: dnBloom .85s cubic-bezier(.34, 1.5, .6, 1) 3.25s both; }
@keyframes dnBloom { from { transform: scale(0) rotate(-60deg); } to { transform: none; } }
/* (a tuft of grass on each side, bending a little in the same wind) */
.dn-grow .dn-tuft.l { transform-origin: 47px 135px; animation: dnTuft 3.4s ease-in-out 4s infinite; }
.dn-grow .dn-tuft.r { transform-origin: 159px 135px; animation: dnTuft 3.8s ease-in-out 4.5s infinite; }
@keyframes dnTuft { 0%, 100% { transform: none; } 40% { transform: rotate(6deg); } 75% { transform: rotate(-2deg); } }
/* (the wind comes from the left with the rain, so the flower leans a little more to the right) */
.dn-grow .dn-plant { transform-origin: 100px 135px; animation: dnSway 4.2s ease-in-out 4.1s infinite; }
@keyframes dnSway { 0%, 100% { transform: none; } 35% { transform: rotate(3.2deg); } 75% { transform: rotate(-1.4deg); } }
.dn-grow .dn-nod { transform-origin: 100px 72px; animation: dnNod 3.2s ease-in-out 4.4s infinite; }
@keyframes dnNod { 0%, 100% { transform: none; } 30% { transform: rotate(5deg); } 75% { transform: rotate(-2.5deg); } }
.dn-grow .dn-drips .dn-drop { animation: dnDrip 3.4s ease-in calc(3.9s + var(--k) * 1.1s) infinite; }
.dn-grow .dn-drips .dn-splash { animation: dnDripSplash 3.4s linear calc(3.9s + var(--k) * 1.1s) infinite; }
@keyframes dnDrip { 0% { transform: translate(0, 0); opacity: 0; } 6% { opacity: .85; } 60% { transform: translate(var(--dx), var(--dy)); opacity: .85; } 61%, 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
@keyframes dnDripSplash { 0%, 59% { opacity: 0; transform: scale(.3); } 66% { opacity: .8; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1.7); } }
.dn-thanks { margin: 0; font: 700 30px/1.15 var(--display); letter-spacing: -.025em; animation: dnIn .5s var(--ease) .3s both; }
/* (the amount given, in blue: deep enough to read on a light page, lighter on a dark one) */
.dn-said .dn-amt { color: #1479c9; font-weight: 700; }
html[data-theme="dusk"] .dn-said .dn-amt, html[data-theme="midnight"] .dn-said .dn-amt { color: var(--sky); }
.dn-said { margin: 8px auto 0; max-width: 22em; font-size: 16px; line-height: 1.45; color: var(--text-2); animation: dnIn .5s var(--ease) .42s both; }
.dn-verse { margin: 20px 0 0; padding: 16px 18px; border-radius: 8px; background: var(--bg-2); text-align: left; animation: dnIn .6s var(--ease) .15s both; }
.dn-verse p { margin: 0; font: 400 17px/1.55 var(--read-font); color: var(--text); }
.dn-verse cite { display: block; margin-top: 8px; font: 600 13px/1.2 var(--ui); font-style: normal; color: var(--text-2); }
.dn-actions { display: flex; gap: 10px; margin-top: 20px; }
.dn-actions button { flex: 1; height: 48px; border-radius: 8px; font: 600 16px/1 var(--ui); }
.dn-again { background: var(--bg-2); color: var(--text); }
.dn-again:hover { background: var(--bg-3); }
.dn-ok { background: linear-gradient(180deg, #8fd6ff, #45b6f2); color: var(--sky-ink); font-weight: 700; }
@media (max-width: 760px) {
  dialog.sheet.give { width: 100%; }
  /* (a phone's top bar has room for the heart only; a wider one, the word) */
  .give-btn { width: 36px; height: 32px; margin-left: 2px; padding: 0; justify-content: center; }
  .give-btn span { display: none; }
  .give-btn svg.i { width: 18px; height: 18px; }
  .dn-art { width: 160px; }
  .dn-uses li { padding: 9px 10px; font-size: 13px; }
}
/* (a short screen: a smaller heart, so the amounts and the Give button stay in view) */
@media (max-height: 720px) {
  .dn-art { width: 124px; margin-top: -10px; }
  .dn-lead { font-size: 17px; }
  .dn-uses { margin-top: 12px; gap: 6px; }
  .dn-uses li { padding: 7px 10px; }
  .dn-form { margin-top: 14px; }
  .dn-cf { height: 48px; }
}
@media (min-width: 540px) and (max-width: 760px) {
  .give-btn { width: auto; padding: 0 11px; font-size: 13px; }
  .give-btn span { display: inline; }
  .give-btn svg.i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dn-art *, .dn-uses li, .dn-pre, .dn-give::after, .dn-give .dn-give-t, .dn-thanks, .dn-said, .dn-verse, .dn-grow * { animation: none !important; }
}
