/* UECF.NET /wbtc/ - Telugu Bible (WBTC) reader */

:root {
  --ink: #101B31;
  --ink-soft: #2C3E60;
  --gold: #C79A3D;
  --gold-soft: #E4C685;
  --maroon: #8B3A42;
  --cream: #FAF6EC;
  --paper: #FBF8F1;
  --line: #E2D8C0;
  --text: #1B2437;
  --muted: #5C6B80;
  --chip: #efe6d3;
  --overlay: rgba(16, 27, 49, 0.46);
  --verse-num: #C79A3D;
  --flash: rgba(199, 154, 61, 0.22);
  --header-h: 76px;
  --toolbar-h: 56px;
  --read-max: 42rem;
  --bible-size: 1.125rem;
  --bible-leading: 1.75;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 27, 49, 0.08);
  --font-display: Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-te: "Noto Sans Telugu", "Ramabhadra", "Nirmala UI", "Gautami", sans-serif;
  --max: 1200px;
  --app-bg: #FAF6EC;
  --card-bg: #FBF8F1;
  --meta: #5C6B80;
  --tab-active: #C79A3D;
}

html[data-theme="dark"] {
  --cream: #121826;
  --app-bg: #121826;
  --paper: #171F2E;
  --card-bg: #1c2538;
  --ink: #FFFFFF;
  --ink-soft: #F4EFE4;
  --text: #FFFFFF;
  --muted: #A9B4C7;
  --meta: #8a9bb8;
  --line: #2C384C;
  --chip: #1c2538;
  --verse-num: #E4C685;
  --tab-active: #e8c07d;
  --overlay: rgba(6, 10, 18, 0.62);
  --flash: rgba(228, 198, 133, 0.2);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

html[data-width="narrow"] { --read-max: 34rem; }
html[data-width="wide"] { --read-max: 52rem; }
html[data-spacing="compact"] { --bible-leading: 1.55; }
html[data-spacing="relaxed"] { --bible-leading: 2.15; }
html[data-density="compact"] .verse { padding: 0.35rem 0; }
html[data-density="comfortable"] .verse { padding: 0.7rem 0; }

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-padding-top: calc(var(--header-h) + var(--toolbar-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--app-bg, var(--cream));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
img { max-width: 100%; height: auto; }
a { color: var(--maroon); text-decoration: none; }
html[data-theme="dark"] a { color: var(--gold-soft); }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #101b31;
  padding: 10px 16px;
  z-index: 400;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.uecf-nav .uecf-nav-action.is-search,
.uecf-nav .uecf-nav-action.is-search span {
  color: #E4C685;
}
.uecf-nav .uecf-nav-action.is-search svg {
  color: #E4C685;
  stroke: currentColor;
}

/* ---- UECF header (fallback; uecf-nav.js enhances this) ---- */
.site-header {
  background: #101b31;
  color: #faf6ec;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding-top: env(safe-area-inset-top, 0);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #faf6ec;
  min-width: 0;
}
.brand:hover { text-decoration: none; color: var(--gold-soft); }
.brand-logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text .full {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text .sub {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 600;
}
.nav-toggle {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(228, 198, 133, 0.5);
  background: transparent;
  color: #faf6ec;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 600;
}
/* Only the no-JS top-level list. A descendant selector here also matches
   mega-menu group <ul>s and paints those links cream-on-cream. */
.primary-nav > ul:not(.uecf-nav) {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.primary-nav > ul:not(.uecf-nav) a {
  color: #faf6ec;
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}
.primary-nav > ul:not(.uecf-nav) a[aria-current="page"],
.primary-nav > ul:not(.uecf-nav) a:hover {
  background: rgba(228, 198, 133, 0.12);
  text-decoration: none;
  color: var(--gold-soft);
}

/* Keep the shared UECF mega-menu on the site cream palette. The reader
   remaps --ink/--cream for the page theme, which would hide panel links. */
.uecf-nav .uecf-nav-panel {
  --ink: #101B31;
  --ink-soft: #2C3E60;
  --cream: #FAF6EC;
  --line: #E2D8C0;
  --maroon: #8B3A42;
  background: #FAF6EC;
  color: #101B31;
}
.uecf-nav .uecf-nav-group a {
  color: #101B31;
}
html[data-theme="dark"] .uecf-nav .uecf-nav-group a {
  color: #101B31;
}
html[data-theme="dark"] .uecf-nav .uecf-nav-group a:hover,
html[data-theme="dark"] .uecf-nav .uecf-nav-group a:focus-visible {
  color: #8B3A42;
}

@media (max-width: 992px) {
  .primary-nav:not(:has(.uecf-nav)) {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #101b31;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid rgba(228, 198, 133, 0.25);
  }
  .primary-nav:not(:has(.uecf-nav)).open {
    max-height: min(80vh, 720px);
    overflow-y: auto;
  }
  .primary-nav > ul:not(.uecf-nav) { flex-direction: column; padding: 8px 18px 16px; }
  .primary-nav > ul:not(.uecf-nav) a { width: 100%; }
  .brand-text .full { max-width: 52vw; font-size: 0.86rem; }
  /* Drawer panels sit on the dark header, not the cream desktop panel. */
  .uecf-nav .uecf-nav-panel {
    --ink: #E7ECF6;
    --ink-soft: #B9C3D6;
    --cream: #101B31;
    --line: rgba(228, 198, 133, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #E7ECF6;
  }
  .uecf-nav .uecf-nav-group a,
  html[data-theme="dark"] .uecf-nav .uecf-nav-group a {
    color: #E7ECF6;
  }
  html[data-theme="dark"] .uecf-nav .uecf-nav-group a:hover,
  html[data-theme="dark"] .uecf-nav .uecf-nav-group a:focus-visible,
  .uecf-nav .uecf-nav-group a:hover,
  .uecf-nav .uecf-nav-group a:focus-visible {
    color: #E4C685;
  }
}
@media (min-width: 993px) {
  .nav-toggle { display: none; }
  .header-inner { justify-content: space-between; }
  .primary-nav { margin-left: auto; }
}

/* ---- Bible toolbar ---- */
.bible-toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease;
  touch-action: manipulation;
}
html[data-theme="dark"] .bible-toolbar {
  background: rgba(23, 31, 46, 0.94);
}
.toolbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  flex-wrap: wrap;
}
.toolbar-home {
  font-family: var(--font-te);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.toolbar-home:hover { text-decoration: none; color: var(--gold); }
body[data-view="read"] .toolbar-home { display: none; }
.bible-version-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 22rem;
  min-width: 0;
}
.bible-version-field label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bible-version-field select {
  min-height: 44px;
  min-width: 0;
  width: 16rem;
}

.toolbar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  flex: none;
  margin-left: auto;
}
.toolbar-uecf.tool-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0;
  color: var(--gold-soft);
}
.toolbar-uecf svg { display: block; }
.toolbar-uecf:hover { color: var(--gold); text-decoration: none; border-color: var(--gold); }

.tool-btn, .pager, .chip, .btn, .tab-btn, .search-filter-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  border-radius: 10px;
  padding: 0 12px;
  cursor: pointer;
}
.tool-btn:hover, .pager:hover, .chip:hover, .tab-btn:hover, .search-filter-btn:hover {
  border-color: var(--gold);
}
.tool-btn:disabled, .pager:disabled { opacity: 0.4; cursor: not-allowed; }
.tool-btn[aria-pressed="true"],
.chip.is-active,
.tab-btn.is-active,
.search-filter-btn.is-active {
  background: #101B31;
  color: #FAF6EC;
  border-color: #101B31;
}
html[data-theme="dark"] .tool-btn[aria-pressed="true"],
html[data-theme="dark"] .chip.is-active,
html[data-theme="dark"] .tab-btn.is-active,
html[data-theme="dark"] .search-filter-btn.is-active {
  background: var(--tab-active, var(--gold));
  color: #101B31;
  border-color: var(--tab-active, var(--gold));
}

.chapter-nav { display: flex; gap: 4px; }
.selects { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.selects select {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  padding: 0 10px;
  max-width: min(100%, 240px);
}
.chapter-select-fallback {
  display: none !important;
}
.chapter-picker-btn {
  flex: 0 0 52px;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg, var(--paper));
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  touch-action: manipulation;
}
.chapter-picker-btn:hover { border-color: var(--gold); }
html[data-theme="dark"] .chapter-picker-btn {
  background: #1c2538;
  color: #FFFFFF;
}
body[data-view="home"] .selects,
body[data-view="home"] .chapter-nav,
body[data-view="search"] .selects,
body[data-view="search"] .chapter-nav { display: none; }
body[data-view="read"] .toolbar-search { flex: 1 1 160px; min-width: 140px; max-width: 260px; }
body[data-view="home"] .toolbar-search,
body[data-view="search"] .toolbar-search { display: none; }
body:not([data-view="read"]) #shareChapter,
body:not([data-view="read"]) #printChapter { display: none; }

.search-form { display: flex; gap: 8px; min-width: 0; }
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}
.search-form input,
.app-search input,
.selects select {
  flex: 1;
  min-height: 48px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  line-height: 1.65;
  background: var(--card-bg, var(--paper));
  color: var(--text);
  caret-color: var(--gold);
  font-family: var(--font-te), var(--font-ui);
  -webkit-text-fill-color: var(--text);
}
#bookSelect {
  flex: 1 1 0;
  width: auto;
  max-width: 100%;
}
.search-form input::placeholder,
.app-search input::placeholder {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  opacity: 1;
}
html[data-theme="dark"] .search-form input,
html[data-theme="dark"] .app-search input,
html[data-theme="dark"] .selects select {
  background: #1c2538;
  color: #FFFFFF;
  -webkit-text-fill-color: #FFFFFF;
}
html[data-theme="dark"] .search-form input:-webkit-autofill,
html[data-theme="dark"] .app-search input:-webkit-autofill {
  -webkit-text-fill-color: #FFFFFF;
  caret-color: #C79A3D;
  box-shadow: 0 0 0 1000px #1c2538 inset;
}
.search-form button, .btn {
  min-height: 48px;
  background: #101b31;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}
html[data-theme="dark"] .search-form button,
html[data-theme="dark"] .btn { background: var(--gold); color: #101b31; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 24px 16px 80px; }
.library-wrap { max-width: 760px; }

.hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.hero h1, .page-title, .chapter-head h1 {
  font-family: var(--font-te);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.35;
}
.hero .lede { margin: 0 0 18px; color: var(--muted); max-width: 42rem; }
.kicker {
  display: block;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.continue-chip {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  margin-bottom: 18px;
  color: inherit;
}
.continue-chip[hidden] { display: none !important; }
.continue-chip:hover { text-decoration: none; border-color: var(--gold); }
.continue-chip-label { color: var(--gold); font-weight: 700; font-size: 0.82rem; }
.continue-chip-title { font-family: var(--font-te); font-weight: 600; }

.app-search { position: relative; margin-bottom: 14px; }
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
  font-size: 1.4rem;
}

.testament-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}
.tab-btn { flex: 0 0 auto; font-weight: 600; }
.list-status { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }

.book-list { display: flex; flex-direction: column; gap: 6px; }
.book-row-item {
  display: flex;
  align-items: stretch;
  background: var(--card-bg, var(--paper));
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 64px;
}
.book-row-item[hidden] { display: none !important; }
.book-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  padding: 12px 8px 12px 14px;
  color: inherit;
}
.book-row:hover { text-decoration: none; }
.book-row-item:hover { border-color: var(--gold); }
.book-row-badge {
  flex: none;
  width: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.book-row-content { display: flex; flex-direction: column; min-width: 0; }
.book-row-te {
  font-family: var(--font-te);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.book-row-meta { color: var(--meta, var(--muted)); font-size: 0.84rem; }
.book-row-star {
  flex: none;
  width: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 0 14px 14px 0;
}
.book-row-star[aria-pressed="true"] { color: var(--gold); }
.book-row-star:hover { color: var(--gold); }

.reader { max-width: var(--read-max); margin: 0 auto; }
.breadcrumb { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
.breadcrumb a { color: inherit; }
.chapter-head .en { margin: 4px 0 0; color: var(--muted); }
.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 18px 0 8px;
  font-weight: 700;
}
.chapter-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  margin: 0 0 22px;
}
.chip { min-width: 0; padding: 0; }

.verse {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.verse:hover, .verse.is-selected { background: rgba(199, 154, 61, 0.12); }
.verse.is-flash { background: var(--flash); }
.verse-num {
  font-weight: 700;
  color: var(--verse-num);
  text-align: right;
  padding-top: 0.35em;
  font-variant-numeric: tabular-nums;
}
.verse-text {
  margin: 0;
  font-family: var(--font-te);
  font-size: var(--bible-size);
  line-height: var(--bible-leading);
  overflow-wrap: anywhere;
  color: var(--text);
}
.verse-missing,
.verse-omitted {
  color: var(--muted);
  font-size: 0.92em;
}
html[data-theme="dark"] .verse-text,
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .chapter-head h1,
html[data-theme="dark"] .book-row-te {
  color: #FFFFFF;
}

.reader-nav, .book-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.pager { flex: 1; min-width: 140px; text-align: center; }

.search-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.search-scope {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--muted);
}
.search-scope[hidden] { display: none !important; }
.search-hit {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  color: inherit;
}
.search-hit:hover { text-decoration: none; border-color: var(--gold); }
.search-ref { display: block; font-weight: 700; font-family: var(--font-te); margin-bottom: 6px; }
.search-text { font-family: var(--font-te); line-height: 1.7; }
.search-stats { color: var(--muted); }
mark {
  background: rgba(199, 154, 61, 0.35);
  color: inherit;
  padding: 0 0.12em;
  border-radius: 3px;
}

.empty-state, .status {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  font-family: var(--font-te);
}
.empty-state[hidden] { display: none !important; }

.settings-sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  max-width: 44rem;
}

.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 120;
  display: grid;
  place-items: end center;
  padding: 16px;
}
.overlay[hidden] { display: none !important; }
.settings-sheet { width: min(520px, 100%); margin-bottom: 12px; }
.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.settings-row span:first-child { font-weight: 600; }
.settings-row > div { display: flex; gap: 6px; flex-wrap: wrap; }
#closeSettings { width: 100%; margin-top: 12px; }

.chapter-picker-sheet {
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 20px;
  margin-bottom: 12px;
  overscroll-behavior: contain;
}
.chapter-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.chapter-picker-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-te);
}
.chapter-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}
.chapter-picker-grid .chip {
  min-height: 48px;
  touch-action: manipulation;
}

.verse-sheet {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  gap: 8px;
  background: #101b31;
  color: #fff;
  padding: 10px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  max-width: calc(100vw - 20px);
  justify-content: center;
}
.verse-sheet[hidden] { display: none !important; }
.verse-sheet button {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0 12px;
  cursor: pointer;
}

.site-footer {
  background: #101b31;
  color: #faf6ec;
  padding: 40px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  margin-top: 12px;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.site-footer h2 {
  color: var(--gold-soft);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}
.site-footer p, .site-footer li { color: #c7cedd; margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #d9dfec; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-bottom {
  border-top: 1px solid rgba(228, 198, 133, 0.2);
  padding-top: 16px;
  color: #a7b3c6;
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: #101b31;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 200;
}
.toast[hidden] { display: none !important; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand-text .sub { display: none; }
}
@media (max-width: 768px) {
  html { scroll-padding-top: calc(var(--toolbar-h) + 12px); }
  .desktop-only,
  .site-header,
  .site-footer { display: none !important; }
  .bible-toolbar { top: 0; }
  body.chrome-hidden .bible-toolbar { transform: translateY(-100%); }
  .hero { padding: 20px 16px; }
  .desktop-tool { display: none; }
  .toolbar-uecf.tool-btn { display: inline-flex; }
  .search-form { flex-direction: column; }
  body[data-view="read"] .toolbar-search,
  #firstChapter,
  #lastChapter { display: none; }
  body[data-view="read"] .toolbar-home { display: none; }
  .selects {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: hidden;
  }
  .selects select,
  #bookSelect {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  .chapter-picker-btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
  }
  .toolbar-inner { padding: 6px 10px; flex-wrap: wrap; gap: 6px; }
  .bible-version-field {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    order: -1;
  }
  .bible-version-field label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .bible-version-field select {
    width: 100%;
    max-width: none;
  }
  .tool-btn { min-width: 40px; min-height: 40px; padding: 0 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .chapter-nav { margin-left: auto; }
  .wrap { padding: 16px 14px 72px; }
  .breadcrumb { display: none; }
  .reader { display: flex; flex-direction: column; }
  .chapter-head { order: 1; }
  .verses,
  .status { order: 2; }
  .section-label { order: 3; margin-top: 28px; }
  .chapter-chips { order: 4; }
  .reader-nav { order: 5; }
  .book-nav { order: 6; }
  .verse { scroll-margin-top: calc(var(--toolbar-h) + 8px); }
}
@media (max-width: 480px) {
  .brand-text .full { max-width: 46vw; }
  .toolbar-home { font-size: 0.95rem; }
  .verse { grid-template-columns: 1.8rem 1fr; }
}

@media print {
  .site-header, .bible-toolbar, .search-form, .verse-sheet, .settings-panel, .chapter-picker,
  .tool-btn, .pager, .chip, .btn, .site-footer, .toast, .continue-chip,
  nav, .chapter-chips, .selects, .reader-nav, .book-nav, .skip-link,
  .testament-tabs, .app-search, .search-filters, .search-scope { display: none !important; }
  body { background: #fff; color: #000; }
  .verse-text { font-size: 12pt; line-height: 1.6; }
  .chapter-head h1 { font-size: 18pt; }
  a { color: #000; text-decoration: none; }
}
