/* ============================================================
   SONA — estilo "studio booth": técnico, sobrio, intencional.
   Paleta oscura neutra + un acento ámbar de display. Tipografía
   mono para datos/labels, grotesk para títulos, Inter para texto.
   ============================================================ */
:root {
  --bg: #08080a; --bg-2: #0e0e12; --panel: #121216; --panel-2: #17171d;
  --border: #1f1f25; --border-2: #2a2a32;
  --text: #f3f3f6; --dim: #9595a2; --faint: #5d5d68;
  --accent: #e8e8ef; --accent-ink: #0a0a0d; --accent-dim: rgba(232,232,239,.12);
  --gold: #cda35a;   /* el dorado queda SOLO para el logo */
  --ok: #57c98a; --up: #d8b25f; --boost: #54b9d8; --warn: #e0695b;
  --sans: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, "SFMono-Regular", Consolas, monospace;
  --display: 'Roboto', var(--sans);   /* títulos y texto: como YouTube/apps */
  --logo: 'Syne', sans-serif;         /* SOLO el logo */
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body {
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(232,232,239,.04), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
}
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Header ---------- */
header { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(var(--panel), var(--bg-2)); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark { width: 34px; height: 34px; background: #0f0f13; border: 1px solid var(--border-2);
  border-radius: 9px; display: grid; place-items: center; }
.brand .mark svg { width: 34px; height: 34px; display: block; }
.brand .bdiv { width: 2px; height: 20px; background: var(--accent); opacity: .6; border-radius: 2px; flex-shrink: 0; }
.brand .logo { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: 4px; }
.brand .tag { font-family: var(--mono); color: var(--faint); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 1.5px; border-left: 1px solid var(--border-2); padding-left: 11px; }
@media (max-width: 600px) { .brand .tag { display: none; } }

.hdr-right { display: flex; align-items: center; gap: 9px; }
.engine { font-family: var(--mono); font-size: 11px; color: var(--warn); background: var(--bg-2);
  border: 1px solid var(--border); padding: 6px 10px; border-radius: 6px; }
.plan-h { font-family: var(--mono); font-size: 11px; color: var(--dim); background: var(--bg-2);
  border: 1px solid var(--border); padding: 6px 11px; border-radius: 6px; cursor: pointer; letter-spacing: .3px; }
.plan-h:hover { border-color: var(--accent); color: var(--text); }
.byline { font-family: var(--sans); font-size: 13px; color: var(--dim); text-decoration: none; letter-spacing: .2px; }
.byline b { color: var(--gold); font-weight: 700; }
.byline:hover b { filter: brightness(1.15); }
@media (max-width: 720px) { .byline { display: none; } }

/* ---------- Layout ---------- */
main { max-width: 760px; margin: 0 auto; padding: 8px 22px 40px; display: block; }
.view[hidden] { display: none !important; }
#viewSets { max-width: 760px; margin: 0 auto; padding: 8px 22px 40px; }
/* Modo resultado: el set ocupa la pantalla cómodo, sin el formulario */
body.result-mode .hero, body.result-mode .builder { display: none; }
body.result-mode #output { padding-top: 10px; }
.result-top { margin-bottom: 14px; }

/* ---------- Panel de controles ---------- */
.controls { width: 100%; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px 20px 20px; display: flex; flex-direction: column; gap: 13px; }
.controls::before { content: "// REFERENCIA"; font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  color: var(--faint); padding: 14px 0 4px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

.fld { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }
.fld input, .fld select, .fld textarea {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: 7px;
  padding: 10px 12px; font-size: 13.5px; font-family: var(--sans); outline: none;
  text-transform: none; letter-spacing: 0; transition: border-color .12s, box-shadow .12s;
}
.fld input::placeholder, .fld textarea::placeholder { color: var(--faint); }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.fld select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.fld textarea { resize: vertical; min-height: 84px; font-family: var(--mono); font-size: 12.5px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.adv { border-top: 1px solid var(--border); padding-top: 11px; }
.adv summary { cursor: pointer; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--dim); list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::before { content: "[+] "; color: var(--accent); }
.adv[open] summary::before { content: "[\2212] "; }
.adv textarea { margin-top: 9px; width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; font-size: 12.5px;
  font-family: var(--mono); outline: none; resize: vertical; min-height: 80px; }
.adv textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

/* Subir librería */
.lib { border-top: 1px solid var(--border); padding-top: 13px; }
.lib input[type=file] { font-family: var(--mono); font-size: 12px; color: var(--dim);
  background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: 7px; padding: 10px; cursor: pointer; }
.lib input[type=file]::file-selector-button { font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text); background: var(--panel-2); border: 1px solid var(--border-2);
  border-radius: 6px; padding: 7px 12px; margin-right: 12px; cursor: pointer; }
.lib input[type=file]::file-selector-button:hover { border-color: var(--accent); }
.fld-help { font-family: var(--sans); font-size: 11px; text-transform: none; letter-spacing: 0;
  color: var(--faint); line-height: 1.5; }
.lib-status { font-family: var(--mono); font-size: 11.5px; color: var(--ok); text-transform: none; letter-spacing: 0; min-height: 2px; }
.lib-status b { color: var(--text); }

/* ---------- Botones ---------- */
.btn { font-family: var(--mono); background: var(--accent); color: var(--accent-ink); border: none;
  padding: 12px 22px; border-radius: 7px; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; cursor: pointer; transition: filter .14s, transform .08s, border-color .14s; }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--border-2); color: var(--dim); font-weight: 500; }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); filter: none; }
.btn.small { padding: 7px 13px; font-size: 11px; letter-spacing: .8px; }
#go { width: 100%; padding: 14px; font-size: 14px; margin-top: 4px; }
.hint { font-family: var(--sans); font-size: 12.5px; color: var(--dim); line-height: 1.55; margin: 8px 2px 0; text-align: center; }

/* ---------- Builder por pasos (clean, premium) ---------- */
.builder { display: flex; flex-direction: column; gap: 11px; animation: fadeUp .55s cubic-bezier(.2,.7,.3,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.sec { border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(var(--panel), var(--bg-2));
  overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.sec:hover { border-color: var(--border-2); }
.sec[open] { border-color: var(--border-2); box-shadow: 0 6px 26px rgba(0,0,0,.28); }
.sec > summary { list-style: none; cursor: pointer; padding: 17px 18px; display: flex; align-items: center; gap: 13px; user-select: none; }
.sec > summary::-webkit-details-marker { display: none; }
.snum { width: 27px; height: 27px; border-radius: 50%; border: 1px solid var(--border-2); color: var(--dim);
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px; flex-shrink: 0;
  transition: border-color .25s, color .25s, background .25s; }
.sec[open] .snum, .sec:hover .snum { border-color: var(--gold); color: var(--gold); }
.sec[open] .snum { background: rgba(205,163,90,.14); }
.stit { font-family: var(--display); font-weight: 700; font-size: 15.5px; letter-spacing: .2px; }
.shint { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--faint);
  text-transform: uppercase; letter-spacing: 1px; }
.schev { width: 8px; height: 8px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim);
  transform: rotate(45deg); margin-left: 14px; transition: transform .28s ease, border-color .25s; flex-shrink: 0; }
.sec[open] .schev { transform: rotate(-135deg); border-color: var(--gold); }
.sbody { padding: 2px 18px 18px; display: flex; flex-direction: column; gap: 13px; animation: secOpen .3s ease both; }
@keyframes secOpen { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.sbody .fld { font-family: var(--sans); font-size: 12.5px; text-transform: none; letter-spacing: 0;
  color: var(--dim); font-weight: 500; }
/* botón principal con barrido de luz al hover (detalle "de estudio") */
.go-btn { margin-top: 6px; padding: 15px; font-size: 14px; letter-spacing: 1.5px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #e6c47a, #cda35a 55%, #b58836); color: #1a1303; }
.go-btn:hover { filter: brightness(1.06); }
.go-btn::after { content: ""; position: absolute; inset: 0; transform: translateX(-130%);
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.28), transparent 70%); }
.go-btn:hover::after { animation: shine .85s ease; }
@keyframes shine { to { transform: translateX(130%); } }

/* ---------- Output ---------- */
.output { margin-top: 0; min-width: 0; }
.placeholder { font-family: var(--mono); color: var(--faint); text-align: center; padding: 54px 0; font-size: 13px; letter-spacing: .3px; }
.placeholder.err { color: var(--warn); padding: 8vh 0; }
.raw { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px;
  white-space: pre-wrap; font-family: var(--mono); font-size: 12px; color: var(--dim); }

.set-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.set-title { font-family: var(--mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; }
.set-arc { font-family: var(--display); font-size: 17px; line-height: 1.5; margin-top: 9px; max-width: 560px; color: var(--text); }
.set-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; flex-shrink: 0; }
.export-group { display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--border); }
.export-lbl { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); }

/* ---------- Tracks ---------- */
.tracks { display: flex; flex-direction: column; gap: 7px; }
.mix { font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-align: center; letter-spacing: .5px; color: var(--faint); margin: -2px 0; }
.mix.ok { color: var(--ok); } .mix.up { color: var(--up); } .mix.boost { color: var(--boost); } .mix.warn { color: var(--warn); }
.track { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 9px; padding: 12px 15px; transition: background .14s, border-color .14s; }
.track:hover { background: var(--panel-2); border-color: var(--border-2); }
.num { width: 30px; text-align: center; font-family: var(--mono); font-weight: 700; color: var(--accent);
  font-size: 15px; font-variant-numeric: tabular-nums; }
.tmain { flex: 1; min-width: 0; }
.tname { font-weight: 600; font-size: 14.5px; letter-spacing: .1px; }
.treason { font-size: 12px; color: var(--dim); margin-top: 3px; line-height: 1.4; }
.tplay { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plink { font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px;
  text-decoration: none; color: var(--faint); background: var(--bg-2); border: 1px solid var(--border); padding: 3px 8px; border-radius: 5px; }
.plink:hover { color: var(--text); border-color: var(--accent); }
.plink:first-child:hover { border-color: var(--warn); color: #fff; }
.tside { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.chip { font-family: var(--mono); font-size: 11px; background: var(--bg-2); border: 1px solid var(--border-2);
  color: var(--text); padding: 5px 9px; border-radius: 5px; white-space: nowrap; letter-spacing: .3px; }
.energy { position: relative; width: 66px; height: 9px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
.energy > i { display: block; height: 100%; background: linear-gradient(90deg, #8a6d2f, var(--gold)); }
.energy::after { content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0 5px, var(--bg-2) 5px 6px); pointer-events: none; }

/* Portada del track (real o de marca SONA) */
.tcover { width: 48px; height: 48px; border-radius: 7px; overflow: hidden; flex-shrink: 0;
  background: #0f0f13; border: 1px solid var(--border); position: relative; cursor: pointer; }
.tcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .12s; }
.tcover:hover .cv-play { opacity: 1; }
.cv-play svg { width: 18px; height: 18px; fill: #fff; }
.simbtn { white-space: nowrap; }
.addbtn { font-weight: 700; padding: 6px 11px; }
.addbtn:hover { border-color: var(--gold); color: var(--gold); }
.navbadge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--gold); color: #1a1303; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ed-del:hover { border-color: var(--warn); color: var(--warn); }
.ed-clear:hover { border-color: var(--warn); color: var(--warn); }
#viewEditor { max-width: 760px; margin: 0 auto; padding: 8px 22px 40px; }
.tcover.noprev { cursor: default; }
.tcover.noprev .cv-play { display: none; }
.noprev-tag { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--faint); border: 1px solid var(--border-2); border-radius: 5px; padding: 1px 5px; margin-left: 7px; vertical-align: middle; }
/* aviso cuando no encontramos el artista pedido y el set salio por estilo */
.set-aviso { font-size: 12.5px; line-height: 1.5; color: var(--dim);
  background: rgba(205,163,90,.08); border-left: 2px solid var(--gold);
  border-radius: 6px; padding: 9px 12px; margin: 0 0 14px; }
/* la version que realmente suena, cuando no es la que dice el track */
.ver-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .3px;
  color: var(--gold); border: 1px solid rgba(205,163,90,.35); border-radius: 5px;
  padding: 1px 5px; margin-left: 7px; vertical-align: middle; white-space: nowrap; }
.info-note { font-size: 11.5px; color: var(--dim); line-height: 1.5; background: rgba(205,163,90,.07);
  border-left: 2px solid var(--gold); border-radius: 6px; padding: 8px 11px; }
.info-note b { color: var(--gold); }
/* Toast / cartelito de confirmación */
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(18px);
  background: var(--panel-2); border: 1px solid var(--gold); color: var(--text);
  padding: 11px 18px; border-radius: 40px; font-size: 13px; font-weight: 500; z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 12px 34px rgba(0,0,0,.5); max-width: 80vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.bcover { width: 100%; height: 100%; display: grid; place-items: center;
  background: radial-gradient(120% 100% at 50% 0, #1a1206, #0b0b0e 75%); }
.bcover svg { width: 62%; height: 62%; }

/* ---------- Sidebar plataforma ---------- */
body { display: flex; align-items: stretch; }
.appside { width: 222px; flex-shrink: 0; background: #0c0c0f; border-right: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; }
.appmain { flex: 1; min-width: 0; }
.sbrand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.sbrand .mark { width: 34px; height: 34px; background: #121216; border: 1px solid var(--border-2);
  border-radius: 9px; display: grid; place-items: center; }
.sbrand .mark svg { width: 34px; height: 34px; }
.sbrand .bdiv { width: 2px; height: 20px; background: var(--gold); opacity: .65; border-radius: 2px; flex-shrink: 0; }
.sbrand .logo { font-family: var(--logo); font-weight: 800; font-size: 19px; letter-spacing: 3px; }
.snav { display: flex; flex-direction: column; gap: 3px; }
.snav .lab { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--faint); padding: 6px 10px 4px; }
.snav a { display: flex; align-items: center; gap: 11px; color: var(--dim); text-decoration: none;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.snav a svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.snav a:hover { color: var(--text); }
.snav a.active { color: var(--text); background: var(--panel-2); }
.spro { margin-top: auto; border: 1px solid rgba(205,163,90,.45); border-radius: 12px; padding: 14px;
  background: linear-gradient(160deg, rgba(205,163,90,.12), var(--panel) 70%);
  box-shadow: 0 8px 26px rgba(205,163,90,.08); }
.spro b { font-family: var(--display); font-size: 13.5px; color: var(--gold); }
.spro p { color: var(--dim); font-size: 11.5px; margin: 5px 0 10px; line-height: 1.4; }
.spro .btn { width: 100%; padding: 10px; font-size: 11.5px; font-weight: 700;
  background: linear-gradient(135deg, #e6c47a, #cda35a 55%, #b58836); color: #1a1303; }
.spro .btn:hover { filter: brightness(1.06); }
@media (max-width: 860px) {
  body { flex-direction: column; }
  .appside { width: 100%; height: auto; position: static; flex-direction: row; align-items: center;
    gap: 4px; overflow-x: auto; padding: 10px 12px; }
  .sbrand { padding: 0 10px 0 0; border-right: 1px solid var(--border); margin-right: 6px; flex-shrink: 0; }
  .snav { flex-direction: row; align-items: center; }
  .snav .lab, .spro { display: none; }
  .snav a { white-space: nowrap; padding: 8px 10px; }
}

/* ---------- Resultado estilo plataforma (08): tapa grande + player ---------- */
.set-hero { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.set-cover { width: 158px; height: 158px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: #0f0f13; border: 1px solid var(--border); box-shadow: 0 16px 44px rgba(0,0,0,.5); }
.set-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-cover .bcover svg { width: 46%; height: 46%; }
.set-meta { flex: 1; min-width: 220px; }
.set-kind { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--dim); }
.set-name { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -.5px; margin: 7px 0 8px; line-height: 1; }
.set-sub { font-family: var(--mono); font-size: 12px; color: var(--dim); line-height: 1.5; margin-bottom: 16px; }

.player { position: fixed; left: 222px; right: 0; bottom: 0; height: 76px; background: #0e0e12;
  border-top: 1px solid var(--border); display: none; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px; padding: 0 20px; z-index: 45; }
body.has-player .player { display: grid; }
body.has-player .appmain { padding-bottom: 90px; }
.pleft { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player .pcover { width: 50px; height: 50px; border-radius: 7px; overflow: hidden; flex-shrink: 0; background: #0f0f13; border: 1px solid var(--border); }
.player .pcover img { width: 100%; height: 100%; object-fit: cover; }
.player .pcover .bcover svg { width: 60%; height: 60%; }
.player .pinfo { min-width: 0; }
.player .pinfo .pt { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .pinfo .pa { font-family: var(--mono); color: var(--dim); font-size: 11.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcenter { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.pctrls { display: flex; align-items: center; gap: 20px; }
.pctrls svg { width: 17px; height: 17px; fill: var(--dim); cursor: pointer; }
.pctrls svg:hover { fill: var(--text); }
.pctrls .pmain { width: 38px; height: 38px; border-radius: 50%; background: var(--text); display: grid; place-items: center; cursor: pointer; }
.pctrls .pmain:hover { transform: scale(1.05); }
.pctrls .pmain svg { width: 15px; height: 15px; fill: var(--bg); }
.pscrub { display: flex; align-items: center; gap: 9px; width: 100%; max-width: 440px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.pwave { flex: 1; height: 32px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.pwave i { flex: 1; min-width: 2px; background: var(--border-2); border-radius: 1px; transition: background .05s linear; }
.pwave i.on { background: var(--gold); }
.pright { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.pvol { display: flex; align-items: center; gap: 7px; color: var(--dim); }
.pvol svg { width: 18px; height: 18px; }
.pvolbar { width: 72px; height: 4px; accent-color: var(--gold); cursor: pointer; }
.pxf { font-family: var(--mono); font-size: 11px; color: var(--faint); background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 40px; padding: 7px 13px; cursor: pointer; letter-spacing: .3px; }
.pxf.on { color: var(--gold); border-color: rgba(205,163,90,.5); background: rgba(205,163,90,.1); }
@media (max-width: 860px) { .player { left: 0; grid-template-columns: 1fr auto; } .pright { display: none; } .pscrub { display: none; } }

/* ---------- Mis sets ---------- */
.mysets-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.mysets-head h2 { font-family: var(--display); font-size: 24px; font-weight: 900; margin: 0; }
.mysets-head span { font-size: 12.5px; color: var(--dim); }
.setlist { display: flex; flex-direction: column; gap: 10px; }
.setcard { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(var(--panel), var(--bg-2)); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; transition: border-color .18s, box-shadow .18s; }
.setcard:hover { border-color: var(--border-2); box-shadow: 0 6px 22px rgba(0,0,0,.25); }
.sc-name { font-weight: 700; font-size: 15px; }
.sc-meta { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.sc-actions { display: flex; gap: 7px; flex-shrink: 0; }
.sc-del:hover { border-color: var(--warn); color: var(--warn); }
.setcard[draggable] { cursor: grab; }
.setcard.dragging { opacity: .5; }
/* Carpetas */
.folders { display: flex; flex-direction: column; gap: 16px; }
.folder { border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(var(--panel), var(--bg-2)); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.folder.dragover { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 22px rgba(205,163,90,.15); }
.folder-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.folder-name { font-family: var(--display); font-weight: 700; font-size: 14.5px; }
.folder-count { color: var(--dim); font-size: 12px; font-weight: 400; margin-left: 4px; }
.fdel { opacity: .7; } .fdel:hover { border-color: var(--warn); color: var(--warn); opacity: 1; }
.folder-drop { padding: 12px 15px; display: flex; flex-direction: column; gap: 9px; min-height: 18px; }
.folder-empty { color: var(--faint); font-size: 12.5px; text-align: center; padding: 12px; border: 1px dashed var(--border-2); border-radius: 9px; }
/* Carpetas estilo explorador (una al lado de la otra) */
.ftiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; margin-bottom: 24px; }
.ftile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 20px 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(var(--panel), var(--bg-2));
  text-align: center; transition: border-color .15s, box-shadow .15s, transform .1s; }
.ftile:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.ftile.dragover { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 22px rgba(205,163,90,.18); }
.ftile-ic { font-size: 36px; line-height: 1; filter: saturate(.85); }
.ftile-name { font-family: var(--display); font-weight: 700; font-size: 13.5px; word-break: break-word; }
.ftile-count { color: var(--dim); font-size: 11.5px; }
.sublabel { font-family: var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; margin: 4px 2px 11px; }
.crumb { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 0; }
.crumb-sep { color: var(--faint); }
.crumb-cur { font-family: var(--display); font-weight: 800; font-size: 22px; }
/* Menú click derecho */
.ctxmenu { position: fixed; z-index: 80; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.6); padding: 6px; min-width: 190px; }
.ctxmenu .ctx-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); padding: 6px 10px 4px; }
.ctxmenu button { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text);
  font-family: var(--sans); font-size: 13px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.ctxmenu button:hover { background: var(--bg-2); color: var(--gold); }
/* Ventana propia para nombrar (carpetas / sets) */
.ask-input { width: 100%; margin-top: 16px; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 9px; padding: 12px 13px; font-family: var(--sans);
  font-size: 14px; outline: none; }
.ask-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(205,163,90,.14); }
.ask-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.ask-actions .btn { width: auto; padding: 11px 20px; }

/* ---------- FAB sugerencias ---------- */
.fab { position: fixed; bottom: 22px; right: 22px; font-family: var(--mono); background: var(--panel);
  color: var(--text); border: 1px solid var(--border-2); border-radius: 8px; padding: 11px 16px; font-size: 12px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .8px; cursor: pointer; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 40; transition: border-color .14s, transform .12s; }
.fab:hover { border-color: var(--accent); transform: translateY(-2px); }
#suggestBody textarea, #suggestBody input { width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; font-size: 13px; font-family: var(--sans);
  outline: none; margin-bottom: 10px; }
#suggestBody textarea { min-height: 110px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
#suggestBody textarea:focus, #suggestBody input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
#suggestSend { width: 100%; }

/* ---------- Modales ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal.hidden { display: none; }
.modal-box { background:
    radial-gradient(620px 220px at 50% -8%, rgba(205,163,90,.12), transparent 62%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-2); border-radius: 16px; padding: 24px;
  width: 100%; max-width: 460px; max-height: 88vh; overflow: auto;
  box-shadow: 0 28px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.modal-head b { font-family: var(--display); font-size: 16px; }
.modal-sub { font-size: 12px; color: var(--dim); margin-top: 5px; }
.icon-x { background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; flex-shrink: 0; font-family: var(--mono); }
.icon-x:hover { border-color: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.sw.self { background: #6ea8fe; } .sw.rel { background: var(--ok); } .sw.adj { background: var(--up); } .sw.boost { background: var(--boost); }
.modal-note { font-size: 12px; color: var(--dim); line-height: 1.65; margin: 16px 0 0; }

.wheel { display: flex; flex-direction: column; gap: 7px; }
/* Rueda Camelot circular */
.cwheel { width: 100%; max-width: 330px; display: block; margin: 6px auto 2px; }
.cwheel .seg { fill: var(--bg-2); stroke: var(--bg); stroke-width: 2.5; cursor: pointer; transition: fill .15s; }
.cwheel .seg:hover { fill: var(--panel-2); }
.cwheel .seg.self { fill: #6ea8fe; } .cwheel .seg.rel { fill: var(--ok); }
.cwheel .seg.adj { fill: var(--up); } .cwheel .seg.boost { fill: var(--boost); }
.cwheel .wlab { fill: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 800;
  text-anchor: middle; dominant-baseline: middle; pointer-events: none;
  paint-order: stroke; stroke: #0a0a0d; stroke-width: 3px; stroke-linejoin: round; }
.cwheel .wlab-a { font-size: 10px; }
.cwheel .chub { fill: var(--panel); stroke: var(--border-2); stroke-width: 1; }
.cwheel .chubt { fill: var(--text); font-family: var(--display); font-size: 11px; font-weight: 800;
  text-anchor: middle; letter-spacing: 1.5px; }
.cwheel .chubt2 { fill: var(--faint); font-family: var(--mono); font-size: 7px; text-anchor: middle; letter-spacing: .5px; }
.wrow { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.key { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--bg-2);
  border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 8px 12px; cursor: pointer;
  font-family: var(--mono); font-size: 14px; font-weight: 600; transition: all .1s; }
.key span { font-size: 10.5px; color: var(--dim); font-weight: 400; }
.key:hover { border-color: var(--accent); }
.key.self { background: #6ea8fe; color: #06101f; border-color: #6ea8fe; } .key.self span { color: #06101f; }
.key.rel { background: var(--ok); color: #052012; border-color: var(--ok); } .key.rel span { color: #052012; }
.key.adj { background: var(--up); color: #2a1d00; border-color: var(--up); } .key.adj span { color: #2a1d00; }
.key.boost { background: var(--boost); color: #04161a; border-color: var(--boost); } .key.boost span { color: #04161a; }

/* ---------- Footer ---------- */
.credit { text-align: center; color: var(--faint); font-family: var(--mono); font-size: 11px; padding: 30px 16px 96px; letter-spacing: .3px; }
.linkbtn { background: none; border: none; color: var(--dim); font-family: var(--mono); font-size: 11px; cursor: pointer; padding: 0; text-decoration: underline; }
.linkbtn:hover { color: var(--gold); }

/* ---------- Planes ---------- */
.plans-box { max-width: 840px; }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 13px; margin-top: 18px; }
.plan { position: relative; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 18px 16px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 10px 30px rgba(205,163,90,.1); }
.plan-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #e6c47a, #cda35a); color: #1a1303;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 5px; white-space: nowrap; }
.plan-name { font-family: var(--mono); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--dim); }
.plan.featured .plan-name { color: var(--gold); }
.plan-price { font-family: var(--display); font-size: 30px; font-weight: 700; margin: 8px 0 14px; }
.plan-price span { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--dim); }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.plan li { font-size: 13px; color: var(--dim); margin: 9px 0; padding-left: 20px; position: relative; line-height: 1.4; }
.plan li::before { content: "+"; position: absolute; left: 0; color: var(--gold); font-weight: 700; font-family: var(--mono); }
.plan.featured .plan-cta { background: linear-gradient(135deg, #e6c47a, #cda35a 55%, #b58836); color: #1a1303; }
.plan.featured .plan-cta:hover { filter: brightness(1.06); }
.plan li b { color: var(--text); }
.plan li i { color: var(--faint); font-size: 11px; }
.plan-cta { width: 100%; }
@media (max-width: 720px) { .plans-grid { grid-template-columns: 1fr; } }

/* ---------- Términos ---------- */
.terms-box { max-width: 620px; }
.terms-body { margin-top: 16px; max-height: 64vh; overflow: auto; }
.terms-body h4 { font-family: var(--display); font-size: 14px; margin: 20px 0 6px; color: var(--text);
  border-left: 3px solid var(--gold); padding-left: 10px; line-height: 1.2; }
.terms-body p { font-size: 13px; line-height: 1.65; color: var(--dim); margin: 0; }
.terms-body a { color: var(--gold); text-decoration: none; }
.terms-body a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  main { padding: 14px 12px 30px; } header { padding: 10px 14px; } .hero { padding: 18px 12px 4px; }
  #viewSets { padding: 8px 12px 40px; }
  /* filas de track */
  .track { gap: 9px; padding: 10px 10px; }
  .num { width: 16px; font-size: 12px; }
  .tcover { width: 42px; height: 42px; }
  .tmain { min-width: 0; }
  .tname { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .treason { font-size: 11px; }
  .tplay { display: none; }              /* los links de pre-escucha ocupan mucho en cel */
  .tside { gap: 8px; }
  .tside .energy { display: none; }
  .simbtn { font-size: 10px; padding: 5px 8px; }
  /* resultado del set */
  .set-hero { gap: 16px; }
  .set-cover { width: 110px; height: 110px; }
  .set-name { font-size: 26px; }
  .set-sub { font-size: 11px; }
  .set-actions { gap: 6px; }
  .set-actions .btn { font-size: 11px; padding: 9px 12px; }
  .export-group { padding-left: 0; margin-left: 0; border-left: none; }
  /* Mis sets */
  .ftiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mysets-head h2, .crumb-cur { font-size: 20px; }
  .setcard { flex-wrap: wrap; gap: 10px; padding: 12px 13px; }
  .sc-actions { width: 100%; }
  .sc-actions .btn { flex: 1; }
}

/* ---------- Hero ---------- */
.hero { max-width: 760px; margin: 0 auto; padding: 30px 22px 8px; text-align: center; }
.hero p { margin: 0 auto; text-align: center; }
.hero h1 { font-family: var(--display); font-size: clamp(36px, 6.2vw, 60px); font-weight: 900; line-height: 1.02;
  letter-spacing: -1px; margin: 18px 0 12px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { max-width: 580px; color: var(--dim); font-size: 14.5px; line-height: 1.6; margin: 0 auto; text-align: center; }
.hero-eq { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.hero-eq span { width: 4px; background: linear-gradient(var(--accent), #ffce6f); border-radius: 2px;
  transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.hero-eq span:nth-child(1){height:40%;animation-delay:-.9s} .hero-eq span:nth-child(2){height:75%;animation-delay:-.2s}
.hero-eq span:nth-child(3){height:55%;animation-delay:-.5s} .hero-eq span:nth-child(4){height:90%;animation-delay:-.1s}
.hero-eq span:nth-child(5){height:35%;animation-delay:-.7s} .hero-eq span:nth-child(6){height:70%;animation-delay:-.35s}
.hero-eq span:nth-child(7){height:50%;animation-delay:-.6s} .hero-eq span:nth-child(8){height:85%;animation-delay:-.15s}
.hero-eq span:nth-child(9){height:45%;animation-delay:-.8s}
@keyframes eq { 0%,100%{transform:scaleY(.35)} 50%{transform:scaleY(1)} }

/* ---------- Badges BPM / tonalidad ---------- */
.bpm { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); display: inline-flex; align-items: baseline; gap: 3px; }
.bpm i { font-style: normal; font-size: 8.5px; font-weight: 500; color: var(--faint); letter-spacing: .5px; }
.keybadge { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 5px 8px; border-radius: 5px;
  color: hsl(var(--kh, 40) 70% 78%); background: hsl(var(--kh, 40) 60% 50% / .14); border: 1px solid hsl(var(--kh, 40) 60% 55% / .35); white-space: nowrap; }

/* ---------- Animación de entrada ---------- */
.track { animation: rise .42s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-eq span, .track { animation: none !important; } }

/* ---------- Scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
