/* Estilos Principales - Plataforma del Santo Rosario Interactivo (V6 - Stepper de Misterios & Checkmarks Visuales) */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --accent-gold: #fbbf24;
  --accent-gold-hover: #f59e0b;
  --accent-blue: #38bdf8;
  --accent-green: #22c55e;
  --border-color: #475569;
  --bead-active: #fbbf24;
  --bead-inactive: #475569;
  --bead-completed: #15803d;
  --ad-bg: #1e293b;
  --focus-ring: #38bdf8;
  --radius: 12px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --accent-gold: #b45309;
  --accent-gold-hover: #92400e;
  --accent-blue: #0284c7;
  --accent-green: #16a34a;
  --border-color: #94a3b8;
  --bead-active: #b45309;
  --bead-inactive: #cbd5e1;
  --bead-completed: #16a34a;
  --ad-bg: #f1f5f9;
  --focus-ring: #0284c7;
}

[data-theme="candle"] {
  --bg-primary: #140d07;
  --bg-secondary: #1f140b;
  --bg-card: #1f140b;
  --text-primary: #fef3c7;
  --text-secondary: #d97706;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-blue: #fbbf24;
  --accent-green: #22c55e;
  --border-color: #452409;
  --bead-active: #f59e0b;
  --bead-inactive: #3a1d06;
  --bead-completed: #b45309;
  --ad-bg: #1f140b;
  --focus-ring: #f59e0b;
}

[data-theme="maria"] {
  --bg-primary: #FFFFFF;
  --bg-secondary: #A0C4DF;
  --bg-card: #F1F5F9;
  --text-primary: #1D3557;
  --text-secondary: #1D3557;
  --accent-gold: #1D3557;
  --accent-gold-hover: #162842;
  --accent-blue: #A0C4DF;
  --accent-green: #1D3557;
  --border-color: #A0C4DF;
  --bead-active: #fbbf24;
  --bead-inactive: #1d3557;
  --bead-completed: #d97706;
  --ad-bg: #F1F5F9;
  --focus-ring: #A0C4DF;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Accessibility Focus Visible Ring */
*:focus-visible {
  outline: 3px solid var(--focus-ring) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-gold);
  color: #0f172a;
  padding: 8px 16px;
  font-weight: 700;
  z-index: 1000;
  transition: top 0.2s;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

/* Header & Navigation */
.header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

/* Header Superior Fijo Inteligente de Cuentas y Misterio (Sticky Top Header) */
.sticky-beads-header {
  position: fixed;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  background-color: rgba(30, 41, 59, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 0.4rem 0.85rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-beads-header.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

[data-theme="light"] .sticky-beads-header {
  background-color: rgba(255, 255, 255, 0.95);
}

[data-theme="candle"] .sticky-beads-header {
  background-color: rgba(31, 20, 11, 0.95);
}

[data-theme="maria"] .sticky-beads-header {
  background-color: rgba(241, 245, 249, 0.96);
  border-bottom: 1px solid #A0C4DF;
  box-shadow: 0 4px 20px rgba(29, 53, 87, 0.12);
}

.sticky-beads-container-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.sticky-beads-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.sticky-mystery-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sticky-prayer-step {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sticky-beads-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.sticky-bead-item {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--bead-inactive);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  padding: 0;
}

.sticky-bead-item.completed {
  background-color: var(--bead-completed);
  border-color: #4ade80;
  color: #ffffff;
}

.sticky-bead-item.active {
  background-color: var(--bead-active);
  border-color: #ffffff;
  color: #0f172a;
  transform: scale(1.15);
  box-shadow: 0 0 8px var(--accent-gold);
}

.sticky-bead-item.our-father {
  width: 22px;
  height: 22px;
  border: 1px solid var(--accent-gold);
  font-size: 0.58rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-decoration: none;
}

.logo-text-short {
  display: none;
}

.logo-text-full {
  display: inline;
}

.nav-text-mobile {
  display: none;
}

.nav-text-desktop {
  display: inline;
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent-gold);
}

.btn-theme {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-lang {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Layout Containers */
.main-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.main-layout > *, section {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

/* Streak Badge & User Badge */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-badge:hover {
  background-color: rgba(56, 189, 248, 0.25);
  border-color: var(--accent-blue);
}

/* Stepper de Misterios (Navegador Superior Claro) */
.mystery-stepper {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin: 1rem 0 1.25rem 0;
  flex-wrap: wrap;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.stepper-item:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.stepper-item.active {
  background-color: rgba(251, 191, 36, 0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.stepper-item.completed {
  background-color: rgba(34, 197, 94, 0.15);
  border-color: var(--accent-green);
  color: #4ade80;
}

.stepper-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--border-color);
  color: var(--text-primary);
}

.stepper-item.active .stepper-icon {
  background: var(--accent-gold);
  color: #0f172a;
}

.stepper-item.completed .stepper-icon {
  background: var(--accent-green);
  color: #ffffff;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-blue));
  width: 0%;
  transition: width 0.3s ease;
}

/* Interactive App Container */
.app-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.mystery-header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

/* Layout Héroe Integrado en Grid 2 Columnas (Desktop) / Columna Sencilla Centrada (Móvil Portrait) */
.mystery-hero-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "art header"
    "art scripture";
  gap: 0.5rem 1.25rem;
  align-items: center;
  margin-bottom: 0.75rem;
  text-align: left;
}

.mystery-art-container {
  grid-area: art;
  width: 190px;
  height: 190px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-primary);
  margin: 0 auto;
}

.mystery-art-bg {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.35) saturate(1.2);
  z-index: 1;
  transition: background-image 0.4s ease;
  pointer-events: none;
}

#mystery-art-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: opacity 0.4s ease;
}

.mystery-info-header {
  grid-area: header;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.mystery-info-header .mystery-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.mystery-info-header .mystery-subtitle {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.mystery-badges-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.scripture-box {
  grid-area: scripture;
  margin: 0;
}

/* Orientación Móvil en Retrato (Portrait View < 640px) */
@media (max-width: 639px) {
  .app-card {
    padding: 1rem 0.85rem;
  }

  .mystery-hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .mystery-info-header {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .mystery-badges-row {
    justify-content: center;
    margin-bottom: 0.35rem;
  }

  .mystery-info-header .mystery-title {
    font-size: 1.35rem;
    text-align: center;
    margin-bottom: 0.2rem;
  }

  .mystery-info-header .mystery-subtitle {
    font-size: 0.92rem;
    text-align: center;
    line-height: 1.35;
  }

  .mystery-art-container {
    width: 210px;
    height: 210px;
    max-width: 65vw;
    max-height: 65vw;
    aspect-ratio: 1 / 1;
    margin: 0.35rem auto;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  }

  .scripture-box {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .mystery-art-container {
    width: 180px;
    height: 180px;
  }
  .mystery-info-header .mystery-title {
    font-size: 1.2rem;
  }
}

.day-badge {
  display: inline-block;
  background-color: rgba(251, 191, 36, 0.2);
  color: var(--accent-gold);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  border: 1px solid var(--accent-gold);
}

.mystery-title {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.mystery-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Cita Bíblica del Misterio */
.scripture-box {
  background-color: var(--bg-primary);
  border-left: 4px solid var(--accent-gold);
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  margin: 0.85rem 0 1rem 0;
  text-align: left;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.scripture-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.scripture-text {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Custom Intent Box (Con Campos de Nombre, Intención y Pista Explicativa) */
.intent-box {
  background: var(--bg-primary);
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

.intent-fields-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2fr;
  gap: 0.85rem;
}

@media (max-width: 639px) {
  .intent-fields-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

.intent-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.intent-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--accent-gold);
  font-weight: 700;
  cursor: pointer;
}

.intent-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  transition: border-color 0.2s ease;
}

.intent-input-wrapper:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

.intent-input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.intent-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.intent-summary-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.intent-summary-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.btn-intent-action {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-intent-action:hover {
  background: var(--accent-gold);
  color: #0f172a;
}

/* Rosary Bead Visualizer con Checkmarks */
.beads-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
  scroll-margin-top: calc(var(--header-height, 70px) + 16px);
}

.bead-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--bead-inactive);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.bead-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.bead-button.completed {
  background-color: var(--bead-completed);
  border-color: #4ade80;
  color: #ffffff;
}

@keyframes bead-pulse {
  0% {
    box-shadow: 0 0 8px var(--accent-gold);
    transform: scale(1.2);
  }
  50% {
    box-shadow: 0 0 18px var(--accent-gold), 0 0 25px rgba(251, 191, 36, 0.5);
    transform: scale(1.28);
  }
  100% {
    box-shadow: 0 0 8px var(--accent-gold);
    transform: scale(1.2);
  }
}

@keyframes candle-flicker {
  0%, 100% {
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15), 0 0 15px rgba(217, 119, 6, 0.1);
  }
  50% {
    box-shadow: 0 12px 30px -4px rgba(245, 158, 11, 0.28), 0 0 25px rgba(245, 158, 11, 0.22);
  }
}

[data-theme="candle"] .app-card {
  animation: candle-flicker 4s infinite ease-in-out;
  border-color: #78350f;
}

[data-theme="maria"] .app-card {
  border: 1px solid #A0C4DF;
  box-shadow: 0 8px 32px rgba(29, 53, 87, 0.12);
}

/* Estilos Exclusivos del Modo María: Rosas Blancas (Pendientes) y Rosas de Oro (Completadas / Activa) 🌹 */
/* Estilos Exclusivos del Modo María: Rosas Blancas (Pendientes) y Rosas de Oro (Completadas / Activa) 🌹 */
[data-theme="maria"] .bead-button:not(.our-father) {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  clip-path: none !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  animation: none !important;
  transform: none !important;
  transition: filter 0.2s ease !important;
  background-color: #A0C4DF !important;
  background-image: url('../images/white-rose-bead.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  color: transparent !important;
  text-shadow: none !important;
}

[data-theme="maria"] .sticky-bead-item:not(.our-father) {
  width: 25px !important;
  height: 25px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  clip-path: none !important;
  border: none !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45) !important;
  animation: none !important;
  transform: none !important;
  transition: filter 0.2s ease !important;
  background-color: #A0C4DF !important;
  background-image: url('../images/white-rose-bead.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  color: transparent !important;
  text-shadow: none !important;
}

[data-theme="maria"] .bead-button:not(.our-father).completed,
[data-theme="maria"] .sticky-bead-item:not(.our-father).completed {
  animation: none !important;
  transform: none !important;
  border: none !important;
  background-image: url('../images/golden-rose-bead.jpg') !important;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.85)) !important;
  color: transparent !important;
  text-shadow: none !important;
}

[data-theme="maria"] .bead-button:not(.our-father).active {
  animation: none !important;
  transform: none !important;
  border: none !important;
  background-image: url('../images/golden-rose-bead.jpg') !important;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 1)) drop-shadow(0 0 25px rgba(245, 158, 11, 0.75)) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.8) !important;
}

[data-theme="maria"] .sticky-bead-item:not(.our-father).active {
  animation: none !important;
  transform: none !important;
  border: none !important;
  background-image: url('../images/golden-rose-bead.jpg') !important;
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 1)) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.7rem !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95) !important;
}

/* Imagen del Sagrado Corazón de Jesús para la Cuenta del Padre Nuestro (1.ª cuenta de cada misterio) */
.bead-button.our-father,
.sticky-bead-item.our-father,
[data-theme="maria"] .bead-button.our-father,
[data-theme="maria"] .sticky-bead-item.our-father,
[data-theme="maria"] .bead-button.our-father.completed,
[data-theme="maria"] .sticky-bead-item.our-father.completed,
[data-theme="maria"] .bead-button.our-father.active,
[data-theme="maria"] .sticky-bead-item.our-father.active {
  background-image: url('../images/sagrado-corazon-bead.svg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border-radius: 50% !important;
  border: 2px solid #F59E0B !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  color: transparent !important;
  text-shadow: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  filter: none !important;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
}

[data-theme="maria"] .bead-button.our-father {
  width: 58px !important;
  height: 58px !important;
}

[data-theme="maria"] .sticky-bead-item.our-father {
  width: 25px !important;
  height: 25px !important;
  clip-path: none !important;
}

.bead-button.our-father.active,
.sticky-bead-item.our-father.active,
[data-theme="maria"] .bead-button.our-father.active,
[data-theme="maria"] .sticky-bead-item.our-father.active {
  border-color: #FFFFFF !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 1), 0 0 22px rgba(245, 158, 11, 0.85) !important;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.9)) !important;
  animation: bead-pulse 2.2s infinite ease-in-out !important;
  color: transparent !important;
}

.bead-button.our-father.completed,
.sticky-bead-item.our-father.completed,
[data-theme="maria"] .bead-button.our-father.completed,
[data-theme="maria"] .sticky-bead-item.our-father.completed {
  border-color: #F59E0B !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.75)) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
  color: transparent !important;
}

/* Componentes Visuales del Modo María (Paleta Inmaculada: Blanco, Gris Suave #F1F5F9, Celeste #A0C4DF, Azul Profundo #1D3557) */
[data-theme="maria"] .stepper-item {
  background-color: #ffffff !important;
  border: 1px solid #A0C4DF !important;
  color: #1D3557 !important;
  font-weight: 600 !important;
}

[data-theme="maria"] .stepper-item:hover {
  background-color: #F1F5F9 !important;
  border-color: #1D3557 !important;
  color: #1D3557 !important;
}

[data-theme="maria"] .stepper-item.completed {
  background-color: #F1F5F9 !important;
  border: 1px solid #A0C4DF !important;
  color: #1D3557 !important;
  font-weight: 700 !important;
}

[data-theme="maria"] .stepper-item.completed .stepper-icon {
  background-color: #1D3557 !important;
  color: #ffffff !important;
}

[data-theme="maria"] .stepper-item.active {
  background-color: #A0C4DF !important;
  border: 2px solid #1D3557 !important;
  color: #1D3557 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 10px rgba(160, 196, 223, 0.4) !important;
}

[data-theme="maria"] .stepper-item.active .stepper-icon {
  background-color: #1D3557 !important;
  color: #ffffff !important;
}

[data-theme="maria"] .user-badge {
  background-color: #F1F5F9 !important;
  border: 1px solid #A0C4DF !important;
  color: #1D3557 !important;
}

[data-theme="maria"] .user-badge:hover {
  background-color: #A0C4DF !important;
  border-color: #1D3557 !important;
}

[data-theme="maria"] .streak-badge {
  background-color: #F1F5F9 !important;
  border: 1px solid #A0C4DF !important;
  color: #1D3557 !important;
}

[data-theme="maria"] .progress-bar-fill {
  background: linear-gradient(90deg, #A0C4DF, #1D3557) !important;
}

[data-theme="maria"] .prayer-title {
  color: #1D3557 !important;
}

[data-theme="maria"] .day-badge {
  background-color: #1D3557 !important;
  color: #ffffff !important;
  border: 1px solid #A0C4DF !important;
  box-shadow: 0 4px 12px rgba(29, 53, 87, 0.25) !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  padding: 0.4rem 1.1rem !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

[data-theme="maria"] .btn-primary {
  background-color: #1D3557 !important;
  color: #FFFFFF !important;
  border: 1px solid #A0C4DF !important;
  box-shadow: 0 4px 14px rgba(29, 53, 87, 0.3) !important;
  font-weight: 800 !important;
}

[data-theme="maria"] .btn-primary:hover {
  background-color: #162842 !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
}

[data-theme="maria"] .btn-secondary {
  background-color: #FFFFFF !important;
  color: #1D3557 !important;
  border: 1px solid #A0C4DF !important;
  font-weight: 700 !important;
}

[data-theme="maria"] .btn-secondary:hover {
  background-color: #F1F5F9 !important;
  border-color: #1D3557 !important;
  color: #1D3557 !important;
}

[data-theme="maria"] .keyboard-hint {
  color: #1D3557 !important;
  font-weight: 600 !important;
}

.bead-button.active {
  background-color: var(--bead-active);
  border-color: #ffffff;
  color: #0f172a;
  animation: bead-pulse 2.2s infinite ease-in-out;
}

.bead-button.our-father {
  width: 54px;
  height: 54px;
  border: 2px solid var(--accent-gold);
}

/* Colores Litúrgicos Dinámicos según el Día */
[data-mystery-type="Dolorosos"] .day-badge {
  background-color: #7e22ce;
  color: #ffffff;
  border-color: #a855f7;
}

[data-mystery-type="Gozosos"] .day-badge {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

[data-mystery-type="Gloriosos"] .day-badge {
  background-color: #b45309;
  color: #ffffff;
  border-color: #f59e0b;
}

[data-mystery-type="Luminosos"] .day-badge {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

/* Modo Texto Grande para Adultos Mayores */
.prayer-text.large-text {
  font-size: 1.35rem !important;
  line-height: 1.85 !important;
}

/* Prayer Text Box */
.prayer-box {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.prayer-title {
  font-size: 1.15rem;
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prayer-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-line;
}

.hidden {
  display: none !important;
}

/* App Controls (Mobile-First: Columna Vertical Sencilla al 100% Ancho) */
.controls-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.65rem;
  box-sizing: border-box;
}

.controls-grid.hidden {
  display: none !important;
}

.controls-grid .btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#btn-next-step {
  order: 1 !important;
  padding: 0.9rem 1rem !important;
  font-size: 1.05rem !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3) !important;
}

#btn-prev-step {
  order: 2 !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
}

#btn-reset {
  order: 3 !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
}

/* Escritorio / Pantallas Anchas (>= 640px): Reorganizar a 3 Columnas Horizontal */
@media (min-width: 640px) {
  .controls-grid {
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    gap: 0.75rem !important;
    align-items: center !important;
  }
  .controls-grid .btn {
    width: auto !important;
  }
  #btn-prev-step {
    order: 1 !important;
  }
  #btn-next-step {
    order: 2 !important;
  }
  #btn-reset {
    order: 3 !important;
  }
}

.btn {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #0f172a;
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.keyboard-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* Barra de Navegación Inferior Fija para Móviles (Thumb-Zone Navigation Dock) */
.mobile-bottom-dock {
  display: none;
}

/* Optimización para Dispositivos Móviles (Teléfonos Celulares < 640px) */
@media (max-width: 639px) {
  .sticky-beads-header {
    top: 0 !important;
    padding: 0.35rem 0.5rem !important;
  }
  .sticky-mystery-label {
    font-size: 0.75rem !important;
  }
  .sticky-prayer-step {
    font-size: 0.7rem !important;
  }
  .sticky-bead-item {
    width: 17px !important;
    height: 17px !important;
    font-size: 0.55rem !important;
  }
  .sticky-bead-item.our-father {
    width: 19px !important;
    height: 19px !important;
    font-size: 0.52rem !important;
  }

  .header {
    padding: 0.4rem 0.5rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .nav-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    justify-content: space-between !important;
  }
  .logo {
    font-size: 0.95rem !important;
    gap: 0.35rem !important;
    white-space: nowrap !important;
  }
  .logo-text-full {
    display: none !important;
  }
  .logo-text-short {
    display: inline !important;
  }
  .btn-hamburger {
    display: flex !important;
  }
  .nav-links-desktop {
    display: none !important;
  }
  .header-mobile-actions {
    display: flex !important;
  }

  .main-layout {
    padding: 0.75rem 0.5rem 100px 0.5rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .app-card {
    padding: 0.85rem 0.6rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .intent-box {
    padding: 0.75rem 0.6rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .intent-fields-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .intent-input-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .intent-input-wrapper input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .mystery-stepper {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    justify-content: flex-start !important;
    padding: 0.35rem 0.5rem;
    gap: 0.4rem;
    margin: 0.5rem 0 0.85rem 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .mystery-stepper::-webkit-scrollbar {
    display: none;
  }
  .stepper-item {
    scroll-snap-align: center;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    gap: 0.3rem;
    border-radius: 16px;
  }
  .stepper-icon {
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
  }

  .beads-container {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    justify-items: center !important;
    align-items: center !important;
    gap: 0.6rem 0.4rem !important;
    margin: 0.85rem auto !important;
    width: 100% !important;
    max-width: 270px !important;
    box-sizing: border-box !important;
  }
  .beads-container .bead-button.our-father {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    margin-bottom: 0.35rem !important;
    width: 56px !important;
    height: 56px !important;
  }
  .bead-button {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.78rem !important;
  }

  .prayer-box {
    padding: 0.85rem 0.6rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    overflow: hidden !important;
    min-height: 140px;
  }
  .prayer-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .prayer-title > div {
    width: 100%;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
  }

  .controls-grid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .controls-grid .btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .cookie-banner {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* Barra de Navegación Inferior Fija */
  .mobile-bottom-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    background-color: rgba(30, 41, 59, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 99;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
    user-select: none;
    -webkit-user-select: none;
  }

  [data-theme="light"] .mobile-bottom-dock {
    background-color: rgba(255, 255, 255, 0.96);
  }

  [data-theme="candle"] .mobile-bottom-dock {
    background-color: rgba(31, 20, 11, 0.96);
  }

  [data-theme="maria"] .mobile-bottom-dock {
    background-color: rgba(241, 245, 249, 0.96);
    border-top: 1px solid #A0C4DF;
  }

  .mobile-dock-btn {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.7rem 0.4rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    min-width: 0;
  }

  .mobile-dock-btn:active {
    transform: scale(0.96);
  }

  .mobile-dock-btn-secondary {
    flex: 0 0 auto;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.7rem 0.5rem;
    font-size: 0.8rem;
  }

  .mobile-dock-btn-primary {
    flex: 1 1 auto;
    background: var(--accent-gold);
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
    font-size: 0.9rem;
    padding: 0.75rem 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dock-btn-primary:active {
    background: var(--accent-gold-hover);
  }

  .mobile-dock-btn-audio {
    flex: 0 0 auto;
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    padding: 0.7rem 0.45rem;
    font-size: 0.8rem;
  }
}

[data-theme="maria"] .mobile-dock-btn-primary {
  background-color: #1D3557 !important;
  color: #FFFFFF !important;
  border: 1px solid #A0C4DF !important;
  font-weight: 800 !important;
}

[data-theme="maria"] .mobile-dock-btn-secondary {
  background-color: #FFFFFF !important;
  color: #1D3557 !important;
  border: 1px solid #A0C4DF !important;
  font-weight: 700 !important;
}

[data-theme="maria"] .mobile-dock-btn-audio {
  background-color: #F1F5F9 !important;
  color: #1D3557 !important;
  border: 1px solid #A0C4DF !important;
  font-weight: 700 !important;
}

@media (max-width: 380px) {
  .beads-container {
    max-width: 230px !important;
    gap: 0.4rem 0.25rem !important;
  }
  .bead-button {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.72rem !important;
  }
  .beads-container .bead-button.our-father {
    width: 48px !important;
    height: 48px !important;
  }
}

/* Escritorio, Tablet y Vista Mobile Landscape: Una Sola Fila Horizontal */
@media (min-width: 640px), (orientation: landscape) {
  .beads-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    max-width: 100% !important;
  }
  .beads-container .bead-button.our-father {
    grid-column: auto !important;
    justify-self: auto !important;
    margin-bottom: 0 !important;
  }
}

/* Social Share Bar */
.share-bar {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.btn-share {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-share:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* AdSense Containers (Strict 25px Margin) */
.ad-banner {
  background-color: var(--ad-bg);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 25px 0;
  position: relative;
  overflow: hidden;
}

.ad-sidebar {
  background-color: var(--ad-bg);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.ad-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* Sidebar & Quick Links */
.sidebar-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.quick-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.quick-links a:hover {
  color: var(--accent-gold);
}

/* Article & Content Layout */
.content-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
}

.content-section h2 {
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* Cookie Consent CMP Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border-top: 2px solid var(--accent-gold);
  padding: 1rem 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-container {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.copyright {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Banner de Bienvenida por Invitación Personalizada (Paleta Inmaculada) */
.invite-welcome-banner {
  background-color: #F1F5F9;
  border: 1px solid #A0C4DF;
  border-left: 5px solid #1D3557;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(29, 53, 87, 0.08);
}

.invite-welcome-text {
  font-size: 0.95rem;
  color: #1D3557;
  font-weight: 600;
  line-height: 1.4;
}

.invite-welcome-close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: #1D3557;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.invite-welcome-close:hover {
  background: #A0C4DF;
}

/* Modal de Compartido Personalizado */
.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.share-modal-card {
  background-color: #FFFFFF;
  border: 1px solid #A0C4DF;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(29, 53, 87, 0.25);
  animation: modal-fade-in 0.25s ease-out;
}

.share-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.share-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.share-field-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1D3557;
}

.share-modal-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #A0C4DF;
  background-color: #F1F5F9;
  color: #1D3557;
  font-size: 0.9rem;
  font-weight: 600;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.share-modal-input:focus {
  outline: none;
  border-color: #1D3557;
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(160, 196, 223, 0.4);
}

@keyframes modal-fade-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #A0C4DF;
}

.share-modal-title {
  font-size: 1.2rem;
  color: #1D3557;
  font-weight: 800;
}

.share-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.share-option-whatsapp {
  background-color: #25D366;
  color: #FFFFFF;
}

.share-option-whatsapp:hover {
  background-color: #1EBE5D;
  transform: translateY(-1px);
}

.share-option-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #FFFFFF;
}

.share-option-instagram:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.share-option-native {
  background-color: #1D3557;
  color: #FFFFFF;
}

.share-option-native:hover {
  background-color: #162842;
  transform: translateY(-1px);
}

.share-option-copy {
  background-color: #F1F5F9;
  color: #1D3557;
  border: 1px solid #A0C4DF;
}

.share-option-copy:hover {
  background-color: #A0C4DF;
}

/* Toast Notification (Feedback al Copiar Enlace) */
.toast-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1D3557;
  color: #FFFFFF;
  border: 1px solid #A0C4DF;
  padding: 0.75rem 1.25rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toast-slide-up 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toast-slide-up {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Estilo para botón de compartir en la caja de intenciones */
.btn-intent-share {
  background-color: #1D3557 !important;
  color: #FFFFFF !important;
  border: 1px solid #A0C4DF !important;
}

.btn-intent-share:hover {
  background-color: #162842 !important;
}

/* ==========================================================================
   Menú Hamburguesa Móvil (Off-Canvas Drawer) & Modal de Perfil
   ========================================================================== */
.btn-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  border-radius: 8px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
  user-select: none;
}

.btn-hamburger:hover {
  background-color: var(--border-color);
}

.btn-hamburger:active {
  transform: scale(0.92);
}

.header-mobile-actions {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.header-action-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-action-badge:hover {
  border-color: var(--accent-gold);
}

[data-theme="maria"] .header-action-badge {
  background-color: #FFFFFF;
  color: #1D3557;
  border: 1px solid #A0C4DF;
}

/* Off-Canvas Drawer Overlay & Panel */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 25px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

[data-theme="maria"] .mobile-drawer {
  background-color: #F1F5F9;
  border-right: 1px solid #A0C4DF;
}

.drawer-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
}

[data-theme="maria"] .drawer-header {
  background-color: #FFFFFF;
  border-bottom: 1px solid #A0C4DF;
}

.drawer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

[data-theme="maria"] .drawer-logo {
  color: #1D3557;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 50%;
  line-height: 1;
}

/* Tarjeta Perfil dentro del Drawer */
.drawer-profile-card {
  margin: 1.25rem 1rem 0.5rem 1rem;
  padding: 1.1rem;
  border-radius: 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.drawer-profile-card:hover {
  border-color: var(--accent-gold);
}

.drawer-profile-card:active {
  transform: scale(0.98);
}

[data-theme="maria"] .drawer-profile-card {
  background-color: #FFFFFF;
  border: 1px solid #A0C4DF;
}

.drawer-profile-greeting {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="maria"] .drawer-profile-greeting {
  color: #1D3557;
}

.drawer-profile-details {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  line-height: 1.4;
}

[data-theme="maria"] .drawer-profile-details {
  color: #1D3557;
}

.btn-drawer-profile {
  background-color: var(--accent-gold);
  color: #0f172a;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background-color 0.2s;
  margin-top: 0.25rem;
}

[data-theme="maria"] .btn-drawer-profile {
  background-color: #1D3557;
  color: #FFFFFF;
  border: 1px solid #A0C4DF;
}

/* Nav Links inside Drawer */
.drawer-menu {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 1.5rem 1rem;
  gap: 0.4rem;
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.drawer-menu-item:hover, .drawer-menu-item:active {
  background-color: var(--bg-card);
  color: var(--accent-gold);
}

[data-theme="maria"] .drawer-menu-item {
  color: #1D3557;
}

[data-theme="maria"] .drawer-menu-item:hover, [data-theme="maria"] .drawer-menu-item:active {
  background-color: #FFFFFF;
  color: #1D3557;
}

/* Modal de Perfil de Usuario */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.profile-modal-card {
  background-color: #FFFFFF;
  border: 1px solid #A0C4DF;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(29, 53, 87, 0.25);
  animation: modal-fade-in 0.25s ease-out;
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #A0C4DF;
}

.profile-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1D3557;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Modal de Reflexión y Meditación del Misterio
   ========================================================================== */
.reflection-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.reflection-modal-card {
  background-color: #FFFFFF;
  border: 1px solid #A0C4DF;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  box-shadow: 0 16px 45px rgba(29, 53, 87, 0.28);
  animation: modal-fade-in 0.25s ease-out;
  box-sizing: border-box;
}

.reflection-modal-body {
  overflow-y: auto;
  padding-right: 0.25rem;
  flex: 1 1 auto;
}

.reflection-modal-body::-webkit-scrollbar {
  width: 6px;
}

.reflection-modal-body::-webkit-scrollbar-thumb {
  background-color: #A0C4DF;
  border-radius: 10px;
}

.reflection-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #A0C4DF;
}

.reflection-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

/* ==========================================================================
   Modal de Instalación PWA para Celulares (Guía Accesible para Adultos)
   ========================================================================== */
.install-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.install-modal-card {
  background-color: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-color, #A0C4DF);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.3);
  animation: modal-fade-in 0.25s ease-out;
  box-sizing: border-box;
}

[data-theme="maria"] .install-modal-card {
  background-color: #FFFFFF;
  border: 1px solid #A0C4DF;
  color: #1D3557;
}

.install-step-card {
  background-color: var(--bg-secondary, #F1F5F9);
  border: 1px solid var(--border-color, #CBD5E1);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

[data-theme="maria"] .install-step-card {
  background-color: #F8FAF7;
  border: 1px solid #A0C4DF;
}

/* ==========================================================================
   Modal de Invitación / Rosario Dedicado (?from=...)
   ========================================================================== */
.invitation-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.invitation-modal-card {
  background-color: var(--bg-card, #FFFFFF);
  border: 2px solid var(--accent-gold, #D4AF37);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: modal-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-align: center;
}

[data-theme="maria"] .invitation-modal-card {
  background-color: #FFFFFF;
  border: 2px solid #A0C4DF;
  color: #1D3557;
}

.invitation-modal-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.invitation-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-gold, #D4AF37);
  margin: 0 0 1rem 0;
}

[data-theme="maria"] .invitation-modal-title {
  color: #1D3557;
}

.invitation-modal-body {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-primary, #1e293b);
  margin-bottom: 1.5rem;
  background: var(--bg-secondary, #F8FAF7);
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border-color, #E2E8F0);
  text-align: center;
}

[data-theme="maria"] .invitation-modal-body {
  background: #F0F4F8;
  border-color: #A0C4DF;
  color: #1D3557;
}

.invitation-intent-box {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-color, #A0C4DF);
  font-size: 1.02rem;
  color: var(--text-secondary, #475569);
}

[data-theme="maria"] .invitation-intent-box {
  color: #1D3557;
  border-top-color: #A0C4DF;
}

.btn-start-rosary {
  width: 100%;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  padding: 0.9rem 1.5rem !important;
  border-radius: 12px !important;
  background-color: var(--accent-gold, #D4AF37) !important;
  color: #1e293b !important;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4) !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  border: none !important;
}

.btn-start-rosary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5) !important;
}

[data-theme="maria"] .btn-start-rosary {
  background-color: #1D3557 !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(29, 53, 87, 0.3) !important;
}

.reflection-content-box {
  background-color: #F1F5F9;
  border: 1px solid #A0C4DF;
  border-left: 5px solid #1D3557;
  border-radius: 12px;
  padding: 0.9rem;
  margin-top: 0.5rem;
}

.reflection-prayers-container {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.reflection-prayers-header {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1D3557;
  margin: 0.2rem 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #CBD5E1;
}

.reflection-prayer-card {
  background-color: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-left: 4px solid #3B82F6;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reflection-prayer-card.marian-card {
  border-left-color: #0284C7;
  background-color: #F0F9FF;
  border-color: #BAE6FD;
}

.reflection-prayer-card.sacred-heart-card {
  border-left-color: #DC2626;
  background-color: #FEF2F2;
  border-color: #FCA5A5;
}

.reflection-prayer-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: #1E293B;
  margin-bottom: 0.35rem;
}

.reflection-prayer-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.reflection-prayer-text {
  margin: 0;
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.5;
  font-weight: 500;
}

.reflection-prayer-text.sacred-heart-text {
  font-weight: 800;
  color: #991B1B;
  font-size: 0.92rem;
  font-style: italic;
}

/* ==========================================================================
   Master Switch de Publicidad AdSense (Modo Sin Publicidad / Revisión Google)
   - Actualmente: Oculta todos los contenedores y etiquetas de publicidad (display: none !important)
   - Para reactivar publicidad en el futuro: Eliminar o comentar la siguiente regla CSS.
   ========================================================================== */
.ad-banner,
.ad-sidebar {
  display: none !important;
}
