/* ==========================================================================
   LAMPADE ACCESE — Foglio di Stile Ufficiale
   Design moderno, tipografico, spirituale ed elegante
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500;1,9..144,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- VARIABILI E PALETTE COLORI ---------- */
:root {
  --ivory: #fbf7ee;
  --ivory-2: #f2e8d5;
  --ivory-card: #fffefb;
  --ink: #2b2319;
  --ink-soft: #5e4f3f;
  --ink-muted: #857460;
  --amber: #c48b28;
  --amber-deep: #8f5f19;
  --amber-light: #fbebd0;
  --gold-line: #dfc89e;
  --gold-glow: rgba(224, 163, 47, 0.35);
  --white: #ffffff;
  --shadow-sm: 0 4px 12px rgba(60, 40, 20, 0.05);
  --shadow: 0 10px 30px rgba(60, 40, 20, 0.08);
  --shadow-lg: 0 18px 45px rgba(60, 40, 20, 0.14);
  --radius-sm: 8px;
  --radius: 18px;
  --radius-lg: 26px;
  --wash: color-mix(in srgb, var(--ivory) 92%, transparent);
  --wash-soft: color-mix(in srgb, var(--ivory) 86%, transparent);
  --liturgical-color: #2e6b3e; /* default verde */
  --font-base-scale: 1rem;
  color-scheme: light;
  transition: background-color 0.4s ease, color 0.4s ease;
}

:root[data-theme="night"] {
  --ivory: #16120c;
  --ivory-2: #231c13;
  --ivory-card: #1c160f;
  --ink: #f7efe1;
  --ink-soft: #d1c0a2;
  --ink-muted: #968367;
  --amber: #f2ba52;
  --amber-deep: #ffd37a;
  --amber-light: #382813;
  --gold-line: #473722;
  --gold-glow: rgba(242, 186, 82, 0.6);
  --white: #241d14;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 22px 55px rgba(0, 0, 0, 0.75);
  --wash: color-mix(in srgb, var(--ivory) 92%, transparent);
  --wash-soft: color-mix(in srgb, var(--ivory) 86%, transparent);
  color-scheme: dark;
}

/* Gestione Colori Liturgici */
[data-liturgical="verde"] { --liturgical-color: #2e6b3e; }
[data-liturgical="viola"] { --liturgical-color: #6a347e; }
[data-liturgical="bianco"], [data-liturgical="oro"] { --liturgical-color: #c48b28; }
[data-liturgical="rosso"] { --liturgical-color: #a82424; }

/* Dimensione Carattere Dinamica */
:root[data-font-size="small"] { --font-base-scale: 0.92rem; }
:root[data-font-size="normal"] { --font-base-scale: 1rem; }
:root[data-font-size="large"] { --font-base-scale: 1.14rem; }
:root[data-font-size="xlarge"] { --font-base-scale: 1.28rem; }

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-base-scale);
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--ivory);
  background-image:
    linear-gradient(180deg, var(--wash) 0%, var(--wash-soft) 40%, var(--wash) 100%),
    url('sfondo-seppia.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  line-height: 1.68;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, .serif {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.25;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--amber-deep);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: 'Inter', sans-serif;
}

/* ---------- BARRA DI LETTURA E HEADER SUPERIORE ---------- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--amber-deep));
  z-index: 1000;
  transition: width 0.1s ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--gold-line) 60%, transparent);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.site-header__flame {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header__flame svg {
  width: 100%;
  height: 100%;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-header__nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.site-header__nav-link:hover {
  background: var(--ivory-2);
  color: var(--ink);
  text-decoration: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.header-btn:hover {
  background: var(--ivory-2);
  transform: translateY(-1px);
}

/* ---------- INTERRUTTORE TEMA GIORNO / NOTTE ---------- */
.theme-switch {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.theme-switch__lamp {
  width: 52px;
  padding: 6px;
  margin-bottom: -6px;
  position: relative;
  cursor: pointer;
  touch-action: none;
}

.theme-switch__lamp::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(42, 100%, 65%, 0.6) 0%, transparent 70%);
  opacity: var(--on, 0);
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: -1;
}

:root[data-theme="night"] .theme-switch__lamp::before {
  inset: -40px;
  background: radial-gradient(circle, hsla(42, 100%, 75%, 0.85) 0%, hsla(38, 100%, 55%, 0.3) 45%, transparent 75%);
}

.theme-switch__lamp.is-on {
  --on: 1;
}

.theme-switch__label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- STRUTTURA SEZIONI ---------- */
.section {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 22px;
}

.section + .section {
  border-top: 1px solid var(--gold-line);
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  font-weight: 700;
  margin-bottom: 0.6em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.liturgical-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--liturgical-color) 12%, var(--ivory-card));
  border: 1px solid color-mix(in srgb, var(--liturgical-color) 35%, transparent);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.liturgical-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--liturgical-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--liturgical-color) 80%, transparent);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 32px;
  gap: 8px;
}

.hero__brand {
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.1em;
  text-shadow: 0 2px 10px rgba(180, 130, 40, 0.12);
}

.hero__subtitle {
  font-size: 1.18rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 1.4em;
  max-width: 520px;
}

.hero__date {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2em;
}

.hero__liturgical {
  font-size: 0.88rem;
  color: var(--amber-deep);
  margin-bottom: 1.6em;
  font-weight: 500;
}

.hero__lamp {
  width: 155px;
  margin: 0.2em auto 1.4em;
  filter: drop-shadow(0 6px 20px rgba(190, 140, 40, 0.15));
}

.hero__light-phrase {
  max-width: 520px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 auto 1.8em;
  line-height: 1.45;
  padding: 0 14px;
}

.hero__light-phrase small {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--amber-deep);
  font-weight: 600;
  display: inline-block;
  margin-top: 6px;
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fffaf0;
  background: linear-gradient(135deg, #d4952d, #8f5f19);
  border: none;
  padding: 16px 36px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(190, 130, 30, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(190, 130, 30, 0.5);
}

.hero__hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* Quick Pills in Hero */
.hero__quick-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 1.6em;
}

.quick-pill {
  background: color-mix(in srgb, var(--ivory-card) 90%, transparent);
  border: 1px solid var(--gold-line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-pill:hover {
  background: var(--ivory-2);
  color: var(--ink);
  transform: translateY(-1px);
}

/* ---------- LAMPADINA FISICA GSAP (toggle-scene) ---------- */
.lamp {
  --on: 0;
  --bg: transparent;
  --cord: hsl(30, 14%, 55%);
  --stroke: hsl(30, 18%, 38%);
  --shine: hsla(40, 100%, 95%, 0.75);
  --cap: hsl(30, 12%, 42%);
  --filament: hsl(45, 12%, 35%);
  display: block;
  cursor: pointer;
  touch-action: none;
}

.lamp.is-on {
  --on: 1;
  --cord: hsl(35, 35%, 45%);
  --stroke: hsl(35, 50%, 30%);
  --shine: hsla(48, 100%, 96%, 0.5);
  --cap: hsl(30, 40%, 28%);
  --filament: hsl(42, 100%, 68%);
}

.toggle-scene {
  overflow: visible;
  width: 100%;
  height: auto;
}

.toggle-scene__cord,
.toggle-scene__pull {
  transition: stroke 0.4s ease, fill 0.4s ease;
}

.toggle-scene__cord {
  stroke: var(--cord);
  stroke-width: 5;
  fill: none;
}

.toggle-scene__pull {
  fill: var(--cord);
  cursor: grab;
}

.toggle-scene__pull:active {
  cursor: grabbing;
}

.toggle-scene__hit-spot {
  fill: transparent;
  cursor: grab;
}

.bulb__filament {
  fill: none;
  stroke: var(--filament);
  stroke-linecap: round;
  stroke-width: 5;
  transition: stroke 0.4s ease;
}

.bulb__shine {
  fill: none;
  stroke: var(--shine);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 12;
  transition: stroke 0.4s ease;
}

.bulb__bulb {
  stroke: var(--stroke);
  stroke-linecap: round;
  stroke-width: 5;
  fill: hsla(42, 95%, 72%, calc(0.1 + (var(--on) * 0.65)));
  filter:
    drop-shadow(0 0 calc(var(--on) * 12px) hsla(42, 100%, 70%, 0.95))
    drop-shadow(0 0 calc(var(--on) * 30px) hsla(38, 100%, 60%, 0.65));
  transition: fill 0.4s ease, filter 0.4s ease, stroke 0.4s ease;
}

.bulb__cap {
  fill: var(--cap);
  stroke: var(--stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4.677;
  transition: fill 0.4s ease, stroke 0.4s ease;
}

.bulb__cap-shine {
  fill: var(--shine);
  opacity: 0.5;
}

/* ---------- NAVIGATORE TEMPORALE & CALENDARIO ---------- */
.time-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px auto 30px;
  padding: 8px 14px;
  max-width: 520px;
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.time-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.time-nav-btn:hover {
  background: var(--ivory-2);
  color: var(--ink);
}

.time-nav-btn.is-active {
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(180, 120, 30, 0.3);
}

.time-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- MEDAGLIONI ICONE ---------- */
.section-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.2em;
}

.section-title-row h2 {
  margin: 0;
  font-size: 1.65rem;
}

.medallion {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold-line);
  box-shadow: var(--shadow);
  background: var(--ivory-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.medallion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.3);
}

/* ---------- LA PAROLA DI OGGI ---------- */
.reading-block {
  margin-bottom: 2.4em;
}

.reading__ref {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--amber-deep);
  font-weight: 700;
  margin-bottom: 0.3em;
}

.reading__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6em;
  font-style: italic;
}

.reading__text {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-line;
}

.reading__psalm-refrain {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 600;
  color: var(--amber-deep);
  background: var(--ivory-2);
  padding: 14px 18px;
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  margin-bottom: 1em;
}

.reading--gospel {
  padding: 32px 28px;
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.reading--gospel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--amber), var(--amber-deep), var(--amber));
}

.reading--gospel blockquote {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  line-height: 1.65;
  margin: 0 0 1.2em;
  white-space: pre-line;
}

/* ---------- LETTORE VOCALE INTEGRATO (TTS & AUDIO) ---------- */
.vocal-player-card {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--ivory-2);
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vocal-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.vocal-player-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.vocal-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vocal-btn {
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.vocal-btn:hover {
  background: var(--amber-light);
  border-color: var(--amber);
  color: var(--ink);
}

.vocal-btn.is-playing {
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #ffffff;
  border-color: transparent;
}

.vocal-speed-select {
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.vocal-status-text {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Evidenziazione testo in lettura */
.highlight-reading {
  background-color: hsla(42, 100%, 75%, 0.4);
  border-radius: 4px;
  box-shadow: 0 0 6px hsla(42, 100%, 70%, 0.5);
  transition: background-color 0.3s ease;
}

/* ---------- FRASE-LUCE CARD & GENERATORE IMMAGINE ---------- */
.light-card {
  text-align: center;
  padding: 44px 32px;
  background: linear-gradient(160deg, var(--ivory-card), var(--ivory-2));
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.light-card__decor {
  font-family: 'Fraunces', serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--amber);
  opacity: 0.4;
  margin-bottom: -15px;
}

.light-card__quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  line-height: 1.4;
  margin-bottom: 0.6em;
  color: var(--ink);
}

.light-card__ref {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--amber-deep);
  margin-bottom: 1.6em;
}

.light-card__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  text-decoration: none;
}

.action-btn:hover {
  background: var(--ivory-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.action-btn--primary {
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #ffffff;
  border-color: transparent;
}

.action-btn--primary:hover {
  background: linear-gradient(135deg, #d4952d, #7c4f14);
  color: #ffffff;
}

/* ---------- OMELIA (UNA LUCE SULLA PAROLA) ---------- */
.homily blockquote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.6;
  border-left: 4px solid var(--amber);
  padding: 4px 0 4px 22px;
  margin: 0 0 1.2em;
  color: var(--ink);
}

.homily__meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1em;
}

.homily__full-text {
  margin-top: 14px;
  padding: 18px 22px;
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ---------- SANTO DEL GIORNO ---------- */
.saint {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.saint__bio {
  flex: 1;
}

.saint__spark {
  margin-top: 1.4em;
  padding: 18px 22px;
  background: var(--ivory-2);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.08rem;
}

.saint__spark strong {
  display: block;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-deep);
  margin-bottom: 6px;
}

/* ---------- DALLA PAROLA ALLA VITA & DOMANDA ---------- */
.callout {
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  background: var(--ivory-card);
  box-shadow: var(--shadow);
  font-size: 1.05rem;
}

.callout-interactive {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.action-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--amber);
  cursor: pointer;
  margin-top: 4px;
}

.callout--question {
  background: var(--ivory-2);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.15rem;
}

/* Diario Personale */
.spiritual-journal-box {
  margin-top: 20px;
  padding: 20px;
  background: var(--ivory-card);
  border: 1px dashed var(--gold-line);
  border-radius: var(--radius);
}

.spiritual-journal-box textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: var(--ivory);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  margin-bottom: 10px;
}

.spiritual-journal-box textarea:focus {
  outline: 2px solid var(--amber);
}

/* ---------- MODALITÀ 3 MINUTI ---------- */
.three-min {
  text-align: center;
}

.three-min__toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  margin: 0 auto;
  padding: 14px;
}

.three-min__lamp {
  width: 44px;
}

.mini-lamp__glass {
  fill: hsla(42, 95%, 72%, calc(0.1 + (var(--on) * 0.65)));
  stroke: var(--stroke);
  stroke-width: 2.4;
  filter:
    drop-shadow(0 0 calc(var(--on) * 8px) hsla(42, 100%, 70%, 0.95))
    drop-shadow(0 0 calc(var(--on) * 16px) hsla(38, 100%, 60%, 0.6));
  transition: fill 0.4s ease, filter 0.4s ease, stroke 0.4s ease;
}

.mini-lamp__filament {
  stroke: var(--filament);
  stroke-width: 2;
  transition: stroke 0.4s ease;
}

.mini-lamp__cap {
  fill: var(--cap);
  stroke: var(--stroke);
  stroke-width: 2;
  transition: fill 0.4s ease, stroke 0.4s ease;
}

.three-min__label {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.three-min__hint {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.three-min__panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.5s ease;
  margin-top: 0;
  text-align: left;
}

.three-min__panel.is-open {
  max-height: 1200px;
  opacity: 1;
  margin-top: 28px;
}

.three-min__inner {
  padding: 28px;
  background: var(--ivory-card);
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.three-min__item h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-deep);
  margin-bottom: 0.3em;
}

.three-min__item p {
  margin: 0;
  font-size: 1rem;
}

/* ---------- PREGHIERA FINALE ---------- */
.prayer {
  text-align: center;
}

.prayer__text {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-style: italic;
  max-width: 580px;
  margin: 0 auto 1.2em;
  line-height: 1.6;
}

.prayer__amen {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  font-size: 1.1rem;
}

/* ---------- SPAZIO DI PREGHIERA & SANTO ROSARIO ---------- */
.prayer-tabs-container {
  margin-top: 32px;
}

.prayer-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.prayer-tab-btn {
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  color: var(--ink-soft);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prayer-tab-btn.is-active {
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.prayer-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.prayer-tab-content.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Contatore Santo Rosario */
.rosary-card {
  padding: 28px;
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.rosary-mysteries-title {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  color: var(--amber-deep);
  margin-bottom: 0.4em;
}

.rosary-decade-box {
  margin: 20px 0;
  padding: 16px;
  background: var(--ivory-2);
  border-radius: var(--radius-sm);
}

.rosary-beads {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.bead {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gold-line);
  background: var(--ivory);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all 0.2s ease;
}

.bead.is-done {
  background: var(--amber);
  border-color: var(--amber-deep);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--gold-glow);
}

.rosary-nav-decades {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

/* Accordion Preghiere Tradizionali */
.accordion-prayer {
  margin-bottom: 12px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  background: var(--ivory-card);
  overflow: hidden;
}

.accordion-prayer summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ivory-card);
  user-select: none;
}

.accordion-prayer summary::-webkit-details-marker {
  display: none;
}

.accordion-prayer summary::after {
  content: '▼';
  font-size: 0.75rem;
  color: var(--amber);
  transition: transform 0.2s ease;
}

.accordion-prayer[open] summary::after {
  transform: rotate(180deg);
}

.accordion-prayer .prayer-body {
  padding: 16px 20px;
  border-top: 1px solid var(--gold-line);
  background: var(--ivory-2);
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ---------- MODALI (CALENDARIO, CARD GENERATOR, PREFERITI) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--ivory-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.is-open .modal-dialog {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--ivory-2);
  border: 1px solid var(--gold-line);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--amber);
  color: #fff;
}

/* Calendario Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 16px;
  text-align: center;
}

.calendar-day-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber-deep);
  text-transform: uppercase;
  padding-bottom: 6px;
}

.calendar-day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.calendar-day-cell:hover {
  background: var(--amber-light);
  border-color: var(--amber);
}

.calendar-day-cell.is-selected {
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #ffffff;
  font-weight: 700;
}

/* Canvas Card Preview */
.canvas-card-preview {
  width: 100%;
  max-width: 380px;
  margin: 16px auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

/* ---------- TOAST NOTIFICHE ---------- */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--ivory);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notification.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------- FOOTER ---------- */
footer {
  padding: 56px 24px 88px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--gold-line);
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}

footer a {
  color: var(--amber-deep);
  font-weight: 500;
}

/* ---------- RESPONSIVE MEDIA QUERIES ---------- */
@media (max-width: 680px) {
  .site-header {
    padding: 8px 12px;
  }
  .site-header__nav {
    display: none;
  }
  .saint {
    flex-direction: column;
  }
  .section {
    padding: 44px 18px;
  }
  .hero {
    min-height: 82vh;
    padding: 36px 16px;
  }
  .light-card {
    padding: 32px 18px;
  }
  .modal-dialog {
    padding: 24px 16px;
  }
}

/* ---------- STAMPA OTTIMIZZATA (@media print) ---------- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .site-header,
  .theme-switch,
  .reading-progress-bar,
  .hero__lamp,
  .hero__cta-group,
  .hero__quick-pills,
  .time-nav-bar,
  .vocal-player-card,
  .light-card__actions,
  .prayer-tabs,
  .rosary-beads,
  .rosary-nav-decades,
  .spiritual-journal-box,
  .toast-notification,
  .modal-backdrop,
  footer ul {
    display: none !important;
  }
  .section {
    max-width: 100% !important;
    padding: 20px 0 !important;
    page-break-inside: avoid;
  }
  .reading--gospel, .light-card, .callout {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}


/* ---------- PLAYER AUDIO UFFICIALE VATICAN NEWS ---------- */
.vatican-audio-card {
  margin: 24px 0 32px;
  padding: 24px 26px;
  background: linear-gradient(145deg, var(--ivory-card), var(--ivory-2));
  border: 2px solid var(--amber);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.vatican-audio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #d4952d, #8f5f19, #d4952d);
}

.vatican-audio-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-deep);
  background: var(--ivory);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  margin-bottom: 12px;
}

.vatican-audio-badge span.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #e02424;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 36, 36, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(224, 36, 36, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 36, 36, 0); }
}

.vatican-audio-title {
  font-family: 'Fraunces', serif;
  font-size: 1.28rem;
  color: var(--ink);
  margin: 0 0 4px;
}

.vatican-audio-subtitle {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.vatican-custom-player {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vatican-player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.vatican-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #ffffff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(180, 120, 30, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.vatican-play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(180, 120, 30, 0.5);
}

.vatican-skip-btn {
  background: var(--ivory);
  border: 1px solid var(--gold-line);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vatican-skip-btn:hover {
  background: var(--ivory-2);
}

.vatican-timeline-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.vatican-time-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.vatican-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--ivory);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.vatican-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--amber-deep));
  border-radius: 999px;
  transition: width 0.1s linear;
}

.vatican-audio-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 6px;
  border-top: 1px dashed var(--gold-line);
  padding-top: 10px;
}
