@font-face {
  font-family: "Amiri";
  src: url("fonts/Amiri-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Amiri";
  src: url("fonts/Amiri-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #112a4a;
  --navy-deep: #091b31;
  --ink: #243446;
  --muted: #66758a;
  --gold: #b9893e;
  --gold-soft: #e8d4a7;
  --paper: #fffdf8;
  --paper-shadow: #e9dfca;
  --canvas: #f5f0e5;
  --line: #e6dcc9;
  --surface: #fffaf0;
  --success: #367465;
  --danger: #a34848;
  --reader-size: 25px;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  --reader: "Amiri", "Geeza Pro", "Traditional Arabic", serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: clip; background: var(--canvas); direction: rtl; }
body { min-height: 100%; margin: 0; overflow-x: clip; color: var(--ink); background: var(--canvas); font-family: var(--ui); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #c59342; outline-offset: 3px; }

.app-shell { min-height: 100vh; padding-bottom: calc(81px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 10; min-height: 66px; display: flex; align-items: center; gap: 12px; padding: max(10px, env(safe-area-inset-top)) 18px 10px; color: #fff; background: linear-gradient(120deg, var(--navy-deep), var(--navy)); box-shadow: 0 4px 18px #0a1a2e33; }
.brand-lockup { min-width: 0; display: grid; grid-template-columns: 39px 1fr; align-items: center; gap: 9px; margin-inline: auto 0; }
.brand-mark { width: 38px; height: 38px; padding: 8px; border: 1px solid #e6c67880; border-radius: 13px; background: #0a213d; }
.brand-lockup b { display: block; overflow: hidden; font: 700 18px/1.1 var(--reader); text-overflow: ellipsis; white-space: nowrap; }
.brand-lockup span { display: block; margin-top: 2px; color: #e6c678; font-size: 10px; letter-spacing: .08em; }
.top-action, .icon-button { display: inline-grid; width: 38px; height: 38px; place-items: center; flex: 0 0 auto; border: 1px solid transparent; border-radius: 12px; color: inherit; background: transparent; font-size: 20px; }
.top-action.top-back { width: auto; min-width: 38px; padding: 0 10px; font: 700 13px/1 var(--ui); white-space: nowrap; }
.top-action.top-home { width: auto; min-width: 59px; padding: 0 8px; font: 700 11px/1 var(--ui); }
.top-action:hover, .icon-button:hover { border-color: #d9bd7a80; background: #ffffff13; }
.top-action[hidden] { display: none; }

main { width: min(100%, 1080px); margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.eyebrow::before, .eyebrow::after { height: 1px; flex: 1 1 16px; content: ""; background: currentColor; opacity: .45; }
h1, h2, h3, p { margin-top: 0; }
.screen-title { margin-bottom: 4px; color: var(--navy); font: 700 clamp(28px, 5vw, 38px)/1.25 var(--reader); }
.subtext { color: var(--muted); font-size: 14px; line-height: 1.8; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(118px, 29vw, 245px); gap: 15px; align-items: center; overflow: hidden; min-height: 248px; margin-bottom: 25px; padding: 23px 25px; border-radius: 26px; color: #fff; background: linear-gradient(135deg, #0b203c, #173d68); box-shadow: 0 20px 38px #112a4a35; }
.hero::before, .hero::after { position: absolute; content: ""; pointer-events: none; }
.hero::before { inset: 14px; border: 1px solid #edcc7a55; border-radius: 18px; }
.hero::after { inset: 0; opacity: .18; background-image: linear-gradient(45deg, #edcc7a 1px, transparent 1px), linear-gradient(-45deg, #edcc7a 1px, transparent 1px); background-position: 0 0, 10px 10px; background-size: 20px 20px; mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { max-width: 680px; margin: 11px 0 4px; font: 700 clamp(34px, 7vw, 53px)/1.05 var(--reader); }
.hero p { max-width: 520px; margin: 0; color: #e8e3d7; font-size: 14px; line-height: 1.9; }
.hero-copy { min-width: 0; }
.hero-image { min-width: 0; margin: 0; text-align: center; }
.hero-image img { display: block; width: 100%; max-height: 196px; margin: 0 auto; border: 1px solid #e4bf6d; border-radius: 8px; object-fit: contain; background: #20170d; box-shadow: 0 10px 23px #0005; }
.hero-image figcaption { margin-top: 5px; color: #f1d99e; font-size: 9px; line-height: 1.35; }

.notice { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin: 19px 0 24px; padding: 14px; border: 1px solid #decda5; border-radius: 16px; background: #fff9ec; color: #6e5529; font-size: 13px; line-height: 1.8; }
.notice strong { display: block; color: #795b27; }
.notice-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: #fff; background: #aa7f39; }
.source-card { margin: 0 0 24px; padding: 15px 18px; border: 1px solid #d9c393; border-radius: 16px; background: #fffdf7; box-shadow: inset 4px 0 0 #b9893e; }
.source-card h2 { margin: 3px 0 5px; color: var(--navy); font: 700 21px/1.35 var(--reader); }
.source-card p { margin: 0; color: #594b36; font-size: 12px; line-height: 1.75; }
.source-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.source-label { color: var(--gold) !important; font-size: 11px !important; font-weight: 800; letter-spacing: .04em; }
.source-details { margin-top: 10px; padding-top: 9px; border-top: 1px solid #eee2c8; color: #594b36; font-size: 12px; line-height: 1.75; }
.source-details summary { cursor: pointer; color: var(--navy); font-size: 12px; font-weight: 800; }
.source-details p { margin: 9px 0 0; }
.source-details small { margin-top: 7px; }
.source-page-card { margin-top: 18px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 2px 11px; }
.section-heading h2 { margin: 0; color: var(--navy); font: 700 23px/1.3 var(--reader); }
.section-heading span { color: var(--muted); font-size: 12px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: 0 8px 18px #3f2d100a; }
.action-row { display: flex; flex-wrap: wrap; gap: 9px; }
.primary-button, .outline-button, .soft-button { min-height: 44px; padding: 10px 15px; border-radius: 13px; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.primary-button:active, .outline-button:active, .soft-button:active { transform: scale(.98); }
.primary-button { border: 1px solid #0d294b; color: #fff; background: var(--navy); }
.primary-button:hover { background: #0a203b; }
.outline-button { border: 1px solid #c8aa73; color: var(--navy); background: #fffdf8; }
.outline-button:hover { background: #fff6df; }
.soft-button { border: 1px solid #e1d5bc; color: var(--navy); background: #f9f4e9; }
.soft-button[disabled], .primary-button[disabled] { cursor: not-allowed; opacity: .48; }

.continue-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 17px; }
.continue-card b { color: var(--navy); font: 700 21px/1.2 var(--reader); }
.continue-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.continue-card .arrow { color: var(--gold); font-size: 26px; }
.status-row { display: grid; grid-template-columns: 1fr auto; gap: 11px; align-items: center; padding: 15px 16px; border-top: 1px solid var(--line); }
.status-row b { color: var(--navy); font-size: 13px; }
.status-row small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.6; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; color: var(--success); background: #e9f4ef; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-badge.pending { color: #815d22; background: #fbefd4; }
.status-badge::before { width: 7px; height: 7px; border-radius: 50%; content: ""; background: currentColor; }

.quick-heading { margin-top: 28px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.quick-card { min-height: 102px; padding: 13px 12px; border: 1px solid #e1d5be; border-radius: 15px; color: var(--navy); background: #fffdf8; text-align: right; box-shadow: 0 5px 14px #49371808; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.quick-card:hover { border-color: #c29a56; background: #fff8e8; transform: translateY(-1px); }
.quick-card b { display: block; font: 700 20px/1.2 var(--reader); }
.quick-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.55; }

.testament-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.testament-card { position: relative; min-height: 150px; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: 19px; text-align: right; color: #fff; background: var(--navy); isolation: isolate; }
.testament-card::before { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #07182ded 0%, #0c2748bd 52%, #0b213871 100%); }
.testament-card:hover { border-color: #d0a85f; transform: translateY(-2px); }
.testament-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; }
.testament-card::after { position: absolute; z-index: -1; left: -22px; bottom: -34px; width: 125px; height: 125px; border: 2px solid #dcb962; border-radius: 50%; content: ""; opacity: .16; box-shadow: inset 0 0 0 15px #0d294b, inset 0 0 0 17px #dcb962; }
.testament-card b, .testament-card span { position: relative; z-index: 1; display: block; }
.testament-card b { font: 700 25px/1.2 var(--reader); }
.testament-card span { margin-top: 8px; color: #f3e6c7; font-size: 12px; }

.maps-callout { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; margin-top: 25px; padding: 20px; border: 1px solid #d9c393; border-radius: 20px; background: linear-gradient(115deg, #fffdf6, #f0e5cf); }
.maps-callout .eyebrow { margin-bottom: 5px; font-size: 10px; }
.maps-callout h2 { margin: 0; color: var(--navy); font: 700 25px/1.25 var(--reader); }
.maps-callout p:last-child { max-width: 650px; margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.source-footer { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 25px 10px 7px; color: #8a806e; font-size: 11px; }
.source-footer button { padding: 0; border: 0; color: #786035; background: transparent; font-size: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.maps-note { margin: 18px 0; padding: 14px 16px; border-right: 3px solid var(--gold); border-radius: 10px; background: #fff8e9; color: #685633; }
.maps-note b { color: var(--navy); }
.maps-note p { margin: 4px 0 0; font-size: 13px; line-height: 1.8; }
.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.map-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 10px 24px #3f2d100d; }
.map-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #f3ecdc; }
.map-copy { padding: 16px; }
.map-copy h2 { margin: 0 0 7px; color: var(--navy); font: 700 22px/1.3 var(--reader); }
.map-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.map-copy small { display: block; margin-top: 11px; color: #766243; font-size: 10px; line-height: 1.6; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.breadcrumb button { padding: 0; border: 0; color: var(--navy); background: transparent; font-weight: 700; }
.breadcrumb em { font-style: normal; color: #ac956c; }
.group-card { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.group-heading { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 59px; padding: 11px 16px; border: 0; color: var(--navy); background: transparent; text-align: right; }
.group-heading h3 { flex: 1; margin: 0; font: 700 20px/1.2 var(--reader); }
.group-heading small { color: var(--muted); font-size: 11px; }
.group-heading .chevron { color: var(--gold); font-size: 17px; transition: transform .2s ease; }
.group-card.open .chevron { transform: rotate(90deg); }
.book-list { display: none; padding: 0 11px 11px; border-top: 1px solid var(--line); }
.group-card.open .book-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.book-button { min-height: 49px; padding: 9px 8px; border: 0; border-bottom: 1px solid #eee6d8; color: var(--ink); background: transparent; text-align: right; font: 700 17px/1.2 var(--reader); }
.book-button:hover { color: var(--gold); background: #fffcf6; }

.chapter-selector { display: grid; grid-template-columns: repeat(auto-fit, minmax(49px, 1fr)); gap: 8px; padding: 16px; }
.chapter-button { min-height: 47px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: #fffdf8; font-weight: 700; }
.chapter-button:hover, .chapter-button.current { border-color: #b9904c; color: #fff; background: var(--navy); }
.review-note { margin: 14px 16px; color: #816a40; font-size: 12px; line-height: 1.8; }

.reader-tools { display: flex; align-items: center; justify-content: space-between; gap: 11px; margin-bottom: 12px; }
.reader-toolbar { justify-content: flex-start; }
.chapter-meta { min-width: 0; }
.chapter-meta h1 { overflow: hidden; margin: 0; color: var(--navy); font: 700 clamp(29px, 5vw, 38px)/1.15 var(--reader); text-overflow: ellipsis; white-space: nowrap; }
.chapter-meta p { margin: 4px 0 0; color: var(--gold); font-size: 12px; font-weight: 700; }
.toolset { display: flex; gap: 6px; }
.toolset button { width: 35px; height: 35px; padding: 0; border: 1px solid #d9c7a2; border-radius: 10px; color: var(--navy); background: #fffdf8; font-size: 16px; font-weight: 800; }
.toolset button[aria-pressed="true"] { color: #fff; background: var(--navy); }
.reader-stage { position: relative; height: min(72svh, 820px); min-height: 540px; overflow: hidden; border: 1px solid #dac9ac; border-radius: 8px 22px 8px 22px; background: var(--paper); box-shadow: 0 18px 36px #4d32191c, inset 0 0 48px #d8c8a80e; overscroll-behavior: contain; touch-action: pan-y; }
.reader-stage::before, .reader-stage::after { position: absolute; z-index: 0; width: 50px; height: 12px; content: ""; opacity: .68; background: radial-gradient(circle, var(--gold) 0 2px, transparent 2.6px) 0 50% / 17px 12px repeat-x; }
.reader-stage::before { top: 21px; right: 28px; }
.reader-stage::after { bottom: 20px; left: 27px; }
.reader-pages { position: absolute; z-index: 1; inset: 0; }
.reader-page { position: absolute; z-index: 1; inset: 0; width: auto; height: auto; min-height: 0; margin: 0; padding: 66px clamp(24px, 7vw, 64px) 88px; overflow: hidden; direction: rtl; color: var(--ink); background: var(--paper); box-shadow: -14px 0 24px #4d321917; font: var(--reader-size)/2.18 var(--reader); font-kerning: normal; text-rendering: optimizeLegibility; transform: translate3d(-100%, 0, 0); transition: transform .25s cubic-bezier(.2,.72,.22,1); will-change: transform; }
.reader-page::before, .reader-page::after { position: absolute; z-index: 0; width: 50px; height: 12px; content: ""; opacity: .68; background: radial-gradient(circle, var(--gold) 0 2px, transparent 2.6px) 0 50% / 17px 12px repeat-x; }
.reader-page::before { top: 21px; right: 28px; }
.reader-page::after { bottom: 20px; left: 27px; }
.reader-page > * { position: relative; z-index: 1; direction: rtl; }
.reader-page-measure { visibility: hidden; pointer-events: none; box-shadow: none; transform: none !important; transition: none !important; }
.reader-stage.is-turning { touch-action: none; }
.reader-page.is-dragging { transition: none !important; cursor: grabbing; }
.reader-page.page-exit { transition: transform .18s cubic-bezier(.55,.02,.8,.26); }
.reader-page.page-enter { transition: transform .25s cubic-bezier(.15,.72,.22,1); }
.reader-page.page-snapback { transition: transform .22s cubic-bezier(.18,.74,.25,1); }
.reader-opening { margin: 0 0 40px; padding: 0 0 27px; border-bottom: 1px solid #eadfc8; text-align: right; }
.reader-book-title { margin: 0; color: #776344; font: 700 calc(var(--reader-size) * .72)/1.3 var(--reader); }
.reader-chapter-number { display: flex; align-items: baseline; gap: 7px; margin: 5px 0 3px; color: var(--navy); font: 700 calc(var(--reader-size) * .85)/1.2 var(--reader); }
.reader-chapter-number strong { color: var(--navy); font: 700 calc(var(--reader-size) * 1.75)/.95 var(--reader); }
.reader-opening-title { margin: 9px 0 0; color: #956e33; font: 700 calc(var(--reader-size) * 1.02)/1.5 var(--reader); }
.paragraph-heading { clear: both; margin: 44px 0 18px; color: #85612d; font: 700 calc(var(--reader-size) * 1.02)/1.75 var(--reader); text-align: right; }
.verse { display: block; margin: 0 0 .62em; text-align: right; text-wrap: pretty; }
.verse sup { display: inline-block; min-width: 1.55em; padding-inline: 3px 5px; color: #a67830; font: 700 .54em/1 var(--ui); vertical-align: super; }
.reader-page-status { position: absolute; z-index: 3; bottom: 17px; right: 50%; max-width: calc(100% - 56px); min-width: 86px; transform: translateX(50%); color: #917449; font: 700 11px/1.4 var(--ui); letter-spacing: .03em; text-align: center; pointer-events: none; }
.empty-reader { display: grid; min-height: 390px; place-content: center; padding: 25px; text-align: center; }
.empty-reader .seal { position: relative; width: 74px; height: 74px; margin: 0 auto 17px; border: 1px solid #d0ae68; border-radius: 50%; }
.empty-reader .seal::before, .empty-reader .seal::after { position: absolute; top: 18px; right: 34px; width: 4px; height: 36px; border-radius: 3px; content: ""; background: #aa7e32; }
.empty-reader .seal::after { top: 34px; right: 18px; width: 36px; height: 4px; }
.empty-reader h2 { margin: 0 0 8px; color: var(--navy); font: 700 27px/1.2 var(--reader); }
.empty-reader p { max-width: 430px; margin: 0; color: var(--muted); font: 14px/1.9 var(--ui); }

.search-box { display: flex; gap: 8px; margin: 16px 0; padding: 7px; border: 1px solid #d9c9aa; border-radius: 15px; background: #fffdf8; box-shadow: 0 5px 15px #3f2d1008; }
.search-box input { width: 100%; min-width: 0; padding: 9px 7px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box button { min-width: 82px; border: 0; border-radius: 10px; color: #fff; background: var(--navy); font-weight: 700; }
.search-help { margin: -7px 4px 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.result-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.result-button { width: 100%; padding: 15px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: right; }
.result-button:last-child { border-bottom: 0; }
.result-button:hover { background: #fffdf8; }
.result-button b { display: block; color: var(--navy); font: 700 18px/1.3 var(--reader); }
.result-button span { display: block; margin-top: 5px; color: var(--muted); font: 13px/1.8 var(--reader); }
.result-button em { color: var(--gold); font-style: normal; font-weight: 700; }
.empty-state { padding: 35px 21px; border: 1px dashed #d6c19a; border-radius: 18px; color: var(--muted); background: #fffaf0; text-align: center; font-size: 14px; line-height: 1.9; }
.empty-state h2 { margin: 0 0 6px; color: var(--navy); font: 700 26px/1.2 var(--reader); }

.bookmark-list { display: grid; gap: 10px; }
.bookmark-card { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.bookmark-card button:first-child { border: 0; color: var(--navy); background: transparent; text-align: right; font: 700 20px/1.3 var(--reader); }
.bookmark-card small { display: block; margin-top: 3px; color: var(--muted); font: 11px var(--ui); }
.bookmark-card button:last-child { width: 35px; height: 35px; border: 1px solid #e0c4a2; border-radius: 10px; color: var(--danger); background: #fffaf0; }

.bottom-nav { position: fixed; z-index: 11; bottom: 0; right: 0; left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 680px; margin: 0 auto; padding: 7px 11px calc(7px + env(safe-area-inset-bottom)); border: 1px solid #dbd0be; border-bottom: 0; border-radius: 22px 22px 0 0; background: #fffdf8f2; box-shadow: 0 -7px 25px #48351a14; backdrop-filter: blur(13px); }
.reader-nav-hidden { display: none; }
.nav-button { display: grid; min-height: 44px; place-items: center; border: 0; border-radius: 13px; color: #657487; background: transparent; font: 700 11px/1 var(--ui); }
.nav-button.active { color: var(--navy); background: #eee2ca; }

.offline-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: var(--canvas); }
.offline-card { max-width: 430px; padding: 35px; border: 1px solid #dcccae; border-radius: 23px; color: var(--ink); background: var(--surface); text-align: center; }
.offline-card .cross-mark { position: relative; width: 54px; height: 54px; margin: 0 auto 16px; border: 1px solid #d0ae68; border-radius: 50%; }
.offline-card .cross-mark::before, .offline-card .cross-mark::after { position: absolute; top: 11px; right: 25px; width: 4px; height: 30px; border-radius: 3px; content: ""; background: var(--gold); }
.offline-card .cross-mark::after { top: 24px; right: 12px; width: 30px; height: 4px; }
.offline-card h1 { color: var(--navy); font: 700 31px/1.2 var(--reader); }
.offline-card p { color: var(--muted); line-height: 1.9; }
.offline-card a { color: var(--navy); font-weight: 700; }

@media (min-width: 760px) {
  .app-shell { padding-bottom: 0; }
  main { padding-bottom: 105px; }
  .bottom-nav { right: 50%; bottom: 22px; left: auto; width: 390px; transform: translateX(50%); border-bottom: 1px solid #dbd0be; border-radius: 22px; }
  .reader-stage { height: min(74svh, 820px); min-height: 680px; }
  .reader-page { padding-top: 78px; padding-bottom: 100px; }
}

@media (max-width: 420px) {
  .hero { gap: 10px; padding: 20px 18px; }
  .hero h1 { font-size: 32px; }
  .hero-image img { max-height: 176px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-card { min-height: 94px; }
  .testament-grid { grid-template-columns: 1fr; }
  .maps-callout { grid-template-columns: 1fr; }
  .maps-callout .outline-button { width: 100%; }
  .map-grid { grid-template-columns: 1fr; }
  .reader-stage { height: calc(100svh - 162px); min-height: 500px; }
  .reader-page { padding: 60px 24px 76px; column-gap: 34px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .topbar { min-height: 52px; padding-top: 7px; padding-bottom: 7px; }
  .brand-mark { width: 32px; height: 32px; }
  .reader-stage { height: calc(100vh - 132px); min-height: 390px; }
  .reader-page { padding-top: 52px; padding-bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
