/* ═══════════════════════════════════════════════════════
   PORTUGAL 2026 · Cuaderno de ruta
   Luz de verano portugués: cal blanca, azulejo azul y sol.
   Tema claro. Tipografía: Plus Jakarta Sans (todo).
   ═══════════════════════════════════════════════════════ */

@font-face {
  font-family: "Jakarta";
  src: url("../fonts/jakarta-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("../fonts/jakarta-italic-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Cal, arena y sombra fresca: el blanco de los pueblos del Alentejo */
  --bg: #fdfaf4;
  --bg-2: #f7f1e6;
  --surface: #ffffff;
  --surface-2: #f6f1e8;
  --line: #e6dccb;
  --line-soft: #efe7d9;

  --ink: #17303f;        /* azul tinta, no negro: más cálido bajo el sol */
  --ink-dim: #557084;
  --ink-faint: #7d94a5;

  /* Azulejo: el acento que manda en toda la app */
  --az: #1668b0;
  --az-soft: #3f8fd4;
  --az-deep: #0f4c85;
  --az-wash: #e7f1fb;

  /* Sol de agosto: solo para lo que quema (ahora, carretera, reservas) */
  --sol: #e8722c;
  --sol-soft: #f59f52;
  --sol-wash: #fdefe1;

  --verde: #2f7d5d;      /* hecho */
  --mar: #0f9bb5;        /* playa */

  --r-card: 18px;
  --r-tile: 24px;
  --r-pill: 999px;
  --pad: 18px;

  --font: "Jakarta", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sombra: 0 10px 34px rgba(23, 48, 63, 0.09);
  --sombra-alta: 0 16px 44px rgba(23, 48, 63, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.58;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
body.tts-abierto { padding-bottom: calc(188px + env(safe-area-inset-bottom)); }

/* Atmósfera: sol de poniente arriba, mar a la derecha. Quieta y barata. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 55% at 50% -8%, rgba(245, 159, 82, 0.20), transparent 62%),
    radial-gradient(90% 45% at 100% 4%, rgba(22, 104, 176, 0.10), transparent 58%);
  pointer-events: none;
}

@keyframes surgir { from { opacity: 0; transform: translateY(14px); } }
@keyframes surgirFoto { from { opacity: 0; transform: scale(1.05); } }
@keyframes latido { 50% { opacity: 0.45; transform: scale(0.8); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═════════ Cabecera ═════════ */
header.top {
  padding: calc(18px + env(safe-area-inset-top)) var(--pad) 0;
  animation: surgir 0.5s var(--ease) both;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--az);
}
.brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sol); }
.brand .dates { color: var(--ink-faint); letter-spacing: 0.05em; font-weight: 600; }

h1.title {
  font-weight: 800;
  font-size: clamp(36px, 10.5vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-top: 10px;
  color: var(--ink);
}
h1.title em {
  font-style: italic;
  font-weight: 800;
  color: var(--sol);
  line-height: 1.12;      /* la 'p' de poniente necesita sitio */
  padding-bottom: 2px;
  display: inline-block;
}
.subtitle { color: var(--ink-dim); font-size: 15.5px; margin-top: 10px; max-width: 34ch; }

/* Fuera del itinerario la portada estorba: la marca se encoge. */
body.compacta h1.title { font-size: 26px; margin-top: 6px; }
body.compacta .subtitle,
body.compacta .badge-live { display: none; }
body.compacta header.top { padding-bottom: 4px; }

.badge-live {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 7px 15px 7px 12px;
  background: var(--sol-wash);
  border: 1px solid rgba(232, 114, 44, 0.32);
  border-radius: var(--r-pill);
  font-size: 13.5px; color: #b8531a; font-weight: 700;
}
.badge-live .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sol);
  animation: latido 2s ease-in-out infinite;
}

/* ═════════ Selector de días ═════════ */
nav.days {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 9px;
  padding: 14px var(--pad);
  margin-top: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(253, 250, 244, 0.94);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line-soft);
}
nav.days::-webkit-scrollbar { display: none; }

.day-chip {
  flex: 0 0 auto;
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 76px; min-height: 58px;
  padding: 9px 13px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-dim);
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.day-chip:active { transform: scale(0.95); }
.day-chip .n {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint);
}
.day-chip .f {
  font-weight: 800; font-size: 16px; color: var(--ink); margin-top: 2px; letter-spacing: -0.02em;
}
.day-chip .hoy {
  position: absolute; top: -6px; right: -4px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.08em;
  color: #fff; background: var(--sol);
  padding: 3px 7px; border-radius: var(--r-pill);
  box-shadow: 0 4px 10px rgba(232, 114, 44, 0.45);
}
.day-chip.active {
  background: var(--az);
  border-color: var(--az);
  color: #fff;
  box-shadow: 0 8px 22px rgba(22, 104, 176, 0.28);
}
.day-chip.active .n { color: rgba(255, 255, 255, 0.82); }
.day-chip.active .f { color: #fff; }

/* ═════════ Contenedor ═════════ */
main { padding: 0 var(--pad); max-width: 680px; margin: 0 auto; }

/* ═════════ Hero del día ═════════ */
.day-hero { padding: 22px 0 4px; animation: surgir 0.5s var(--ease) both; }

.hero-foto {
  position: relative;
  border-radius: var(--r-tile);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  box-shadow: var(--sombra-alta);
  animation: surgirFoto 0.7s var(--ease) both;
}
.hero-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Velo azul tinta: el texto se lee sobre cualquier foto y la mitad de arriba
   se sigue viendo limpia. */
.hero-foto::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(12, 32, 46, 0.94) 0%,
    rgba(12, 32, 46, 0.82) 22%,
    rgba(12, 32, 46, 0.42) 44%,
    transparent 64%);
}
.hero-txt {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 20px;
  color: #fff;
}
.hero-txt .fecha {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sol-soft);
  display: flex; align-items: center; gap: 8px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}
.hero-txt h2 {
  font-weight: 800;
  font-size: clamp(26px, 7.2vw, 34px);
  line-height: 1.14;      /* los acentos de las mayúsculas (Évora) piden aire */
  letter-spacing: -0.035em;
  margin: 8px 0 0;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.lema { color: var(--ink-dim); font-size: 15.5px; margin: 14px 2px 0; max-width: 46ch; }

.stats {
  display: flex; align-items: stretch;
  margin: 18px 0 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { flex: 1; padding: 14px 4px 13px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 16px; }
.stat .v { font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; }
.stat .k {
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 3px; font-weight: 700;
}
.stat.acento .v { color: var(--sol); }
.stat.playa .v { color: var(--mar); }

.hero-actions { display: flex; gap: 10px; margin: 18px 0 2px; }

/* ═════════ Botones ═════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: none; border-radius: var(--r-pill);
  padding: 14px 22px; min-height: 48px;
  font-family: var(--font); font-weight: 800; font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn svg { width: 18px; height: 18px; }
.btn-sun {
  background: var(--az);
  color: #fff;
  box-shadow: 0 10px 26px rgba(22, 104, 176, 0.3);
}
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
}

/* ═════════ Timeline ═════════ */
.timeline { position: relative; padding: 22px 0 24px; }
.timeline::before {
  content: "";
  position: absolute; left: 15px; top: 26px; bottom: 26px;
  width: 2px;
  background: linear-gradient(to bottom, var(--az) 0%, var(--line) 12%, var(--line) 88%, transparent);
  opacity: 0.6;
}

.ev {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  margin-bottom: 14px;
  animation: surgir 0.5s var(--ease) both;
}
.ev-ico {
  position: relative; z-index: 1;
  width: 32px; height: 32px; margin-top: 12px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-faint);
}
.ev-ico svg { width: 15px; height: 15px; }

.ev-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 15px 16px;
  box-shadow: var(--sombra);
}

/* La carretera se distingue: es lo que quema el día */
.ev.tipo-coche .ev-card,
.ev.tipo-tren .ev-card,
.ev.tipo-taxi .ev-card {
  background: var(--sol-wash);
  border-color: rgba(232, 114, 44, 0.26);
  box-shadow: none;
}
.ev.tipo-coche .ev-ico,
.ev.tipo-tren .ev-ico,
.ev.tipo-taxi .ev-ico { color: var(--sol); border-color: rgba(232, 114, 44, 0.4); }
.ev.tipo-playa .ev-ico, .ev.tipo-atardecer .ev-ico { color: var(--mar); border-color: rgba(15, 155, 181, 0.4); }

.ev.ahora .ev-card {
  border-color: var(--sol);
  box-shadow: 0 0 0 1px var(--sol), 0 12px 30px rgba(232, 114, 44, 0.18);
}
.ev.ahora .ev-ico {
  background: var(--sol); color: #fff; border-color: var(--sol);
  box-shadow: 0 0 0 5px var(--sol-wash);
}

.ev-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ev-h {
  font-weight: 800; font-size: 15px; color: var(--az);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em; white-space: nowrap;
}
.ev.tipo-coche .ev-h, .ev.tipo-tren .ev-h, .ev.tipo-taxi .ev-h { color: #b8531a; }
.ev-h .tz { font-size: 11px; color: var(--ink-faint); font-weight: 700; }
.tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-pill);
}
.tag-opcional { background: var(--surface-2); color: var(--ink-dim); }
.tag-reserva { background: var(--sol); color: #fff; }
.tag-ahora { background: var(--sol); color: #fff; }

.ev-t { font-weight: 800; font-size: 17.5px; margin-top: 5px; line-height: 1.25; letter-spacing: -0.025em; }
.ev-d { color: var(--ink-dim); font-size: 14.5px; margin-top: 7px; }

.ruta-datos { display: flex; gap: 8px; margin-top: 11px; }
.ruta-datos span {
  font-size: 13px; font-weight: 800;
  padding: 5px 11px; border-radius: 9px;
  background: #fff;
  border: 1px solid rgba(232, 114, 44, 0.3);
  color: #b8531a;
  font-variant-numeric: tabular-nums;
}
.ev-obs {
  margin-top: 10px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  font-size: 13.5px; color: var(--ink-dim);
}
.ev.tipo-coche .ev-obs { background: rgba(255, 255, 255, 0.75); }
.ev-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 15px; min-height: 44px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-size: 13.5px; font-weight: 700; font-family: var(--font);
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.mini-btn:active { transform: scale(0.96); }
.mini-btn.nav { border-color: var(--az); color: var(--az); background: var(--az-wash); }
.mini-btn svg { width: 15px; height: 15px; }

/* Plan B */
.planb {
  margin: 4px 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
}
.planb summary {
  list-style: none; cursor: pointer;
  padding: 15px 17px; min-height: 48px;
  font-weight: 800; color: var(--ink); font-size: 15.5px;
  display: flex; align-items: center; gap: 10px;
}
.planb summary::-webkit-details-marker { display: none; }
.planb summary svg { width: 17px; height: 17px; color: var(--mar); flex: 0 0 auto; }
.planb summary .chev { margin-left: auto; color: var(--ink-faint); transition: transform 0.25s var(--ease); }
.planb[open] summary .chev { transform: rotate(180deg); }
.planb p { padding: 0 17px 16px; color: var(--ink-dim); font-size: 14.5px; }

/* ═════════ Guías ═════════ */
.section-title { font-weight: 800; font-size: 30px; letter-spacing: -0.04em; margin: 24px 0 6px; line-height: 1.05; }
.section-sub { color: var(--ink-dim); font-size: 15px; margin-bottom: 20px; max-width: 44ch; }

.guia-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-tile);
  background: var(--surface);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--sombra);
  animation: surgir 0.5s var(--ease) both;
}
.guia-card summary { list-style: none; cursor: pointer; display: block; }
.guia-card summary::-webkit-details-marker { display: none; }

.guia-foto { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.guia-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.guia-card[open] .guia-foto img { transform: scale(1.05); }
.guia-foto::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12, 32, 46, 0.92) 2%, rgba(12, 32, 46, 0.35) 48%, transparent 76%);
}
.guia-cab {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 16px 17px;
  display: flex; align-items: flex-end; gap: 12px;
}
.guia-nombre {
  font-weight: 800; font-size: 25px; flex: 1; color: #fff;
  letter-spacing: -0.035em; line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}
.guia-chev {
  color: #fff; background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  flex: 0 0 auto;
}
.guia-card[open] .guia-chev { transform: rotate(180deg); }

.guia-body { padding: 18px 17px 22px; }
.guia-body h3 { font-weight: 800; font-size: 19px; margin-bottom: 12px; color: var(--az); letter-spacing: -0.025em; }
.guia-entrada { color: var(--ink); font-size: 15.5px; margin-bottom: 16px; }
.guia-entrada::first-letter {
  float: left;
  font-weight: 800;
  font-size: 44px; line-height: 0.9;
  padding: 3px 9px 0 0;
  color: var(--sol);
}
/* Cada sección de la guía, separada por una línea fina */
.guia-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.guia-sec h4 {
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sol); margin-bottom: 10px;
}
.guia-sec p { color: var(--ink-dim); font-size: 15px; margin-bottom: 12px; }
.guia-sec p:last-child { margin-bottom: 0; }

/* ═════════ Free tours ═════════ */
.tour-foto { aspect-ratio: 21 / 9; }
.tag.tour-si { background: var(--verde); color: #fff; }
.tag.tour-no { background: rgba(255, 255, 255, 0.22); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tour-fecha { margin-top: 8px; font-size: 12.5px; color: var(--ink-faint); }

/* El hueco del itinerario donde encaja (o no) el tour */
.tour-encaje {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 12px 0 4px; padding: 12px 13px;
  background: var(--az-wash);
  border: 1px solid rgba(22, 104, 176, 0.25);
  border-radius: 12px;
  font-size: 14px; color: var(--ink);
}
.tour-encaje svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--az); margin-top: 2px; }

.tour-op { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.tour-op:first-of-type { border-top: none; }
.tour-cab { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tour-empresa {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sol);
}
.tag.tour-diario { background: var(--surface-2); color: var(--ink-dim); text-transform: none; letter-spacing: 0; }
.tour-nombre { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; margin-top: 4px; }
.tour-desc { color: var(--ink-dim); font-size: 14.5px; margin-top: 6px; }
.tour-datos { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tour-datos span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  padding: 6px 11px; border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.tour-datos svg { width: 14px; height: 14px; color: var(--az); }
.tour-punto {
  display: flex; gap: 7px; align-items: flex-start;
  margin-top: 10px; font-size: 13.5px; color: var(--ink-dim);
}
.tour-punto svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--sol); margin-top: 2px; }

/* ═════════ Consejos ═════════ */
.consejo-bloque {
  border: 1px solid var(--line-soft); border-radius: var(--r-card);
  background: var(--surface); padding: 17px 17px 15px; margin-bottom: 14px;
  box-shadow: var(--sombra);
  animation: surgir 0.5s var(--ease) both;
}
.consejo-bloque h3 {
  font-size: 18px; font-weight: 800;
  color: var(--ink); margin-bottom: 11px;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.025em;
}
.consejo-bloque h3 svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--az); }
.consejo-bloque p { color: var(--ink-dim); font-size: 14.5px; }

.check-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; min-height: 46px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
}
.check-item + .check-item { border-top: 1px solid var(--line-soft); }
.check-item:focus-visible { outline: 2px solid var(--az); outline-offset: 2px; }
.check-box {
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px;
  border-radius: 7px; border: 2px solid var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease); color: transparent;
}
.check-box svg { width: 13px; height: 13px; }
.check-item.done .check-box { background: var(--verde); border-color: var(--verde); color: #fff; }
.check-item .txt { font-size: 14.5px; color: var(--ink); flex: 1; }
.check-item.done .txt { color: var(--ink-faint); text-decoration: line-through; }
.check-item .urg {
  flex: 0 0 auto; align-self: flex-start; margin-top: 1px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em;
  padding: 4px 9px; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--sol-wash); color: #b8531a;
}

ul.plain { list-style: none; }
ul.plain li { padding: 9px 0 9px 26px; position: relative; color: var(--ink-dim); font-size: 14.5px; }
ul.plain li + li { border-top: 1px solid var(--line-soft); }
ul.plain li::before {
  content: ""; position: absolute; left: 4px; top: 18px;
  width: 10px; height: 2px; border-radius: 2px; background: var(--sol);
}
.destacado {
  border-color: rgba(232, 114, 44, 0.4);
  background: linear-gradient(160deg, var(--sol-wash), var(--surface));
}
.destacado h3 { color: #b8531a; }
.destacado h3 svg { color: var(--sol); }

.creditos { font-size: 12px; color: var(--ink-faint); line-height: 1.7; }
.creditos a { color: var(--az); }

/* ═════════ Reproductor ═════════ */
.tts-player {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 13px 14px;
  display: none;
  box-shadow: 0 18px 44px rgba(23, 48, 63, 0.22);
  max-width: 656px; margin: 0 auto;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.tts-player.on { display: block; animation: surgir 0.35s var(--ease) both; }
.tts-row { display: flex; align-items: center; gap: 12px; }
.tts-info { flex: 1; min-width: 0; }
.tts-title { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tts-sub { font-size: 12.5px; color: var(--az); font-variant-numeric: tabular-nums; margin-top: 1px; font-weight: 700; }
.tts-ctrl {
  width: 46px; height: 46px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--az);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  transition: transform 0.15s var(--ease);
  box-shadow: 0 6px 16px rgba(22, 104, 176, 0.36);
}
.tts-ctrl:active { transform: scale(0.93); }
.tts-ctrl.sec {
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); width: 44px; height: 44px; box-shadow: none;
}
.tts-ctrl svg { width: 19px; height: 19px; }
.tts-bar { height: 3px; background: var(--line); border-radius: 99px; margin-top: 11px; overflow: hidden; }
.tts-bar .fill { height: 100%; width: 0%; background: var(--az); border-radius: 99px; transition: width 0.4s linear; }

/* ═════════ Barra inferior ═════════ */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex;
  background: rgba(253, 250, 244, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 0 11px; min-height: 46px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint);
  font-family: var(--font); font-size: 11px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 21px; height: 21px; transition: transform 0.25s var(--ease); }
.tab.active { color: var(--az); }
.tab.active svg { transform: translateY(-2px) scale(1.08); }
.tab.active::before {
  content: "";
  position: absolute; top: 0; left: 26%; right: 26%;
  height: 3px; border-radius: 0 0 4px 4px;
  background: var(--az);
}

.oculto { display: none !important; }

/* Ajustes de voz */
.voz-ajustes { margin-top: 12px; display: flex; gap: 11px; align-items: center; flex-wrap: wrap; }
.voz-ajustes label { font-size: 12.5px; color: var(--ink-faint); font-weight: 700; }
.voz-ajustes select, .voz-ajustes input[type="range"] {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 11px; padding: 11px;
  font-family: var(--font); font-size: 14px; max-width: 100%;
  min-height: 44px;
}
.voz-ajustes select { flex: 1 1 180px; min-width: 0; }
.voz-ajustes input[type="range"] { accent-color: var(--az); padding: 0; flex: 1 1 120px; height: 44px; border: none; background: none; }
.voz-ajustes span { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-dim); }

footer.pie { text-align: center; color: var(--ink-faint); font-size: 12px; padding: 10px 20px 24px; }
