@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=DM+Sans:wght@400;500;600&family=Lexend:wght@400;500;600&family=Libre+Baskerville:wght@400;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap");

:root {
  color-scheme: light;
  --background: #f8f7f3;
  --surface: #fff;
  --ink: #262624;
  --muted: #77756f;
  --line: #dfddd6;
  --accent: #c64f35;
  --soft: #efece5;
  --sans: "DM Sans", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --reader-font: "Source Serif 4", Georgia, serif;
  --reader-size: 1.12rem;
  --reader-toolbar-height: 58px;
}
[data-theme="dark"] { color-scheme: dark; --background: #181817; --surface: #222220; --ink: #eeeae2; --muted: #aaa69d; --line: #3d3b37; --soft: #2c2a27; --accent: #e58067; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--background); }
body { margin: 0; background: var(--background); color: var(--ink); font-family: var(--sans); }
button { color: inherit; font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.site-header { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 74px; padding: 0 40px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(18px); }
.wordmark { color: inherit; font: 600 1.2rem var(--serif); text-decoration: none; }
.primary-tabs { align-self: stretch; display: flex; gap: clamp(24px, 3.5vw, 42px); }
.primary-tabs a, .mobile-tabs a { position: relative; display: grid; place-items: center; color: var(--muted); font-size: .84rem; font-weight: 500; text-decoration: none; }
.primary-tabs a.active { color: var(--ink); }
.primary-tabs a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--ink); content: ""; }
.header-actions { justify-self: end; display: flex; gap: 4px; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--soft); }
.view { width: min(100% - 40px, 820px); margin: 0 auto; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: .65rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.daily-hero { padding: clamp(54px, 8vh, 72px) 0 34px; text-align: center; }
.daily-hero h1, .chapter-header h1 { margin: 0; font: 600 clamp(2.8rem, 8vw, 5.5rem)/1 var(--serif); letter-spacing: -.045em; }
.daily-intro { max-width: 480px; margin: 14px auto 0; color: var(--muted); line-height: 1.55; }
.daily-card { margin-bottom: 44px; padding: clamp(24px, 4.5vw, 42px); border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.daily-card h2 { margin: 0 0 20px; font: 600 1.45rem var(--serif); }
.scripture { font: 400 var(--reader-size)/1.9 var(--reader-font); }
.daily-passage p, .verse { display: inline; margin: 0; }
.daily-passage p:not(:last-child)::after, .verse:not(:last-child)::after { content: " "; }
.line-by-line .daily-passage p, .line-by-line .verse { display: block; margin: 0 0 1em; }
.line-by-line .daily-passage p::after, .line-by-line .verse::after { content: none; }
.verse-number { margin-right: .65em; color: var(--accent); font: 600 .63em var(--sans); text-decoration: none; vertical-align: super; }
.daily-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.button { padding: 12px 16px; border: 1px solid var(--line); border-radius: 3px; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 600; }
.button:hover { border-color: var(--ink); }
.button.primary { border-color: var(--ink); background: var(--ink); color: var(--background); }
.reader-toolbar { position: sticky; z-index: 10; top: 74px; display: grid; min-height: var(--reader-toolbar-height); grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(18px); transition: transform .22s ease, opacity .18s ease; }
.bible-reading:not(.mobile-controls-visible) .reader-toolbar { opacity: 0; pointer-events: none; transform: translateY(-100%); }
.selector, .translation { min-width: 0; padding: 14px 16px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; }
.selector, .translation { cursor: pointer; }
.selector:hover, .translation:hover { background: var(--soft); }
.selector strong, .translation strong { display: block; overflow: hidden; font: 600 .9rem var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.chapter-header { padding: 58px 0 42px; text-align: center; }
.chapter-header h2 { margin: 14px 0 0; font: 600 1.2rem/1.35 var(--serif); }
.chapter-introduction { max-width: 620px; margin: 12px auto 0; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.chapter-header p:last-child { margin: 14px 0 0; color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.chapter-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; }
.chapter-meta-button, .chapter-audio-button { display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color .2s ease; }
.chapter-meta-button { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-family: inherit; }
.chapter-audio-button { width: 42px; height: 42px; }
.chapter-audio-button svg { width: 15px; height: 15px; transform: translateX(1px); }
.chapter-meta-button:hover, .chapter-audio-button:hover { color: var(--ink); }
.audio-spinner { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, currentColor 22%, transparent); border-top-color: currentColor; border-radius: 50%; animation: audio-spin .75s linear infinite; }
@keyframes audio-spin { to { transform: rotate(360deg); } }
.verse { scroll-margin-top: 170px; border-radius: 4px; padding: 2px 4px; margin: -2px -4px; transition: background-color 0.2s ease; -webkit-tap-highlight-color: transparent; }
.verse:target { background: var(--soft); outline: 4px solid var(--soft); }
.chapter-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 70px 0 90px; padding-top: 20px; border-top: 1px solid var(--line); }
.chapter-nav button { display: flex; flex-direction: column; gap: 5px; padding: 18px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.chapter-nav button:last-child { text-align: right; }
.chapter-nav button:hover { border-color: var(--ink); }
.chapter-nav span { color: var(--muted); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
.chapter-nav strong { font-family: var(--serif); }
.chapter-nav button:disabled { visibility: hidden; }
.home-footer { display: flex; justify-content: center; margin: -20px 0 0; padding: 24px 0 70px; font-size: .7rem; }
.home-footer-links { display: flex; gap: 32px; justify-content: center; }
.home-footer a { color: #555; text-underline-offset: 3px; }
[data-theme="dark"] .home-footer a { color: #aaa49a; }
.back-link { color: inherit; text-underline-offset: 3px; }
.home-footer a:hover, .back-link:hover { color: var(--ink); }
.mobile-tabs { display: none; }
dialog { position: fixed; top: 16px; bottom: auto; width: min(680px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); margin: 0 auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px #0005; }
dialog::backdrop { background: #111b; backdrop-filter: blur(3px); }
dialog[open] { height: min(760px, calc(100dvh - 32px)); animation: dialog-show 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
dialog[open]::backdrop { animation: backdrop-show 0.22s ease forwards; }
@keyframes dialog-show { from { opacity: 0; transform: scale(0.96) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes backdrop-show { from { opacity: 0; } to { opacity: 1; } }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 25px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font: 600 1.55rem var(--serif); }
.book-picker { max-height: 600px; overflow-y: auto; }
.book-picker h3 { margin: 0; padding: 18px 25px 8px; color: var(--muted); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.book-picker button { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 13px 25px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.book-picker button:hover { background: var(--soft); }
.book-picker strong { font-family: var(--serif); }
.book-details { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.book-details small, .book-chapters { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.book-chapters { flex: 0 0 auto; white-space: nowrap; }
.translation-info { padding: 30px 25px; }
.translation-info h3 { margin: 0 0 12px; font: 600 1.25rem var(--serif); }
.translation-info p { margin: 0 0 12px; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.translation-info p:last-child { margin-bottom: 0; }
.chapter-picker { max-height: 600px; padding: 25px; overflow-y: auto; }
.picker-introduction { margin: 0 0 20px; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.chapter-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.chapter-grid button { aspect-ratio: 1; border: 1px solid var(--line); background: var(--background); cursor: pointer; }
.chapter-grid button:hover, .chapter-grid button.active { border-color: var(--ink); background: var(--ink); color: var(--background); }
.settings-dialog[open] { display: flex; height: min(760px, calc(100dvh - 32px)); max-height: min(760px, calc(100dvh - 32px)); flex-direction: column; }
.settings-dialog .dialog-header { flex: 0 0 auto; }
.settings-content { flex: 1 1 auto; min-height: 0; padding: 0 25px 25px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.setting-section { padding: 25px 0; border-bottom: 1px solid var(--line); }
.setting-section:last-child { padding-bottom: 0; border-bottom: 0; }
.setting-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.setting-heading h3 { margin: 0 0 4px; font-size: .86rem; }
.setting-heading p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.setting-heading > strong { color: var(--accent); font-size: .8rem; }
.size-controls { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 62px; border: 1px solid var(--line); }
.size-controls button { width: 48px; height: 48px; border: 0; background: var(--soft); cursor: pointer; font-size: 1.35rem; }
.size-controls button:hover:not(:disabled) { background: var(--ink); color: var(--background); }
.size-controls button:disabled { color: var(--muted); cursor: not-allowed; opacity: .45; }
.size-preview { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px 12px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.preview-reference { color: var(--accent); font: 600 .55rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.font-options { display: grid; gap: 8px; }
.font-options button { display: grid; grid-template-columns: 48px 1fr 18px; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.font-options button:hover, .font-options button.active { border-color: var(--ink); background: var(--soft); }
.font-options button > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.font-options small { color: var(--muted); font-size: .67rem; }
.font-options i { width: 13px; height: 13px; border: 1px solid var(--muted); border-radius: 50%; }
.font-options button.active i { border: 4px solid var(--accent); }
.font-sample { font-size: 1.35rem; }
.source-font { font-family: "Source Serif 4", Georgia, serif; }
.baskerville-font { font-family: "Libre Baskerville", Georgia, serif; }
.atkinson-font { font-family: "Atkinson Hyperlegible", sans-serif; }
.lexend-font { font-family: "Lexend", sans-serif; }
.setting-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.audio-setting-row { margin-bottom: 24px; }
.setting-toggle-row .setting-heading { margin-bottom: 0; }
.voice-selector { width: 180px; padding: 10px 12px; text-align: left; flex-shrink: 0; }
.voice-selector:disabled { color: var(--muted); cursor: not-allowed; }
.speed-controls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.speed-button { padding: 10px 12px; }
.speed-button.active { border-color: var(--accent); background: var(--soft); }
.switch { position: relative; flex: 0 0 auto; width: 44px; height: 25px; padding: 2px; border: 0; border-radius: 20px; background: var(--muted); cursor: pointer; transition: background .2s ease; }
.switch span { display: block; width: 21px; height: 21px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px #0004; transition: transform .2s ease; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(19px); }
.data-actions { display: flex; gap: 10px; margin-top: 14px; }
.data-action-button { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 56px; }
.import-label { position: relative; text-align: center; cursor: pointer; overflow: hidden; }
.import-label input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.hide-verse-numbers .verse-number, .hide-verse-numbers .preview-reference { display: none; }
.toast { position: fixed; z-index: 50; bottom: 25px; left: 50%; padding: 10px 16px; border-radius: 24px; background: var(--ink); color: var(--background); font-size: .78rem; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading, .fatal { color: var(--muted); text-align: center; }
.fatal { margin: 80px 20px; }
.policy-header { grid-template-columns: 1fr auto; }
.back-link { justify-self: end; font-size: .78rem; }
.policy-page { width: min(100% - 40px, 820px); margin: 0 auto; }
.policy-hero h1 { margin: 0; font: 600 clamp(2.8rem, 8vw, 5.5rem)/1 var(--serif); letter-spacing: -.045em; }
.policy-content { padding: clamp(26px, 6vw, 54px); }
.policy-content section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.policy-content section:first-child { padding-top: 0; }
.policy-content section:last-child { padding-bottom: 0; border-bottom: 0; }
.policy-content h2 { margin: 0 0 14px; font: 600 1.35rem var(--serif); }
.policy-content p { margin: 0 0 14px; color: var(--muted); line-height: 1.75; }
.policy-content p:last-child { margin-bottom: 0; }
.about-page { width: min(100% - 40px, 760px); margin: 0 auto 48px; }
.about-hero h1 { margin: 0; font: 600 clamp(2.5rem, 6.6vw, 4.6rem)/1 var(--serif); letter-spacing: -.045em; }
.about-content { padding: clamp(22px, 5vw, 44px); display: flex; flex-direction: column; gap: 8px; }
.about-content section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.about-content section:first-child { padding-top: 0; }
.about-content section:last-child { padding-bottom: 0; border-bottom: 0; }
.about-content h2 { margin: 0 0 12px; font: 600 1.25rem var(--serif); }
.about-content p { margin: 0 0 12px; color: var(--muted); line-height: 1.75; }
.about-content p:last-child { margin-bottom: 0; }
.about-note { color: var(--muted); }
.about-mark { color: var(--ink); font-family: var(--serif); font-style: italic; }
.about-footnote { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .82rem; text-align: center; }
.about-footnote a { color: var(--muted); text-underline-offset: 3px; }
.about-footnote a:hover { color: var(--ink); }
.suggestion-form { display: grid; max-width: 560px; gap: clamp(14px, 2.6vw, 18px); margin-top: 16px; }
.suggestion-field { display: grid; gap: 8px; }
.suggestion-field input,
.suggestion-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  color: var(--ink);
  font: 400 .95rem/1.5 var(--sans);
  resize: vertical;
}
.suggestion-field input::placeholder,
.suggestion-field textarea::placeholder { color: color-mix(in srgb, var(--muted) 88%, transparent); }
.suggestion-field input:focus,
.suggestion-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.suggestion-field textarea { min-height: 160px; }
.suggestion-actions { display: grid; gap: 10px; align-items: start; }
.suggestion-status { min-height: 1.4em; margin: 0; font-size: .82rem; line-height: 1.6; color: var(--muted); }
.suggestion-status.is-error { color: #b85a4d; }
.suggestion-status.is-success { color: var(--accent); }
.suggestion-submit { justify-self: start; min-width: 170px; }
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.wallet-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.wallet-card p { margin-bottom: 8px; }
.wallet-card code { display: block; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: .84rem; word-break: break-all; user-select: all; font-family: monospace; }
.communion-card section { padding: 0; }
.communion-card section + section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.communion-card h2 { margin: 0 0 12px; font: 600 1.25rem var(--serif); }
.communion-card p { margin: 0; color: var(--muted); line-height: 1.75; }
.communion-anchor h2 { margin-bottom: 20px; }
.communion-actions .button:disabled { color: var(--muted); cursor: not-allowed; opacity: .58; }
.communion-list { display: grid; gap: 12px; margin-top: 22px; }
.communion-entry, .communion-archive-item { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: color-mix(in srgb, var(--ink) 3%, transparent); text-decoration: none; }
.communion-entry h3, .communion-archive-item strong { display: block; margin: 0 0 10px; color: var(--ink); font: 600 1.1rem var(--serif); }
.communion-entry p:not(.eyebrow) { display: inline; color: var(--ink); }
.communion-entry p:not(.eyebrow):not(:last-child)::after { content: " "; }
.communion-archive-list { display: grid; gap: 10px; margin-top: 18px; }
.communion-archive-item span, .communion-archive-item small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.communion-archive-item:hover { border-color: var(--ink); }
/* 5-Block Communion Layout */
.communion-top-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 768px) {
  .communion-top-blocks { grid-template-columns: 1fr; }
}
.communion-anchor-card, .communion-offer-card, .communion-settled-card, .communion-submissions-card, .communion-archive-card { margin-bottom: 24px; }
.communion-anchor-card { margin-bottom: 0; }
.communion-offer-card { margin-bottom: 0; }
.communion-preview-card { margin-bottom: 24px; }
.communion-anchor-header { margin-bottom: 20px; }
.communion-anchor-header h2 { margin: 0 0 12px; font: 600 1.25rem var(--serif); }
.communion-anchor-header .eyebrow { margin-bottom: 4px; }
.communion-anchor-actions { display: flex; gap: 12px; }
.communion-section-title { margin: 0 0 20px; font: 600 1.25rem var(--serif); }
.communion-form { display: grid; gap: 18px; }
.communion-form .form-row { display: grid; gap: 8px; }
.communion-form .form-row select, .communion-form .form-row input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--page); color: var(--ink); font-size: 1rem; }
.communion-form .form-row label { font-size: .87rem; color: var(--muted); font-weight: 500; }
.communion-preview { padding: 0; background: transparent; border-radius: 0; line-height: 1.8; }
.communion-preview p { margin: 12px 0; color: var(--ink); }
.communion-preview .verse-number { color: var(--muted); font-size: .9rem; font-weight: 500; margin-right: 6px; }
.communion-form .rules-row { margin-top: 8px; }
.communion-form .rules-row p { margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.6; }
#communion-duplicate { margin-top: 12px; }
.communion-settled-reading { padding: 0; background: transparent; border-radius: 0; line-height: 1.8; }
.communion-settled-reading p { margin: 12px 0; color: var(--ink); }
.communion-settled-reading .verse-number { color: var(--muted); font-size: .9rem; font-weight: 500; margin-right: 6px; }
.communion-settled-books { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.communion-settled-books span { padding: 4px 8px; background: color-mix(in srgb, var(--ink) 4%, transparent); border-radius: 3px; font-size: .8rem; color: var(--muted); }
.communion-thread { display: grid; gap: 16px; }
.communion-thread-item { padding: 18px; background: color-mix(in srgb, var(--ink) 2%, transparent); border-radius: 4px; }
.communion-anchor-item { border-left: 4px solid var(--accent, #2563eb); }
.communion-thread-header { margin-bottom: 12px; }
.communion-thread-reference { display: block; font: 600 .95rem var(--serif); color: var(--ink); }
.communion-thread-verses { font-size: .95rem; line-height: 1.75; color: var(--ink); }
.communion-thread-verses p { margin: 12px 0; }
.communion-thread-verses .verse-number { color: var(--muted); font-size: .9rem; font-weight: 500; margin-right: 6px; }
.communion-offerings-list { display: grid; gap: 12px; }
.communion-offering-item { padding: 14px; background: color-mix(in srgb, var(--ink) 1%, transparent); border-radius: 4px; border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.communion-offering-reference { font: 600 .9rem var(--serif); color: var(--ink); }
.communion-offering-verse { font-size: .9rem; line-height: 1.6; color: var(--ink); margin: 6px 0 0; }
.communion-offering-votes { display: flex; gap: 8px; align-items: center; }
.communion-offering-votes button { padding: 4px 8px; font-size: .8rem; border: 1px solid var(--line); border-radius: 3px; background: var(--page); color: var(--ink); cursor: pointer; }
.communion-offering-votes button:hover { border-color: var(--accent, #2563eb); }
.communion-archive-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-top: 16px; }
.communion-archive-item { flex: 0 0 220px; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: color-mix(in srgb, var(--ink) 2%, transparent); display: block; text-decoration: none; color: var(--ink); transition: border-color 200ms; cursor: pointer; }
.communion-archive-item:hover { border-color: var(--accent, #2563eb); }
.archive-date { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.archive-reference { font: 600 .95rem var(--serif); margin-bottom: 6px; display: block; }
.archive-count { font-size: .8rem; color: var(--muted); }
/* Search UI Styles */
.search-dialog[open] { display: flex; height: min(760px, calc(100dvh - 32px)); max-height: min(760px, calc(100dvh - 32px)); flex-direction: column; }
.search-dialog .dialog-header { flex: 0 0 auto; }
.search-input-wrapper { flex: 0 0 auto; padding: 20px 25px; border-bottom: 1px solid var(--line); }
.search-input { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--background); color: var(--ink); font-size: 0.95rem; font-family: var(--sans); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.search-results-container { flex: 1 1 auto; min-height: 0; max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; }
.search-result-item { display: flex; flex-direction: column; width: 100%; text-align: left; background: transparent; padding: 16px 25px; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.15s ease; }
.search-result-item:hover { background: var(--soft); }
.search-result-meta { color: var(--accent); font-size: 0.72rem; margin-bottom: 4px; font-weight: 600; font-family: var(--sans); letter-spacing: 0.05em; text-transform: uppercase; }
.search-result-text { font-family: var(--reader-font); font-size: 0.95rem; line-height: 1.6; color: var(--ink); }

.search-filters { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filter-chip { flex: 0 0 auto; padding: 8px 14px; border-radius: 3px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: 0.2s; font-family: var(--sans); }
.filter-chip.active { background: var(--ink); color: var(--background); border-color: var(--ink); }

@media (min-width: 701px) {
  .daily-view { display: flex; min-height: calc(100dvh - 74px); flex-direction: column; }
  .daily-hero { padding-top: clamp(42px, 7vh, 64px); }
  .daily-card { margin-bottom: 24px; }
  .home-footer { margin-top: auto; padding: 18px 0 28px; }
  .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1180px) {
  .view { width: min(100% - 80px, 880px); }
  .about-page, .policy-page { width: min(100% - 80px, 840px); }
  .daily-card { padding: clamp(30px, 3.6vw, 46px); }
}

@media (max-width: 700px) {
  body { padding-bottom: 60px; }
  body.bible-reading { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  dialog { top: max(10px, env(safe-area-inset-top)); width: min(100% - 20px, 680px); max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - env(safe-area-inset-bottom)); }
  dialog[open], .settings-dialog[open], .search-dialog[open] { height: calc(100dvh - max(20px, env(safe-area-inset-top)) - env(safe-area-inset-bottom)) !important; }
  .site-header { grid-template-columns: 1fr auto; height: 60px; padding: 0 14px 0 20px; transition: transform .22s ease, opacity .18s ease; }
  .primary-tabs { display: none; }
  .view { width: min(100% - 32px, 820px); }
  .daily-hero { padding: 24px 0 20px; }
  .daily-card { margin-bottom: 30px; }
  .daily-actions { flex-direction: column; }
  .reader-toolbar { top: 60px; margin: 0 -16px; grid-template-columns: minmax(0, 1.35fr) minmax(70px, .75fr) minmax(76px, .8fr); transition: top .22s ease, transform .22s ease, opacity .18s ease; }
  .selector, .translation { padding: 15px 12px; }
  .chapter-header { padding: 42px 0 34px; }
  .scripture { line-height: 1.82; }
  .chapter-nav { margin: 52px 0 30px; }
  .chapter-nav button { padding: 14px 10px; }
  .home-footer { margin-top: 0; padding: 0 0 30px; }
  .mobile-tabs { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--background) 94%, transparent); backdrop-filter: blur(18px); transition: transform .22s ease, opacity .18s ease; }
  .mobile-tabs a { padding: 0 6px; font-size: .72rem; text-align: center; }
  .mobile-tabs a.active { color: var(--ink); background: var(--soft); }
  .bible-reading:not(.mobile-controls-visible) > .site-header { opacity: 0; pointer-events: none; transform: translateY(-100%); }
  .bible-reading:not(.mobile-controls-visible) > .mobile-tabs { opacity: 0; pointer-events: none; transform: translateY(100%); }
  .chapter-picker { padding: 18px; }
  .chapter-grid { grid-template-columns: repeat(5, 1fr); }
  .policy-header { display: flex; justify-content: space-between; }
  .policy-body { padding-bottom: 0; }
  .policy-page { width: min(100% - 32px, 820px); }
  .about-page { width: min(100% - 32px, 760px); }
  .support-grid { grid-template-columns: 1fr; }
  .setting-toggle-row { align-items: center; }
  #audio-settings-section .setting-toggle-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .speed-controls { justify-content: flex-start; }
  .voice-selector { width: 100%; max-width: 180px; }
  .settings-content { padding: 0 18px 18px; }
  .dialog-header, .search-input-wrapper { padding: 20px 18px; }
  .search-result-item { padding: 15px 18px; }
  .data-actions { flex-direction: column; }
}

@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .site-header, .reader-toolbar, .mobile-tabs { transition: none; }
}

@media (min-width: 701px) and (prefers-reduced-motion: reduce) {
  .reader-toolbar { transition: none; }
}
