/* ==========
   == BASE ==
   ========== */
/* Fuentes propias (en fonts/, sin pedir nada a internet): Barlow para la interfaz y Barlow Condensed para el panel del nombre */
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(../fonts/barlow-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url(../fonts/barlow-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); }

/* --accent se registra como color para poder animar su cambio (los derivados con color-mix lo siguen); --tint, cuánto se colorea la cabecera con él (0% = nada); --hk, cuánto se acerca el énfasis del resto de la página al tono de la cabecera */
@property --tint { syntax: '<percentage>'; inherits: true; initial-value: 0%; }
@property --hk { syntax: '<percentage>'; inherits: true; initial-value: 0%; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #566db9; }

/* Con Material Design y sonando, la cabecera se colorea con el color de énfasis y el resto de la página toma su tono */
html.material.playing { --tint: 32%; --hk: 100%; }
/* --hf: alto de la cabecera desplegada (la cabecera va fija encima y el contenido deja ese hueco arriba); --p: cuánto está encogida (0-1, lo pone ui.js) */
:root { --hdr: #323c4a; --line: rgba(255, 255, 255, .13); --hf: 182px; --p: 0; --lift: 0 2px 4px rgba(0, 0, 0, .22); }   /* sombra sutil de los paneles negros (RDS, ecualizador y volúmenes) */

/* --accent: color de énfasis (verde por defecto; se cambia con "accent" en los ajustes). Los demás derivan de él. */
:root {
  color-scheme: dark; font-family: 'Barlow', system-ui, -apple-system, Segoe UI, sans-serif;
  --accent: #566db9;   /* el índigo de serie (el color por defecto) */
  transition: --accent .6s ease, --tint .6s ease, --hk .6s ease;
  --acc-raw: var(--accent);   /* el color de énfasis sin tocar (el body lo sustituye por --acc-e, y la cabecera, que cuelga de él, necesita el de verdad) */
  --hfull: color-mix(in srgb, var(--acc-raw) 32%, var(--hdr));   /* el tono de la cabecera coloreada (32 % como --tint) */
  --acc-e: color-mix(in srgb, var(--hfull) var(--hk), var(--accent));   /* el color de énfasis que ve el resto de la página */
  --on-accent: color-mix(in srgb, var(--accent) 9%, #000);          /* texto sobre fondo de énfasis */
  --accent-bg: color-mix(in srgb, var(--accent) 12%, #1b1f1f);      /* fondo de la presintonía activa */
  --accent-soft: color-mix(in srgb, var(--accent) 55%, transparent); /* icono de noticias en directo */
}

/* Todo lo que hay en la página (y las ventanas, que cuelgan del body) usa --acc-e como color de énfasis: el de siempre, o el tono de la cabecera con Material Design y sonando */
body {
  --accent: var(--acc-e);
  --on-accent: color-mix(in srgb, var(--acc-e) 9%, #000);
  --accent-bg: color-mix(in srgb, var(--acc-e) 12%, #1b1f1f);
  --accent-soft: color-mix(in srgb, var(--acc-e) 55%, transparent);
}

/* ======================================================
   == PÁGINA: COLUMNA PEGADA ARRIBA CON EL MISMO FONDO ==
   ====================================================== */
/* Sin altura mínima en body: el fondo de toda la pantalla lo pone html, y una altura mínima en vh/dvh dejaba scroll vacío en el móvil
   cuando la barra del navegador cambiaba de tamaño */
html { background: #1a2029; }
/* Es una aplicación, no un documento: nada se selecciona ni saca el menú de copiar al mantener pulsado (salvo los campos de texto) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
body { margin: 0; display: grid; place-items: start center; background: #1a2029; color: #edf2f7; }
main { width: min(520px, 100%); box-sizing: border-box; padding: var(--hf) 20px 28px; }
/* Con altura suficiente la página no hace scroll: lo hace por dentro todo lo que hay bajo la cabecera, sin barra visible.
   Con poca altura (móvil apaisado, ventanas bajas) se queda como una página normal */
@media (min-height: 600px) {
  html { overflow: hidden; }
  main { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding-top: 0; padding-bottom: 0; }
  main > :not(.scroller) { flex: none; }
  .scroller { flex: 1 1 auto; min-height: 0; margin: 0 -6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; padding: var(--hf) 6px 28px; }
  .scroller::-webkit-scrollbar { display: none; }
  /* lo que sube por debajo de la cabecera se va desvaneciendo en vez de cortarse: --hh es la altura de la cabecera ahora y --fade lo pone ui.js según el scroll */
  .scroller { --hh: calc(var(--hf) - (var(--hf) - 74px) * var(--p)); -webkit-mask-image: linear-gradient(to bottom, transparent var(--hh), #000 calc(var(--hh) + var(--fade, 0px))); mask-image: linear-gradient(to bottom, transparent var(--hh), #000 calc(var(--hh) + var(--fade, 0px))); }
}

/* ==========================================
   == CABECERA, ESTADO DE CONEXIÓN Y RELOJ ==
   ========================================== */
/* Cabecera a todo el ancho y pegada al borde de arriba, con el mismo color que la barra del sistema (theme-color) y el corte recto.
   Va fija arriba y el contenido pasa por debajo; se encoge al deslizar: ui.js pone --p (0 = grande, 1 = encogida) y con él se reduce la altura, desaparecen el subtítulo y la barra de controles, el icono queda pequeño y el título baja de tamaño */
header { --t0: clamp(1.2rem, calc((100vw - 220px) / 6.8), 1.625rem); position: fixed; top: 0; left: 0; right: 0; z-index: 5; background: color-mix(in srgb, var(--acc-raw) var(--tint), var(--hdr)); }   /* panel liso y algo más claro que el fondo (#212530), con la barra dentro; con Material Design y sonando, teñido por el énfasis (--tint) */
.hin { position: relative; box-sizing: border-box; width: min(520px, 100%); margin: 0 auto; padding: 0 20px; }
.hrow { display: flex; align-items: center; justify-content: space-between; min-height: calc(76px - 2px * var(--p)); margin-top: calc(18px * (1 - var(--p))); }
.logo { display: block; flex: 0 0 auto; width: calc(48px - 48px * var(--p)); height: calc(48px - 48px * var(--p)); margin-right: calc(12px - 12px * var(--p)); border-radius: 27%; opacity: clamp(0, calc(1 - 2 * var(--p)), 1); }   /* al encoger el icono desaparece y el título queda solo, a la izquierda */
.titles { flex: 0 1 auto; min-width: 0; margin-right: 14px; margin-top: calc(-4px * (1 - var(--p))); }   /* corrección óptica: título y subtítulo juntos quedaban ~2 px por debajo del centro del icono */
/* tamaño grande según el ancho (que quepa en una línea junto al icono y la hora) y 1.25rem ya encogida */
h1 { font-size: calc(var(--t0) - (var(--t0) - min(1.75rem, calc((100vw - 140px) / 7.5))) * var(--p)); line-height: 1.1; font-weight: 700; margin: 0; white-space: nowrap; }
p { color: #aeb9c8; line-height: 1.45; }
/* Subtítulo bajo el título: se va cerrando en altura y desvaneciendo con el scroll */
.subtitle { height: calc(1.2em * (1 - var(--p))); margin: calc(3px * (1 - var(--p))) 0 0; overflow: hidden; font-size: .94rem; line-height: 1.2; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; color: #c4cdd9; opacity: clamp(0, calc(1 - 2 * var(--p)), 1); }
.status { display: flex; margin-left: auto; align-items: center; flex: 0 0 auto; gap: 9px; min-width: 0; padding: 5px 13px; border-radius: 999px; background: rgba(17, 22, 29, .5); color: #cbd5e1; font-size: .78rem; user-select: none; -webkit-tap-highlight-color: transparent; opacity: clamp(0, calc(1 - 2 * var(--p)), 1); }   /* el reloj se desvanece con el scroll, como la barra de controles */
.dot { width: 10px; height: 10px; border-radius: 50%; background: #778394; flex: 0 0 auto; }
.dot.on { background: #48d597; box-shadow: 0 0 12px #48d59766; }
.dot.err { background: #ff7070; }
body.no-config .logo { display: none; }   /* sin ajustes cargados no se muestra el icono de la aplicación */
/* Hueco entre el subtítulo y los botones que usa personalizar.js (algo mayor que el título): oculto mientras está vacío, y se muestra solo en cuanto el script le pone texto */
#especial { margin: 6px 0 0; font-size: calc(1.6rem + 2pt); text-align: center; }
#especial:empty { display: none; }
/* La hora (corregida con la hora real, de Madrid) va dentro de la píldora de la cabecera, junto al punto de estado */
#clock { color: #cbd5e1; font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; }


/* ====================================================================
   == BARRA DE CONTROLES (EN LA CABECERA): REPRODUCIR/DETENER, SERVIDOR Y AJUSTES ==
   ==================================================================== */
.bar { display: flex; height: calc(52px * (1 - var(--p))); margin-top: calc(12px * (1 - var(--p))); margin-bottom: calc(24px * (1 - var(--p))); border-radius: 14px; background: none; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; opacity: clamp(0, calc(1 - 2 * var(--p)), 1); }   /* en el móvil, integrada en la cabecera: solo el contorno */
.bar button { border-radius: 0; padding: 0; background: none; height: 52px; -webkit-tap-highlight-color: transparent; }
.bar button:active { background: rgba(255, 255, 255, .07); }
/* Con el ratón no se pinta un bloque encima del botón (casi del mismo tono que la barra): se aviva su icono o su texto */
@media (hover: hover) { .bar button:hover { background: none; filter: brightness(1.25); } .bar .ibtn:hover, .bar .sbtn:hover { color: #fff; } .bar button:active { background: rgba(255, 255, 255, .07); } }
.bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
/* Botón de Reproducir/Detener solo con el icono, a la derecha de la cabecera encogida (lo crea ui.js y copia el estado de #playBtn) */
.mini { position: absolute; top: 15px; right: 12px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: none; color: #cbd5e1; opacity: clamp(0, calc(2 * var(--p) - 1), 1); transition: color .3s ease; -webkit-tap-highlight-color: transparent; }
.mini-set { right: 56px; color: #cbd5e1; }
.mini .pi { width: 30px; height: 30px; }
.mini svg { display: block; width: 24px; height: 24px; }
.mini[data-state="stop"] .pi { clip-path: polygon(20% 20%, 80% 20%, 80% 80%, 20% 80%); }
.mini:active { background: rgba(255, 255, 255, .07); }
.mini:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.sep { flex: 0 0 1px; margin: 12px 0; background: var(--line); }
.ibtn { flex: 0 0 54px; display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
/* Un solo botón: verde (el color de énfasis) para Reproducir y rojo suave para Detener. Al cambiar, el triángulo se vuelve cuadrado, un texto sube y el otro entra desde abajo,
   el color pasa de uno a otro y nace un destello del color nuevo (ui.js pone data-state y la clase "swap"; --w1 y --w2 son los anchos de cada texto) */
#playBtn { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden; font-size: 1rem; font-weight: 700; color: #fff; transition: color .3s ease; }
#playBtn[data-state="stop"] { color: #ff7a7a; }
#playBtn::before { content: ''; position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, currentColor 26%, transparent) 0, color-mix(in srgb, currentColor 8%, transparent) 55%, transparent 70%); opacity: 0; pointer-events: none; }
#playBtn.swap::before { animation: play-ripple .5s ease-out; }
@keyframes play-ripple { from { transform: scale(.15); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
/* Reproducir (parado): texto e icono blancos con un halo del color de énfasis (drop-shadow en capas sobre todo el botón, así incluye el icono, que va recortado con clip-path y ahí no se vería) y, cada 8 s, un destello como el del pie: el halo crece y una franja del color cruza el texto */
#playBtn:not([data-state="stop"]) { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 70%, transparent)) drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 40%, transparent)); animation: play-halo 8s ease-in-out infinite; }
#playBtn:not([data-state="stop"]) .l1 { background: linear-gradient(100deg, currentColor 0 38%, color-mix(in srgb, var(--accent) 75%, #fff) 50%, currentColor 62% 100%) 100% 0 / 260% 100% no-repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: play-shine 8s ease-in-out infinite; }
@keyframes play-halo { 0%, 24%, 100% { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 70%, transparent)) drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 40%, transparent)); } 12% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 95%, transparent)) drop-shadow(0 0 15px color-mix(in srgb, var(--accent) 70%, transparent)); } }
@keyframes play-shine { 0% { background-position: 100% 0; } 24%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { #playBtn:not([data-state="stop"]), #playBtn:not([data-state="stop"]) .l1 { animation: none; } }
.pi { position: relative; flex: none; width: 18px; height: 18px; background: currentColor; clip-path: polygon(25% 17%, 83% 50%, 83% 50%, 25% 83%); transition: clip-path .3s ease; }
#playBtn[data-state="stop"] .pi { clip-path: polygon(25% 25%, 75% 25%, 75% 75%, 25% 75%); }
#playBtn .pi, #playBtn .pl { left: -1.5px; top: -1px; }   /* centra a la vista el conjunto icono + texto en su celda: la tinta (triángulo y letras de Barlow) queda ~1,5 px a la derecha y ~1 px por debajo del centro de la caja; con padding cambiaría el ancho de la celda */
#playBtn .pi { transform: translateY(1.4px); }   /* el centro de las mayúsculas de Barlow cae ~1,4 px por debajo del de la línea: el símbolo baja ese poco para quedar alineado con el texto */
.pl { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); width: var(--w1, 6.5em); overflow: hidden; padding: 2px 0; transition: width .3s ease; }
#playBtn[data-state="stop"] .pl { width: var(--w2, 4.8em); }
.pl > span { grid-area: 1 / 1; text-align: center; white-space: nowrap; transition: transform .3s ease, opacity .25s ease; }
.pl .l2 { opacity: 0; transform: translateY(70%); }
#playBtn[data-state="stop"] .l1 { opacity: 0; transform: translateY(-70%); }
#playBtn[data-state="stop"] .l2 { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #playBtn, .pi, .pl, .pl > span { transition: none; } #playBtn.swap::before { animation: none; } }
#playBtn { flex: 1 1 0; }
/* Servidor (provisional, entre Reproducir y los ajustes): icono y estado (el nombre del servidor mientras suena); abre la lista de servidores. Si no cabe, se desliza */
.bar .sbtn { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; color: #cbd5e1; font-size: .9rem; font-weight: 600; }
.sbtn svg { flex: none; }
.sbtn #status { min-width: 0; overflow: hidden; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sbtn .mq { display: inline-block; }
.sbtn .mq.scroll { animation: mq var(--mq-t) ease-in-out infinite alternate; }
@keyframes mq { 0%, 20% { transform: translateX(0); } 80%, 100% { transform: translateX(calc(-1 * var(--mq-d))); } }
@media (prefers-reduced-motion: reduce) { .sbtn .mq.scroll { animation: none; } }
body.no-config .sbtn, body.no-config .sbtn-sep { display: none; }   /* sin ajustes no hay servidores */

/* =========================
   == BOTONES Y VOLÚMENES ==
   ========================= */
button { border: 0; border-radius: 10px; padding: 11px 17px; font: inherit; font-weight: 650; cursor: pointer;  flex: 1; }
button:disabled { opacity: .45; cursor: default; }
.volume { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.volume + .volume { margin-top: 10px; }
.panel.vols { display: grid; grid-template-columns: auto minmax(0, 1fr) 2.12rem; align-items: center; gap: 12px; margin-top: 10px; padding: 17px 15px; box-shadow: var(--lift); }   /* 3 columnas compartidas: el hueco texto-barra y barra-porcentaje es siempre de 12 px */
.panel.vols .volume { display: contents; }
.vols .volume { margin-top: 0; }
.vols .volume + .volume { margin-top: 12px; }
.volume label { flex: 0 0 4.6em; white-space: nowrap; position: relative; top: -2px; height: 24px; line-height: 24px; font-size: .86rem; font-weight: 700; color: #aeb9c8; }
.volume label[for="newsVolume"] { letter-spacing: .285px; }   /* "Noticias" mide 2,3 px menos que "Volumen" (Barlow): así los dos ocupan lo mismo y el hueco hasta la barra es igual */
.volume span { flex: 0 0 3.4ch; white-space: nowrap; height: 24px; line-height: 24px; text-align: left; font-size: .86rem; font-weight: 700; color: #edf2f7; font-variant-numeric: tabular-nums; }
input { width: 100%; accent-color: var(--accent); }
/* Deslizadores propios: el nativo de Chrome dibuja un contorno gris alrededor del relleno. --r (0-1) lo pone ui.js (paintRange); el relleno llega al centro del pulgar (18 px) */
input[type="range"] { -webkit-appearance: none; appearance: none; height: 24px; margin: 0; background: transparent; cursor: pointer; --r: 1; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--rng, var(--accent)) calc(9px + (100% - 18px) * var(--r)), #2c3542 0); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--rng, var(--accent)); box-shadow: 0 1px 3px #0008; }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: #2c3542; }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--rng, var(--accent)); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--rng, var(--accent)); box-shadow: 0 1px 3px #0008; }
.vols input[type="range"] { --rng: color-mix(in srgb, var(--accent) 78%, #000); }   /* los deslizadores de volumen, del tono medio de las barras del EQ (que tienen degradado hacia abajo) y no del énfasis a pleno */
input[type="range"]:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 3px; border-radius: 12px; }
input[type="range"]:disabled { opacity: .4; }

/* ===================================
   == EMISORA ACTUAL Y VISUALIZADOR ==
   =================================== */
.now { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 22px; box-shadow: var(--lift); padding: 21px 18px 16px; min-height: 86px; box-sizing: border-box; border-radius: 12px; background: #11161d; }
.viz { position: relative; user-select: none; -webkit-tap-highlight-color: transparent; margin-top: 10px; padding: 28px 18px 14px; height: 86px; box-sizing: border-box; border-radius: 12px; background: #11161d; box-shadow: var(--lift); }
.viz canvas { display: block; width: 100%; height: 100%; }
.viz.eq-on { cursor: pointer; }
.viz.off canvas, .viz.off .eq-label { opacity: .45; filter: grayscale(1); }
.viz:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eq-label { position: absolute; top: 10px; right: 18px; font-size: .68rem; line-height: 14px; font-weight: 700; letter-spacing: .05em; color: #fff; pointer-events: none; }
/* Dial: caja de referencia de los botones y la frecuencia */
.now .dialbox { position: relative; flex: 0 0 auto; }
body:not(.no-config) .now .dialbox:has(> .rec:not([hidden])) { align-self: stretch; display: flex; flex-direction: column; justify-content: space-evenly; margin: -21px 0 -16px; }   /* con la píldora de grabar: ocupa todo el alto del panel y reparte el mismo hueco arriba, entre la píldora y el dial, y abajo */
/* Píldora de grabar (encima del dial y tan ancha como él): punto y "Grabar"; grabando, el punto parpadea y el texto pasa a ser el tiempo */
.now .rec { white-space: nowrap; flex: none; display: flex; align-items: center; justify-content: center; gap: 7px; width: auto; height: 24px; padding: 0 10px; border-radius: 12px; background: #1f2732; border: 1px solid #303a47; color: #cbd5e1; font-size: .76rem; font-weight: 650; line-height: 1; }
.now .rec[hidden], body.no-config .now .rec { display: none; }   /* sin ajustes guardados, no hay píldora */
.now .rec:not(.on):hover:not(:disabled) { background: #263040; }
.rec-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; }
.rec:disabled .rec-dot { background: #6b7684; }
.rec-time { font-variant-numeric: tabular-nums; }
.now .rec.on { border-color: #e5484d; background: #2a1d22; color: #ffc2c4; }
.rec.on .rec-dot { animation: rec-pulse 1.2s ease-in-out infinite; }
.rec.on.paused .rec-dot { animation: none; opacity: .45; }   /* en espera (radio en pausa o parada): el punto no parpadea */
@keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .rec.on .rec-dot { animation: none; } }
.now .ps { flex: 1 1 0; width: 0; min-width: 0; margin: 0 -8px 0 -12px; padding: 0 22px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 2.5rem; font-weight: 700; letter-spacing: .02em; color: #edf2f7; }   /* nunca ensancha el panel: lo que no cabe se desplaza (ver ui.js) */
.now .ps > span { display: inline-block; white-space: pre; }
.now .ps.marquee { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, transparent 2px, #000 12px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent 2px, #000 12px, #000 calc(100% - 22px), transparent); }   /* los bordes se desvanecen (en el margen, así en cada extremo se lee entero; a la izquierda, sin llegar al borde del panel; a la derecha, antes del dial) */
.now .ps.marquee > span { animation: ps-marquee var(--dur, 10s) ease-in-out infinite; }
@keyframes ps-marquee { 0%, 15% { transform: translateX(0); } 45%, 60% { transform: translateX(var(--dx)); } 90%, 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .now .ps.marquee > span { animation: none; } }
.now .freq { flex: 0 0 auto; font-size: 1.05rem; font-weight: 600; color: #aeb9c8; font-variant-numeric: tabular-nums; }
.now .freq small { font-size: .75rem; font-weight: 500; color: #8c98a8; margin-left: 3px; }
.now .freq.dial { display: flex; align-items: center; gap: 2px; }
.now .freq.dial small { margin: 0 4px 0 2px; }
.dial .step { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 8px; background: #1a2029; color: #cbd5e1; font-size: 1.15rem; font-weight: 600; line-height: 1; }
.dial .step:hover:not(:disabled) { background: #263040; }
.dial input { width: 4.6ch; padding: 2px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: center; font-variant-numeric: tabular-nums; }
.dial input:focus { outline: none; border-bottom-color: var(--accent); color: #edf2f7; }
.dial input:disabled { opacity: 1; }

/* Botón del modo presentación, en la esquina de las barras */
/* Alineado con el margen de las barras (a su izquierda; la etiqueta del ecualizador va a su derecha), en la franja de arriba; el área de toque se extiende con ::after */
.pres-open { position: absolute; top: 10px; left: 18px; flex: none; display: grid; place-items: center; width: 14px; height: 14px; padding: 0; border-radius: 3px; background: none; color: #fff; opacity: 1; }
.pres-expand { left: 48px; }
.pres-pip { left: 78px; }
.pres-open::after { content: ''; position: absolute; inset: -9px -8px; }
.pres-open svg { display: block; }
.viz.off .pres-open { display: none; }

/* =======================================
   == PANELES: OYENTES Y MODO BOLETINES ==
   ======================================= */
/* Paneles (oyentes y modo boletines): misma estética, sin brillo */
.panel { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 15px; border-radius: 12px; background: #11161d; }
.panel .badge { display: grid; place-items: center; flex: 0 0 auto; min-width: 38px; height: 38px; box-sizing: border-box; padding: 0 6px; border-radius: 10px; background: #1a2029; font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.panel .info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.panel .info b { font-size: .88rem; font-weight: 650; color: #e2e8f0; }
.panel .info span { font-size: .78rem; color: #9fabb9; }
.panel .switch, .panel .lock { margin-left: auto; }
.panel.access, .panel.news { margin-inline: 2px; background: #1f2632; }
.panel.news { margin-top: 8px; }   /* a 8 px de los oyentes: el mismo hueco que entre filas de presintonías */
/* Título "Presintonías" encima de los oyentes (ocupan el sitio y las medidas del buscador de Neo: padding 15 px, hueco 12 px, alto 68 px) */
.ptitle { margin: 0 0 8px 2px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8c98a8; }
.ptitle.ptitle-main { margin: 22px 2px 8px 4px; }
body.no-config .panel > * { visibility: hidden; }
/* Sin ajustes cargados la página queda limpia: solo las formas de los paneles y el engranaje para cargar los ajustes */
body.no-config .ptitle-main, body.no-config .titles, body.no-config #clockBox, body.no-config .now > *, body.no-config .viz > * { visibility: hidden; }
body.no-config #playBtn, body.no-config .bar .sep { display: none; }
body.no-config .presets { visibility: hidden; }   /* tampoco el "+" de añadir frecuencia */
body.no-config #settingsBtn { margin-left: auto; }
body.no-config #tabGeneral > *, body.no-config #tabEq > *, body.no-config #tabNews > *, body.no-config #tabLog > * { visibility: hidden; }   /* en los ajustes, solo la pestaña Configuración tiene contenido */
/* Modo activado con una emisora no musical: las noticias no saltarían (naranja, el color de los avisos) */
.panel.news.wont .switch input:checked + .track { background: #f2b84b; }
.panel.news.wont .switch input:checked + .track::after { background: #2b2108; }
.panel.news .badge { transition: background .4s; }
.panel.news.live .badge { background: var(--accent-soft); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .track { background: #2a3039; }
/* Estado de acceso: verde (libre) y ámbar (ocupado) son colores de estado, no dependen del color de énfasis */
.access { --c: #778394; margin-top: 0; }
.access[data-state="free"] { --c: #58dfa3; }
.access[data-state="busy"] { --c: #f2b84b; }
.access .count { color: var(--c); }
.access .lock { flex: 0 0 auto; font-size: 1.15rem; color: var(--c); user-select: none; -webkit-tap-highlight-color: transparent; }
.switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #394454; transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #e8edf5; transition: transform .2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(20px); background: var(--on-accent); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==================
   == PRESINTONÍAS ==
   ================== */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 0 2px; }   /* debajo del título "Frecuencias" */
/* Plegar y desplegar: de cada grupo se ven dos filas enteras de presintonías y, si hay más (o el "+" no cabe), debajo la barra
   "Mostrar N más" / "Mostrar menos". El "+" va siempre el último, así que plegado no se ve */
.mbar { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 38px; margin-top: 8px; padding: 0; border-radius: 10px; background: #1f2632; color: #cbd5e1; font-size: .82rem; font-weight: 700; -webkit-tap-highlight-color: transparent; }
.mbar[hidden] { display: none; }
.mbar svg { width: 14px; height: 14px; transition: transform .2s ease; }
.mbar.open svg { transform: rotate(180deg); }
@media (hover: hover) { .mbar:hover { color: #edf2f7; background: #252d3a; } }
.mbar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.no-config .mbar { display: none; }
.presets + .mbar { width: calc(100% - 4px); margin-inline: 2px; }   /* todo el ancho de la rejilla, con sus mismos márgenes */
.presets .preset { border-radius: 12px; }
.preset { min-height: calc(1.8rem + 32px); box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; padding: 10px 8px; color: #e8edf5; background: #1f2632; border: 1px solid transparent; }
.preset .pn { display: flex; align-items: center; flex: 1; text-align: center; font-size: .95rem; font-weight: 700; line-height: 1.15; letter-spacing: .01em; overflow-wrap: anywhere; color: #f1f5f9; }
.preset .pf { font-size: .74rem; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; color: #9fabb9; }
.preset[hidden] { display: none; }
.preset.more { justify-content: center; font-size: 1.8rem; font-weight: 600; line-height: 1; color: var(--accent); background: #1a2029; border: 1px dashed #303a47; }
.preset.active { background: color-mix(in srgb, var(--accent) 30%, #1b1f1f); }   /* solo se colorea por dentro, sin cerco; con más fuerza que --accent-bg para que se distinga a primera vista */
.preset.locked { opacity: .55; }   /* ahora no se puede sintonizar: al pulsarla queda como emisora deseada */
.preset.wanted { border: 1px dashed #f2b84b; opacity: 1; }   /* emisora deseada, a la espera de poder sintonizarla */
.preset:disabled { opacity: .4; }

/* ========================
   == REGISTRO (VENTANA) ==
   ======================== */
#log { display: block; width: 100%; margin: 0; flex: 1 0 auto; height: 0; min-height: 120px; resize: vertical; box-sizing: border-box; padding: 12px; border: 0; overflow-wrap: anywhere; background: #11161d; border-radius: 10px; color: #9fabb9; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
audio { display: none; }

/* ========================
   == VENTANA DE AJUSTES ==
   ======================== */
/* Las tres ventanas (ajustes, servidores y registro) miden lo mismo y van pegadas arriba; el área central ocupa el resto y, en el texto de configuración y el registro, se puede estirar desde la esquina (la ventana crece con ella) */
dialog.settings { width: min(560px, 94vw); min-height: min(584px, calc(100vh - 44px)); min-height: min(584px, calc(100dvh - 44px)); max-height: calc(100vh - 44px); max-height: calc(100dvh - 44px); overflow: auto; margin: 22px auto auto; padding: 0; border: 1px solid #303a47; border-radius: 16px; background: #1a2029; color: #edf2f7; box-shadow: 0 18px 55px #000a; }
dialog.settings[open] { display: flex; flex-direction: column; }
dialog.settings::backdrop { background: rgba(0, 0, 0, .65); }
.dlg { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 18px; box-sizing: border-box; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; font-size: 1.05rem; }
.dlg .x { flex: none; padding: 4px 10px; background: #2a3441; color: #cbd5e1; border-radius: 8px; }
.clockrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: #cbd5e1; }
/* En todas las pestañas de Ajustes, como una lista: el texto a la izquierda y su control (interruptor, campo, desplegable o botón) a la derecha,
   con la misma altura en todas las filas */
/* La ventana de Ajustes tiene siempre el mismo tamaño (algo más alta que antes, sin pasar de la pantalla): lo que no cabe en una pestaña se
   desplaza dentro de ella, debajo de la cabecera y las pestañas, que se quedan quietas */
#settings { height: min(680px, calc(100vh - 44px)); height: min(680px, calc(100dvh - 44px)); min-height: 0; overflow: hidden; }
#settings .dlg { flex: 1 1 auto; min-height: 0; }
#settings .tabs { flex: none; }
#settings .tab { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-inline: -6px; padding-inline: 6px; padding-bottom: 2px; scrollbar-width: thin; scrollbar-color: #3a4554 transparent; }
#settings .tab::-webkit-scrollbar { width: 6px; }
#settings .tab::-webkit-scrollbar-thumb { background: #3a4554; border-radius: 3px; }
#settings .clockrow { min-height: 36px; }
#settings .clockrow > :first-child { margin-right: auto; }
#settings .clockrow select { min-width: 132px; }
.clockrow select { padding: 6px 8px; border-radius: 8px; border: 1px solid #303a47; background: #11161d; color: #edf2f7; font: inherit; }
.clockrow input[type="text"] { width: 56px; padding: 6px 4px; box-sizing: border-box; text-align: center; border-radius: 8px; border: 1px solid #303a47; background: #11161d; color: #edf2f7; font: inherit; }
.clockrow input[type="text"]:disabled { opacity: .6; }
/* Pestañas: texto con línea inferior (la activa lleva el color de énfasis); los botones de acción siguen siendo botones rellenos */
.tabs { display: flex; border-bottom: 1px solid #303a47; }
.tabs button { flex: 1; padding: 8px 6px 10px; margin-bottom: -1px; border-radius: 0; border-bottom: 2px solid transparent; background: none; color: #8c98a8; font-size: .92rem; }
.tabs button:hover { color: #cbd5e1; }
.tabs button.active { color: #edf2f7; border-bottom-color: var(--accent); }
.tab { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.tab[hidden] { display: none; }
/* Apartados de los ajustes generales, separados por una línea suave */
.group { display: flex; flex-direction: column; gap: 12px; }
.clockrow button { flex: none; padding: 6px 12px; font-size: .85rem; color: #e8edf5; background: #394454; }
.clockrow button.danger { color: #fff; background: #b8414d; }
/* Configuración, bajo Cargar y Guardar: "Recargar caché de sonidos" y "Borrar ajustes" (este pide confirmación) en una fila */
.cfgacts { flex: none; display: flex; gap: 10px; }
#tabConfig .cfgmsg { min-height: 0; }   /* el aviso sale debajo de la lista solo cuando hay algo que decir */
#tabConfig .cfgmsg:empty { display: none; }
.appver { margin-top: auto; padding-top: 8px; text-align: center; font-size: .78rem; color: #6f7b8b; }   /* versión, al final de Configuración */
.cfgacts button { flex: 1 1 0; padding: 10px 8px; font-size: .86rem; color: #e8edf5; background: #2a3441; }
.cfgacts button.danger { color: #ff8a8a; background: #3a2227; }
.cfgacts button.danger.armed { color: #fff; background: #b8414d; }
/* Color por defecto (General): selector y muestra del color personalizado */
.clockrow input[type="color"] { width: 40px; height: 32px; padding: 2px; box-sizing: border-box; border: 1px solid #303a47; border-radius: 8px; background: #11161d; cursor: pointer; }
.clockrow input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.clockrow input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.clockrow input[type="color"]::-moz-color-swatch { border: 0; border-radius: 5px; }
.group + .group { padding-top: 14px; border-top: 1px solid #252e3a; }
/* Hueco reservado para los mensajes de la configuración (guardado, errores...), con su propio fondo */
.cfgmsg { min-height: calc(2.8em + 18px); box-sizing: border-box; padding: 8px 10px; border: 1px solid #252e3a; border-radius: 10px; background: #11161d; white-space: pre-wrap; font-size: .8rem; line-height: 1.4; }
.cfgmsg.ok { color: #58dfa3; }
.cfgmsg.err { color: #ff8a8a; }
.dlg-actions { display: flex; gap: 10px; }
.dlg-actions .primary { color: var(--on-accent); background: var(--accent); }
.dlg-actions button:not(.primary) { color: #e8edf5; background: #394454; }
.dlg-links { flex: none; box-sizing: border-box; height: 20px; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }   /* misma altura en Configuración y Nuevo: nada salta al cambiar de pestaña */
.dlg-links .link { flex: none; padding: 0; background: none; color: #8c98a8; font-size: .78rem; font-weight: 500; text-decoration: underline; }

/* ==========================
   == VENTANA DE SERVIDORES ==
   ========================== */
#serversDialog .dlg { gap: 0; padding: 22px 0 0; }
#serversDialog .dlg-head { padding: 0 20px 14px; font-size: 1.15rem; }
/* Sin caja ni capas: el selector de modo y las tarjetas hacen scroll juntos bajo el título, con desvanecido arriba y abajo */
.srvbox { flex: 1 0 auto; height: 0; min-height: 120px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; padding: 14px 20px 34px; overflow: auto; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); }
.modes { flex: none; display: flex; gap: 4px; padding: 4px; margin-bottom: 6px; border-radius: 13px; background: #11161d; }
.modes button { flex: 1; padding: 11px 6px; border-radius: 10px; font-size: .86rem; color: #a9b4c2; background: none; }
.modes button:not(.active):hover { color: #e8edf5; background: #1f2732; }
.modes button.active { color: var(--on-accent); background: var(--accent); }
.srvlist { flex: none; display: flex; flex-direction: column; gap: 10px; }
/* Esquina para estirar o encoger la ventana arrastrando (doble toque = tamaño original) */
#serversDialog .dlg { position: relative; }
.grip { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; cursor: nwse-resize; touch-action: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M25 14 14 25M25 20 20 25' stroke='%237b8797' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat; }
/* "Añadir servidor": al final de la lista, bajo su título "Nuevo" (como Principales y Extra); cambia la ventana a un formulario (name, base y type) */
.srvadd { flex: none; padding: 13px 16px; border: 1px dashed #303a47; border-radius: 12px; background: none; color: var(--accent); font-size: .92rem; font-weight: 700; position: relative; }
@media (hover: hover) { .srvadd:hover { background: #1f2632; } }
.srvform { flex: 1 0 auto; align-content: start; padding: 14px 20px 20px; }
.srvform[hidden], .srvbox[hidden] { display: none; }
.srvform label { font-size: .8rem; }
.srvform .dlg-actions { justify-content: flex-end; }
.srvform .cfgmsg:empty { display: none; }
.srvhead { display: flex; align-items: center; gap: 12px; margin: 10px 2px 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8c98a8; }
.srvhead::after { content: ''; flex: 1; height: 1px; background: #252e3a; }
/* En pantallas anchas (PC), dos servidores por fila; los títulos de grupo y "Añadir servidor" ocupan siempre la fila entera */
@media (min-width: 700px) and (pointer: fine) {
  .srvlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .srvlist .srvhead { grid-column: 1 / -1; }
}
.srv { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 12px; text-align: left; color: #e8edf5; background: #2a3441; border: 1px solid transparent; transition: background .15s; }
.srv:not(.current):hover { background: #323d4d; }
.srv.current { border-color: var(--accent); background: var(--accent-bg); }
.srv .nm { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: .98rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv .nm small { overflow: hidden; text-overflow: ellipsis; font-size: .76rem; font-weight: 500; color: #9fabb9; }
.srv .so { flex: none; min-width: 2.4em; box-sizing: border-box; padding: 4px 10px; border-radius: 999px; text-align: center; font-size: .82rem; font-weight: 650; font-variant-numeric: tabular-nums; color: #9fabb9; background: rgba(255, 255, 255, .06); }
.srv .so.free { color: #58dfa3; background: rgba(88, 223, 163, .13); }
.srv .so.busy { color: #f2b84b; background: rgba(242, 184, 75, .13); }
.srv .so.out { color: #ff8a8a; background: rgba(255, 138, 138, .13); }

/* =======================
   == MODO PRESENTACIÓN ==
   ======================= */
/* Capa a pantalla completa con las barras como protagonistas; se dibuja en un canvas (presentation.js) y los textos son HTML encima */
.pres { position: fixed; inset: 0; z-index: 20; overflow: hidden; background: #0a0d12; touch-action: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.pres[hidden] { display: none; }
.pres.idle:not(.show-top):not(.show-bottom) { cursor: none; }
.pres canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.pres-info { position: absolute; left: 0; right: 0; top: 7vh; display: flex; flex-direction: column; align-items: center; gap: .8vh; text-align: center; pointer-events: none; }
.pres-ps { max-width: 94vw; padding: .5em; margin: -.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: min(15vw, 11vh); font-weight: 750; letter-spacing: .06em; line-height: 1.1; color: #f1f5f9; text-shadow: 0 0 .45em color-mix(in srgb, var(--accent) 55%, transparent); }
.pres-freq { font-size: min(6vw, 4.4vh); font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: #aeb9c8; }
.pres-qual { display: flex; justify-content: center; gap: .5em; max-width: 94vw; font-size: min(2.8vw, 1.9vh); font-weight: 600; letter-spacing: .05em; color: #8c98a8; }
.pres-qual span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-qual span:empty { display: none; }
.pres-srv:has(+ span:not(:empty))::after { content: '·'; margin-left: .5em; }
@media (max-width: 599.98px) { .pres[data-mode="0"] .pres-info { top: 14vh; } }
.pres-ps.run { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, transparent, #000 .5em, #000 calc(100% - .5em), transparent); mask-image: linear-gradient(90deg, transparent, #000 .5em, #000 calc(100% - .5em), transparent); }
.pres[data-mode="1"] .pres-info { top: 50%; transform: translateY(-50%); gap: .6vmin; }
.pres[data-mode="1"] .pres-ps { max-width: 34vmin; font-size: 5.6vmin; }
.pres[data-mode="1"] .pres-freq { font-size: 3.2vmin; }
.pres[data-mode="1"] .pres-clock { margin-top: .4vmin; font-size: 2.6vmin; }
.pres[data-mode="1"] .pres-qual { flex-direction: column; align-items: center; gap: .15em; max-width: 34vmin; font-size: 1.5vmin; }
.pres[data-mode="1"] .pres-srv::after { content: none; }
.pres[data-mode="3"] .pres-info { display: none; }   /* Vórtice: vista limpia, sin textos */
/* Océano: solo una ventana translúcida arriba (efecto cristal) con el nombre */
.pres[data-mode="2"] .pres-info { top: max(8.8vh, env(safe-area-inset-top)); left: 0; right: 0; width: fit-content; max-width: min(88vw, calc(100vw - 128px)); margin: 0 auto; box-sizing: border-box; gap: .3vh; padding: .7vh 1.4em; border-radius: 16px; background: rgba(14, 18, 28, .32); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.pres[data-mode="2"] .pres-ps { max-width: 80vw; font-size: min(6.6vw, 4.6vh); letter-spacing: .05em; }
.pres[data-mode="2"] .pres-freq, .pres[data-mode="2"] .pres-clock, .pres[data-mode="2"] #presQual { display: none; }
.pres[data-mode="2"] .pres-qual { max-width: 100%; font-size: min(4vw, 2.6vh); letter-spacing: .04em; color: #aeb9c8; }
.pres[data-mode="2"] .pres-srv::after { content: none; }
.pres-mode { position: absolute; left: 0; right: 0; bottom: 4vh; text-align: center; font-size: .85rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #8c98a8; opacity: 0; transition: opacity .4s; pointer-events: none; }
.pres-mode.show { opacity: 1; }
.pres-close { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #cbd5e1; font-size: 1.1rem; transition: opacity .4s; }
.pres.idle .pres-close { opacity: 0; pointer-events: none; }
.pres-pipbtn { right: 60px; }   /* imagen en imagen, a la izquierda de la ✕ (se esconde con ella) */
.pres-pipbtn:not([hidden]) { display: grid; place-items: center; }
.pres-pipbtn svg { display: block; }
.pres-clock { margin-top: .5vh; font-size: min(4.6vw, 3.4vh); font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: #cbd5e1; }
.pres-spin { display: none; pointer-events: auto; margin-top: .2vmin; padding: .4vmin 1.2vmin; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 1.6vmin; font-weight: 600; letter-spacing: .12em; color: #8c98a8; cursor: pointer; }   /* solo en el Radial (debajo del reloj) */
.pres-spin:hover { color: #cbd5e1; background: rgba(255, 255, 255, .06); }
.pres[data-mode="1"] .pres-spin { display: block; }
/* En pantallas táctiles, mientras se ven los controles los títulos se apartan un momento para que se lean bien (salvo en el Radial, donde no estorban) */
@media (pointer: coarse) {
  .pres-info { transition: opacity .25s; }
  .pres.show-top:not([data-mode="1"]) .pres-info { opacity: 0; }
}

/* Paneles que aparecen al llevar el ratón arriba a la izquierda (control) y abajo (presintonías); en pantallas táctiles, al tocar */
.pres-panel { position: absolute; z-index: 2; box-sizing: border-box; background: rgba(17, 22, 29, .9); border: 1px solid #252e3a; border-radius: 14px; backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.pres-ctl { top: 12px; left: 12px; width: min(300px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; transform: translateY(-8px); }
.pres-strip { left: 12px; right: 12px; bottom: 12px; display: flex; gap: 8px; padding: 8px; overflow-x: auto; overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: none; transform: translateY(8px); }
@media (pointer: coarse), (max-width: 600px) { .pres-ctl { top: max(58px, calc(env(safe-area-inset-top) + 46px)); left: 0; right: 0; margin: 0 auto; } }
.pres.show-top .pres-ctl, .pres.show-bottom .pres-strip { opacity: 1; pointer-events: auto; transform: none; }
.pres.show-bottom .pres-mode { bottom: 112px; }
.pc-row { display: flex; align-items: center; gap: 12px; font-size: .88rem; color: #cbd5e1; }
.pc-row label:not(.switch) { flex: 0 0 4.6em; }
.pc-row input[type="range"] { min-width: 0; }
.pc-row span:last-child { flex: 0 0 3.4ch; text-align: right; font-variant-numeric: tabular-nums; }
.pc-news { margin-left: auto; }
.pc-pip { margin-right: auto; }
.pc-play { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--on-accent); background: var(--accent); }
.pc-play svg { display: block; }
.pres .switch.wont input:checked + .track { background: #f2b84b; }
.pres .switch.wont input:checked + .track::after { background: #2b2108; }
.pres-strip::-webkit-scrollbar { display: none; }
.pres-strip { user-select: none; -webkit-user-select: none; }
.pres-strip .preset:not(:disabled) { cursor: pointer; }   /* dedo de pulsar; la mano cerrada, solo mientras se arrastra */
.pres-strip.dragging { cursor: grabbing; }   /* arrastrando: mano cerrando y las presintonías no reaccionan al pasar */
.pres-strip.dragging .preset { pointer-events: none; }
.pres-strip .preset { flex: 0 0 112px; min-height: 58px; }

/* Arrastrar y menú de las presintonías */
.now, #presets .preset { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Sin el resaltado azul que Chrome para Android pinta al mantener pulsado (un rectángulo sin redondear antes de que salga el menú): Chrome no siempre
   resalta la presintonía, a veces su contenedor (escucha los clics), así que se quita en toda la zona */
#presets, #presets *, .dnd-card { -webkit-tap-highlight-color: transparent; }
.now input { -webkit-user-select: text; user-select: text; }
body.dnd, body.dnd * { cursor: grabbing !important; }
.dnd-ghost { position: fixed; z-index: 60; left: 0; top: 0; padding: 8px 12px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: .9rem; font-weight: 700; white-space: nowrap; pointer-events: none; opacity: .92; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.dnd-card { position: fixed; z-index: 60; left: 0; top: 0; margin: 0; pointer-events: none; opacity: .92; border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 12px 28px rgba(0, 0, 0, .55); }
#presets .preset.lifted { visibility: hidden; }   /* su hueco queda vacío mientras se arrastra */
#presets .preset.drop { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Ventana de formulario (añadir frecuencia): como la de ajustes, arriba, pero solo con la altura que necesitan */
dialog.settings.sheet { min-height: 0; }
.sheet .cfgmsg:empty { display: none; }
.sheet .dlg { flex: 0 1 auto; min-height: 0; }
.sheet .stform { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 3px; margin: -3px; }
.sheet .dlg-head, .sheet .cfgmsg, .sheet .dlg-actions { flex: none; }
.sheet .dlg-actions { justify-content: flex-end; }
.sheet .dlg-actions .primary { flex: 0 1 auto; min-width: 140px; }
.stform { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.stform .sttitle { grid-column: 1 / -1; font-size: .95rem; color: #edf2f7; }
.stform label { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: .76rem; color: #8c98a8; }
.stform .wide { grid-column: 1 / -1; }
.stform input[type="text"], .stform input[type="url"], .stform select { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; border: 1px solid #303a47; background: #11161d; color: #edf2f7; font: inherit; font-size: .9rem; }
.stform input::placeholder { color: #5c6877; }
.stform .stcolor { display: flex; gap: 8px; }
.stform .stcolor input[type="text"] { flex: 1 1 auto; min-width: 0; }
.stform .stcolor input[type="color"] { flex: none; width: 44px; height: 42px; padding: 3px; box-sizing: border-box; border: 1px solid #303a47; border-radius: 10px; background: #11161d; }
.stform .fqall { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .88rem; color: #cbd5e1; }
.stform .fqall[hidden] { display: none; }
.fqhint { flex: none; margin: 0; font-size: .78rem; color: #8c98a8; }
.fqhint:empty { display: none; }
.stform .fq-new[hidden] { display: none; }
/* "Añadir frecuencia…" al final del menú de una presintonía, separado como en Neo */
.pmenu .pm-add { margin-top: 6px; border-top: 1px solid #303a47; border-radius: 0 0 8px 8px; color: #cbd5e1; }
.pmenu { position: fixed; z-index: 70; min-width: 200px; padding: 6px; background: #1a2029; border: 1px solid #303a47; border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
.pmenu[hidden] { display: none; }
.pmenu .pm-title { margin-bottom: 6px; padding: 6px 10px 9px; border-bottom: 1px solid #303a47; font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: #8c98a8; }
.pmenu button { display: block; width: 100%; padding: 10px 12px; border-radius: 8px; text-align: left; font-size: .92rem; color: #e8edf5; background: none; }
.pmenu button:hover { background: #2a3441; }
.pmenu button.danger { color: #ff7a85; }
.pmenu .pm-row { display: flex; align-items: stretch; gap: 4px; }
.pmenu .pm-row button { width: auto; }
.pmenu .pm-go { flex: 1; min-width: 96px; font-variant-numeric: tabular-nums; }
.pmenu .pm-go.on { color: var(--accent); font-weight: 650; }
.pmenu .pm-del { flex: none; color: #ff7a85; font-size: .85rem; }
.pmenu .pm-del.confirm, .pmenu .pm-del.confirm:hover { color: #fff; background: #b8414d; }   /* pide confirmación antes de borrar */

/* ===================================================
   == PREGUNTA (GRABACIÓN EN CURSO / SIN TERMINAR) ==
   =================================================== */
dialog.ask { box-sizing: border-box; width: min(400px, calc(100vw - 40px)); margin: auto; padding: 20px; border: 1px solid #303a47; border-radius: 16px; background: #1a2029; color: #edf2f7; box-shadow: 0 18px 55px #000a; }
dialog.ask::backdrop { background: rgba(0, 0, 0, .65); }
dialog.ask b { font-size: 1.05rem; }

/* ====================================================
   == SALIR CON LA RADIO SONANDO (BOTÓN ATRÁS) ==
   ==================================================== */
/* Misma ventana que la bienvenida de Neo, con el aviso en letra más pequeña */
dialog.exit { width: min(430px, 94vw); max-height: 94dvh; overflow-y: auto; margin: auto; padding: 0; border: 1px solid #303a47; border-radius: 16px; background: #1a2029; color: #edf2f7; box-shadow: 0 18px 55px #000a; }
dialog.exit::backdrop { background: rgba(0, 0, 0, .65); }
.exit-note { margin: 0; font-size: .86rem; line-height: 1.45; color: #9fabb9; }
.exit-q { margin: 0; font-size: 1.15rem; }
.lichead .x { margin-left: auto; }
/* Sin ajustes o sin licencia válida: la página vacía, solo el fondo y la ventana "Cargar licencia" */
body.no-config main, body.no-config #bgGlow { visibility: hidden; }
.licerr { margin: 0; padding: 8px 10px; border-radius: 10px; background: #3a2227; color: #ff8a8a; font-size: .86rem; line-height: 1.4; }
.licerr[hidden] { display: none; }
.lichead { justify-content: flex-start; gap: 12px; }
.lichead img { flex: none; border-radius: 27%; }   /* el icono de la aplicación, como en la cabecera */
dialog.ask p { margin: 10px 0 18px; line-height: 1.4; color: #b8c2cf; }

/* Aviso breve abajo (mensajes de la grabación) */
.toast { position: fixed; z-index: 70; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(92vw, 460px); padding: 10px 16px; border-radius: 12px; border: 1px solid #303a47; background: #1a2029; color: #edf2f7; font-size: .88rem; box-shadow: 0 10px 30px #000a; pointer-events: none; }
.toast[hidden] { display: none; }

/* ===================================
   == PIE: TEXTOS DE LOS AJUSTES ==
   =================================== */
.foot { margin: 30px 0 0; padding: 0; text-align: center; font-size: .94rem; line-height: 1.5; color: #7d899a; }
.foot .love { display: block; margin-bottom: 5px; font-size: 1.0625rem; font-weight: 700; color: #aeb9c8; }
/* Primera línea: las frases se cruzan (la que sale sube y se va; la que entra sube desde abajo) y al aparecer, bote de los emojis
   o brillo del color de énfasis en el texto (ver foot.js) */
.foot .love { display: grid; justify-items: center; overflow: hidden; padding-top: 10px; margin-top: -10px; }   /* el hueco de arriba deja sitio al bote de los emojis */
.foot .love > .fp { grid-area: 1 / 1; white-space: nowrap; }
.fp .fe { display: inline-block; }
.fp.out { animation: fp-out .45s ease-in forwards; }
.fp.in { animation: fp-in .5s ease-out both; }
@keyframes fp-out { to { opacity: 0; transform: translateY(-70%); } }
@keyframes fp-in { from { opacity: 0; transform: translateY(70%); } }
.fp-emoji.play .fe { animation: fe-bounce .9s cubic-bezier(.3, .7, .4, 1) calc(var(--k) * .14s) both; }
@keyframes fe-bounce { 0% { transform: none; } 25% { transform: translateY(-9px) scale(1.18); } 45% { transform: translateY(0) scale(.94, 1.06); } 62% { transform: translateY(-4px); } 80%, 100% { transform: none; } }
.fp-text.play { background: linear-gradient(100deg, #aeb9c8 0 38%, var(--accent) 50%, #aeb9c8 62% 100%) 100% 0 / 260% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fp-shine 1.8s ease-in-out; }
@keyframes fp-shine { 0% { background-position: 100% 0; text-shadow: none; } 50% { text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { background-position: 0 0; text-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .fp.out, .fp.in, .fp-emoji.play .fe, .fp-text.play { animation: none; } }
.foot .fsub { display: block; }
.foot .fsub:empty { display: none; }
body.no-config .foot { display: none; }

/* ===================================================
   == AJUSTES: PESTAÑAS ECUALIZADOR Y BOLETINES ==
   =================================================== */
/* Con cinco pestañas puede que no quepan en el móvil: se desplazan de lado (sin barra) y la elegida se pone a la vista */
#settings .tabs { overflow-x: auto; border-bottom: 0; box-shadow: inset 0 -1px #303a47; scrollbar-width: none; }
#settings .tabs::-webkit-scrollbar { display: none; }
#settings .tabs button { flex: 1 0 auto; margin-bottom: 0; padding-inline: 10px; white-space: nowrap; }
@media (max-width: 600px) { #settings .tabs button { padding-inline: 6px; font-size: .84rem; } }
@media (max-width: 380px) { #settings .tabs button { padding-inline: 4px; font-size: .8rem; } }
#tabEq .cfgmsg, #tabNews .cfgmsg { min-height: 0; }
#tabEq .cfgmsg:empty, #tabNews .cfgmsg:empty { display: none; }

/* Ecualizador: un botón por modo (1, 2...; los desactivados, solo con borde), el nombre, la gráfica y los cuatro deslizadores */
.eqmodes { display: flex; gap: 8px; }
.eqmodes button { flex: 1 1 0; min-width: 0; height: 40px; padding: 0; color: #cbd5e1; background: #2a3441; font-variant-numeric: tabular-nums; }
.eqmodes button.active { color: var(--on-accent); background: var(--accent); }
.eqmodes button.off { color: #6b7788; background: none; box-shadow: inset 0 0 0 1px #3a4554; }
.eqmodes button.off.active { color: #edf2f7; background: #3a4554; box-shadow: none; }
#eqEdit.off .eqcurve, #eqEdit.off .eqrow { opacity: .55; }
#eqEdit[hidden] { display: none; }
.clockrow.eqname input[type="text"] { flex: 1 1 160px; width: auto; min-width: 0; padding: 7px 10px; text-align: left; }
.eqcurve { display: block; width: 100%; height: 150px; border-radius: 10px; background: #11161d; }
.eqrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 54px; align-items: center; gap: 12px; font-size: .88rem; color: #cbd5e1; }
.eqrow span { text-align: right; color: #9fabb9; font-variant-numeric: tabular-nums; }
#tabEq > .cfgacts { margin-top: 4px; }

/* Boletines: la cadena arriba; con la SER, una tarjeta por boletín (interruptor y, si hay dos duraciones, Portada o Tramo completo); con otra, filas Inicio-Fin */
#newsSel { flex: 1 1 160px; min-width: 0; }
.nlist { display: flex; flex-direction: column; gap: 8px; }
.nrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 10px; background: #1f2632; }
.ntext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntext b { font-size: .9rem; font-weight: 650; color: #edf2f7; }
.ntext span { font-size: .78rem; color: #8c98a8; font-variant-numeric: tabular-nums; }
.nrow.off .ntext { opacity: .55; }
.nseg { grid-column: 1 / -1; display: flex; gap: 6px; }
.nseg button { flex: 1 1 0; padding: 6px 8px; font-size: .8rem; color: #cbd5e1; background: #2a3441; }
.nseg button.active { color: var(--on-accent); background: var(--accent); }
.nrow.off .nseg button.active { color: #edf2f7; background: #3a4554; }
.nseg .nshort { display: none; }
@media (max-width: 440px) { .nseg .nlong { display: none; } .nseg .nshort { display: inline; } }
.nhead, .nrow.own { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px; gap: 10px; }
.nhead { padding: 0 2px; font-size: .76rem; color: #8c98a8; }
.nrow.own { padding: 0; background: none; }
.nrow.own .ntime { width: 100%; min-width: 0; padding: 9px 10px; box-sizing: border-box; border-radius: 8px; border: 1px solid #303a47; background: #11161d; color: #edf2f7; font: inherit; font-size: .95rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ndel { width: 38px; height: 38px; padding: 0; color: #ff8a8a; background: #3a2227; }
.ndel[hidden] { display: block; visibility: hidden; }
.nadd { flex: none; padding: 10px; color: #cbd5e1; background: none; box-shadow: inset 0 0 0 1px #3a4554; }
.nadd[hidden] { display: none; }
/* En un servidor extra, Boletines se ve apagado y con el aviso */
.nlock { padding: 10px 12px; border-radius: 10px; background: #2a2416; color: #f2d58a; font-size: .86rem; line-height: 1.35; }
.nlock[hidden] { display: none; }
#tabNews.locked .clockrow, #tabNews.locked .nlist, #tabNews.locked .nadd { opacity: .45; }

/* ====================================================
   == PANTALLAS GRANDES (PC): DOS PANELES Y LUZ DE FONDO ==
   ==================================================== */
/* Por debajo de este tamaño (móvil, tableta en vertical, ventanas bajas) los contenedores de los paneles no cuentan para la maqueta y todo queda
   en una columna, como siempre. La misma condición está en ui.js (DESK_MQ) */
.panes, .pane, .pscroll { display: contents; }
.psize, .sepclk, #bgGlow { display: none; }
body.no-config .psize, body.no-config #logGroup { display: none; }   /* sin ajustes: ni tamaño de las presintonías ni registro */

/* ===== MATERIAL DESIGN (ajuste "Material Design"; la clase html.material, en PC y en móvil) =====
   Sonando, la cabecera toma el color de énfasis (--tint) y lo de abajo se tiñe de su familia: los tonos salen del propio color de la cabecera (--hfull)
   con colores relativos de OKLCH, definidos una vez aquí y usados por las reglas de más abajo (sin esa función, los de reserva son blanco y el énfasis tal cual).
   ui.js calcula con el mismo L y croma (panelTone) el tono de las barras del EQ */
.subtitle, .ibtn, .bar .sbtn { transition: color .6s ease; }
@media not all and (min-width: 1024px) and (min-height: 600px) { .pc-only { display: none; } }   /* "Color de fondo" (la luz de abajo) es solo de PC */
@supports (color: oklch(from red l c h)) {
  html.material body {
    --tx1: oklch(from var(--accent) .95 calc(c * .4) h);   /* blanco suave: la cabecera y la presintonía activa, que tienen fondo de color */
    --tx2: oklch(from var(--accent) .92 calc(c * .8) h);   /* blanco teñido: el resto de lo blanco (ajustes) */
    --t-pan: oklch(from var(--hfull) .68 calc(c * 1.6) h);   /* los tres paneles negros (RDS, EQ, volúmenes): todo en este tono */
    --t-sub: oklch(from var(--hfull) .64 calc(c * 1.5) h);   /* presintonías, títulos, buscador y boletines */
    --t-frq: oklch(from var(--hfull) .56 calc(c * 1.4) h);   /* frecuencias de las presintonías */
    --t-act: oklch(from var(--hfull) calc(l + .08) calc(c * 1.25) h);   /* fondo de la presintonía activa: más claro que la cabecera para destacar */
  }
  html.material .vols input[type="range"] { --rng: var(--t-pan); }
}
html.material body, html.material dialog.settings { color: var(--tx2, #edf2f7); }
html.material header h1, html.material.playing .subtitle, html.material.playing .ibtn, html.material.playing .bar .sbtn,
html.material.playing #playBtn[data-state], html.material.playing .mini, html.material.playing .mini[data-state] { color: var(--tx1, #fff); }
html.material .now .ps, html.material .eq-label, html.material .pres-open, html.material .vols label, html.material .vols span,
html.material .panel.search input, html.material .panel.search .badge { color: var(--t-pan, var(--accent)); }
html.material .ptitle, html.material .panel .info b, html.material .panel.search input::placeholder, html.material .mbar,
html.material .preset:not(.recoff):not(.active), html.material .preset:not(.recoff):not(.active) .pn { color: var(--t-sub, var(--accent)); }
html.material .preset:not(.recoff):not(.active) .pf { color: var(--t-frq, var(--accent)); }
html.material .preset.active { background: var(--t-act, color-mix(in srgb, var(--acc-raw) var(--tint), var(--hdr))); color: var(--tx1, #fff); }
html.material .preset.active .pn { color: var(--tx1, #fff); }
html.material .preset.active .pf { color: color-mix(in srgb, var(--tx1, #fff) 80%, transparent); }

/* Texto sobre un fondo de énfasis (botón principal de las ventanas, modos activos del EQ y de boletines): claro si el énfasis es oscuro, oscuro si es claro */
@supports (color: oklch(from red l c h)) {
  body { --on-txt: oklch(from var(--accent) clamp(.1, (.62 - l) * 1000, .97) calc(c * .25) h); }
  .dlg-actions .primary, .eqmodes button.active, .nseg button.active { color: var(--on-txt); }
}

@media (min-width: 1024px) and (min-height: 600px) {
  /* --dw: ancho del contenido (del inicio del panel 1 al final del panel 2), el mismo para la cabecera; con el panel de presintonías pequeño, los dos paneles miden igual */
  :root { --hdr: #262d37; --hf: 114px; --dw: min(1160px, calc(100vw - 64px)); }
  html.psmall { --dw: min(962px, calc(100vw - 64px)); }
  html, body { background: #0c1015; }
  main { position: relative; z-index: 1; width: var(--dw); padding-inline: 0; }
  /* La página no se desplaza: solo el panel de las frecuencias. Si falta alto, primero se recorta el pie y, como último recurso, el panel 1 se desplaza por dentro */
  .scroller { display: flex; flex-direction: column; overflow: hidden; margin-inline: -32px; padding-inline: 32px; padding-bottom: 16px; }   /* margen extra: sitio para la sombra de los paneles */
  .scroller > * { flex: none; }
  html.pane-anim main, html.pane-anim .hin { transition: width .35s ease; }   /* solo al cambiar de tamaño con el botón, no al cargar */

  /* Cabecera fija en una sola fila (no se encoge con el scroll): título a la izquierda y la barra a la derecha con Reproducir, el reloj (sin píldora,
     en el fondo de la barra; ui.js lo mueve aquí), el servidor y los botones de tamaño de las presintonías y ajustes */
  .hin { display: flex; align-items: center; gap: 24px; width: var(--dw); height: var(--hf); padding: 0; }
  .scroller { -webkit-mask-image: none; mask-image: none; }
  .mini { display: none; }
  .hrow { flex: 1 1 auto; min-width: 0; min-height: 0; margin: 0; justify-content: flex-start; }
  .bar { background: #1d242d; box-shadow: none; border-radius: 12px; }
  .sep { background: rgba(255, 255, 255, .09); }
  .bar { flex: 0 0 auto; width: 540px; margin: 0; }
  .bar #playBtn { flex: 1 1 0; }   /* Reproducir, reloj y servidor miden lo mismo; los dos botones, a su tamaño */
  .bar .sbtn { padding: 0; }   /* sin relleno (cuenta en la medida mínima): así el servidor mide lo mismo que Reproducir y el reloj */
  .bar .status { flex: 1 1 0; justify-content: center; margin: 0; padding: 0; border-radius: 0; background: none; }   /* el reloj, con aire a los dos lados como Reproducir: se reparten el hueco a partes iguales */
  .bar .psize { display: flex; }
  .bar .sepclk { display: block; }

  /* Los dos paneles: fondo, marco y sombra; el 2 mide lo mismo de alto que el 1 y se desplaza por dentro */
  .scroller > .panes { display: grid; flex: 0 1 auto; min-height: 0; grid-template-columns: 470px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 22px; margin-top: 26px; }
  .pane { position: relative; display: block; box-sizing: border-box; padding: 20px; border: 1px solid transparent; border-radius: 18px; background: #1a2029; box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
  .pane1 { min-height: 0; overflow-y: auto; scrollbar-width: none; }
  .pane1::-webkit-scrollbar { display: none; }
  .pane1 > .now { margin-top: 0; }
  .pane2 { height: 0; min-height: 100%; padding: 0; overflow: hidden; }
  .pane2 .pscroll { display: block; height: 100%; box-sizing: border-box; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }   /* barra propia de 6 px (con la fina del sistema, más ancha, cabían 4 columnas en vez de 5); scrollbar-color o scrollbar-width la anularían en Chrome */
  @supports not selector(::-webkit-scrollbar) { .pane2 .pscroll { scrollbar-width: thin; scrollbar-color: #3a4554 transparent; } }
  .pane2 .pscroll::-webkit-scrollbar { width: 6px; }
  .pane2 .pscroll::-webkit-scrollbar-thumb { background: #3a4554; border-radius: 3px; }
  .pane2 .ptitle-main { margin-top: 0; }
  /* Botón de tamaño de las presintonías (en la barra): flechas hacia dentro para reducir y hacia fuera para ampliar */
  .psize .pz-out, html.psmall .psize .pz-in { display: none; }
  html.psmall .psize .pz-out { display: inline; }
  .scroller > .foot { flex: 0 100000 auto; min-height: 0; overflow: hidden; margin-top: 0; }
  .scroller > .foot::before { content: ''; display: block; height: 34px; }   /* el hueco hasta los paneles va dentro del pie: si se recorta, se va con él */
  /* Si el pie no cabe entero (ventanas bajas, lo decide ui.js): todo en una línea, con la letra más ligera y más cerca de los paneles */
  .scroller > .foot.compact { font-size: .86rem; white-space: nowrap; }
  .scroller > .foot.compact::before { height: 14px; }
  .foot.compact .love { display: inline-grid; vertical-align: bottom; margin-bottom: 0; font-size: inherit; font-weight: 400; color: inherit; }
  .foot.compact .fsub { display: inline; }
  .foot.compact .love:not(:empty) ~ .fsub:not(:empty)::before { content: '•'; margin: 0 .4em; opacity: .6; }

  /* Luz desde abajo: las barras del ecualizador en un lienzo pequeño, estirado y muy difuminado, detrás de todo (glow.js) */
  #bgGlow { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 0; width: 100%; height: 62vh; pointer-events: none; filter: blur(34px); opacity: .55; }
  #bgGlow[hidden] { display: none; }
}
