/* Liturgical light: indigo night / parchment, a living liturgical-green accent
   and manuscript gold. Scripture is set in a serif (book feel); the chrome in a
   system sans. The signature is the illuminated incipit — the gospel's opening
   line treated like a manuscript. */

:root {
  --bg: #f7f4ec;
  --panel: #fffdf8;
  --ink: #1e2438;
  --muted: #6b6f80;
  --line: #e6e0d2;
  --accent: #2f6b4f;     /* liturgical green — Tiempo Ordinario */
  --gold: #b98a34;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14172a; --panel: #1b1f36; --ink: #ece9e0; --muted: #9aa0b6;
    --line: #2b3052; --accent: #6bbd93; --gold: #d8b063;
  }
}
:root[data-theme="dark"] {
  --bg: #14172a; --panel: #1b1f36; --ink: #ece9e0; --muted: #9aa0b6;
  --line: #2b3052; --accent: #6bbd93; --gold: #d8b063;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

/* Soft light through a window, behind everything. */
.glow {
  position: fixed; inset: -20% -20% auto -20%; height: 60vh; z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}

.app { max-width: 40rem; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }

.masthead { padding: 0.5rem 0 1rem; }
.datenav { display: flex; align-items: center; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.datenav__btn {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 1.3rem; cursor: pointer;
}
.datenav__today {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 2rem; padding: 0.4rem 1rem; font: inherit; font-size: 0.85rem; cursor: pointer;
  letter-spacing: 0.02em;
}
.eyebrow {
  margin: 0 0 0.25rem; color: var(--accent); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 6vw, 2.3rem);
  line-height: 1.15; margin: 0; letter-spacing: -0.01em;
}
.streak { margin: 0.75rem 0 0; color: var(--gold); font-size: 0.9rem; font-weight: 600; }

/* Daily illustration. */
.hero {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 1rem;
  margin: 1rem 0 0.25rem; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Reading section tabs. */
.tabs { display: flex; gap: 0.4rem; overflow-x: auto; margin: 1.25rem 0; padding-bottom: 0.25rem; }
.tab {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 2rem; padding: 0.45rem 0.9rem; font: inherit; font-size: 0.85rem; cursor: pointer;
  white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* Scripture, set like a page. */
.reading__incipit {
  font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--gold);
  margin: 0 0 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.reading__body { font-family: var(--serif); font-size: 1.12rem; white-space: pre-line; }
.reading__body::first-letter {
  float: left; font-size: 3.1rem; line-height: 0.8; padding: 0.1rem 0.5rem 0 0; color: var(--accent); font-weight: 600;
}

/* Reflection — clearly a distinct, labeled layer. */
.reflection { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem; margin: 1.5rem 0; }
.reflection__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.badge {
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
  border-radius: 2rem; padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.switch { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.reflection__text { margin: 0; font-size: 1.02rem; }
.message { margin: 0.75rem 0 0; font-family: var(--serif); font-style: italic; color: var(--muted); }
.questions { margin: 0.75rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.95rem; }
.questions li { margin: 0.25rem 0; }
.ai-note { margin: 0.9rem 0 0; font-size: 0.72rem; color: var(--muted); opacity: 0.8; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn {
  flex: 1 1 auto; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 0.7rem; padding: 0.8rem 1rem; font: inherit; font-weight: 600; cursor: pointer;
}
.btn--ghost { background: transparent; color: var(--accent); }

.status { max-width: 40rem; margin: 4rem auto; padding: 0 1.25rem; text-align: center; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .app { animation: rise 0.5s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
