/* ==========================================================================
   KHAPIA FE · Reproductor web — hoja de estilo base
   Tokens tomados de radio-premium-listener/lib/theme/app_skin.dart (skin
   "Dorado"). Proporciones replicadas de playback_controls.dart /
   listening_header.dart / on_air_info.dart / home_shell.dart.
   ========================================================================== */

:root {
  --bg: #0A0A0A;
  --surface: #121212;
  --card: #151515;
  /* Acento activo. El "skin" (PREMIUM) sobrescribe estas 4 en :root vía JS;
     todo lo dorado deriva de acá (incluidos los glows con --accent-rgb). */
  --gold: #D4A94A;
  --gold-light: #E8C878;
  --gold-dark: #B8892E;
  --accent-rgb: 212, 169, 74;
  --gold-border: rgba(var(--accent-rgb), 0.20);
  --gold-12: rgba(var(--accent-rgb), 0.12);
  --gold-50: rgba(var(--accent-rgb), 0.50);
  --live-red: #E53935;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-tertiary: #757575;
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-2: rgba(255, 255, 255, 0.10);

  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cinzel', 'Times New Roman', serif;

  --gold-gradient: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Icono base reutilizable */
.ico {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
  stroke: none;
}

/* ==========================================================================
   CONTENEDOR DE APP — vista única, columna centrada en escritorio
   ========================================================================== */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
[hidden] { display: none !important; }

/* ==========================================================================
   ESTRUCTURA DE PANTALLA
   ========================================================================== */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  color: var(--text-primary);
}
.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px calc(64px + 24px);
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   TOPBAR (reproductor) — logo centrado, hamburguesa izq, PREMIUM der
   PremiumHeader: alto 68, logo 28, "KHAPIA" Cinzel 16 / +4.5, "ONE" 9 / +4
   ========================================================================== */
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 14px;
  flex: none;
}
.topbar__menu {
  width: 34px;
  height: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background: none;
  border: 0;
  padding: 0 6px;
  z-index: 2;
}
.topbar__menu span {
  height: 1.6px;
  border-radius: 1px;
  background: var(--gold);
}
.topbar__menu span:nth-child(1) { width: 20px; }
.topbar__menu span:nth-child(2) { width: 14px; }
.topbar__menu span:nth-child(3) { width: 10px; }

.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}
.brand__logo { width: 26px; height: 26px; object-fit: contain; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 4.5px;
  /* degradado dorado sobre el texto (ShaderMask en Flutter) */
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* sangría para compensar el letter-spacing del último glifo */
  text-indent: 4.5px;
}
.brand__sub {
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 4px;
  text-indent: 4px;
  color: rgba(var(--accent-rgb), 0.9);
}

/* Chip PREMIUM — borde dorado, degradado tenue, glow */
.chip-premium {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 11px;
  border: 1.1px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.08));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.35);
  color: var(--gold-light);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  z-index: 2;
}
.chip-premium .ico {
  font-size: 12px;
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.7));
}

/* Topbar variante catálogo — logo a la izquierda en fila */
.topbar--catalog { height: 60px; padding: 12px 20px 0; }
.brand--row {
  position: static;
  transform: none;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}
.brand--row .brand__logo { width: 32px; height: 32px; }
.brand__stack { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.brand--row .brand__name { font-size: 15px; letter-spacing: 3.2px; text-indent: 3.2px; }
.brand--row .brand__sub { font-size: 8.5px; letter-spacing: 3.5px; text-indent: 3.5px; }

/* ==========================================================================
   LISTENING HEADER — "EN VIVO" · "ESTÁS ESCUCHANDO" · nombre · tagline
   ========================================================================== */
.listening { text-align: center; padding: 10px 0 0; }
.listening__live {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.6px;
  color: rgba(255, 255, 255, 0.8);
}
.dot-live {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--live-red);
  box-shadow: 0 0 4px rgba(229, 57, 53, 0.9);
  animation: pulse-live 1.8s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(229, 57, 53, 0.9); }
  50% { opacity: 0.35; box-shadow: 0 0 9px 2px rgba(229, 57, 53, 0.55); }
}
.listening__eyebrow {
  margin: 8px 0 0;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 2.2px;
  color: var(--text-tertiary);
}
.listening__name {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}
.listening__tag {
  margin: 5px 0 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-secondary);
}

/* ==========================================================================
   COVER ART — cuadrada, radio 22, glow dorado difuso, fade en cambios
   StationArt: boxShadow gold@.28 blur 28 offset 0/8
   ========================================================================== */
.cover {
  margin: 14px 18px 0;
  border-radius: 22px;
  aspect-ratio: 1 / 1;
  box-shadow:
    0 8px 28px rgba(var(--accent-rgb), 0.28),
    0 0 60px rgba(var(--accent-rgb), 0.16);
}
.cover__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22px;
  background: var(--surface);
  /* transición suave cuando el JS cambie el src (mitiga el banner-delay) */
  transition: opacity 320ms ease;
}
.cover__img.is-swapping { opacity: 0; }

/* ==========================================================================
   ON-AIR INFO — pill AL AIRE · título programa · "con LOCUTOR" · tema · horario
   ========================================================================== */
.onair { text-align: center; padding: 14px 6px 0; }
.onair__pill {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--gold-50);
  border-radius: 14px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--gold);
  margin-bottom: 8px;
}
.onair__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}
.onair__host {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}
.onair__host b {
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.4px;
}
.onair__song {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.onair__range {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: var(--text-tertiary);
}

/* ==========================================================================
   CONTROLES — [FAVORITOS | play glow | TEMPORIZADOR] · badge EN VIVO · volumen
   ========================================================================== */
.controls { padding: 16px 0 0; }
.controls__row {
  display: flex;
  align-items: center;
  justify-content: center;
}
.controls__sep {
  width: 1px;
  height: 44px;
  background: var(--hairline-2);
  margin: 0 10px;
  flex: none;
}

.sidectl {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 8px 4px;
  color: var(--text-secondary);
}
.sidectl .ico { font-size: 22px; }
.sidectl span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.8px;
}
.sidectl.is-active { color: var(--gold); }

/* Botón play — envoltorio 92, glow 78, anillo 74 (borde 2.5), disco 58 blanco */
.playbtn {
  position: relative;
  width: 92px;
  height: 92px;
  flex: none;
  background: none;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
}
.playbtn__glow {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  box-shadow:
    0 0 24px 2px rgba(var(--accent-rgb), 0.5),
    0 0 40px 10px rgba(var(--accent-rgb), 0.2);
}
.playbtn__ring {
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2.5px solid var(--gold);
}
.playbtn__disc {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #FFFFFF;
  display: grid;
  place-items: center;
  transition: transform 120ms ease;
}
.playbtn__disc .ico { font-size: 30px; fill: var(--bg); }
.playbtn.is-playing .playbtn__disc .ico { font-size: 26px; }
.playbtn:active .playbtn__disc { transform: scale(0.94); }

/* Badge EN VIVO / CONECTANDO — pill borde dorado + antena */
.livebadge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 14px auto 0;
  padding: 5px 12px;
  border: 1px solid var(--gold-50);
  border-radius: 16px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.15px;
  width: max-content;
}
.livebadge .ico { font-size: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.livebadge.is-connecting { color: var(--gold-dark); border-color: rgba(var(--accent-rgb), 0.35); }

.livebadge-wrap { display: flex; justify-content: center; }

/* Volumen — icono + slider dorado + % */
.volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--gold);
}
.volume > .ico { font-size: 16px; }
.volume__pct {
  font-size: 11px;
  font-weight: 500;
  color: rgba(var(--accent-rgb), 0.9);
  min-width: 34px;
  text-align: right;
}
.volume__slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  border-radius: 2px;
  /* --v (0..100) lo setea player.js según el valor actual */
  background: linear-gradient(to right,
    var(--gold) 0 calc(var(--v, 80) * 1%),
    #2C2C2C calc(var(--v, 80) * 1%) 100%);
  outline: none;
}
.volume__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 0;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16);
}
.volume__slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
}

/* ==========================================================================
   TARJETA "ENVÍA TU MENSAJE" (disparador)
   ========================================================================== */
.msgcard {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
  padding: 11px 12px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  border-radius: 12px;
  text-align: left;
  color: var(--text-secondary);
}
.msgcard__ico {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: var(--gold);
}
.msgcard__ico .ico { font-size: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.msgcard__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.msgcard__body b {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--gold);
}
.msgcard__body small { font-size: 10px; line-height: 1.3; color: var(--text-secondary); }
.msgcard__chev { font-size: 20px; color: var(--gold); fill: none; stroke: currentColor; stroke-width: 1.9; }

/* ==========================================================================
   REDES SOCIALES
   ========================================================================== */
.social { margin: 22px 0 0; }
.social__head {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--gold);
}
.social__head .ico { font-size: 12px; }
.social__row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.social__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}
.social__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
}
.social__dot .ico { font-size: 15px; }
.social__item span:last-child {
  font-size: 8px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.social__dot--fb  { background: #1877F2; }
.social__dot--ig  { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); }
.social__dot--tt  { background: #010101; border: 0.8px solid rgba(255,255,255,0.24); }
.social__dot--yt  { background: #FF0000; }
.social__dot--wa  { background: #25D366; }
.social__dot--web { background: #6B7280; }
.social__dot--tg  { background: #229ED9; }
.social__dot--x   { background: #111111; border: 0.8px solid rgba(255,255,255,0.24); }

/* ==========================================================================
   PROGRAMACIÓN — preview + página completa + estado vacío
   ========================================================================== */
.sched-preview { margin: 20px 0 0; }
.sched-preview__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.sched-preview__head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--gold);
}
.sched-preview__head a {
  font-size: 9.5px;
  color: var(--text-tertiary);
}
.empty-line {
  text-align: center;
  padding: 16px 0;
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 0;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--gold);
  margin: 14px 0 8px;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 24px;
  text-align: center;
}
.empty-state .ico { font-size: 40px; color: var(--text-tertiary); fill: none; stroke: currentColor; stroke-width: 1.4; }
.empty-state p { margin: 0; font-size: 13px; color: var(--text-secondary); }

/* ==========================================================================
   VISTA CATÁLOGO
   ========================================================================== */
.catalog-head { padding: 20px 0 0; }
.catalog-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}
.catalog-head p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0 14px;
  height: 46px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}
.searchbar .ico { font-size: 20px; color: var(--text-tertiary); fill: none; stroke: currentColor; stroke-width: 1.8; }
.searchbar input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}
.searchbar input::placeholder { color: var(--text-tertiary); }
.searchbar:focus-within { border-color: var(--gold-50); }

.chips {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.chip.is-active {
  border-color: var(--gold);
  background: var(--gold-12);
  color: var(--gold);
  font-weight: 600;
}

.stations {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.station {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 12px;
  background: var(--card);
  border-radius: 14px;
}
.station__cover {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
}
.station__info { flex: 1; min-width: 0; }
.station__live {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--gold);
}
.station__live .ico { font-size: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.station__name {
  margin: 4px 0 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station__desc {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station__genre {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--text-tertiary);
}
.station__genre .ico { font-size: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.station__play {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  border: 1.4px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold);
}
.station__play .ico { font-size: 24px; }

/* ==========================================================================
   VISTA "MÁS" + FORMULARIO MENSAJE
   ========================================================================== */
.more-head { padding: 18px 0 0; }
.more-head h1 { margin: 0; font-size: 24px; font-weight: 800; color: var(--text-primary); }
.more-head__genre { margin: 4px 0 0; font-size: 14px; color: var(--gold); }
.more-head__desc { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }

.msgform {
  margin: 26px 0 0;
  padding: 16px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  border-radius: 14px;
}
.msgform__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--gold);
}
.msgform__hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-secondary);
}
.field {
  width: 100%;
  margin: 12px 0 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 0.8px solid var(--gold-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  resize: vertical;
}
.field::placeholder { color: var(--text-tertiary); }
.field:focus { border-color: var(--gold); }
.msgform__counter {
  margin: 6px 0 0;
  text-align: right;
  font-size: 11px;
  color: var(--text-tertiary);
}

.btn-primary {
  width: 100%;
  margin: 10px 0 0;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #000;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
}
.btn-primary:disabled { background: rgba(var(--accent-rgb), 0.3); }

.btn-ghost {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   PÁGINAS DE ESTADO (402 / error)
   ========================================================================== */
.state-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 32px;
  text-align: center;
}
.state-page__ico {
  font-size: 64px;
  color: var(--text-secondary);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  margin-bottom: 8px;
}
.state-page h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
}
.state-page p {
  margin: 0;
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.state-page .btn-primary { width: auto; padding: 12px 28px; margin-top: 12px; }

/* ==========================================================================
   TABBAR — RADIOS / EN VIVO / PROGRAMACIÓN / MÁS
   home_shell _PremiumBottomNav: alto 54, negro, borde superior gold@.09,
   seleccionado = dorado + barra 28px
   ========================================================================== */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  display: flex;
  background: #000;
  border-top: 0.6px solid rgba(var(--accent-rgb), 0.09);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-tertiary);
}
.tab .ico { font-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tab span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.6px;
}
.tab::after {
  content: "";
  height: 2px;
  width: 0;
  border-radius: 1px;
  background: var(--gold);
  transition: width 180ms ease;
}
.tab.is-active {
  color: var(--gold);
}
.tab.is-active span { font-weight: 600; }
.tab.is-active::after { width: 28px; }

/* ==========================================================================
   V1 · WIRING JS — overlays y estados (aditivo)
   ========================================================================== */

/* Spinner de carga */
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-border);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast — aviso breve no bloqueante (ej. "Radio no encontrada") */
.toast {
  position: absolute;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%) translateY(8px);
  z-index: 50;
  max-width: 86%;
  padding: 10px 16px;
  border-radius: 10px;
  background: #2A2A2A;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Sheet del temporizador — se ancla al fondo del contenedor .app */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  background: #141414;
  border-radius: 18px 18px 0 0;
  padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: sheet-up 200ms ease;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet__grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  align-self: center;
  margin-bottom: 6px;
}
.sheet__opt {
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
.sheet__opt--muted { color: var(--text-secondary); }
.sheet__opt:active { background: #1c1c1c; }

/* Estados del formulario de mensaje */
.msgform__error {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--live-red);
}
.msgform__ok {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
}
.msgform__ok .ico { font-size: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Badge en error de stream */
.livebadge.is-error { color: var(--live-red); border-color: rgba(229, 57, 53, 0.5); }

/* Autoplay bloqueado por el navegador: pulsamos el play para invitar al toque */
#app.is-autoplay-pending .playbtn { animation: ap-pulse 1.5s ease-in-out infinite; }
#app.is-autoplay-pending .playbtn__glow {
  animation: ap-glow 1.5s ease-in-out infinite;
}
#app.is-autoplay-pending .livebadge {
  border-color: var(--gold);
  color: var(--gold);
}
#app.is-autoplay-pending .npbanner__toggle { animation: ap-pulse 1.5s ease-in-out infinite; }
@keyframes ap-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes ap-glow {
  0%, 100% { box-shadow: 0 0 24px 2px rgba(var(--accent-rgb), 0.5), 0 0 40px 10px rgba(var(--accent-rgb), 0.2); }
  50% { box-shadow: 0 0 34px 6px rgba(var(--accent-rgb), 0.75), 0 0 60px 18px rgba(var(--accent-rgb), 0.32); }
}
/* ==========================================================================
   BIBLIA — libros/capítulos/lector, búsqueda, favoritos, audio
   ========================================================================== */
.topbar__actions { display: flex; align-items: center; gap: 8px; z-index: 2; }

.bible-continue { margin: 4px 0 18px; }
.bible-continue__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  border-radius: 14px;
  color: var(--gold);
}
.bible-continue__btn .ico:first-child { font-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bible-continue__meta { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.bible-continue__meta b { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.bible-continue__meta small { font-size: 11px; color: var(--text-tertiary); }
.bible-continue__btn .ico:last-child { font-size: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.bible-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bible-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 14px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  border-radius: 14px;
  text-align: left;
}
.bible-tile .ico { font-size: 20px; fill: none; color: var(--gold); stroke-width: 1.6; margin-bottom: 2px; }
.bible-tile b { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; color: var(--text-primary); }
.bible-tile small { font-size: 10.5px; color: var(--text-tertiary); }

.bible-testaments { display: flex; gap: 8px; margin: 4px 0 14px; }
.bible-testaments .chip { flex: 1; text-align: center; }

.bible-book-list { display: flex; flex-direction: column; gap: 8px; }
.bible-book {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 12px;
  text-align: left;
}
.bible-book .ico:first-child { font-size: 16px; fill: none; color: var(--gold); stroke-width: 1.6; flex: none; }
.bible-book__name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.bible-book__count { font-size: 10.5px; color: var(--text-tertiary); white-space: nowrap; }
.bible-book .ico:last-child { font-size: 15px; fill: none; color: var(--text-tertiary); stroke-width: 1.7; flex: none; }

.bible-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
}
.bible-chapter {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.bible-audio-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--gold-12);
  border: 0.8px solid var(--gold-border);
  border-radius: 12px;
}
.bible-audio-bar__play {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  display: grid;
  place-items: center;
}
.bible-audio-bar__play .ico { font-size: 15px; }
#bible-audio-label { font-size: 11.5px; color: var(--gold-light); font-weight: 600; }

.bible-verses { display: flex; flex-direction: column; }
.bible-verse {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 8px;
}
.bible-verse.is-highlighted { background: var(--gold-12); }
.bible-verse p {
  margin: 0;
  flex: 1;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-primary);
}
.bible-verse p b { color: var(--gold); font-size: 11px; margin-right: 2px; }
.bible-verse__fav {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.bible-verse__fav .ico { font-size: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bible-verse__fav.is-active { color: var(--gold); }
.bible-verse__fav.is-active .ico { fill: currentColor; }

.bible-reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 8px;
}

.bible-search { display: flex; gap: 8px; margin: 4px 0 16px; }
.bible-search .field { margin: 0; flex: 1; }
.bible-search .btn-primary { flex: none; width: auto; padding: 0 18px; }

.bible-results { display: flex; flex-direction: column; gap: 8px; }
.bible-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 12px;
  text-align: left;
}
.bible-result__ref { font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; color: var(--gold); }
.bible-result__text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bible-result-row { display: flex; align-items: center; gap: 8px; }
.bible-result-row .bible-result { flex: 1; min-width: 0; }

/* ==========================================================================
   INICIO + NAV GLOBAL — hub landing (Inicio/Radios/Biblia/Oración/Más) y
   el mini-banner global que ahora vive fuera de una .screen puntual.
   ========================================================================== */

/* Nav global de 5 tabs, oculto salvo en las pantallas "de shell". */
.app-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 32;
  height: 54px;
  background: #000;
  border-top: 0.6px solid rgba(var(--accent-rgb), 0.09);
}
#app[data-view="inicio"] .app-nav,
#app[data-view="catalog"] .app-nav,
#app[data-view="biblia"] .app-nav,
#app[data-view="oracion"] .app-nav,
#app[data-view="masapp"] .app-nav { display: flex; }

.app-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: 0;
  color: var(--text-tertiary);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.4px;
}
.app-nav__item .ico { font-size: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.app-nav__item.is-active { color: var(--gold); font-weight: 700; }

/* Reserva de espacio para el nav global + el mini-banner (cuando esté
   visible) en las 5 pantallas de shell. Constante, no condicional — es
   más simple que sincronizar el padding con la visibilidad del banner y
   el costo es, a lo sumo, un poco de aire de más cuando no hay radio sonando. */
.scroll--shell { padding-bottom: calc(54px + 64px + 24px); }

/* --------------------------------- header --------------------------------- */
.inicio-header { text-align: center; padding: 6px 0 4px; }
.inicio-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.inicio-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0.8px solid var(--gold-border);
  background: var(--card);
  color: var(--gold);
  display: grid;
  place-items: center;
}
.inicio-icon-btn .ico { font-size: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.inicio-header__logo { width: 34px; height: 34px; object-fit: contain; margin: 0 auto 4px; }
.inicio-header .brand__name { display: block; font-size: 10.5px; letter-spacing: 2.6px; text-indent: 2.6px; }
.inicio-header .brand__sub { display: block; font-size: 22px; font-weight: 700; letter-spacing: 0; text-indent: 0; color: var(--text-primary); margin-top: 1px; }
.inicio-header__tagline {
  margin: 3px 0 0;
  font-size: 10px;
  color: rgba(var(--accent-rgb), 0.85);
}
.inicio-header__tagline:empty::before { content: 'Anunciando el amor de Cristo'; }

/* ------------------------------- hero en vivo ------------------------------ */
.inicio-live { margin: 12px 0 0; border-radius: 18px; border: 1px solid var(--gold-border); background: var(--card); overflow: hidden; }
.inicio-live__art { position: relative; aspect-ratio: 16 / 7; }
.inicio-live__art img { width: 100%; height: 100%; object-fit: cover; }
.inicio-live__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.05) 55%); }
.inicio-live__badge {
  position: absolute;
  top: 10px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid var(--gold);
  background: rgba(0,0,0,.4);
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
}
.inicio-live__badge .ico { font-size: 11px; }
.inicio-live__info {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.inicio-live__info b { font-family: var(--font-display); font-size: 16px; color: #fff; font-weight: 700; }
.inicio-live__info small { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; color: var(--gold-light); }
.inicio-live__status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--gold);
}
.inicio-live__status .ico { font-size: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.inicio-live__foot { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.inicio-live__foot-meta { flex: 1; min-width: 0; }
.inicio-live__foot-meta b { display: block; font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inicio-live__foot-meta small { font-size: 10.5px; color: rgba(var(--accent-rgb), 0.85); }
.chip-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex: none;
}
.chip-live .ico { font-size: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------------------------- versículo del día ---------------------------- */
.inicio-verse {
  margin: 14px 0 0;
  display: flex;
  border-radius: 16px;
  border: 1px solid var(--gold-border);
  background: var(--card);
  overflow: hidden;
}
.inicio-verse__art { width: 88px; flex: none; }
.inicio-verse__art img { width: 100%; height: 100%; object-fit: cover; }
.inicio-verse__body { flex: 1; min-width: 0; padding: 10px 12px; }
.inicio-verse__label { margin: 0; font-size: 9.5px; font-weight: 700; letter-spacing: 0.6px; color: var(--gold); }
.inicio-verse__text {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.25;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.inicio-verse__ref { margin: 5px 0 0; font-size: 11px; font-weight: 600; color: var(--gold); }
.inicio-verse__btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 600;
  background: none;
}
.inicio-verse__btn .ico { font-size: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; }

/* ------------------------------ ¿cómo te sentís? ---------------------------- */
.inicio-mood {
  margin: 14px 0 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--gold-border);
  background: var(--card);
  text-align: left;
}
.inicio-mood__icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1.2px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold);
}
.inicio-mood__meta { flex: 1; min-width: 0; }
.inicio-mood__meta b { display: block; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.inicio-mood__meta small { font-size: 11px; color: var(--text-tertiary); }
.inicio-mood > .ico:last-child { font-size: 18px; fill: none; color: var(--gold); stroke-width: 1.9; }

/* ------------------------------- quick access ------------------------------- */
.qa-grid {
  margin: 14px 0 0;
  display: flex;
  border-radius: 16px;
  border: 1px solid var(--gold-border);
  background: var(--card);
}
.qa-tile {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 4px;
  background: none;
  border: 0;
  border-left: 1px solid var(--gold-border);
}
.qa-tile:first-child { border-left: 0; }
.qa-tile .ico { font-size: 20px; fill: none; color: var(--gold); stroke-width: 1.6; }
.qa-tile b { font-size: 9px; font-weight: 700; letter-spacing: 0.2px; color: var(--text-primary); white-space: nowrap; }
.qa-tile small { font-size: 8px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* --------------------------------- carrusel --------------------------------- */
.inicio-section-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.inicio-section-title { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-primary); }
.inicio-section-more {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
}
.inicio-section-more .ico { font-size: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.inicio-carousel { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.inicio-carousel .empty-state { flex: 1; }
.inicio-card {
  flex: none;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.inicio-card__art { aspect-ratio: 1; display: block; }
.inicio-card__art img { width: 100%; height: 100%; object-fit: cover; }
.inicio-card__name {
  padding: 6px 7px 0;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inicio-card__tag {
  padding: 0 7px 7px;
  font-size: 8px;
  color: rgba(var(--accent-rgb), 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------- sheet "¿cómo te sentís?" ------------------------- */
.sheet--tall { max-height: 78vh; overflow-y: auto; padding-bottom: 20px; }
.mood-sheet__title { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); }
.mood-sheet__hint { margin: 4px 0 0; font-size: 12px; color: var(--text-tertiary); }
.mood-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--gold-border);
  background: none;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}
.mood-chip .ico { font-size: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mood-chip.is-active { border-color: var(--gold); color: var(--gold); background: var(--gold-12); }
.mood-sheet__reflection { margin: 16px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--text-secondary); }
.mood-verse-box { margin: 10px 0 0; padding: 14px; border-radius: 14px; border: 1px solid var(--gold-border); background: var(--surface); }
.mood-verse-box__text { margin: 0; font-family: var(--font-display); font-size: 14px; line-height: 1.3; color: var(--text-primary); }
.mood-verse-box__ref { margin: 6px 0 0; font-size: 11.5px; font-weight: 600; color: var(--gold); }
.mood-sheet__actions { display: flex; align-items: center; margin-top: 10px; }
.mood-sheet__link { background: none; border: 0; color: var(--gold); font-size: 11.5px; font-weight: 600; padding: 6px 0; }
.mood-sheet__link--muted { margin-left: auto; color: var(--text-tertiary); }

/* ==========================================================================
   ORACIÓN — peticiones (públicas/mías), detalle con like+comentarios,
   devocionales, calendario de oración.
   ========================================================================== */
.oracion-lead-title { margin: 18px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; color: var(--gold); }
.oracion-lead-sub { margin: 4px 0 12px; font-size: 12.5px; color: var(--text-secondary); }

.oracion-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 12px;
  border: 0.8px solid var(--gold-border);
  background: var(--surface);
  cursor: pointer;
}
.oracion-toggle__meta { flex: 1; min-width: 0; }
.oracion-toggle__meta b { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.oracion-toggle__meta small { font-size: 11px; color: var(--text-tertiary); }
.oracion-toggle input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.oracion-toggle__switch {
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--gold-border);
  position: relative;
  transition: background 150ms ease;
}
.oracion-toggle__switch::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: transform 150ms ease, background 150ms ease;
}
.oracion-toggle input:checked + .oracion-toggle__switch { background: rgba(var(--accent-rgb), 0.28); border-color: var(--gold); }
.oracion-toggle input:checked + .oracion-toggle__switch::before { transform: translateX(18px); background: var(--gold); }

.oracion-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.oracion-card {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  text-align: left;
}
.oracion-card--tap { cursor: pointer; }
.oracion-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.oracion-card__top b { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.oracion-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--gold-border);
  color: var(--text-tertiary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.oracion-badge.is-activa { border-color: var(--gold); color: var(--gold); }
.oracion-badge.is-respondida { border-color: #6FCF97; color: #6FCF97; }
.oracion-badge.is-archivada { border-color: var(--text-tertiary); color: var(--text-tertiary); }
.oracion-card__body {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.oracion-card__meta { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; font-size: 11px; color: var(--text-tertiary); }
.oracion-card__meta > span:first-child { flex: 1; }
.oracion-card__stat { display: inline-flex; align-items: center; gap: 4px; }
.oracion-card__stat .ico { font-size: 13px; fill: none; color: var(--text-tertiary); stroke: currentColor; stroke-width: 1.6; }
.oracion-card__private { font-style: italic; }
.oracion-card__actions { margin-top: 10px; }
.oracion-status-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 0.8px solid var(--gold-border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
}

.oracion-detail__title { margin: 4px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text-primary); }
.oracion-detail__body { margin: 10px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--text-secondary); }
.oracion-detail__stats { display: flex; align-items: center; gap: 18px; margin: 14px 0 0; }
.oracion-like { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--gold); font-size: 13px; }
.oracion-like .ico { font-size: 18px; fill: none; color: var(--gold); stroke-width: 1.7; }
.oracion-like.is-active .ico { fill: var(--gold); }
.oracion-detail__comments-count { display: inline-flex; align-items: center; gap: 6px; color: var(--text-tertiary); font-size: 13px; }
.oracion-detail__comments-count .ico { font-size: 16px; fill: none; color: var(--text-tertiary); stroke-width: 1.6; }
.oracion-comments { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.oracion-comments__empty { font-size: 12px; color: var(--text-tertiary); margin: 8px 0 0; }
.oracion-comment { padding: 10px 12px; border-radius: 10px; background: var(--card); border: 0.8px solid var(--gold-border); font-size: 12.5px; line-height: 1.35; color: var(--text-primary); }
.oracion-comment-form { display: flex; gap: 8px; margin: 16px 0 4px; align-items: center; }
.oracion-comment-form .field { margin: 0; flex: 1; }
.oracion-comment-form button { flex: none; width: 40px; height: 40px; }
.oracion-comment-form button .ico { font-size: 16px; }

.oracion-devotional__radio { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--gold); }
.oracion-devotional__desc { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.oracion-devotional__body { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }

.oracion-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.oracion-cal-nav span { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.oracion-cal-nav .ico { font-size: 15px; }
.oracion-cal-nav #oracion-cal-next .ico { transform: rotate(180deg); }
.oracion-cal-card { margin-bottom: 14px; padding: 14px; border-radius: 16px; background: var(--card); border: 0.8px solid var(--gold-border); }
.oracion-cal-card__theme { margin: 4px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text-primary); }
.oracion-points { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.oracion-point { display: flex; align-items: flex-start; gap: 10px; background: none; border: 0; text-align: left; padding: 0; }
.oracion-point__mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}
.oracion-point__mark .ico { font-size: 13px; fill: #0A0A0A; }
.oracion-point.is-done .oracion-point__mark { background: var(--gold); }
.oracion-point__text { flex: 1; padding-top: 2px; font-size: 13.5px; line-height: 1.3; color: var(--text-primary); }
.oracion-point.is-done .oracion-point__text { color: var(--text-tertiary); text-decoration: line-through; }

@media (prefers-reduced-motion: reduce) {
  #app.is-autoplay-pending .playbtn,
  #app.is-autoplay-pending .playbtn__glow,
  #app.is-autoplay-pending .npbanner__toggle { animation: none; }
}

/* Mini-banner "en reproducción" sobre el bottom nav del catálogo */
.npbanner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;               /* alto de .tabbar */
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 8px 8px 8px 12px;
  background: #141414;
  border-top: 0.6px solid rgba(var(--accent-rgb), 0.22);
  cursor: pointer;
}
.npbanner__cover {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
}
.npbanner__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.npbanner__meta b {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.npbanner__sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.npbanner__sub.is-connecting { color: var(--gold); }
.npbanner__sub.is-error { color: var(--live-red); }
.npbanner__toggle {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--gold);
}
.npbanner__toggle .ico { font-size: 28px; }

/* deja aire bajo la última tarjeta cuando el banner está visible */
.scroll.has-npbanner { padding-bottom: calc(54px + 64px + 24px); }

/* ==========================================================================
   PREMIUM — hub de skins de color (réplica de premium_page.dart)
   ========================================================================== */
.premium-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 0;
  flex: none;
}
.premium-top__back {
  background: none;
  border: 0;
  color: var(--gold);
  display: grid;
  place-items: center;
  padding: 8px;
}
.premium-top__back .ico { font-size: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.premium-top__label {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--gold-light);
}
.premium-top__label .ico { font-size: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.premium-hero {
  text-align: center;
  padding: 8px 24px 0;
  flex: none;
}
.premium-hero img { width: 48px; height: 48px; object-fit: contain; margin: 0 auto; }
.premium-hero h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 4px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-indent: 4px;
}
.premium-hero p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.premium-section {
  margin: 18px 0 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: rgba(var(--accent-rgb), 0.85);
}

.skin {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  border: 0.9px solid rgba(var(--skin-rgb), 0.35);
  background:
    linear-gradient(to right,
      rgba(var(--skin-rgb), 0.10) 0%,
      #141414 35%, #101010 100%);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.skin.is-active {
  border-width: 1.4px;
  border-color: rgb(var(--skin-rgb));
  background:
    linear-gradient(to right,
      rgba(var(--skin-rgb), 0.22) 0%,
      #141414 35%, #101010 100%);
  box-shadow: 0 4px 16px rgba(var(--skin-rgb), 0.28);
}
.skin__bar {
  width: 4px;
  height: 42px;
  flex: none;
  border-radius: 2px;
  background: linear-gradient(to bottom,
    var(--skin-light), rgb(var(--skin-rgb)), var(--skin-dark));
}
.skin__meta { flex: 1; min-width: 0; }
.skin__meta b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.skin__meta small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-tertiary);
}
.skin.is-active .skin__meta small { color: var(--skin-light); }
.skin__swatch {
  width: 56px;
  height: 28px;
  flex: none;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg,
    var(--skin-light), rgb(var(--skin-rgb)), var(--skin-dark));
  box-shadow: 0 0 8px rgba(var(--skin-rgb), 0.4);
}
.skin__check { flex: none; font-size: 22px; color: var(--text-tertiary); }
.skin__check .ico { fill: none; stroke: currentColor; stroke-width: 1.7; }
.skin.is-active .skin__check { color: var(--skin-light); }
.skin.is-active .skin__check .ico { fill: currentColor; stroke: none; }

/* Filas de programación (schedule + preview) */
.sched-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 0;
  border-top: 0.6px solid var(--hairline);
}
.sched-row:first-child { border-top: 0; }
.sched-row__time {
  flex: none;
  width: 60px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gold);
}
.sched-row__thumb {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
}
.sched-row__meta { flex: 1; min-width: 0; }
.sched-row__meta b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.sched-row__meta small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-tertiary);
}
.sched-row__onair { font-size: 18px; color: var(--gold); flex: none; }
.sched-row.is-on-air .sched-row__meta b { color: var(--gold); }

/* Cursores / affordances de click */
.station, .chip, .tab, .social__item, .sheet__opt,
.sidectl, .playbtn, .msgcard, .chip-premium, .topbar__menu { cursor: pointer; }
.station__play { pointer-events: none; }

/* Tarjeta de estado dentro del catálogo (cargando / error / vacío) */
.catalog-state {
  padding: 60px 24px;
  text-align: center;
}
.catalog-state p { margin: 0 0 14px; font-size: 13px; color: var(--text-secondary); }
.catalog-state .spinner { margin: 0 auto; }
.catalog-state button {
  background: none;
  border: 0;
  color: var(--gold);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   FONDO AMBIENTAL (portada difuminada)
   ========================================================================== */
.ambient {
  /* Solo en escritorio: en móvil un blur full-screen en cada cambio de
     canción es caro para la GPU y puede provocar micro-cortes de audio.
     La portada ya llena la pantalla en el teléfono. */
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(48px) saturate(1.25) brightness(0.5);
  opacity: 0;
  transition: opacity 600ms ease;
  will-change: opacity;
}

/* ==========================================================================
   RESPONSIVE — ESCRITORIO
   El reproductor deja de ser "una franja de celular": ocupa la pantalla,
   contenido centrado y aireado, chrome flotante, catálogo en grilla y un
   fondo ambiental con la portada del tema.
   ========================================================================== */
@media (min-width: 700px) {
  body { background: #060606; }

  .app { max-width: none; }
  .screen { background: rgba(10, 10, 10, 0.82); }
  .ambient { display: block; }
  .ambient.is-on { opacity: 0.5; }

  /* barras superiores alineadas al ancho de contenido */
  .topbar,
  .topbar--catalog { max-width: 1180px; margin-inline: auto; width: 100%; }
  .topbar { height: 76px; }

  /* --- área scroll: contenido centrado --- */
  .scroll { padding: 12px 40px calc(72px + 40px); }

  /* --- REPRODUCTOR: columna central ancha y aireada --- */
  [data-panel] { max-width: 620px; margin-inline: auto; }
  [data-panel="live"] { padding-top: 8px; }
  .listening { padding-top: 20px; }
  .listening__name { font-size: 26px; }
  .listening__tag { font-size: 12.5px; margin-top: 8px; }
  .cover {
    margin: 22px auto 0;
    max-width: 360px;
    box-shadow:
      0 20px 60px rgba(var(--accent-rgb), 0.30),
      0 0 100px rgba(var(--accent-rgb), 0.18);
  }
  .onair { padding-top: 22px; }
  .onair__title { font-size: 19px; }
  .controls { padding-top: 22px; max-width: 460px; margin-inline: auto; }
  .msgcard, .social, .sched-preview { max-width: 460px; margin-inline: auto; }
  .social { margin-top: 26px; }

  /* schedule / más: mismo ancho central */
  [data-panel="schedule"], [data-panel="more"] { max-width: 620px; }

  /* --- CATÁLOGO: grilla --- */
  .screen[data-screen="catalog"] .scroll > * { max-width: 1180px; margin-inline: auto; }
  .catalog-head { padding-top: 28px; }
  .catalog-head h1 { font-size: 32px; }
  .catalog-head p { font-size: 15px; }
  .searchbar { max-width: 520px; }
  .stations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px;
    align-content: start;
  }
  .station { padding: 14px; }

  /* --- PREMIUM --- */
  .premium-top { max-width: 640px; margin-inline: auto; width: 100%; }
  .premium-hero { padding-top: 18px; }
  .premium-hero img { width: 56px; height: 56px; }
  .premium-hero h2 { font-size: 24px; }
  .premium .scroll > *, [data-screen="premium"] .scroll > * { max-width: 560px; margin-inline: auto; }
  #skin-list { max-width: 560px; margin-inline: auto; }

  /* --- chrome flotante: bottom nav + mini-banner como "pill" centrada --- */
  .tabbar {
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100% - 48px));
    bottom: 22px;
    height: 58px;
    border: 1px solid var(--gold-border);
    border-radius: 18px;
    background: rgba(16, 16, 16, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
    overflow: hidden;
  }
  .scroll.has-npbanner { padding-bottom: calc(58px + 22px + 64px + 24px); }
  .npbanner {
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100% - 48px));
    bottom: calc(58px + 22px + 12px);
    border: 1px solid var(--gold-border);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(20, 20, 20, 0.92);
  }

  /* páginas de estado: no estirar el texto a lo ancho */
  .state-page { max-width: 460px; margin-inline: auto; }
  .empty-state { max-width: 460px; margin-inline: auto; }

  /* --- nav global (Inicio/Radios/Biblia/Oración/Más): mismo chrome
     flotante que .tabbar/.npbanner — nunca una franja pegada al borde. --- */
  .app-nav {
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 48px));
    bottom: 22px;
    height: 58px;
    border: 1px solid var(--gold-border);
    border-radius: 18px;
    background: rgba(16, 16, 16, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
    overflow: hidden;
  }
  .scroll--shell { padding-bottom: calc(58px + 22px + 64px + 24px); }

  /* --- INICIO: contenido centrado, mismo ancho que el reproductor --- */
  [data-screen="inicio"] .scroll > * { max-width: 620px; margin-inline: auto; }
  .inicio-header { padding-top: 12px; }
  .inicio-header__tagline { font-size: 11px; }
  .inicio-live__art { aspect-ratio: 21 / 8; }
  .inicio-live__info b { font-size: 20px; }
  .inicio-verse__art { width: 120px; }
  .inicio-verse__text { font-size: 14.5px; -webkit-line-clamp: 3; }
  .qa-grid { padding: 2px 0; }
  .qa-tile { padding: 16px 6px; }
  .qa-tile .ico { font-size: 22px; }
  .inicio-carousel { gap: 14px; flex-wrap: wrap; overflow: visible; }
  .inicio-card { width: 132px; }

  /* --- BIBLIA: mismos anchos centrados que Premium/reproductor --- */
  [data-screen="biblia"] .premium-top { max-width: 640px; margin-inline: auto; width: 100%; }
  [data-screen="biblia"] .scroll > * { max-width: 620px; margin-inline: auto; }
  .bible-chapter-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .bible-verse p { font-size: 15.5px; }

  /* --- ORACIÓN / MÁS (app): mismo ancho central --- */
  [data-screen="oracion"] .premium-top { max-width: 640px; margin-inline: auto; width: 100%; }
  [data-screen="oracion"] .scroll > *,
  [data-screen="masapp"] .scroll > * { max-width: 620px; margin-inline: auto; }

  /* --- sheet "¿cómo te sentís?": modal centrado, no anclado al borde --- */
  #mood-sheet.sheet-backdrop { align-items: center; }
  .sheet--tall {
    width: min(480px, calc(100% - 48px));
    max-height: 82vh;
    border-radius: 20px;
    border: 1px solid var(--gold-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

/* --- MUY ANCHO: reproductor a dos columnas (portada | info) --- */
@media (min-width: 1080px) {
  [data-panel="live"] {
    display: grid;
    grid-template-columns: 340px minmax(0, 420px);
    grid-template-areas:
      "listening onair"
      "cover     controls"
      "cover     msgcard"
      "social    social"
      "sched     sched";
    gap: 8px 48px;
    align-items: start;
    max-width: 860px;
  }
  [data-panel="live"] > .listening { grid-area: listening; padding-top: 0; }
  [data-panel="live"] > .cover { grid-area: cover; margin: 12px 0 0; max-width: 340px; align-self: start; }
  [data-panel="live"] > .onair { grid-area: onair; padding-top: 0; text-align: left; }
  [data-panel="live"] > .onair .onair__title,
  [data-panel="live"] > .onair .onair__song { text-align: left; }
  [data-panel="live"] > .controls { grid-area: controls; margin: 0; max-width: none; }
  [data-panel="live"] > .msgcard { grid-area: msgcard; margin: 12px 0 0; max-width: none; }
  [data-panel="live"] > #social-live { grid-area: social; max-width: none; margin-top: 22px; }
  [data-panel="live"] > .sched-preview { grid-area: sched; max-width: none; }
  [data-panel="live"] > .listening { text-align: left; }
  [data-panel="live"] > .listening .listening__live,
  [data-panel="live"] > .listening .listening__eyebrow { justify-content: flex-start; }
}
