:root {
  --bg: #121010;
  --fg: #efe8dc;
  --muted: #9a9187;
  --line: #2c2725;
  --accent: #c9a26b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.pagina {
  min-height: 100dvh;
  max-width: 34rem;
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── cabecera de la muestra ───────────────────────── */
.muestra {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}
.muestra strong { color: var(--fg); font-weight: 600; }

/* ── sitio ────────────────────────────────────────── */
.sitio { display: flex; flex-direction: column; gap: 0.6rem; }
.numero {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--accent);
}
.nombre {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.lugar { color: var(--muted); font-size: 0.9rem; }
.texto { font-size: 1rem; line-height: 1.55; color: #d6cec2; max-width: 30rem; }

/* ── reproductor ──────────────────────────────────── */
.reproductor {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.boton {
  position: relative;
  width: 11rem;
  height: 11rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.boton svg.anillo { position: absolute; inset: 0; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 2; }
.anillo .pista { stroke: var(--line); }
.anillo .avance { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.boton .icono {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.boton .icono svg { width: 2.6rem; height: 2.6rem; fill: currentColor; }
.boton .pausa { display: none; }
.boton[aria-pressed="true"] .play { display: none; }
.boton[aria-pressed="true"] .pausa { display: block; }
.boton:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.boton.cargando .avance { animation: respira 1.4s ease-in-out infinite; }
@keyframes respira { 50% { opacity: 0.3; } }

.barra {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.barra input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 2rem;
  background: transparent;
}
.barra input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
.barra input[type="range"]::-moz-range-track { height: 2px; background: var(--line); }
.barra input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; margin-top: -6px;
  border-radius: 50%; background: var(--accent); border: none;
}
.barra input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: none;
}
.tiempos {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.pistas { display: flex; gap: 0.5rem; justify-content: center; }
.pistas button {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.95rem;
  cursor: pointer;
}
.pistas button[aria-current="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.aviso { font-size: 0.8rem; color: var(--muted); text-align: center; }
.error { color: #e48a7e; }

/* ── índice ───────────────────────────────────────── */
.lista { list-style: none; border-top: 1px solid var(--line); }
.lista li { border-bottom: 1px solid var(--line); }
.lista a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  color: var(--fg);
  text-decoration: none;
}
.lista .n { font-family: var(--serif); color: var(--c, var(--accent)); width: 1.6rem; }
.lista .t { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.lista .l { margin-left: auto; font-size: 0.8rem; color: var(--muted); text-align: right; }
