:root {
  /* unearth (2026-10-23): the site's brand blue for accents, near-black ink, a cool grey page and
     white cards. The old token names are kept as roles: --olive = accent, --ivory = page, --sage = tint. */
  --olive: #0A8FD6; --deep: #0B0B0B; --ivory: #F4F6F8; --sage: #E3F2FC; --card: #FFFFFF;
  --ink: #0B0B0B; --muted: #5F6B77; --danger: #D14B3F; --success: #1F9D63; --line: rgba(11,11,11,.08);
  --shade: 11,11,11; --glow: 10,143,214;
}
@media (prefers-color-scheme: dark) {
  :root { --ivory: #0B0F14; --card: #151B22; --sage: #10314A; --ink: #F4F6F8; --muted: #9AA6B2; --line: rgba(255,255,255,.1); --olive: #4FB3EA; --deep: #F4F6F8; }
}
* { box-sizing: border-box; }
:root { --fast: .16s; --soft: .28s; --ease: cubic-bezier(.2,.7,.2,1); --spring: cubic-bezier(.34,1.4,.64,1); }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
@media (prefers-reduced-motion: reduce) {
  :root { --fast: 0s; --soft: 0s; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fold { to { opacity: 0; transform: scale(.98); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }
body { margin: 0; font-family: Manrope, system-ui, sans-serif; background: var(--ivory); color: var(--ink); line-height: 1.45; }
a { color: var(--olive); }
main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; animation: rise var(--soft) var(--ease) both; }
h1 { font-family: Geist, Manrope, system-ui, sans-serif; font-size: 30px; font-weight: 600; letter-spacing: -.035em; margin: 10px 0 20px; }
h1 .muted, h2 .muted { font-weight: 500; font-size: .6em; margin-left: 8px; }
h2 { font-size: 15px; font-weight: 700; margin: 34px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .err { color: var(--danger); }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 50; }
/* Same wordmark as the site: the cloud beside the unearth logo (an SVG mask, so it takes the ink colour). */
.brand { display: inline-flex; align-items: center; gap: 9px; line-height: 1; color: var(--ink); text-decoration: none; justify-self: center; transition: opacity var(--fast); }
.brand img { width: 34px; height: auto; }
.logo { display: block; height: 21px; aspect-ratio: 504 / 110.1; background: currentColor; -webkit-mask: url(/screens/logo.svg) center / contain no-repeat; mask: url(/screens/logo.svg) center / contain no-repeat; }
.brand:hover { opacity: .7; }
.top nav { display: flex; gap: 2px; }
.top nav a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.top nav a:active { transform: scale(.97); }
.top nav a:hover { color: var(--ink); }
.top nav a.active { background: var(--sage); color: var(--olive); }
.top-right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.top-right a.icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: background var(--fast), color var(--fast); }
.top-right a.icon svg { width: 18px; height: 18px; fill: currentColor; transition: transform var(--soft) var(--ease); }
.top-right a.icon:hover svg { transform: rotate(30deg); }
.top-right a.icon:hover, .top-right a.icon.active { background: var(--sage); color: var(--olive); }
.top-right button.link { color: var(--muted); font-size: 13.5px; transition: background var(--fast), color var(--fast); }
@media (prefers-color-scheme: dark) { .top nav a.active { color: var(--ink); } }
button, .button { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; transition: background var(--fast) var(--ease), color var(--fast), border-color var(--fast), transform var(--fast) var(--ease), box-shadow var(--fast), opacity var(--fast); }
button:active, .button:active { transform: scale(.97); }
button:disabled { opacity: .6; cursor: default; transform: none; }
button.primary, .button.primary { background: var(--olive); color: #fff; }
button.primary:hover, .button.primary:hover { background: #0B0B0B; box-shadow: 0 6px 16px rgba(var(--shade),.18); }
@media (prefers-color-scheme: dark) { button.primary:hover, .button.primary:hover { background: #7CC6F0; color: #0B0B0B; } }
button.ghost, .button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.ghost:hover, .button.ghost:hover { background: var(--sage); border-color: transparent; }
button.small, .button.small { padding: 5px 11px; font-size: 13px; }
button.danger { color: var(--danger); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; transition: border-color var(--soft), box-shadow var(--soft) var(--ease); }
/* One quiet surface of numbers with hairline dividers, not a wall of boxes. */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--card); padding: 22px 24px 20px; text-align: center; transition: background var(--fast); }
.stat:hover { background: var(--ivory); }
.stat .value { font-family: Geist, Manrope, system-ui, sans-serif; font-size: 34px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.footnote { font-size: 12.5px; color: var(--muted); margin: 12px 4px 0; }
.footnote a { color: var(--muted); }
.group { margin-top: 22px; }
.page-head + .group { margin-top: 12px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 4px; }
.grid2.tight { margin-top: 10px; }
.grid2.tight h2 { margin-top: 24px; }
details.setup { margin-top: 14px; }
details.setup summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
details.setup summary::-webkit-details-marker { display: none; }
details.setup summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--fast); }
details.setup[open] summary::before { transform: rotate(45deg); }
details.setup p { margin: 8px 0 0; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--fast); } tbody tr:hover { background: var(--ivory); }
tr.inactive td { opacity: .55; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--sage); padding: 1px 6px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { code { color: var(--ink); } }
.scripture { font-family: Manrope, system-ui, sans-serif; font-size: 15px; max-width: 560px; }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 6px; }
.counts { display: flex; gap: 6px; }
.add-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 14px 0 22px; }
.add-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.add-form label.grow { flex: 1 1 220px; }
.add-form label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); padding-bottom: 10px; }
.add-form input[type=text], .add-form input:not([type]) { width: 100%; font-size: 15px; padding: 10px 12px; }
.add-form input[name=ref] { font-weight: 600; }
.verse-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.verse-row { display: flex; gap: 18px; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.verse-row:last-child { border-bottom: 0; }
.verse-row.inactive .verse-main { opacity: .5; }
.verse-row.editing { background: var(--sage); }
.verse-main { flex: 1; min-width: 0; }
.verse-ref { font-weight: 800; font-size: 15px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.verse-note { font-weight: 500; font-size: 12px; color: var(--muted); }
.verse-main .scripture { margin: 4px 0 0; color: var(--ink); opacity: .85; line-height: 1.5; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--success); } .dot.off { background: var(--line); }
.verse-actions { display: flex; gap: 2px; align-items: center; flex-shrink: 0; padding-top: 2px; }
.verse-actions form { display: inline; }
button.link, a.link { background: none; border: 0; padding: 6px 10px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: none; transition: background var(--fast), color var(--fast); }
button.link:hover, a.link:hover { background: var(--sage); color: var(--ink); }
button.link.danger:hover { color: var(--danger); }
@media (max-width: 640px) { .verse-row { flex-direction: column; gap: 8px; } }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-right: 6px; }
.pill.on { background: var(--sage); color: var(--deep); } .pill.off { background: var(--line); color: var(--muted); }
@media (prefers-color-scheme: dark) { .pill.on { color: var(--ink); } }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.form-row label.grow { flex: 1; min-width: 180px; }
.form-row label.check { flex-direction: row; align-items: center; font-size: 14px; color: var(--ink); gap: 8px; padding-bottom: 10px; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink); min-width: 90px; }
input, select, textarea { transition: border-color var(--fast), box-shadow var(--fast), background var(--fast); }
input:not([type=checkbox]):not([type=file]):focus, select:focus, textarea:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(var(--glow),.18); }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
.flash { padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; animation: pop var(--soft) var(--spring) both; transition: opacity var(--soft), transform var(--soft) var(--ease), margin var(--soft), max-height var(--soft), padding var(--soft); max-height: 80px; overflow: hidden; }
.flash.gone { opacity: 0; transform: translateY(-6px); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; }
.flash.ok { background: var(--sage); color: var(--deep); } .flash.err { background: rgba(180,83,59,.12); color: var(--danger); }
@media (prefers-color-scheme: dark) { .flash.ok { color: var(--ink); } }
body.login { display: grid; place-items: center; min-height: 100vh; background: #0A8FD6; }
.login-card { width: min(360px, 92vw); display: flex; flex-direction: column; gap: 14px; }
.login-card { padding: 28px 24px 24px; border: 0; border-radius: 24px; box-shadow: 0 24px 60px rgba(3,40,64,.3); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 2px; }
.login-brand img { width: 64px; height: auto; }
.login-brand .logo { height: 24px; color: var(--ink); }
.login-card h1 { margin: 0 0 4px; text-align: center; font-size: 13px; font-family: Manrope, system-ui, sans-serif; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); } .login-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
input[type=checkbox] { accent-color: var(--olive); width: 16px; height: 16px; }

/* App config */
.config-form { display: grid; gap: 14px; max-width: 760px; }
.config-form h2 { margin: 0 0 12px; display: flex; align-items: center; gap: 14px; }
.config-form .form-row { margin-bottom: 10px; }
.config-form label.block { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.config-form input, .config-form textarea { font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink); }
.config-form textarea { resize: vertical; font-family: inherit; }
.config-form textarea[name=flags] { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }
.config-form label.check.inline { font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.form-actions { display: flex; justify-content: flex-end; }
pre.json { font-family: ui-monospace, Menlo, monospace; font-size: 13px; max-width: 760px; overflow: auto; margin: 0; }
.config-form label.block > span { display: block; }
.config-form label.block code { font-size: 12px; }

/* Verse audio */
.audio-box { margin: 0 0 18px; }
.audio-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.audio-head h2 { margin: 0 0 4px; }
.audio-head p { margin: 0 0 12px; max-width: 560px; }
.audio-box select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink); max-width: 100%; }
.verse-audio { height: 30px; max-width: 200px; }
.narrators { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.narrator { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; background: var(--ivory); border-radius: 10px; }
.narrator form { display: inline; }
.narrations { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.narration { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.narration .who { font-weight: 700; color: var(--muted); margin-right: 4px; }
.narration form { display: inline; }
.audio-box input[name=label] { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink); }

/* Scroll verses: masonry of cards */
.add-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 18px; }
.add-row input { font: inherit; font-size: 15px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.add-row .ref-input { flex: 2 1 320px; font-weight: 600; }
.add-row .note-input { flex: 1 1 200px; }
.add-row label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.editing-card { padding: 14px; }
.narr-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.narr-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.narr-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.narr-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--sage); color: var(--deep); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 700; }
.narr-chip small { font-weight: 500; color: var(--muted); }
.narr-chip form { display: inline; } .narr-chip button.x { background: none; border: 0; padding: 0 6px; font-size: 15px; line-height: 1; color: var(--muted); cursor: pointer; } .narr-chip button.x:hover { color: var(--danger); }
.narr-add summary { list-style: none; cursor: pointer; } .narr-add summary::-webkit-details-marker { display: none; }
.narr-add-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.narr-add-form select, .narr-add-form input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink); }
/* Cards are balanced into columns by a little script (CSS multi-column made Safari blank cards on hover). */
.masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.masonry.cols { display: flex; align-items: flex-start; }
.masonry .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.vcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px; box-sizing: border-box; }
.vcard { transition: box-shadow var(--soft) var(--ease), border-color var(--soft), opacity var(--soft) var(--ease); }
.vcard.is-hidden { display: none; }
.vcard:hover { box-shadow: 0 10px 28px rgba(var(--shade),.08); }
.vcard.inactive { opacity: .55; }
.vcard.inactive:hover { opacity: .8; }
.vcard.is-editing { outline: 2px solid var(--olive); }
.vcard header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vcard header b { font-size: 15px; letter-spacing: -.01em; flex: 1; }
.vcard .scripture { margin: 0; font-size: 15px; line-height: 1.55; max-width: none; color: var(--ink); }
.vcard .note { margin-top: 10px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 18px; letter-spacing: 1px; line-height: 1; transition: background var(--fast), color var(--fast); }
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary:hover, details.menu[open] summary { background: var(--sage); color: var(--deep); }
.menu-list { position: absolute; right: 0; top: 32px; z-index: 5; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px rgba(var(--shade),.16); display: grid; transform-origin: top right; animation: pop var(--fast) var(--spring) both; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: none; transition: background var(--fast); }
.menu-list a:hover, .menu-list button:hover { background: var(--sage); }
.menu-list button.danger { color: var(--danger); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-list form { display: block; }
.players { display: grid; gap: 6px; margin-top: 12px; }
.player { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; background: var(--ivory); border-radius: 999px; }
.player { transition: background var(--fast); }
.player.playing { background: var(--sage); }
.player .play { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--olive); color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; flex-shrink: 0; transition: transform var(--fast) var(--spring), background var(--fast); }
.player .play:hover { transform: scale(1.08); }
.player .play svg { width: 14px; height: 14px; fill: currentColor; }
.player .ic-pause, .player.playing .ic-play { display: none; } .player.playing .ic-pause { display: block; }
.player .who { font-size: 12px; font-weight: 700; color: var(--deep); min-width: 52px; max-width: 110px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; }
.player .bar { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; cursor: pointer; }
.player .bar i { display: block; height: 100%; width: 0; background: var(--olive); transition: width .2s linear; }
.player .time { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); width: 32px; text-align: right; flex-shrink: 0; }

/* Narration settings behind the gear */
.page-head .spacer { flex: 1; }
details.gear { position: relative; align-self: center; }
details.gear summary { list-style: none; cursor: pointer; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); position: relative; transition: background var(--fast), color var(--fast); }
details.gear summary::-webkit-details-marker { display: none; }
details.gear summary svg { width: 20px; height: 20px; fill: currentColor; }
details.gear summary:hover, details.gear[open] summary { background: var(--sage); color: var(--deep); }
details.gear .badge { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.gear-panel { position: absolute; right: 0; top: 42px; z-index: 6; width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 14px 34px rgba(var(--shade),.18); transform-origin: top right; animation: pop var(--soft) var(--spring) both; }
.gear-panel h3 { margin: 0 0 10px; font-size: 15px; }
.gear-panel .narr-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.gear-panel .narr-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 8px 10px; background: var(--ivory); border-radius: 10px; font-size: 14px; }
.narr-edit { flex: 1; display: grid; grid-template-columns: 40px 1fr 1fr auto; gap: 6px; align-items: center; }
.narr-edit .portrait { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--sage); display: grid; place-items: center; cursor: pointer; font-weight: 700; color: var(--deep); position: relative; }
.narr-edit .portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.narr-edit .portrait input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.narr-edit .portrait::after { content: ''; position: absolute; inset: 0; background: rgba(var(--shade),.18); opacity: 0; transition: opacity var(--fast); }
.narr-edit .portrait:hover::after { opacity: 1; }
.gear-form .file { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 2px; }
.gear-form .file input { font-size: 12px; max-width: 200px; }
.player .who img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; }
.narr-edit input { font: inherit; font-size: 13.5px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); min-width: 0; }
.narr-edit input[name=name] { font-weight: 700; }
.narr-edit input:hover, .narr-edit input:focus { background: var(--card); border-color: var(--line); outline: none; box-shadow: none; }
.narr-edit .save { display: none; padding: 5px 10px; }
.narr-edit:focus-within .save, .narr-edit.dirty .save { display: inline-block; }
.narr-edit .src { grid-column: 2 / -1; padding: 0 8px; }
.gear-panel .mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.gear-panel button.x { background: none; border: 0; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; } .gear-panel button.x:hover { color: var(--danger); }
.gear-form { display: grid; gap: 6px; }
.gear-form input { font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink); }
.gear-form input[name=id] { font-family: ui-monospace, Menlo, monospace; }
.gear-record { margin-top: 10px; }
.gear-record button { width: 100%; }

/* Switch: an iOS-style toggle in place of a checkbox */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 14px; color: var(--ink); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch .track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line); flex-shrink: 0; transition: background var(--soft) var(--ease), box-shadow var(--fast); box-shadow: inset 0 1px 2px rgba(var(--shade),.1); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(var(--shade),.25); transition: transform var(--soft) var(--spring), width var(--fast) var(--ease); }
.switch input:checked + .track { background: var(--olive); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch:active .track::after { width: 24px; }
.switch:active input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(var(--glow),.3); }
.switch input:disabled + .track { opacity: .5; }
.switch.sm .track { width: 36px; height: 22px; } .switch.sm .track::after { width: 16px; height: 16px; }
.switch.sm input:checked + .track::after { transform: translateX(14px); }
.switch.sm:active .track::after { width: 19px; } .switch.sm:active input:checked + .track::after { transform: translateX(11px); }
.switch-label { font-weight: 600; }
.add-row .switch { color: var(--muted); } .add-row .switch input:checked ~ .switch-label { color: var(--ink); }
.switch-label { transition: color var(--fast); }
.vcard header .switch { margin-right: 2px; }
.config-form h2 .switch { margin-left: auto; font-size: 13px; }

/* A block that folds shut, animating its height */
.collapsible { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--soft) var(--ease), opacity var(--soft) var(--ease); opacity: 0; }
.collapsible > div { overflow: hidden; min-height: 0; }
.collapsible.open { grid-template-rows: 1fr; opacity: 1; }

/* Feature flags as rows of switches */
.flag-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.flag-row { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 8px; background: var(--ivory); border-radius: 12px; transform-origin: top; }
.flag-row.new { animation: pop var(--soft) var(--spring) both; }
.flag-row.leaving { animation: fold var(--soft) var(--ease) forwards; overflow: hidden; }
.flag-row .flag-name { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; background: transparent; border-color: transparent; padding: 6px 8px; }
.flag-row .flag-name:hover { background: var(--card); border-color: var(--line); }
.flag-row .flag-name:focus { background: var(--card); }
.flag-row button.x { background: none; border: 0; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.flag-row button.x:hover { color: var(--danger); background: var(--card); transform: none; }
.config-form [data-add-flag] { margin-bottom: 4px; }

/* Verse of the Day calendar */
.cal-actions { display: flex; gap: 6px; align-self: center; }
.cal-help { margin: -2px 0 16px; max-width: 640px; }
.cal-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.cal-nav h2 { margin: 0; font-size: 18px; min-width: 170px; text-align: center; }
.cal-nav .button { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.cal-nav .today-link { margin-left: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.cal-dow { background: var(--card); padding: 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 108px; padding: 8px 10px 10px; background: var(--card); border: 0; border-radius: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background var(--fast); }
.cal-day:hover { background: var(--ivory); }
.cal-day:active { transform: none; }
.cal-day.out { background: color-mix(in srgb, var(--card) 60%, var(--ivory)); }
.cal-day.out .num, .cal-day.past .num { color: var(--muted); }
.cal-day.past:not(.empty) > * { opacity: .6; }
.cal-day .num { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; margin-left: -4px; }
.cal-day.today .num { background: var(--olive); color: #fff; }
.cal-day .ref { font-size: 13px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }
.cal-day .snip { font-family: Manrope, system-ui, sans-serif; font-size: 12px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-day .auto-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .6; margin-top: auto; padding-top: 4px; }
.cal-day.auto .ref { color: var(--muted); font-weight: 600; }
.cal-day.auto .snip { opacity: .75; }
.cal-day.pinned { background: color-mix(in srgb, var(--sage) 35%, var(--card)); }
.cal-day.pinned:hover { background: color-mix(in srgb, var(--sage) 55%, var(--card)); }
.cal-day.pinned .num::after { content: ''; }
.cal-day .uses { position: absolute; top: 8px; right: 8px; }
.cal-day .hidden-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--danger); }
.uses { display: inline-block; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 999px; background: var(--line); color: var(--muted); }
.uses.fresh { background: var(--sage); color: var(--olive); }
.uses.ok { background: var(--line); color: var(--ink); }
.uses.warn { background: rgba(192,138,46,.16); color: #9A6B14; }
@media (prefers-color-scheme: dark) { .uses.fresh { color: var(--ink); } .uses.warn { color: #E7B45A; } }
.usage { margin-top: 28px; }
.usage table td:nth-child(2), .usage table th:nth-child(2) { width: 110px; }
.usage .snip-row { font-family: Manrope, system-ui, sans-serif; max-width: 520px; }
@media (max-width: 760px) { .cal-day { min-height: 72px; padding: 6px; } .cal-day .snip { display: none; } .cal-day .ref { font-size: 11px; } }

/* Day picker */
.picker { width: min(560px, 94vw); max-height: 82vh; border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(var(--shade),.28); display: none; flex-direction: column; }
.picker[open] { display: flex; animation: pop var(--soft) var(--spring) both; }
.picker::backdrop { background: rgba(var(--shade),.28); backdrop-filter: blur(3px); }
.picker header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.picker header b { font-size: 16px; }
.picker button.x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.picker button.x:hover { color: var(--ink); transform: none; }
.picker #picker-search { margin: 0 18px 10px; font-size: 14px; }
.picker ul { list-style: none; margin: 0; padding: 0 10px 10px; overflow: auto; flex: 1; }
.picker li.none { padding: 20px; text-align: center; }
.pick { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 10px 10px; font: inherit; color: var(--ink); cursor: pointer; transition: background var(--fast); }
.pick:hover { background: var(--sage); } .pick:active { transform: none; }
.pick.selected { background: var(--ivory); outline: 2px solid var(--olive); }
.pick-main { display: grid; gap: 2px; min-width: 0; }
.pick-main b { font-size: 14px; }
.pick-main .snip { font-family: Manrope, system-ui, sans-serif; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pick-meta { display: grid; justify-items: end; gap: 4px; flex-shrink: 0; white-space: nowrap; }
.picker footer { border-top: 1px solid var(--line); padding: 10px 18px; display: flex; justify-content: flex-end; }

/* Verses page, quieter: text first, controls on hover, one pill per narrator */
.verses-head { align-items: center; }
.verses-head h1 { margin-bottom: 0; }
.filter { font: inherit; font-size: 14px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); width: 200px; min-width: 0; }
.filter:focus { width: 260px; }
.filter { transition: width var(--soft) var(--ease), border-color var(--fast), box-shadow var(--fast); }
.seg { display: inline-flex; background: var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(var(--shade),.12); }
.seg button:active { transform: none; }
.add-row .note-input, .add-row .switch { display: none; }
.add-row.more .switch, .add-row.editing-card .switch { display: inline-flex; animation: pop var(--fast) var(--ease) both; }
.add-row.more .note-input, .add-row.editing-card .note-input { display: block; animation: pop var(--fast) var(--ease) both; }
.filter-empty { margin-top: 4px; }
kbd.hint { font: inherit; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin-left: 6px; }
.vcard { padding: 14px 16px 12px; }
.vcard header { margin-bottom: 6px; }
.vcard header .switch, .vcard header details.menu { opacity: 0; transition: opacity var(--fast); }
.vcard:hover header .switch, .vcard:hover header details.menu, .vcard header details.menu[open], .vcard.inactive header .switch, .vcard:focus-within header .switch, .vcard:focus-within header details.menu { opacity: 1; }
@media (hover: none) { .vcard header .switch, .vcard header details.menu { opacity: 1; } }
.vcard .scripture { font-size: 14.5px; line-height: 1.5; }
.voices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.voice { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; max-width: 100%; transition: background var(--fast), border-color var(--fast), color var(--fast), flex-basis var(--soft) var(--ease); }
.voice:hover { background: var(--ivory); color: var(--ink); } .voice:active { transform: none; }
.voice.none { opacity: .4; cursor: default; } .voice.none:hover { background: transparent; color: var(--muted); }
.voice .face { position: relative; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; background: var(--sage); display: grid; place-items: center; color: var(--deep); font-size: 11px; flex-shrink: 0; }
.voice .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voice .face svg { position: absolute; inset: 0; margin: auto; width: 11px; height: 11px; fill: #fff; opacity: 0; transition: opacity var(--fast); filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.voice .face::after { content: ''; position: absolute; inset: 0; background: rgba(var(--shade),.35); opacity: 0; transition: opacity var(--fast); }
.voice:hover .face::after, .voice.playing .face::after { opacity: 1; }
.voice:hover .ic-play, .voice.playing.paused .ic-play, .voice.playing:not(.paused) .ic-pause { opacity: 1; }
.voice.playing:not(.paused):hover .ic-play { opacity: 0; }
.voice .bar, .voice .time { display: none; }
.voice.playing { flex: 1 1 100%; background: var(--sage); border-color: transparent; color: var(--deep); }
.voice.playing .bar { display: block; flex: 1; height: 3px; background: rgba(var(--shade),.15); border-radius: 2px; overflow: hidden; cursor: pointer; }
.voice.playing .bar i { display: block; height: 100%; width: 0; background: var(--olive); transition: width .2s linear; }
.voice.playing .time { display: inline; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
@media (prefers-color-scheme: dark) { .voice.playing { color: var(--ink); } .voice .face { color: var(--ink); } }

/* Verse of the Day backgrounds */
.backgrounds { margin-top: 32px; }
.art-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .art-row { grid-template-columns: repeat(2, 1fr); } }
.art-row .art { animation: none; }
.art { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.art img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.art figcaption { display: grid; gap: 3px; padding: 10px 12px 12px; }
.art figcaption b { font-size: 14px; }
.art figcaption code { justify-self: start; font-size: 11px; margin-top: 2px; }

/* Overview website lists: ranked rows with a share bar behind each name */
.lists { grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .lists { grid-template-columns: 1fr; } }
.list { padding: 14px 18px 10px; }
.list h2 { margin: 0 0 8px !important; }
.list-head, .list-row { display: grid; grid-template-columns: 1fr 64px 52px; gap: 10px; align-items: center; }
.list-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 0 4px; }
.list-head span:not(:first-child), .list-row > :not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.list-row { padding: 3px 0; font-size: 14px; }
.list-row .meter { position: relative; padding: 5px 9px; border-radius: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; z-index: 0; }
.list-row .meter::before { content: ''; position: absolute; inset: 0; width: var(--w); background: var(--sage); border-radius: 7px; z-index: -1; opacity: .8; }
/* Overview range switch: one setting for every card */
.page-head .seg-links { margin-left: auto; align-self: center; }
.seg-links { display: inline-flex; background: var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; transition: background var(--fast), color var(--fast); }
.seg-links a:hover { color: var(--ink); }
.seg-links a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(var(--shade),.12); }
@media (max-width: 760px) { .page-head .seg-links { margin-left: 0; } }

/* Blue page (2026-10-23): everything below the white header sits on brand blue, like the site's
   feature cards. Type on the blue is white; card surfaces, inputs and pickers switch the tokens
   back so their contents read as before. Primary buttons go black so they hold on the blue. */
:root { --page: #0A8FD6; --card-ink: #0B0B0B; --card-muted: #5F6B77; --card-line: rgba(11,11,11,.08); }
@media (prefers-color-scheme: dark) { :root { --page: #073A5C; --card-ink: #F4F6F8; --card-muted: #9AA6B2; --card-line: rgba(255,255,255,.1); } }
body:not(.login) { background: var(--page); }
main { --ink: #FFFFFF; --muted: rgba(255,255,255,.8); --line: rgba(255,255,255,.24); color: var(--ink); }
main a { color: inherit; }
main :is(.card, .stats, table, .verse-list, .empty, .vcard, .menu-list, .gear-panel, .cal, .cal-dow, .cal-day, .picker, .filter, .art, .narr-bar, input, select, textarea, .seg button.on, .seg-links a.on, .flash) {
  --ink: var(--card-ink); --muted: var(--card-muted); --line: var(--card-line); color: var(--ink);
}
main :is(.card, .stats, table, .vcard, .cal-day, .picker, .gear-panel, .menu-list) a { color: var(--olive); }
main input, main select, main textarea { background: var(--card); }
main .seg, main .seg-links { background: rgba(255,255,255,.18); }
main .seg button:not(.on), main .seg-links a:not(.on) { color: rgba(255,255,255,.88); }
main button.primary, main .button.primary { background: #0B0B0B; color: #FFFFFF; }
main button.primary:hover, main .button.primary:hover { background: #2A2D31; color: #FFFFFF; box-shadow: 0 6px 16px rgba(3,40,64,.3); }
main button.ghost:hover, main .button.ghost:hover { background: rgba(255,255,255,.16); }
main :is(.card, .stats, table, .vcard, .gear-panel, .picker) button.ghost:hover { background: var(--sage); }
main :is(.card, .stats, .vcard, .gear-panel, .picker) :is(button.primary, .button.primary) { background: var(--olive); }
main :is(.card, .stats, .vcard, .gear-panel, .picker) :is(button.primary, .button.primary):hover { background: #0B0B0B; }
main .cal, main .stats { background: color-mix(in srgb, var(--card-ink) 9%, var(--card)); }
