:root {
  --ink: #1b1a18;
  --ink-muted: #6b6862;
  --paper: #faf8f4;
  --rule: #e2ddd3;
  --accent: #F4BE1D;
  --accent-ink: #1b1a18;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece8e1;
    --ink-muted: #a09b92;
    --paper: #171614;
    --rule: #33302b;
    --accent: #F4BE1D;
    --accent-ink: #171614;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 7rem;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.site-header,
main,
.bottom-bar > * { max-width: var(--measure); }

.site-header, main { margin: 0 auto; }

.site-header { padding: 1.5rem 0 0.5rem; }

.program-name {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.status { color: var(--ink-muted); padding: 3rem 0; text-align: center; }

.day-title {
  margin: 0.25rem 0 0.25rem;
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 600;
}

#day-number::after { content: " · "; color: var(--ink-muted); font-weight: 400; }

.day-date {
  margin: 0 0 2rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.scripture { border-top: 1px solid var(--rule); padding-top: 1.5rem; }

blockquote {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.3125rem;
  line-height: 1.5;
}

.prompt {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.prompt p { margin: 0 0 1rem; }

.prayed {
  display: block;
  width: 100%;
  margin: 2.5rem 0 0;
  padding: 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.prayed:disabled {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
  cursor: default;
}

.complete-note {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  text-align: center;
}

.bottom-bar {
  position: fixed;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.bottom-bar button {
  flex: 1 1 0;
  max-width: 11rem;
  padding: 0.75rem 0.5rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.bottom-bar[hidden] { display: none; }

.bottom-bar button:disabled { color: var(--rule); cursor: default; }
.nav-index { font-weight: 600; }

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet[hidden] { display: none; }

.sheet-panel {
  width: 100%;
  max-width: var(--measure);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
}

.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 1.125rem; margin: 0.25rem 0 0.75rem; }

.close {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.day-list { list-style: none; margin: 0; padding: 0; }

.day-list button {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.day-list button:disabled { color: var(--ink-muted); opacity: 0.55; cursor: default; }
.day-list .n { width: 3.75rem; flex: none; color: var(--ink-muted); }
.day-list .current { font-weight: 600; }
.day-list .lock { margin-left: auto; }
