@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Inter UI'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains'; src: url('/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
:root {
  --bg: #05090f;
  --bg2: #080f16;
  --panel: #0b141c;
  --panel2: #0f1b25;
  --line: #1a2b36;
  --text: #dbe7e0;
  --muted: #8097a3;
  --accent: #a3e635;
  --accent-ink: #0a1203;
  --cyan: #22d3ee;
  --pink: #f43f8e;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 10px;
  --mono: 'JetBrains', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --sans: 'Inter UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Bricolage', 'Inter UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
#app { min-height: 100vh; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; font-family: var(--display); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* ---------- botones y campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2);
  cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--text); transition: border-color .15s, background .15s, transform .05s;
}
.btn:hover { border-color: #2c4452; background: #12212d; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #b8f24f; }
.btn.primary.playing { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.big { padding: 13px 24px; font-size: 16px; border-radius: 10px; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 16px; padding: 6px; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--panel2); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; background: #060d13; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.textarea { resize: vertical; min-height: 84px; font-size: 14px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); outline: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.error-text { color: var(--danger); font-size: 14px; min-height: 20px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; color: var(--muted); }
.chip.ok { color: var(--accent); border-color: #3b5a17; }
.chip.off { color: var(--danger); border-color: #5a2230; }

/* ---------- portada ---------- */
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; font: 800 18px/1 var(--display); color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.lp { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(163, 230, 53, .10), transparent 60%),
    radial-gradient(900px 560px at 100% 105%, rgba(34, 211, 238, .11), transparent 60%),
    var(--bg); }
.lp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px clamp(16px, 3vw, 40px); border-bottom: 1px solid rgba(255, 255, 255, .06); position: relative; z-index: 2; }
.lp-left { justify-self: start; }
.lp-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.lp-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(11, 20, 28, .7); }
.lp-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; transition: color .15s, background .15s, box-shadow .15s; }
.lp-tabs button:hover { color: var(--text); }
.lp-tabs button[aria-selected="true"] { color: var(--accent); background: rgba(163, 230, 53, .10); box-shadow: inset 0 0 0 1px rgba(163, 230, 53, .35), 0 0 18px rgba(163, 230, 53, .12); }
.lp-beta { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 7px 16px; font-size: 12.5px; color: var(--muted); background: rgba(34, 211, 238, .05); border-bottom: 1px solid rgba(34, 211, 238, .14); text-align: center; position: relative; z-index: 2; }
.beta-chip { padding: 1px 9px; border-radius: 99px; border: 1px solid rgba(34, 211, 238, .5); color: var(--cyan); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.lp-stage { position: relative; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; z-index: 1; }
.lp-panel { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(18px, 3.2vh, 40px) clamp(16px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.lp-panel[hidden] { display: none; }
.site-foot { display: flex; align-items: center; justify-content: center; gap: 18px 28px; flex-wrap: wrap; padding: 14px clamp(16px, 3vw, 40px) 16px; border-top: 1px solid rgba(255, 255, 255, .06); background: rgba(5, 9, 15, .55); color: #7d93a0; font-size: 12.5px; text-align: center; }
.foot-brand { display: inline-flex; filter: drop-shadow(0 0 14px rgba(34, 211, 238, .25)); }
.foot-brand img { height: 36px; width: auto; display: block; }
.foot-text { display: grid; gap: 2px; justify-items: start; text-align: left; }
.foot-links { display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: center; }
.foot-links a { display: inline-flex; align-items: center; gap: 7px; color: #b8cbc4; }
.foot-links a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 640px) { .site-foot { flex-direction: column; gap: 10px; } .foot-text { justify-items: center; text-align: center; } }
.lp-head { text-align: center; max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.lp-head h2 { font: 800 clamp(24px, 2.8vw, 38px)/1.1 var(--display); letter-spacing: -.025em; }
.lp-head p { color: var(--muted); font-size: 15.5px; }

/* panel de demo */
.lp-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-copy h1 { font: 800 clamp(40px, 5.2vw, 76px)/1 var(--display); letter-spacing: -.035em; max-width: 11ch; text-wrap: balance; }
.hero-copy .lead { font-size: clamp(16px, 1.35vw, 19px); color: #b8cbc4; max-width: 46ch; line-height: 1.55; }
.hero-copy .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.chips li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: rgba(11, 20, 28, .7); color: #b8cbc4; font-size: 13px; }
.chips .ic { color: var(--accent); }
.console { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; overflow: hidden; background: #050b10; border: 1px solid rgba(163, 230, 53, .32);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .06), 0 0 48px rgba(163, 230, 53, .10), 0 0 110px rgba(34, 211, 238, .08); transition: box-shadow .5s, border-color .5s; }
.console.live { border-color: rgba(163, 230, 53, .6); box-shadow: 0 0 0 1px rgba(34, 211, 238, .18), 0 0 64px rgba(163, 230, 53, .22), 0 0 130px rgba(34, 211, 238, .16); }
.console .editor { min-height: clamp(200px, 34vh, 360px); }
.console .scope { border: 0; border-top: 1px solid var(--line); border-radius: 0; height: 76px; }
.console .diag { min-height: 34px; }
.console-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); background: #070f15; }
.lp-status { color: var(--muted); font-size: 13px; min-width: 0; flex: 1; }
.btn .ic, .btn span { display: inline-flex; align-items: center; gap: 8px; }
.btn[hidden] { display: none; }
.billing { align-self: center; }

/* funciones */
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fcard { display: grid; gap: 10px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, rgba(15, 27, 37, .85), rgba(11, 20, 28, .85)); transition: border-color .2s, box-shadow .2s; }
.fcard:hover { border-color: rgba(163, 230, 53, .4); box-shadow: 0 0 36px rgba(163, 230, 53, .08); }
.ficon { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--accent); background: rgba(163, 230, 53, .08); border: 1px solid rgba(163, 230, 53, .28); box-shadow: 0 0 20px rgba(163, 230, 53, .10); }
.fcard h3 { font: 700 18px/1.2 var(--display); letter-spacing: -.01em; }
.fcard p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* sonidos */
.sgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.sgroup { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, rgba(15, 27, 37, .85), rgba(11, 20, 28, .85)); }
.sgroup > header { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.sgroup h3 { font: 700 16px/1 var(--display); color: var(--text); flex: 1; }
.sgroup .count { font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.tile { display: grid; justify-items: center; gap: 6px; padding: 8px 4px 7px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .06); background: rgba(5, 11, 16, .6); font: 12px var(--mono); color: #b8cbc4; }
.tile img, .tile .tile-ic { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; }
.tile .tile-ic { color: var(--cyan); border: 1px solid rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .06); }

/* planes */
.billing { justify-self: center; display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: rgba(11, 20, 28, .7); }
.billing button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 18px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.billing button[aria-pressed="true"] { background: rgba(163, 230, 53, .14); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(163, 230, 53, .4); }
.billing em { font-style: normal; font-size: 11px; color: var(--cyan); }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1060px; width: 100%; margin: 0 auto; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(15, 27, 37, .9), rgba(11, 20, 28, .9)); }
.plan.popular { border-color: rgba(163, 230, 53, .55); box-shadow: 0 0 0 1px rgba(163, 230, 53, .12), 0 0 56px rgba(163, 230, 53, .14); background: linear-gradient(180deg, rgba(25, 40, 24, .55), rgba(11, 20, 28, .92) 55%); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 3px 14px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.plan > header { display: flex; align-items: center; gap: 12px; }
.plan h3 { font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.plan-blurb { color: var(--muted); font-size: 14px; min-height: 40px; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font: 800 44px/1 var(--display); letter-spacing: -.03em; }
.price span { color: var(--muted); font-size: 13px; }
.plan ul { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: #c6d6d0; }
.plan li .ic { color: var(--accent); flex: none; margin-top: 2px; }
.plan .btn { width: 100%; padding: 11px 16px; }

/* piezas compartidas del encabezado */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(11, 20, 28, .7); }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: 700 12px var(--mono); padding: 4px 8px; border-radius: 99px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: rgba(163, 230, 53, .16); color: var(--accent); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, rgba(163, 230, 53, .28), rgba(34, 211, 238, .28)); color: #eaffd0; font-weight: 800; border: 1px solid rgba(163, 230, 53, .45); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic { flex: none; vertical-align: middle; }
.lp-bottom { display: none; }
.nav { display: flex; align-items: center; gap: 16px; padding: 12px clamp(16px, 3vw, 40px); position: sticky; top: 0; z-index: 20; background: rgba(5, 9, 15, .85); backdrop-filter: blur(10px); border-bottom: 1px solid #0e1a22; }

@media (max-width: 1180px) {
  .sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lp-top { grid-template-columns: 1fr auto; }
  .lp-tabs { display: none; }
  .lp-bottom { display: flex; border-top: 1px solid var(--line); background: rgba(8, 15, 22, .96); backdrop-filter: blur(10px); padding-bottom: env(safe-area-inset-bottom); position: relative; z-index: 3; }
  .lp-bottom button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 7px; min-height: 56px; background: transparent; border: 0; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
  .lp-bottom button[aria-current="true"] { color: var(--accent); }
  .lp-bottom button[aria-current="true"] .ic { filter: drop-shadow(0 0 6px rgba(163, 230, 53, .6)); }
  .lp-panel { justify-content: flex-start; gap: 18px; padding-top: 16px; padding-bottom: 20px; }
  .lp-home { grid-template-columns: 1fr; }
  .hero-copy { gap: 16px; }
  .hero-copy h1 { max-width: 14ch; }
  .chips { display: none; }
  .console .editor { min-height: 190px; }
  .fgrid, .pgrid { grid-template-columns: 1fr; }
  .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-right .install-btn, .lp-right .btn.small { padding: 6px 10px; }
  .lp-beta { font-size: 11.5px; padding: 6px 12px; }
  .plan.popular { order: -1; }
}
@media (max-width: 520px) {
  .lp-right { gap: 6px; }
  .lp-right .install-btn { display: none; }
  .sgrid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- ingreso ---------- */
.auth-card { position: relative; width: min(420px, 100%); background: rgba(11, 20, 28, .94); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.auth-card h1 { font-size: 24px; margin: 14px 0 4px; }
.auth-card .brand { justify-content: center; }
.auth-card form { margin-top: 20px; }

/* ---------- editor ---------- */
.term { background: #050b10; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #0a141b; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); font-family: var(--mono); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3b46; display: inline-block; }
.term-bar i:nth-child(1) { background: #f43f5e; } .term-bar i:nth-child(2) { background: #fbbf24; } .term-bar i:nth-child(3) { background: #a3e635; }
.editor { position: relative; flex: 1; min-height: 240px; display: flex; font: 14px/1.65 var(--mono); overflow: hidden; }
.ed-gutter { flex: none; width: 44px; text-align: right; padding: 12px 8px 12px 0; color: #3b5260; user-select: none; background: #050b10; z-index: 2; border-right: 1px solid #0f1c25; will-change: transform; }
.ed-gutter > div { height: 1.65em; }
.ed-gutter .err { color: var(--danger); font-weight: 700; }
.ed-scroll { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.ed-layer, .ed-input { position: absolute; inset: 0; margin: 0; padding: 12px 14px; font: inherit; letter-spacing: 0; white-space: pre; tab-size: 2; }
.ed-layer { pointer-events: none; will-change: transform; inset: 0 auto auto 0; min-width: 100%; }
.ed-layer .ln { height: 1.65em; }
.ed-layer .ln.active { background: rgba(163, 230, 53, .07); box-shadow: inset 2px 0 var(--accent); }
.ed-layer .ln.err { background: rgba(251, 113, 133, .12); text-decoration: underline wavy var(--danger) 1px; text-underline-offset: 4px; }
.ed-layer .ln.warn { text-decoration: underline wavy var(--warn) 1px; text-underline-offset: 4px; }
.ed-pad { height: 120px; }
.ed-input { background: transparent; color: transparent; caret-color: var(--accent); border: 0; resize: none; outline: none; overflow: auto; width: 100%; height: 100%; -webkit-text-fill-color: transparent; }
.ed-input::selection { background: rgba(34, 211, 238, .28); -webkit-text-fill-color: transparent; }
.ed-input::placeholder { -webkit-text-fill-color: #3b5260; }
.tk-kw { color: var(--pink); font-weight: 600; } .tk-drum { color: var(--warn); } .tk-inst { color: var(--cyan); }
.tk-wave { color: #c4b5fd; } .tk-fx { color: #7dd3fc; } .tk-num { color: #fdba74; } .tk-comment { color: #4d6572; font-style: italic; }
.tk-hit { color: var(--accent); font-weight: 700; } .tk-rest { color: #34505e; } .tk-hold { color: #4d7a8b; } .tk-note { color: #e2f6a8; }
.diag { padding: 8px 14px; font: 13px var(--mono); border-top: 1px solid var(--line); background: #070f15; max-height: 120px; overflow: auto; }
.diag .e { color: var(--danger); } .diag .w { color: var(--warn); } .diag .ok { color: var(--accent); }

/* ---------- transporte y osciloscopio ---------- */
.transport { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.transport .now { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 140px; }
.progress { flex: 1; min-width: 80px; height: 6px; background: #0e1a22; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--accent)); transition: width .25s linear; }
.vol-wrap { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.vol { width: 90px; accent-color: var(--accent); }
.scope { width: 100%; height: 84px; display: block; background: #050b10; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- estudio ---------- */
.studio-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; }
.title-input { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; font-weight: 700; font-size: 16px; min-width: 120px; width: min(280px, 40vw); }
.title-input:hover, .title-input:focus { border-color: var(--line); outline: none; background: #060d13; }
.save-state { font-size: 12px; color: var(--muted); min-width: 70px; }
.studio { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr) 330px; background: var(--bg) url('/img/studio-bg.jpg') center / cover; position: relative; }
.studio::before { content: ''; position: absolute; inset: 0; background: rgba(5, 9, 15, .9); }
.studio > * { position: relative; z-index: 1; min-height: 0; }
.side { border-right: 1px solid var(--line); padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 14px; background: rgba(8, 15, 22, .7); }
.side.right { border-right: 0; border-left: 1px solid var(--line); }
.side h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.proj-list { display: grid; gap: 4px; }
.proj { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; font-size: 14px; }
.proj:hover { background: var(--panel2); }
.proj.active { background: var(--panel2); border-color: var(--line); color: var(--accent); }
.proj span.t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 10px; color: var(--muted); font-size: 13px; }
.empty img { width: 100%; border-radius: 10px; margin-bottom: 8px; opacity: .9; }
.center { padding: 14px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.center .term { flex: 1; }
.mixer { display: grid; gap: 6px; }
.mix-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-family: var(--mono); font-size: 13px; }
.mix-row img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.mix-row .nm { flex: 1; }
.mix-row button { background: none; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; font-weight: 700; padding: 2px 7px; cursor: pointer; }
.mix-row button.on.m { color: var(--danger); border-color: var(--danger); } .mix-row button.on.s { color: var(--accent); border-color: var(--accent); }
.mix-row.dim { opacity: .45; }
.ai-head { border-radius: 10px; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border: 1px solid var(--line); }
.hint-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hint-list button { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 12px; padding: 4px 10px; cursor: pointer; }
.hint-list button:hover { color: var(--text); border-color: #2c4452; }
.ref { font: 12.5px/1.5 var(--mono); color: var(--muted); }
.ref b { color: var(--text); }
details.box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); }
details.box summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.box[open] summary { margin-bottom: 8px; }

/* ---------- ventanas modales ---------- */
.overlay { position: fixed; inset: 0; background: rgba(2, 5, 8, .72); display: grid; place-items: center; z-index: 50; padding: 16px; backdrop-filter: blur(3px); }
.modal { width: min(480px, 100%); max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid #25394601; border: 1px solid #253946; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 16px 20px; }
.modal-actions { padding: 0 20px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.stage-img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 14px; display: block; }
.big-bar { height: 10px; background: #0e1a22; border-radius: 6px; overflow: hidden; margin: 10px 0; }
.big-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--accent)); transition: width .3s; }
.secret { font-family: var(--mono); font-size: 18px; letter-spacing: .04em; background: #060d13; border: 1px dashed var(--accent); border-radius: 10px; padding: 12px; text-align: center; user-select: all; word-break: break-all; }

/* ---------- administración ---------- */
.admin { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 24px; font-family: var(--mono); }
.stat span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td .row { flex-wrap: nowrap; gap: 6px; }

/* ---------- compartir ---------- */
.share { max-width: 900px; margin: 0 auto; padding: 24px 20px 60px; display: grid; gap: 14px; }
.share h1 { font-size: clamp(26px, 4vw, 40px); }

/* ---------- avisos ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: #12212d; border: 1px solid #2c4452; padding: 10px 14px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .3s, transform .3s; font-size: 14px; }
.toast.ok { border-color: #3b5a17; } .toast.error { border-color: #7a2a3b; color: #ffd5dc; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- adaptable a pantallas ---------- */
@media (max-width: 1100px) { .studio { grid-template-columns: 250px minmax(0, 1fr); } .side.right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 820px) {
  .demo { grid-template-columns: 1fr; }
  .title-input { order: 5; width: 100%; }
  .hero::after { background: rgba(5, 9, 15, .72); }
  .term { min-height: 300px; } .editor { min-height: 260px; }
}
.pane { display: flex; flex-direction: column; gap: 14px; }
.bottom-nav { display: none; }
@media (max-width: 820px) {
  /* Estudio en celulares: barra superior, un panel a la vez y navegación inferior. */
  .studio-page { height: 100vh; height: 100dvh; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .studio { display: block; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
  .studio { background: var(--bg); }
  .studio::before { display: none; }
  .hide-sm { display: none !important; }
  .save-state { min-width: 0; }
  .side.left { display: contents; }
  .studio [data-pane] { display: none; }
  .studio[data-tab="songs"] [data-pane="songs"], .studio[data-tab="mixer"] [data-pane="mixer"], .studio[data-tab="voices"] [data-pane="voices"] { display: flex; padding: 14px; }
  .studio[data-tab="play"] [data-pane="play"], .studio[data-tab="ai"] [data-pane="ai"] { display: flex; }
  .center { order: 0; overflow: visible; padding: 12px; }
  .side, .side.right { border: 0; overflow: visible; }
  .bottom-nav { display: flex; flex: none; border-top: 1px solid var(--line); background: var(--bg2); padding-bottom: env(safe-area-inset-bottom); position: relative; z-index: 5; }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; background: transparent; border: 0; color: var(--muted); font-size: 11px; cursor: pointer; min-height: 52px; }
  .bottom-nav .bn-i { font-size: 18px; line-height: 1; }
  .bottom-nav button[aria-current="true"] { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- barra de tempo, controles del mixer y editor de pasos ---------- */
.tempo-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.tempo-group { display: flex; align-items: center; gap: 6px; }
.tempo-bar .label { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.bpm-input { width: 68px; text-align: center; font: 700 20px var(--mono); background: #060d13; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; color: var(--accent); }
.bpm-input:focus { border-color: var(--accent); outline: none; }
.bpm-slider { flex: 1; min-width: 120px; accent-color: var(--accent); }
.swing-slider { width: 90px; accent-color: var(--cyan); }
.small-select { padding: 5px 8px; font-size: 13px; width: auto; max-width: 100%; }
.mixer .small-select { width: 100%; margin-bottom: 4px; }
.mix-card { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.mix-card .mix-row { border: 0; border-radius: 0; background: transparent; }
.mix-card.open { border-color: #2c4452; }
.nm-btn { flex: 1; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 4px 2px; }
.nm-btn:hover { color: var(--accent); }
.mix-body { padding: 4px 10px 12px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.mix-body .select { margin-top: 8px; }
.ctl { display: grid; grid-template-columns: 54px 1fr 58px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ctl input[type=range] { width: 100%; accent-color: var(--accent); }
.ctl .val { text-align: right; color: var(--text); font-size: 11px; }
.pattern-editor { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pe-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pe-row { margin-bottom: 12px; }
.pe-grid { display: flex; gap: 3px; flex-wrap: wrap; }
.pe-step { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pe-step.beat { margin-left: 6px; }
.pe-step.beat:first-child { margin-left: 0; }
.pe-n { font: 10px var(--mono); color: var(--muted); height: 12px; }
.pe-cell { width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--line); background: #060d13; color: var(--muted); cursor: pointer; font: 600 12px var(--mono); padding: 0; text-align: center; }
.pe-cell.drum.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 14px; }
.pe-cell.note { width: 46px; appearance: none; -webkit-appearance: none; text-align-last: center; }
.pe-cell.note.on { background: rgba(34, 211, 238, .15); color: var(--cyan); border-color: #1b6a7a; }
.pe-cell:hover { border-color: #3e6070; }
@media (max-width: 820px) { .ctl { grid-template-columns: 60px 1fr 62px; } }

/* ---- panel de voces ---- */
.voices { display: flex; flex-direction: column; gap: 8px; }
.voice-card { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 8px 10px; }
.voice-card .vc-text { font-size: 14px; overflow-wrap: anywhere; }
.voice-form { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; }
.voice-form .input, .voice-form .textarea { width: 100%; }

/* ---- constructor de prompts ---- */
.pb { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 8px 10px; margin: 8px 0; }
.pb > summary { cursor: pointer; font-weight: 600; }
.pb-group { margin-top: 8px; }
.pb-title { font-size: 12px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pb-chip { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.pb-chip.on { border-color: var(--accent); color: var(--accent); background: rgba(160, 255, 80, .08); }
.pb-num { width: 140px; }
.pb-actions { margin-top: 8px; }
.pb-preview { white-space: pre-wrap; font-size: 12px; color: var(--muted); background: rgba(0,0,0,.25); border-radius: 8px; padding: 8px; max-height: 180px; overflow: auto; margin: 4px 0 0; }
.mic-meter { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.mic-meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .06s linear; }
.mic-box { border-top: 1px solid var(--line); padding-top: 8px; gap: 6px; }
.install-btn[hidden] { display: none !important; }

/* ---- grupos del mixer y extras del constructor ---- */
.mix-group { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; padding: 4px 8px; border-left: 3px solid var(--accent); background: rgba(255,255,255,.04); border-radius: 0 8px 8px 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text, #e8f1f5); }
.mix-group.g-bass { border-color: #ff7a59; } .mix-group.g-mids { border-color: #5ad1ff; } .mix-group.g-lead { border-color: #ffd24a; } .mix-group.g-voice { border-color: #d98cff; }
.mix-group .mix-count { font-weight: 400; color: var(--muted); }
.mix-group button { width: 24px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.mix-group button.m.on { background: #7a1f2b; color: #fff; border-color: #a33; }
.mix-group button.s.on { background: var(--accent); color: #05090f; border-color: var(--accent); }
.pb-wrap { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.pb-wrap > .pb { margin: 0; }
.pb-chip.preset { border-color: #3b5a17; }
.pb-big { margin-top: 12px; color: var(--accent); }
.pb-link { background: none; border: 0; color: var(--accent); font-size: 11px; cursor: pointer; text-transform: none; letter-spacing: 0; }

/* ---- tarjeta de editar la canción actual ---- */
.ed { position: relative; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(160deg, rgba(160,255,80,.10), rgba(90,209,255,.07) 55%, rgba(217,140,255,.08)); border: 1px solid rgba(160,255,80,.35); box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset, 0 8px 30px rgba(120,255,60,.08); }
.ed-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ed-kicker { font-size: 17px; font-weight: 800; letter-spacing: .01em; background: linear-gradient(90deg, #b6ff5a, #5ad1ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ed-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ed-count { font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ed-count.on { color: #05090f; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.ed-strength { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.ed-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ed-seg button { background: transparent; border: 0; color: var(--muted); padding: 5px 12px; font-size: 12px; cursor: pointer; }
.ed-seg button.on { background: rgba(160,255,80,.18); color: var(--accent); font-weight: 700; }
.ed-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.ed-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5,9,15,.55); color: inherit; cursor: pointer; text-align: center; transition: transform .12s, border-color .12s, background .12s, box-shadow .12s; }
.ed-card:hover { transform: translateY(-1px); border-color: rgba(160,255,80,.5); }
.ed-card .ed-i { font-size: 19px; line-height: 1; }
.ed-card .ed-l { font-size: 11.5px; line-height: 1.15; }
.ed-card.on { background: linear-gradient(160deg, rgba(160,255,80,.28), rgba(90,209,255,.16)); border-color: var(--accent); box-shadow: 0 0 14px rgba(160,255,80,.25); color: #f4ffe8; font-weight: 700; }
.ed-clear { align-self: center; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 2px 8px; }
.ed-clear:hover { color: var(--text); }
.ed-apply { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.ed-foot { display: flex; gap: 8px; align-items: center; position: sticky; bottom: 0; padding: 8px 0 2px; background: linear-gradient(0deg, rgba(8,15,22,.96) 60%, transparent); }
.ed-apply { flex: 1; background: linear-gradient(90deg, #a6f23a, #52d6ff); color: #05090f; font-weight: 800; border: 0; padding: 11px 14px; border-radius: 12px; font-size: 14px; }
.ed-apply:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) { .ed-card { transition: none; } }

/* ---- manual ---- */
.manual-btn { width: 100%; padding: 12px; font-weight: 700; border: 1px solid rgba(90,209,255,.45); background: linear-gradient(90deg, rgba(90,209,255,.12), rgba(160,255,80,.08)); }
.mn-wrap { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.mn-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mn-tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.mn-tabs button[aria-selected="true"] { color: #05090f; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.mn { max-height: 62vh; overflow: auto; padding-right: 4px; }
.mn h3 { font-size: 16px; margin: 14px 0 6px; } .mn h3:first-child { margin-top: 0; } .mn h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.mn p { margin: 6px 0; line-height: 1.5; } .mn code { font-family: var(--mono, ui-monospace, monospace); color: var(--accent); }
.mn-list { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.mn-code { margin: 8px 0; } .mn-code pre { background: #050b10; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12.5px; overflow: auto; margin: 0 0 6px; white-space: pre; }
.mn-grid, .mn-inst, .mn-fx { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 8px 0; }
.mn-inst { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mn-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 10px; display: flex; flex-direction: column; gap: 4px; text-align: left; color: inherit; }
.mn-card.recipe { margin: 8px 0; }
.mn-card p { margin: 2px 0; font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .mn { max-height: 70vh; } }

/* Botones de descarga de stems y caja del pack de estudio */
.mix-row button.dl, .mix-group button.dl { color: var(--accent); }
.mix-row button.dl:hover, .mix-group button.dl:hover { border-color: var(--accent); }
.pack-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: rgba(255,255,255,.03); }
.pack-box h4 { margin: 0 0 8px; font-size: 13px; }
.pack-box .check { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px; }

/* ---- menú de usuario y perfil ---- */
.home-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); background: var(--panel); }
.umenu { position: relative; }
.umenu-btn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.umenu-btn:hover, .umenu-btn[aria-expanded="true"] { border-color: rgba(163, 230, 53, .5); color: var(--text); }
.umenu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 270px; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(163, 230, 53, .06); }
.umenu-pop[hidden] { display: none; }
.umenu-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.umenu-head div { display: flex; flex-direction: column; min-width: 0; }
.umenu-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-head span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.umenu-item:hover { background: var(--panel2); }
.umenu-item.danger { color: #fda4af; }
.umenu-lang { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; color: var(--muted); font-size: 13px; }
.pf { display: grid; gap: 14px; }
.pf-top { display: flex; align-items: center; gap: 16px; }
.pf-pic { display: grid; gap: 8px; min-width: 0; }
.pf-pic p { font-size: 12px; margin: 0; }
.pf-sep { border-top: 1px solid var(--line); padding-top: 12px; }
.error-text { color: #fda4af; font-size: 13px; min-height: 0; }
.error-text:empty { display: none; }
.bottom-nav .bn-i { display: grid; place-items: center; }
@media (max-width: 900px) { .umenu-pop { position: fixed; right: 12px; top: 56px; width: min(300px, calc(100vw - 24px)); } }

.admin-hero { margin: 6px 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-hero h1 { font-size: 30px; }
.admin { max-width: 1180px; margin: 0 auto; padding: 20px clamp(14px, 3vw, 32px) 10px; }
#app:has(.auth) { display: flex; flex-direction: column; min-height: 100vh; }
.auth-top { display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(14px, 3vw, 32px); }
.auth { flex: 1; display: grid; place-items: center; padding: 24px; position: relative; background: radial-gradient(60% 50% at 50% 30%, rgba(163, 230, 53, .12), transparent 70%), radial-gradient(40% 40% at 85% 80%, rgba(34, 211, 238, .1), transparent 70%); }

/* ---------- portada v2: una sola página con scroll ---------- */
.lp { height: auto; display: block; overflow: visible; background: var(--bg); }
.lp-top { position: sticky; top: 0; z-index: 30; background: rgba(5, 9, 15, .86); backdrop-filter: blur(12px); }
.lp-beta { position: relative; }
.lp-stage { overflow: visible; display: block; min-height: 0; }
.lp-sec { scroll-margin-top: 64px; padding: clamp(52px, 8vh, 92px) 0; }
.lp-sec + .lp-sec { border-top: 1px solid rgba(255, 255, 255, .05); }
.lp-inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); display: flex; flex-direction: column; gap: 36px; }
.lp-hero { padding: clamp(36px, 7vh, 80px) 0 clamp(44px, 8vh, 90px); border-top: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(5, 9, 15, .72) 38%, rgba(5, 9, 15, .30) 100%),
    linear-gradient(180deg, rgba(5, 9, 15, .15) 0%, rgba(5, 9, 15, 0) 55%, var(--bg) 100%),
    url('/img/hero-landing.jpg') right center / cover no-repeat; }
.lp-hero .lp-inner { gap: 0; }
.lp-hero .lp-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.lp-hero .console .editor { min-height: clamp(220px, 32vh, 330px); }
.lp-head { text-align: center; max-width: 720px; margin: 0 auto; }

/* funciones: icono al lado del texto, sin cajas */
.flist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 88px); }
.fitem { display: flex; align-items: flex-start; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.fitem:nth-child(-n+2) { border-top: 0; }
.fitem > div { display: grid; gap: 6px; min-width: 0; }
.fitem h3 { font: 700 18px/1.25 var(--display); letter-spacing: -.01em; }
.fitem p { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 46ch; }
.ficon { flex: none; }
.ficon.small { width: 38px; height: 38px; border-radius: 10px; }

/* sonidos: una fila por familia, etiquetas que se acomodan, sin cajas vacías */
.slist { display: grid; }
.srow { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.srow:first-child { border-top: 0; }
.srow > header { display: flex; align-items: center; gap: 14px; }
.srow h3 { font: 700 17px/1.2 var(--display); }
.srow p { color: var(--muted); font-size: 13.5px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(11, 20, 28, .75); font: 13px var(--mono); color: #cfe0d9; transition: border-color .2s, box-shadow .2s; }
.pill:hover { border-color: rgba(163, 230, 53, .45); box-shadow: 0 0 22px rgba(163, 230, 53, .10); }
.pill img, .pill-ic { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; display: grid; place-items: center; }
.pill-ic { color: var(--cyan); border: 1px solid rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .06); }

.site-foot { margin-top: 0; }
@media (max-width: 900px) {
  .lp { padding-bottom: 64px; }
  .lp-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; }
  .lp-sec { padding: 40px 0; scroll-margin-top: 56px; }
  .lp-hero { padding: 24px 0 36px; background: linear-gradient(180deg, rgba(5, 9, 15, .82), rgba(5, 9, 15, .94)), url('/img/hero-landing.jpg') 70% center / cover no-repeat; }
  .lp-hero .lp-home { grid-template-columns: 1fr; }
  .flist { grid-template-columns: 1fr; }
  .fitem:nth-child(2) { border-top: 1px solid var(--line); }
  .srow { grid-template-columns: 1fr; gap: 12px; }
  .lp-inner { gap: 26px; }
}

.hero-copy h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent), #d9f99d 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero { background:
    linear-gradient(90deg, var(--bg) 0%, rgba(5, 9, 15, .62) 34%, rgba(5, 9, 15, .12) 100%),
    linear-gradient(180deg, rgba(5, 9, 15, .10) 0%, rgba(5, 9, 15, 0) 60%, var(--bg) 100%),
    url('/img/hero-landing.jpg') right center / cover no-repeat; }
@media (max-width: 900px) {
  .lp-hero { background: linear-gradient(180deg, rgba(5, 9, 15, .28) 0%, rgba(5, 9, 15, .55) 55%, var(--bg) 100%), url('/img/hero-landing.jpg') 66% top / cover no-repeat; padding-top: 56px; }
  .lp-hero .lp-home { gap: 28px; }
  .hero-copy h1 { font-size: clamp(40px, 12vw, 56px); max-width: 12ch; }
  .hero-copy .lead { color: #d3e2dc; }
  .hero-copy .cta .btn { flex: 1 1 auto; justify-content: center; }
}
.hero-copy h1 { max-width: 13ch; }

/* ---------- móvil: altura fija, progreso global, insignias, acordeones y medidores ---------- */
/* El estudio ocupa siempre la pantalla visible (fixed), así la barra inferior nunca queda fuera sin hacer zoom. */
@media (max-width: 820px) { .studio-page { position: fixed; inset: 0; height: auto; } }
.activity { flex: none; padding: 8px 14px 10px; background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--accent); display: flex; flex-direction: column; gap: 6px; }
.activity[hidden] { display: none; }
.act-track { height: 6px; border-radius: 3px; background: #0a1319; overflow: hidden; }
.act-track i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width .25s linear; }
.bottom-nav .bn-i { position: relative; }
.bottom-nav .badge { position: absolute; top: -4px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--pink); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; font-style: normal; }
.bottom-nav .badge:empty { min-width: 9px; width: 9px; height: 9px; padding: 0; top: -2px; right: -4px; background: var(--accent); animation: badge-pulse 1s ease-in-out infinite; }
.bottom-nav .badge[hidden] { display: none; }
@keyframes badge-pulse { 50% { opacity: .35; } }
.acc { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.acc > summary { padding: 12px 14px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: '▾'; color: var(--muted); transition: transform .15s; }
.acc:not([open]) > summary::after { transform: rotate(-90deg); }
.acc-body { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.mix-quick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.mix-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.meter { width: 5px; height: 24px; border-radius: 3px; background: #0a1319; overflow: hidden; display: flex; align-items: flex-end; flex: none; }
.meter i { display: block; width: 100%; height: 100%; background: linear-gradient(var(--pink), var(--accent)); transform: scaleY(0); transform-origin: bottom; }

/* En el iPhone, un campo con letra menor a 16px hace zoom al tocarlo y ya no vuelve: por eso los dejo en 16px. */
@media (max-width: 820px) { input, select, textarea, .title-input { font-size: 16px; } }
.act-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- escritorio: la misma barra de herramientas que en el celular, con brillo ---------- */
@media (min-width: 821px) {
  .studio-page .bottom-nav { display: flex; order: 1; justify-content: center; gap: 8px; padding: 8px 16px; background: linear-gradient(var(--bg2), #070d14); border-top: 0; border-bottom: 1px solid var(--line); }
  .activity { order: 2; }
  .studio { order: 3; }
  .bottom-nav button { display: flex; align-items: center; flex: 0 0 auto; flex-direction: row; gap: 8px; min-height: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px 18px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 600; transition: color .15s, background .15s, box-shadow .15s; }
  .bottom-nav button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
  .bottom-nav button[aria-current="true"], .bottom-nav button[aria-pressed="true"] { color: var(--accent); background: rgba(163, 230, 53, .08); border-color: rgba(163, 230, 53, .35); box-shadow: 0 0 18px rgba(163, 230, 53, .22), inset 0 0 12px rgba(163, 230, 53, .08); }
  .bottom-nav button.live { color: var(--accent); border-color: rgba(163, 230, 53, .5); box-shadow: 0 0 24px rgba(163, 230, 53, .4), inset 0 0 12px rgba(163, 230, 53, .12); }
  /* Panel izquierdo: se ve una sola herramienta a la vez, igual que en el celular */
  .studio[data-left] .side.left [data-pane] { display: none; }
  .studio[data-left="songs"] .side.left [data-pane="songs"], .studio[data-left="mixer"] .side.left [data-pane="mixer"], .studio[data-left="voices"] .side.left [data-pane="voices"] { display: flex; }
  .studio[data-ai="off"] { grid-template-columns: 300px minmax(0, 1fr); }
  .studio[data-ai="off"] .side.right { display: none; }
  .studio { grid-template-columns: 300px minmax(0, 1fr) 340px; }
  .side { background: rgba(8, 15, 22, .94); }
  .meter { width: 8px; height: 28px; box-shadow: inset 0 0 0 1px #14232d; }
  .meter i { box-shadow: 0 0 8px rgba(163, 230, 53, .5); }
  .mix-card { transition: border-color .15s; }
  .mix-card:hover { border-color: #2c4452; }
}
@media (min-width: 821px) and (max-width: 1100px) { .studio { grid-template-columns: 280px minmax(0, 1fr); } .studio[data-ai="off"] { grid-template-columns: 280px minmax(0, 1fr); } }

/* =====================================================================================
   Escritorio pro: profundidad, tipografía y mezclador tipo consola (el celular no se toca)
   ===================================================================================== */
.mix-vol { display: none; }
@media (min-width: 821px) {
  /* Fondo con profundidad: una luz verde tenue arriba y viñeta en los bordes */
  .studio::before { background: radial-gradient(900px 380px at 50% -80px, rgba(163, 230, 53, .10), transparent 70%), radial-gradient(700px 500px at 100% 100%, rgba(34, 211, 238, .06), transparent 70%), rgba(4, 8, 13, .93); }
  .studio-page .topbar { background: linear-gradient(#0d1822, #09121a); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 8px 24px rgba(0, 0, 0, .35); position: relative; z-index: 4; }
  .studio-page .bottom-nav { box-shadow: 0 10px 28px rgba(0, 0, 0, .35); position: relative; z-index: 3; }

  /* Paneles laterales: superficies en capas, borde con luz y títulos en la fuente de marca */
  .side { background: linear-gradient(180deg, rgba(14, 24, 33, .88), rgba(7, 13, 19, .92)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); scrollbar-width: thin; scrollbar-color: #24394a transparent; }
  .side h3 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text); margin: 2px 0 0; }
  .center { padding: 14px; gap: 14px; scrollbar-width: thin; scrollbar-color: #24394a transparent; }

  /* Osciloscopio, transporte, tempo y editor: tarjetas con sombra y brillo suave */
  .scope { background: radial-gradient(120% 140% at 50% 0%, #0c1b25, #050b10); border-color: #1d3342; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 40px rgba(163, 230, 53, .05); }
  .transport, .tempo-bar { background: linear-gradient(180deg, #0f1b25, #0a131b); border-color: #1d3342; box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04); }
  .term { border-color: #1d3342; box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(163, 230, 53, .04); }
  .term-bar { background: linear-gradient(#0e1a23, #0a141b); font-family: var(--mono); letter-spacing: .02em; }
  .editor { font-size: 14.5px; line-height: 1.7; }
  .btn { transition: transform .12s, box-shadow .15s, border-color .15s, background .15s; }
  .btn:hover { border-color: #2d4a5e; }
  .btn.primary:hover { box-shadow: 0 0 22px rgba(163, 230, 53, .35); transform: translateY(-1px); }

  /* Mezclador tipo consola: cada instrumento es una tira con fader vertical y medidor de leds */
  .mixer { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
  .mixer > .mix-quick, .mixer > select, .mixer > .mix-group, .mixer > p, .mixer > .mix-card.open { grid-column: 1 / -1; }
  .mixer > .mix-group { margin: 10px 0 0; background: linear-gradient(90deg, rgba(255, 255, 255, .05), transparent); border-radius: 6px; }
  .mix-card { background: linear-gradient(180deg, #101d27, #0a141c); border-color: #1d3342; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05); }
  .mix-card:not(.open) .mix-row { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-areas: "img nm nm" "fad fad mtr" "dl m s"; align-items: center; justify-items: center; gap: 8px 6px; padding: 10px 8px 10px; }
  .mix-card:not(.open) .mix-row > img { grid-area: img; justify-self: start; width: 30px; height: 30px; }
  .mix-card:not(.open) .nm-btn { grid-area: nm; justify-self: stretch; font-family: var(--display); font-weight: 600; font-size: 14px; }
  .mix-card:not(.open) .meter { grid-area: mtr; width: 12px; height: 118px; }
  .mix-card:not(.open) .mix-vol { grid-area: fad; display: block; grid-template-columns: none; width: 44px; }
  .mix-card:not(.open) .mix-vol > span { display: none; }
  .mix-card:not(.open) .mix-vol .val { position: absolute; left: 0; right: 0; bottom: -17px; text-align: center; color: var(--muted); font-size: 11px; }
  .mix-card:not(.open) .mix-vol { position: relative; margin-bottom: 18px; }
  .mix-card:not(.open) .mix-vol input[type=range] { writing-mode: vertical-lr; direction: rtl; width: 30px; height: 118px; margin: 0 auto; display: block; accent-color: var(--accent); }
  .mix-card:not(.open) .mix-row > button.dl { grid-area: dl; } .mix-card:not(.open) .mix-row > button.m { grid-area: m; } .mix-card:not(.open) .mix-row > button.s { grid-area: s; }
  .mix-card:not(.open) .mix-row > button { width: 100%; max-width: 34px; }
  /* Medidor de leds: la barra se rellena de abajo hacia arriba y unas rayitas la cortan en segmentos */
  .meter { position: relative; background: #060d13; border-radius: 4px; }
  .meter::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(#060d13 0 2px, transparent 2px 6px); pointer-events: none; }
  .meter i { background: linear-gradient(to top, var(--accent) 0 55%, #fbbf24 55% 82%, var(--pink) 82%); }
}
@media (min-width: 821px) {
  .mix-card:not(.open) .nm-btn { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
}
/* En pantallas anchas, el panel del mezclador se ensancha para que entren tres tiras por fila */
@media (min-width: 1280px) {
  .studio[data-left="mixer"] { grid-template-columns: 372px minmax(0, 1fr) 340px; }
  .studio[data-left="mixer"][data-ai="off"] { grid-template-columns: 372px minmax(0, 1fr); }
}
@media (min-width: 821px) {
  .mix-card:not(.open) .nm-btn svg { display: none; }
  .mix-card:not(.open) .nm-btn { text-overflow: ellipsis; padding-left: 4px; }
}

/* ---- Escritorio: el instrumento brilla con cada golpe que suena (la intensidad --hit la calcula el mezclador) ----
   Es una capa con degradado cuya opacidad cambia: no usa filtros ni sombras, que son caros de repintar en cada cuadro. */
@media (min-width: 821px) {
  .mix-row { --hit: 0; position: relative; }
  .mix-row::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--hit); will-change: opacity;
    background: radial-gradient(circle at 28px 50%, rgba(163, 230, 53, .55), rgba(163, 230, 53, .12) 45%, transparent 75%); }
}
@media (prefers-reduced-motion: reduce) {
  .mix-row::after { display: none; }
}

/* ---- Asistente de nueva canción: charla corta con botones de respuesta y una barra de avance real ---- */
.nsw-modal { width: min(640px, 100%); }
.nsw { display: flex; flex-direction: column; gap: 4px; }
.nsw-thread { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: min(44vh, 400px); min-height: 150px; padding: 2px 2px 8px; }
.nsw-msg { display: flex; }
.nsw-msg.me { justify-content: flex-end; }
.nsw-bub { max-width: 88%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--panel2); border: 1px solid var(--line); line-height: 1.45; font-size: 15px; }
.nsw-msg.me .nsw-bub { border-radius: 14px 14px 4px 14px; background: rgba(163, 230, 53, .12); border-color: rgba(163, 230, 53, .38); color: var(--text); }
.nsw-sum { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 14px; color: var(--muted); }
.nsw-sum b { color: var(--text); font-weight: 600; margin-right: 4px; }
.nsw-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 8px; border-top: 1px solid var(--line); }
.nsw-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid #25394a; background: var(--panel2); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.nsw-chip:hover { border-color: rgba(163, 230, 53, .6); }
.nsw-chip[aria-pressed="true"] { background: rgba(163, 230, 53, .16); border-color: var(--accent); color: var(--accent); }
.nsw-chip.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.nsw-chip.primary:hover { background: #b8f24f; }
.nsw-composer { display: flex; gap: 8px; }
.nsw-input { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; border: 1px solid #25394a; background: #07111a; color: var(--text); font: inherit; font-size: 16px; }
.nsw-input:focus { outline: 2px solid rgba(163, 230, 53, .5); outline-offset: 1px; }
.nsw-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.nsw-busy { display: grid; gap: 14px; padding: 10px 2px 6px; }
.nsw-busy h3 { font-size: 20px; }
.nsw-bar { height: 12px; border-radius: 999px; background: #0a1319; border: 1px solid var(--line); overflow: hidden; }
.nsw-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width .35s ease; }
.nsw-stat { color: var(--accent); font-variant-numeric: tabular-nums; margin: 0; }
.nsw-error { color: var(--danger); margin: 0; }
.nsw-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .nsw-thread { max-height: 34vh; min-height: 96px; }
  .nsw-chip { padding: 9px 13px; }
  .nsw-foot .btn { flex: 1 1 auto; }
}
