:root {
  --accent: #8B1A1A;
  --bg: #FAFAF5;
  --text: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --response-weight: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #D4726A;
    --bg: #1a1a1a;
    --text: #e8e4df;
    --muted: #999;
    --border: #333;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  max-width: 40em;
  margin: 0 auto;
  padding: 1rem;
  line-height: 1.6;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

header h1 {
  color: var(--accent);
  font-size: 1.8rem;
  letter-spacing: 0.05em;
}

.context {
  color: var(--muted);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Rite selector */
#rite-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.rite-btn {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.rite-btn.active {
  background: var(--accent);
  color: #fff;
}

.rite-btn:hover:not(.active) {
  background: var(--accent);
  color: #fff;
  opacity: 0.8;
}

/* Psalm mode selector */
#psalm-mode-selector {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

#psalm-mode-selector label {
  color: var(--muted);
  margin-right: 0.3rem;
}

.mode-btn {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 3px;
  cursor: pointer;
}

.mode-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Prayer content */
#prayer-content {
  margin-bottom: 3rem;
}

.loading {
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.section-heading {
  color: var(--accent);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.line-leader {
  margin: 0.3rem 0;
}

.line-response {
  margin: 0.3rem 0;
  font-weight: var(--response-weight);
}

.line-rubric {
  margin: 0.5rem 0;
  font-style: italic;
  color: var(--muted);
}

.line-scripture {
  margin: 0.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
}

.scripture-ref {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.25rem;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
