/* Rosarium reading pages — the app's candlelit look, as a quiet, readable document. */
@font-face { font-family: 'Rosarium Caps'; src: url(/fonts/Cinzel-SemiBold.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Rosarium Text'; src: url(/fonts/EBGaramond-Medium.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Rosarium Text'; font-style: italic; src: url(/fonts/EBGaramond-MediumItalic.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Rosarium Hant'; src: url(/fonts/NotoSerifTC-SemiBold.zh.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Rosarium Arab'; src: url(/fonts/MarkaziText-Medium.ar.ttf) format('truetype'); font-display: swap; }

:root {
  --bg: #0e0a07;
  --ink: #f1e6cf;
  --dim: #b8a58a;
  --gold: #e0b060;
  --pale: #f3d9a0;
  --rule: rgba(224, 176, 96, 0.28);
  --measure: 38rem;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 1.18rem/1.65 'Rosarium Text', 'EB Garamond', Georgia, serif;
  background: radial-gradient(120% 80% at 50% 0%, #20160d 0%, var(--bg) 60%) fixed;
}
:lang(zh) body, body:lang(zh) { font-family: 'Rosarium Hant', 'Noto Serif TC', 'Songti TC', serif; line-height: 1.9; }
:lang(ar) body, body:lang(ar) { font-family: 'Rosarium Arab', 'Markazi Text', 'Amiri', serif; font-size: 1.3rem; line-height: 1.9; }
a { color: var(--pale); text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
a:hover, a:focus-visible { color: #fff0c8; text-decoration-color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.top, footer { max-width: 60rem; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2rem); display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: baseline; justify-content: space-between; }
.brand { font-family: 'Rosarium Caps', serif; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); text-decoration: none; font-size: 1rem; }
.langs { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; font-size: 0.9rem; color: var(--dim); }
.langs a { color: var(--dim); text-decoration: none; }
.langs [aria-current] { color: var(--gold); }

main { padding: 0 clamp(1rem, 4vw, 2rem) 3rem; }
article { max-width: var(--measure); margin: 0 auto; }
h1, h2, h3, .kicker { font-family: 'Rosarium Caps', serif; font-weight: 600; color: var(--gold); letter-spacing: 0.04em; line-height: 1.25; }
:lang(zh) :is(h1, h2, h3, .kicker), :lang(ar) :is(h1, h2, h3, .kicker) { font-family: inherit; letter-spacing: 0; }
h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin: 1.2rem 0 0.8rem; color: var(--ink); text-align: center; }
h2 { font-size: 1.45rem; margin: 3.2rem 0 1rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
h2 .kicker { display: block; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.3rem; }
h3 { font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 1.8rem 0 0.5rem; color: var(--dim); }
p.kicker { text-align: center; font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); margin: 1.5rem 0 0; }
.lede { font-style: italic; font-size: 1.25rem; color: var(--pale); text-align: center; }

figure { margin: 1.5rem 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.55); }
figure.hero img { max-height: 70vh; object-fit: cover; object-position: 50% 25%; }
figcaption, .cite { font-size: 0.82rem; font-style: italic; color: var(--dim); line-height: 1.45; margin-top: 0.5rem; }
figcaption a, .cite a { color: var(--dim); }
.cite { margin: 0.4rem 0 1.2rem; }

blockquote.scripture { margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--rule); font-style: italic; color: var(--pale); }
:lang(ar) blockquote.scripture, [dir='rtl'] blockquote.scripture { padding: 0 1.1rem 0 0; border-left: 0; border-right: 2px solid var(--rule); }
.fruit { color: var(--gold); font-style: italic; }
.question { border-top: 1px dotted var(--rule); padding-top: 0.8rem; }
.petition { color: var(--pale); }
.prayer { font-size: 1.3rem; }
.prayer .response { color: var(--pale); }

.cta { text-align: center; margin: 2rem 0; }
a.pray {
  display: inline-block; padding: 0.8rem 1.8rem; border: 1px solid var(--gold); border-radius: 3px;
  font-family: 'Rosarium Caps', serif; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.95rem;
  color: var(--pale); text-decoration: none; background: rgba(224, 176, 96, 0.07);
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px var(--rule);
}
:lang(zh) a.pray, :lang(ar) a.pray { font-family: inherit; letter-spacing: 0.04em; }
a.pray:hover { background: rgba(224, 176, 96, 0.16); color: #fff0c8; }

.toc ol, ul.links { padding-inline-start: 1.2rem; }
ul.links li { margin: 0.25rem 0; }
ul.links.big { list-style: none; padding: 0; text-align: center; font-size: 1.25rem; }
.times { color: var(--dim); font-style: italic; }
table.days { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
table.days th, table.days td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--rule); text-align: start; font-weight: normal; }
table.days th { color: var(--dim); width: 40%; }
table.days tr.today th, table.days tr.today td { color: var(--gold); background: rgba(224, 176, 96, 0.08); }
table.days tr.today a { color: #fff0c8; }

footer { border-top: 1px solid var(--rule); color: var(--dim); font-size: 0.9rem; margin-top: 2rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
footer a { color: var(--dim); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

ol.litany { list-style: none; padding: 0; margin: 1.5rem 0; }
ol.litany li { padding: 0.18rem 0; }
.r, .versicle .r { color: var(--pale); font-style: italic; }
.versicle { margin-top: 1rem; border-top: 1px dotted var(--rule); padding-top: 0.8rem; }
