/* GadeSonic · hoja de estilos única.
   1. Tokens (espaciado, tipografía, radios, sombras) y tres juegos de color:
      web pública (oscuro por defecto, lo sobrescribe /brand.css), panel claro
      y panel oscuro (manual con data-theme o automático según el sistema).
   2. Base · 3. Componentes · 4. Web pública · 5. Panel · 6. Plataforma y landing ·
   7. Precios, legal y cookies.
   Todos los pares texto/fondo cumplen WCAG 2.2 AA (≥4.5:1; bordes de controles ≥3:1). */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
  /* Espaciado (base 4 px) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.25rem; --s-6: 1.5rem; --s-7: 2rem; --s-8: 3rem; --s-9: 4rem;
  --gutter: clamp(1rem, 3.5vw, 2rem);
  --maxw: 1120px;
  /* Tipografía */
  --fs-xs: .8rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: clamp(1.15rem, 1.05rem + .4vw, 1.3rem);
  --fs-2xl: clamp(1.55rem, 1.3rem + 1.1vw, 2rem);
  --fs-3xl: clamp(2.1rem, 1.5rem + 3vw, 3.5rem);
  /* Radios y sombras */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  --radius: var(--r-lg);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .25);
  --shadow: 0 1px 2px rgb(0 0 0 / .2), 0 6px 18px rgb(0 0 0 / .18);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / .4);
  --ease: 150ms ease;
  /* Web pública por defecto (tema «Noche»). /brand.css lo sustituye. */
  --bg: #10141f; --surface: #1a1f2c; --surface-2: #232938; --border: #333a4c; --control: #6b7489;
  --text: #eef0f5; --muted: #a9b0c2;
  --accent: #ffb347; --accent-ink: #101010; --link: #ffb347;
  --danger: #ff6b6b; --danger-ink: #101010; --danger-text: #ff8a8a;
  --ok: #6ee7a8; --ok-ink: #06210f;
  --input-bg: var(--bg);
  color-scheme: dark;
}

/* Panel y plataforma: claro */
body.admin, body.platform {
  --bg: #f5f6fb; --surface: #ffffff; --surface-2: #eceef7; --border: #dde1ec; --control: #868da3;
  --text: #161a26; --muted: #525a6f;
  --accent: #4338ca; --accent-ink: #ffffff; --link: #4338ca;
  --danger: #b42318; --danger-ink: #ffffff; --danger-text: #b42318;
  --ok: #067647; --ok-ink: #ffffff;
  --input-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgb(22 26 38 / .06);
  --shadow: 0 1px 2px rgb(22 26 38 / .05), 0 4px 16px rgb(22 26 38 / .06);
  --shadow-lg: 0 12px 32px rgb(22 26 38 / .16);
  color-scheme: light;
}

/* Panel y plataforma: oscuro (elegido o automático). Mantener ambos bloques iguales. */
html[data-theme="dark"] body.admin, html[data-theme="dark"] body.platform {
  --bg: #0f1320; --surface: #171c2b; --surface-2: #212839; --border: #2c3448; --control: #707a96;
  --text: #e8ebf3; --muted: #a3abbd;
  --accent: #a5b4fc; --accent-ink: #10121c; --link: #a5b4fc;
  --danger: #ff8a80; --danger-ink: #1a0505; --danger-text: #ff9b92;
  --ok: #4ade80; --ok-ink: #04210f;
  --input-bg: #0f1320;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 18px rgb(0 0 0 / .25);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body.admin, html:not([data-theme="light"]) body.platform {
    --bg: #0f1320; --surface: #171c2b; --surface-2: #212839; --border: #2c3448; --control: #707a96;
    --text: #e8ebf3; --muted: #a3abbd;
    --accent: #a5b4fc; --accent-ink: #10121c; --link: #a5b4fc;
    --danger: #ff8a80; --danger-ink: #1a0505; --danger-text: #ff9b92;
    --ok: #4ade80; --ok-ink: #04210f;
    --input-bg: #0f1320;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 18px rgb(0 0 0 / .25);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 var(--fs-md)/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; transition: color var(--ease); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: var(--r-sm); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s-3); font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); letter-spacing: -.015em; }
h2 { font-size: var(--fs-xl); letter-spacing: -.01em; }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--s-4); }
code { background: var(--surface-2); padding: .1em .4em; border-radius: var(--r-sm); font-size: .9em; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: var(--s-2) var(--s-4); border-radius: var(--r-md); z-index: 100; font-weight: 600; }
.skip:focus { left: var(--s-4); top: var(--s-4); }
.muted { color: var(--muted); }
.small-text { font-size: var(--fs-sm); }
.warn { color: var(--danger-text); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 3. Componentes */
/* Contenedor y tarjetas */
.container { max-width: var(--maxw); margin: 0 auto; padding: var(--s-7) var(--gutter) var(--s-9); }
.container > h1 + p.muted, .container > h1 + p { margin-top: calc(-1 * var(--s-1)); }
.container > p.muted { max-width: 70ch; margin-bottom: var(--s-6); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-6); margin: 0 0 var(--s-6); box-shadow: var(--shadow-sm);
}
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-bottom: var(--s-4); }
.card h3:not(:first-child) { margin-top: var(--s-6); }
.card.narrow { max-width: 440px; margin: var(--s-8) auto; padding: var(--s-7); box-shadow: var(--shadow); }
.card.highlight { border: 2px solid var(--accent); }
/* Grupos de una página (DJs: Directo / Perfiles): un bloque vertical por tarea, separado del siguiente. */
.stack + .stack { margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--border); }
/* Anclas del panel (#directo, #perfiles, #perfil…): la barra superior fija no tapa el destino. */
#main [id] { scroll-margin-top: calc(var(--topbar-h, 64px) + var(--s-4)); }
.stack .card > h3:first-child { margin-bottom: var(--s-4); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s-6); margin: 0 0 var(--s-6); }
.grid > .card { margin: 0; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-6); }
.page-head h1 { margin: 0; }
.big { font-size: 1.35rem; font-weight: 700; margin: 0 0 var(--s-1); overflow-wrap: anywhere; }

/* Avisos y etiquetas */
.flash {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); border-left: 4px solid var(--accent);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md); margin: 0 0 var(--s-6);
}
.flash.warn { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); border-left-color: var(--danger); color: var(--text); }
.badge {
  display: inline-flex; align-items: center; gap: .4em; background: var(--danger); color: var(--danger-ink);
  font-weight: 700; font-size: var(--fs-xs); letter-spacing: .08em; padding: .25em .7em; border-radius: var(--r-pill); margin: 0 0 var(--s-2);
}
.badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badge-ok { display: inline-block; background: var(--ok); color: var(--ok-ink); font-weight: 700; font-size: var(--fs-xs); padding: .2em .65em; border-radius: var(--r-pill); }

/* Formularios */
input, select, textarea, button { font: inherit; color: inherit; }
.form { display: grid; gap: var(--s-4); }
.form label, .inline-form label { display: grid; gap: var(--s-2); font-weight: 600; font-size: .95rem; }
.form-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: flex-end; }
.inline-form > label { flex: 0 1 16rem; }
.inline-form > label.grow { flex: 1 1 16rem; max-width: 28rem; }
.inline-form > label:has(select), .inline-form > label:has(input[type=time]) { flex: 1 0 8rem; max-width: 12rem; }
.inline-form input, .inline-form select { width: 100%; }
label.inline { display: inline-flex; gap: var(--s-2); align-items: center; margin: 0 var(--s-4) 0 0; font-weight: 400; min-height: 32px; cursor: pointer; }
fieldset { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-3) var(--s-4) var(--s-4); margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 var(--s-2); margin-left: calc(-1 * var(--s-2)); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
  background: var(--input-bg); border: 1px solid var(--control); border-radius: var(--r-md);
  padding: .55rem .75rem; min-height: 44px; width: 100%; font-weight: 400;
  transition: border-color var(--ease), box-shadow var(--ease);
}
textarea { resize: vertical; line-height: 1.5; }
textarea[readonly] { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-sm); background: var(--surface-2); }
::placeholder { color: var(--muted); opacity: 1; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 30%, transparent); outline: none;
}
input[type=checkbox], input[type=radio], input[type=range], progress { accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: 1.1rem; height: 1.1rem; margin: 0; }
input[type=color] { width: 100%; min-width: 4.5rem; height: 44px; padding: 3px; border: 1px solid var(--control); border-radius: var(--r-md); background: var(--input-bg); cursor: pointer; }
input[type=file] { font-weight: 400; font-size: var(--fs-sm); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: var(--s-3); padding: .45rem .9rem; border-radius: var(--r-md); border: 1px solid var(--control); background: var(--surface-2); color: var(--text); cursor: pointer; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.narrow-input { width: 5.5rem !important; }
.checklist { display: grid; gap: var(--s-1); max-height: 420px; overflow: auto; }
.row-form { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.row-form input { flex: 1 1 180px; }
.row-form select { width: auto; flex: 0 1 auto; }
.row-form + .row-form { margin-top: var(--s-2); }

/* Panel: campos con ancho contenido y, fuera del móvil, varios por fila. Ocupan
   la fila entera los bloques (textos largos, grupos, zonas, acciones). */
body.admin .form:not(.inline-form):not(.plan-request):not(#brand-form) { max-width: 52rem; }
@media (min-width: 640px) {
  body.admin .form:not(.inline-form):not(.plan-request) { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); align-items: end; }
  body.admin .form:not(.inline-form):not(.plan-request) > :not(label), body.admin .form > label:has(textarea), body.admin .form > label.inline, body.admin .form > .full { grid-column: 1 / -1; }
}
@media (min-width: 640px) { body.admin .form:not(.inline-form):not(.plan-request) > label:has(input[type=file]) { grid-column: span 2; } }
fieldset .row-form:has(input[type=url]) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.import-form { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--border); }
select.compact { width: auto; max-width: 14rem; min-height: 36px; padding-block: .3rem; }
/* Botones */
button, .btn, .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: var(--r-md);
  padding: 0 1.1rem; min-height: 44px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: filter var(--ease), transform 50ms, background-color var(--ease), box-shadow var(--ease);
}
button:hover, .btn:hover, .cta:hover { filter: brightness(1.07) saturate(1.05); }
button:active, .btn:active, .cta:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: progress; }
body[data-demo] #main button:disabled, body[data-demo] #main input:disabled, body[data-demo] #main [aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
form > button, .form > button { justify-self: start; }
button.danger { background: var(--danger); color: var(--danger-ink); }
button.small, .btn.small { min-height: 36px; padding: 0 .8rem; font-size: var(--fs-sm); }
.btn.secondary, button.secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn:focus-within { outline: 3px solid var(--link); outline-offset: 2px; }
.btn-link, button.btn-link {
.form label.btn { display: inline-flex; width: auto; font-size: 1rem; }
  background: none; color: var(--link); border: 0; padding: var(--s-1) var(--s-2); min-height: 36px;
  text-decoration: underline; text-underline-offset: .18em; font-weight: 500;
}
.btn-link:hover { filter: none; text-decoration-thickness: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-4); }
.actions:first-child { margin-top: 0; }
td.actions, li .actions { margin: 0; }
form.inline { display: inline; }

/* Tablas y listas */
.inline-form + .table-wrap, .inline-form + table { margin-top: var(--s-5); }
.table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--s-2)); padding: 0 var(--s-2); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; border-bottom-width: 2px; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr { transition: background-color var(--ease); }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); min-height: 52px; }
.list li:last-child { border-bottom: 0; }
.pager { display: flex; gap: var(--s-4); justify-content: center; align-items: center; margin-top: var(--s-6); }
/* Biblioteca de música: barra de acciones fija al bajar y filas compactas */
.bulkbar { position: sticky; top: var(--topbar-h, 64px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: var(--s-5) calc(-1 * var(--s-2)) var(--s-2); padding: var(--s-2); background: var(--surface); border-bottom: 1px solid var(--border); }
.bulk-sep { flex: 1 1 0; }
.tracks td.sel, .tracks th.sel { width: 2rem; }
.track-fields { display: grid; gap: var(--s-2); grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); max-width: 40rem; }
.track-fields input:not([type=checkbox]) { min-height: 38px; padding-block: .35rem; }
.tracks tr.dirty td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  .track-fields { grid-template-columns: 1fr; }
  fieldset .row-form:has(input[type=url]) { grid-template-columns: 1fr 1fr; }
  .tracks thead tr { display: flex; }
  .tracks thead th:not(.sel) { display: none; }
  .tracks thead .sel-label { position: static !important; width: auto; height: auto; margin: 0 0 0 var(--s-2); clip: auto; overflow: visible; font-size: var(--fs-sm); color: var(--text); text-transform: none; letter-spacing: 0; order: 2; }
  .tracks thead th.sel { width: auto; display: flex; align-items: center; }
  .tracks tbody tr { display: grid; grid-template-columns: 2rem auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
  .tracks tbody td { border: 0; padding: 0; }
  .tracks tbody td:nth-child(1) { align-self: start; padding-top: .6rem; }
  .tracks tbody td:nth-child(2) { grid-column: 2 / -1; }
  .tracks tbody td:nth-child(3), .tracks tbody td:nth-child(4) { grid-row: 2; color: var(--muted); font-size: var(--fs-sm); }
  .tracks tbody td:nth-child(3) { grid-column: 2; }
  .tracks tbody td:nth-child(4) { grid-column: 3; }
  .tracks tbody td:nth-child(5) { grid-column: 4; grid-row: 2; }
  .tracks tbody td[colspan] { grid-column: 1 / -1; }
}
.flash.toast { position: fixed; left: 50%; bottom: var(--s-5); transform: translateX(-50%); z-index: 60; margin: 0; box-shadow: var(--shadow-lg); max-width: calc(100vw - 2rem); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); margin: 0; }
.stats > div { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); }
.stats dt { color: var(--muted); font-size: var(--fs-sm); }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.aud-chart { margin: var(--s-4) 0 var(--s-2); }
.aud-chart svg { display: block; width: 100%; height: 7rem; background: var(--surface-2); border-radius: var(--r-sm); }
.aud-chart rect { fill: var(--accent); }
.aud-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-top: var(--s-1); }
progress { width: 100%; height: .75rem; border-radius: var(--r-pill); overflow: hidden; }
details summary { cursor: pointer; }

/* Selector de tema (panel y plataforma) */
.theme-toggle { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: var(--r-pill); width: 40px; min-height: 40px; height: 40px; padding: 0; font-size: 1.05rem; }
.theme-toggle:hover { background: var(--surface-2); filter: none; }
.theme-toggle::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 3a9 9 0 0 1 0 18z'/%3E%3C/svg%3E"); }
.theme-toggle[data-mode="light"]::before { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.theme-toggle[data-mode="dark"]::before { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- 4. Web pública */
/* Una columna en móvil; en escritorio, emisión a la izquierda y la radio (programación, DJs…) a la derecha. */
.player-page { max-width: 680px; margin: 0 auto; padding: var(--s-7) var(--gutter) var(--s-9); }
.player-page.station { max-width: 1080px; }
.player-page h2 { font-size: var(--fs-lg); margin-bottom: var(--s-4); }
.station-grid { display: grid; gap: var(--s-7); grid-template-columns: minmax(0, 1fr); }
.station-main, .station-side { display: grid; gap: var(--s-7); align-content: start; min-width: 0; }
.station-main > *, .station-side > * { margin: 0; }
@media (min-width: 960px) {
  .station-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
}
.brand { display: flex; gap: var(--s-4) var(--s-5); align-items: center; margin-bottom: var(--s-7); }
.brand h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin: 0; overflow-wrap: anywhere; letter-spacing: -.02em; }
.brand-logo { flex: none; height: clamp(56px, 8vw, 80px); width: auto; max-width: min(45vw, 240px); object-fit: contain; object-position: left center; border-radius: var(--r-md); }
.brand-logo-default { width: clamp(56px, 8vw, 80px); border-radius: var(--r-lg); background: var(--surface); }
.tagline { margin: var(--s-1) 0 0; color: var(--muted); max-width: 60ch; }
.back { margin-bottom: var(--s-6); font-size: var(--fs-sm); }

/* Reproductor principal: botón, lo que suena y la cola (antes, después, próximo directo). */
.player {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: clamp(var(--s-5), 3vw, var(--s-7));
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4) var(--s-5); align-items: center; box-shadow: var(--shadow);
}
.play { width: 88px; height: 88px; min-height: 88px; border-radius: 50%; padding: 0; display: grid; place-items: center; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.play:focus-visible { outline-offset: 4px; border-radius: 50%; }
.play .icon { width: 0; height: 0; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent var(--accent-ink); margin-left: 6px; }
.play[aria-pressed="true"] .icon { width: 24px; height: 28px; border: 0; margin: 0; background: linear-gradient(90deg, var(--accent-ink) 0 35%, transparent 35% 65%, var(--accent-ink) 65%); }
.np { min-width: 0; }
.np p { margin: 0; }
.np-kicker { display: flex; align-items: center; gap: var(--s-2); min-height: 1.5em; margin-bottom: var(--s-1) !important; }
.np-kicker .badge { margin: 0; }
.np-label { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.np-title { font-size: var(--fs-xl); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.np-artist { color: var(--muted); overflow-wrap: anywhere; margin-top: var(--s-1) !important; }
.volume { grid-column: 1 / -1; display: block; }
.volume input { width: 100%; }
.status { grid-column: 1 / -1; margin: 0; color: var(--muted); min-height: 1.5em; font-size: var(--fs-sm); }
.status:empty { display: none; }
.queue { grid-column: 1 / -1; display: grid; gap: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.queue:not(:has(> :not([hidden]))) { display: none; }
.q-row { display: grid; grid-template-columns: 8.75rem minmax(0, 1fr); gap: var(--s-3); align-items: baseline; margin: 0; }
.q-label { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.q-track, .q-list li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); min-width: 0; }
.q-show strong { font-weight: 600; }

/* Historial y programación */
.history ol { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; justify-content: space-between; gap: var(--s-4); align-items: baseline; padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
.history li:last-child { border-bottom: 0; }
.h-main { min-width: 0; overflow-wrap: anywhere; }
.h-artist { color: var(--muted); }
.h-time { flex: none; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.h-time:empty { display: none; }
.sch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.sch-item { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); line-height: 1.35; }
.sch-item.now { border-color: var(--accent); }
.sch-when { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.sch-hours { font-weight: 400; font-variant-numeric: tabular-nums; }
.sch-what { min-width: 0; overflow-wrap: anywhere; }
.sch-more { margin-top: var(--s-3); width: 100%; }

/* DJs: avatar redondo de proporción fija (la foto se recorta, nunca se deforma) */
.avatar { display: block; flex: none; width: 80px; height: 80px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.avatar-empty { display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 1.6rem; }
.dj-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: var(--s-3); }
.dj-card { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); height: 100%; padding: var(--s-4) var(--s-3); text-align: center; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); transition: border-color var(--ease), transform var(--ease); }
.dj-card:hover { border-color: var(--link); transform: translateY(-2px); }
.dj-name { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.dj { text-align: center; }
.dj-photo { display: block; width: min(240px, 70vw); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin: 0 auto var(--s-5); box-shadow: var(--shadow); background: var(--surface-2); }
span.dj-photo { display: grid; place-items: center; font-size: 4rem; font-weight: 700; color: var(--muted); }
.dj .links { justify-content: center; margin-top: var(--s-5); }
.dj .bio { margin-inline: auto; }
.dj-thumb { width: 64px; height: 64px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; flex: none; }

.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); text-decoration: none; font-weight: 600; transition: background-color var(--ease), border-color var(--ease); }
.links a:hover { background: var(--surface-2); border-color: var(--link); }
.bio { white-space: pre-line; overflow-wrap: anywhere; max-width: 65ch; }
.stations { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: var(--s-3); }
.stations li.card { margin: 0; padding: var(--s-4); }
.stations li > a { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; font-weight: 600; }
.stations li p { margin: var(--s-1) 0 0; }
.install { text-align: center; }
.install p { margin-top: var(--s-2); }
.station-side .install { text-align: left; }
.foot { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-sm); }
.foot p { margin: 0 0 var(--s-2); }

/* Reproductor incrustable (/embed): ocupa todo el iframe y se adapta a su tamaño
   (container queries). Diseños: barra (bar), tarjeta (card) y mini. */
body.is-embed { min-height: 0; background: var(--bg); overflow: hidden; }
.embed { height: 100vh; container-type: size; }
.eplayer { height: 100%; display: grid; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-4); }
.eplayer .np { min-width: 0; }
.eplayer .np p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-station { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.e-station .badge { margin: 0; padding: .1em .55em; font-size: .65rem; }
.e-name { overflow: hidden; text-overflow: ellipsis; }
.eplayer .np-title { font-size: var(--fs-md); line-height: 1.3; }
.eplayer .np-artist { font-size: var(--fs-sm); margin-top: 0 !important; }
.eplayer .status { font-size: var(--fs-xs); min-height: 0; }
.e-logo { display: block; flex: none; border-radius: var(--r-md); overflow: hidden; }
.e-logo img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.eplayer .play { width: 52px; height: 52px; min-height: 52px; box-shadow: none; }
.eplayer .play .icon { border-width: 10px 0 10px 16px; margin-left: 4px; }
.eplayer .play[aria-pressed="true"] .icon { width: 15px; height: 18px; margin: 0; }
.eplayer .volume { grid-column: auto; }
.e-next { margin: 0; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Barra: [logo] [▶] [texto] [volumen] */
.embed-bar .eplayer { grid-template-columns: auto auto minmax(0, 1fr) 7rem; }
.embed-bar .e-logo { width: 56px; height: 56px; }
.embed-bar .eplayer:not(:has(.e-logo)) { grid-template-columns: auto minmax(0, 1fr) 7rem; }
@container (max-width: 460px) {
  .embed-bar .eplayer { grid-template-columns: auto auto minmax(0, 1fr); }
  .embed-bar .eplayer:not(:has(.e-logo)) { grid-template-columns: auto minmax(0, 1fr); }
  .embed-bar .volume { display: none; }
}
@container (max-width: 300px) {
  .embed-bar .e-logo { display: none; }
  .embed-bar .eplayer { grid-template-columns: auto minmax(0, 1fr); }
}
/* Mini: [▶] [título en una línea] */
.embed-mini .eplayer { grid-template-columns: auto auto minmax(0, 1fr); padding: var(--s-1) var(--s-3); gap: var(--s-3); }
.embed-mini .eplayer:not(:has(.e-logo)) { grid-template-columns: auto minmax(0, 1fr); }
.embed-mini .e-logo { width: 36px; height: 36px; border-radius: var(--r-sm); }
.embed-mini .play { width: 40px; height: 40px; min-height: 40px; }
.embed-mini .play .icon { border-width: 8px 0 8px 13px; margin-left: 3px; }
.embed-mini .play[aria-pressed="true"] .icon { width: 12px; height: 14px; }
.embed-mini .e-station, .embed-mini .np-artist { display: none; }
.embed-mini .np-title { font-size: var(--fs-sm); }
/* Tarjeta: logo grande, texto centrado, botón y volumen */
.embed-card .eplayer { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; align-content: center; padding: var(--s-5); gap: var(--s-3); }
.embed-card .e-logo { width: min(40cqw, 34cqh, 150px); height: min(40cqw, 34cqh, 150px); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.embed-card .np { width: 100%; }
.embed-card .e-station { justify-content: center; }
.embed-card .np-title { font-size: var(--fs-lg); }
.embed-card .play { width: 60px; height: 60px; min-height: 60px; }
.embed-card .volume, .embed-card .e-next { width: 100%; max-width: 18rem; }
@container (max-height: 300px) { .embed-card .e-logo { display: none; } }
/* Barra fija del reproductor: sigue sonando al navegar (nav.js cambia solo <main>). */
body.has-dock { --dock-h: 72px; padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom)); }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; min-height: var(--dock-h);
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) max(var(--gutter), calc((100% - 1080px) / 2 + var(--gutter))) calc(var(--s-2) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--border); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.dock .play { flex: none; width: 48px; height: 48px; min-height: 48px; box-shadow: none; }
.dock .play .icon { border-width: 9px 0 9px 15px; margin-left: 4px; }
.dock .play[aria-pressed="true"] .icon { width: 14px; height: 16px; margin: 0; }
.dock-logo { flex: none; width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); }
.dock .np { flex: 1; }
.dock .np p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .np-title { font-size: var(--fs-md); line-height: 1.3; }
.dock .np-artist, .dock .status { font-size: var(--fs-sm); margin-top: 0 !important; }
.dock .badge { margin: 0 0 2px; padding: .1em .55em; font-size: .65rem; }
.dock .badge[hidden] { display: none; }
.dock .volume { flex: 0 0 8rem; }
body.has-dock .consent { bottom: calc(var(--dock-h) + var(--s-4) + env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
  .dock .volume, .dock-logo { display: none; }
  body.has-dock .consent { bottom: calc(var(--dock-h) + var(--s-2) + env(safe-area-inset-bottom)); }
}

/* ---------------------------------------------------------------- 5. Panel */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-3) var(--s-5);
  min-height: 64px; padding: var(--s-2) max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.topbar .logo { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; color: var(--text); text-decoration: none; max-width: 16rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .logo img { height: 32px; width: auto; max-width: 112px; border-radius: var(--r-sm, 4px); object-fit: contain; flex: none; }
.topbar nav { display: flex; align-items: center; gap: var(--s-1); flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { flex: none; color: var(--text); text-decoration: none; padding: var(--s-2) var(--s-3); border-radius: var(--r-pill); font-size: .95rem; transition: background-color var(--ease), color var(--ease); }
.topbar nav a:hover { background: var(--surface-2); }
.topbar nav a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.topbar nav .ext { color: var(--muted); }
.topbar nav.nav-end { justify-content: flex-end; }
.login-theme { position: absolute; top: var(--s-4); right: var(--gutter); }
.top-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; flex: none; }
.top-actions form { margin: 0; }
.topbar .cta-small { display: inline-flex; align-items: center; min-height: 40px; background: var(--accent); color: var(--accent-ink); padding: 0 var(--s-4); border-radius: var(--r-pill); text-decoration: none; font-weight: 600; }
.topbar .cta-small:hover { filter: brightness(1.07); background: var(--accent); }
.subnav { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; margin: 0 0 var(--s-6); padding: var(--s-1); background: var(--surface-2); border-radius: var(--r-pill); width: fit-content; max-width: 100%; }
.subnav a { flex: none; white-space: nowrap; padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); text-decoration: none; color: var(--text); font-size: .95rem; transition: background-color var(--ease); }
.subnav a:hover { background: var(--surface); }
.subnav a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm), inset 0 -2px 0 var(--accent); }
/* Horarios y cuñas */
.pl-c0 { --pl: #6366f1; } .pl-c1 { --pl: #14b8a6; } .pl-c2 { --pl: #f59e0b; } .pl-c3 { --pl: #f43f5e; }
.pl-c4 { --pl: #0ea5e9; } .pl-c5 { --pl: #a855f7; } .pl-c6 { --pl: #84cc16; } .pl-c7 { --pl: #f97316; }
.sched-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-3) var(--s-6); margin-bottom: var(--s-5); }
.sched-head h1 { margin-bottom: var(--s-1); }
.sched-head p.muted { margin: 0; max-width: 46rem; }
.now-playing-pill { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: var(--fs-sm); }
.now-playing-pill .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ok); animation: pulse 1.6s ease-in-out infinite; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.card-head h2 { margin: 0; }
.card-head form { margin: 0; }
.tag { display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: .1em .55em; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); vertical-align: middle; text-transform: none; letter-spacing: 0; }
button.danger-ghost { background: transparent; color: var(--muted); border-color: transparent; min-width: 36px; padding: 0; }
button.danger-ghost:hover { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 10%, transparent); filter: none; }
.sched-empty { border: 1px dashed var(--accent); }
/* Reglas */
.rules { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.rule { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ico label" "ctl ctl" "help help"; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-4); background: var(--surface-2); border-radius: var(--r-lg); }
.rule-ico { grid-area: ico; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--surface); font-size: 1.25rem; }
.rule > label { grid-area: label; font-weight: 600; }
.rule > select, .rule > .input-suffix { grid-area: ctl; }
.rule-help { grid-area: help; margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.rule-help.warn { color: var(--danger-text); }
.rules-actions { grid-column: 1 / -1; }
.input-suffix { display: flex; align-items: center; gap: var(--s-2); }
.input-suffix input { max-width: 7rem; }
.input-suffix span { color: var(--muted); }
/* Leyenda */
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding: 0; margin: 0 0 var(--s-4); font-size: var(--fs-sm); }
.legend li { display: inline-flex; align-items: center; gap: var(--s-2); }
.sw { flex: none; display: inline-block; width: .9rem; height: .9rem; border-radius: 4px; background: var(--pl, var(--control)); }
.sw-def { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, var(--border) 3px 5px); border: 1px solid var(--border); }
/* Parrilla visual: solo en pantallas anchas y con JavaScript (admin.js la coloca) */
.timeline { display: none; }
.timeline { --tl-h: 600px; grid-template-columns: 3.25rem repeat(7, minmax(0, 1fr)); gap: 0 var(--s-1); }
.tl-hours { display: grid; grid-template-rows: repeat(8, 1fr); height: var(--tl-h); margin-top: 2.5rem; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-hours span { transform: translateY(-.6em); }
.tl-name { height: 2.5rem; display: flex; align-items: center; justify-content: center; gap: var(--s-1); font-size: var(--fs-sm); font-weight: 600; text-transform: capitalize; }
.tl-col {
  position: relative; height: var(--tl-h); border-radius: var(--r-md); overflow: hidden;
  background: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px calc(var(--tl-h) / 8)),
    repeating-linear-gradient(135deg, var(--surface-2) 0 6px, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 6px 12px);
}
.tl-day.today .tl-col { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.tl-slot {
  position: absolute; left: 3px; right: 3px; min-height: 0; padding: 4px 6px; margin: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; text-align: left;
  background: color-mix(in srgb, var(--pl) 22%, var(--surface)); color: var(--text); border: 0; border-left: 4px solid var(--pl);
  border-radius: 6px; font-size: var(--fs-xs); font-weight: 400; line-height: 1.25; box-shadow: 0 0 0 1px var(--surface);
}
.tl-slot:hover { filter: none; background: color-mix(in srgb, var(--pl) 34%, var(--surface)); }
.tl-slot:active { transform: none; }
.tl-slot strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tl-slot span { color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-slot.short { padding-block: 1px; justify-content: center; }
.tl-slot.short span { display: none; }
.tl-slot.tiny strong { display: none; }
.tl-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: -1px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
@media (min-width: 900px) {
  .timeline.is-ready { display: grid; }
  .timeline.is-ready + .agenda { display: none; }
}
/* Agenda por días (móvil y sin JavaScript) */
.agenda { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: var(--s-3); }
.ag-day { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); }
.ag-day.today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.ag-day h3 { font-size: var(--fs-sm); text-transform: capitalize; margin-bottom: var(--s-2); }
.ag-day ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.ag-slot { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); background: var(--surface); border-radius: var(--r-md); border-left: 4px solid var(--pl); font-size: var(--fs-sm); }
.ag-slot .sw { display: none; }
.ag-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s-2); }
.ag-time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-name { min-width: 0; overflow-wrap: break-word; }
.ag-slot form { margin: 0; }
.ag-free { padding: var(--s-2) 0; }
/* Editor de franjas */
.slot-editor { scroll-margin-top: calc(var(--topbar-h, 64px) + var(--s-4)); transition: box-shadow var(--ease); }
.slot-editor.editing { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.step { position: relative; padding-left: 3rem !important; }
.step-n { position: absolute; left: 0; top: .1rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--fs-sm); }
fieldset.step { border: 0; padding: 0; }
fieldset.step legend { padding: 0; margin: 0 0 var(--s-2); float: left; width: 100%; }
fieldset.step legend + * { clear: both; }
div.step > label { max-width: 24rem; }
.day-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.day-pill { position: relative; cursor: pointer; }
.day-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day-pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 6.5rem; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-pill); border: 1px solid var(--control); background: var(--surface); font-weight: 600; font-size: var(--fs-sm); text-transform: capitalize; transition: background-color var(--ease), border-color var(--ease); }
.day-pill:hover span { border-color: var(--accent); }
.day-pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-pill input:checked + span::before { content: "✓"; margin-right: var(--s-1); }
.day-pill input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.quick { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.times { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.times label { display: grid; gap: var(--s-1); font-weight: 600; font-size: var(--fs-sm); flex: 0 1 10rem; }
.slot-summary .hits { display: block; margin-top: var(--s-1); font-weight: 400; font-size: var(--fs-sm); }
.slot-summary { margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-left: 4px solid var(--accent); font-weight: 600; }
.slot-summary.has-hits { border-left-color: var(--danger); }
@media (max-width: 480px) {
  .day-pill span { min-width: 0; padding: 0 var(--s-3); }
  .step { padding-left: 0 !important; }
  .step-n { position: static; display: inline-grid; width: 1.6rem; height: 1.6rem; margin-bottom: var(--s-1); }
}
.plan-features { padding-left: 1.2rem; margin: var(--s-3) 0 var(--s-4); }
.plan-features li + li { margin-top: var(--s-1); }
.qr-img { background: #fff; padding: var(--s-2); border-radius: var(--r-md); border: 1px solid var(--border); display: block; }
.embed-preview { border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 720px; display: block; background: var(--bg); transition: height var(--ease), max-width var(--ease); }
.embed-stage { padding: var(--s-5); border-radius: var(--r-lg); background: repeating-conic-gradient(var(--surface-2) 0 25%, transparent 0 50%) 0 0 / 24px 24px; resize: horizontal; overflow: auto; max-width: 100%; min-width: 220px; }
.embed-builder { display: grid; gap: var(--s-4); margin-bottom: var(--s-4); }
.embed-opts { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); border: 0; padding: 0; margin: 0; }
.embed-opts legend { font-weight: 600; margin-bottom: var(--s-2); }
.embed-opt { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; margin: 0; }
.embed-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.embed-opt > span { display: grid; gap: 2px; }
.embed-row { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: end; }
.embed-row label { margin: 0; }
/* Compartir: tarjetas en dos columnas equilibradas sin huecos (cada una con su altura). */
.share-cols { columns: 2 22rem; column-gap: var(--s-6); margin: 0 0 var(--s-6); }
.share-cols > .card { break-inside: avoid; margin: 0 0 var(--s-6); }
.share-cols > .card:last-child { margin-bottom: 0; }
.share-qr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-bottom: var(--s-4); }
.share-qr .qr-img { width: 160px; height: 160px; flex: none; }
.share-links { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.share-links p { margin: 0 0 var(--s-2); }
.share-links p:last-child { margin-bottom: 0; }
.copy-row { display: flex; gap: var(--s-2); margin-top: var(--s-1); }
.copy-row input { flex: 1; min-width: 0; }
.copy-row button { flex: none; }
.logo-preview { height: 96px; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); padding: var(--s-1); display: block; }

/* Primeros pasos */
.checklist-card ol { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: var(--s-2); }
.checklist-card li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); }
.checklist-card li.done > span:not(.tick) { color: var(--muted); }
.checklist-card .tick { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--control); font-size: var(--fs-sm); background: var(--surface); }
.checklist-card li.done .tick { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); }
.checklist-card li a { margin-left: auto; font-weight: 600; white-space: nowrap; }

/* Subida de música */
.upload-opts { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: end; }
.upload-opts fieldset { flex: 0 1 auto; }
.upload-opts > label { flex: 0 1 18rem; }
.new-playlist { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: end; flex: 1 1 22rem; }
.new-playlist > label { flex: 1 1 14rem; }
.upload-opts > p { flex: 1 0 100%; margin: 0; }
.upload-opts > p:empty { display: none; }
.dropzone { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s-3); border: 2px dashed var(--control); border-radius: var(--radius); padding: var(--s-5) var(--s-4); text-align: center; transition: border-color var(--ease), background-color var(--ease); }
.dropzone > p { margin: 0 auto; flex: 1 0 100%; max-width: 46ch; }
.dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.uploader { position: fixed; right: var(--s-4); bottom: var(--s-4); width: min(380px, calc(100vw - 2rem)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; }
.up-head { display: flex; gap: var(--s-2); align-items: center; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.up-head #gs-up-toggle { flex: 1; justify-content: flex-start; text-align: left; text-decoration: none; color: var(--text); font-weight: 600; }
.up-list { list-style: none; margin: 0; padding: var(--s-1) var(--s-4) var(--s-2); max-height: 40vh; overflow-y: auto; }
.up-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s-1) var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.up-row:last-child { border-bottom: 0; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row progress { grid-column: 1 / -1; }

/* Marca: temas y vista previa */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); gap: var(--s-3); margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.preset { width: 100%; flex-direction: column; align-items: stretch; gap: var(--s-2); padding: var(--s-2); min-height: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-lg); font-weight: 600; text-align: left; }
.preset:hover { filter: none; border-color: var(--control); }
.preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.preset .sw { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 var(--s-3); border-radius: var(--r-md); background: var(--p-bg, var(--surface-2)); }
.preset .sw i { width: 20px; height: 20px; border-radius: 50%; background: var(--p-a, var(--accent)); box-shadow: 0 0 0 2px rgb(255 255 255 / .25); }
.preset .sw i + i { background: var(--p-b, var(--danger)); }
.preset span { padding: 0 var(--s-1) var(--s-1); }
/* Encuadre de fotos (crop.js): vista cuadrada con la máscara redonda del avatar */
.cropper { display: grid; gap: var(--s-3); justify-items: start; grid-column: 1 / -1; }
.cropper-title { margin: 0; font-weight: 600; }
.crop-view { position: relative; width: min(240px, 100%); aspect-ratio: 1; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2); cursor: grab; touch-action: none; user-select: none; }
.crop-view:active { cursor: grabbing; }
.crop-view img { position: absolute; max-width: none; height: auto; pointer-events: none; }
.crop-view::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at center, transparent 69.5%, rgb(0 0 0 / .5) 70.5%); box-shadow: inset 0 0 0 1px var(--border); }
.crop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.crop-tools label { display: flex; align-items: center; gap: var(--s-2); margin: 0; }
.crop-tools input[type=range] { width: 10rem; }
.brand-editor { display: grid; gap: var(--s-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .brand-editor { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: start; } }
.brand-preview { position: sticky; top: 88px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: var(--s-5); box-shadow: var(--shadow); }
.brand-preview .pv-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.brand-preview .pv-logo { height: 40px; width: auto; max-width: 140px; border-radius: var(--r-md); flex: none; object-fit: contain; }
.brand-preview .pv-name { font-weight: 700; font-size: var(--fs-lg); line-height: 1.2; overflow-wrap: anywhere; margin: 0; }
.brand-preview .player { padding: var(--s-4); gap: var(--s-3) var(--s-4); box-shadow: none; }
.brand-preview .play { display: grid; place-items: center; background: var(--accent); width: 60px; height: 60px; min-height: 60px; box-shadow: none; pointer-events: none; }
.brand-preview .play .icon { border-width: 11px 0 11px 18px; margin-left: 4px; }
.brand-preview .np-title { font-size: var(--fs-md); }
.brand-preview .pv-link { margin: var(--s-4) 0 0; font-size: var(--fs-sm); }
.contrast-note { margin: var(--s-3) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.color-fields { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }

/* ---------------------------------------------------------------- 6. Plataforma y landing */
.hero { text-align: center; padding: var(--s-8) 0 var(--s-6); }
.hero h1 { font-size: var(--fs-3xl); }
.hero .tagline { max-width: 40rem; margin: 0 auto var(--s-6); font-size: var(--fs-lg); }
.hero-form { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; align-items: center; }
.slug-field { display: inline-flex; align-items: center; gap: var(--s-1); max-width: 100%; }
.slug-field input { min-width: 0; width: 9rem; }
.slug-field span { color: var(--muted); white-space: nowrap; }
.form .slug-field { display: flex; }
.form .slug-field input { flex: 1; width: auto; }
.cf-turnstile { min-height: 65px; }
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--s-3); padding: 0; list-style: none; }
.feature-list li { background: var(--surface); border-radius: var(--radius); padding: var(--s-4); }
.steps { list-style: none; padding: 0; display: grid; gap: var(--s-4); }

.lp section { padding: var(--s-9) 0 0; }
.lp h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); text-align: center; margin-bottom: var(--s-2); }
.lp .lead { text-align: center; color: var(--muted); max-width: 38rem; margin: 0 auto var(--s-7); font-size: var(--fs-lg); }
.lp .hero { padding: var(--s-9) 0 var(--s-4); }
.lp .hero h1 { letter-spacing: -.025em; margin-bottom: var(--s-4); }
.lp .hero h1 em { font-style: normal; color: var(--link); }
.lp .hero .tagline { color: var(--muted); font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); }
.cta { min-height: 52px; padding: 0 var(--s-6); border-radius: var(--r-lg); font-weight: 700; font-size: 1.05rem; box-shadow: var(--shadow); }
.hero-note { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--s-4); }
.hero-form .slug-field { min-height: 52px; background: var(--input-bg); border: 1px solid var(--control); border-radius: var(--r-lg); padding: 0 var(--s-4); box-shadow: var(--shadow); }
.hero-form .slug-field:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 30%, transparent); }
.hero-form .slug-field input { border: 0 !important; box-shadow: none !important; background: transparent !important; text-align: right; padding-right: 0; }
.hero-form .slug-field input { width: 11.5rem; }
.hero-form .slug-field input::placeholder { color: color-mix(in srgb, var(--link) 70%, var(--muted)); }
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--s-5); list-style: none; padding: 0; margin: 0; }
.benefits li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6); box-shadow: var(--shadow-sm); color: var(--muted); transition: transform var(--ease), box-shadow var(--ease); }
.benefits li:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.benefits strong { display: block; font-size: var(--fs-lg); margin-bottom: var(--s-2); color: var(--text); }
.benefits .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-size: 1.5rem; margin-bottom: var(--s-4); }
.how { counter-reset: how; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--s-5); list-style: none; padding: 0; margin: 0; }
.how li { counter-increment: how; text-align: center; padding: var(--s-4); }
.how li::before { content: counter(how); display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: 0 auto var(--s-4); border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1.1rem; }
.lp .grid { gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.lp .plan-card { text-align: center; display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-7) var(--s-6); }
.lp .plan-card .big { font-size: 2.1rem; margin-top: var(--s-2); }
.lp .plan-card .plan-features { text-align: left; margin: var(--s-4) auto var(--s-6); }
.lp .plan-card .cta { margin-top: auto; }
.lp .plan-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; margin-bottom: var(--s-3); }
.faq summary { font-weight: 600; padding: var(--s-4) var(--s-5); list-style-position: inside; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq p { margin: 0; padding: var(--s-4) var(--s-5); color: var(--muted); }
.final-cta { text-align: center; padding: var(--s-8) var(--gutter) !important; margin-top: var(--s-9); background: var(--accent); color: var(--accent-ink); border-radius: var(--r-xl); }
.final-cta h2 { color: inherit; margin-bottom: var(--s-5); }
.final-cta .cta { background: var(--accent-ink); color: var(--accent); }
.final-cta .demo-btn { background: transparent; color: inherit; border-color: currentColor; margin-left: var(--s-3); }
.pricing-demo { text-align: center; margin-top: var(--s-4); }
.container.wide { max-width: var(--maxw); }
body.platform > .foot { max-width: var(--maxw); margin: 0 auto; padding: var(--s-5) var(--gutter) var(--s-7); border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------- 7. Precios, legal y cookies */
/* Selector Mensual/Anual (pricing.js). Sin JS se ven ambos precios con su etiqueta. */
.billing-switch { display: flex; width: fit-content; margin: 0 auto var(--s-6); padding: var(--s-1); gap: var(--s-1); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.billing-switch button { min-height: 40px; padding: 0 var(--s-5); border-radius: var(--r-pill); background: transparent; color: var(--text); font-weight: 600; }
.billing-switch button:hover { filter: none; background: var(--surface); }
.billing-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.billing-switch .save-tag { margin-left: var(--s-1); }
.save-tag { display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: .15em .6em; border-radius: var(--r-pill); background: var(--ok); color: var(--ok-ink); }
.billing-switch button[aria-pressed="true"] .save-tag { background: var(--accent-ink); color: var(--accent); }
.price { margin: var(--s-2) 0 0; }
.price p { margin: 0 0 var(--s-1); }
.price .per { color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }
.price-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.price + .price { border-top: 1px dashed var(--border); padding-top: var(--s-2); }
.pricing[data-cycle] .price-label { display: none; }
.pricing[data-cycle] .price + .price { border-top: 0; padding-top: 0; }
.pricing[data-cycle="month"] .p-year, .pricing[data-cycle="year"] .p-month { display: none; }
.pricing-note { text-align: center; max-width: 46rem; margin: var(--s-5) auto 0; }
.plan-request .billing-switch { margin: 0 0 var(--s-2); }
.plan-request .plan-card { display: flex; flex-direction: column; gap: var(--s-1); }
.plan-request .plan-card button { margin-top: auto; }
.plan-confirm { margin: 0; }
.plan-confirm > label { max-width: 20rem; }

/* Contraseña con botón Mostrar (password.js) */
.rights-note { margin: var(--s-3) auto 0; max-width: 40rem; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--muted); }
.pw-field { display: flex; gap: var(--s-2); align-items: stretch; }
.pw-field input { flex: 1; min-width: 0; }
.pw-field .pw-toggle { flex: none; min-height: 44px; min-width: 5.5rem; }

/* Casilla con texto y enlaces (alta, solicitud de plan) */
.check { display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap; margin: 0; }
.check input { flex: none; position: relative; top: .2em; }
.form .check label { display: inline; font-weight: 400; }
.check label { flex: 1 1 0; min-width: 12rem; cursor: pointer; }

/* Páginas legales */
.legal { display: grid; gap: var(--s-7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .legal { grid-template-columns: 13rem minmax(0, 1fr); align-items: start; } }
.legal-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
@media (min-width: 900px) { .legal-nav { position: sticky; top: 88px; } .legal-nav ul { flex-direction: column; } }
.legal-nav a { display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); color: var(--text); text-decoration: none; }
.legal-nav a:hover { background: var(--surface-2); }
.legal-nav a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.legal-doc { max-width: 72ch; }
.legal-doc h2 { margin-top: var(--s-7); scroll-margin-top: 88px; }
.legal-doc h3 { margin-top: var(--s-5); }
.legal-doc li + li { margin-top: var(--s-2); }
.legal-doc table { font-size: var(--fs-sm); margin: var(--s-2) 0 var(--s-4); }
.legal-doc td { vertical-align: top; }
.legal-head { margin-bottom: var(--s-6); }
.legal-head h1 { margin-bottom: var(--s-1); }
.legal-summary, .toc { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin: 0 0 var(--s-6); }
.legal-summary ul { margin: 0; padding-left: 1.1rem; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2 14rem; }

/* Pie con enlaces legales */
.legal-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); align-items: center; margin: 0 0 var(--s-2); font-size: var(--fs-sm); }
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--link); }
.legal-links .btn-link { min-height: 0; padding: 0; font-size: inherit; color: var(--muted); }
.legal-foot { max-width: var(--maxw); margin: 0 auto; padding: var(--s-5) var(--gutter) var(--s-7); }
body.public > .legal-foot { max-width: 1080px; margin-top: 0; border-top: 0; padding-top: 0; }
body.public > .legal-foot .legal-links { justify-content: center; }

/* Aviso de cookies: discreto, abajo a la izquierda, sin bloquear la página */
.consent {
  position: fixed; left: var(--s-4); bottom: var(--s-4); z-index: 60; width: min(34rem, calc(100vw - 2rem));
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: var(--s-4) var(--s-5); font-size: var(--fs-sm);
  animation: consent-in 200ms ease-out;
}
.consent:focus { outline: none; }
.consent:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.consent p { margin: 0 0 var(--s-3); }
.consent-opts { border-top: 1px solid var(--border); padding-top: var(--s-3); margin-bottom: var(--s-3); }
.consent-opt { display: flex; gap: var(--s-2); align-items: baseline; }
.consent-opt input { flex: none; position: relative; top: .15em; }
.consent-opt label { cursor: pointer; }
.consent-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: flex-end; align-items: center; }
.consent-actions .btn-link { margin-right: auto; padding-left: 0; }
.consent-actions .secondary { min-width: 6.5rem; }
@keyframes consent-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- Adaptación */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding-top: var(--s-2); padding-bottom: 0; }
  .topbar nav { order: 3; flex: 1 0 100%; padding-bottom: var(--s-2); margin: 0 calc(-1 * var(--s-2)); }
  .card { padding: var(--s-5); }
  .subnav a { padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); }
  .card.narrow { padding: var(--s-6); margin-top: var(--s-6); }
  .container { padding-top: var(--s-6); }
  .uploader { right: var(--s-2); left: var(--s-2); bottom: var(--s-2); width: auto; }
  .consent { left: var(--s-2); right: var(--s-2); bottom: var(--s-2); width: auto; padding: var(--s-3) var(--s-4); }
  .consent-actions .secondary { flex: 1 1 0; }
}
@media (max-width: 480px) {
  .player { gap: var(--s-3) var(--s-4); }
  .player .play { width: 64px; height: 64px; min-height: 64px; }
  .player .play .icon { border-width: 12px 0 12px 19px; margin-left: 4px; }
  .player .play[aria-pressed="true"] .icon { width: 18px; height: 21px; margin: 0; }
  .q-row { grid-template-columns: 6rem minmax(0, 1fr); }
  .sch-item { grid-template-columns: 5.25rem minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .hero-form > * { width: 100%; }
  .hero-form .slug-field { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
/* --- Página de pago (Stripe) --- */
.pay-page { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; max-width: 64rem; margin: var(--s-6) auto 0; }
.pay-lines { margin: var(--s-4) 0; }
.pay-lines div { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.pay-lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.pay-lines .pay-total { font-weight: 700; font-size: var(--fs-lg); border-bottom: 0; }
#checkout-form { min-height: 14rem; }

/* --- Páginas de contenido (funciones, sectores, guías, directorio) --- */
.content-page { max-width: 54rem; margin: 0 auto; }
.content-page .content-head {
  text-align: left; margin: var(--s-4) 0 var(--s-6); padding: var(--s-7) var(--s-7) var(--s-6);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
}
.content-page .content-head h1 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.6rem); letter-spacing: -.025em; margin-bottom: var(--s-3); }
.content-page .content-head .lead { text-align: left; margin: 0 0 var(--s-5); max-width: 40rem; }
.content-page .content-head .lead:last-child { margin-bottom: 0; }
.content-page .content-head p:last-child { margin-bottom: 0; }
.content-page .content-head .ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-size: 1.75rem; margin-bottom: var(--s-4); }
.content-page .content-head .cta { margin-right: var(--s-3); }
.content-page .content-head .btn.secondary { min-height: 52px; vertical-align: middle; }
.content-page h2 { text-align: left; }
.content-page section { padding-top: var(--s-8); }
.content-page .faq { max-width: none; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }
.crumbs a[aria-current="page"] { color: var(--text); text-decoration: none; }
/* Tarjetas enlazadas: toda la tarjeta es clicable (el enlace se estira con ::after). */
.link-cards li { position: relative; display: flex; flex-direction: column; }
/* Índices de contenido (/funciones, /para, /guias): pestañas entre secciones y tarjetas
   de altura uniforme. Con un número impar, la primera ocupa toda la fila (destacada). */
.hub-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-6); }
.hub-tabs a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.hub-tabs a:hover { border-color: var(--link); }
.hub-tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hub-count { min-width: 1.5em; padding: 0 .4em; border-radius: var(--r-pill); background: color-mix(in srgb, currentColor 14%, transparent); font-size: var(--fs-xs); text-align: center; }
.hub-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--s-4); }
.hub-cards li { padding: var(--s-5) var(--s-6); }
.hub-cards .ico { margin-bottom: var(--s-3); }
.hub-text { display: block; }
.hub-cards strong { line-height: 1.3; }
.hub-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
@media (min-width: 720px) {
  .hub-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-cards li:first-child:nth-last-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--s-5); align-items: center;
    background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%), var(--surface); }
  .hub-cards li:first-child:nth-last-child(odd) .ico { width: 64px; height: 64px; font-size: 2rem; margin: 0; }
  .hub-cards li:first-child:nth-last-child(odd) strong { font-size: var(--fs-xl); }
  .hub-cards li:first-child:nth-last-child(odd) .hub-desc { -webkit-line-clamp: 2; line-clamp: 2; }
  .hub-cards li:first-child:nth-last-child(odd) .more { margin-top: 0; padding-top: 0; white-space: nowrap; }
}
@media (max-width: 719px) {
  .hub-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .hub-tabs a { flex: none; }
  .hub-cards li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); padding: var(--s-4) var(--s-5); }
  .hub-cards .ico { width: 40px; height: 40px; font-size: 1.25rem; margin: 0; grid-row: span 2; }
  .hub-cards .more { grid-column: 2; padding-top: var(--s-2); }
}

.link-cards li:hover, .link-cards li:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.link-cards a { color: var(--text); text-decoration: none; }
.link-cards a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.link-cards a:focus-visible { outline: none; }
.link-cards li:has(a:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }
.link-cards .more { margin-top: auto; padding-top: var(--s-4); color: var(--link); font-weight: 600; font-size: var(--fs-sm); }
.link-cards li:hover .more { text-decoration: underline; text-underline-offset: .18em; }
/* Cuerpo de las páginas */
.prose { line-height: 1.75; font-size: 1.0625rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: var(--s-8) 0 var(--s-4); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); }
.prose h2::before { content: ""; display: block; width: 2.5rem; height: 4px; border-radius: var(--r-pill); background: var(--accent); margin-bottom: var(--s-3); }
.prose li { margin-bottom: var(--s-3); }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding-left: 2rem; }
.prose ul li::before { content: "✓"; position: absolute; left: 0; top: .2em; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--link); font-size: .8rem; font-weight: 700; line-height: 1; }
.prose ol { list-style: none; padding: 0; counter-reset: step; display: grid; gap: var(--s-3); }
.prose ol li { counter-increment: step; position: relative; margin: 0; padding: var(--s-4) var(--s-5) var(--s-4) 4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.prose ol li::before { content: counter(step); position: absolute; left: var(--s-4); top: var(--s-4); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; line-height: 1; }
.prose .toc { margin-bottom: var(--s-6); }
.prose .toc ol { display: block; columns: 2 14rem; padding-left: 1.3rem; list-style: decimal; }
.prose .toc ol li { padding: 0; background: none; border: 0; box-shadow: none; margin-bottom: var(--s-1); }
.prose .toc ol li::before { content: none; }
.prose .note { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); }
.prose .table-wrap { margin: var(--s-4) 0 var(--s-5); padding: var(--s-2) var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.prose .table-wrap tr:last-child td { border-bottom: 0; }
.prose .plan-card { line-height: 1.5; }
.prose .plan-card li { margin-bottom: var(--s-2); }
.related h2 { margin-bottom: var(--s-5); }
.related ul.benefits { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.related .ico { width: 40px; height: 40px; font-size: 1.25rem; margin-bottom: var(--s-3); }
.content-page .final-cta { margin-top: var(--s-8); }
@media (max-width: 720px) {
  .content-page .content-head { padding: var(--s-5); border-radius: var(--r-lg); }
  .prose ol li { padding-left: 3.5rem; }
  .prose ol li::before { left: var(--s-3); }
}
/* Directorio de radios: buscador, géneros, tarjetas y paginación */
.directory { max-width: var(--maxw); }
.directory .content-head { max-width: none; }
.dir-search { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-4); }
.dir-search input[type=search] { flex: 1 1 16rem; min-height: 48px; }
.dir-search select { flex: 0 1 12rem; min-height: 48px; }
.dir-search button { min-height: 48px; padding: 0 var(--s-6); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.dir-genres { margin: 0 0 var(--s-6); }
.chips a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; transition: border-color var(--ease), background-color var(--ease); }
.chips a:hover { border-color: var(--accent); }
.chips a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips .count { font-size: var(--fs-xs); font-weight: 700; padding: .1em .55em; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.chips a[aria-current="page"] .count { background: color-mix(in srgb, var(--accent-ink) 20%, transparent); color: inherit; }
.more-genres { margin-top: var(--s-1); }
.more-genres summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--link); padding: var(--s-2) 0; width: fit-content; }
.more-genres .chips { margin-top: var(--s-2); }
.dir-status { margin: calc(-1 * var(--s-3)) 0 var(--s-5); }
.dir-empty { text-align: center; padding: var(--s-8) var(--s-5); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.stations.link-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: var(--s-4); }
.stations .station-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: var(--s-4); align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.station-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.station-logo { width: 64px; height: 64px; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.station-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); }
.station-info strong { display: block; font-size: var(--fs-lg); line-height: 1.25; overflow-wrap: anywhere; }
.station-genre { font-size: var(--fs-xs); font-weight: 700; padding: .15em .65em; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--link); }
.station-desc { grid-column: 1 / -1; align-self: start; margin: var(--s-4) 0 0; color: var(--muted); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.station-card .more { grid-column: 1 / -1; }
.directory .pager { flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-7); }
.directory .pager a, .directory .pager .gap { white-space: nowrap; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-md); text-decoration: none; font-weight: 600; }
.directory .pager a { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.directory .pager a:hover { border-color: var(--accent); }
.directory .pager a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.directory .pager .gap { color: var(--muted); }
@media (max-width: 480px) {
  .dir-search input[type=search] { flex-basis: 100%; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: var(--s-1) var(--gutter); scroll-padding-inline: var(--gutter); }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row a { flex: none; }
  .dir-search select, .dir-search button { flex: 1 1 0; }
  .stations .station-card { padding: var(--s-4); }
  .station-desc { -webkit-line-clamp: 2; line-clamp: 2; margin-top: var(--s-3); }
  .directory .pager .pager-txt { display: none; }
}
.site-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--s-5); margin-bottom: var(--s-6); }
.site-map ul { list-style: none; padding: 0; margin: 0; }
.site-map li { margin-bottom: var(--s-2); }
.site-map a { color: var(--muted); }

@media print {
  .topbar, .uploader, .skip, .theme-toggle, .consent, .legal-nav, .legal-links, .site-map, .foot, .no-print { display: none !important; }
  .card { box-shadow: none; }
}

/* Vista previa del logo antes de subirlo */
.logo-pv { display: grid; gap: var(--s-3); }
.logo-pv-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.logo-pv-box, .logo-pv-og { margin: 0; }
.logo-pv-box { flex: 1 1 12rem; display: grid; gap: var(--s-2); justify-items: start; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); }
.logo-pv-box.light { background: #fff; color: #333; }
.logo-pv-box.dark { background: #10141f; color: #ddd; }
.logo-pv-box img { height: 48px; width: auto; max-width: 100%; object-fit: contain; }
.logo-pv figcaption { font-size: var(--fs-sm); }
.logo-pv-og img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
