/* Vinilo — tokens semánticos, claro/oscuro, objetivos táctiles de 44 px */
:root {
  color-scheme: light dark;
  --bg: #faf6f1;
  --surface: #ffffff;
  --surface-2: #f1ebe4;
  --line: rgba(28, 24, 22, 0.12);
  --text: #1c1816;
  --text-2: #6b6158;
  --accent: #a84b00;
  --on-accent: #ffffff;
  --danger: #bf2f25;
  --radius: 14px;
  --nav-w: 15.5rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --np-hue: #8a6a4a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0b0a;
    --surface: #181514;
    --surface-2: #242020;
    --line: rgba(255, 240, 225, 0.12);
    --text: #f6efe8;
    --text-2: #b3a79d;
    --accent: #ffb347;
    --on-accent: #1b1100;
    --danger: #ff7a6e;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.ic { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 1.25rem; height: 1.25rem; }
.ic.lg { width: 2rem; height: 2rem; }

/* ---------- estructura ---------- */
.app {
  display: grid;
  height: 100dvh;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "nav main" "bar bar";
}
main { grid-area: main; overflow-y: auto; padding: 2rem 2.25rem 3rem; outline: none; scroll-behavior: smooth; }
.bar { grid-area: bar; }
.nav { grid-area: nav; }

/* ---------- navegación: barra lateral (ancho) / tab bar (estrecho) ---------- */
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.5rem 0.9rem 1rem;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 0.65rem; padding: 0 0.6rem 1.25rem; font: 800 1.35rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.75rem;
  padding: 0 0.8rem;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 600;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] .ic { color: var(--accent); }
.nav-foot { margin-top: auto; padding: 0.75rem; font-size: 0.8125rem; color: var(--text-2); }
.nav-foot:empty { display: none; }

@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; grid-template-areas: "main" "bar" "nav"; }
  main { padding: 1.25rem 1rem 2rem; }
  .nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .brand, .nav-foot { display: none; }
  .nav-link { flex: 1; flex-direction: column; justify-content: center; gap: 0.1rem; min-height: 3.1rem; padding: 0.25rem; font-size: 0.6875rem; border-radius: 12px; }
  .nav-link:hover, .nav-link[aria-current="page"] { background: transparent; }
  .nav-link[aria-current="page"] { color: var(--accent); }
}

/* ---------- páginas ---------- */
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { font: 800 clamp(1.9rem, 4vw, 2.6rem)/1.05 var(--display); letter-spacing: -0.03em; }
.sub { margin-top: 0.4rem; color: var(--text-2); font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.1rem 0 1.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1.2rem; border: 0; border-radius: 999px;
  background: var(--surface-2); font-weight: 650;
}
.btn:hover { filter: brightness(1.06); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[aria-pressed="true"] { color: var(--accent); }

.field {
  display: flex; align-items: center; gap: 0.6rem; min-height: 3rem; padding: 0 1rem;
  background: var(--surface-2); border-radius: 999px; color: var(--text-2);
}
.field input { flex: 1; min-width: 0; height: 3rem; border: 0; background: transparent; outline: none; color: var(--text); font-size: 1rem; }
.field:focus-within { outline: 2px solid var(--accent); }
.field input::placeholder { color: var(--text-2); }

.slot { display: contents; }
.back { display: inline-flex; align-items: center; min-height: 2.75rem; margin-bottom: 0.25rem; color: var(--accent); font-weight: 600; }
.cover .ic { position: absolute; inset: 0; margin: auto; opacity: 0.5; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--text-2); }
.empty .ic { width: 2.5rem; height: 2.5rem; margin-bottom: 0.75rem; opacity: 0.7; }
.empty h2 { margin-bottom: 0.4rem; color: var(--text); font: 700 1.2rem var(--display); }
.empty .btn { margin-top: 1.1rem; }
.notice { padding: 0.9rem 1rem; border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); font-size: 0.9375rem; }
.notice.error { color: var(--danger); }

/* ---------- filas de canciones ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.15rem; border-radius: 12px; }
.row:hover { background: var(--surface-2); }
.row-main {
  display: flex; align-items: center; gap: 0.85rem; min-width: 0; min-height: 3.75rem; padding: 0.4rem 0.5rem;
  border: 0; background: transparent; text-align: left;
}
.meta { display: grid; min-width: 0; }
.meta .t, .meta .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .t { font-weight: 600; }
.meta .a { color: var(--text-2); font-size: 0.875rem; }
.row.current .t { color: var(--accent); }
.tag {
  display: inline-block; margin-left: 0.5rem; padding: 0 0.4rem; border-radius: 6px; vertical-align: 1px;
  background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--text); font-size: 0.6875rem; font-weight: 700;
}
.state { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: var(--text-2); }
.state.done { color: var(--accent); }

.cover { position: relative; flex: none; width: 3rem; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.34); }
.cover img.broken { visibility: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: inherit; pointer-events: none; }

/* anillo de descarga */
.ring {
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 25) * 1%), var(--line) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent 64%, #000 66%);
  mask: radial-gradient(farthest-side, transparent 64%, #000 66%);
}
.ring.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cuadrícula de listas ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem 1rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.card { display: grid; gap: 0.6rem; width: 100%; padding: 0.6rem; border: 0; border-radius: var(--radius); background: transparent; text-align: left; }
.card:hover { background: var(--surface-2); }
.card .cover { width: 100%; border-radius: 10px; }
.card b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card span { color: var(--text-2); font-size: 0.875rem; }

.pl-preview { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; padding: 1rem; border-radius: var(--radius); background: var(--surface-2); }
.pl-preview h2 { font: 700 1.2rem var(--display); }

/* ---------- barra del reproductor ---------- */
.bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 34rem) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
}
.bar-open { display: flex; align-items: center; gap: 0.85rem; min-width: 0; min-height: 3.5rem; padding: 0; border: 0; background: transparent; text-align: left; }
.bar-open .cover { width: 3.5rem; }
.bar-mid { display: grid; gap: 0.15rem; }
.bar-ctrl { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.bar-end { display: flex; justify-content: flex-end; gap: 0.25rem; }
.bar-time { display: grid; grid-template-columns: 2.6rem 1fr 2.6rem; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-time span:first-child { text-align: right; }
.bar-progress { display: none; }

.play-btn {
  display: inline-grid; place-items: center; width: 3rem; height: 3rem; border: 0; border-radius: 50%;
  background: var(--text); color: var(--bg);
}
.play-btn:hover { transform: scale(1.04); }
.play-btn .ic { width: 1.4rem; height: 1.4rem; }

@media (max-width: 820px) {
  .bar { grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; padding: 0.5rem 0.75rem; margin: 0 0.5rem 0.25rem; border: 1px solid var(--line); border-radius: 16px; }
  .bar-open .cover { width: 2.75rem; }
  .bar-open { min-height: 2.75rem; }
  .bar-mid { display: contents; }
  .bar-time, .bar-end, .bar-ctrl .hide-narrow { display: none; }
  .bar-ctrl { grid-column: 2; grid-row: 1; gap: 0; }
  .bar-progress { display: block; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0; height: 2px; border-radius: 2px; background: var(--line); }
  .bar-progress i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--accent); border-radius: inherit; }
  .play-btn { width: 2.75rem; height: 2.75rem; }
}

/* control deslizante (progreso) */
input[type="range"] {
  --p: 0;
  width: 100%; height: 1.5rem; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--text) calc(var(--p) * 1%), var(--line) 0); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--text); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: var(--text); border: 0; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 0; }

/* ---------- reproduciendo ---------- */
.np {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 20% 0%, color-mix(in srgb, var(--np-hue) 70%, var(--bg)) 0%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--np-hue) 35%, var(--bg)), var(--bg) 85%);
  background-color: var(--bg);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  transition: background 0.5s;
}
.np-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.75rem; }
.seg { display: none; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--text) 12%, transparent); }
.seg button { min-height: 2.25rem; padding: 0 1.1rem; border: 0; border-radius: 999px; background: transparent; font-weight: 600; color: var(--text-2); }
.seg button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.np-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(20rem, 28rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); padding: 0.5rem clamp(1rem, 5vw, 4.5rem) 2rem; }
.np-art { display: flex; flex-direction: column; justify-content: center; gap: 1.4rem; min-height: 0; }

/* Firma: el disco asoma por detrás de la portada y gira al sonar */
.sleeve { position: relative; width: min(100%, 26rem); aspect-ratio: 1; margin-inline: auto; }
.sleeve .cover { position: absolute; inset: 0; width: 100%; border-radius: 14px; z-index: 1; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6); }
.vinyl {
  position: absolute; top: 4%; left: 14%; width: 92%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, var(--accent) 0 9%, #111 9.5% 11%, transparent 11.5%),
    repeating-radial-gradient(circle, #1a1615 0 2px, #0c0a09 2px 4px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  animation: spin 6s linear infinite;
  animation-play-state: paused;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.np.playing .vinyl { animation-play-state: running; transform: translateX(8%); }
.np-info h2 { font: 800 clamp(1.5rem, 3vw, 2rem)/1.15 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.np-info p { margin-top: 0.25rem; color: var(--text-2); font-size: 1.0625rem; }
.np-seek { display: grid; grid-template-columns: 2.8rem 1fr 2.8rem; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.np-seek span:first-child { text-align: right; }
.np-controls { display: flex; align-items: center; justify-content: space-between; }
.np-controls .icon-btn { width: 3.25rem; height: 3.25rem; color: var(--text); }
.np-controls .icon-btn[aria-pressed="false"] { color: var(--text-2); }
.np-controls .play-btn { width: 4.25rem; height: 4.25rem; }
.np-controls .play-btn .ic { width: 1.9rem; height: 1.9rem; }

/* letra */
.np-lyrics { display: flex; flex-direction: column; min-height: 0; }
.ly-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding-bottom: 0.5rem; }
.ly-tools .btn { min-height: 2.5rem; padding: 0 1rem; font-size: 0.9375rem; background: color-mix(in srgb, var(--text) 12%, transparent); }
.ly-tools .grow { flex: 1; color: var(--text-2); font-size: 0.9375rem; }
.ly-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 30% 0.25rem; scrollbar-width: none; mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent); }
.ly-scroll::-webkit-scrollbar { display: none; }
.ly-scroll.plain { padding-top: 1rem; }
.ln {
  display: block; width: 100%; margin: 0.15rem 0; padding: 0.35rem 0.7rem; border: 0; border-radius: 12px; background: transparent; text-align: left;
  font: 800 clamp(1.45rem, 2.7vw, 2.15rem)/1.2 var(--display); letter-spacing: -0.015em; color: var(--text);
}
.ln.gap { min-height: 1.2em; padding: 0; pointer-events: none; }
.timed .ln { opacity: 0.38; transition: opacity 0.3s, transform 0.3s; transform-origin: left center; }
.timed .ln.on { opacity: 1; transform: scale(1.02); }
.timed .ln:hover { opacity: 0.7; }
.timed .ln.on:hover { opacity: 1; }
.sharing .ln { opacity: 0.85; cursor: pointer; }
.ln.sel { background: color-mix(in srgb, var(--accent) 28%, transparent); opacity: 1; box-shadow: inset 0 0 0 2px var(--accent); }
.ly-empty { padding: 1rem 0.25rem; color: var(--text-2); }
.ly-empty .btn { margin: 0.75rem 0.5rem 0 0; }

@media (max-width: 820px) {
  .seg { display: inline-flex; }
  .np-body { grid-template-columns: minmax(0, 1fr); padding: 0.25rem 1.25rem 1.25rem; }
  .np-body[data-tab="cover"] .np-lyrics, .np-body[data-tab="lyrics"] .np-art { display: none; }
  .sleeve { width: min(78vw, 22rem); margin-bottom: 0.5rem; }
  .vinyl { left: 10%; }
}
@media (max-height: 640px) and (max-width: 820px) {
  .sleeve { width: min(52vw, 14rem); }
}

/* ---------- hojas y avisos ---------- */
.sheet {
  width: min(32rem, calc(100vw - 1.5rem)); max-height: 85dvh; margin: auto; padding: 0; border: 0; border-radius: 22px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.5); }
@media (max-width: 820px) {
  .sheet { margin: auto auto 0.5rem; }
}
.sheet-in { display: grid; gap: 0.9rem; padding: 1.25rem 1.25rem 1.1rem; max-height: 85dvh; overflow-y: auto; }
.sheet h2 { font: 750 1.25rem var(--display); }
.sheet p.hint { color: var(--text-2); font-size: 0.9375rem; }
.sheet textarea {
  width: 100%; min-height: 14rem; padding: 0.8rem 1rem; border: 0; border-radius: 12px; resize: vertical;
  background: var(--surface-2); line-height: 1.5; outline: none;
}
.sheet textarea:focus, .sheet .field:focus-within { outline: 2px solid var(--accent); }
.sheet .field input[type="file"] { padding-top: 0.6rem; font-size: 0.875rem; }
.menu { display: grid; }
.menu button {
  display: flex; align-items: center; gap: 0.85rem; min-height: 3rem; padding: 0 0.75rem; border: 0; border-radius: 12px; background: transparent; text-align: left; font-weight: 550;
}
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.menu .head { padding: 0.25rem 0.75rem 0.6rem; font-size: 0.875rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.card-preview { display: block; max-width: 100%; max-height: 44dvh; margin-inline: auto; border-radius: 14px; background: var(--surface-2); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.chips button[role="radio"] { min-height: 2.5rem; padding: 0 1rem; border: 0; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.chips button[role="radio"][aria-checked="true"] { background: var(--text); color: var(--bg); }
.chips button.swatch { width: 2.75rem; height: 2.75rem; padding: 0; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); }
.chips button.swatch[aria-checked="true"] { background: var(--c); outline: 3px solid var(--accent); outline-offset: 2px; }
.share-actions { justify-content: center; }
.sheet a:not(.btn) { color: var(--accent); font-weight: 600; text-decoration: underline; }

/* ecualizador */
.np-tools { display: flex; align-items: center; }
.switch { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; font-weight: 600; }
.switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 3rem; height: 1.8rem; margin: 0; border-radius: 999px;
  background: var(--line); cursor: pointer; transition: background 0.2s;
}
.switch input[type="checkbox"]::after {
  content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform 0.2s;
}
.switch input[type="checkbox"]:checked { background: var(--accent); }
.switch input[type="checkbox"]:checked::after { transform: translateX(1.2rem); }
.switch small { display: block; margin-top: 0.15rem; font-weight: 400; color: var(--text-2); font-size: 0.8125rem; }
.eq-preset { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 600; }
.eq-preset select {
  min-height: 2.75rem; padding: 0 0.9rem; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 500;
}
.eq-bands { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.1rem; padding: 0.25rem 0; }
.eq-band { display: grid; justify-items: center; gap: 0.35rem; font-size: 0.6875rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.eq-band output { min-height: 1em; color: var(--text); font-weight: 600; }
.eq-band small { font-size: inherit; }
.eq-band input[type="range"] {
  writing-mode: vertical-lr; direction: rtl; width: 1.9rem; height: 9.5rem; margin: 0;
  background: transparent;
}
.eq-band input[type="range"]::-webkit-slider-runnable-track { width: 4px; height: 100%; background: var(--line); }
.eq-band input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; margin: 0 -6px; background: var(--accent); }
.eq-band input[type="range"]::-moz-range-track { width: 4px; background: var(--line); }
.eq-band input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; background: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 6.5rem); z-index: 100; max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.7rem 1.1rem; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 0.9375rem; font-weight: 550;
  transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .ring.spin { animation: none; }
  .vinyl { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}
@media (prefers-contrast: more) {
  :root { --line: color-mix(in srgb, var(--text) 45%, transparent); --text-2: color-mix(in srgb, var(--text) 80%, var(--bg)); }
}

/* aviso desplegable de actualización */
.update {
  position: fixed; top: 0; left: 50%; z-index: 120; display: flex; align-items: center; gap: 0.75rem;
  width: min(30rem, calc(100vw - 1.5rem)); margin-top: calc(env(safe-area-inset-top) + 0.5rem);
  padding: 0.5rem 0.5rem 0.5rem 1.1rem; border-radius: 999px; background: var(--text); color: var(--bg);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.5); font-weight: 600;
  transform: translate(-50%, -160%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.update.show { transform: translate(-50%, 0); }
.update span { flex: 1; font-size: 0.9375rem; }
.update .btn.primary { min-height: 2.5rem; }
.update .icon-btn { color: var(--bg); }
.update .icon-btn:hover { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }

/* ajustes y en vivo */
.panel { display: grid; gap: 0.75rem; max-width: 36rem; margin-bottom: 1.5rem; padding: 1.1rem 1.1rem 1.25rem; border-radius: var(--radius); background: var(--surface-2); }
.panel h2 { font: 700 1.15rem var(--display); }
.stack { display: grid; gap: 0.9rem; }
.lbl { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.9375rem; }
.panel .field { background: var(--surface); font-weight: 400; }
.np-dl { display: grid; justify-items: start; gap: 0.5rem; margin-top: 0.5rem; }
.np-dl:empty { display: none; }
.live { display: flex; align-items: center; gap: 0.5rem; color: var(--text-2); font-size: 0.9375rem; }
.np-dl .btn { min-height: 2.5rem; background: color-mix(in srgb, var(--text) 12%, transparent); }

/* enlazar el celular */
.qr { display: grid; place-items: center; width: min(15rem, 100%); padding: 0.6rem; border-radius: 12px; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
