:root {
  color-scheme: light;
  --ink: #272321;
  --ink-soft: #6c625d;
  --burgundy: #a84643;
  --burgundy-dark: #823431;
  --rose-wash: #f3e5e1;
  --cream: #eee9de;
  --paper: #fffdfa;
  --line: rgba(96, 70, 62, 0.17);
  --danger: #8b3d35;
  --shadow: 0 18px 60px rgba(70, 51, 44, 0.09);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--cream); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% 18%, rgba(168, 70, 67, 0.08) 0 2%, transparent 2.2% 100%),
    radial-gradient(ellipse at 92% 72%, rgba(112, 122, 83, 0.09) 0 2.4%, transparent 2.6% 100%),
    repeating-linear-gradient(115deg, transparent 0 58px, rgba(126, 113, 91, 0.035) 59px 60px),
    linear-gradient(160deg, #f6f2ea 0%, #ebe6dc 100%);
  font-family: "Source Sans 3", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, textarea { font: inherit; }
button { color: inherit; }

.page-shell {
  width: min(100% - 32px, 960px);
  margin-inline: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--burgundy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.brand-mark, .small-cross { color: var(--burgundy); }

.quiet-button, .dialog-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.quiet-button:active, .dialog-close:active, .send-button:active, .language-option:active {
  transform: scale(0.97);
}

main { flex: 1; padding: 68px 0 50px; }

.intro { max-width: 760px; margin: 0 auto 42px; text-align: center; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--burgundy);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: "Libre Baskerville", Georgia, serif; }
h1 {
  margin: 0 auto;
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(2.35rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 400;
}

.lede {
  max-width: 590px;
  margin: 22px auto 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.65;
}

.daily-reading {
  max-width: 820px;
  margin: 0 auto 46px;
  padding: 38px clamp(22px, 7vw, 72px) 34px;
  border-block: 1px solid var(--line);
  text-align: center;
}
.daily-date {
  width: fit-content;
  margin: 0 auto 20px;
  padding: 7px 12px 6px;
  border-radius: 4px;
  color: white;
  background: var(--burgundy);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.daily-reading .eyebrow { margin-bottom: 18px; }
.daily-reading blockquote {
  margin: 0;
  color: var(--ink);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  line-height: 1.7;
  text-wrap: balance;
}
.daily-reference { margin: 22px 0 4px; color: var(--burgundy); font-family: "Libre Baskerville", Georgia, serif; font-weight: 700; }
.daily-translation { margin: 0; color: var(--ink-soft); font-size: 0.72rem; }

.companion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.language-switch {
  display: flex;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.language-option {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.84rem;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 140ms var(--ease-out);
}

.language-option.is-active { background: var(--rose-wash); color: var(--burgundy-dark); }

.conversation {
  min-height: 270px;
  max-height: 620px;
  overflow-y: auto;
  padding: 32px;
  scroll-behavior: smooth;
}

.welcome-card { max-width: 500px; }
.welcome-card p:first-of-type {
  margin: 13px 0 7px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.7rem;
}
.welcome-note, .status-message { color: var(--ink-soft); font-size: 0.9rem; }

.user-message {
  width: fit-content;
  max-width: min(86%, 620px);
  margin: 28px 0 28px auto;
  padding: 13px 17px;
  border-radius: 18px 18px 5px 18px;
  background: var(--burgundy);
  color: white;
}
.user-message p { margin: 0; line-height: 1.55; }

.guide-response {
  animation: response-in 220ms var(--ease-out) both;
}

@keyframes response-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.reflection { margin: 0 0 20px; font-size: 1.04rem; line-height: 1.7; }
.passage-card {
  margin: 22px 0;
  padding: 30px clamp(20px, 5vw, 48px);
  border: 0;
  border-block: 1px solid var(--line);
  border-radius: 0;
  background: #fbf7f1;
  text-align: center;
}
.passage-card blockquote {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.7;
}
.passage-card figcaption { margin-top: 17px; display: grid; gap: 3px; }
.passage-card figcaption strong { color: var(--burgundy-dark); font-size: 0.88rem; }
.passage-card figcaption span { color: var(--ink-soft); font-size: 0.72rem; }

.prayer-block, .next-step {
  margin-top: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--burgundy);
}
.prayer-block h2, .next-step h2 { margin: 0 0 5px; font-size: 1rem; }
.prayer-block p, .next-step p { margin: 0; line-height: 1.6; color: var(--ink-soft); }
.urgent-response { padding: 20px; border-radius: 16px; background: #fff1ee; color: #652b25; }

.composer {
  padding: 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 8px;
  background: transparent;
  color: var(--ink);
  line-height: 1.55;
}
.composer textarea::placeholder { color: #89938d; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.privacy-note { color: var(--ink-soft); font-size: 0.76rem; }
.send-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--burgundy);
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 180ms var(--ease-out), transform 140ms var(--ease-out), opacity 180ms var(--ease-out);
}
.send-button:disabled { cursor: wait; opacity: 0.55; }

.status-message { margin: 22px 0; }
.status-message::before { content: "✦"; margin-right: 8px; color: var(--burgundy); }
.status-message.is-error { color: var(--danger); }
.boundary-note { margin: 22px auto 0; max-width: 700px; color: var(--ink-soft); text-align: center; font-size: 0.76rem; line-height: 1.55; }

footer {
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.78rem;
}

.about-dialog {
  width: min(100% - 32px, 590px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 90px rgba(21, 32, 27, 0.24);
}
.about-dialog::backdrop { background: rgba(20, 32, 27, 0.42); backdrop-filter: blur(3px); }
.about-dialog h2 { margin: 0 34px 12px 0; font-size: 2rem; }
.about-dialog h3 { margin-top: 25px; }
.about-dialog p { color: var(--ink-soft); line-height: 1.6; }
.about-dialog .license-copy { font-size: 0.72rem; }
.dialog-close { position: absolute; top: 17px; right: 18px; font-size: 1.65rem; }
.text-link { color: var(--burgundy); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (hover: hover) and (pointer: fine) {
  .send-button:hover { background: var(--burgundy-dark); }
  .quiet-button:hover { color: var(--burgundy); }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 20px, 960px); }
  .site-header { height: 64px; }
  main { padding-top: 46px; }
  .conversation { padding: 22px 18px; }
  .companion { border-radius: 10px; }
  .composer-footer { align-items: flex-end; }
  .privacy-note { max-width: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

