:root {
  color-scheme: light;
  --topbar-height: 65px;
  --footer-height: 64px;
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-soft: #faf8f3;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --ink: #171923;
  --title: #23324f;
  --muted: #6f6b63;
  --line: #dedbd3;
  --accent: #a46a12;
  --accent-strong: #95600d;
  --accent-soft: #f4ead9;
  --scrollbar-track: color-mix(in srgb, var(--surface-soft), transparent 18%);
  --scrollbar-thumb: #c7bda9;
  --scrollbar-thumb-hover: var(--accent);
  --shadow: 0 18px 45px rgba(28, 24, 18, 0.1);
  --reader-size: 18px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

body.dark {
  color-scheme: dark;
  --bg: #111615;
  --surface: #181f1d;
  --surface-soft: #151b19;
  --topbar-bg: rgba(24, 31, 29, 0.96);
  --ink: #f1eee6;
  --title: #f7ead4;
  --muted: #a9b0ab;
  --line: #2b3632;
  --accent: #d0a96c;
  --accent-strong: #e6c994;
  --accent-soft: #2c2418;
  --scrollbar-track: #101614;
  --scrollbar-thumb: #5b625d;
  --scrollbar-thumb-hover: var(--accent-strong);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 3px solid var(--scrollbar-track);
  border-radius: 999px;
  background: var(--scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.app-shell.has-footer .layout,
.app-shell.has-footer .book-panel,
.app-shell.has-footer .study-panel,
.app-shell.has-footer .reader {
  height: calc(100vh - var(--topbar-height) - var(--footer-height));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 320px minmax(320px, 650px) 1fr;
  gap: 28px;
  align-items: center;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: var(--title);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--accent-strong);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgba(35, 50, 79, 0.03);
}

body.dark .search-wrap {
  background: #111816;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

.search-wrap svg,
.tool-button svg,
.reader-action svg,
.chapter-link svg,
.chapter-caret,
.side-title svg,
.theme-option svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search-wrap svg {
  color: var(--muted);
  flex: 0 0 auto;
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
}

.reader-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.tool-button,
.theme-option,
.reader-action {
  display: grid;
  min-width: 32px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
}

.tool-button:hover,
.theme-option:hover,
.reader-action:hover {
  background: var(--surface-soft);
}

.theme-option {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  width: auto;
  padding: 0 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.theme-option svg {
  width: 19px;
  height: 19px;
}

.theme-option.is-active {
  color: var(--accent-strong);
}

.tool-separator {
  width: 1px;
  height: 26px;
  background: var(--line);
}

.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 330px;
  gap: 0;
  width: 100%;
  height: calc(100vh - var(--topbar-height));
  margin: 0;
  padding: 0;
  background: var(--surface);
  overflow: hidden;
}

.book-panel,
.study-panel {
  position: static;
  align-self: start;
  height: calc(100vh - var(--topbar-height));
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable;
}

.book-panel {
  border-right: 1px solid var(--line);
}

.study-panel {
  border-left: 1px solid var(--line);
}

.panel-title,
.section-heading,
.reader-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-title {
  display: none;
}

.book-panel-content {
  display: contents;
}

.book-panel-toggle {
  display: none;
}

.panel-title h2,
.section-heading h2,
.daily-card h2,
.note-box h2,
.daily-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.book-count {
  display: none;
}

.testament-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 18px 22px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.tab {
  min-height: 36px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 500;
}

.tab.is-active {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  box-shadow: none;
}

.book-list {
  display: grid;
  gap: 0;
  padding: 14px 22px 22px;
}

.book-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 29px;
  padding: 0 16px 0 10px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  text-align: left;
}

.book-button span {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.book-button:hover,
.book-button.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent-strong);
}

.reader {
  min-width: 0;
  height: calc(100vh - var(--topbar-height));
  padding: 0 58px 56px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  overflow: auto;
  scrollbar-gutter: stable;
}

.version-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  margin: 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.reader h1 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
}

.reader-heading {
  min-height: 80px;
  border-bottom: 1px solid var(--line);
}

.reader-nav-side,
.chapter-controls {
  flex: 1 1 0;
}

.chapter-title-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 190px;
}

.chapter-caret {
  width: 16px;
  height: 16px;
  color: currentColor;
  pointer-events: none;
  stroke-width: 2.2;
}

.chapter-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 24px;
  height: 28px;
  place-items: center;
  margin-top: 4px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.chapter-picker-label {
  display: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.chapter-picker-button:hover,
.chapter-picker-button[aria-expanded="true"] {
  background: transparent;
  color: var(--accent-strong);
}

.chapter-picker-button[aria-expanded="true"] .chapter-caret {
  transform: rotate(180deg);
}

.chapter-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 20;
  width: min(340px, 80vw);
  max-height: min(430px, calc(100vh - 170px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(28, 24, 18, 0.16);
  transform: translateX(-50%);
}

.chapter-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
  transform: translateX(-50%) rotate(45deg);
}

.chapter-menu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chapter-menu-head strong {
  color: var(--title);
  font-size: 17px;
}

.chapter-menu-head span {
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 8px;
  padding-top: 14px;
}

.chapter-choice {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.chapter-choice:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chapter-choice.is-active {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fffaf0;
}

.chapter-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.chapter-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
}

.chapter-link.next {
  gap: 0;
}

.chapter-link svg {
  width: 22px;
  height: 22px;
}

.reader-action {
  width: 30px;
  min-width: 30px;
  height: 32px;
  color: var(--ink);
}

.reader-action svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.reader-action .share-icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.share-icon circle {
  fill: var(--surface);
}

.scripture {
  margin-top: 26px;
  font-family: Lora, Georgia, serif;
  font-size: var(--reader-size);
  line-height: 1.55;
}

.verse {
  position: relative;
  margin: 0 0 8px;
  padding-right: 32px;
}

.verse.is-selected {
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft), transparent 48%);
  box-shadow: -10px 0 0 color-mix(in srgb, var(--accent-soft), transparent 48%);
}

.verse-number {
  display: inline-block;
  width: 25px;
  margin-right: 6px;
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78em;
  font-weight: 800;
  text-align: right;
  vertical-align: baseline;
}

.bookmark-button {
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.verse:hover .bookmark-button,
.bookmark-button.is-saved {
  display: grid;
}

.bookmark-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.bookmark-button.is-saved {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.study-panel {
  display: grid;
  gap: 0;
  background: var(--surface);
}

.daily-card,
.search-results {
  padding: 36px 30px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.daily-card {
  border-bottom: 1px solid var(--line);
}

.side-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-title svg {
  width: 22px;
  height: 22px;
}

.side-title h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
}

.daily-card span,
.date-label {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 500;
}

.daily-card h3 {
  margin-top: 24px;
  color: var(--accent-strong);
  font-family: Lora, Georgia, serif;
  font-size: 20px;
}

.daily-card p,
.note-box p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.date-label {
  margin: 18px 0 0;
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 600;
}

.text-link::after {
  content: "›";
  margin-left: 14px;
  font-size: 24px;
  line-height: 1;
}

.bookmarks-section {
  padding: 20px 26px 28px;
}

.note-box {
  margin-top: auto;
  padding: 22px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.study-panel .note-box {
  display: none;
}

.local-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.print-meta {
  display: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 38px rgba(28, 24, 18, 0.18);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.toast[hidden] {
  display: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--footer-height);
  padding: 12px 28px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer > div {
  min-width: 0;
}

.site-footer h2 {
  margin: 0 0 3px;
  font-size: 14px;
}

.site-footer p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.footer-links a,
.info-nav a,
.info-footer a {
  color: var(--accent-strong);
  text-decoration: none;
}

.footer-links a:hover,
.info-nav a:hover,
.info-footer a:hover {
  text-decoration: underline;
}

body.info-page {
  min-height: 100vh;
  overflow: auto;
  background: var(--bg);
}

.info-shell {
  min-height: 100vh;
  background: var(--bg);
}

.info-page .topbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.info-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: flex-end;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.info-main {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

.info-card {
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.info-kicker {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.info-card h1 {
  margin: 0 0 22px;
  color: var(--title);
  font-size: 38px;
  line-height: 1.1;
}

.info-card h2 {
  margin: 32px 0 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.info-card p,
.info-card li {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
}

.info-card p {
  margin: 0 0 16px;
}

.info-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 24px;
}

.info-note {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--accent-strong);
  background: var(--surface-soft);
}

.info-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  padding: 24px 18px 36px;
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.solid-button,
.text-button {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.solid-button {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  background: var(--accent-strong);
  color: #fffaf0;
}

.text-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--accent-strong);
  font-size: 13px;
}

.edit-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.bookmark-more::after {
  content: "›";
  margin-left: 8px;
  font-size: 22px;
  line-height: 1;
}

.bookmark-more:hover {
  text-decoration: underline;
}

.bookmark-list,
#resultsList {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.bookmark-item,
.result-item {
  width: 100%;
  padding: 0 0 0 25px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  text-align: left;
}

.bookmark-item {
  position: relative;
}

.bookmark-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 16px;
  border-radius: 1px 1px 0 0;
  background: var(--accent-strong);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%);
}

.bookmark-item strong,
.result-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.bookmark-item span,
.result-item span,
.empty-state {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.bookmark-more {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.saved-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.saved-bookmark {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.saved-bookmark-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.saved-bookmark strong {
  color: var(--title);
  font-size: 18px;
}

.saved-bookmark span {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.saved-bookmark small {
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
}

.saved-remove {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.saved-remove:hover {
  background: var(--accent-strong);
  color: var(--surface);
}

.saved-remove svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.saved-open {
  width: fit-content;
  margin-top: 4px;
  color: var(--accent-strong);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.saved-open:hover {
  text-decoration: underline;
}

.saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.search-results {
  margin-top: 28px;
}

mark {
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--ink);
}

code {
  color: var(--accent-strong);
  font-size: 0.92em;
}

@media (max-width: 1100px) {
  .app-shell {
    width: 100%;
    margin: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search-wrap {
    grid-column: 1 / -1;
    order: 3;
  }

  .layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .study-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 18px;
  }

  .reader-tools {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .reader-tools .tool-button,
  .reader-tools .theme-option {
    flex: 1;
  }

  .layout {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .app-shell,
  .app-shell.has-footer {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-shell.has-footer .layout,
  .app-shell.has-footer .book-panel,
  .app-shell.has-footer .study-panel,
  .app-shell.has-footer .reader {
    height: auto;
  }

  .book-panel,
  .study-panel {
    position: static;
    border-right: 0;
    border-left: 0;
  }

  .book-panel {
    max-height: none;
    overflow: visible;
    border-bottom: 1px solid var(--line);
  }

  .panel-title {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 4;
    min-height: 58px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 18px;
    padding-left: 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }

  .panel-title > div {
    min-width: 0;
  }

  .panel-title h2 {
    font-size: 17px;
  }

  .panel-title span {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel-title .book-count {
    display: none;
  }

  .book-panel-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 122px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--accent-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }

  .book-panel-toggle:hover {
    border-color: var(--accent-strong);
    background: var(--accent-soft);
  }

  .book-panel-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s ease;
  }

  .book-panel:not(.is-collapsed) .book-panel-toggle svg {
    transform: rotate(180deg);
  }

  .book-panel-content {
    display: block;
    max-height: 42vh;
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .book-panel.is-collapsed .book-panel-content {
    display: none;
  }

  .testament-tabs {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-right: 18px;
    padding-left: 18px;
  }

  .book-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 18px 18px;
  }

  .book-button {
    min-height: 36px;
    padding-right: 10px;
    font-size: 15px;
  }

  .reader {
    height: auto;
    min-height: auto;
    padding: 0 18px 32px;
    border-top: 1px solid var(--line);
    overflow: visible;
  }

  .reader-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 18px 0;
  }

  .chapter-title-wrap {
    width: 100%;
    justify-content: center;
    gap: 9px;
  }

  .reader h1 {
    font-size: 30px;
  }

  .chapter-picker-button {
    min-width: 28px;
    height: 32px;
    margin-top: 2px;
    padding: 0 2px;
  }

  .chapter-picker-label {
    display: none;
  }

  .chapter-menu {
    left: 50%;
    right: auto;
    width: min(320px, calc(100vw - 36px));
    max-height: min(390px, calc(100vh - 210px));
    transform: translateX(-50%);
  }

  .chapter-menu::before {
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(45deg);
  }

  .chapter-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .reader-nav-side {
    width: 100%;
    min-width: 0;
  }

  .chapter-link {
    min-height: 38px;
  }

  .study-panel {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .daily-card,
  .bookmarks-section,
  .note-box {
    padding-right: 18px;
    padding-left: 18px;
  }

  .site-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .info-page .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .info-nav {
    justify-content: flex-start;
  }

  .info-main {
    width: min(100% - 28px, 900px);
    padding: 28px 0 36px;
  }

  .info-card {
    padding: 28px 22px;
  }

  .info-card h1 {
    font-size: 31px;
  }

  .info-card h2 {
    font-size: 20px;
  }

  .info-card p,
  .info-card li {
    font-size: 16px;
    line-height: 1.65;
  }
}

@media (max-width: 460px) {
  .brand strong {
    font-size: 26px;
  }

  .reader-tools {
    gap: 6px;
  }

  .tool-separator {
    display: none;
  }

  .book-list {
    grid-template-columns: 1fr;
  }

  .reader {
    padding-right: 14px;
    padding-left: 14px;
  }

  .reader h1 {
    font-size: 28px;
  }

  .chapter-picker-button {
    min-width: 28px;
    width: 28px;
    padding: 0;
  }

  .chapter-picker-label {
    display: none;
  }

  .scripture {
    font-size: max(17px, var(--reader-size));
    line-height: 1.55;
  }

  .verse {
    padding-right: 32px;
  }

  .site-footer,
  .footer-links {
    align-items: flex-start;
  }

  .footer-links {
    flex-direction: column;
  }

  .info-nav {
    gap: 8px 14px;
    font-size: 13px;
  }

  .info-card {
    padding: 24px 18px;
  }

  .info-card h1 {
    font-size: 28px;
  }
}

@media print {
  @page {
    margin: 18mm;
  }

  html,
  body {
    height: auto;
    overflow: visible;
    background: #fff;
    color: #000;
  }

  .topbar,
  .book-panel,
  .study-panel,
  .reader-heading,
  .search-results,
  .bookmark-button,
  .toast,
  .site-footer {
    display: none !important;
  }

  .app-shell,
  .layout,
  .reader {
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  .print-meta {
    display: grid;
    gap: 4px;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #bbb;
    color: #000;
    font-family: Georgia, "Times New Roman", serif;
  }

  .print-meta strong {
    font-size: 18pt;
  }

  .print-meta span:first-of-type {
    font-size: 15pt;
    font-weight: 700;
  }

  .print-meta span:last-child {
    font-size: 10pt;
  }

  .scripture {
    margin-top: 0;
    font-size: 12.5pt;
    line-height: 1.55;
  }

  .scripture.has-selected-verse .verse:not(.is-selected) {
    display: none;
  }

  .verse {
    margin-bottom: 8pt;
    padding-right: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  .verse-number {
    width: auto;
    margin-right: 6pt;
    color: #000;
  }
}
