/* General Settings lives separately from typography controls so both sheets stay usable on phones. */
.settings-sheet,
.general-settings-sheet {
  max-height: min(74dvh, 720px);
}
.settings-sheet {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(12px, var(--safe-bottom));
}
.general-settings-sheet {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.general-settings-sheet .settings-heading { flex: 0 0 auto; }
.general-settings-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(18px + var(--safe-bottom));
}
.general-section { border-bottom: 1px solid var(--line); }
.general-section:last-child { border-bottom: 0; }
.general-section-title {
  padding: 18px 22px 8px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.general-settings-sheet .setting-row { grid-template-columns: minmax(118px, 1fr) minmax(0, 1.55fr); }
.general-settings-sheet .guide-toggle-row { grid-template-columns: minmax(0,1fr) auto; }
.general-settings-sheet .name-display-setting > div {
  min-width: 0;
  grid-template-columns: 1fr 1fr;
}
.general-settings-sheet .name-display-setting button {
  min-height: 50px;
  padding: 6px 10px;
  line-height: 1.2;
}
.name-display-help,
.general-update-note,
.general-update-status {
  margin: 0;
  padding: 12px 22px 16px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}
.general-update-status {
  padding-bottom: 6px;
  color: var(--blue);
}
.general-update-note { padding-top: 4px; }
.general-update-meta {
  margin: 2px 22px 6px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field, var(--panel-2));
  font-size: .75rem;
}
.general-update-meta span { color: var(--muted); font-weight: 700; }
.general-update-meta time { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.general-update-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 16px 22px 4px;
}
.general-update-actions button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--field, var(--panel-2));
  color: var(--text);
  font-size: .78rem;
  font-weight: 800;
  padding: 8px 10px;
}
.general-update-actions button.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-soft);
}
.general-update-actions button:disabled { opacity: .48; }
.general-project-section { padding-bottom: 10px; }
.general-project-link {
  margin: 4px 22px 12px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  background: var(--field, var(--panel-2));
}
.general-project-link strong { display: block; color: var(--text); font-size: .88rem; }
.general-project-link small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.general-project-link > span:last-child { color: var(--blue); font-size: 1rem; }

/* Search chapter/verse numbers use the same serif face as Scripture, without artificial bolding. */
.search-reference-numbers {
  font-family: var(--reader-font);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .01em;
}

/* Every chapter-number picker uses the Scripture text face at regular weight. */
.home-chapter-grid button,
.auto-chapters button,
.chapter-grid button {
  font-family: var(--reader-font);
  font-weight: 400 !important;
  font-style: normal;
  font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 560px) {
  .settings-sheet,
  .general-settings-sheet {
    width: min(calc(100% - 20px), 540px);
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 112px);
  }
  .general-settings-sheet .setting-row { padding-left: 16px; padding-right: 16px; }
  .general-section-title,
  .name-display-help,
  .general-update-note,
  .general-update-status { padding-left: 16px; padding-right: 16px; }
  .general-update-actions { padding-left: 16px; padding-right: 16px; }
  .general-update-meta { margin-left: 16px; margin-right: 16px; }
  .general-project-link { margin-left: 16px; margin-right: 16px; }
}
@media (max-width: 390px) {
  .general-settings-sheet .name-display-setting {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .general-update-actions { grid-template-columns: 1fr; }
}