/* ===========================
   VARIABLES Y RESET
=========================== */
:root {
  --blue-deep: #0B2147;
  --blue-mid: #1a3a8f;
  --gold: #D4A017;
  --gold-light: #f0c845;
  --gold-dark: #a07010;
  --cream: #FAF6F1;
  --text-dark: #1a1205;
  --text-mid: #3d3020;
  --text-light: #7a6a50;
  --red-liturgy: #8B1A1A;
  --green-liturgy: #2D5016;
  --white: #ffffff;
  --card-shadow: 0 2px 12px rgba(11,33,71,0.10);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 68px;
  --header-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .bible-text, .prayer-text, blockquote {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ===========================
   LAYOUT
=========================== */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

#main-content {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + 12px);
  min-height: 100vh;
}

/* ===========================
   HEADER
=========================== */
#main-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--blue-deep) 0%, #0d2a6e 100%);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.header-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.3px;
}

/* ===========================
   SPLASH SCREEN
=========================== */
.splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #070f2b 0%, #0B2147 50%, #0d1f4a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}
.splash.fade-out { opacity: 0; pointer-events: none; }
.splash.hidden { display: none; }

.splash-inner {
  text-align: center;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-cross {
  font-size: 80px;
  color: var(--gold);
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(212,160,23,0.6), 0 0 80px rgba(212,160,23,0.2);
  animation: pulse-cross 2.5s ease-in-out infinite;
}
@keyframes pulse-cross {
  0%, 100% { text-shadow: 0 0 40px rgba(212,160,23,0.6), 0 0 80px rgba(212,160,23,0.2); }
  50%       { text-shadow: 0 0 60px rgba(212,160,23,0.9), 0 0 120px rgba(212,160,23,0.4); }
}

.splash-title {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

.splash-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  margin: 0 0 44px;
  font-weight: 300;
}

.splash-btn {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #0B2147;
  border: none;
  border-radius: 50px;
  padding: 16px 52px;
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(212,160,23,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 1px;
}
.splash-btn:active { transform: scale(0.95); box-shadow: 0 4px 16px rgba(212,160,23,0.3); }

.splash-music-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 22px;
  letter-spacing: 0.5px;
}

/* ===========================
   BOTONES DE HEADER (COMPARTIR + MÚSICA)
=========================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-action {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
  color: var(--gold);
}
.btn-header-action:active { background: rgba(255,255,255,0.22); }
.btn-music-icon { font-size: 18px; line-height: 1; }
.btn-music.paused .btn-music-icon::after { content: ' ✕'; font-size: 10px; }

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--gold-light);
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); }
.icon-btn svg { width: 22px; height: 22px; }

/* ===========================
   SECTIONS
=========================== */
.section {
  display: none;
  padding: 16px 16px 8px;
  animation: fadeIn 0.25s ease;
}
.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 6px;
}

.section-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

.section-subtitle {
  font-size: 18px;
  color: var(--blue-deep);
  margin: 20px 0 10px;
}

.subsection-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-mid);
  margin: 14px 0 10px;
}

/* ===========================
   INICIO
=========================== */
.daily-verse-card {
  background: linear-gradient(135deg, var(--blue-deep), #1a3a8f);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 20px;
  color: white;
  position: relative;
  overflow: hidden;
}

.daily-verse-card::before {
  content: '✦';
  position: absolute;
  font-size: 80px;
  color: rgba(212,160,23,0.08);
  right: -10px;
  top: -10px;
}

.daily-verse-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 10px;
  font-family: 'Lato', sans-serif;
}

.daily-verse-text {
  font-size: 16px;
  line-height: 1.7;
  color: #f0f4ff;
  font-style: italic;
  margin-bottom: 10px;
}

.daily-verse-ref {
  font-size: 13px;
  color: var(--gold);
  text-align: right;
  font-weight: 700;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.quick-card {
  background: white;
  border: 1.5px solid rgba(11,33,71,0.08);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--card-shadow);
}

.quick-card:hover, .quick-card:active {
  background: var(--blue-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11,33,71,0.2);
}

.quick-card:hover .quick-label, .quick-card:active .quick-label {
  color: var(--gold);
}

.quick-icon { font-size: 24px; }

.quick-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.3;
}

.gospel-teaser {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
  margin-bottom: 8px;
}

.gospel-teaser-content {
  min-height: 60px;
  margin: 10px 0;
}

.gospel-teaser-ref {
  font-size: 13px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.gospel-teaser-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dark);
  font-style: italic;
}

.btn-link {
  background: none;
  border: none;
  color: var(--blue-mid);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}

/* ===========================
   BIBLIA
=========================== */
.bible-search-box {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bible-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bible-select {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid rgba(11,33,71,0.2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Lato', sans-serif;
  background: white;
  color: var(--text-dark);
  appearance: none;
  cursor: pointer;
}

.bible-input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid rgba(11,33,71,0.2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Lato', sans-serif;
  color: var(--text-dark);
  min-width: 0;
}

.bible-input:focus, .bible-select:focus {
  outline: none;
  border-color: var(--blue-mid);
}

.bible-sep {
  color: var(--text-light);
  font-size: 18px;
}

.btn-primary {
  width: 100%;
  background: var(--blue-deep);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--blue-mid); }

.btn-secondary {
  width: 100%;
  background: white;
  color: var(--blue-deep);
  border: 1.5px solid var(--blue-deep);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--blue-deep); color: white; }

.btn-icon { width: 18px; height: 18px; }

.quick-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.quick-search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid rgba(11,33,71,0.2);
  border-radius: 30px;
  font-size: 14px;
  font-family: 'Lato', sans-serif;
}
.quick-search-input:focus { outline: none; border-color: var(--blue-mid); }

.btn-icon-round {
  background: var(--blue-deep);
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bible-result {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
  min-height: 60px;
}

.bible-result:empty { display: none; }

.bible-result-ref {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bible-result-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 14px;
}

.bible-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
}

.verse-num {
  font-size: 11px;
  color: var(--gold-dark);
  font-weight: 700;
  vertical-align: super;
  margin-right: 3px;
  font-family: 'Lato', sans-serif;
}

.bible-translation {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
  text-align: right;
  font-style: italic;
}

.bible-popular {
  margin-bottom: 8px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: white;
  border: 1.5px solid rgba(11,33,71,0.15);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-deep);
  cursor: pointer;
  transition: all 0.2s;
}
.tag:hover { background: var(--blue-deep); color: white; border-color: var(--blue-deep); }

/* ===========================
   MOMENTOS
=========================== */
.moments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.moment-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px 14px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 4px solid var(--blue-mid);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.moment-card:hover, .moment-card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11,33,71,0.15);
}

.moment-card-emoji { font-size: 28px; }

.moment-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.moment-detail, .apol-detail, .prayer-detail, .study-detail, .rosario-content {
  animation: fadeIn 0.2s ease;
}

.moment-header {
  text-align: center;
  padding: 20px 0 16px;
  border-bottom: 1px solid rgba(11,33,71,0.08);
  margin-bottom: 16px;
}

.moment-header-emoji { font-size: 48px; margin-bottom: 8px; }

.moment-header-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 6px;
}

.moment-header-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

.verse-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 10px;
  border-left: 3px solid var(--gold);
}

.verse-card-ref {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.verse-card-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dark);
  font-style: italic;
  margin-bottom: 8px;
}

.verse-card-nota {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  font-style: normal;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 8px;
  margin-top: 4px;
}

/* ===========================
   APOLOGÉTICA
=========================== */
.apologetics-search {
  margin-bottom: 14px;
}

.apologetics-list { display: flex; flex-direction: column; gap: 10px; }

.apol-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.apol-card:hover, .apol-card:active {
  background: var(--blue-deep);
  transform: translateX(4px);
}
.apol-card:hover .apol-card-title, .apol-card:active .apol-card-title { color: white; }
.apol-card:hover .apol-card-cat, .apol-card:active .apol-card-cat { color: var(--gold); }
.apol-card:hover .apol-card-arrow, .apol-card:active .apol-card-arrow { color: var(--gold); }

.apol-card-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.apol-card-body { flex: 1; }

.apol-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.apol-card-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  transition: color 0.2s;
}

.apol-card-arrow {
  color: var(--text-light);
  font-size: 18px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.apol-detail-header {
  padding: 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(11,33,71,0.08);
}

.apol-detail-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.apol-detail-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.3;
  margin-bottom: 12px;
}

.apol-objecion {
  background: #fff5f5;
  border-left: 3px solid var(--red-liturgy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px;
  margin-bottom: 16px;
}

.apol-objecion-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--red-liturgy);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.apol-objecion-text {
  font-size: 14px;
  color: var(--red-liturgy);
  line-height: 1.6;
  font-style: italic;
}

.apol-respuesta {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.apol-respuesta strong, .apol-respuesta b {
  color: var(--blue-deep);
  font-weight: 700;
}

.apol-versiculos-list {
  background: rgba(11,33,71,0.04);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.apol-versiculos-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.apol-versiculo-tag {
  display: inline-block;
  background: var(--blue-deep);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  margin: 3px;
  cursor: pointer;
  transition: background 0.2s;
}
.apol-versiculo-tag:hover { background: var(--gold-dark); }

/* ===========================
   EVANGELIO DEL DÍA
=========================== */
.gospel-date-display {
  background: var(--blue-deep);
  color: white;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gospel-liturgical-date {
  font-size: 17px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--gold);
}

.gospel-civil-date {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.gospel-content {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 14px;
  min-height: 100px;
}

.gospel-season-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.season-Adviento { background: #3d006e; color: white; }
.season-Navidad { background: #fff5cc; color: #6b4a00; }
.season-Cuaresma { background: #4a006e; color: white; }
.season-Semana-Santa { background: #1a0000; color: #c0a0a0; }
.season-Pascua { background: #fff0cc; color: #6b4a00; }
.season-Ordinario { background: #e0f0e0; color: var(--green-liturgy); }

.gospel-ref-display {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gospel-text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-dark);
}

.gospel-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-nav {
  flex: 1;
  background: white;
  border: 1.5px solid rgba(11,33,71,0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-deep);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-nav:hover { background: var(--blue-deep); color: white; border-color: var(--blue-deep); }

.gospel-reflection {
  background: linear-gradient(135deg, #fffbe8, #fff5cc);
  border-radius: var(--radius);
  padding: 18px;
  border-left: 4px solid var(--gold);
  margin-bottom: 8px;
}

.gospel-reflection-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-dark);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.gospel-reflection-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dark);
  font-style: italic;
}

/* ===========================
   ORACIONES
=========================== */
.prayers-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: white;
  border-radius: 30px;
  padding: 4px;
  box-shadow: var(--card-shadow);
}

.prayer-tab {
  flex: 1;
  background: none;
  border: none;
  border-radius: 24px;
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.prayer-tab.active {
  background: var(--blue-deep);
  color: white;
}

.prayers-list { display: flex; flex-direction: column; gap: 10px; }

.prayer-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
}
.prayer-card:hover, .prayer-card:active {
  background: var(--blue-deep);
  transform: translateX(4px);
}
.prayer-card:hover .prayer-card-title, .prayer-card:active .prayer-card-title { color: white; }
.prayer-card:hover .prayer-card-sub, .prayer-card:active .prayer-card-sub { color: var(--gold); }
.prayer-card:hover .prayer-card-arrow, .prayer-card:active .prayer-card-arrow { color: var(--gold); }

.prayer-card-emoji { font-size: 28px; flex-shrink: 0; }
.prayer-card-body { flex: 1; }
.prayer-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  transition: color 0.2s;
}
.prayer-card-sub {
  font-size: 12px;
  color: var(--text-light);
  transition: color 0.2s;
}
.prayer-card-arrow {
  color: var(--text-light);
  font-size: 18px;
  transition: color 0.2s;
}

.prayer-detail-header {
  padding: 16px 0;
  border-bottom: 1px solid rgba(11,33,71,0.08);
  margin-bottom: 18px;
}

.prayer-emoji { font-size: 44px; margin-bottom: 10px; display: block; text-align: center; }
.prayer-title { font-size: 22px; font-weight: 700; color: var(--blue-deep); text-align: center; margin-bottom: 4px; }
.prayer-subtitle { font-size: 14px; color: var(--text-light); text-align: center; margin-bottom: 8px; }
.prayer-ref { font-size: 12px; color: var(--gold-dark); text-align: center; font-weight: 700; }

.prayer-text {
  font-size: 17px;
  line-height: 2;
  color: var(--text-dark);
  white-space: pre-line;
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 14px;
  text-align: center;
}

.prayer-context {
  background: rgba(11,33,71,0.04);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  font-style: italic;
}

/* ROSARIO */
.rosario-intro {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mid);
}

.misterio-set { margin-bottom: 20px; }

.misterio-set-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-deep);
  color: white;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
}

.misterio-set-title { font-size: 15px; font-weight: 700; color: var(--gold); flex: 1; }
.misterio-set-dia { font-size: 12px; color: rgba(255,255,255,0.7); }
.misterio-set-emoji { font-size: 20px; }

.misterio-item {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 8px;
  border-left: 3px solid var(--gold);
}

.misterio-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.misterio-nombre {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-deep);
  margin: 4px 0;
}

.misterio-ref {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.misterio-meditacion {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  font-style: italic;
}

/* ===========================
   ESTUDIO BÍBLICO
=========================== */
.study-list { display: flex; flex-direction: column; gap: 12px; }

.study-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.study-card:hover, .study-card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11,33,71,0.15);
}

.study-card-emoji { font-size: 32px; flex-shrink: 0; }
.study-card-body { flex: 1; }
.study-card-level {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.study-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 3px;
}
.study-card-sub { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.study-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
}

.study-detail-header {
  padding: 16px 0;
  border-bottom: 1px solid rgba(11,33,71,0.08);
  margin-bottom: 18px;
}

.study-header-emoji { font-size: 40px; margin-bottom: 10px; display: block; }
.study-title { font-size: 22px; font-weight: 700; color: var(--blue-deep); margin-bottom: 4px; }
.study-subtitle { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }

.study-ref-pill {
  display: inline-block;
  background: var(--blue-deep);
  color: var(--gold);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.study-tema {
  background: rgba(11,33,71,0.04);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-mid);
  margin-bottom: 18px;
  font-style: italic;
}

.study-section {
  margin-bottom: 20px;
}

.study-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-deep);
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  margin-bottom: 10px;
}

.study-section-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark);
  white-space: pre-wrap;
}

.study-section-content strong {
  color: var(--blue-deep);
  font-weight: 700;
}

.study-dinamica {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  color: white;
}

.study-dinamica-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.study-pregunta {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.study-pregunta:last-child { border-bottom: none; }
.study-pregunta::before { content: '→ '; color: var(--gold); }

.study-explicacion {
  background: linear-gradient(135deg, #fffbe8, #fff5cc);
  border-radius: var(--radius);
  padding: 18px;
  border-left: 4px solid var(--gold);
  margin-bottom: 18px;
}

.study-explicacion-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-dark);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.study-explicacion-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dark);
}

/* ===========================
   NAVEGACIÓN INFERIOR
=========================== */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: white;
  border-top: 1px solid rgba(11,33,71,0.1);
  display: flex;
  align-items: stretch;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(11,33,71,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: color 0.2s;
  padding: 8px 0;
}

.nav-item.active {
  color: var(--blue-deep);
}

.nav-item.active .nav-icon {
  stroke: var(--blue-deep);
}

.nav-icon {
  width: 24px;
  height: 24px;
  stroke: var(--text-light);
  transition: stroke 0.2s;
}

.nav-item:hover { color: var(--blue-mid); }
.nav-item:hover .nav-icon { stroke: var(--blue-mid); }

/* ===========================
   MORE MENU
=========================== */
.more-menu {
  position: fixed;
  bottom: calc(var(--nav-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 -4px 30px rgba(11,33,71,0.15);
  z-index: 99;
  overflow: hidden;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.more-menu-content { padding: 8px; }

.more-item {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
  text-align: left;
}
.more-item:hover { background: rgba(11,33,71,0.06); }
.more-icon { font-size: 24px; }

/* ===========================
   UTILIDADES
=========================== */
.hidden { display: none !important; }

.btn-back {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue-mid);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.loading {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  padding: 20px;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(11,33,71,0.2);
  border-top-color: var(--blue-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250,246,241,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(2px);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(11,33,71,0.2);
  border-top-color: var(--blue-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-deep);
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  z-index: 300;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(11,33,71,0.3);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.error-card {
  background: #fff5f5;
  border: 1px solid #ffcccc;
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--red-liturgy);
  font-size: 14px;
  line-height: 1.5;
}

/* ===========================
   MARKDOWN PARSER (simple)
=========================== */
.md strong { font-weight: 700; color: var(--blue-deep); }
.md em { font-style: italic; }
.md p { margin-bottom: 12px; }

/* ===========================
   BIBLIA — LISTA DE LIBROS
=========================== */
.bible-section-hdr {
  background: rgba(11,33,71,0.06);
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-light);
  text-transform: uppercase;
  border-top: 1px solid rgba(11,33,71,0.08);
}

.bible-book-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 16px;
  background: white;
  border: none;
  border-bottom: 1px solid rgba(11,33,71,0.06);
  text-align: left;
  font-size: 16px;
  font-family: 'Lato', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: background 0.1s;
}
.bible-book-item:active { background: rgba(11,33,71,0.05); }
.bible-book-item::after {
  content: '›';
  color: var(--text-light);
  font-size: 22px;
  font-weight: 300;
}

/* ===========================
   BIBLIA — LECTOR
=========================== */
.bible-reader-topbar {
  position: sticky;
  top: var(--header-h);
  background: var(--blue-deep);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.bible-back-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  padding: 4px 0;
}

.bible-reader-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bible-reader-bookname {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.bible-chapter-sel {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  width: 100%;
  max-width: 180px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D4A017' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
}

.bible-chapter-area {
  padding: 16px 16px 8px;
  min-height: 200px;
}

.bible-chapter-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  line-height: 2;
  color: var(--text-dark);
}

.bible-bottom-nav {
  display: flex;
  gap: 8px;
  padding: 8px 16px 16px;
}

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(11,33,71,0.2); border-radius: 2px; }

/* ===========================
   SAFE AREA (iPhones)
=========================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  }
  #main-content {
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  }
}

/* ===========================
   RESPONSIVE (tablet)
=========================== */
@media (min-width: 480px) {
  #app, #main-header, #bottom-nav {
    border-left: 1px solid rgba(11,33,71,0.08);
    border-right: 1px solid rgba(11,33,71,0.08);
  }
}
