/* ════════════════════════════════════════════════════════
   Intro Player v0.56.0 — Palantir-style Surveillance Dashboard
   Полноэкранный проигрыватель для hram.prosvetim.ru
   ════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --intro-footer-h: 44px;
  --intro-panel-bg: rgba(10, 14, 23, 0.88);
  --intro-panel-border: rgba(120, 160, 220, 0.15);
  --intro-accent: #78a0dc;
  --intro-accent-glow: rgba(120, 160, 220, 0.25);
  --intro-text-primary: rgba(255, 255, 255, 0.95);
  --intro-text-secondary: rgba(255, 255, 255, 0.6);
  --intro-text-muted: rgba(255, 255, 255, 0.35);
  --intro-gold: #c9a227;
  --intro-gold-glow: rgba(201, 162, 39, 0.3);
}

/* Hide header/top-bar when intro active */
body:has(.intro-player) #app {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body:has(.intro-player) .top-bar {
  display: none !important;
}
body:has(.intro-player) .luchik-widget,
body:has(.intro-player) [class*="luchik"] {
  display: none !important;
}
body:has(.intro-player) #bgCanvas,
body:has(.intro-player) #bgCanvas ~ canvas {
  display: none !important;
}
body:has(.intro-player) .site-footer--compact {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: rgba(10,14,23,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(120,160,220,0.08);
  margin: 0;
  padding: 6px 16px;
  height: auto;
  min-height: 32px;
}

/* ─── Main Container ─── */
.intro-player {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: #0a0e17;
  color: var(--intro-text-primary);
  font-family: var(--font-body);
}

/* Force dark theme for intro — override any light theme */
body[data-theme="light"] .intro-player,
body[data-theme="light"] .intro-map,
body[data-theme="light"] .intro-church-card,
body[data-theme="light"] .intro-digest-overlay,
body[data-theme="light"] .intro-controls,
body[data-theme="light"] .intro-progress {
  color-scheme: dark;
}

/* ─── Map Layer ─── */
.intro-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Force dark theme for map regardless of body theme */
.intro-map .leaflet-container {
  background: #0a0e17 !important;
}
.intro-map .leaflet-tile-pane {
  filter: brightness(0.9) saturate(0.8);
}

/* Dark overlay for "surveillance" feel */
.intro-map::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10,14,23,0.7) 100%);
  pointer-events: none;
}

/* Map scan-line overlay */
.intro-map-scanner {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(120, 160, 220, 0.015) 2px,
    rgba(120, 160, 220, 0.015) 4px
  );
}

/* Map corner decorations */
.intro-map-corners {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.intro-map-corners::before,
.intro-map-corners::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-color: rgba(120, 160, 220, 0.2);
  border-style: solid;
  border-width: 0;
}
.intro-map-corners::before {
  top: 16px;
  left: 16px;
  border-top-width: 1px;
  border-left-width: 1px;
}
.intro-map-corners::after {
  bottom: 16px;
  right: 16px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

/* ─── Digest Overlay (now a left-side card) ─── */
.intro-digest-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.intro-digest-overlay.active {
  opacity: 1;
}
.intro-digest-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.intro-digest-card {
  position: absolute;
  bottom: 80px;
  left: 24px;
  max-width: 520px;
  width: calc(100% - 48px);
  background: rgba(10, 14, 23, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(120, 160, 220, 0.12);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(120, 160, 220, 0.04) inset;
  pointer-events: auto;
}
.intro-digest-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--intro-accent);
  margin-bottom: 12px;
  font-weight: 500;
}
.intro-digest-card-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.3;
  font-weight: 600;
}
.intro-digest-card-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--intro-text-secondary);
  max-height: 50vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  pointer-events: auto;
}
.intro-digest-card-text::-webkit-scrollbar { width: 2px; }
.intro-digest-card-text::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

/* ─── Holiday Card (like digest) ─── */
.intro-holiday-card {
  position: absolute;
  bottom: 80px;
  left: 24px;
  max-width: 420px;
  background: var(--intro-card-bg, rgba(10,14,26,0.85));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--intro-border, rgba(120,160,220,0.15));
  border-radius: 16px;
  padding: 24px;
  color: var(--intro-text, #c8d0e0);
  pointer-events: auto;
  animation: slideUpFade 0.8s ease both;
}

.intro-holiday-card-icon {
  color: var(--intro-gold, #c9a227);
  margin-bottom: 8px;
}

.intro-holiday-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--intro-gold, #c9a227);
  margin-bottom: 4px;
  font-weight: 500;
}

.intro-holiday-card-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #fff;
  margin: 0 0 8px 0;
  font-weight: 600;
  line-height: 1.3;
}

.intro-holiday-card-saint {
  font-size: 0.85rem;
  color: var(--intro-accent, #78a0dc);
  margin-bottom: 8px;
  font-style: italic;
}

.intro-holiday-card-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--intro-text, #c8d0e0);
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.intro-holiday-card-date {
  font-size: 0.75rem;
  color: var(--intro-text-muted, rgba(200,208,224,0.5));
  margin-top: 12px;
  letter-spacing: 0.5px;
}

/* ─── Church Card Area (wrapper: photo above card) ─── */
.intro-church-card-area {
  position: absolute;
  bottom: 80px;
  left: 24px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  width: calc(100% - 48px);
  pointer-events: none;
}

/* ─── Church Photo (glassmorphism square above card) ─── */
.intro-church-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(10, 14, 23, 0.55);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(120, 160, 220, 0.10);
  box-shadow: 0 8px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(120, 160, 220, 0.04) inset;
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

/* ─── Fullscreen Toggle Button ───────────────────────────── */
.intro-fs-toggle {
  position: relative;
  top: auto;
  right: auto;
  align-self: flex-end;
  margin-top: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(120, 160, 220, 0.15);
  color: var(--intro-text-secondary, #8ab0e0);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 15;
  transition: all 0.2s;
  opacity: 0.7;
  pointer-events: auto;
}
.intro-fs-toggle:hover {
  opacity: 1;
  color: var(--intro-accent, #c9a227);
  border-color: rgba(201, 162, 39, 0.3);
}
.intro-fs-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Toggle row in top-info panel (music/TTS + spacer + fullscreen) */
.intro-top-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}
.intro-btn-spacer {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.intro-top-toggle-row {
  pointer-events: auto;
}

/* Mobile: smaller button */
@media (max-width: 768px) {
  .intro-fs-toggle {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 3px;
    width: 22px;
    height: 22px;
  }
  .intro-fs-toggle svg {
    width: 14px;
    height: 14px;
  }
}

/* ─── Intro Top Info (clock, weather, etc) ─────────────────── */
.intro-top-info {
  position: absolute;
}

.intro-church-photo.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.intro-church-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-church-photo .photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 23, 0.65);
  font-size: 1.8rem;
  color: rgba(120, 160, 220, 0.25);
}

/* ─── Church Card (glassmorphism) — now inside .intro-church-card-area ─── */
.intro-church-card {
  position: relative;
  bottom: auto;
  left: auto;
  max-width: 520px;
  width: 100%;
  max-height: 65vh;
  pointer-events: auto;
  background: rgba(10, 14, 23, 0.55);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(120, 160, 220, 0.10);
  border-radius: 14px;
  padding: 20px 24px 14px;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(120, 160, 220, 0.04) inset;
}

.intro-church-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.intro-church-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.intro-church-card-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}

.intro-church-card-image-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: rgba(120, 160, 220, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.intro-church-card-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Gold checkmark for churches with profile */
.intro-checkmark {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--intro-accent, #c9a227);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(201, 162, 39, 0.4));
  vertical-align: middle;
}

.intro-church-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--intro-text-muted);
}

.intro-church-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.intro-church-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(65vh - 130px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  margin-bottom: 6px;
}
.intro-church-card-body::-webkit-scrollbar { width: 2px; }
.intro-church-card-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.intro-church-card-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--intro-text-secondary);
  max-height: 270px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  padding-right: 4px;
  margin-bottom: 12px;
}
.intro-church-card-description::-webkit-scrollbar { width: 2px; }
.intro-church-card-description::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}


/* ─── Word reveal with particle effect ─── */
.intro-slide-text-word {
  display: inline;
  opacity: 0;
  will-change: transform, opacity, filter;
}

.intro-slide-text-word.revealed {
  animation: introWordReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes introCardIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  60% {
    opacity: 0.95;
    transform: translateY(-4px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes introWordReveal {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.93);
    filter: blur(8px);
  }
  50% {
    opacity: 0.85;
    transform: translateY(-2px) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ─── Chronicle section in church card body ─── */
.intro-church-card-chronicle {
  flex: 1;
  min-height: 0;
}
.intro-chronicle-section {
  padding: 10px 12px;
  background: rgba(10, 14, 23, 0.35);
  border-radius: 8px;
  border: 1px solid rgba(120, 160, 220, 0.07);
  margin-bottom: 4px;
}
.intro-chronicle-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--intro-gold);
  margin-bottom: 6px;
  font-weight: 500;
}
.intro-chronicle-section-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--intro-text-secondary);
  max-height: 130px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  overflow-anchor: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
}
.intro-chronicle-section-text::-webkit-scrollbar { width: 2px; }
.intro-chronicle-section-text::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.intro-church-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.intro-card-footer-right {
  display: flex;
  gap: 8px;
}

/* ─── Progress Bars ─── */
.intro-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  gap: 3px;
  padding: 6px 8px 0;
}

.intro-progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.intro-progress-bar.active .intro-progress-fill {
  width: 100%;
  animation: introProgress linear forwards;
}

.intro-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--intro-accent), #fff);
  border-radius: 2px;
  width: 0;
}

@keyframes introProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* ─── Controls (gradient extends to bottom, under footer) ─── */
.intro-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 12px 20px calc(12px + var(--intro-footer-h));
  background: linear-gradient(transparent, rgba(10, 14, 23, 0.92));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.intro-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-controls-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.intro-play-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.intro-toggle-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.intro-btn {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--intro-text-secondary);
  transition: all 0.25s ease;
  padding: 0;
}

.intro-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.intro-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro-btn.active {
  background: var(--intro-accent);
  border-color: var(--intro-accent);
  color: #fff;
}

/* Smaller toggle buttons for music/TTS */
.intro-btn-sm {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--intro-text-muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
}

.intro-btn-sm:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.intro-btn-sm.active {
  background: var(--intro-accent);
  border-color: var(--intro-accent);
  color: #fff;
}

/* "Начать со звуком" button in welcome overlay */
.intro-welcome-start-sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  margin-bottom: 20px;
  background: rgba(201, 162, 39, 0.12);
  border: 1.5px solid rgba(201, 162, 39, 0.3);
  border-radius: 12px;
  color: var(--intro-gold, #c9a227);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: welcomeFadeIn 0.6s ease 1.4s both;
}

.intro-welcome-start-sound:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: var(--intro-gold, #c9a227);
  transform: scale(1.04);
}

.intro-welcome-start-sound svg {
  fill: currentColor;
  flex-shrink: 0;
}


.intro-current-slide {
  font-size: 0.72rem;
  color: var(--intro-text-muted);
  white-space: nowrap;
  margin-left: 8px;
}

/* ─── Navigation Buttons (bottom-right) ─── */
.intro-nav-buttons {
  position: absolute;
  bottom: 92px;
  right: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intro-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--intro-panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--intro-panel-border);
  color: var(--intro-text-secondary);
  transition: all 0.25s ease;
  cursor: pointer;
  min-width: 140px;
}

.intro-nav-btn:hover {
  background: rgba(120, 160, 220, 0.15);
  border-color: rgba(120, 160, 220, 0.3);
  color: #fff;
  transform: translateX(-2px);
}

.intro-nav-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ─── Top-Right Info Panel — Palantir HUD style ─── */
.intro-top-info {
  position: absolute;
  top: 14px;
  right: 20px;
  z-index: 12;
  min-width: 170px;
  background: rgba(10, 14, 23, 0.5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(120, 160, 220, 0.07);
  border-radius: 10px;
  padding: 12px 16px 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(120, 160, 220, 0.02) inset;
  pointer-events: none;
  user-select: none;
  animation: infoNeonPulse 6s ease-in-out infinite;
  display: flex;
  flex-direction: column;
}

@keyframes infoNeonPulse {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(0,0,0,0.4),
                0 0 0 1px rgba(120, 160, 220, 0.02) inset;
  }
  50% {
    box-shadow: 0 4px 32px rgba(0,0,0,0.4),
                0 0 0 1px rgba(120, 160, 220, 0.06) inset,
                0 0 24px rgba(120, 160, 220, 0.06);
  }
}

/* Clock row — flip digits */
.intro-top-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-bottom: 3px;
}

.intro-top-clock-sep {
  font-size: 1.35rem;
  font-weight: 200;
  color: rgba(120, 160, 220, 0.35);
  width: 0.25em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  animation: clockSepFade 1s ease-in-out infinite;
}

@keyframes clockSepFade {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.12; }
}

/* Flip digit container */
.flip-digit {
  position: relative;
  display: inline-block;
  width: 0.58em;
  height: 1.55rem;
  line-height: 1.55rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.72);
  perspective: 120px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(120, 160, 220, 0.04);
}

.flip-digit-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.flip-digit-el {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

.flip-digit-el.current {
  z-index: 2;
  animation: textGlowPulse 6s ease-in-out infinite;
}

.flip-digit-el.next {
  z-index: 1;
}

@keyframes textGlowPulse {
  0%, 100% {
    text-shadow: 0 0 6px rgba(120, 160, 220, 0.12);
  }
  50% {
    text-shadow: 0 0 2px rgba(120, 160, 220, 0.25), 0 0 14px rgba(120, 160, 220, 0.06);
  }
}

/* Flip out — old digit slides up and fades */
.flip-digit-el.flip-out {
  animation: digitFlipOut 0.3s ease-in forwards;
}

/* Flip in — new digit slides in from below */
.flip-digit-el.flip-in {
  animation: digitFlipIn 0.3s ease-out forwards;
}

@keyframes digitFlipOut {
  0% {
    transform: translateY(0) scaleY(1);
    opacity: 0.72;
  }
  100% {
    transform: translateY(-100%) scaleY(0.85);
    opacity: 0;
  }
}

@keyframes digitFlipIn {
  0% {
    transform: translateY(100%) scaleY(0.85);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scaleY(1);
    opacity: 0.72;
  }
}

/* Date row */
.intro-top-date {
  text-align: center;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(120, 160, 220, 0.04);
  font-weight: 400;
}

/* Info rows: icon + value (no text labels) */
.intro-top-info-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.15;
}

.intro-top-info-row svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  stroke: rgba(120, 160, 220, 0.55);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  filter: drop-shadow(0 0 3px rgba(120, 160, 220, 0.15));
}

.intro-top-info-row .info-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  font-weight: 350;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: none;
}

.intro-top-info-row .info-value strong {
  font-weight: 450;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 0 6px rgba(120, 160, 220, 0.08);
}

/* ─── Weather Widget ─── */
.intro-weather-widget {
  margin-top: 4px;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.intro-weather-widget.visible {
  opacity: 1;
  transform: translateY(0);
}
.intro-weather-current {
  display: flex;
  align-items: center;
  gap: 6px;
}
.intro-weather-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  fill: none;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.intro-weather-icon .sun-core { fill: #fbbf24; stroke: #fbbf24; }
.intro-weather-icon .sun-rays { stroke: #fbbf24; stroke-width: 1.2; }
.intro-weather-icon .cloud { stroke: rgba(200, 210, 230, 0.8); stroke-width: 1.5; }
.intro-weather-icon .rain-drop { stroke: #60a5fa; stroke-width: 1.2; }
.intro-weather-icon .snow-flake { stroke: #93c5fd; stroke-width: 1.2; }
.intro-weather-icon .lightning { stroke: #fbbf24; stroke-width: 1.5; }
.intro-weather-icon .fog-line { stroke: rgba(200, 210, 230, 0.5); stroke-width: 1.5; }
.intro-weather-temp {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}
.intro-weather-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: lowercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.intro-weather-forecast {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.intro-weather-day {
  flex: 1;
  text-align: center;
  font-size: 0.6rem;
  line-height: 1.3;
}
.intro-weather-day .day-name {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.intro-weather-day .day-icon {
  width: 16px;
  height: 16px;
  margin: 1px auto;
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.5;
  display: block;
}
.intro-weather-day .day-temp {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.6rem;
}
.intro-weather-day .day-temp-range {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.55rem;
}

/* Weather icon animations */
@keyframes weather-sun-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes weather-ray-rotate {
  from { transform: rotate(0deg); transform-origin: 12px 12px; }
  to { transform: rotate(360deg); transform-origin: 12px 12px; }
}
@keyframes weather-drop-fall {
  0% { transform: translateY(-2px); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: translateY(6px); opacity: 0; }
}
@keyframes weather-snow-fall {
  0% { transform: translateY(-1px) rotate(0deg); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(5px) rotate(90deg); opacity: 0; }
}
@keyframes weather-flicker {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.3; }
  50% { opacity: 1; }
  75% { opacity: 0.3; }
}
.weather-anim-sun { animation: weather-sun-pulse 3s ease-in-out infinite; }
.weather-anim-ray { animation: weather-ray-rotate 8s linear infinite; transform-origin: 12px 12px; }
.weather-anim-drop-1 { animation: weather-drop-fall 1.5s ease-in infinite; }
.weather-anim-drop-2 { animation: weather-drop-fall 1.8s ease-in 0.3s infinite; }
.weather-anim-drop-3 { animation: weather-drop-fall 1.4s ease-in 0.6s infinite; }
.weather-anim-snow-1 { animation: weather-snow-fall 2.5s ease-in infinite; }
.weather-anim-snow-2 { animation: weather-snow-fall 3s ease-in 0.5s infinite; }
.weather-anim-snow-3 { animation: weather-snow-fall 2.2s ease-in 1s infinite; }

/* ─── Wind Indicator ─── */
.intro-weather-wind {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.intro-wind-icon {
  width: 20px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  vertical-align: middle;
}
.intro-wind-icon line {
  transform-origin: 12px 8px;
}
.intro-wind-icon .wl1 { animation: wind-flow 2s ease-in-out infinite; }
.intro-wind-icon .wl2 { animation: wind-flow 2.5s ease-in-out 0.3s infinite; }
.intro-wind-icon .wl3 { animation: wind-flow 1.8s ease-in-out 0.6s infinite; }
@keyframes wind-flow {
  0%, 100% { transform: translateX(0); opacity: 0.35; }
  50% { transform: translateX(3px); opacity: 0.85; }
}
.wind-val {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  top: -0.5px;
}
.weather-anim-flicker { animation: weather-flicker 1.5s ease-in-out infinite; }

/* ─── Church Marker (custom Leaflet) ─── */
.intro-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(120, 160, 220, 0.4);
  border: 2px solid var(--intro-accent);
  box-shadow: 0 0 8px var(--intro-accent-glow);
  cursor: pointer;
  transition: all 0.4s ease;
}

.intro-marker-highlighted {
  width: 28px;
  height: 28px;
  background: rgba(201, 162, 39, 0.5);
  border-color: var(--intro-gold);
  box-shadow: 0 0 16px var(--intro-gold-glow), 0 0 32px rgba(201, 162, 39, 0.15);
}

.intro-marker-pulse {
  animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {
  0%, 100% {
    box-shadow: 0 0 8px var(--intro-accent-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--intro-accent-glow), 0 0 40px rgba(120, 160, 220, 0.15);
  }
}

/* ─── Loading / Preloader ─── */
.intro-preloader {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0e17;
  transition: opacity 0.8s ease;
}

.intro-preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-preloader-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(120, 160, 220, 0.1);
  border-top-color: var(--intro-accent);
  animation: preloaderSpin 1.2s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

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

.intro-preloader-text {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--intro-text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.intro-preloader-progress {
  margin-top: 12px;
  width: 160px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.intro-preloader-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--intro-accent), var(--intro-gold));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ─── Welcome Overlay (post-preloader countdown) ─── */
.intro-welcome-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.intro-welcome-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.intro-welcome-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ─── Timer Ring ─── */
.intro-welcome-timer {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 32px;
  animation: welcomeTimerIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes welcomeTimerIn {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.intro-welcome-timer-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.intro-welcome-timer-bg {
  fill: none;
  stroke: rgba(120, 160, 220, 0.08);
  stroke-width: 4;
}

.intro-welcome-timer-fill {
  fill: none;
  stroke: var(--intro-accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.intro-welcome-timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  animation: timerTextPulse 1s ease-in-out infinite;
}

@keyframes timerTextPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(120, 160, 220, 0.2); }
  50% { text-shadow: 0 0 40px rgba(120, 160, 220, 0.5), 0 0 80px rgba(120, 160, 220, 0.15); }
}

/* ─── Welcome Title ─── */
.intro-welcome-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 6px;
  text-transform: uppercase;
  animation: welcomeFadeSlideUp 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-welcome-subtitle {
  font-size: 0.85rem;
  color: var(--intro-text-muted);
  letter-spacing: 8px;
  text-transform: uppercase;
  margin-bottom: 48px;
  animation: welcomeFadeSlideUp 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes welcomeFadeSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ─── Welcome Buttons ─── */
.intro-welcome-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.intro-welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--intro-text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 160, 220, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  animation: welcomeBtnsIn 0.6s 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-welcome-btn:nth-child(2) { animation-delay: 0.8s; }
.intro-welcome-btn:nth-child(3) { animation-delay: 0.9s; }

.intro-welcome-btn:hover {
  background: rgba(120, 160, 220, 0.12);
  border-color: rgba(120, 160, 220, 0.3);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 20px rgba(120, 160, 220, 0.08);
}

.intro-welcome-btn:active {
  transform: translateY(0) scale(0.98);
}

.intro-welcome-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.intro-welcome-btn span {
  white-space: nowrap;
}

@keyframes welcomeBtnsIn {
  0% { opacity: 0; transform: translateY(16px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Welcome Hint (countdown text) ─── */
.intro-welcome-hint {
  font-size: 0.78rem;
  color: var(--intro-text-muted);
  letter-spacing: 1px;
  animation: welcomeFadeSlideUp 0.8s 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-welcome-hint span {
  color: var(--intro-accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .intro-welcome-title {
    font-size: 1.6rem;
    letter-spacing: 4px;
  }

  .intro-welcome-subtitle {
    font-size: 0.72rem;
    letter-spacing: 5px;
    margin-bottom: 32px;
  }

  .intro-welcome-btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  .intro-welcome-btn svg {
    width: 18px;
    height: 18px;
  }

  .intro-welcome-timer {
    width: 96px;
    height: 96px;
    margin-bottom: 24px;
  }

  .intro-welcome-timer-text {
    font-size: 2.2rem;
  }

  .intro-church-card-area {
    left: 12px;
    bottom: 72px;
    width: calc(100% - 24px);
    max-width: none;
    gap: 8px;
  }

  .intro-church-photo {
    border-radius: 12px;
  }

  .intro-church-card {
    max-width: none;
    padding: 16px;
  }

  .intro-church-card-image {
    width: 48px;
    height: 48px;
  }

  .intro-church-card-name {
    font-size: 1rem;
  }

  .intro-nav-buttons {
    bottom: 96px;
    right: 12px;
  }

  .intro-nav-btn {
    min-width: auto;
    padding: 6px 12px;
    font-size: 0.72rem;
  }

  .intro-nav-btn span.nav-label {
    display: none;
  }

  .intro-controls {
    bottom: 16px;
  }

  /* Collapsible card on mobile */
  .intro-church-card.collapsed {
    max-height: none;
  }
  .intro-church-card.collapsed .intro-church-card-body,
  .intro-church-card.collapsed .intro-church-card-footer {
    display: none !important;
  }

  /* Toggle button for collapsible card text */
  .intro-card-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.2);
    color: var(--intro-accent, #c9a227);
    font-size: 0.6rem;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
  }
  .intro-card-toggle:hover {
    background: rgba(201, 162, 39, 0.2);
    border-color: var(--intro-accent, #c9a227);
  }
  .intro-card-toggle svg {
    width: 12px;
    height: 12px;
  }

  .intro-digest-title {
    font-size: 1.4rem;
  }

  .intro-digest-text {
    font-size: 0.88rem;
  }
}

@media (max-width: 480px) {
  .intro-welcome-title {
    font-size: 1.3rem;
    letter-spacing: 3px;
  }

  .intro-welcome-subtitle {
    font-size: 0.65rem;
    letter-spacing: 4px;
    margin-bottom: 24px;
  }

  .intro-welcome-btn {
    padding: 10px 16px;
    font-size: 0.78rem;
    gap: 8px;
  }

  .intro-welcome-btn svg {
    width: 16px;
    height: 16px;
  }

  .intro-welcome-timer {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
  }

  .intro-welcome-timer-text {
    font-size: 1.8rem;
  }

  .intro-welcome-hint {
    font-size: 0.68rem;
  }

  .intro-church-card-area {
    bottom: 64px;
    gap: 6px;
  }

  .intro-church-photo {
    border-radius: 10px;
  }

  .intro-controls {
    padding: 8px 12px;
    bottom: 16px;
  }

  .intro-btn {
    width: 32px;
    height: 32px;
  }

  .intro-btn svg {
    width: 15px;
    height: 15px;
  }

  .intro-nav-btn {
    padding: 5px 10px;
    font-size: 0.65rem;
  }

  .intro-church-card {
    padding: 12px;
  }
}

/* ─── Mobile Portrait: Phone Rotation Hint (new v0.63.0) ─── */
.intro-welcome-rotate-hint {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.intro-welcome-rotate-hint.active {
  opacity: 1;
}

.intro-welcome-rotate-hint svg {
  width: 80px;
  height: 80px;
  fill: none;
  stroke: var(--intro-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px var(--intro-accent-glow));
}

.intro-welcome-rotate-hint .rotate-hint-text {
  font-size: 0.82rem;
  color: var(--intro-text-secondary);
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.5;
  max-width: 240px;
}

/* Phone rotate animation — counter-clockwise */
@keyframes phoneRotateHint {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(0deg); }
  70% { transform: rotate(-90deg); }
  100% { transform: rotate(-90deg); }
}

.rotate-arrow-path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: rotateArrowDash 3s ease-in-out infinite;
}

.rotate-arrow-head {
  animation: rotateArrowHead 3s ease-in-out infinite;
}

@keyframes rotateArrowDash {
  0% { stroke-dashoffset: 120; }
  40% { stroke-dashoffset: 120; }
  65% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

@keyframes rotateArrowHead {
  0% { opacity: 0; }
  55% { opacity: 0; }
  70% { opacity: 1; }
  100% { opacity: 1; }
}

.phone-rotate-group {
  animation: phoneRotateHint 3s ease-in-out infinite;
  transform-origin: 55px 55px;
}

/* ─── Mobile Portrait Welcome (phone in portrait) ─── */
@media (orientation: portrait) and (max-width: 768px) {
  body:has(.intro-player) .intro-welcome-rotate-hint {
    display: flex !important;
  }

  .intro-welcome-overlay.active .intro-welcome-rotate-hint {
    opacity: 1;
  }

  .intro-welcome-overlay.active .intro-welcome-timer {
    display: none !important;
  }

  .intro-welcome-overlay.active .intro-welcome-start-sound {
    display: none !important;
  }

  .intro-welcome-overlay.active .intro-welcome-hint {
    display: none !important;
  }

  .intro-welcome-title {
    font-size: 1.5rem;
    letter-spacing: 4px;
  }

  .intro-welcome-subtitle {
    font-size: 0.68rem;
    letter-spacing: 5px;
    margin-bottom: 24px;
  }
}

/* ─── Mobile Landscape Welcome (phone rotated to landscape) ─── */
@media (orientation: landscape) and (max-height: 500px) {
  body:has(.intro-player) .intro-welcome-rotate-hint {
    display: none !important;
  }

  .intro-welcome-overlay.active .intro-welcome-timer {
    display: flex !important;
  }

  .intro-welcome-overlay.active .intro-welcome-start-sound {
    display: flex !important;
  }

  .intro-welcome-overlay.active .intro-welcome-hint {
    display: block !important;
  }

  .intro-welcome-title {
    font-size: 1.3rem;
    letter-spacing: 3px;
  }

  .intro-welcome-subtitle {
    font-size: 0.6rem;
    letter-spacing: 4px;
    margin-bottom: 12px;
  }

  .intro-welcome-timer {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
  }

  .intro-welcome-timer-text {
    font-size: 1.5rem;
  }

  .intro-welcome-btn {
    padding: 8px 14px;
    font-size: 0.72rem;
    gap: 6px;
  }

  .intro-welcome-btn svg {
    width: 14px;
    height: 14px;
  }

  .intro-welcome-start-sound {
    padding: 8px 16px;
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .intro-welcome-hint {
    font-size: 0.65rem;
    margin-top: 4px;
  }
}

/* ─── Mobile Landscape Slideshow (phone in landscape during playback) ─── */
@media (orientation: landscape) and (max-height: 520px) {
  /* Map fills full screen (behind card area) */
  .intro-map {
    right: 0 !important;
    width: 100% !important;
  }

  /* Church card area: left 35%, bottom up from footer */
  .intro-church-card-area {
    left: 10px;
    bottom: 48px;
    max-width: 38%;
    width: 38%;
    gap: 4px;
    z-index: 10;
  }

  /* Church photo smaller — fits between top edge and card */
  .intro-church-photo {
    border-radius: 10px;
    max-height: calc(100vh - 95px);
    overflow: hidden;
    flex-shrink: 1;
  }

  .intro-church-photo img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }

  /* Card smaller */
  .intro-church-card {
    max-width: none;
    width: 100%;
    padding: 10px 12px;
    max-height: 45vh;
    border-radius: 12px;
  }

  /* Collapsed card: only header visible */
  .intro-church-card.collapsed {
    max-height: none;
  }

  .intro-church-card.collapsed .intro-church-card-body,
  .intro-church-card.collapsed .intro-church-card-footer {
    display: none;
  }

  .intro-church-card-image {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .intro-church-card-header {
    gap: 8px;
    margin-bottom: 4px;
  }

  .intro-church-card-name {
    font-size: 0.78rem;
  }

  /* Toggle button for collapsible card text */
  .intro-card-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.2);
    color: var(--intro-accent, #c9a227);
    font-size: 0.6rem;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
  }
  .intro-card-toggle:hover {
    background: rgba(201, 162, 39, 0.2);
    border-color: var(--intro-accent, #c9a227);
  }
  .intro-card-toggle svg {
    width: 12px;
    height: 12px;
  }

  .intro-church-card-type {
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    padding: 1px 8px;
  }

  .intro-church-card-desc {
    font-size: 0.65rem;
    line-height: 1.5;
    max-height: 60px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .intro-church-card-text {
    font-size: 0.65rem;
    line-height: 1.5;
    max-height: 80px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .intro-church-card-footer {
    margin-top: 4px;
    padding-top: 4px;
  }

  .intro-card-footer-right {
    gap: 4px;
  }

  /* Chronicle (digest) overlay */
  .intro-digest-overlay {
    max-width: 40%;
    left: 12px;
    bottom: 52px;
    padding: 16px 20px;
    border-radius: 14px;
  }

  .intro-digest-card {
    max-width: none;
    padding: 14px 18px;
    border-radius: 14px;
  }

  .intro-digest-card-title {
    font-size: 1rem;
  }

  .intro-digest-card-text {
    font-size: 0.7rem;
    line-height: 1.6;
    max-height: 100px;
  }

  .intro-digest-card-date {
    font-size: 0.6rem;
  }

  /* Holiday card */
  .intro-holiday-card {
    max-width: 35%;
    bottom: 56px;
    left: 12px;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .intro-holiday-card-title {
    font-size: 0.95rem;
  }

  .intro-holiday-card-desc {
    font-size: 0.7rem;
    max-height: 80px;
  }

  /* Top info panel (clock, weather) */
  .intro-top-info {
    top: 8px;
    right: 8px;
    padding: 8px 12px;
    max-width: 160px;
    border-radius: 10px;
  }

  .intro-top-clock {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }

  .intro-top-date {
    font-size: 0.58rem;
    letter-spacing: 1px;
    margin-bottom: 3px;
  }

  .intro-top-info-row {
    font-size: 0.62rem;
    gap: 4px;
    margin-bottom: 1px;
  }

  .intro-top-info-row svg {
    width: 10px;
    height: 10px;
  }

  .intro-top-info-row .info-value {
    max-width: 100px;
    font-size: 0.62rem;
  }

  .intro-weather-widget {
    padding: 2px 0;
    margin-top: 2px;
  }

  .intro-weather-current {
    font-size: 0.62rem;
    gap: 4px;
  }

  .intro-weather-current svg {
    width: 16px;
    height: 16px;
  }

  .intro-weather-temp {
    font-size: 0.95rem;
  }

  .intro-weather-feels {
    font-size: 0.6rem;
  }

  .intro-weather-wind {
    font-size: 0.6rem;
    gap: 1px;
  }
  .intro-wind-icon {
    width: 16px;
    height: 11px;
  }
  .wind-val {
    font-size: 0.6rem;
  }

  /* Controls bar at bottom */
  .intro-controls {
    padding: 4px 10px;
    gap: 4px;
    bottom: 16px;
    height: 40px;
  }

  .intro-btn {
    width: 28px;
    height: 28px;
  }

  .intro-btn svg {
    width: 13px;
    height: 13px;
  }

  .intro-btn-sm {
    width: 24px;
    height: 24px;
  }

  .intro-btn-sm svg {
    width: 11px;
    height: 11px;
  }

  .intro-top-toggle-row .intro-btn-sm {
    width: 22px;
    height: 22px;
  }
  .intro-top-toggle-row .intro-btn-sm svg {
    width: 10px;
    height: 10px;
  }
  .intro-top-toggle-row {
    gap: 4px;
    margin-top: 3px;
  }
  .intro-btn-spacer {
    height: 12px;
  }

  .intro-chronicle-section-title {
    font-size: 0.68rem;
  }

  .intro-chronicle-section-text {
    font-size: 0.62rem;
    line-height: 1.5;
    max-height: 70px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Navigation buttons (bottom-right) */
  .intro-nav-buttons {
    bottom: 66px;
    right: 8px;
    gap: 4px;
  }

  .intro-nav-btn {
    padding: 4px 8px;
    font-size: 0.58rem;
    min-width: auto;
    border-radius: 6px;
    gap: 4px;
  }

  .intro-nav-btn svg {
    width: 12px;
    height: 12px;
  }

  .intro-nav-btn span.nav-label {
    display: none;
  }

  /* Progress bars */
  .intro-progress {
    padding: 3px 4px 0;
    gap: 2px;
  }

  .intro-progress-bar {
    height: 1.5px;
  }

  /* Compact footer */
  body:has(.intro-player) .site-footer--compact {
    padding: 3px 10px;
    min-height: 24px;
    font-size: 0.55rem;
  }

  body:has(.intro-player) .site-footer--compact .footer-brand span {
    font-size: 0.65rem;
  }

  body:has(.intro-player) .site-footer--compact .footer-links a {
    font-size: 0.58rem;
  }

  /* Chronicle preslide (digest intro screen) */
  .intro-chronicle-preslide {
    max-width: 75%;
    padding: 24px 32px;
  }

  .intro-chronicle-preslide-label {
    font-size: 0.7rem;
  }

  .intro-chronicle-preslide-title {
    font-size: 1.6rem;
  }

  .intro-chronicle-preslide-text {
    font-size: 0.8rem;
    line-height: 1.6;
  }

  .intro-chronicle-preslide-footer {
    font-size: 0.65rem;
  }

  /* Holiday pre-welcome slide */
  .intro-holiday-slide {
    max-width: 80%;
    padding: 20px 16px;
  }

  .intro-holiday-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
  }

  .intro-holiday-name {
    font-size: 1.3rem;
    letter-spacing: 2px;
  }

  .intro-holiday-saint {
    font-size: 0.8rem;
  }

  .intro-holiday-desc {
    font-size: 0.75rem;
    max-height: 80px;
  }

  /* Digest card (first slide — ежедневная летопись) */
  .intro-digest-card {
    top: 15px;
    bottom: auto;
    padding: 16px 20px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .intro-digest-card-label {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }
  .intro-digest-card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
  .intro-digest-card-text {
    flex: 1;
    min-height: 0;
    max-height: none;
    font-size: 0.72rem;
    line-height: 1.55;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .intro-digest-card-footer {
    font-size: 0.55rem;
    margin-top: 6px;
  }
}

/* ════════════════════════════════════════════════════════════
   Pre-Welcome Slides (v0.57.0) — Holiday & Chronicle Digest
   Показываются до приветствия после загрузки прелоадера
   ════════════════════════════════════════════════════════════ */

/* ─── Interstitial Slides Container ─── */
.intro-pre-welcome {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10,14,23,0.92) 0%, rgba(5,7,14,0.96) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.intro-pre-welcome.active {
  opacity: 1;
  pointer-events: auto;
}

.intro-pre-welcome.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* ─── Holiday Slide ─── */
.intro-holiday-slide {
  text-align: center;
  max-width: 600px;
  padding: 40px 24px;
  animation: holidayFadeIn 1s ease-out;
}

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

.intro-holiday-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  position: relative;
}

.intro-holiday-icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,0.15) 0%, transparent 70%);
  animation: holidayGlow 3s ease-in-out infinite;
}

@keyframes holidayGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.intro-holiday-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--intro-gold);
  stroke-width: 1.5;
  position: relative;
  z-index: 1;
}

.intro-holiday-title {
  font-family: var(--font-display, 'Georgia', 'Times New Roman', serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--intro-gold);
  text-shadow: 0 0 30px var(--intro-gold-glow), 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.intro-holiday-saint {
  font-family: var(--font-display, 'Georgia', 'Times New Roman', serif);
  font-size: 1rem;
  color: var(--intro-text-secondary);
  margin-bottom: 16px;
  font-style: italic;
}

.intro-holiday-description {
  font-size: 0.95rem;
  color: var(--intro-text-primary);
  line-height: 1.7;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto;
}

.intro-holiday-date {
  font-size: 0.75rem;
  color: var(--intro-text-muted);
  margin-top: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ─── Chronicle Digest Pre-Slide ─── */
.intro-chronicle-preslide {
  text-align: center;
  max-width: 640px;
  padding: 40px 24px;
  animation: holidayFadeIn 1s ease-out 0.2s both;
}

.intro-chronicle-preslide-label {
  font-family: var(--font-display, 'Georgia', 'Times New Roman', serif);
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--intro-text-muted);
  margin-bottom: 8px;
}

.intro-chronicle-preslide-title {
  font-family: var(--font-display, 'Georgia', 'Times New Roman', serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--intro-text-primary);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 16px;
}

.intro-chronicle-preslide-text {
  font-size: 0.9rem;
  color: var(--intro-text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 8px;
}

.intro-chronicle-preslide-footer {
  font-size: 0.7rem;
  color: var(--intro-text-muted);
  margin-top: 20px;
  letter-spacing: 2px;
}

/* ─── Golden Pulsing Map Markers — силуэты храмов (v0.57.2) ─── */
.intro-marker-pulse {
  position: absolute;
  width: 24px;
  height: 32px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  filter: drop-shadow(0 0 4px var(--intro-gold-glow)) drop-shadow(0 0 10px rgba(201,162,39,0.2));
  transition: filter 0.3s ease, transform 0.3s ease;
  animation: markerPulse 2.5s ease-in-out infinite;
}

.intro-marker-pulse:hover {
  filter: drop-shadow(0 0 8px var(--intro-gold-glow)) drop-shadow(0 0 20px rgba(201,162,39,0.3));
  transform: scale(1.15);
  z-index: 20;
}

@keyframes markerPulse {
  0%   { filter: drop-shadow(0 0 3px var(--intro-gold-glow)) drop-shadow(0 0 6px rgba(201,162,39,0.15)); opacity: 0.7; }
  50%  { filter: drop-shadow(0 0 8px var(--intro-gold-glow)) drop-shadow(0 0 18px rgba(201,162,39,0.35)); opacity: 1; }
  100% { filter: drop-shadow(0 0 3px var(--intro-gold-glow)) drop-shadow(0 0 6px rgba(201,162,39,0.15)); opacity: 0.7; }
}

/* When in pre-welcome mode, markers pulse more prominently */
.intro-pre-welcome-mode .intro-marker-pulse {
  filter: drop-shadow(0 0 8px var(--intro-gold-glow)) drop-shadow(0 0 24px rgba(201,162,39,0.2)) !important;
  animation-duration: 2s;
}


/* ─── Active Church Marker — иконка храма + большой золотой круг ─── */
.intro-marker-active {
  position: absolute;
  pointer-events: none;
  z-index: 30;
}

.intro-marker-active-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: markerActivePulse 2.5s ease-in-out infinite;
}

.intro-marker-active-ring svg {
  display: block;
}

.intro-marker-active-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  filter: drop-shadow(0 0 8px rgba(201,162,39,0.5)) drop-shadow(0 0 20px rgba(201,162,39,0.2));
}

.intro-marker-active-icon svg {
  display: block;
}

@keyframes markerActivePulse {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50%  { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
}

/* ─── Responsive for pre-welcome slides ─── */
@media (max-width: 600px) {
  .intro-holiday-title {
    font-size: 1.3rem;
  }
  .intro-holiday-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
  }
  .intro-holiday-description {
    font-size: 0.82rem;
  }
  .intro-chronicle-preslide-title {
    font-size: 1.3rem;
  }
  .intro-chronicle-preslide-text {
    font-size: 0.82rem;
  }
}
