/* ============================================================
   EI App — component overrides
   Sits ON TOP of ei-tokens.css + ei-app-styles.css (design system).
   Only contains components/UI NOT covered by the design system:
   - Bottom tab nav (5-tab pattern, mine)
   - Audio player modal sheet (mine)
   - Premium locked overlay on cards (mine)
   - Boot splash (mine)
   - Empty states
   ============================================================ */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  font-family: var(--app-font, 'Montserrat', system-ui, sans-serif);
  background: linear-gradient(180deg, var(--app-cream-1) 0%, var(--app-cream-2) 100%);
  color: var(--app-text, #1f2d3d);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* App shell — viewport-locked container. Header + tabs are static flex
   items at top/bottom; the .app-main in between is the sole scroll surface
   so header and tabs never leave the screen. */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: linear-gradient(180deg, var(--app-cream-1) 0%, var(--app-cream-2) 100%);
  color: var(--app-text, #1f2d3d);
  overflow: hidden;
}

/* Header — uses ei-app-header from design system. Stays pinned at top of
   the shell as a static flex item; never scrolls with content. */
.app-header {
  flex: 0 0 auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  background: linear-gradient(180deg, var(--app-cream-1) 0%, var(--app-cream-1) 100%);
  border-bottom: 1px solid var(--app-border-soft, #f0e6d0);
  z-index: 25;
}

/* Main scrolling area — the only scroll surface in the shell */
.app-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 12px;
  overscroll-behavior: contain;
}

/* ============================================================
   Bottom tab nav (6 tabs: Inicio · Iglesias · Niños · Biblia · Vida · Cuenta)
   ============================================================ */
.app-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--app-card, #fff);
  border-top: 1px solid var(--app-border, #e8dfc8);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 240; /* above full-screen ar-screens (235) so the tab bar stays visible */
}
.app-tabs button {
  background: none;
  border: none;
  padding: 10px 2px 8px;
  font-size: 0.62rem;
  color: var(--app-muted, #8a7e64);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  font-weight: 600;
}
/* 6 tabs: keep each label on a single line so columns stay aligned. */
.app-tabs button > span:last-child {
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-tabs button .tab-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.app-tabs button .tab-icon svg {
  width: 23px; height: 23px; display: block;
}
/* Outline icon at rest, filled silhouette when active (Glorify/Theo pattern).
   Filled variants cut face/spine details with var(--app-card) so they read
   as holes on both light and dark tab bars. */
.app-tabs button .tab-icon .ic-f { display: none; }
.app-tabs button.active .tab-icon .ic-o { display: none; }
.app-tabs button.active .tab-icon .ic-f { display: block; }
/* Tabs use full-colour watercolour tile images: dim at rest, full when active. */
.app-tabs button .tab-icon img.tab-img { width: 25px; height: 25px; border-radius: 7px; display: block; opacity: 0.5; transition: opacity .15s ease; }
.app-tabs button.active .tab-icon img.tab-img { opacity: 1; }
.app-tabs button.active { color: var(--app-navy-2, #123c68); }
.app-tabs button.premium-locked::after {
  content: "🔒";
  position: absolute;
  top: 4px;
  right: 28%;
  font-size: 0.6rem;
}

/* ============================================================
   Section visibility (tab routing)
   ============================================================ */
.section { display: none; }
.section.active { display: block; }

/* ── Micro-animations — subtle premium polish ─────────────────
   Section fades+rises on tab switch; tappable surfaces press-scale.
   Disabled under prefers-reduced-motion. */
@keyframes ei-section-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.section.active { animation: ei-section-enter 0.30s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

.card, .ei-tile, .acc-premium, .bible-book-tile, .app-tabs button, .btn {
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:active, .ei-tile:active, .acc-premium:active,
.app-tabs button:active, .btn:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  .section.active { animation: none; }
  .card, .ei-tile, .acc-premium, .bible-book-tile, .app-tabs button, .btn { transition: none; }
  .card:active, .ei-tile:active, .acc-premium:active,
  .app-tabs button:active, .btn:active { transform: none; }
}

/* ============================================================
   Generic cards + buttons (fallback when not using ei-* classes)
   ============================================================ */
.card {
  background: var(--app-card, #fff);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 16px;
  border: 1px solid var(--app-border-soft, #f0e6d0);
  box-shadow: 0 1px 3px rgba(13,40,70,0.04);
}
.card-hero {
  background: linear-gradient(135deg, var(--ink-navy-2, #123c68) 0%, var(--ink-navy-3, #1f4c84) 100%);
  color: #fff;
  padding: 20px;
}
.card-hero h2 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; }
/* Niños hero — warm and kid-friendly (the navy block read corporate/cold).
   Fixed warm surface → fixed ink text (never the inverting --app-navy-*). */
[data-section="ninos"] .card-hero {
  background: linear-gradient(135deg, #ffe9b8 0%, #ffd98a 55%, #f7c463 100%);
  color: var(--ink-navy-1, #0d2846);
}
[data-section="ninos"] .card-hero p { opacity: 1; color: var(--ink-navy-2, #123c68); }
.card-hero p  { margin: 0; opacity: 0.85; font-size: 0.95rem; line-height: 1.5; }
.card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--app-text-strong, #0d2846); }
.card .card-meta { font-size: 0.83rem; color: var(--app-muted, #8a7e64); line-height: 1.4; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary { background: var(--ink-navy-2, #123c68); color: #fff; }
.btn-accent  { background: var(--app-gold);   color: var(--ink-navy-1, #0d2846); }
.btn-ghost   { background: transparent; color: var(--app-navy-2); border: 1px solid var(--app-navy-2); }
.btn-premium { background: linear-gradient(135deg, var(--app-gold-bright), var(--app-gold)); color: var(--ink-navy-1, #0d2846); }
.btn-block   { width: 100%; }

/* ============================================================
   Premium banner (kept from MVP, restyled with new palette)
   ============================================================ */
.premium-banner {
  background: linear-gradient(135deg, var(--app-gold-bright), var(--app-gold-deep));
  padding: 14px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 12px;
  cursor: pointer;
  color: var(--ink-navy-1, #0d2846);
  box-shadow: 0 4px 14px rgba(184,127,28,0.22);
}
.premium-banner .pb-icon { font-size: 1.5rem; }
.premium-banner .pb-text { flex: 1; }
.premium-banner .pb-title { font-weight: 800; font-size: 0.92rem; letter-spacing: -0.005em; }
.premium-banner .pb-subtitle { font-size: 0.78rem; opacity: 0.85; }
.premium-banner .pb-arrow { font-size: 1.2rem; font-weight: 700; }

/* ============================================================
   Pilgrimage check-in prompt (Home, shown when within 100m of EI church)
   ============================================================ */
.ei-pilgrimage-prompt {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--app-gold-bright), var(--app-gold));
  color: var(--ink-navy-1, #0d2846);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(184,127,28,0.22);
  border: 2px solid rgba(255,255,255,0.4);
  animation: ei-pilg-pulse 2.2s ease-in-out infinite;
}
.ei-pilgrimage-prompt .pp-icon { font-size: 1.6rem; }
.ei-pilgrimage-prompt .pp-body { flex: 1; min-width: 0; }
.ei-pilgrimage-prompt .pp-title { font-weight: 800; font-size: 0.95rem; letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ei-pilgrimage-prompt .pp-sub { font-size: 0.78rem; opacity: 0.88; margin-top: 2px; }
.ei-pilgrimage-prompt .pp-arrow { font-size: 1.3rem; font-weight: 700; }
@keyframes ei-pilg-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(184,127,28,0.22); }
  50%      { box-shadow: 0 4px 22px rgba(184,127,28,0.42); }
}

/* Hide all pre-purchase upsell once the user is Premium.
   Pairs with body.is-premium toggle from app.js loadSubscriptionStatus(). */
body.is-premium .premium-banner,
body.is-premium .ei-ad-banner,
body.is-premium .ei-ad-native,
body.is-premium [data-premium-hide],
body.is-premium .lock-overlay,
body.is-premium .app-tabs button.premium-locked::after { display: none !important; }

/* Premium-only state for the Cuenta tab subscription card.
   Markup with [data-premium-only] shows when user IS premium. */
[data-premium-only] { display: none; }
body.is-premium [data-premium-only] { display: block; }
body.is-premium [data-premium-hide] { display: none !important; }

/* Cuenta login state — gated by body.is-logged-in / .is-guest (auth.js).
   Both hidden until auth resolves so the "regístrate" card never flashes
   while logged in, and account cards never flash while logged out. */
#cuentaLoggedOut, #cuentaLoggedIn, #cuentaActions { display: none; }
body.is-guest #cuentaLoggedOut { display: block; }
body.is-logged-in #cuentaLoggedIn { display: flex; }
body.is-logged-in #cuentaActions { display: block; }

/* ── Cuenta redesign ─────────────────────────────────────────
   Navy hero (guest + logged-in) + grouped row sections with
   watercolour tile icons. Replaces the flat stack of white cards. */
.acc-hero--guest {
  background: linear-gradient(135deg, #1f4c84 0%, #123c68 100%);
  color: #fff; border-radius: 18px; padding: 26px 20px 22px;
  text-align: center; margin-bottom: 14px;
}
.acc-hero--guest .acc-hero__lamb { width: 64px; height: 64px; border-radius: 16px; }
.acc-hero__title { font-size: 1.18rem; font-weight: 800; margin: 12px 0 4px; }
.acc-hero__sub { font-size: 0.84rem; color: rgba(255,255,255,0.82); margin: 0 0 18px; line-height: 1.5; }
.btn-gold { background: var(--app-gold, #d4a942); color: #1a1206; font-weight: 800; }
.btn-ghost-light { background: transparent; border: 1.5px solid rgba(255,255,255,0.4); color: #fff; }

.acc-group { margin: 18px 0 0; }
.acc-group__h { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--app-muted, #8a7e64); margin: 0 6px 8px; }
.acc-rows { background: var(--app-card, #fff); border: 1px solid var(--app-border-soft, #f0e6d0);
  border-radius: 16px; overflow: hidden; }
.acc-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: none; border: none; border-bottom: 1px solid var(--app-border-soft, #f0e6d0);
  font-family: inherit; font-size: 0.95rem; color: var(--app-text-strong, #0d2846); text-align: left; cursor: pointer; }
.acc-rows .acc-row:last-child { border-bottom: none; }
.acc-row:active { background: rgba(217,160,40,0.06); }
.acc-row__ic { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; display: flex;
  align-items: center; justify-content: center; font-size: 1.2rem; background: var(--app-card-soft, #fffdf7);
  overflow: hidden; }
.acc-row__ic img.acc-tile { width: 36px; height: 36px; border-radius: 11px; display: block; }
.acc-row__tx { flex: 1 1 auto; font-weight: 600; min-width: 0; }
.acc-row__meta { color: var(--app-muted, #8a7e64); font-size: 0.82rem; font-weight: 500; margin-left: 4px; }
.acc-row__ch { flex: 0 0 auto; color: var(--app-muted, #8a7e64); font-size: 1.15rem; line-height: 1; }

/* Auto "Premium" badge on any premium-gated settings row (no per-row markup). */
.acc-row[data-premium-gate] .acc-row__ch::before {
  content: "Premium";
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1206;
  background: linear-gradient(135deg, #f5d77a, #d4a017);
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 9px;
  vertical-align: middle;
}

/* Self-contained toggle for the notifications sheet (ei-switch has no :checked CSS). */
.notif-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.notif-switch input { opacity: 0; width: 0; height: 0; }
.notif-switch__t { position: absolute; inset: 0; background: var(--app-border, #d8d2c4); border-radius: 999px; transition: 0.2s; cursor: pointer; }
.notif-switch__t::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.notif-switch input:checked + .notif-switch__t { background: #0d9a4f; }
.notif-switch input:checked + .notif-switch__t::before { transform: translateX(20px); }
.notif-switch input:disabled + .notif-switch__t { opacity: 0.4; cursor: default; }

.acc-premium { text-align: left; margin: 14px 0 0; border-radius: 16px;
  padding: 16px 18px; cursor: pointer; font-family: inherit;
  background: linear-gradient(160deg, rgba(232,197,105,0.20), rgba(217,160,40,0.07));
  border: 1.5px solid var(--app-gold, #d4a942); }
.acc-premium--cta { display: block; width: 100%; }
.acc-premium h3 { margin: 0 0 4px; color: var(--app-gold-deep, #b8801c); }
.acc-premium .card-meta { margin: 0; }

.acc-logout { display: none; width: 100%; margin: 16px 0 4px; background: none; border: none;
  color: #dc3545; font-weight: 700; font-family: inherit; font-size: 0.95rem; padding: 12px; cursor: pointer; }
body.is-logged-in .acc-logout, body.is-logged-in [data-logged-in-only] { display: block; }
[data-logged-in-only] { display: none; }
.acc-about { text-align: center; padding: 18px 0 8px; }

/* Generic inline spinner — loading states (nearby search, fetches).
   A text-only "Buscando…" reads like a crash; the motion says "working". */
.ei-spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--app-border, #e8dfc8);
  border-top-color: var(--app-navy-2, #123c68);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: eiSpin 0.9s linear infinite;
}
@keyframes eiSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ei-spinner { animation-duration: 2s; } }

/* ============================================================
   Story / affirmation card grids (kept from MVP)
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 0 16px; }

.story-card {
  background: var(--app-card-soft, #fffdf7);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--app-border-soft, #f0e6d0);
  box-shadow: 0 2px 8px rgba(13, 40, 70, 0.06);
  display: flex; flex-direction: column;
}
.story-card .thumb {
  width: 100%; flex: 1 1 auto; min-height: 0;
  background: linear-gradient(135deg, var(--ink-navy-3, #1f4c84) 0%, var(--ink-navy-2, #123c68) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: rgba(255,255,255,0.55);
}
.story-card .meta {
  padding: 7px 10px 9px;
  flex: 0 0 auto;
  display: flex; flex-direction: column; justify-content: center;
}
.story-card .meta h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--app-text-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card .lock-overlay {
  /* Discreet corner badge — the artwork stays fully visible so the grid
     feels warm and inviting (locked != dark). Fixed gold surface → fixed
     ink text per the token rule. */
  position: absolute; top: 6px; right: 6px;
  background: linear-gradient(135deg, #f5d36a 0%, #d9a028 100%);
  border-radius: 999px;
  padding: 3px 9px 3px 7px;
  display: flex; align-items: center; flex-direction: row; gap: 3px;
  box-shadow: 0 2px 6px rgba(13, 40, 70, 0.28);
}
.story-card .lock-overlay .lock-icon { font-size: 0.72rem; line-height: 1; }
.story-card .lock-overlay .lock-label {
  color: var(--ink-navy-1, #0d2846); font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: none; padding: 0; border-radius: 0;
}

.affirmation-card { aspect-ratio: 9/16; max-height: 320px; }
.affirmation-card .thumb {
  height: 100%; padding: 16px; text-align: center;
  font-size: 0.88rem; line-height: 1.4; color: #fff; font-weight: 500;
}
.affirmation-card[data-cat="identidad"] .thumb { background: linear-gradient(135deg, #1f4c84 0%, #4a7fc0 100%); }
.affirmation-card[data-cat="coraje"]    .thumb { background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%); }
.affirmation-card[data-cat="amor"]      .thumb { background: linear-gradient(135deg, #e91e63 0%, #f06292 100%); }
.affirmation-card[data-cat="paz"]       .thumb { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); }
.affirmation-card[data-cat="gratitud"]  .thumb { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }

/* ============================================================
   Audio player modal (kept from MVP)
   ============================================================ */
.audio-player {
  position: fixed;
  inset: 0;
  background: rgba(13,40,70,0.55);
  z-index: 250; /* above tab bar (240) + ar-screen readers (235) */
  display: none;
  align-items: flex-end;
}
.audio-player.open { display: flex; }
.audio-player-sheet {
  background: var(--app-card, #fff);
  width: 100%;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 80vh;
  overflow-y: auto;
}
.audio-player-sheet .drag-handle { width: 40px; height: 4px; background: var(--app-border); border-radius: 2px; margin: 0 auto 16px; }
.audio-player-sheet h3 { margin: 0 0 4px; font-size: 1.1rem; color: var(--app-text-strong); font-weight: 700; }
.audio-player-sheet .ap-genre { color: var(--app-gold-deep, #b8860b); font-size: 0.8rem; font-weight: 600; margin: 0 0 4px; }
.audio-player-sheet .ref { color: var(--app-muted); font-size: 0.85rem; margin-bottom: 14px; }
.audio-player-sheet .body { font-size: 0.93rem; line-height: 1.6; color: var(--app-text); }
.audio-player-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; margin: 20px 0;
}
.audio-player-controls button {
  background: none; border: none;
  font-size: 1.4rem; color: var(--app-navy-2);
  width: 44px; height: 44px; cursor: pointer;
}
.audio-player-controls .play-pause {
  background: var(--ink-navy-2, #123c68); color: #fff;
  width: 64px; height: 64px; border-radius: 50%;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(13,40,70,0.25);
}
/* ⏮/⏭ worship-queue skip buttons: slimmer + softer than the seek arrows so
   the 5-button transport row stays balanced and fits narrow screens. */
.audio-player-controls .ap-skip { width: 34px; font-size: 1.15rem; opacity: 0.8; }
.audio-player-controls .ap-skip:active { opacity: 1; transform: scale(0.92); }
.audio-progress {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.78rem; color: var(--app-muted);
  font-variant-numeric: tabular-nums;
}
.audio-progress .bar {
  flex: 1; height: 4px; background: var(--app-border); border-radius: 2px; position: relative;
  cursor: pointer;
  touch-action: none;
  position: relative;
}
/* widen the touch target without changing the visual bar */
.audio-progress .bar::before {
  content: ''; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px;
}
.audio-progress .bar .fill {
  position: absolute; inset: 0;
  background: var(--app-gold);
  width: 0%; border-radius: 2px;
}

/* ============================================================
   Empty states
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--app-muted);
}
.empty-state .icon { font-size: 3rem; opacity: 0.5; margin-bottom: 12px; }
.empty-state h3 { color: var(--app-text-strong); margin: 0 0 8px; }

/* ============================================================
   Section header alias (mapping to ei-section-h)
   Allows my old .section-header markup to render correctly
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 16px 10px;
}
.section-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--app-text-strong);
  letter-spacing: -0.01em;
}
.section-header a {
  color: var(--app-navy-2);
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 600;
}


/* ============================================================
   Vida filters — lang + country selectors at top of Vida tab
   ============================================================ */
.vida-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 4px;
}
.vida-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vida-filter > span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--app-muted, #8a7e64);
}
.vida-filter > select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--app-border, #e8dfc8);
  border-radius: 10px;
  font-size: 0.88rem;
  background: var(--app-card, #fff);
  color: var(--app-text, #1f2d3d);
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%231f4c84' d='M6 8L1.5 3.5h9z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.vida-filter > select:focus { border-color: var(--app-navy-2); }


/* ============================================================
   Background-music picker (js/app.js openMusicPicker)
   ============================================================ */
.ei-mp-overlay {
  position: fixed; inset: 0; z-index: 2200;
  background: rgba(13,40,70,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.ei-mp-overlay.open { opacity: 1; pointer-events: auto; }
.ei-mp-sheet {
  width: 100%; max-width: 520px;
  background: var(--app-card, #fff);
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
  transform: translateY(100%); transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
  max-height: 80vh; overflow-y: auto;
}
.ei-mp-overlay.open .ei-mp-sheet { transform: translateY(0); }
.ei-mp-handle { width: 42px; height: 5px; border-radius: 999px; background: var(--app-border); margin: 8px auto 14px; }
.ei-mp-title { margin: 0 4px 2px; font-size: 1.1rem; color: var(--app-text-strong, #0d2846); }
.ei-mp-help  { margin: 0 4px 14px; font-size: 0.82rem; color: var(--app-muted); line-height: 1.4; }
.ei-mp-list  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ei-mp-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 14px; border-radius: 14px;
  background: var(--app-card-soft, #fffdf7); border: 1.5px solid var(--app-border-soft, #f0e6d0);
  cursor: pointer; font-family: inherit; text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.ei-mp-row.active { border-color: var(--app-gold); background: rgba(217,160,40,0.10); }
.ei-mp-ic { font-size: 1.25rem; flex: 0 0 auto; }
.ei-mp-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ei-mp-t  { font-weight: 700; font-size: 0.95rem; color: var(--app-text-strong, #0d2846); }
.ei-mp-s  { font-size: 0.76rem; color: var(--app-muted); margin-top: 1px; }
.ei-mp-ck { font-size: 1.05rem; color: var(--app-gold-deep); flex: 0 0 auto; }
.ei-mp-row:not(.active) .ei-mp-ck { color: var(--app-border); }

/* ── Audio player: sticky top-left close (karaoke lyrics make the sheet
      tall, so the bottom "Cerrar" fell below the fold) ── */
.audio-player-sheet .ap-topbar {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center;
  margin: -8px -4px 10px;
  padding: 8px 4px 8px;
  background: var(--app-card, #fff);
}
.audio-player-sheet .ap-topbar .drag-handle {
  position: absolute; left: 50%; transform: translateX(-50%);
  margin: 0; width: 40px; height: 4px; border-radius: 2px;
  background: var(--app-border); cursor: pointer;
}
.audio-player-sheet .ap-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--app-card-soft, #fffdf7);
  border: 1px solid var(--app-border);
  color: var(--app-text-strong, #0d2846);
  font-size: 1.05rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit; flex: 0 0 auto;
}
.audio-player-sheet .ap-close:active { transform: scale(0.92); }

/* ── Mini-player (Spotify-style minimized bar) ── */
.mini-player {
  flex: 0 0 auto; display: none; align-items: center; gap: 10px;
  margin: 0 8px 6px; padding: 8px 8px 8px 8px; border-radius: 12px;
  /* Explicit navy (NOT the --app-navy-* tokens, which flip to cream/white in
     dark mode) so the bar stays navy with readable white text in both themes. */
  background: linear-gradient(100deg, #0d2846, #1f4c84);
  color: #fff; box-shadow: 0 6px 18px rgba(13,40,70,0.28); position: relative; z-index: 245;
}
body.has-mini .mini-player { display: flex; }
.mini-player__open {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-align: left;
}
.mini-player__art {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255,255,255,0.15) center / cover no-repeat;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.mini-player__meta { display: flex; flex-direction: column; min-width: 0; }
.mini-player__title { font-weight: 700; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player__artist { font-size: 0.72rem; color: rgba(255,255,255,0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player__actions { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; }
.mini-player__icon {
  background: none; border: 0; color: #fff; cursor: pointer; padding: 0;
  width: 34px; height: 38px; border-radius: 50%; font-size: 1.02rem;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.mini-player__icon:active { background: rgba(255,255,255,0.14); }
.mini-player__pp { font-size: 1.22rem; }
.mini-player__like.is-liked { color: #ff5c6c; }
.mini-player__close { font-size: 0.92rem; color: rgba(255,255,255,0.75); width: 30px; }
.mini-player__icon.is-casting { color: #1db954; } /* green when a cast session is live */

/* ── Connect + Liked bottom sheets ── */
.connect-sheet, .liked-sheet {
  position: fixed; inset: 0; z-index: 260; display: none;
  background: rgba(8,16,30,0.5); align-items: flex-end;
}
.connect-sheet.open, .liked-sheet.open { display: flex; }
.connect-sheet__panel, .liked-sheet__panel {
  width: 100%; background: var(--app-card, #fff); border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: connSheetUp 0.25s ease;
}
@keyframes connSheetUp { from { transform: translateY(22px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.connect-sheet__bar, .liked-sheet__bar { width: 40px; height: 4px; border-radius: 2px; background: var(--app-border, #e8dfc8); margin: 4px auto 14px; cursor: pointer; }
.connect-sheet__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--app-text-strong, #16324f); }
.connect-sheet__head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.connect-list { display: flex; flex-direction: column; gap: 6px; }
.connect-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--app-cream-1, #faf3e3); color: var(--app-text, #16324f); text-align: left;
}
.connect-row.is-active { background: rgba(29,185,84,0.12); }
.connect-row__ic { flex: 0 0 auto; display: flex; color: var(--app-navy-2, #1f4c84); }
.connect-row.is-active .connect-row__ic { color: #1db954; }
.connect-row__tx { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.connect-row__name { font-weight: 700; font-size: 0.92rem; }
.connect-row.is-active .connect-row__name { color: #1db954; }
.connect-row__sub { font-size: 0.76rem; color: var(--app-muted, #8a7e64); }
.connect-row__check { color: #1db954; font-size: 0.9rem; }
.connect-empty { display: flex; align-items: center; gap: 10px; padding: 16px 12px 6px; color: var(--app-muted, #8a7e64); font-size: 0.85rem; }
.connect-empty__spin { width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid var(--app-border, #e8dfc8); border-top-color: var(--app-navy-2, #1f4c84); border-radius: 50%; animation: connSpin 0.8s linear infinite; }
@keyframes connSpin { to { transform: rotate(360deg); } }
.connect-note { font-size: 0.76rem; color: var(--app-muted, #8a7e64); margin: 10px 4px 0; text-align: center; }
.liked-sheet__row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--app-cream-1, #faf3e3); }
.liked-sheet__heart { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; background: #ff5c6c; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.liked-sheet__tx { display: flex; flex-direction: column; min-width: 0; }
.liked-sheet__tx b { font-size: 0.92rem; color: var(--app-text-strong, #16324f); }
.liked-sheet__tx span { font-size: 0.78rem; color: var(--app-muted, #8a7e64); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Playlists ── */
.worship-lib { padding-top: 8px; }
.pl-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 2px 4px; -webkit-overflow-scrolling: touch; }
.pl-card { flex: 0 0 auto; width: 128px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.pl-card__art { width: 128px; height: 128px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #1a2f50, #9a5a1e); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.pl-card__art img, .pl-art-one { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 100%; height: 100%; }
.pl-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-art-ph { font-size: 38px; color: rgba(255,255,255,0.85); }
.pl-card__art--liked { background: linear-gradient(140deg, #7d2b5a, #ff5c6c); color: #fff; font-size: 44px; }
.pl-card__art--new { background: rgba(217,160,40,0.10); color: var(--app-gold-deep, #d9a028); font-size: 40px; border: 2px dashed rgba(217,160,40,0.5); box-shadow: none; }
.pl-card__name { font-weight: 700; font-size: 0.84rem; color: var(--app-text, #16324f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; }
.pl-card__count { font-size: 0.72rem; color: var(--app-muted, #8a7e64); }

.pl-detail { padding: 0 0 14px; }
.pl-detail__bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; }
.pl-back, .pl-menu { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--app-text-strong, #16324f); cursor: pointer; padding: 4px 8px; }
.pl-detail__head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 18px 8px; }
.pl-detail__art { width: 160px; height: 160px; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #1a2f50, #9a5a1e); box-shadow: 0 10px 26px rgba(0,0,0,0.28); }
.pl-detail__art img { width: 100%; height: 100%; object-fit: cover; }
.pl-detail__art .pl-mosaic { width: 100%; height: 100%; }
.pl-detail__art--liked { background: linear-gradient(140deg, #7d2b5a, #ff5c6c); color: #fff; font-size: 62px; }
.pl-detail__name { margin: 12px 0 2px; font-size: 1.3rem; font-weight: 800; color: var(--app-text-strong, #16324f); }
.pl-detail__count { font-size: 0.82rem; color: var(--app-muted, #8a7e64); }
.pl-play-all { margin-top: 14px; background: var(--app-gold-deep, #d9a028); color: #fff; border: 0; border-radius: 999px; padding: 10px 28px; font-weight: 800; font-size: 0.95rem; cursor: pointer; }
.pl-songs { padding: 8px 14px 0; display: flex; flex-direction: column; }
.pl-song { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--app-border-soft, #f0e6d0); cursor: pointer; }
.pl-song__art { position: relative; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: linear-gradient(140deg, #1a2f50, #9a5a1e); }
.pl-song__art .wart-img { width: 100%; height: 100%; object-fit: cover; }
.pl-song__art .wart-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.85); }
.pl-song__lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8,16,30,0.42); font-size: 18px; }
.pl-song__meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pl-song__title { font-weight: 700; font-size: 0.9rem; color: var(--app-text, #16324f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-song__artist { font-size: 0.74rem; color: var(--app-muted, #8a7e64); }
.pl-song { transition: transform 0.14s ease, background 0.14s ease, opacity 0.14s ease, box-shadow 0.16s ease; }
.pl-song__drag { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 36px; height: 40px; color: var(--app-muted, #8a7e64); cursor: grab; touch-action: none; }
.pl-song__drag:active { cursor: grabbing; }
/* Picked-up song: floats above the list, translucent, slightly enlarged. */
.pl-song.dragging {
  background: var(--app-card-soft, #fffdf7);
  box-shadow: 0 18px 38px rgba(13,40,70,0.34);
  border-radius: 14px; opacity: 0.82; transform: scale(1.04);
  position: relative; z-index: 6; cursor: grabbing;
}
.pl-song.dragging .pl-song__drag { color: var(--app-gold-deep, #d9a028); }
.pl-song.over-trash { opacity: 0.45; transform: scale(0.96); }
/* Trash drop-zone shown while dragging a song */
.pl-trash {
  position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) scale(0.9);
  width: 60px; height: 60px; border-radius: 50%; display: none; align-items: center; justify-content: center;
  background: #1f4c84; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.35); z-index: 280;
  opacity: 0; transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s ease;
}
.pl-trash.show { display: flex; opacity: 1; transform: translateX(-50%) scale(1); }
.pl-trash.over { background: #e0413b; transform: translateX(-50%) scale(1.18); }

.pl-sheet { position: fixed; inset: 0; z-index: 260; display: none; background: rgba(8,16,30,0.5); align-items: flex-end; }
.pl-sheet.open { display: flex; }
.pl-sheet__panel { width: 100%; background: var(--app-card, #fff); border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px)); max-height: 72vh; overflow-y: auto; animation: connSheetUp 0.25s ease; }
.pl-sheet__bar { width: 40px; height: 4px; border-radius: 2px; background: var(--app-border, #e8dfc8); margin: 4px auto 12px; cursor: pointer; }
.pl-sheet__title { margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; color: var(--app-text-strong, #16324f); }
.pl-sheet__new { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; border-radius: 12px;
  background: rgba(217,160,40,0.12); color: var(--app-gold-deep, #b8801c); font-weight: 800; cursor: pointer; margin-bottom: 8px; font-family: inherit; }
.pl-sheet__new-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; background: var(--app-gold-deep, #d9a028); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.pl-sheet__list { display: flex; flex-direction: column; gap: 6px; }
.pl-add-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: var(--app-cream-1, #faf3e3); color: var(--app-text, #16324f); cursor: pointer; text-align: left; }
.pl-add-row.is-in { background: rgba(29,185,84,0.12); }
.pl-add-row__art { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; overflow: hidden; background: linear-gradient(140deg, #1a2f50, #9a5a1e); display: flex; }
.pl-add-row__art img, .pl-add-row__art .pl-art-one { width: 100%; height: 100%; object-fit: cover; }
.pl-add-row__art .pl-mosaic { width: 100%; height: 100%; }
.pl-add-row__art .pl-art-ph { width: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.pl-add-row__name { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-add-row__chk { flex: 0 0 auto; color: #1db954; font-size: 1.1rem; width: 20px; text-align: center; }
.pl-add-empty { font-size: 0.85rem; color: var(--app-muted, #8a7e64); text-align: center; padding: 12px; }
.pl-song__lang { display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; padding: 1px 5px; border-radius: 4px; background: rgba(127,127,127,0.18); margin-left: 5px; vertical-align: middle; }
.pl-sheet__sub { margin: -4px 0 12px; font-size: 0.84rem; font-weight: 700; color: var(--app-muted, #8a7e64); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Playlist ⋮ menu sheet (Share / Rename / Delete) */
.pl-menu-sheet { position: fixed; inset: 0; z-index: 262; display: none; background: rgba(8,16,30,0.5); align-items: flex-end; }
.pl-menu-sheet.open { display: flex; }
.pl-menu-sheet__panel { width: 100%; background: var(--app-card, #fff); border-radius: 20px 20px 0 0; padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px)); animation: connSheetUp 0.25s ease; }
.pl-menu-sheet__bar { width: 40px; height: 4px; border-radius: 2px; background: var(--app-border, #e8dfc8); margin: 4px auto 10px; cursor: pointer; }
.pl-menu-sheet__title { margin: 0 6px 10px; font-size: 1.05rem; font-weight: 800; color: var(--app-text-strong, #16324f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-menu-act { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 12px; border: 0; background: none; color: var(--app-text, #16324f); font-weight: 700; font-size: 0.95rem; cursor: pointer; font-family: inherit; border-radius: 12px; text-align: left; }
.pl-menu-act:active { background: rgba(127,127,127,0.12); }
.pl-menu-act__ic { flex: 0 0 auto; display: flex; color: var(--app-navy-2, #1f4c84); }
.pl-menu-act--danger, .pl-menu-act--danger .pl-menu-act__ic { color: #e0413b; }

/* Share-playlist sheet (Spotify-style preview) */
.pl-share-sheet { position: fixed; inset: 0; z-index: 262; display: none; background: rgba(8,16,30,0.5); align-items: flex-end; }
.pl-share-sheet.open { display: flex; }
.pl-share-sheet__panel { width: 100%; background: var(--app-card, #fff); border-radius: 20px 20px 0 0; padding: 10px 22px calc(20px + env(safe-area-inset-bottom, 0px)); animation: connSheetUp 0.25s ease; text-align: center; }
.pl-share-sheet__bar { width: 40px; height: 4px; border-radius: 2px; background: var(--app-border, #e8dfc8); margin: 4px auto 16px; cursor: pointer; }
.pl-share-art { width: 150px; height: 150px; margin: 0 auto 14px; border-radius: 14px; overflow: hidden; background: linear-gradient(140deg, #1a2f50, #9a5a1e); box-shadow: 0 10px 26px rgba(0,0,0,0.28); display: flex; }
.pl-share-art img, .pl-share-art .pl-art-one { width: 100%; height: 100%; object-fit: cover; }
.pl-share-art .pl-mosaic { width: 100%; height: 100%; }
.pl-share-name { margin: 0 0 2px; font-size: 1.2rem; font-weight: 800; color: var(--app-text-strong, #16324f); }
.pl-share-by { margin: 0 0 18px; font-size: 0.82rem; color: var(--app-muted, #8a7e64); }
.pl-share-actions { display: flex; gap: 10px; justify-content: center; }
.pl-share-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--app-border, #e8dfc8); background: none; color: var(--app-text, #16324f); font-weight: 700; font-size: 0.9rem; padding: 11px 22px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.pl-share-btn--primary { background: #1f4c84; color: #fff; border-color: #1f4c84; }
.pl-share-btn__ic { display: flex; }

/* Centered confirm dialog (delete playlist) */
.ei-confirm { position: fixed; inset: 0; z-index: 290; display: none; align-items: center; justify-content: center; background: rgba(8,16,30,0.55); padding: 24px; }
.ei-confirm.open { display: flex; }
.ei-confirm__box { width: 100%; max-width: 340px; background: var(--app-card, #fff); border-radius: 18px; padding: 22px 20px 16px; box-shadow: 0 18px 50px rgba(0,0,0,0.4); animation: connSheetUp 0.2s ease; }
.ei-confirm__title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 800; color: var(--app-text-strong, #16324f); }
.ei-confirm__body { margin: 0 0 18px; font-size: 0.92rem; line-height: 1.5; color: var(--app-text, #16324f); }
.ei-confirm__actions { display: flex; gap: 10px; justify-content: flex-end; }
.ei-confirm__btn { border: 0; background: rgba(127,127,127,0.14); color: var(--app-text, #16324f); font-weight: 700; font-size: 0.9rem; padding: 10px 18px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.ei-confirm__btn--danger { background: #e0413b; color: #fff; }

/* ── Player cover art + centered layout (matches the sleep player) ── */
.audio-player-sheet { text-align: center; }
/* Cover art shows the FULL image (no crop): JS sets --ap-art; the contained
   layer letterboxes over a blurred copy of the same image (featured-churches
   pattern). Works for 4:3 cards and square thumbs alike. */
.audio-player-sheet .ap-art {
  position: relative; overflow: hidden;
  width: min(85vw, 340px); height: auto; aspect-ratio: 4 / 3;
  margin: 2px auto 16px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--ink-navy-3, #1f4c84), var(--ink-navy-2, #123c68));
  box-shadow: 0 12px 30px rgba(13,40,70,0.22);
}
/* Per-genre worship theme — recolors the cover frame/letterbox to the song's
   mood (cover image, when present, still shows contained on top). */
.audio-player[data-wtheme] .ap-art { transition: background 0.45s ease; }
.audio-player[data-wtheme="rock"] .ap-art { background: linear-gradient(140deg, #0a1f3c 0%, #1f4c84 55%, #d4a017 115%); }
.audio-player[data-wtheme="cuna"] .ap-art { background: linear-gradient(160deg, #0b1330 0%, #26305c 70%, #41538f 115%); }
.audio-player[data-wtheme="kids"] .ap-art { background: linear-gradient(140deg, #176b8a 0%, #2a9d8f 50%, #f2b441 120%); }
.audio-player[data-wtheme="calm"] .ap-art { background: linear-gradient(160deg, #10243f 0%, #2a3a63 70%, #5b5a8a 120%); }
.audio-player[data-wtheme="warm"] .ap-art { background: linear-gradient(140deg, #1a2f50 0%, #9a5a1e 78%, #f2c14e 125%); }
.audio-player-sheet .ap-art::before {
  content: ''; position: absolute; inset: -16px;
  background-image: var(--ap-art, none);
  background-size: cover; background-position: center;
  filter: blur(18px) saturate(1.05); opacity: 0.55;
}
.audio-player-sheet .ap-art::after {
  content: ''; position: absolute; inset: 0;
  background-image: var(--ap-art, none);
  background-size: contain; background-position: center; background-repeat: no-repeat;
}
.audio-player-sheet h3 { text-align: center; }
.audio-player-sheet .ref { text-align: center; }
.audio-player-sheet .audio-progress { justify-content: center; }

/* ── Fullscreen player: the stage (art + title + single karaoke line) flexes
      to fill the screen; progress + controls + actions stay pinned at the
      bottom and are ALWAYS visible without scrolling. ── */
.audio-player.open { align-items: stretch; }
.audio-player-sheet {
  height: 100%; max-height: none; border-radius: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.audio-player-sheet .ap-topbar { flex: 0 0 auto; }
.audio-player-sheet .ap-stage {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; gap: 2px;
}
.audio-player-sheet .ap-stage .body { width: 100%; }
.audio-player-sheet .ap-art { margin: 0 auto 14px; flex: 0 0 auto; }
.audio-player-sheet .audio-progress,
.audio-player-sheet .audio-player-controls,
.audio-player-sheet > .btn-block { flex: 0 0 auto; }

/* Long-text days (Caminos/devocionales): the stage was sized for worship's
   single karaoke line — full reflections overflowed into the title/progress.
   Title never shrinks; the BODY becomes the scrollable region instead. */
.audio-player-sheet .ap-stage h3,
.audio-player-sheet .ap-stage .ref,
.audio-player-sheet .ap-stage .ap-genre { flex: 0 0 auto; }
.audio-player-sheet .ap-stage .body {
  flex: 0 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}
/* Short screens: shrink the cover so title + text keep their room. */
@media (max-height: 720px) {
  .audio-player-sheet .ap-art { width: min(58vw, 230px); }
}
@media (max-height: 600px) {
  .audio-player-sheet .ap-art { width: min(42vw, 170px); }
}

/* Vida article reader — "Escuchar artículo" (routed through the main player) */
.ar-listen { display: block; margin: 14px auto 4px; max-width: 320px; }
@media (max-height: 680px) {
  .audio-player-sheet .ap-art { width: min(58vw, 220px); margin-bottom: 8px; }
  .audio-player-sheet .audio-player-controls { margin: 12px 0; }
}

/* ── Home tiles: illustrated icons (Eduardo's Nano Banana watercolor set) ── */
.ei-tile__icon--img {
  width: 46px; height: 46px;
  background: none;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(13,40,70,0.14);
}
.ei-tile__icon--img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Adoración tile — placeholder icon until the watercolor webp lands */
.ei-tile__icon--ph {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 25%, var(--app-gold-bright, #f5c659), var(--app-gold-deep, #d9a028) 78%);
}
.ei-tile__icon--ph::after {
  content: '\266B'; /* beamed eighth notes */
  font-size: 22px; color: #fff;
  text-shadow: 0 1px 2px rgba(13,40,70,0.35);
}

/* ── Adoración / Worship screen ── */
.worship-hero {
  position: relative; overflow: hidden;
  /* No top bar above Adoración anymore — the hero is the topmost element, so it
     absorbs the status-bar inset and goes edge-to-edge under the notch. */
  padding: calc(env(safe-area-inset-top, 0px) + 26px) 22px 18px;
  min-height: 208px;
  display: flex; flex-direction: column; justify-content: flex-end;
  /* Concert photo with a vertical navy scrim: dark top + bottom (text legible),
     bright middle so the light beams + cross stay visible. */
  background:
    linear-gradient(180deg, rgba(8,18,34,0.72) 0%, rgba(8,18,34,0.12) 34%, rgba(8,18,34,0.30) 60%, rgba(8,18,34,0.86) 100%),
    url('../img/content/worship/adoracion-hero.webp') center 42% / cover no-repeat,
    #0d2846;
  color: #fff;
}
.worship-hero__halo { display: none; } /* the concert photo replaces the gold halo */
.worship-hero__inner { position: relative; }
.worship-hero .ar-category { text-shadow: 0 1px 8px rgba(0,0,0,0.55); }
.worship-hero .ar-title { color: #fff; margin: 2px 0 6px; text-shadow: 0 2px 14px rgba(0,0,0,0.6); }
.worship-hero__sub { margin: 0; font-size: 0.92rem; line-height: 1.45; color: rgba(255,255,255,0.9); text-shadow: 0 1px 10px rgba(0,0,0,0.55); }

.worship-sec { padding: 18px 18px 4px; }
.worship-sec__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.worship-sec__title { font-size: 1.05rem; font-weight: 800; margin: 0; color: var(--app-text, #16324f); }
.worship-sec__sub { font-size: 0.78rem; color: var(--app-muted, #8a7e64); }

/* Song-language selector */
.worship-langbar { padding: 8px 18px 0; }
.worship-langbar__lbl { display: block; margin-bottom: 6px; font-size: 0.78rem; font-weight: 700; color: var(--app-muted, #8a7e64); }
/* 6 idiomas no caben en 390px: la píldora scrollea horizontal (scrollbar oculta)
   y JS centra el idioma activo tras render. */
.worship-langseg { display: flex; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; background: rgba(127,127,127,0.14); border-radius: 999px; padding: 3px; gap: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.worship-langseg::-webkit-scrollbar { display: none; }
.worship-langseg__btn { flex: 0 0 auto; white-space: nowrap; border: 0; background: none; color: var(--app-text, #16324f); font-weight: 700; font-size: 0.82rem; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.worship-langseg__btn.is-on { background: #1f4c84; color: #fff; } /* explicit navy: dark-mode-safe */
.worship-empty {
  padding: 14px 16px; border: 1px dashed var(--app-border, #e8dfc8); border-radius: 12px;
  text-align: center; font-size: 0.85rem; color: var(--app-muted, #8a7e64);
  background: var(--app-cream-2, #f5ebd4);
}

.worship-list { display: flex; flex-direction: column; gap: 8px; }
.worship-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  background: var(--app-cream-1, #faf3e3);
  border: 1px solid var(--app-border-soft, #f0e6d0);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.worship-row:active { transform: scale(0.985); }
.worship-row__art {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 25%, var(--app-gold-bright, #f5c659), var(--app-gold-deep, #d9a028) 80%);
  color: #fff; font-size: 16px;
}
.worship-row__play { font-size: 13px; margin-left: 2px; }
.worship-row__meta { flex: 1 1 auto; min-width: 0; }
.worship-row__title { font-weight: 700; font-size: 0.95rem; color: var(--app-text, #16324f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worship-row__artist { font-size: 0.78rem; color: var(--app-muted, #8a7e64); }
.worship-row__badge {
  flex: 0 0 auto; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 3px 7px; border-radius: 999px;
  background: var(--app-cream-3, #ede0bc); color: var(--app-gold-deep, #b87f1c);
}
.worship-row__badge.is-on { background: var(--app-gold-deep, #d9a028); color: #fff; }

/* ── Destacadas · iTunes Cover Flow ── */
.worship-flow-sec { padding: 8px 0 16px; }
.worship-flow-sec .worship-sec__head { padding: 0 18px; }
.worship-flow { position: relative; height: 224px; margin-top: 4px; perspective: 1100px; overflow: hidden; }
.worship-flow__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-style: preserve-3d; }
.wf-item {
  position: absolute; width: 168px; height: 168px; padding: 0; border: 0; background: none;
  border-radius: 16px; cursor: pointer;
  transition: transform .42s cubic-bezier(.2,.7,.3,1), opacity .42s ease;
  will-change: transform, opacity;
}
.wf-art { display: block; width: 100%; height: 100%; }
.wf-item .wart-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,.42); }
.wf-item.is-center .wart-img { box-shadow: 0 18px 46px rgba(0,0,0,.52); outline: 2px solid rgba(245,198,89,.9); }
.wf-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: rgba(8,16,30,.42); border-radius: 16px; }
.wf-tag { position: absolute; left: 8px; bottom: 8px; font-size: .56rem; font-weight: 800;
  letter-spacing: .05em; padding: 3px 7px; border-radius: 999px; }
.wf-tag--prem { background: rgba(10,20,35,.72); color: #f5c659; }
.wf-tag--free { background: var(--app-gold-deep, #d9a028); color: #fff; }
.wf-caption { text-align: center; margin-top: 12px; }
.wf-cap-title { display: block; font-weight: 800; font-size: 1rem; color: var(--app-text, #16324f); }
.wf-cap-artist { display: block; font-size: .78rem; color: var(--app-muted, #8a7e64); }
.wf-dots { display: flex; gap: 6px; justify-content: center; margin-top: 9px; }
.wf-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--app-border, #e8dfc8);
  transition: background .2s ease, transform .2s ease; cursor: pointer; }
.wf-dot.is-on { background: var(--app-gold-deep, #d9a028); transform: scale(1.25); }

/* ── Album grid of square covers ── */
.worship-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; padding: 2px; }
@media (min-width: 520px) { .worship-grid { grid-template-columns: repeat(3, 1fr); } }
.worship-card { border: 0; background: none; padding: 0; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 7px; transition: transform .12s ease; }
.worship-card:active { transform: scale(.98); }
.worship-card__art { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden;
  background: linear-gradient(140deg, #1a2f50, #9a5a1e); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.worship-card__art .wart-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wart-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: rgba(255,255,255,.85); }
.worship-card__play { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(8,16,30,.55); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; backdrop-filter: blur(2px); }
.worship-card__badge { position: absolute; left: 8px; top: 8px; font-size: .54rem; font-weight: 800;
  letter-spacing: .05em; padding: 3px 6px; border-radius: 999px; background: rgba(10,20,35,.62); color: #f5c659; }
.worship-card__title { font-weight: 700; font-size: .86rem; line-height: 1.2; color: var(--app-text, #16324f);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.worship-card__genre { font-size: .7rem; font-weight: 600; color: var(--app-gold-deep, #b8860b); margin-top: 1px; }
.worship-card__artist { font-size: .74rem; color: var(--app-muted, #8a7e64); }

/* Premium tag under the header greeting — only visible for Premium users
   ([data-premium-only] handles the show/hide). */
.ei-app-header__premium {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--app-gold-deep, #b8801c);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Streak milestone celebration modal ── */
.ei-celebrate {
  position: fixed; inset: 0; z-index: 2600;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(13,40,70,0.6);
  opacity: 0; transition: opacity 0.25s ease;
}
.ei-celebrate.open { display: flex; opacity: 1; }
.ei-celebrate__card {
  width: 100%; max-width: 360px;
  background: linear-gradient(160deg, var(--app-gold-bright, #e8c569), var(--app-gold, #d4a942) 60%, var(--app-gold-deep, #b8801c));
  color: var(--ink-navy-1, #0d2846);
  border-radius: 24px;
  padding: 32px 26px 26px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(13,40,70,0.4);
  transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.2,0.9,0.3,1.2);
}
.ei-celebrate.open .ei-celebrate__card { transform: scale(1); }
.ei-celebrate__flame { font-size: 3rem; line-height: 1; }
.ei-celebrate__n {
  font-size: 4.2rem; font-weight: 900; line-height: 1;
  margin: 4px 0 0; letter-spacing: -0.02em;
  color: var(--ink-navy-1, #0d2846);
}
.ei-celebrate__days { font-size: 0.82rem; font-weight: 700; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.ei-celebrate__title { margin: 0 0 8px; font-size: 1.3rem; font-weight: 800; }
.ei-celebrate__msg { margin: 0 0 22px; font-size: 0.95rem; line-height: 1.5; opacity: 0.92; }
.ei-celebrate__card .btn-primary { background: var(--ink-navy-2, #123c68); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .ei-celebrate, .ei-celebrate__card { transition: none; }
}

/* ── Share button on the verse hero (top-right of the navy card) ── */
.ei-verse__share {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fdf6e8;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ei-verse__share:active { transform: scale(0.92); background: rgba(255,255,255,0.24); }

/* ── Devocional de hoy — daily-rotating home card ── */
.ei-daily-dev {
  margin: 0 16px 12px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  color: #fdf6e8;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(13,40,70,0.18);
  transition: transform 0.15s ease;
}
.ei-daily-dev:active { transform: scale(0.985); }
.ei-daily-dev__kicker {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--app-gold-bright, #e8c569);
  margin-bottom: 6px;
}
.ei-daily-dev__title { font-size: 1.15rem; font-weight: 800; line-height: 1.25; margin-bottom: 12px; }
.ei-daily-dev__cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 700;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 7px 14px; border-radius: 999px;
}
.ei-daily-dev__play { font-size: 0.7rem; }

/* ── Niños hero with the lamb mascot (Corderito) ── */
.ei-kids-hero { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.ei-kids-hero__text { flex: 1; min-width: 0; }
.ei-kids-hero__mascot {
  flex: 0 0 auto;
  width: clamp(78px, 26vw, 104px); height: auto;
  margin: -6px -4px -10px 0;
  filter: drop-shadow(0 6px 12px rgba(13,40,70,0.22));
}
/* Family-banner variant: full-width Cordeo-family illustration on top, warm
   text strip below (cordeo-family.webp). */
.card-hero.ei-kids-hero--family { display: block; padding: 0; }
.ei-kids-hero__banner { display: block; width: 100%; height: auto; }
.ei-kids-hero--family .ei-kids-hero__text { padding: 12px 18px 16px; }

/* ── Streak band: clickable + info hint ───────────────────────── */
.ei-streak[role="button"] { cursor: pointer; }
.ei-streak__info {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0.5; font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-left: 4px;
}

/* ── Streak explainer bottom sheet ────────────────────────────── */
.ei-sheet-ov {
  position: fixed; inset: 0; z-index: 2300; background: rgba(13,40,70,0.5);
  display: none; align-items: flex-end;
}
.ei-sheet-ov.open { display: flex; }
.ei-sh__card {
  width: 100%; background: var(--app-card, #fff); border-radius: 22px 22px 0 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 90vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.30s cubic-bezier(0.22,0.61,0.36,1);
}
.ei-sheet-ov.open .ei-sh__card { transform: none; }
.ei-sh__hero {
  background: linear-gradient(160deg, #1f4c84, #123c68); color: #fff;
  padding: 24px 22px 20px; text-align: center; border-radius: 22px 22px 0 0;
}
.ei-sh__mascot { width: 92px; height: auto; display: block; margin: 0 auto -4px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25)); }
.ei-sh__flame { font-size: 1.9rem; }
.ei-sh__hero h3 { margin: 4px 0 6px; font-size: 1.3rem; font-weight: 800; }
.ei-sh__hero p { margin: 0; font-size: 0.9rem; color: rgba(255,255,255,0.86); line-height: 1.5; }
.ei-sh__rows { padding: 16px 18px 4px; display: flex; flex-direction: column; gap: 14px; }
.ei-sh__row { display: flex; gap: 14px; align-items: flex-start; }
.ei-sh__ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  background: var(--app-card-soft, #fffdf7); border: 1px solid var(--app-border-soft, #f0e6d0);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.ei-sh__tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ei-sh__tx strong { font-size: 0.98rem; color: var(--app-text-strong, #0d2846); font-weight: 800; }
.ei-sh__tx span { font-size: 0.85rem; color: var(--app-muted, #8a7e64); line-height: 1.45; }
.ei-sh__card .btn { margin: 14px 18px 0; width: calc(100% - 36px); }
.ei-sh__best {
  margin: 14px 18px 0; padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(232,197,105,0.20), rgba(217,160,40,0.07));
  border: 1px solid var(--app-gold, #d4a942);
}
.ei-sh__best-t { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--app-gold-deep, #b8801c); }
.ei-sh__best-v { font-size: 0.98rem; font-weight: 800; color: var(--app-text-strong, #0d2846); margin-top: 2px; }

/* ── Caminos (guided multi-day journeys) ───────────────────────────── */
.ei-tile--camino { background: linear-gradient(135deg, rgba(31,76,132,0.14), rgba(217,160,40,0.14)); }
.ei-tile__icon--glyph { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--ink-navy-3, #1f4c84), var(--ink-navy-1, #0d2846)); }

.caminos-hero {
  position: relative; overflow: hidden;
  padding: 22px 22px 18px; min-height: 150px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  background: linear-gradient(140deg, var(--ink-navy-1, #0d2846) 0%, var(--ink-navy-3, #1f4c84) 70%, #d4a017 130%);
}
.caminos-hero[data-theme="calm"] { background: linear-gradient(150deg, #0b1330 0%, #2a3a63 70%, #5b5a8a 130%); }
.caminos-hero[data-theme="warm"] { background: linear-gradient(140deg, #1a2f50 0%, #9a5a1e 80%, #f2c14e 130%); }
/* Monthly Caminos palette — seasonal moods (fallback behind the cover image). */
.caminos-hero[data-theme="dawn"]     { background: linear-gradient(150deg, #14233f 0%, #c66a3a 80%, #f4c24a 130%); }
.caminos-hero[data-theme="rose"]     { background: linear-gradient(150deg, #2a1230 0%, #a6356b 80%, #f08fb0 130%); }
.caminos-hero[data-theme="violet"]   { background: linear-gradient(150deg, #15112e 0%, #4b2f7a 75%, #8a6fc4 130%); }
.caminos-hero[data-theme="gold"]     { background: linear-gradient(150deg, #1a2a1f 0%, #b88a14 80%, #f6df72 130%); }
.caminos-hero[data-theme="sky"]      { background: linear-gradient(150deg, #0e2240 0%, #2f6fae 80%, #8fc6ee 130%); }
.caminos-hero[data-theme="ember"]    { background: linear-gradient(150deg, #2a0f0f 0%, #a8331f 80%, #e87a3a 130%); }
.caminos-hero[data-theme="green"]    { background: linear-gradient(150deg, #0d2417 0%, #1f7a4a 80%, #79c98e 130%); }
.caminos-hero[data-theme="twilight"] { background: linear-gradient(150deg, #14122e 0%, #3a3f86 75%, #7d6fb8 130%); }
.caminos-hero[data-theme="amber"]    { background: linear-gradient(150deg, #2a1a0d 0%, #9a5a1e 80%, #e0a23e 130%); }
.caminos-hero[data-theme="night"]    { background: linear-gradient(150deg, #070b1e 0%, #1b2b58 75%, #41538f 130%); }
.caminos-hero .ar-title { color: #fff; margin: 2px 0 6px; text-shadow: 0 2px 14px rgba(0,0,0,0.45); }
.caminos-hero__sub { font-size: 0.9rem; opacity: 0.9; margin: 0; }

/* Featured "Camino de este mes" */
/* "Tu día con Cordeo" — visible 3-block daily routine on Home */
.ei-routine { margin: 6px 16px 10px; }
.ei-routine__head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 8px; }
.ei-routine__title { font-weight: 800; font-size: 1.02rem; color: var(--app-text-strong); }
.ei-routine__edit { border: none; background: none; color: var(--app-gold-dark, #9a6f12); font-weight: 700;
  font-size: 0.82rem; font-family: inherit; cursor: pointer; padding: 2px 4px; -webkit-tap-highlight-color: transparent; }
.ei-routine__blocks { display: flex; flex-direction: column; gap: 8px; }
.ei-routine__block { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--app-border, #e2e8f0); border-radius: 14px; background: var(--app-card, #fff);
  font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .15s, box-shadow .15s; }
.ei-routine__block.is-now { border-color: var(--app-gold, #d4a028); box-shadow: 0 3px 14px rgba(217,160,40,0.18); }
.ei-routine__ico { font-size: 1.5rem; flex-shrink: 0; }
.ei-routine__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ei-routine__b { font-weight: 700; font-size: 0.95rem; color: var(--app-text-strong); }
.ei-routine__act { font-size: 0.8rem; color: var(--app-muted, #7a8aa0); margin-top: 1px; }
.ei-routine__time { font-weight: 800; font-size: 0.95rem; color: var(--app-text-strong); flex-shrink: 0;
  font-variant-numeric: tabular-nums; }
.ei-routine__block.is-now .ei-routine__time { color: var(--app-gold-dark, #9a6f12); }
/* "Mis oraciones" — personal prayer journal */
.prayers-hero { padding: 8px 16px 4px; }
.prayers-hero__sub { color: var(--app-muted, #7a8aa0); font-size: 0.9rem; margin: 4px 0 0; }
.prayers-add { display: flex; gap: 8px; align-items: stretch; margin: 12px 16px 4px; }
.prayers-add__input { flex: 1; resize: none; border: 1px solid var(--app-border, #d8dee8); border-radius: 12px;
  padding: 10px 12px; font-family: inherit; font-size: 0.95rem; background: var(--app-card, #fff); color: inherit; }
.prayers-add__input:focus { outline: none; border-color: var(--app-gold, #d4a028); }
.prayers-add__btn { border: none; border-radius: 12px; padding: 0 16px; font-weight: 700; font-family: inherit;
  background: var(--ink-navy-2, #123c68); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.prayers-list, .prayers-answered { margin: 8px 16px; display: flex; flex-direction: column; gap: 8px; }
.prayer-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: var(--app-card, #fff); box-shadow: 0 2px 8px rgba(13,40,70,0.08); }
.prayer-card--done { opacity: 0.72; }
.prayer-card__body { flex: 1; min-width: 0; }
.prayer-card__text { font-size: 0.98rem; line-height: 1.35; word-break: break-word; }
.prayer-card--done .prayer-card__text { text-decoration: line-through; }
.prayer-card__date { color: var(--app-muted, #7a8aa0); font-size: 0.78rem; margin-top: 4px; }
.prayer-card__acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.prayer-card__answer { border: none; border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; font-weight: 700;
  font-family: inherit; background: rgba(217,160,40,0.14); color: var(--app-gold-dark, #9a6f12); cursor: pointer; white-space: nowrap; }
.prayer-card__undo, .prayer-card__del { border: none; background: transparent; font-size: 1rem; cursor: pointer;
  padding: 4px 6px; -webkit-tap-highlight-color: transparent; opacity: 0.7; }
.prayers-answered__h { font-weight: 800; font-size: 0.9rem; margin: 18px 16px 2px; color: var(--app-gold-dark, #9a6f12); }
.prayers-empty { text-align: center; color: var(--app-muted, #7a8aa0); padding: 28px 24px; }
.prayers-empty__glyph { font-size: 2.2rem; margin-bottom: 6px; }
/* "Recomendado para ti" — personalized plan from onboarding goal */
.camino-reco { position: relative; }
.camino-reco .camino-featured { margin-bottom: 2px; }
.camino-featured--reco { box-shadow: 0 6px 22px rgba(217,160,40,0.28); outline: 2px solid var(--app-gold, #d4a028); outline-offset: -2px; }
.camino-featured--reco .camino-featured__kicker { color: var(--app-gold-bright, #f2c14e); }
.camino-reco__x { position: absolute; top: 20px; right: 24px; z-index: 3; width: 30px; height: 30px; border-radius: 999px;
  border: none; background: rgba(8,18,32,0.5); color: #fff; font-size: 0.85rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.camino-featured { position: relative; display: block; width: calc(100% - 32px); margin: 14px 16px 2px; padding: 0;
  border: none; border-radius: 18px; overflow: hidden; cursor: pointer; text-align: left; font-family: inherit;
  min-height: 132px; box-shadow: 0 6px 20px rgba(13,40,70,0.20);
  background: linear-gradient(140deg, var(--ink-navy-2, #123c68), var(--ink-navy-3, #1f4c84)); }
.camino-featured[data-theme="dawn"]     { background: linear-gradient(140deg, #14233f, #c66a3a); }
.camino-featured[data-theme="rose"]     { background: linear-gradient(140deg, #2a1230, #a6356b); }
.camino-featured[data-theme="violet"]   { background: linear-gradient(140deg, #15112e, #4b2f7a); }
.camino-featured[data-theme="gold"]     { background: linear-gradient(140deg, #1a2a1f, #b88a14); }
.camino-featured[data-theme="sky"]      { background: linear-gradient(140deg, #0e2240, #2f6fae); }
.camino-featured[data-theme="warm"]     { background: linear-gradient(140deg, #1a2f50, #9a5a1e); }
.camino-featured[data-theme="calm"]     { background: linear-gradient(140deg, #0b1330, #41538f); }
.camino-featured[data-theme="ember"]    { background: linear-gradient(140deg, #2a0f0f, #a8331f); }
.camino-featured[data-theme="green"]    { background: linear-gradient(140deg, #0d2417, #1f7a4a); }
.camino-featured[data-theme="twilight"] { background: linear-gradient(140deg, #14122e, #3a3f86); }
.camino-featured[data-theme="amber"]    { background: linear-gradient(140deg, #2a1a0d, #9a5a1e); }
.camino-featured[data-theme="night"]    { background: linear-gradient(140deg, #070b1e, #1b2b58); }
.camino-featured__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.camino-featured__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; padding: 16px 18px;
  background: linear-gradient(90deg, rgba(8,18,34,0.55) 0%, rgba(8,18,34,0.15) 100%); min-height: 132px; box-sizing: border-box; }
.camino-featured__kicker { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-gold, #f2c14e); }
.camino-featured__title { font-size: 1.15rem; font-weight: 800; color: #fff; line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,0.4); margin-top: 2px; }
.camino-featured__sub { font-size: 0.82rem; color: rgba(255,255,255,0.9); line-height: 1.3; }
.camino-featured__meta { font-size: 0.78rem; font-weight: 700; color: #fff; margin-top: 6px; }
.camino-featured__bar { display: block; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.25); overflow: hidden; margin-top: 6px; max-width: 220px; }
.camino-featured__bar > span { display: block; height: 100%; background: var(--app-gold, #f2c14e); }

.caminos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.camino-card { display: flex; flex-direction: column; gap: 6px; padding: 0; border: none; background: none; cursor: pointer; text-align: left; font-family: inherit; }
.camino-card__art { position: relative; aspect-ratio: 1/1; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--ink-navy-2, #123c68), var(--ink-navy-3, #1f4c84)); box-shadow: 0 4px 14px rgba(13,40,70,0.22); }
.camino-card__art[data-theme="calm"] { background: linear-gradient(150deg, #0b1330, #41538f); }
.camino-card__art[data-theme="warm"] { background: linear-gradient(140deg, #1a2f50, #9a5a1e); }
.camino-card__art[data-theme="dawn"]     { background: linear-gradient(150deg, #14233f, #c66a3a); }
.camino-card__art[data-theme="rose"]     { background: linear-gradient(150deg, #2a1230, #a6356b); }
.camino-card__art[data-theme="violet"]   { background: linear-gradient(150deg, #15112e, #4b2f7a); }
.camino-card__art[data-theme="gold"]     { background: linear-gradient(150deg, #1a2a1f, #b88a14); }
.camino-card__art[data-theme="sky"]      { background: linear-gradient(150deg, #0e2240, #2f6fae); }
.camino-card__art[data-theme="ember"]    { background: linear-gradient(150deg, #2a0f0f, #a8331f); }
.camino-card__art[data-theme="green"]    { background: linear-gradient(150deg, #0d2417, #1f7a4a); }
.camino-card__art[data-theme="twilight"] { background: linear-gradient(150deg, #14122e, #3a3f86); }
.camino-card__art[data-theme="amber"]    { background: linear-gradient(150deg, #2a1a0d, #9a5a1e); }
.camino-card__art[data-theme="night"]    { background: linear-gradient(150deg, #070b1e, #1b2b58); }
.camino-card__art img { width: 100%; height: 100%; object-fit: cover; }
.camino-card__glyph { font-size: 2rem; color: rgba(255,255,255,0.92); }
/* Coming-soon month cards */
.camino-card--soon { cursor: default; }
.camino-card--soon .camino-card__art { opacity: 0.82; }
.camino-card--soon .camino-card__title { color: var(--app-muted, #8a7e64); }
.camino-featured__lock { display: inline-block; margin-left: 6px; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.03em; text-transform: uppercase; color: #1a1206;
  background: linear-gradient(135deg,#f5d77a,#d9a028); padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.camino-card__lock { position: absolute; top: 8px; right: 8px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  color: #1a1206; background: linear-gradient(135deg,#f5d77a,#d9a028);
  padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(13,40,70,0.28); }
.camino-card__soon { position: absolute; bottom: 8px; left: 8px; right: 8px; text-align: center;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: rgba(13,40,70,0.55); backdrop-filter: blur(2px);
  padding: 4px 6px; border-radius: 999px; }
.camino-card__title { font-weight: 700; font-size: 0.9rem; color: var(--app-text, #16324f); line-height: 1.2; }
.camino-card__meta { font-size: 0.74rem; color: var(--app-muted, #8a7e64); }
.camino-card__bar { display: block; height: 4px; border-radius: 99px; background: var(--app-border, #e8dfc8); overflow: hidden; }
.camino-card__bar > span { display: block; height: 100%; background: var(--app-gold-deep, #d9a028); }

/* Guía: explica que tocando cada día se abre y, al terminarlo, se marca con ✓. */
.caminos-howto { margin: 6px 18px 2px; display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem; line-height: 1.45; color: var(--app-muted, #8a7e64); }
.caminos-howto__ic { flex: 0 0 auto; color: var(--app-gold-deep, #b8860b); font-weight: 900; }
/* Lista de días estilo "camino": nodos unidos por una línea (oro hasta donde vas,
   gris después); día completado = oro con ✓, día de hoy = nodo resaltado, bloqueado = candado. */
.caminos-days { position: relative; padding: 10px 16px 8px; display: flex; flex-direction: column; gap: 2px; }
.camino-day-row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; }
.camino-day-row::before, .camino-day-row::after { content: ''; position: absolute; left: 22px; width: 2px; background: var(--app-border, #e8dfc8); z-index: 0; }
.camino-day-row::before { top: 0; height: 50%; }
.camino-day-row::after { top: 50%; bottom: 0; }
.caminos-days > .camino-day-row:first-child::before { display: none; }
.caminos-days > .camino-day-row:last-child::after { display: none; }
.camino-day-row.is-done::before, .camino-day-row.is-done::after, .camino-day-row.is-current::before { background: var(--app-gold-deep, #d9a028); }
/* Number node = its own tap target (mark / unmark). */
.camino-day-row__n { position: relative; z-index: 1; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; background: var(--app-cream-1, #faf3e3); color: var(--app-text-strong, #0d2846); border: 1.5px solid var(--app-border, #e8dfc8);
  box-shadow: 0 0 0 4px var(--app-cream-1, #faf3e3); appearance: none; -webkit-appearance: none; padding: 0; cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent; transition: transform 0.12s ease; }
.camino-day-row__n:active { transform: scale(0.88); }
.camino-day-row.is-done .camino-day-row__n { background: var(--app-gold-bright, #f2c14e); color: #1a1206; border-color: transparent; }
.camino-day-row.is-current .camino-day-row__n { background: var(--ink-navy-1, #0d2846); color: var(--app-gold-bright, #f2c14e); border: 2px solid var(--app-gold-bright, #f2c14e); }
.camino-day-row.is-steplock .camino-day-row__n { color: var(--app-muted, #8a7e64); cursor: default; }
.camino-day-row.is-steplock .camino-day-row__n:active { transform: none; }
.camino-day-row.is-premlock { opacity: 0.6; }
.camino-day-row.is-premlock .camino-day-row__n { color: var(--app-muted, #8a7e64); }
@keyframes caminoShake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-4px)} 40%,60%{transform:translateX(4px)} }
.camino-day-row__n.shake { animation: caminoShake 0.4s ease; }
/* Title block = its own tap target (open the day to read). */
.camino-day-row__t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: transparent; border: 0; padding: 10px 2px; margin: 0; cursor: pointer; font-family: inherit; text-align: left; -webkit-tap-highlight-color: transparent; border-radius: 10px; }
.camino-day-row__t:active { background: var(--app-cream-2, #f5ebd4); }
.camino-day-row__lbl { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; color: var(--app-muted, #8a7e64); text-transform: uppercase; }
.camino-day-row.is-current .camino-day-row__lbl { color: var(--app-gold-deep, #b8860b); }
.camino-day-row__title { font-weight: 700; color: var(--app-text-strong, #0d2846); font-size: 0.92rem; line-height: 1.3; }
.caminos-foot-locked { background: var(--app-cream-2, #f5ebd4); color: var(--app-muted, #8a7e64); border: 1px solid var(--app-border, #e8dfc8); cursor: default; }

.caminos-upsell { margin: 16px; padding: 16px; border-radius: 14px; text-align: center;
  background: var(--app-cream-2, #f5ebd4); border: 1px solid var(--app-border, #e8dfc8); }
.caminos-upsell p { margin: 0 0 12px; color: var(--app-text, #16324f); font-size: 0.9rem; }

.camino-day-view { padding: 20px 22px 28px; }
.camino-day-view__kicker { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--app-gold-deep, #b8860b); margin-bottom: 4px; }
.camino-verse { margin: 14px 0; padding: 16px 18px; border-left: 3px solid var(--app-gold-deep, #d9a028);
  background: var(--app-cream-2, #f5ebd4); border-radius: 0 12px 12px 0; }
.camino-verse__ref { font-weight: 800; color: var(--app-gold-deep, #b8860b); font-size: 0.82rem; margin-bottom: 6px; }
.camino-verse__text { margin: 0; font-style: italic; color: var(--app-text, #1f2d3d); line-height: 1.6; }
.camino-reflection { color: var(--app-text, #1f2d3d); line-height: 1.75; font-size: 1.02rem; }
.camino-reflection p { margin: 0 0 12px; }
.camino-prayer { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--app-card-soft, #fff); border: 1px solid var(--app-border, #e8dfc8); }
.camino-prayer__lbl { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--app-gold-deep, #b8860b); margin-bottom: 4px; }
.camino-prayer p { margin: 0; font-style: italic; color: var(--app-text, #1f2d3d); line-height: 1.6; }
/* Sticky action bar — "Completar día" is always visible, docked at the bottom of
   the day screen, so it never hides below the (variable-length) reflection text.
   The faint top scrim makes the content scroll cleanly underneath it. */
.caminos-day-foot { flex: 0 0 auto; position: relative; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--app-cream-1, #faf3e3); border-top: 1px solid var(--app-border, #e8dfc8); }
.caminos-day-foot::before { content: ''; position: absolute; left: 0; right: 0; top: -24px; height: 24px; pointer-events: none;
  background: linear-gradient(180deg, rgba(250,243,227,0) 0%, var(--app-cream-1, #faf3e3) 100%); }
.caminos-day-foot .btn { margin: 0; }
/* The footer carries the bottom action, so the body doesn't need the tab-bar clearance. */
#caminosDay .ar-body { padding-bottom: 14px; }
/* Camino screens have no top bar that needs the inset on the hero — the .ar-top
   handles the status bar; bodies clear the bottom tab bar via .ar-body. */
#caminosCatBody .caminos-hero, #caminosDetailBody .caminos-hero { margin-top: -2px; }

.camino-listen { margin: 6px 0 16px; }
.caminos-hero__done { margin-top: 8px; align-self: flex-start; font-size: 0.78rem; font-weight: 800; color: #1a1206; background: var(--app-gold-bright, #f2c14e); padding: 4px 12px; border-radius: 999px; }
.caminos-resume { padding: 14px 16px 2px; }

/* Caminos — featured entry card on Home (prominent, above the fold) */

/* Misión familiar del día (quest.js) */
.fquest { margin: 0 16px 16px; padding: 14px 16px; border-radius: 16px;
  background: var(--app-card-soft, #fffdf7); border: 1px solid var(--app-border-soft, #f0e6d0);
  box-shadow: 0 2px 8px rgba(13, 40, 70, 0.06); }
.fquest__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.fquest__title { font-weight: 800; color: var(--app-text-strong); font-size: 0.95rem; }
.fquest__count { font-weight: 800; color: var(--app-gold-deep, #b07d16); font-size: 0.85rem; }
.fquest__row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.fquest__check { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--app-border, #e5e9ef);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem;
  color: #fff; flex: 0 0 24px; }
.fquest__row.is-done .fquest__check { background: linear-gradient(135deg, #f5d36a, #d9a028); border-color: transparent; color: #0d2846; }
.fquest__icon { font-size: 1.05rem; }
.fquest__label { color: var(--app-text, #1f2d3d); font-size: 0.88rem; font-weight: 600; }
.fquest__row.is-done .fquest__label { opacity: 0.6; text-decoration: line-through; }
.fquest__done { margin: 8px 0 0; font-size: 0.85rem; font-weight: 700; color: var(--app-gold-deep, #b07d16); text-align: center; }

/* "Buenas noches con Cordeo" — bedtime ritual (goodnight.js) */
.gn-entry {
  display: flex; align-items: center; gap: 12px; margin: 14px 16px; padding: 14px 16px;
  border-radius: 18px; cursor: pointer;
  background: linear-gradient(135deg, #101c38 0%, #1a2845 55%, #23345c 100%);
  box-shadow: 0 4px 14px rgba(9, 16, 34, 0.35);
}
.gn-entry__lamb { width: 54px; height: 54px; object-fit: contain; }
.gn-entry__txt { flex: 1; min-width: 0; }
.gn-entry__kicker { color: #f5d36a; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; }
.gn-entry__title { color: #fff; font-weight: 800; font-size: 1rem; margin-top: 1px; }
.gn-entry__sub { color: rgba(255,255,255,0.75); font-size: 0.78rem; margin-top: 2px; }
.gn-entry__arrow { color: #f5d36a; font-size: 1.4rem; }
.gn-kids-btn {
  display: block; width: calc(100% - 32px); margin: 2px 16px 14px; padding: 13px;
  border: none; border-radius: 14px; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #101c38 0%, #23345c 100%);
  color: #f5e9d4; font-size: 0.92rem; font-weight: 800;
}
.ar-screen.gn-screen { background: linear-gradient(180deg, #0a1426 0%, #16233f 100%); color: #fff; }
.ar-screen.gn-screen .ar-close { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); }
.gn-body { padding-bottom: 40px; }
.gn-hero { text-align: center; padding: 6px 22px 18px; }
.gn-hero__lamb { display: block; width: 110px; height: 110px; object-fit: contain; margin: 0 auto 8px; }
.ar-screen.gn-screen .ar-top { background: transparent; }
.gn-kicker { color: #f5d36a !important; }
.gn-title { color: #fff; font-size: 1.35rem; font-weight: 800; margin: 4px 0 6px; }
.gn-sub { color: rgba(255,255,255,0.78); font-size: 0.9rem; margin: 0; line-height: 1.45; }
.gn-steps { padding: 6px 16px; display: flex; flex-direction: column; gap: 10px; }
.gn-step { display: flex; align-items: stretch; gap: 10px; }
.gn-step__check {
  width: 44px; border-radius: 14px; border: 2px solid rgba(245, 211, 106, 0.5);
  background: transparent; color: #f5d36a; font-size: 1.1rem; font-weight: 800; cursor: pointer;
  flex: 0 0 44px;
}
.gn-step.is-done .gn-step__check { background: linear-gradient(135deg, #f5d36a, #d9a028); color: #0d2846; border-color: transparent; }
.gn-step__body {
  flex: 1; display: flex; align-items: center; gap: 12px; text-align: left;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px; padding: 12px 14px; cursor: pointer; font-family: inherit;
}
.gn-step.is-done .gn-step__body { opacity: 0.65; }
.gn-step__icon { font-size: 1.4rem; }
.gn-step__txt { flex: 1; min-width: 0; }
.gn-step__title { display: block; color: #fff; font-weight: 700; font-size: 0.95rem; }
.gn-step__opt { color: rgba(255,255,255,0.55); font-size: 0.75rem; font-style: normal; font-weight: 600; }
.gn-step__sub { display: block; color: rgba(255,255,255,0.6); font-size: 0.78rem; margin-top: 2px; }
.gn-step__go { color: #f5d36a; font-size: 0.95rem; }
.gn-foot { text-align: center; color: rgba(255,255,255,0.5); font-size: 0.78rem; padding: 14px 30px 0; }

/* "¿Quién escucha?" chips (Kids tab) — rendered by family.js */
.kids-who { margin: 4px 16px 12px; }
.kids-who__lbl { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--app-muted, #5b6b7c); text-transform: uppercase; margin-bottom: 6px; }
.kids-who__row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.kids-who__chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 2px solid var(--app-border-soft, #f0e6d0); border-radius: 999px;
  background: var(--app-card-soft, #fffdf7); color: var(--app-text-strong);
  padding: 7px 14px 7px 8px; font-size: 0.85rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.kids-who__chip.is-on { border-color: var(--app-gold, #d9a028); background: rgba(217, 160, 40, 0.12); }
.kids-who__av { font-size: 1.05rem; }

/* ============================================================
   Seasonal campaign banner (Adviento / Cuaresma) — js/seasonal.js
   ============================================================ */
.seasonal-banner {
  position: relative; margin: 14px 16px; border-radius: 18px; overflow: hidden;
  min-height: 148px; cursor: pointer; display: flex; align-items: flex-end;
  box-shadow: 0 4px 14px rgba(13, 40, 70, 0.18);
}
.seasonal-banner__art {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.seasonal-banner__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,40,70,0.05) 0%, rgba(13,40,70,0.82) 78%);
}
.seasonal-banner__txt { position: relative; padding: 14px 16px 14px; width: 100%; }
.seasonal-banner__kicker {
  color: #f5d36a; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em;
}
.seasonal-banner__title { color: #fff; font-size: 1.08rem; font-weight: 800; margin-top: 2px; }
.seasonal-banner__sub { color: rgba(255,255,255,0.85); font-size: 0.8rem; margin-top: 2px; line-height: 1.35; }
.seasonal-banner__cta {
  display: inline-block; margin-top: 10px; padding: 8px 16px; border-radius: 999px;
  background: linear-gradient(135deg, #f5d36a 0%, #d9a028 100%);
  color: var(--ink-navy-1, #0d2846); font-size: 0.82rem; font-weight: 800;
}

.caminos-feature { display: flex; align-items: center; gap: 14px; margin: 14px 16px; padding: 16px 18px; border-radius: 18px; cursor: pointer;
  background: linear-gradient(135deg, var(--ink-navy-1, #0d2846) 0%, var(--ink-navy-3, #1f4c84) 75%, #b8860b 145%);
  color: #fff; box-shadow: 0 6px 20px rgba(13,40,70,0.28); }
.caminos-feature__icon { font-size: 1.8rem; flex: 0 0 auto; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.14); border-radius: 14px; }
.caminos-feature__txt { flex: 1 1 auto; min-width: 0; }
.caminos-feature__title { font-weight: 800; font-size: 1.02rem; }
.caminos-feature__sub { font-size: 0.82rem; opacity: 0.88; margin-top: 2px; }
.caminos-feature__arrow { font-size: 1.4rem; opacity: 0.7; flex: 0 0 auto; }

/* ── Cordeo companion (P0 #2) — the lamb that grows with the streak ── */
/* The legacy thin streak band is replaced by this card. */
#streakBand { display: none !important; }
#cordeoCompanion { margin: 14px 16px; }
/* Navy card uses --ink-navy-* (fixed navy in both light & dark) + cream text. */
.cordeo-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ink-navy-1, #0d2846) 0%, var(--ink-navy-3, #1f4c84) 82%); color: #f5e9d4; }
.cordeo-card__figure { position: relative; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(242, 193, 78, 0.28), rgba(242, 193, 78, 0.04) 70%); }
.cordeo-card__lamb { width: 78px; height: 78px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)); }
/* Per-stage illustration: overlays the base lamb pose when the image exists; onerror removes it, revealing the pose. */
.cordeo-card__stageart { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; z-index: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)); }
/* Sheet stageart flows in place of the base mascot (base is hidden onload), so layout stays intact. */
.cordeo-card__crown { position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 1.3rem; z-index: 2; }
.cordeo-card__body { flex: 1; min-width: 0; }
.cordeo-card__kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #f2c14e; }
.cordeo-card__flame { color: #ffd87a; }
.cordeo-card__stage { font-size: 1.16rem; font-weight: 800; margin: 2px 0 8px; color: #fff; }
.cordeo-card__prog { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.cordeo-card__prog > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #e8a33d, #f2c14e); }
.cordeo-card__next { font-size: 0.74rem; color: rgba(245, 233, 212, 0.82); margin-top: 5px; }
.cordeo-card__next--max { color: #ffd87a; font-weight: 700; }
.cordeo-card__status { font-size: 0.82rem; margin: 7px 0 0; color: rgba(245, 233, 212, 0.92); }
.cordeo-card__status--ok { color: #b6e2a6; font-weight: 700; }
.cordeo-card__status--warn { color: #ffd07a; font-weight: 700; }
.cordeo-card__cta { margin-top: 10px; }
.cordeo-card__arrow { flex: 0 0 auto; align-self: center; font-size: 1.5rem; color: #f2c14e; opacity: 0.85; }
/* Clickable strip of recent days — tap to re-live that day's "Hoy con Cordeo". */
.cordeo-days { display: flex; gap: 6px; margin: 10px 0 2px; overflow-x: auto; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.cordeo-days::-webkit-scrollbar { display: none; }
.cordeo-day { flex: 0 0 auto; width: 40px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 12px;
  border: 1px solid var(--app-border, #e8dfc8); background: var(--app-card, #fff); cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.cordeo-day.is-future { opacity: 0.4; cursor: default; }
.cordeo-day.is-future .cordeo-day__num { color: var(--app-muted, #8a7e64); }
.cordeo-day:active { background: var(--app-cream-2, #f5ebd4); }
.cordeo-day__lbl { font-size: 0.58rem; font-weight: 700; text-transform: uppercase; color: var(--app-muted, #8a7e64); white-space: nowrap; letter-spacing: -0.02em; }
.cordeo-day__dot { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800;
  background: var(--app-cream-2, #f5ebd4); color: var(--app-muted, #8a7e64); }
.cordeo-day.is-active .cordeo-day__dot { background: var(--app-gold-bright, #f2c14e); color: #1a1206; }
.cordeo-day__num { font-size: 0.72rem; font-weight: 700; color: var(--app-text-strong, #0d2846); }
.cordeo-day.is-today { border-color: var(--app-gold, #d4a942); border-width: 2px; }
.cordeo-day.is-today .cordeo-day__lbl { color: var(--app-gold-deep, #b8860b); }
/* Stage ornament — the halo intensifies as Cordeo grows (placeholder until per-stage art). */
.cordeo--stage-3 .cordeo-card__figure, .cordeo--stage-4 .cordeo-card__figure { box-shadow: inset 0 0 0 2px rgba(242, 193, 78, 0.28); }
.cordeo--stage-5 .cordeo-card__figure, .cordeo--stage-6 .cordeo-card__figure, .cordeo--stage-7 .cordeo-card__figure {
  background: radial-gradient(circle at 50% 40%, rgba(242, 193, 78, 0.5), rgba(242, 193, 78, 0.08) 72%); box-shadow: 0 0 18px rgba(242, 193, 78, 0.38); }

/* Cordeo detail sheet (P0 #2 v2) — growth ladder + stats + Premium hook. */
.cordeo-sheet__hero { position: relative; }
.cordeo-sheet__crown { position: absolute; top: 12px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 1.5rem; }
.cordeo-sheet__sec-t { padding: 16px 18px 6px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--app-gold-deep, #b8801c); }
.cordeo-ladder { padding: 0 18px; display: flex; flex-direction: column; gap: 2px; }
.cordeo-ladder__row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.cordeo-ladder__node { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.84rem;
  background: var(--app-card-soft, #fffdf7); color: var(--app-muted, #8a7e64); border: 1.5px solid var(--app-border, #e8dfc8); }
.cordeo-ladder__row.is-done .cordeo-ladder__node { background: var(--app-gold-bright, #f2c14e); color: #1a1206; border-color: transparent; }
.cordeo-ladder__row.is-current .cordeo-ladder__node { background: var(--ink-navy-1, #0d2846); color: var(--app-gold-bright, #f2c14e); border: 2px solid var(--app-gold-bright, #f2c14e); }
.cordeo-ladder__tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cordeo-ladder__tx strong { font-size: 0.94rem; color: var(--app-text-strong, #0d2846); font-weight: 800; }
.cordeo-ladder__row.is-future .cordeo-ladder__tx strong { color: var(--app-muted, #8a7e64); }
.cordeo-ladder__tx span { font-size: 0.75rem; color: var(--app-muted, #8a7e64); }
.cordeo-ladder__now { flex: 0 0 auto; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #1a1206; background: var(--app-gold-bright, #f2c14e); padding: 3px 9px; border-radius: 999px; }
.cordeo-stats { display: flex; gap: 10px; padding: 6px 18px 4px; }
.cordeo-stat { flex: 1; text-align: center; background: var(--app-card-soft, #fffdf7); border: 1px solid var(--app-border, #e8dfc8); border-radius: 14px; padding: 12px 6px; }
.cordeo-stat b { display: block; font-size: 1.4rem; font-weight: 800; color: var(--app-text-strong, #0d2846); }
.cordeo-stat span { font-size: 0.72rem; color: var(--app-muted, #8a7e64); }
.cordeo-prem { margin: 16px 18px 0; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(232, 197, 105, 0.20), rgba(217, 160, 40, 0.07)); border: 1px solid var(--app-gold, #d4a942); }
.cordeo-prem__t { font-weight: 800; color: var(--app-text-strong, #0d2846); font-size: 0.98rem; }
.cordeo-prem__list { margin: 8px 0 12px; padding-left: 18px; }
.cordeo-prem__list li { font-size: 0.86rem; color: var(--app-text, #1f2d3d); line-height: 1.6; }
.cordeo-prem .btn { margin: 0; width: 100%; }
.cordeo-prem__best { font-size: 0.95rem; font-weight: 800; color: var(--app-text-strong, #0d2846); margin-top: 6px; }
.cordeo-prem__soon { margin-top: 8px; font-size: 0.82rem; color: var(--app-muted, #8a7e64); }

/* ── "Hoy con Cordeo" — the daily flow (P0 #3) ── */
.hoy-hero { position: relative; padding: 26px 22px 20px; text-align: center; color: #f5e9d4;
  background: linear-gradient(150deg, var(--ink-navy-1, #0d2846) 0%, var(--ink-navy-3, #1f4c84) 80%, #b8860b 155%); }
.hoy-hero__lamb { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3)); }
.hoy-hero__kicker { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.03em; text-transform: capitalize; color: #f2c14e; margin-top: 4px; }
.hoy-hero__title { font-size: 1.5rem; font-weight: 800; color: #fff; margin: 2px 0 6px; }
.hoy-hero__sub { font-size: 0.9rem; opacity: 0.92; margin: 0 0 14px; }
.hoy-prog { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; max-width: 280px; margin: 0 auto; }
.hoy-prog > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #e8a33d, #f2c14e); transition: width 0.35s ease; }
.hoy-prog__lbl { font-size: 0.78rem; font-weight: 700; color: #ffd87a; margin-top: 6px; }
.hoy-steps { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.hoy-step { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 1px solid var(--app-border, #e8dfc8);
  background: var(--app-card, #fff); border-radius: 16px; }
/* Left+center = "▶ Escuchar" (play / re-listen). Right circle = check off when done. */
.hoy-step__open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; padding: 4px 0; cursor: pointer;
  font-family: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.hoy-step__open:active { opacity: 0.6; }
.hoy-step__ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--app-cream-2, #f5ebd4); }
.hoy-step__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hoy-step__t { font-weight: 800; color: var(--app-text-strong, #0d2846); font-size: 0.98rem; }
.hoy-step__s { font-size: 0.82rem; color: var(--app-muted, #8a7e64); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* clear "▶ Escuchar" pill so it's obvious the row plays */
.hoy-step__go { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; color: var(--app-gold-deep, #b8860b);
  background: var(--app-cream-2, #f5ebd4); border-radius: 999px; padding: 5px 11px; font-size: 0.8rem; font-weight: 800; white-space: nowrap; }
/* right circle = tap to mark done (empty checkbox → gold ✓) */
.hoy-step__check { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  background: transparent; border: 2px solid var(--app-border, #d9cdb0); color: transparent; cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent; transition: transform 0.12s ease; }
.hoy-step__check:active { transform: scale(0.9); }
.hoy-step.is-done .hoy-step__check { background: var(--app-gold-bright, #f2c14e); border-color: var(--app-gold-bright, #f2c14e); color: #1a1206; font-weight: 800; }
.hoy-step.is-done .hoy-step__go { opacity: 0.55; }
.hoy-step.is-done .hoy-step__t { color: var(--app-muted, #8a7e64); }
.hoy-upsell { margin: 6px 16px 22px; padding: 16px; border-radius: 16px; text-align: center;
  background: linear-gradient(160deg, rgba(232, 197, 105, 0.20), rgba(217, 160, 40, 0.07)); border: 1px solid var(--app-gold, #d4a942); }
.hoy-upsell p { margin: 0 0 12px; font-size: 0.9rem; color: var(--app-text, #1f2d3d); }
.hoy-prayer-card { text-align: center; padding: 28px 24px; }
.hoy-prayer__ic { font-size: 2rem; }
.hoy-prayer-card h3 { margin: 6px 0 12px; font-size: 1.2rem; font-weight: 800; color: var(--app-text-strong, #0d2846); }
.hoy-prayer__txt { font-size: 1.05rem; line-height: 1.7; font-style: italic; color: var(--app-text, #1f2d3d); margin: 0 0 18px; }

/* ── "Pregúntale a Cordeo" — AI Bible Q&A chat (P1 #5) ── */
/* Full-screen over the tab bar (z 240) so the chat input is never obscured by it. */
#askScreen { z-index: 245; }
.ask-feature { background: linear-gradient(135deg, #1a2f50 0%, #3a2f6e 60%, #b8860b 150%); }
.ask-top__title { font-weight: 800; color: var(--app-text-strong, #0d2846); font-size: 0.98rem; }
.ask-new { background: var(--app-card, #fff); border: 1px solid var(--app-border, #e8dfc8); color: var(--app-text-strong, #0d2846);
  padding: 7px 12px; border-radius: 999px; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.ask-new:active { background: var(--app-cream-2, #f5ebd4); }
.ask-thread { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.ask-intro { text-align: center; margin: auto 0; padding: 10px 8px; }
.ask-intro__lamb { width: 152px; height: 152px; object-fit: cover; border-radius: 20px; box-shadow: 0 8px 22px rgba(13, 40, 70, 0.22); }
.ask-intro h2 { font-size: 1.3rem; font-weight: 800; color: var(--app-text-strong, #0d2846); margin: 4px 0 6px; }
.ask-intro p { font-size: 0.92rem; color: var(--app-muted, #8a7e64); line-height: 1.55; margin: 0 auto 16px; max-width: 300px; }
.ask-chips { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 0 auto; }
.ask-chip { padding: 11px 14px; border-radius: 14px; border: 1px solid var(--app-border, #e8dfc8); background: var(--app-card, #fff);
  color: var(--app-text-strong, #0d2846); font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-align: left; }
.ask-chip:active { background: var(--app-cream-2, #f5ebd4); }
.ask-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.ask-msg--user { justify-content: flex-end; }
.ask-av { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; }
.ask-bubble { max-width: 80%; padding: 11px 14px; border-radius: 16px; font-size: 0.93rem; line-height: 1.55; }
.ask-bubble p { margin: 0; }
.ask-bubble--user { background: var(--ink-navy-3, #1f4c84); color: #fff; border-bottom-right-radius: 5px; }
.ask-bubble--cordeo { background: var(--app-card, #fff); color: var(--app-text, #1f2d3d); border: 1px solid var(--app-border, #e8dfc8); border-bottom-left-radius: 5px; }
.ask-verse { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--app-gold-deep, #d9a028); background: var(--app-cream-2, #f5ebd4); border-radius: 0 10px 10px 0; }
.ask-verse__ref { font-weight: 800; color: var(--app-gold-deep, #b8860b); font-size: 0.78rem; margin-bottom: 3px; }
.ask-verse p { font-style: italic; font-size: 0.9rem; line-height: 1.5; }
.ask-bubble--limited .btn, .ask-bubble--cordeo .btn { margin-top: 10px; }
.ask-bubble--typing { display: inline-flex; gap: 4px; }
.ask-bubble--typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--app-muted, #8a7e64); opacity: 0.5; animation: askdot 1.2s infinite; }
.ask-bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.ask-bubble--typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes askdot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.ask-foot { flex: 0 0 auto; border-top: 1px solid var(--app-border, #e8dfc8); background: var(--app-cream-1, #faf3e3);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px)); }
.ask-counter { font-size: 0.74rem; color: var(--app-muted, #8a7e64); text-align: center; margin-bottom: 6px; min-height: 14px; }
.ask-counter__prem { color: var(--app-gold-deep, #b8860b); font-weight: 700; }
.ask-input { display: flex; align-items: flex-end; gap: 8px; }
.ask-input textarea { flex: 1; resize: none; border: 1px solid var(--app-border, #e8dfc8); border-radius: 20px; padding: 10px 14px;
  font-family: inherit; font-size: 0.95rem; line-height: 1.4; background: var(--app-card, #fff); color: var(--app-text, #1f2d3d); max-height: 120px; }
.ask-input textarea:focus { outline: none; border-color: var(--app-gold, #d4a942); }
.ask-send { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ink-navy-1, #0d2846); color: var(--app-gold-bright, #f2c14e); font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.ask-send:active { transform: scale(0.92); }

/* ── "Descansa en Él" — sleep & calm hub (P1 #4) ── */
.descansa-hero { text-align: center; padding: 26px 22px 18px; color: #e7ecf5;
  background: linear-gradient(180deg, #0a1430 0%, #16264e 70%, #243a63 100%); }
.descansa-hero__lamb { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.4)); }
.descansa-hero__title { font-size: 1.5rem; font-weight: 800; color: #fff; margin: 4px 0 6px; }
.descansa-hero__sub { font-size: 0.9rem; opacity: 0.85; margin: 0; }
.descansa-timer { margin: 14px 16px 4px; padding: 14px 16px; border-radius: 16px; background: var(--app-card, #fff); border: 1px solid var(--app-border, #e8dfc8); }
.descansa-timer__h { display: flex; justify-content: space-between; align-items: center; font-size: 0.86rem; font-weight: 700; color: var(--app-text-strong, #0d2846); margin-bottom: 10px; }
.descansa-timer__now { color: var(--app-gold-deep, #b8860b); font-weight: 800; }
.descansa-timer__opts { display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  scrollbar-width: none; }
.descansa-timer__opts::-webkit-scrollbar { display: none; }
.descansa-timer__opt { flex: 0 0 auto; min-width: 58px; padding: 9px 6px; border-radius: 10px; border: 1px solid var(--app-border, #e8dfc8); background: var(--app-cream-2, #f5ebd4); scroll-snap-align: center; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05;
  font-family: inherit; font-size: 0.86rem; font-weight: 700; color: var(--app-text-strong, #0d2846); cursor: pointer; }
.descansa-timer__opt.is-active { background: var(--ink-navy-1, #0d2846); color: var(--app-gold-bright, #f2c14e); border-color: transparent; }
.descansa-sec { padding: 14px 16px 4px; }
.descansa-sec__h { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--app-gold-deep, #b8801c); margin-bottom: 8px; }
.descansa-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px; margin-bottom: 8px; border: 1px solid var(--app-border, #e8dfc8);
  background: var(--app-card, #fff); border-radius: 14px; cursor: pointer; font-family: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.descansa-row:active { background: var(--app-cream-2, #f5ebd4); }
.descansa-row.is-locked { opacity: 0.7; }
.descansa-row__ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; background: var(--app-cream-2, #f5ebd4); }
.descansa-row__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.descansa-row__t { font-weight: 700; color: var(--app-text-strong, #0d2846); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.descansa-row__m { font-size: 0.78rem; color: var(--app-muted, #8a7e64); }
.descansa-row__go { flex: 0 0 auto; color: var(--app-gold-deep, #b8860b); font-size: 0.95rem; }

/* ── Respira con Dios (guided breathing overlay) ── */
.ei-breathe { position: fixed; inset: 0; z-index: 260; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 30%, #17335a 0%, #0d2846 55%, #081a30 100%); color: #fdf6e8; }
.ei-breathe.open { display: flex; animation: authFade 0.4s ease; }
.ei-breathe__close { position: absolute; top: calc(env(safe-area-inset-top,0px) + 14px); right: 18px;
  width: 38px; height: 38px; border-radius: 999px; border: none; background: rgba(255,255,255,0.14);
  color: #fff; font-size: 1.1rem; cursor: pointer; }
.ei-breathe__stage { position: relative; width: 260px; height: 260px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.ei-breathe__ring { position: absolute; inset: 0; border-radius: 999px; border: 1px solid rgba(217,160,40,0.35); }
.ei-breathe__circle { width: 150px; height: 150px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 35% 30%, rgba(242,193,78,0.95), rgba(217,160,40,0.65) 60%, rgba(217,160,40,0.25));
  box-shadow: 0 0 60px rgba(242,193,78,0.35); transform: scale(1); opacity: 0.72; }
.ei-breathe__phase { display: flex; align-items: baseline; justify-content: center; gap: 10px; min-height: 2rem; margin-top: 6px; }
.ei-breathe__cue { font-size: 1.15rem; font-weight: 800; color: #fdf6e8; letter-spacing: 0.02em; }
.ei-breathe__secs { font-size: 1.55rem; font-weight: 800; color: #f2c14e; line-height: 1; font-variant-numeric: tabular-nums; }
.ei-breathe__secs:empty { display: none; }

/* Cordeo character mode (3 breathing poses replacing the circle) */
.ei-breathe__glow, .ei-breathe__cordeo-wrap { display: none; }
.ei-breathe.has-cordeo .ei-breathe__ring, .ei-breathe.has-cordeo .ei-breathe__circle { display: none; }
.ei-breathe.has-cordeo .ei-breathe__glow, .ei-breathe.has-cordeo .ei-breathe__cordeo-wrap { display: block; }
.ei-breathe.has-cordeo .ei-breathe__stage { width: 264px; height: 320px; overflow: visible; }
.ei-breathe__glow { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -160px 0 0 -150px; border-radius: 999px;
  background: radial-gradient(circle, rgba(242,193,78,0.34) 0%, rgba(242,193,78,0.10) 52%, transparent 72%); filter: blur(6px); opacity: 0.7; pointer-events: none; }
.ei-breathe__cordeo-wrap { position: relative; width: 252px; height: 318px; transform-origin: center bottom; z-index: 1; }
.ei-breathe__cordeo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
  opacity: 0; transition: opacity 0.5s ease; filter: drop-shadow(0 10px 22px rgba(0,0,0,0.30)); }
.ei-breathe__cordeo.is-on { opacity: 1; }

/* Breathing pattern selector (4-7-8 adults / 3-4-6 kids) + legal note */
.ei-breathe__patterns { display: flex; gap: 10px; margin-bottom: 14px; }
.ei-breathe__pat { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 148px; max-width: 42vw;
  background: rgba(255,255,255,0.08); border: 1.5px solid rgba(255,255,255,0.20); color: #fdf6e8;
  border-radius: 14px; padding: 9px 10px; font-family: inherit; cursor: pointer; }
.ei-breathe__pat b { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; }
.ei-breathe__pat span { font-size: 0.66rem; line-height: 1.2; opacity: 0.82; }
.ei-breathe__pat.is-on { border-color: #f2c14e; background: rgba(242,193,78,0.16); color: #fff; }
.ei-breathe__legal { margin: 16px auto 0; max-width: 320px; font-size: 0.64rem; line-height: 1.4;
  color: rgba(255,255,255,0.55); padding: 0 20px; }
.ei-breathe__count { position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  font-size: 5.2rem; font-weight: 800; color: #f2c14e; text-shadow: 0 0 40px rgba(242,193,78,0.5); pointer-events: none; }
.ei-breathe__count.show { display: flex; animation: breatheCount 1s ease; }
@keyframes breatheCount { 0% { transform: scale(0.6); opacity: 0; } 30% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(0.85); opacity: 0.5; } }
.ei-breathe__status { font-size: 0.98rem; line-height: 1.4; color: #cfe0f2; max-width: 300px; min-height: 1.4em; margin-bottom: 2px; }
.ei-breathe__verse { font-size: 1.15rem; line-height: 1.5; font-style: italic; max-width: 340px; margin-top: 6px; color: #fdf6e8; }
.ei-breathe__ref { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.06em; color: #e8c569; text-transform: uppercase; }

.descansa-breathe { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  margin: 0 0 14px; padding: 14px 16px; border: none; border-radius: 16px; cursor: pointer; font-family: inherit;
  background: linear-gradient(120deg, #17335a 0%, #1f4c84 70%, #b8860b 150%); color: #fdf6e8; }
.descansa-breathe__ic { font-size: 1.6rem; flex: 0 0 auto; }
.descansa-breathe__tx { flex: 1; display: flex; flex-direction: column; }
.descansa-breathe__t { font-weight: 800; font-size: 0.98rem; }
.descansa-breathe__s { font-size: 0.78rem; opacity: 0.85; }
.descansa-breathe__go { font-size: 1.4rem; opacity: 0.7; flex: 0 0 auto; }

.descansa-timer__u { font-size: 0.6rem; font-weight: 700; opacity: 0.7; margin-top: 1px; }
.descansa-timer__hint { margin: 0 0 10px; font-size: 0.74rem; line-height: 1.35; color: var(--app-muted, #8a7e64); }

/* ---- Sleep-timer bottom sheet (reusable, opened from main player) ---- */
.st-sheet-ov { position: fixed; inset: 0; z-index: 5200; background: rgba(20,16,8,0.5); opacity: 0; pointer-events: none; transition: opacity .2s ease; display: flex; align-items: flex-end; justify-content: center; }
.st-sheet-ov.open { opacity: 1; pointer-events: auto; }
.st-sheet { width: 100%; max-width: 520px; background: var(--app-card, #fff); color: var(--app-text, #1c1810); border-radius: 20px 20px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -8px 30px rgba(0,0,0,0.25); }
.st-sheet-ov.open .st-sheet { transform: translateY(0); }
.st-sheet__grab { width: 40px; height: 4px; border-radius: 999px; background: var(--app-border, #ddd); margin: 4px auto 12px; }
.st-sheet__h { display: flex; align-items: baseline; justify-content: space-between; font-weight: 800; font-size: 1.05rem; }
.st-sheet__now { font-size: .9rem; font-weight: 700; color: #d9a028; }
.st-sheet__hint { margin: 6px 0 14px; font-size: .78rem; line-height: 1.4; color: var(--app-muted, #8a7e64); }
.st-sheet__opts { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.st-sheet__opt { flex: 0 0 auto; min-width: 54px; scroll-snap-align: center; background: transparent; border: 1.5px solid var(--app-border, #ddd); color: var(--app-text, #1c1810); border-radius: 14px; padding: 12px 10px; font-size: 1rem; font-weight: 800; font-family: inherit; cursor: pointer; line-height: 1; }
.st-sheet__opt.is-on { border-color: #d9a028; background: rgba(217,160,40,0.12); color: #b3811e; }
.st-sheet__u { display: block; font-size: .62rem; font-weight: 700; opacity: .7; margin-top: 3px; }
.st-sheet__close { margin-top: 16px; width: 100%; background: var(--app-navy, #1f4c84); color: #fff; border: 0; border-radius: 14px; padding: 13px; font-size: 1rem; font-weight: 800; font-family: inherit; cursor: pointer; }

/* Breathe welcome screen (Cordeo greeting + Start button) */
.ei-breathe__welcome, .ei-breathe__guide { display: flex; flex-direction: column; align-items: center; width: 100%; }
.ei-breathe__welcome[hidden], .ei-breathe__guide[hidden] { display: none; }
.ei-breathe__hero { width: 208px; max-width: 60vw; height: auto; margin-bottom: 4px;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,0.38)); animation: breatheHero 3.2s ease-in-out infinite; }
@keyframes breatheHero { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.ei-breathe__title { margin: 2px 0 2px; font-size: 1.55rem; font-weight: 800; color: #f0d98a; }
.ei-breathe__subtitle { margin: 0 0 14px; font-size: 0.95rem; color: #cfe0f2; }
.ei-breathe__start { margin-top: 18px; background: linear-gradient(135deg, #f2c14e, #d9a028); color: #1a1206;
  border: none; border-radius: 16px; padding: 14px 46px; font-size: 1.12rem; font-weight: 800; font-family: inherit;
  cursor: pointer; box-shadow: 0 8px 24px rgba(242,193,78,0.35); }
.ei-breathe__start:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .ei-breathe__hero { animation: none; } }

.descansa-row.is-soon{opacity:.55;cursor:default;}
.descansa-row.is-soon .descansa-row__m{color:var(--app-gold-dark,#9a6f12);font-weight:700;}

/* ── Mini-encuesta a padres (survey.js) ─────────────────── */
#eiSurveySheet { position: fixed; inset: 0; z-index: 340; pointer-events: none; }
#eiSurveySheet .svy-backdrop { position: absolute; inset: 0; background: rgba(15,26,44,0); transition: background 0.28s; }
#eiSurveySheet.open .svy-backdrop { background: rgba(15,26,44,0.45); pointer-events: auto; }
#eiSurveySheet .svy-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 600px; margin: 0 auto;
  background: var(--app-card, #fffdf7); border-radius: 20px 20px 0 0;
  padding: 20px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 30px rgba(0,0,0,0.28); text-align: center;
  transform: translateY(105%); transition: transform 0.28s ease; pointer-events: auto;
}
#eiSurveySheet.open .svy-sheet { transform: translateY(0); }
#eiSurveySheet .svy-lamb { width: 58px; height: 58px; object-fit: contain; margin-bottom: 6px; }
#eiSurveySheet .svy-q { margin: 0 0 14px; font-weight: 800; font-size: 1.02rem; line-height: 1.4; color: var(--app-text-strong); }
#eiSurveySheet .svy-opt {
  display: block; width: 100%; margin: 0 0 8px; padding: 13px;
  border: 1px solid var(--app-border, #e5e9ef); border-radius: 12px;
  background: var(--app-card-soft, #fff); color: var(--app-text-strong);
  font-weight: 800; font-size: 0.95rem; font-family: inherit; cursor: pointer;
}
#eiSurveySheet .svy-opt:active { transform: scale(0.98); }
#eiSurveySheet .svy-later {
  margin-top: 4px; padding: 10px; border: none; background: none;
  color: var(--app-muted); font-size: 0.85rem; font-family: inherit; cursor: pointer;
}

/* Age-band chip on story thumbs (shown to younger active profiles) */
.story-card .thumb { position: relative; }
.story-card .age-chip {
  position: absolute; top: 6px; right: 6px;
  background: rgba(15,26,44,0.72); color: #fff;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.02em;
  padding: 2px 7px; border-radius: 999px; pointer-events: none;
}

/* ── Gemas escondidas (gems.js) ─────────────────────────── */
.gem-shelf { margin: 0 0 14px; padding: 13px 15px; }
.gem-shelf__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.gem-shelf__title { font-weight: 800; font-size: 0.92rem; color: var(--app-text-strong); }
.gem-shelf__count { font-weight: 800; font-size: 0.8rem; color: var(--app-gold-dark, #9a6f12); }
.gem-shelf__row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.gem-shelf__gem { font-size: 1.25rem; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18)); }
.gem-shelf__hint { font-size: 0.8rem; color: var(--app-muted); line-height: 1.45; }

/* ── La pradera de Cordeo (pradera.js) ──────────────────── */
.gem-shelf__meadow {
  display: block; width: 100%; margin-top: 10px; padding: 10px;
  border: 1px solid var(--app-border, #e5e9ef); border-radius: 10px;
  background: var(--app-card-soft, #fff); color: var(--app-text-strong);
  font-weight: 800; font-size: 0.85rem; font-family: inherit; cursor: pointer; text-align: center;
}
.ar-screen.meadow-screen { background: #eaf6ee; }
.ar-screen.meadow-screen .ar-top { background: transparent; position: absolute; z-index: 5; }
.meadow-scene {
  position: relative; width: 100%; height: 58vh; min-height: 340px; overflow: hidden;
}
.meadow-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #aee3f8 0%, #d9f3fb 55%, #eaf6ee 100%); }
.meadow-scene.is-night .meadow-sky { background: linear-gradient(180deg, #0a1426 0%, #1c2c4d 60%, #29405f 100%); }
.meadow-sun { position: absolute; top: 9%; left: 9%; font-size: 2.2rem; filter: drop-shadow(0 0 14px rgba(255,220,90,0.55)); }
.meadow-hill { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.meadow-hill--far  { bottom: -12%; height: 46%; background: #bfe3b4; }
.meadow-hill--near { bottom: -22%; height: 42%; background: #9fd48e; }
.meadow-scene.is-night .meadow-hill--far  { background: #29483a; }
.meadow-scene.is-night .meadow-hill--near { background: #1f3a2e; }
.meadow-lamb {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%);
  width: 108px; height: 108px; object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.22)); z-index: 3;
}
.meadow-slot {
  position: absolute; transform: translate(-50%, -50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 1.7rem; line-height: 1; background: transparent; padding: 0;
  font-family: inherit;
}
.meadow-slot:not(.is-on) {
  font-size: 0.95rem; font-weight: 800; color: rgba(30,50,40,0.45);
  background: rgba(255,255,255,0.35); border: 2px dashed rgba(30,50,40,0.28);
}
.meadow-scene.is-night .meadow-slot:not(.is-on) { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }
.meadow-slot.is-on { animation: meadowFloat 3.4s ease-in-out infinite; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.2)); }
.meadow-slot.is-on:nth-child(odd) { animation-delay: -1.7s; }
@keyframes meadowFloat { 0%,100% { transform: translate(-50%,-50%); } 50% { transform: translate(-50%,-58%); } }
@media (prefers-reduced-motion: reduce) { .meadow-slot.is-on { animation: none; } }
.meadow-panel { padding: 18px 22px calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.meadow-title { margin: 4px 0 8px; font-size: 1.25rem; font-weight: 800; color: var(--app-text-strong); }
.meadow-sub { margin: 0 0 8px; font-size: 0.92rem; line-height: 1.5; color: var(--app-text); }
.meadow-hint { margin: 0; font-size: 0.78rem; color: var(--app-muted); }

/* ── Resumen semanal familiar (weekly-digest.js) ────────── */
.wd-card { position: relative; margin: 0 16px 14px; padding: 15px 16px; }
.wd-close { position: absolute; top: 8px; right: 10px; border: none; background: none; color: var(--app-muted); font-size: 0.95rem; cursor: pointer; padding: 6px; font-family: inherit; }
.wd-title { margin: 0 0 4px; font-size: 0.98rem; color: var(--app-text-strong); }
.wd-sub { margin: 0 0 10px; font-size: 0.82rem; color: var(--app-muted); }
.wd-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--app-border, #eee5d0); }
.wd-row__avatar { font-size: 1.15rem; }
.wd-row__name { font-weight: 800; font-size: 0.88rem; color: var(--app-text-strong); flex: 0 0 auto; }
.wd-row__stats { font-size: 0.78rem; color: var(--app-text); margin-left: auto; text-align: right; line-height: 1.35; }
.wd-cta { display: block; width: 100%; margin-top: 10px; padding: 11px; border: none; border-radius: 11px; background: linear-gradient(135deg, #f5d36a, #d9a028); color: #0d2846; font-weight: 800; font-size: 0.88rem; font-family: inherit; cursor: pointer; }
