/* MinhasOrações — design 2026: dark glassmorphism + tipografia litúrgica + imagens. */

:root {
  --bg: #0c0a1f;
  --bg-soft: #14132a;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --fg: #f6f0e0;
  --fg-soft: #e2dcc8;
  --muted: #a09ab6;
  --dim: #6a648a;
  --gold: #f0c674;
  --gold-soft: #ffe19a;
  --gold-deep: #b8902a;
  --rose: #e0879d;
  --indigo: #6e6fce;
  --whats: #25d366;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 8px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 12px 36px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px -10px var(--gold);
  --glass-blur: blur(20px) saturate(180%);
}

* { box-sizing: border-box; }

/* Garante que o atributo [hidden] sempre vence display: explícito.
 * Sem isso, elementos como .liturgical-badge (display:flex) e .candle-mode
 * apareciam mesmo marcados como hidden no HTML. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--fg);
  font-family: 'Spectral', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  min-height: 100vh; min-height: 100svh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(240, 198, 116, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 80%, rgba(110, 111, 206, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  padding-bottom: env(safe-area-inset-bottom, 0);
  font-size: 17px;
}

/* grão / ruído sutil pra dar textura de papel antigo */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

main, header, footer, .modal-backdrop { position: relative; z-index: 1; }

button, .tab, .pill, .saint-card, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

/* esconde scrollbars de carrosséis */
.tabs, .filter-row, .hscroll { scrollbar-width: none; -ms-overflow-style: none; }
.tabs::-webkit-scrollbar,
.filter-row::-webkit-scrollbar,
.hscroll::-webkit-scrollbar { display: none; width: 0; height: 0; }

.container { max-width: 820px; margin: 0 auto; padding: 0 18px; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 10, 31, 0.55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd86b 0%, #d4983e 60%, #8e6014 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #2c1a00;
  box-shadow:
    0 6px 20px -4px rgba(240, 198, 116, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  position: relative;
}
.logo-mark svg { width: 22px; height: 22px; }
.brand-name {
  font-family: 'Playfair Display', 'Trajan Pro', Georgia, serif;
  font-size: 20px; font-weight: 600; line-height: 1;
  letter-spacing: 1.5px;
  color: var(--fg);
}
.brand-tag {
  font-size: 11px; color: var(--muted);
  margin-top: 4px; font-style: italic;
  letter-spacing: 0.5px;
}
.today-pill {
  display: inline-flex; gap: 6px; align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-soft);
  font-style: italic;
}

/* ---------- tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 14px 18px 0;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.tab {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0.5px;
  border-radius: 12px 12px 0 0;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  position: relative;
  transition: color 200ms ease;
}
.tab:hover { color: var(--fg-soft); }
.tab.active { color: var(--gold); }
.tab.active::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--gold);
}
.tab .ico { width: 18px; height: 18px; }

/* ---------- panels ---------- */
main { padding: 28px 0 100px; }
.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: fadeUp 350ms cubic-bezier(.2, .8, .2, 1);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- HERO: imagem de fundo + dark glass overlay ---------- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 40px 32px 36px;
  margin-bottom: 24px;
  color: var(--fg);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
  /* deixa o hero ajustar à oração — orações curtas não ficam com espaço morto */
  background-color: var(--bg-soft);
  animation: heroIn 600ms cubic-bezier(.2,.8,.2,1);
}

/* camada da pintura, escurecida e dessaturada um pouco para texto legível */
.hero > .hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--hero-img, linear-gradient(135deg, #1c1b3d, #5b5fc7));
  background-size: cover;
  background-position: center;
  filter: brightness(0.45) saturate(0.85);
}
@keyframes heroIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

/* sobreposição escura pra texto ficar 100% legível em qualquer pintura */
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 110% 80% at 50% 50%, transparent 0%, rgba(12,10,31,0.55) 70%, rgba(12,10,31,0.92) 100%),
    linear-gradient(180deg, rgba(12,10,31,0.55) 0%, rgba(12,10,31,0.65) 100%);
}
/* (sem ornamento decorativo no canto) */

.hero-date {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 11px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  opacity: 0.85;
  color: var(--gold-soft);
  margin-bottom: 6px;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.1;
  margin: 6px 0 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--fg);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hero-origin {
  font-size: 14px; font-style: italic;
  opacity: 0.78;
  margin-bottom: 24px;
  color: var(--fg-soft);
}
.hero-body {
  font-size: clamp(16px, 4.3vw, 19px);
  white-space: pre-wrap;
  line-height: 1.85;
  color: var(--fg);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  font-family: 'Spectral', Georgia, serif;
}
.hero-body::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6em;
  color: var(--gold);
  line-height: 1;
  margin-right: 2px;
  font-weight: 700;
}
.hero-actions {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* ---------- buttons ---------- */
.btn {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  padding: 13px 22px;
  font-size: 14px;
  min-height: 46px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 90ms ease, filter 150ms ease, background 150ms ease, box-shadow 200ms ease;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0.6px;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .ico { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, #2cd66f, #1ea957);
  color: #04240f;
  box-shadow: 0 8px 24px -8px rgba(37, 211, 102, 0.55), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 12px 28px -8px rgba(37, 211, 102, 0.7), inset 0 1px 0 rgba(255,255,255,0.3); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.10);
  color: var(--fg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold), var(--gold-deep));
  color: #2c1a00;
  box-shadow: 0 6px 20px -6px rgba(240, 198, 116, 0.55), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-gold:hover { filter: brightness(1.08); }

.btn-pray {
  background: rgba(255, 255, 255, 0.12);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  backdrop-filter: var(--glass-blur);
}
.btn-pray.done {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2c1a00;
  border-color: var(--gold);
  box-shadow: 0 0 30px -4px var(--gold);
}

/* ---------- cards (glass) ---------- */
.card {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.card h2 {
  margin: 0 0 6px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 1px;
  font-weight: 600;
}
.card h3 {
  font-size: 16px;
  color: var(--fg);
  margin: 16px 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0.5px;
}
.card .muted {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 16px;
  font-style: italic;
}
.card .muted.small { font-size: 12px; }

/* ---------- streak ---------- */
.streak-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(240,198,116,0.08), rgba(255,255,255,0.05));
}
.streak-flame {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffe19a, #f0c674 50%, #b8902a 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: #2c1a00;
  box-shadow:
    0 0 30px -2px var(--gold),
    0 8px 20px -6px rgba(240, 198, 116, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: flicker 2.5s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { box-shadow: 0 0 30px -2px var(--gold), 0 8px 20px -6px rgba(240,198,116,0.55), inset 0 1px 0 rgba(255,255,255,0.5); }
  50%      { box-shadow: 0 0 42px 0 var(--gold-soft), 0 10px 24px -4px rgba(240,198,116,0.7), inset 0 1px 0 rgba(255,255,255,0.6); }
}
.streak-num {
  font-size: 32px;
  font-weight: 600;
  color: var(--gold);
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.1;
}
.streak-num span:last-child {
  font-size: 13px;
  color: var(--muted);
  font-weight: normal;
  font-family: 'Spectral', serif;
  font-style: italic;
  letter-spacing: 0.5px;
}
.streak-label {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  margin-top: 2px;
}

/* ---------- catálogo ---------- */
.filter-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  -webkit-overflow-scrolling: touch;
}
.pill {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 150ms ease;
}
.pill:hover { color: var(--fg-soft); border-color: var(--border-strong); }
.pill.active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2c1a00;
  border-color: var(--gold);
  box-shadow: 0 0 20px -4px var(--gold);
}

.prayer-list { display: grid; gap: 10px; }
.prayer-item {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  transition: transform 120ms ease, border-color 150ms ease, background 150ms ease;
}
.prayer-item:hover {
  border-color: rgba(240, 198, 116, 0.4);
  background: var(--surface-strong);
  transform: translateY(-2px);
}
.prayer-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold) 50%, var(--gold-deep) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #2c1a00;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px var(--gold), inset 0 1px 0 rgba(255,255,255,0.4);
}
.prayer-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.prayer-meta {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 3px;
}
.prayer-arrow {
  color: var(--gold);
  font-size: 22px;
  font-family: 'Playfair Display', Georgia, serif;
}

/* ---------- histórico ---------- */
.history-list { display: grid; gap: 8px; }
.history-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.history-row:hover { border-color: var(--border-strong); background: var(--surface-strong); }
.history-row.today {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(240,198,116,0.10), var(--surface));
  box-shadow: 0 0 24px -6px var(--gold);
}
.history-date {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.history-row.today .history-date { color: var(--gold); }
.history-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
  letter-spacing: 0.3px;
}
.history-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--dim);
  font-size: 14px;
  border: 1px solid var(--border);
}
.history-check.done {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2c1a00;
  border-color: var(--gold);
  box-shadow: 0 0 16px -4px var(--gold);
}

/* ---------- santo do dia ---------- */
.saint-card {
  position: relative;
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-md);
  background:
    linear-gradient(180deg, rgba(12,10,31,0.30) 0%, rgba(12,10,31,0.85) 100%),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Saint_Francis_in_Ecstasy_-_Francisco_de_Zurbar%C3%A1n.jpg?width=1600");
  background-size: cover;
  background-position: center;
  color: var(--fg);
}
/* (sem ornamento decorativo no canto) */
.saint-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 6vw, 32px);
  color: var(--gold-soft);
  margin: 8px 0 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.saint-note {
  color: var(--fg-soft);
  font-style: italic;
  font-size: 15px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(8, 6, 22, 0.75);
  backdrop-filter: blur(12px) saturate(150%);
  z-index: 80;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: env(safe-area-inset-top, 0) 0 0;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(720px, 100%);
  margin: 24px 14px;
  background: linear-gradient(180deg, rgba(20,19,42,0.95), rgba(12,10,31,0.98));
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: pop 250ms cubic-bezier(.2,.8,.2,1);
}
@keyframes pop {
  from { transform: scale(0.94) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 150ms ease;
}
.modal-close:hover { background: rgba(255,255,255,0.15); }
.modal h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 5vw, 28px);
  color: var(--gold);
  margin: 0 0 6px;
  padding-right: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.modal .origin {
  color: var(--muted);
  font-style: italic;
  font-size: 13px;
  margin-bottom: 18px;
}
.modal-body {
  white-space: pre-wrap;
  font-size: clamp(15px, 4vw, 17px);
  color: var(--fg-soft);
  line-height: 1.85;
  font-family: 'Spectral', Georgia, serif;
  max-height: 60vh;          /* fallback navegadores antigos */
  max-height: 60dvh;         /* dvh evita corte com a chrome bar do mobile */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.modal-body::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5em;
  color: var(--gold);
  font-weight: 700;
}
.modal-actions {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ---------- cross-link ---------- */
.cross-link {
  margin: 28px 0 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(240,198,116,0.08), rgba(110,111,206,0.10));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  backdrop-filter: var(--glass-blur);
}
.cross-link .label {
  display: block;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: 'Playfair Display', Georgia, serif;
}
.cross-link a {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.cross-link a:hover { color: var(--gold-soft); }

/* ---------- liturgia diária ---------- */
.liturgy-card { background: linear-gradient(135deg, rgba(240,198,116,0.08), rgba(110,111,206,0.06)); }
.liturgy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.liturgy-head h2 { margin: 4px 0 2px; font-size: 20px; }
.liturgy-eyebrow {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.btn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 150ms ease, transform 200ms ease;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--surface-strong); }
.btn-icon .ico { width: 18px; height: 18px; }
.liturgy-body { margin-top: 18px; animation: fadeUp 250ms ease; }
.liturgy-section + .liturgy-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.liturgy-section h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--gold-soft); font-size: 15px; margin: 0 0 6px;
  letter-spacing: 0.5px;
}
.liturgy-ref { font-style: italic; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.liturgy-text { white-space: pre-wrap; font-size: 15px; line-height: 1.75; color: var(--fg-soft); }
.liturgy-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
@media (max-width: 420px) {
  .liturgy-actions .btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
}

/* ---------- intenções ---------- */
.intent-card textarea {
  width: 100%; min-height: 80px;
  background: var(--bg-soft); color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: 'Spectral', Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 150ms ease, background 150ms ease;
}
.intent-card textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--card);
}
.actions-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- DEVOÇÕES ---------- */
.dev-menu {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 4px;
}
.dev-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  cursor: pointer;
  color: var(--fg);
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  transition: transform 120ms ease, border-color 150ms ease, background 150ms ease;
  min-height: 160px;
  backdrop-filter: var(--glass-blur);
}
.dev-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(240,198,116,0.4);
  background: var(--surface-strong);
}
.dev-tile-ico {
  font-size: 42px; line-height: 1;
  filter: drop-shadow(0 0 12px rgba(240,198,116,0.35));
}
.dev-tile-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px; color: var(--gold); font-weight: 600;
  letter-spacing: 0.5px;
}
.dev-tile-sub { font-size: 13px; color: var(--muted); font-style: italic; }

/* Player de devoção (fluxo passo-a-passo) */
.dev-player {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--glass-blur);
}
.dev-player-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.dev-player-info { min-width: 0; }
.dev-player-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600; color: var(--gold); font-size: 17px;
  letter-spacing: 0.3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dev-player-sub { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }
.dev-progress {
  height: 4px; background: var(--bg-soft); border-radius: 2px;
  overflow: hidden; margin-bottom: 18px;
}
.dev-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-soft));
  transition: width 300ms ease;
}
.dev-step-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 22px;
  margin-bottom: 18px;
  min-height: 220px;
}
.dev-step-eyebrow {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 8px;
}
.dev-step-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--fg); font-size: clamp(22px, 5.5vw, 30px);
  margin: 4px 0 8px; font-weight: 600;
}
.dev-step-ref {
  font-style: italic; color: var(--muted);
  font-size: 13px; margin-bottom: 12px;
}
.dev-step-body {
  font-family: 'Spectral', Georgia, serif;
  white-space: pre-wrap;
  font-size: clamp(15px, 4vw, 17px);
  line-height: 1.8;
  color: var(--fg-soft);
}
.dev-step-counter {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #2c1a00;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600; font-size: 14px;
  letter-spacing: 0.5px;
}
.dev-controls {
  display: flex; gap: 10px; justify-content: space-between;
}
.dev-controls .btn { flex: 1 1 50%; justify-content: center; }
.dev-controls .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- catálogo: favoritos ---------- */
.prayer-fav {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dim);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.prayer-fav svg { width: 18px; height: 18px; }
.prayer-fav:hover { color: var(--gold-soft); border-color: var(--border-strong); }
.prayer-fav.on {
  color: var(--gold);
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  box-shadow: 0 0 12px -2px var(--gold);
}

/* ajusta layout do prayer-item pra acomodar o favorito sem espremer o título */
.prayer-item { grid-template-columns: auto 1fr auto; }

/* ---------- botão Ouvir (Web Speech) ---------- */
.btn[data-listening="1"] {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2c1a00;
  animation: speakPulse 1.6s ease-in-out infinite;
}
@keyframes speakPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,198,116,0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(240,198,116,0); }
}

/* ---------- ads ---------- */
/* Estratégia: NÃO reservar espaço quando o anúncio não estiver preenchido.
 * Assim, enquanto AdSense estiver "em análise" ou um anúncio específico não
 * tiver fill, o slot é totalmente recolhido — usuário vê só conteúdo. */
.ad-slot {
  margin: 0;
  text-align: center;
}
.ad-slot ins { width: 100%; }
.ad-banner { margin: 0; }

/* Mostra wrapper só quando há um ad EFETIVAMENTE preenchido pelo AdSense.
 * data-ad-status="filled" é setado pelo script do AdSense quando há ad. */
.ad-slot:has(ins[data-ad-status="filled"]) {
  margin: 18px 0;
  min-height: 90px;
  background: rgba(255,255,255,0.015);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.ad-rectangle:has(ins[data-ad-status="filled"]) { min-height: 250px; }
.ad-banner:has(ins[data-ad-status="filled"]) { margin: 8px 0 18px; }

/* Esconde individualmente ad sem fill ou ainda não processado */
.ad-slot ins:not([data-ad-status]),
.ad-slot ins[data-ad-status="unfilled"] {
  display: none !important;
}

/* Sticky mobile — só aparece quando preenchido */
.ad-sticky-mobile {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(12,10,31,0.95);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  z-index: 40;
  padding: 0;
  display: none;
}
.ad-sticky-mobile:has(ins[data-ad-status="filled"]) {
  display: block;
  padding: 4px 8px;
  padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 760px) {
  main { padding-bottom: env(safe-area-inset-bottom, 0px); }
  /* Se houver ad sticky preenchido, adiciona espaço pra ele */
  body:has(.ad-sticky-mobile ins[data-ad-status="filled"]) main {
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  }
}
@media (display-mode: standalone) {
  .ad-sticky-mobile { display: none !important; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 50px;
  margin-top: 30px;
  text-align: center;
}
.site-footer p {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  margin: 4px 0;
}
.footer-ornament {
  color: var(--gold);
  font-size: 20px;
  margin: 0 0 10px !important;
  text-shadow: 0 0 16px var(--gold);
  font-style: normal !important;
}

/* ---------- responsivo ---------- */
@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .hero { padding: 28px 20px 24px; border-radius: 22px; }
  .hero-title { font-size: clamp(26px, 7.5vw, 36px); }
  .hero-actions .btn { flex: 1 1 calc(50% - 5px); justify-content: center; padding: 12px 14px; }
  .header-row { padding: 12px 14px; }
  .today-pill { display: none; }
  .card { padding: 20px; border-radius: 14px; }
  .saint-card { padding: 28px 22px; }
  .history-row { grid-template-columns: minmax(60px, 22%) 1fr auto; gap: 10px; padding: 12px 14px; }
  .history-row.today { padding: 14px; }
  .modal { margin: 12px; padding: 26px 20px 22px; border-radius: 22px; }
  .streak-flame { width: 56px; height: 56px; font-size: 26px; }
  .streak-num { font-size: 28px; }
  .filter-row { gap: 6px; }
  .pill { padding: 8px 14px; font-size: 12px; }
  .prayer-item { padding: 14px; gap: 12px; }
  .cross-link { padding: 14px 16px; margin: 22px 0 12px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 17px; }
  .tab { padding: 11px 13px; font-size: 13px; }
  /* botões do hero em coluna única — evita o "2+1" desbalanceado */
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { flex: 1 1 100%; width: 100%; }
  .hero-date { letter-spacing: 2.5px; font-size: 10px; }
  /* catálogo: ícone + nome + favorito (sem seta) */
  .prayer-item { grid-template-columns: auto 1fr auto; gap: 10px; }
  .prayer-arrow { display: none; }
  /* devoções: tiles em coluna única */
  .dev-menu { grid-template-columns: 1fr; }
  .dev-tile { padding: 22px 18px; min-height: 130px; }
  /* devoções player: controls em 2 colunas, header simplificado */
  .dev-player { padding: 16px; border-radius: 18px; }
  .dev-player-title { font-size: 15px; }
  .dev-step-card { padding: 20px 16px; min-height: 200px; }
  /* liturgia: header sem padding lateral extra */
  .liturgy-head h2 { font-size: 18px; }
  .liturgy-section h3 { font-size: 14px; }
  /* intenções */
  .intent-card textarea { font-size: 16px; padding: 10px 12px; }
}

@media (max-width: 340px) {
  .tab .tab-label { display: none; }
  .tab { padding: 12px 12px; }
  .container { padding: 0 10px; }
  .hero { padding: 22px 16px 22px; }
}

/* Mobile landscape (telas baixas): compacta verticalmente */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { padding-bottom: 0; }
  .header-row { padding: 8px 14px; }
  .logo-mark { width: 38px; height: 38px; }
  .brand-tag { display: none; }
  main { padding: 14px 0 80px; }
  .hero { padding: 22px 24px; }
  .hero-title { margin: 4px 0; }
  .hero-origin { margin-bottom: 14px; }
  .hero-actions { margin-top: 16px; }
  .modal { margin: 10px auto; }
  .modal-body { max-height: 50dvh; }
}

/* PWA */
@media (display-mode: standalone) {
  main { padding-bottom: env(safe-area-inset-bottom, 0) !important; }
}

/* Acessibilidade: reduz movimento se solicitado */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================================
 * NOVAS FEATURES — header actions, situações, sequência, vela, intenções,
 * configurações, badge litúrgico, light mode.
 * ===================================================================== */

/* ---------- header actions ---------- */
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-icon { width: 38px; height: 38px; }

/* botões pequenos */
.btn-sm { padding: 9px 16px; min-height: 38px; font-size: 13px; }

/* ---------- badge litúrgico ---------- */
.liturgical-badge {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  margin: 0 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: var(--glass-blur);
}
.liturgical-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px -2px currentColor, inset 0 0 0 2px rgba(255,255,255,0.18);
}
.liturgical-dot-sm { width: 12px; height: 12px; }
.liturgical-eyebrow {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.liturgical-feast {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px; color: var(--fg); font-weight: 600; line-height: 1.2;
  margin-top: 2px;
}

/* ---------- streak: corpo expandido (tempo total) ---------- */
.streak-card { grid-template-columns: auto 1fr; }
.streak-body { min-width: 0; }
.streak-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* ---------- situações ---------- */
.situations-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 14px;
}
.situation-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 16px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  color: var(--fg);
  font-family: inherit;
  transition: transform 120ms ease, border-color 150ms ease, background 150ms ease;
  min-height: 90px;
}
.situation-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(240,198,116,0.4);
  background: var(--surface-strong);
}
.situation-emoji { font-size: 22px; line-height: 1; }
.situation-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.3px;
}
.situation-blurb {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
}

/* ---------- sequência (novena/tríduo) ---------- */
.seq-active-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.seq-active-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--gold);
  letter-spacing: 0.3px;
}
.seq-active-sub {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}
.seq-progress {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 0 6px;
}
.seq-progress-bar {
  flex: 1; height: 6px;
  background: var(--bg-soft);
  border-radius: 3px; overflow: hidden;
  border: 1px solid var(--border);
}
.seq-progress-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-soft));
  transition: width 350ms ease;
}
.seq-dots { display: flex; gap: 4px; }
.seq-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--border);
}
.seq-dot.done {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px -2px var(--gold);
}

/* ---------- intenções (lista) ---------- */
.intent-input-row {
  display: flex; gap: 8px; margin-top: 10px;
}
.intent-input-row input {
  flex: 1; min-width: 0;
  background: var(--bg-soft); color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: 'Spectral', Georgia, serif;
  font-size: 15px;
  transition: border-color 150ms ease;
}
.intent-input-row input:focus { outline: none; border-color: var(--gold); }
.intent-list { display: grid; gap: 8px; margin-top: 14px; }
.intent-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 150ms ease, border-color 150ms ease;
}
.intent-row:hover { background: var(--surface-strong); }
.intent-row.answered { opacity: 0.65; }
.intent-row.answered .intent-text { text-decoration: line-through; color: var(--muted); }
.intent-check {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dim);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 150ms ease;
  flex-shrink: 0;
}
.intent-check .ico { width: 16px; height: 16px; }
.intent-check:hover { color: var(--gold-soft); border-color: var(--gold-soft); }
.intent-row.answered .intent-check {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2c1a00; border-color: var(--gold);
}
.intent-text {
  font-family: 'Spectral', Georgia, serif;
  font-size: 15px; color: var(--fg-soft); line-height: 1.4;
  word-break: break-word;
}
.intent-date {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.intent-delete {
  width: 28px; height: 28px; border-radius: 50%;
  background: transparent; border: 0; color: var(--dim); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 150ms ease;
  flex-shrink: 0;
}
.intent-delete:hover { color: var(--rose); }
.intent-delete .ico { width: 14px; height: 14px; }

/* ---------- modo guiado do devotion player ---------- */
#devGuidedBtn.on {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2c1a00; border-color: var(--gold);
  animation: speakPulse 1.6s ease-in-out infinite;
}

/* ---------- MODO VELA ACESA ---------- */
.candle-mode {
  position: fixed; inset: 0;
  z-index: 200;
  background: radial-gradient(ellipse at 50% 65%, #2a1408 0%, #0a0608 60%, #000 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  padding: env(safe-area-inset-top, 24px) 24px env(safe-area-inset-bottom, 24px);
  color: #f6f0e0;
  animation: fadeUp 400ms ease;
}
.candle-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px)); right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #f6f0e0; cursor: pointer;
  font-size: 22px;
}
.candle-flame-wrap {
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.candle-flame {
  position: relative;
  width: 36px; height: 70px;
  transform-origin: 50% 90%;
  animation: candleSway 3.5s ease-in-out infinite;
}
.candle-flame-inner {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 60%, #ffd86b 0%, #ff8c2a 40%, #b8323a 80%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  filter: blur(1px);
  animation: candleFlicker 0.25s ease-in-out infinite alternate;
}
.candle-flame-glow {
  position: absolute;
  width: 250px; height: 250px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 50%, rgba(255,180,80,0.45) 0%, rgba(255,140,42,0.10) 35%, transparent 70%);
  pointer-events: none;
  animation: candleGlow 3s ease-in-out infinite alternate;
}
.candle-body {
  width: 60px;
  height: 220px;
  margin-top: -2px;
  background: linear-gradient(180deg, #f6e9c4 0%, #d4b87a 40%, #a07a30 100%);
  border-radius: 12px 12px 18px 18px;
  position: relative;
  box-shadow:
    inset 0 0 30px rgba(0,0,0,0.3),
    inset 8px 0 12px rgba(255,255,255,0.15),
    0 20px 60px -10px rgba(255, 140, 42, 0.4);
}
.candle-body::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: radial-gradient(ellipse, #5a3a10, #3a2008);
  border-radius: 12px 12px 0 0;
}
@keyframes candleSway {
  0%, 100% { transform: rotate(-2deg) scaleY(1); }
  50%      { transform: rotate(2deg) scaleY(1.05); }
}
@keyframes candleFlicker {
  0%   { opacity: 0.95; transform: scale(1, 0.98); }
  100% { opacity: 1;    transform: scale(1.02, 1.04); }
}
@keyframes candleGlow {
  0%   { opacity: 0.7; transform: translate(-50%, -50%) scale(0.95); }
  100% { opacity: 1;   transform: translate(-50%, -50%) scale(1.05); }
}
.candle-info { text-align: center; max-width: 520px; }
.candle-prayer-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 600;
  color: #ffd86b;
  letter-spacing: 0.5px;
  text-shadow: 0 0 20px rgba(255, 180, 80, 0.5);
  margin-bottom: 8px;
}
.candle-timer {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  color: #f6f0e0;
  letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(255, 180, 80, 0.4);
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
}
.candle-hint {
  font-size: 14px;
  color: rgba(246, 240, 224, 0.7);
  font-style: italic;
  letter-spacing: 0.5px;
}
.candle-controls {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.candle-controls .btn-ghost {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: #f6f0e0;
}

/* ---------- settings ---------- */
.settings-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.settings-section:first-of-type { margin-top: 18px; }
.settings-section h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--gold);
  font-size: 15px;
  margin: 0 0 6px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.settings-section .actions-row { margin-top: 10px; align-items: center; }
.settings-section input[type="time"] {
  background: var(--bg-soft); color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit; font-size: 15px;
  color-scheme: dark;
}
:root[data-theme-pref="light"] .settings-section input[type="time"] { color-scheme: light; }

.theme-toggle {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-top: 10px;
}
.theme-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  border-radius: 999px;
  transition: all 150ms ease;
}
.theme-btn:hover { color: var(--fg); }
.theme-btn.active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2c1a00;
  box-shadow: 0 0 12px -2px var(--gold);
}

/* ---------- LIGHT MODE ---------- */
@media (prefers-color-scheme: light) {
  :root[data-theme-pref="auto"] {
    --bg: #f4ecd8;
    --bg-soft: #e9dec1;
    --surface: rgba(0, 0, 0, 0.05);
    --surface-strong: rgba(0, 0, 0, 0.08);
    --border: rgba(0, 0, 0, 0.10);
    --border-strong: rgba(0, 0, 0, 0.18);
    --fg: #1f1a0e;
    --fg-soft: #3a3220;
    --muted: #6b5e42;
    --dim: #9a8a64;
    --gold: #a67c1a;
    --gold-soft: #c89530;
    --gold-deep: #6a4a08;
  }
  :root[data-theme-pref="auto"] body {
    background:
      radial-gradient(ellipse 80% 50% at 50% -20%, rgba(166, 124, 26, 0.10), transparent 60%),
      radial-gradient(ellipse 60% 50% at 100% 80%, rgba(166, 124, 26, 0.05), transparent 60%),
      var(--bg);
  }
  :root[data-theme-pref="auto"] body::after { opacity: 0.06; mix-blend-mode: multiply; }
  :root[data-theme-pref="auto"] .site-header {
    background: rgba(244, 236, 216, 0.85);
  }
}
:root[data-theme-pref="light"] {
  --bg: #f4ecd8;
  --bg-soft: #e9dec1;
  --surface: rgba(0, 0, 0, 0.05);
  --surface-strong: rgba(0, 0, 0, 0.08);
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.18);
  --fg: #1f1a0e;
  --fg-soft: #3a3220;
  --muted: #6b5e42;
  --dim: #9a8a64;
  --gold: #a67c1a;
  --gold-soft: #c89530;
  --gold-deep: #6a4a08;
}
:root[data-theme-pref="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(166, 124, 26, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 80%, rgba(166, 124, 26, 0.05), transparent 60%),
    var(--bg);
}
:root[data-theme-pref="light"] body::after { opacity: 0.06; mix-blend-mode: multiply; }
:root[data-theme-pref="light"] .site-header { background: rgba(244, 236, 216, 0.85); }
/* hero permanece com texto claro porque tem imagem escurecida atrás */
:root[data-theme-pref="light"] .hero,
:root[data-theme-pref="light"] .hero-title,
:root[data-theme-pref="light"] .hero-body,
:root[data-theme-pref="light"] .hero-origin,
:root[data-theme-pref="light"] .hero-date { color: #f6f0e0; }

/* ---------- responsivo ---------- */
@media (max-width: 420px) {
  .situations-grid { grid-template-columns: repeat(2, 1fr); }
  .candle-timer { font-size: 40px; }
  .candle-body { height: 180px; width: 50px; }
  .seq-active-row { flex-wrap: wrap; }
}
