:root {
  color-scheme: light;
  --bg: #f6f5f0;
  --paper: #fffefa;
  --ink: #303d36;
  --muted: #6f776d;
  --line: #e2e5dc;
  --green: #526c58;
  --green-dark: #405846;
  --soft: #eaf0e6;
  --hero: #e8ede2;
  --sand: #f0ece2;
  --shadow: 0 12px 45px #273c2d08;
  --serif:
    ui-serif, "Iowan Old Style", "Palatino Linotype", "Noto Serif KR", Georgia,
    serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b221e;
  --paper: #242d26;
  --ink: #e0e7da;
  --muted: #a6b09f;
  --line: #3b483e;
  --green: #afc4a6;
  --green-dark: #bfd3b7;
  --soft: #303e31;
  --hero: #2d3a2d;
  --sand: #34382d;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1b221e;
    --paper: #242d26;
    --ink: #e0e7da;
    --muted: #a6b09f;
    --line: #3b483e;
    --green: #afc4a6;
    --green-dark: #bfd3b7;
    --soft: #303e31;
    --hero: #2d3a2d;
    --sand: #34382d;
    --shadow: none;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic",
    sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -0.025em;
}
button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
a {
  color: inherit;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.065em;
  word-break: keep-all;
}
h2 {
  font-size: 19px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.045em;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--green);
  font-weight: 600;
}
.page-heading .eyebrow {
  margin-bottom: 13px;
  letter-spacing: 0.02em;
}
.page-heading .muted {
  margin-top: 12px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 34px;
}
.button {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 46px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  line-height: 1.5;
  font-weight: 550;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:active:not(:disabled) {
  transform: translateY(1px);
}
.primary {
  background: var(--green);
  color: var(--paper);
}
.primary:hover:not(:disabled) {
  background: var(--green-dark);
}
.secondary {
  background: var(--paper);
  border-color: var(--line);
  color: var(--green);
}
.secondary:hover {
  background: var(--soft);
}
.text-button {
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 0;
  min-height: 44px;
  color: var(--green);
}
.text-button svg {
  width: 17px;
}
.text-button:disabled {
  opacity: 0.5;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--soft);
  color: var(--ink);
}
.full {
  width: 100%;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  border-right: 1px solid var(--line);
  padding: 40px 23px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  padding: 0 11px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.06em;
}
.brand svg {
  width: 27px;
  height: 27px;
  color: var(--green);
  margin-top: 4px;
}
.brand small {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 5px;
}
.sidebar nav {
  display: grid;
  gap: 9px;
  margin-top: 60px;
}
.nav-item {
  border: 0;
  background: none;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  color: var(--muted);
  border-radius: 10px;
  font-size: 14px;
  min-height: 50px;
}
.nav-item.active {
  background: var(--soft);
  color: var(--green);
  font-weight: 600;
}
.side-note {
  margin-top: auto;
  padding: 30px 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
}
.settings-link {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 21px 10px 0;
  background: none;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.workspace {
  margin-left: 224px;
}
.topbar {
  height: 82px;
  border-bottom: 1px solid var(--line);
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 14px;
  color: var(--line);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.local-badge {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
}
.local-badge i {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}
.mini-brand {
  display: none;
}
main {
  max-width: 1100px;
  margin: auto;
  padding: 42px 48px 32px;
  min-height: calc(100vh - 160px);
}
main:focus {
  outline: none;
}
.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 30px;
}
.today-primary,
.today-secondary {
  min-width: 0;
}
.reading-hero {
  position: relative;
  background: var(--hero);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 27px 28px 0;
  overflow: hidden;
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 10px;
  color: var(--green);
  font-size: 10px;
  line-height: 1.8;
  background: var(--paper);
}
.reading-hero h2 {
  position: relative;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.06em;
  margin: 43px 0 13px;
  z-index: 1;
}
.reading-hero > p {
  position: relative;
  font-size: 12px;
  color: var(--green);
  z-index: 1;
  max-width: 85%;
}
.reading-hero > .button {
  position: relative;
  margin: 25px 0 31px;
  min-width: 153px;
  z-index: 1;
}
.reading-hero > .button:disabled {
  background: var(--paper);
  color: var(--green);
}
.hero-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid color-mix(in srgb, var(--green) 17%, transparent);
  padding: 17px 0;
  color: var(--green);
  font-size: 10px;
  gap: 10px;
}
.hero-bottom svg {
  width: 15px;
  height: 15px;
  margin-right: 5px;
}
.book-art {
  position: absolute;
  width: 210px;
  right: -18px;
  top: 72px;
  color: var(--green);
  opacity: 0.4;
  transform: rotate(-7deg);
}
.book-art svg {
  width: 100%;
  height: auto;
}
.reflection-prompt {
  margin-top: 28px;
  padding: 3px 1px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.section-heading > svg {
  color: var(--muted);
  width: 20px;
}
.reflection-prompt > .muted,
.prayer-preview > .muted {
  font-size: 12px;
}
.reflection-choices {
  margin-top: 19px;
}
.choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 15px 18px;
  text-align: left;
  margin-bottom: 10px;
  font-size: 14px;
}
.choice small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.choice > svg {
  color: var(--muted);
  width: 17px;
}
.choice:hover {
  border-color: var(--green);
}
.reflection-choices > .text-button {
  font-size: 12px;
  margin: 0 5px;
}
.prayer-preview .section-heading {
  margin-top: 0;
  margin-bottom: 2px;
  min-height: 30px;
}
.prayer-preview .section-heading h2 {
  font-size: 18px;
}
.group-label {
  font-size: 11px;
  color: var(--muted);
  margin: 19px 0 8px;
}
.prayer-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 19px;
  margin-bottom: 11px;
  min-width: 0;
}
.prayer-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -8px;
  margin-bottom: 3px;
}
.prayer-card-top .icon-button {
  margin-left: auto;
  margin-right: -12px;
  width: 44px;
  height: 44px;
}
.category {
  font-size: 10px;
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--green);
}
.sample-label {
  font-size: 9px;
  color: var(--muted);
}
.prayer-card h3 {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.prayer-card-bottom {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.prayed-button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 7px;
  padding: 8px 10px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 11px;
}
.prayed-button svg {
  width: 15px;
  height: 15px;
}
.prayed-button.checked {
  background: var(--soft);
  border-color: transparent;
}
.prayer-card.compact {
  padding: 12px 16px;
}
.prayer-card.compact .prayer-card-bottom {
  margin-top: 9px;
}
.quiet-note {
  padding: 22px 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
.quiet-note svg {
  width: 19px;
  margin-top: 3px;
  opacity: 0.65;
}
.closing {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding: 25px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.closing p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.closing p span {
  margin: 0 5px;
}
.closing .button {
  font-size: 12px;
}
.closing .eyebrow {
  font-size: 10px;
}
.footer {
  text-align: center;
  color: var(--muted);
  opacity: 0.7;
  font-size: 10px;
  padding: 16px 20px 26px;
}
.bottom-nav {
  display: none;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 30px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
  font-size: 13px;
  font-weight: 550;
  min-width: 0;
}
.field-help {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
.field input,
.field select,
.field textarea,
.search-box input {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}
.field textarea {
  resize: vertical;
  min-height: 100px;
}
.panel > .muted {
  font-size: 12px;
}
.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  font-size: 12px;
}
progress {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 12px;
  border: none;
  border-radius: 6px;
  overflow: hidden;
  appearance: none;
  background: var(--soft);
}
progress::-webkit-progress-bar {
  background: var(--soft);
}
progress::-webkit-progress-value {
  background: var(--green);
}
progress::-moz-progress-bar {
  background: var(--green);
}
.reading-row {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 21px 15px;
}
.reading-row.current {
  background: var(--soft);
  border-radius: 10px;
  border-color: transparent;
}
.reading-row .button {
  margin-left: auto;
  font-size: 12px;
}
.chapter-marker {
  font-family: var(--serif);
  color: var(--muted);
  font-size: 18px;
  width: 28px;
}
.reading-row h3 {
  font-size: 16px;
}
.reading-row p {
  margin-top: 4px;
}
.reading-list > .section-heading {
  margin: 33px 0 17px;
}
.footnote {
  color: var(--muted);
  font-size: 11px;
  margin: 18px 0;
  line-height: 1.9;
}
.reflection-intro {
  text-align: center;
  padding: 34px 20px 39px;
  background: var(--sand);
  border-radius: 14px;
  margin-bottom: 32px;
}
.reflection-intro > svg {
  color: var(--green);
  margin-bottom: 12px;
  width: 28px;
  height: 28px;
}
.reflection-intro h2 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}
.reflection-intro p {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 20px;
}
.record-card {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px 24px;
  background: var(--paper);
  text-align: left;
  margin: 12px 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.record-meta {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}
.record-card p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 9px;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}
.tags span {
  font-size: 11px;
  color: var(--green);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-row .field {
  margin: 10px 0;
}
.editor > .field:first-child {
  margin-top: 0;
}
.question-block {
  background: var(--bg);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 28px 0;
}
.question-progress {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.step-dots {
  display: flex;
  gap: 10px;
  margin: 17px 0;
}
.step-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
  color: var(--muted);
}
.step-dot.active {
  background: var(--green);
  color: var(--paper);
}
.step-dot.filled:not(.active) {
  border-color: var(--green);
  color: var(--green);
}
.question-label {
  font-size: 17px;
  margin: 24px 0 4px;
}
.question-label textarea {
  background: var(--paper);
  margin-top: 8px;
  font-weight: 400;
}
.question-nav {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}
.form-actions .button {
  font-size: 13px;
}
.draft-banner {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 13px;
}
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin: 0 0 22px;
  scrollbar-width: none;
}
.tab {
  border: 0;
  background: none;
  white-space: nowrap;
  padding: 12px 14px;
  min-height: 47px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: 13px;
}
.tab span {
  font-size: 10px;
  margin-left: 4px;
}
.tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}
.prayer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 19px;
}
.prayer-grid .prayer-card {
  margin: 0;
}
.prayer-memo {
  font-size: 13px;
  color: var(--muted);
  margin-top: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer-note {
  font-size: 12px;
  border-left: 2px solid var(--green);
  padding: 2px 12px;
  margin: 15px 0;
  color: var(--green);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.fixture-note {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 15px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.empty {
  text-align: center;
  padding: 45px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.empty h3 {
  color: var(--ink);
  margin: 15px 0 6px;
}
.empty.compact {
  padding: 35px 15px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px 16px;
  margin-bottom: 20px;
}
.search-box > svg {
  color: var(--muted);
  width: 19px;
}
.search-box input {
  border: 0;
  background: none;
  padding: 12px 0;
  font-size: 14px;
}
.result-count {
  margin: 10px 0;
}
.skip-link {
  position: absolute;
  z-index: 20;
  top: -100px;
  left: 10px;
  padding: 10px;
  background: var(--paper);
}
.skip-link:focus {
  top: 10px;
}
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  box-shadow: 0 25px 100px #0003;
  overflow: auto;
}
dialog::backdrop {
  background: #1e2d2459;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.055em;
  margin: 8px 28px 20px 0;
}
dialog > p:not(.eyebrow) {
  font-size: 14px;
  color: var(--muted);
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
}
.reader-placeholder {
  padding: 30px 22px;
  background: var(--soft);
  border-radius: 12px;
  text-align: center;
  margin: 22px 0;
}
.reader-placeholder svg {
  width: 34px;
  height: 34px;
  color: var(--green);
}
.reader-placeholder p {
  font-size: 15px;
  line-height: 1.9;
  margin: 20px 0 0;
  word-break: keep-all;
}
.reader-placeholder ~ .button {
  margin-top: 22px;
}
.settings-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.settings-section p {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 16px;
  line-height: 1.9;
}
.settings-section .small {
  font-size: 11px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
legend {
  font-size: 13px;
  margin-bottom: 12px;
}
.weekday-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.weekday-options label {
  position: relative;
}
.weekday-options input {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 44px;
  margin: 0;
}
.weekday-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.weekday-options input:checked + span {
  background: var(--green);
  color: var(--paper);
}
.weekday-options input:focus-visible + span {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.danger {
  color: #a16350;
}
.danger-button {
  background: #986653;
  color: #fff;
}
.closing-message {
  line-height: 2;
  margin: 24px 0 30px;
}
.startup-error {
  max-width: 650px;
  padding-top: 100px;
}
.startup-error p {
  margin: 25px 0;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 30;
  max-width: min(560px, calc(100% - 32px));
  width: max-content;
  background: var(--ink);
  color: var(--paper);
  padding: 13px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px #0002;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1400px) {
  main {
    padding-top: 52px;
  }
  .today-grid {
    gap: 38px;
  }
  .reading-hero {
    padding-top: 30px;
  }
  .reading-hero h2 {
    margin-top: 48px;
  }
  .reading-hero > .button {
    margin-top: 31px;
    margin-bottom: 37px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 188px;
    padding: 35px 16px;
  }
  .brand {
    font-size: 19px;
    gap: 9px;
    padding: 0 7px;
  }
  .workspace {
    margin-left: 188px;
  }
  .topbar {
    padding: 0 30px;
  }
  main {
    padding: 34px 30px;
  }
  .today-grid {
    gap: 22px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
  .reading-hero {
    padding: 22px 22px 0;
  }
  .hero-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .reading-hero h2 {
    font-size: 32px;
    margin-top: 31px;
  }
  .book-art {
    width: 175px;
    right: -45px;
    top: 112px;
  }
  .reading-hero > p {
    max-width: 100%;
    font-size: 11px;
  }
  .prayer-preview .section-heading h2 {
    font-size: 16px;
  }
  h1 {
    font-size: 30px;
  }
  .page-heading > .button {
    font-size: 12px;
    flex-shrink: 0;
  }
  .closing {
    align-items: flex-start;
  }
  .closing .button {
    max-width: 150px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 65px;
    padding: 0 24px;
  }
  .breadcrumb {
    display: none;
  }
  .mini-brand {
    display: block;
    font-family: var(--serif);
    font-size: 20px;
    letter-spacing: -0.065em;
  }
  .top-actions {
    gap: 9px;
  }
  .top-actions .icon-button {
    width: 40px;
  }
  .local-badge {
    font-size: 10px;
  }
  main {
    max-width: 650px;
    padding: 30px 24px 24px;
    min-height: calc(100vh - 190px);
  }
  .page-heading {
    margin-bottom: 27px;
    gap: 17px;
  }
  .page-heading .eyebrow {
    font-size: 11px;
    margin-bottom: 11px;
  }
  h1 {
    font-size: 29px;
  }
  .page-heading .muted {
    font-size: 12px;
    line-height: 1.9;
    margin-top: 10px;
  }
  .today-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-top {
    flex-direction: row;
    align-items: center;
  }
  .reading-hero {
    padding: 24px 24px 0;
  }
  .reading-hero h2 {
    font-size: 35px;
    margin-top: 35px;
  }
  .reading-hero > p {
    font-size: 12px;
    max-width: 75%;
  }
  .book-art {
    width: 190px;
    right: 0;
    top: 74px;
  }
  .reading-hero > .button {
    margin: 27px 0 28px;
    min-height: 48px;
  }
  .hero-bottom {
    font-size: 11px;
  }
  .reflection-prompt {
    margin-top: 29px;
  }
  .section-heading h2,
  .prayer-preview .section-heading h2 {
    font-size: 18px;
  }
  .reflection-prompt > .muted,
  .prayer-preview > .muted {
    font-size: 12px;
  }
  .choice {
    padding: 16px 18px;
    min-height: 74px;
  }
  .choice small {
    font-size: 12px;
  }
  .reflection-choices > .text-button {
    font-size: 13px;
  }
  .prayer-preview {
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }
  .prayer-card.compact {
    padding: 15px 18px;
  }
  .prayer-card h3 {
    font-size: 16px;
  }
  .group-label {
    font-size: 12px;
  }
  .prayed-button {
    font-size: 12px;
  }
  .quiet-note {
    justify-content: center;
    padding: 19px 5px 0;
    font-size: 12px;
  }
  .closing {
    margin-top: 27px;
    flex-direction: column;
    gap: 17px;
  }
  .closing .button {
    max-width: none;
    width: 100%;
    min-height: 48px;
  }
  .closing p {
    font-size: 12px;
  }
  .footer {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    position: fixed;
    inset: auto 0 0;
    display: flex;
    justify-content: space-around;
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--line);
    z-index: 10;
  }
  .bottom-nav .nav-item {
    min-width: 53px;
    padding: 5px 10px;
    flex-direction: column;
    gap: 3px;
    font-size: 10px;
    min-height: 51px;
    border-radius: 8px;
  }
  .bottom-nav .nav-item svg {
    width: 21px;
    height: 21px;
  }
  .bottom-nav .nav-item.active {
    background: transparent;
    color: var(--green);
  }
  .bottom-nav .nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 24px;
    height: 2px;
    background: var(--green);
  }
  .panel {
    padding: 21px;
    margin-bottom: 25px;
  }
  .prayer-grid {
    gap: 12px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading > .button {
    font-size: 13px;
  }
  .tabs {
    gap: 3px;
  }
  .tab {
    padding: 12px 10px;
  }
  .fixture-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .form-row {
    gap: 12px;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .question-block {
    padding: 19px;
  }
  .step-dots {
    gap: 6px;
    justify-content: space-between;
  }
  .step-dot {
    width: 40px;
    height: 44px;
  }
  .question-label {
    font-size: 16px;
  }
  .reading-row {
    gap: 12px;
    padding: 19px 12px;
  }
  .reading-row .button {
    padding: 9px 12px;
  }
  .record-card {
    padding: 18px 20px;
  }
  .search-box input {
    font-size: 16px;
  }
  .search-box input::placeholder {
    font-size: 12px;
  }
  #toast {
    bottom: calc(85px + env(safe-area-inset-bottom));
  }
  dialog {
    padding: 28px 22px;
    max-height: calc(100dvh - 32px);
  }
  dialog h2 {
    font-size: 25px;
  }
}
@media (max-width: 420px) {
  main {
    padding: 27px 20px 22px;
  }
  .topbar {
    padding: 0 20px;
  }
  h1 {
    font-size: 27px;
  }
  .reading-hero {
    padding: 22px 20px 0;
  }
  .reading-hero h2 {
    font-size: 33px;
  }
  .book-art {
    width: 165px;
    right: -18px;
    top: 92px;
  }
  .hero-top .pill {
    font-size: 9px;
    padding: 3px 8px;
  }
  .hero-top .eyebrow {
    font-size: 11px;
  }
  .prayer-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .question-block {
    padding: 15px;
  }
  .step-dots {
    gap: 4px;
  }
  .step-dot {
    width: 34px;
  }
  .panel.editor {
    padding: 17px;
  }
  .form-actions .button {
    padding: 10px 12px;
  }
  .closing p {
    font-size: 11px;
  }
  .reading-list .section-heading {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.bible-text {
  white-space: pre-wrap;
  text-align: left;
  font-size: 18px;
  line-height: 2;
}
.reader-symbol {
  font-size: 42px;
  color: var(--green);
  line-height: 1;
}

.dialog-status:empty {
  display: none;
}
.dialog-status:not(:empty) {
  background: var(--soft);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 30px 0 10px;
  font-size: 13px;
  color: var(--green);
}

.action-error {
  background: var(--soft);
  color: var(--ink);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  padding: 12px 15px;
  margin: 16px 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.reading-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 25px;
}
.reading-overview h2,
.reading-overview p {
  margin-top: 8px;
}
.book-explorer {
  margin-top: 36px;
}
.book-explorer details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.book-explorer summary {
  cursor: pointer;
  min-height: 44px;
  padding: 9px 0;
  color: var(--green);
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.book-button {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 68px;
  text-align: left;
  padding: 10px 13px;
}
.book-button small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.book-button.selected {
  border-color: var(--green);
  background: var(--soft);
}
.book-detail {
  margin-top: 24px;
  scroll-margin-top: 20px;
}
.book-detail h2 {
  margin-top: 8px;
}
.book-detail > .muted {
  margin-top: 8px;
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
  gap: 8px;
}
.chapter-button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  min-height: 62px;
  padding: 8px 3px;
}
.chapter-button small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.chapter-button.read {
  background: var(--soft);
}
.chapter-button.current-chapter {
  border: 2px solid var(--green);
}
@media (max-width: 500px) {
  .reading-overview {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .reading-row .button {
    max-width: 125px;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .book-detail {
    padding: 18px;
  }
  .draft-banner {
    flex-wrap: wrap;
  }
  .chapter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.button,
.text-button {
  text-decoration: none;
}
.reading-hero > a.button {
  position: relative;
  margin: 25px 0 31px;
  z-index: 1;
  min-width: 153px;
}
.reading-row > a.button {
  margin-left: auto;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.backup-summary {
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.backup-summary dt {
  margin-top: 12px;
  font-weight: 600;
}
.backup-summary dd {
  margin: 4px 0 0;
}
