:root {
  --bg: #f4f1ec;
  --card: #fdfcfa;
  --ink: #2b2b2b;
  --muted: #5d5850;
  --line: #d8d2c4;
  --brand: #00243f;
  --brand-deep: #001629;
  --gold: #ca932f;
  --live: #1f7a4a;
  --warn: #9a5b00;
  --radius: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1617;
    --card: #262021;
    --ink: #f2ede6;
    --muted: #c3bab0;
    --line: #3d3436;
    --live: #4cc287;
    --warn: #f0b04a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--card); color: var(--ink); padding: .5rem 1rem; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* El logotipo oficial es azul marino sobre transparente: siempre sobre fondo claro. */
.top {
  padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem 3.25rem;
  background: #fdfcfa;
  border-bottom: 4px solid var(--gold);
  text-align: center;
}
.top h1 { margin: 0; line-height: 0; }
.logo { display: block; width: min(78vw, 340px); height: auto; margin: 0 auto; }

main {
  max-width: 640px;
  margin: -2.25rem auto 0;
  padding: 0 1rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.card h2 { margin: 0 0 .75rem; font-size: 1.375rem; }

/* Reproductor */
.radio { text-align: center; }
.status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: bold;
  margin-bottom: 1rem;
}
.status p { margin: 0; }
.dot { width: .75rem; height: .75rem; border-radius: 50%; background: var(--muted); flex: none; }
.status[data-state="connecting"] .dot { background: var(--warn); animation: blink 1s infinite; }
.status[data-state="ready"] { color: var(--live); border-color: currentColor; }
.status[data-state="ready"] .dot { background: var(--live); }
.status[data-state="error"], .status[data-state="offline"] { color: var(--warn); border-color: currentColor; }
.status[data-state="error"] .dot, .status[data-state="offline"] .dot { background: var(--warn); }

@keyframes blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none !important; } }

.big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  min-height: 76px;
  padding: 1rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 1.375rem;
  font-weight: bold;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 6px 16px rgba(0,36,63,.35);
  transition: transform .1s ease, background-color .2s ease;
}
.big-btn:active { transform: scale(.98); }
.big-btn:hover { background: var(--brand-deep); }
.big-btn[aria-pressed="true"] { background: #3b3436; box-shadow: none; }
.big-btn:disabled { opacity: .55; cursor: not-allowed; }
.ico { width: 2rem; height: 2rem; fill: currentColor; }
.ico-stop { display: none; }
.big-btn[aria-pressed="true"] .ico-play { display: none; }
.big-btn[aria-pressed="true"] .ico-stop { display: block; }

:where(a, button):focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.hint { color: var(--muted); margin: .9rem 0 0; font-size: 1rem; }

.player-slot {
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.player-slot .cstrEmbed { width: 100%; }
.player-slot .cstrEmbed a { display: none; }
.player-slot iframe { display: block; width: 100%; min-height: 160px; border: 0; }

/* Instalación */
.install p { margin: 0 0 1rem; }
.ios-steps { margin: 0; padding-left: 1.25rem; }
.ios-steps li { margin-bottom: .35rem; }

/* Texto fundacional */
.about p { margin: 0 0 .9rem; }
.about blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 4px solid var(--gold); font-style: italic; }
.about cite { font-style: normal; color: var(--muted); }
.links { display: grid; gap: .65rem; margin-top: 1rem; }
.link { color: inherit; text-align: center; padding: .5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); }

.foot { max-width: 640px; margin: 1.5rem auto 0; padding: 0 1rem 2rem; text-align: center; color: var(--muted); }
.foot a { color: inherit; font-weight: bold; }
.small { font-size: .875rem; }

@media (min-width: 720px) {
  .top { padding-top: 2rem; padding-bottom: 4rem; }
  .logo { width: 380px; }
  .links { grid-template-columns: 1fr 1fr; }
  .links .link { grid-column: 1 / -1; }
}
