/* Overdrivevictor — estilos. Oscuro como un escenario, verde como el LED de un pedal. */
:root {
  color-scheme: dark;
  --bg: oklch(0.155 0.006 85);
  --bg-2: oklch(0.185 0.007 85);
  --surface: oklch(0.215 0.008 85);
  --surface-2: oklch(0.255 0.009 85);
  --line: oklch(0.32 0.01 85);
  --line-soft: oklch(0.26 0.008 85);
  --text: oklch(0.95 0.01 90);
  --muted: oklch(0.74 0.012 90);
  --faint: oklch(0.56 0.012 90);

  --led: oklch(0.82 0.2 142);        /* verde overdrive */
  --led-ink: oklch(0.2 0.05 142);
  --led-glow: oklch(0.82 0.2 142 / 0.45);
  --hot: oklch(0.67 0.21 30);        /* rojo de clipping: tónica */
  --amber: oklch(0.83 0.15 78);      /* válvula: notas de acorde */
  --bad: oklch(0.64 0.22 25);

  --wood: oklch(0.27 0.035 50);
  --wood-2: oklch(0.23 0.03 45);
  --fret: oklch(0.78 0.01 250);
  --string: oklch(0.8 0.03 85);
  --pearl: oklch(0.88 0.02 95);

  --display: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --body: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
::selection { background: var(--led); color: var(--led-ink); }
:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--led); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--led); box-shadow: 0 0 10px var(--led-glow); }
h1, h2, h3 { font-family: var(--display); font-stretch: 118%; line-height: 1.02; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(40px, 7vw, 86px); font-weight: 850; }
h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 820; }
h3 { font-size: 21px; font-weight: 750; font-stretch: 108%; line-height: 1.2; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 40ch; }
.hl { color: var(--led); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: transparent; text-decoration: none; font-weight: 650; font-size: 16px; line-height: 1.2;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s, box-shadow .2s;
}
.btn:hover { border-color: var(--muted); background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--led); color: var(--led-ink); border-color: var(--led); }
.btn-primary:hover { background: oklch(0.87 0.19 142); border-color: oklch(0.87 0.19 142); box-shadow: 0 0 28px var(--led-glow); }
.btn-sm { padding: 9px 14px; font-size: 14.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Navegación */
.nav { position: sticky; top: 0; z-index: 50; background: oklch(0.155 0.006 85 / 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-stretch: 125%; font-weight: 850; font-size: 19px; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.brand b { color: var(--led); font-weight: 850; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; padding: 8px 10px; white-space: nowrap; border-radius: var(--radius); font-size: 15px; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--text); background: var(--surface); }
.nav-toggle { display: none; flex: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; cursor: pointer; }

/* Pedal de overdrive (activa la saturación del sonido) */
.pedal {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 7px 9px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.pedal-led { width: 10px; height: 10px; border-radius: 50%; background: oklch(0.35 0.05 142); transition: background .15s, box-shadow .2s; }
.pedal[aria-pressed='true'] { color: var(--text); border-color: var(--led); }
.pedal[aria-pressed='true'] .pedal-led { background: var(--led); box-shadow: 0 0 12px var(--led), 0 0 2px var(--led); }

@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; display: none;
  }
  .menu-open .nav-links { display: flex; }
  .nav-links a { padding: 12px; font-size: 17px; }
  .nav-links .pedal, .nav-links .lang { align-self: flex-start; margin-top: 8px; }
}
@media (max-width: 420px) { .brand { font-size: 15px; gap: 8px; } .brand-mark { width: 26px; height: 26px; } }

/* Secciones */
section, [id] { scroll-margin-top: 84px; }
section { position: relative; }
.section { padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--line-soft); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 60px); max-width: 760px; }
.section-head p { color: var(--muted); font-size: 18.5px; margin: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* Hero */
.hero { padding: clamp(48px, 7vw, 88px) 0 0; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, oklch(0.82 0.2 142 / 0.11), transparent 62%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: end; }
.hero h1 .stroke { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.hero-side { display: grid; gap: 22px; padding-bottom: 8px; }
.hero-note { font-size: 14px; color: var(--faint); margin: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Escenario del recorrido */
.stage { margin-top: clamp(40px, 6vw, 72px); border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(180deg, var(--bg-2), var(--bg)); overflow: hidden; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; flex-wrap: wrap; }
.stage-steps { display: flex; gap: 6px; }
.stage-steps button { width: 30px; height: 6px; border: 0; padding: 0; border-radius: 3px; background: var(--line); cursor: pointer; }
.stage-steps button[aria-current='true'] { background: var(--led); box-shadow: 0 0 10px var(--led-glow); }
.stage-board { padding: 18px 16px 6px; overflow-x: auto; scrollbar-width: thin; }
.stage-board .fb { min-width: 760px; }
.stage-panel { display: grid; grid-template-columns: 1fr auto; gap: 28px; padding: 22px 24px 26px; border-top: 1px solid var(--line-soft); align-items: start; }
.stage-panel h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 10px; }
.stage-panel p { color: var(--muted); max-width: 64ch; margin: 0; }
.stage-extra { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.stage-nav { display: flex; gap: 10px; }
.stage-hint { font-size: 13.5px; color: var(--faint); margin-top: 12px !important; }
@media (max-width: 700px) { .stage-panel { grid-template-columns: 1fr; } }

/* Mástil */
.fb { width: 100%; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.fb-svg { width: 100%; height: auto; overflow: visible; }
.fb-wood { fill: var(--wood); }
.fb-inlay { fill: var(--pearl); opacity: 0.28; }
.fb-fret { stroke: var(--fret); stroke-width: 2.4; opacity: 0.75; }
.fb-nut { fill: oklch(0.9 0.02 90); rx: 1.5; }
.fb-string { stroke: var(--string); opacity: 0.85; }
.fb-nums text { font-family: var(--mono); font-size: 13px; fill: var(--faint); }
.fb-nums text.is-key { fill: var(--muted); font-weight: 700; }
.fb-hit { fill: transparent; cursor: pointer; }
.fb-hit:hover { fill: oklch(1 0 0 / 0.06); }
.fb-note { pointer-events: none; }
.fb-note text { font-family: var(--body); font-weight: 800; font-size: 13px; fill: var(--led-ink); }
.fb-note text.is-long { font-size: 10.5px; }
.fb-note .fb-dot { fill: var(--led); stroke: oklch(0 0 0 / 0.35); stroke-width: 1; }
.fb-note.is-root .fb-dot { fill: var(--hot); }
.fb-note.is-root text { fill: oklch(0.99 0 0); }
.fb-note.is-chord .fb-dot { fill: var(--amber); }
.fb-note.is-chord text { fill: oklch(0.22 0.05 70); }
.fb-note.is-ghost .fb-dot { fill: oklch(0.95 0.01 90 / 0.1); stroke: none; }
.fb-note.is-ghost text { fill: oklch(0.95 0.01 90 / 0.55); font-weight: 600; font-size: 11px; }
.fb-note.is-target .fb-dot { fill: var(--text); }
.fb-note.is-target text { fill: var(--bg); }
.fb-note.is-dim .fb-dot { fill: oklch(0.82 0.2 142 / 0.25); }
.fb-note.is-dim text { fill: oklch(0.95 0.01 90 / 0.6); }
.fb-ring { fill: none; stroke: var(--amber); stroke-width: 3; }
.fb-flash { pointer-events: none; fill: none; stroke-width: 3; animation: flash .6s ease-out forwards; }
.fb-flash.is-pulse { stroke: var(--text); }
.fb-flash.is-good { stroke: var(--led); fill: oklch(0.82 0.2 142 / 0.35); }
.fb-flash.is-bad { stroke: var(--bad); fill: oklch(0.64 0.22 25 / 0.3); }
@keyframes flash { from { opacity: 1; r: 13; } to { opacity: 0; r: 24; } }
.drive-on .fb-note .fb-dot { filter: drop-shadow(0 0 5px var(--led-glow)); }

.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--led); }
.legend i.r { background: var(--hot); }
.legend i.c { background: var(--amber); }

/* Chips */
.chip {
  border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 7px 12px;
  cursor: pointer; font-size: 14.5px; font-weight: 600; display: inline-flex; gap: 8px; align-items: baseline;
}
.chip small { font-family: var(--mono); font-size: 11.5px; color: var(--faint); font-weight: 500; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed='true'] { background: var(--amber); color: oklch(0.22 0.05 70); border-color: var(--amber); }
.chip[aria-pressed='true'] small { color: oklch(0.3 0.05 70); }

/* Ruta de aprendizaje */
.path-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.path-bar { flex: 1; height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; max-width: 420px; }
.path-bar span { display: block; height: 100%; width: 0; background: var(--led); box-shadow: 0 0 12px var(--led-glow); transition: width .4s; }
.path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.level { background: var(--bg); padding: 28px 26px 26px; display: grid; gap: 12px; align-content: start; position: relative; }
.level-num { font-family: var(--mono); font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; align-items: center; }
.level p { color: var(--muted); margin: 0; font-size: 16px; }
.level ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.level a.go { color: var(--led); text-decoration: none; font-weight: 650; font-size: 15px; margin-top: 4px; }
.level a.go:hover { text-decoration: underline; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; color: var(--muted); }
.check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 3px; margin: 0; display: grid; place-content: center; cursor: pointer; }
.check input:checked { background: var(--led); border-color: var(--led); }
.check input:checked::after { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--led-ink); border-bottom: 2px solid var(--led-ink); transform: rotate(-45deg) translate(1px, -1px); }
.level.is-done { background: oklch(0.82 0.2 142 / 0.05); }
@media (max-width: 900px) { .path { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .path { grid-template-columns: 1fr; } }

/* Herramientas (tarjetas) */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card {
  display: grid; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2);
  text-decoration: none; transition: border-color .15s, transform .15s, background .15s; align-content: start;
}
.tool-card:hover { border-color: var(--led); transform: translateY(-2px); background: var(--surface); }
.tool-card svg { width: 40px; height: 40px; color: var(--led); }
.tool-card p { color: var(--muted); margin: 0; font-size: 15.5px; }
.tool-card .tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tools-grid { grid-template-columns: 1fr; } }

/* Comparación */
.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.compare thead th { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.compare td { color: var(--muted); }
.compare .us { background: oklch(0.82 0.2 142 / 0.06); color: var(--text); }
.compare thead .us { color: var(--led); }
.compare td.us::before { content: '✓  '; color: var(--led); font-weight: 800; }
.compare-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 6px; }
.compare-wrap .compare { min-width: 640px; }

/* Sobre Victor */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.portrait { aspect-ratio: 4/5; border: 1px solid var(--line); border-radius: 6px; background: repeating-linear-gradient(135deg, var(--bg-2) 0 14px, var(--surface) 14px 15px); display: grid; place-content: center; text-align: center; color: var(--faint); font-family: var(--mono); font-size: 13px; padding: 20px; }
.about-body p { color: var(--muted); font-size: 18px; }
.about-body p strong { color: var(--text); }
.placeholder { background: oklch(0.83 0.15 78 / 0.14); color: var(--amber); padding: 0 4px; border-radius: 2px; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 360px; } }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line-soft); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-weight: 700; font-size: 19px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 18px; font-size: 26px; font-weight: 400; color: var(--led); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: -6px 0 22px; max-width: 70ch; }

/* CTA final + pie */
.cta { text-align: center; display: grid; justify-items: center; gap: 24px; }
.cta .lede { margin: 0 auto; }
.footer { border-top: 1px solid var(--line-soft); padding: 40px 0 56px; color: var(--faint); font-size: 14.5px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer a { text-decoration: none; color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ===== Página de herramientas ===== */
.tools-head { padding-block: clamp(40px, 6vw, 72px) 28px; }
.tools-head h1 { font-size: clamp(36px, 6vw, 72px); }
.tabs { position: sticky; top: 68px; z-index: 40; background: oklch(0.155 0.006 85 / 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.tabs-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; border: 1px solid transparent; background: none; padding: 9px 14px; border-radius: var(--radius); cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; }
.tab:hover { color: var(--text); background: var(--surface); }
.tab[aria-selected='true'] { background: var(--led); color: var(--led-ink); }
.panel { display: none; padding-block: 32px 80px; }
.panel.is-active { display: block; }
.panel-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.panel-head h2 { font-size: clamp(28px, 3.6vw, 42px); }
.panel-head p { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }

.lang button { font-family: var(--mono); font-size: 12px; padding: 6px 9px; letter-spacing: .06em; }
.prefs { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 12px 0 0; font-size: 14px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-size: 14px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed='true'] { background: var(--surface-2); color: var(--text); }

.board-card { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); min-width: 0; }
.board-scroll { overflow-x: auto; padding: 18px 16px 8px; scrollbar-width: thin; }
.board-scroll .fb { min-width: 820px; }
#ear-board.fb { min-width: 560px; }
.board-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px 16px; border-top: 1px solid var(--line-soft); align-items: center; }

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0; }
.control { display: grid; gap: 6px; }
.control label, .control .lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
select, .input {
  appearance: none; background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aaa' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 36px 11px 12px; font-size: 15.5px; cursor: pointer; width: 100%;
}
.input { background-image: none; padding-right: 12px; cursor: text; }
select:focus, .input:focus { border-color: var(--led); outline: none; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.info { border: 1px solid var(--line-soft); border-radius: 6px; padding: 20px; background: var(--bg); }
.info h3 { font-size: 15px; font-family: var(--mono); font-stretch: 100%; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.formula { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.formula div, .formula .f-note { min-width: 52px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 6px; }
.formula .f-note { min-width: 44px; padding: 7px 4px; cursor: pointer; color: inherit; font: inherit; border-radius: 12px; background: rgba(255,255,255,.04); transition: border-color .15s, background .15s, transform .1s, box-shadow .2s; }
.formula .f-note:hover { border-color: rgba(255,255,255,.35); transform: translateY(-1px); }
.formula .f-note.is-on { border-color: var(--amber); background: oklch(0.83 0.15 78 / .18); box-shadow: 0 0 18px oklch(0.83 0.15 78 / .3); }
.formula .f-note.is-root { border-color: var(--hot); }
.formula .f-note.is-root span { color: var(--hot); }
.formula .f-step { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 2px 6px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.formula b { display: block; font-size: 18px; }
.formula span { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.formula div.is-root { border-color: var(--hot); }
.formula div.is-root span { color: var(--hot); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 800px) { .info-grid { grid-template-columns: 1fr; } }

/* Juegos */
.game { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.game-side { display: grid; gap: 14px; }
.scoreboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; }
.scoreboard div { background: var(--bg-2); padding: 12px; text-align: center; }
.scoreboard b { display: block; font-family: var(--display); font-stretch: 120%; font-size: 26px; line-height: 1.1; }
.scoreboard span { font-family: var(--mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.prompt { border: 1px solid var(--line); border-radius: 6px; padding: 20px; background: var(--bg); text-align: center; }
.prompt .big { font-family: var(--display); font-stretch: 125%; font-weight: 850; font-size: 64px; line-height: 1; color: var(--led); text-shadow: 0 0 28px var(--led-glow); }
.prompt small { display: block; color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.feedback { min-height: 1.6em; font-weight: 650; text-align: center; }
.feedback.good { color: var(--led); }
.feedback.bad { color: var(--bad); }
.answer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.answer-grid button { border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 11px 4px; cursor: pointer; font-weight: 700; font-size: 15px; }
.answer-grid button:hover { border-color: var(--muted); }
.answer-grid button.good { background: var(--led); color: var(--led-ink); border-color: var(--led); }
.answer-grid button.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.string-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.string-picks label { display: inline-flex; }
.string-picks input { position: absolute; opacity: 0; pointer-events: none; }
.string-picks span { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.string-picks input:checked + span { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.string-picks input:focus-visible + span { outline: 2px solid var(--led); outline-offset: 2px; }
@media (max-width: 900px) { .game { grid-template-columns: 1fr; } .game > :last-child { order: -1; } }

/* Oído */
.ear { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ear .answer-grid { grid-template-columns: repeat(3, 1fr); }
.ear .answer-grid button { font-weight: 600; font-size: 14.5px; }
.play-big { width: 100%; padding: 22px; font-size: 18px; }
@media (max-width: 800px) { .ear { grid-template-columns: 1fr; } }

/* Círculo de quintas */
.circle-wrap { display: grid; grid-template-columns: minmax(280px, 520px) 1fr; gap: 32px; align-items: start; }
.circle-svg text { font-family: var(--body); font-weight: 750; pointer-events: none; }
.circle-svg .seg-maj { fill: var(--bg-2); stroke: var(--line); stroke-width: 1.5; cursor: pointer; transition: fill .15s; }
.circle-svg .seg-min { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; cursor: pointer; transition: fill .15s; }
.circle-svg .seg-maj:hover, .circle-svg .seg-min:hover { fill: var(--surface-2); }
.circle-svg .seg-maj.is-near, .circle-svg .seg-min.is-near { fill: oklch(0.82 0.2 142 / 0.16); }
.circle-svg .seg-maj.is-sel, .circle-svg .seg-min.is-sel { fill: var(--led); }
.circle-svg .t-maj { font-size: 22px; fill: var(--text); }
.circle-svg .t-min { font-size: 15px; fill: var(--muted); }
.circle-svg .t-sig { font-size: 11px; fill: var(--faint); font-family: var(--mono); font-weight: 500; }
.circle-svg .is-sel-text { fill: var(--led-ink); }
@media (max-width: 900px) { .circle-wrap { grid-template-columns: 1fr; } .circle-wrap > svg { max-width: 460px; margin: 0 auto; } }

/* Afinador */
.tuner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.tuner-face { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: 28px 20px; text-align: center; }
.tuner-note { font-family: var(--display); font-stretch: 125%; font-weight: 850; font-size: 92px; line-height: 1; }
.tuner-note sub { font-size: 28px; color: var(--faint); font-weight: 600; vertical-align: baseline; }
.tuner-face.in-tune .tuner-note { color: var(--led); text-shadow: 0 0 30px var(--led-glow); }
.meter { position: relative; height: 54px; margin: 22px auto 8px; max-width: 460px; }
.meter-scale { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%); border-bottom: 1px solid var(--line); }
.meter-center { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--led); transform: translateX(-1px); }
.meter-needle { position: absolute; left: 50%; top: 4px; bottom: 0; width: 4px; border-radius: 2px; background: var(--text); transform: translateX(-2px); transition: left .12s; }
.tuner-face.in-tune .meter-needle { background: var(--led); box-shadow: 0 0 12px var(--led); }
.meter-labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--faint); max-width: 460px; margin: 0 auto; }
.ref-strings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ref-strings button { border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 14px 0; cursor: pointer; font-weight: 800; font-size: 18px; }
.ref-strings button small { display: block; font-family: var(--mono); font-size: 11px; color: var(--faint); font-weight: 500; }
.ref-strings button:hover { border-color: var(--led); }
@media (max-width: 800px) { .tuner { grid-template-columns: 1fr; } }

/* Metrónomo */
.metro { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.metro-face { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: 28px 20px; text-align: center; }
.bpm { font-family: var(--display); font-stretch: 125%; font-weight: 850; font-size: 96px; line-height: 1; }
.bpm-label { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--faint); }
.beats { display: flex; justify-content: center; gap: 10px; margin: 22px 0; }
.beats span { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); transition: background .05s, box-shadow .05s; }
.beats span.on { background: var(--led); box-shadow: 0 0 14px var(--led); }
.beats span.on.accent { background: var(--hot); box-shadow: 0 0 14px var(--hot); }
/* Deslizadores dibujados a mano: el de Safari en fondo oscuro casi no se ve. --fill lo actualiza app.js. */
input[type='range'] { width: 100%; height: 24px; margin: 0; padding: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --fill: 50%; touch-action: pan-y; }
input[type='range']:focus { outline: none; }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--led) var(--fill), rgba(255,255,255,.18) var(--fill)); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -7px; border: 0; border-radius: 50%; background: #f4f4f4; box-shadow: 0 0 0 4px rgba(80,211,107,.28), 0 2px 8px rgba(0,0,0,.55); transition: transform .15s; }
input[type='range']:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type='range']:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--led), 0 2px 8px rgba(0,0,0,.55); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); }
input[type='range']::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--led); }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #f4f4f4; box-shadow: 0 0 0 4px rgba(80,211,107,.28), 0 2px 8px rgba(0,0,0,.55); }
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tempo-tip { font-size: 15px; color: var(--muted); }
@media (max-width: 800px) { .metro { grid-template-columns: 1fr; } }

/* ===== Practica tu riff ===== */
kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; color: var(--muted); }
.transport { position: sticky; top: 68px; z-index: 40; background: oklch(0.155 0.006 85 / 0.94); backdrop-filter: blur(10px); border-block: 1px solid var(--line-soft); }
.transport-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-block: 12px; }
.t-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.t-play { width: 52px; height: 46px; padding: 0; font-size: 18px; }
.t-pos { font-size: 22px; font-weight: 700; min-width: 74px; color: var(--led); }
.t-field { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.t-bpm { width: 76px; padding: 8px 10px; font-family: var(--mono); font-size: 16px; text-align: center; }
#r-bpm-range { width: 160px; }
.riff-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; padding-block: 24px 20px; align-items: start; }
.library { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); display: flex; flex-direction: column; max-height: 620px; min-width: 0; }
.lib-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 14px 8px; }
.lib-title { font-size: 15px; font-family: var(--mono); font-stretch: 100%; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.lib-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; border-bottom: 1px solid var(--line-soft); }
.lib-cats .chip { font-size: 13px; padding: 5px 9px; align-items: center; }
.lib-cats .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.72 0.15 var(--hue)); display: inline-block; }
.lib-cats .chip[aria-pressed='true'] { background: oklch(0.72 0.15 var(--hue)); border-color: oklch(0.72 0.15 var(--hue)); color: oklch(0.18 0.03 var(--hue)); }
.lib-cats .chip[aria-pressed='true'] .dot { background: oklch(0.18 0.03 var(--hue)); }
.lib-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.lib-item { display: grid; grid-template-columns: 34px 1fr auto 34px; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 4px; cursor: grab; border-left: 3px solid oklch(0.72 0.15 var(--hue)); margin-bottom: 4px; background: var(--bg); }
.lib-item:hover { background: var(--surface); }
.lib-name { font-weight: 600; font-size: 15px; }
.lib-bars { font-size: 12px; color: var(--faint); }
.lib-play, .lib-add { width: 34px; height: 32px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 3px; cursor: pointer; font-size: 13px; }
.lib-add { font-size: 18px; color: var(--led); }
.lib-play:hover, .lib-add:hover { border-color: var(--led); }
.editor { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); min-width: 0; }
.ed-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); min-height: 60px; }
.ed-sel { font-size: 15px; color: var(--muted); }
.ed-sel b { color: var(--text); }
.ed-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-tools .btn:disabled { opacity: .35; cursor: default; }
.timeline { overflow-x: auto; overflow-y: hidden; position: relative; background: var(--bg); scrollbar-width: thin; }
.tl-inner { position: relative; height: 154px; min-width: 100%; }
.tl-ruler { position: absolute; inset: 0 0 auto 0; height: 28px; border-bottom: 1px solid var(--line); cursor: pointer; background: var(--bg-2); }
.tl-bar { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-soft); padding: 5px 0 0 5px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.tl-bar.is-major { border-left-color: var(--line); color: var(--muted); }
.tl-lane { position: absolute; top: 28px; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(90deg, var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, oklch(0.26 0.008 85 / .45) 1px, transparent 1px); }
.clip { position: absolute; top: 18px; height: 92px; border-radius: 5px; overflow: hidden; cursor: grab; touch-action: none;
  background: oklch(0.42 0.11 var(--hue) / .55); border: 1px solid oklch(0.72 0.15 var(--hue)); box-shadow: inset 0 3px 0 oklch(0.72 0.15 var(--hue)); user-select: none; }
.clip:active { cursor: grabbing; }
.clip.is-sel { outline: 2px solid var(--text); outline-offset: 1px; z-index: 2; }
.clip.is-bad { border-color: var(--bad); background: oklch(0.64 0.22 25 / .35); }
.clip-name { padding: 7px 8px 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: oklch(0.97 0.01 var(--hue)); pointer-events: none; }
.clip-mini { position: absolute; left: 0; bottom: 10px; pointer-events: none; }
.clip-rep { position: absolute; top: 0; bottom: 0; border-left: 1px dashed oklch(1 0 0 / .45); pointer-events: none; }
.clip-resize { position: absolute; top: 0; right: 0; bottom: 0; width: 12px; cursor: ew-resize; background: linear-gradient(90deg, transparent, oklch(1 0 0 / .25)); }
.clip-resize::after { content: ''; position: absolute; right: 4px; top: 50%; width: 2px; height: 22px; margin-top: -11px; background: oklch(1 0 0 / .7); border-radius: 1px; }
.tl-loop { position: absolute; top: 0; height: 6px; background: var(--led); opacity: .8; pointer-events: none; border-radius: 0 0 2px 2px; }
.tl-loop[hidden] { display: none; }
.tl-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--led); box-shadow: 0 0 10px var(--led); pointer-events: none; z-index: 3; }
.ed-foot { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.ed-foot select { padding-block: 7px; }
.ed-hint { padding: 0 14px 14px; }
.mixer-wrap { padding-bottom: 80px; }
.mixer { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 12px; }
.mixer label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 6px; padding: 14px; background: var(--bg-2); }
@media (max-width: 900px) {
  .riff-grid { grid-template-columns: 1fr; }
  .library { max-height: 340px; order: 2; }
  .mixer { grid-template-columns: repeat(2, 1fr); }
  .transport { position: static; }
  #r-bpm-range { width: 120px; }
}

/* ===== Fondo animado y "dark liquid glass" =====
   El metal fundido (js/backgrounds.js) vive en .bg-metal, fijo detrás de todo.
   Los bloques son vidrio oscuro: translúcidos, con desenfoque y un brillo en el borde superior. */
:root {
  --glass-bg: linear-gradient(140deg, rgba(255,255,255,.075), rgba(255,255,255,.012) 38%, rgba(0,0,0,.22)), rgba(10,10,10,.46);
  --glass-border: rgba(255,255,255,.10);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(255,255,255,.035), 0 24px 60px -24px rgba(0,0,0,.85);
  --glass-blur: blur(22px) saturate(150%);
  --radius-glass: 18px;
}
html { background: #000; }
body { background: transparent; } /* si body tuviera fondo, taparía el metal (z-index negativo) */
.bg-metal { position: fixed; inset: 0; z-index: -2; background: #000; pointer-events: none; }
.bg-metal canvas, .hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s ease; }
.bg-metal.is-live canvas { opacity: .8; }
.hero-bg.is-live canvas { opacity: .7; }
.bg-metal::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(0,0,0,.55)); }

.stage, .tool-card, .level, .compare-wrap, .faq details, .portrait, .board-card, .info, .prompt, .scoreboard,
.tuner-face, .metro-face, .library, .editor, .mixer label, .glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-glass);
}
.nav, .tabs, .transport {
  background: rgba(0,0,0,.42);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-color: rgba(255,255,255,.07);
}
.section { border-top-color: rgba(255,255,255,.05); }
.tool-card:hover { background: linear-gradient(140deg, rgba(255,255,255,.11), rgba(255,255,255,.02) 40%, rgba(0,0,0,.2)), rgba(14,14,14,.5); border-color: rgba(255,255,255,.2); }
.path { background: none; border: 0; gap: 14px; }
.level.is-done { background: linear-gradient(140deg, rgba(90,220,110,.14), rgba(255,255,255,.01) 45%), rgba(10,10,10,.46); }
.stage { border-radius: 22px; }
.stage-bar, .stage-panel { border-color: rgba(255,255,255,.07); }
.board-foot, .ed-bar, .ed-foot, .lib-cats { border-color: rgba(255,255,255,.07); }
.faq { border-top: 0; display: grid; gap: 10px; }
.faq details { border-bottom: 1px solid var(--glass-border); padding: 0 22px; }
.compare th, .compare td { border-bottom-color: rgba(255,255,255,.06); }
.prompt, .tuner-face, .metro-face { border-radius: 22px; }
.scoreboard { gap: 0; }
.scoreboard div { background: transparent; border-right: 1px solid rgba(255,255,255,.06); }
.scoreboard div:last-child { border-right: 0; }
.timeline, .tl-ruler, .lib-item, .formula div, .ref-strings button, .answer-grid button, .chip, select, .input, .seg, .btn {
  background-color: rgba(255,255,255,.035);
}
.lib-item { background: rgba(0,0,0,.28); }
.timeline { background: rgba(0,0,0,.35); }
.tl-ruler { background: rgba(255,255,255,.03); }
.btn, .chip, select, .input, .seg, .answer-grid button, .ref-strings button { border-color: rgba(255,255,255,.12); border-radius: 10px; }
.seg { overflow: hidden; }
.btn-primary { background: var(--led); }
.chip[aria-pressed='true'] { background: var(--amber); }
.tab[aria-selected='true'] { background: var(--led); }
.tab { border-radius: 10px; }
a.tab { text-decoration: none; display: inline-flex; align-items: center; }

/* Portada: fondo negro con hilos que se funde con el metal hacia abajo. */
.hero { isolation: isolate; }
.hero::before { display: none; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1; background: #000; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 420px), rgba(0,0,0,.6) calc(100% - 200px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 420px), rgba(0,0,0,.6) calc(100% - 200px), transparent 100%);
}
.hero { padding-bottom: 120px; }

/* ===== Entrenador de oído ===== */
.et { padding-block: clamp(40px, 6vw, 72px) 96px; display: grid; gap: 20px; }
.et-head { display: grid; gap: 18px; margin-bottom: 8px; }
.et-head h1 { font-size: clamp(38px, 6.4vw, 78px); }
.et-modes { display: flex; gap: 6px; padding: 6px; border-radius: 999px; justify-self: start; flex-wrap: wrap; }
.et-modes button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; color: var(--muted); padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 650; font-size: 15.5px; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.et-modes button:hover { color: var(--text); }
.et-modes button[aria-selected='true'] { color: var(--text); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 24px rgba(255,255,255,.06); }
.et-mode-ico { font-size: 14px; opacity: .8; }
.et-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.et-orb-card { padding: 22px 22px 18px; text-align: center; display: grid; gap: 6px; align-content: start; border-radius: 26px; }
.et-orb { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin: 0 auto; }
.et-orb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.et-play {
  position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), rgba(255,255,255,.06) 55%, rgba(0,0,0,.35)), rgba(20,20,20,.5);
  border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 40px rgba(0,0,0,.6), 0 0 0 0 rgba(255,255,255,.25);
  display: grid; place-items: center; transition: transform .15s, border-color .3s, box-shadow .3s;
}
.et-play:hover { transform: scale(1.05); }
.et-play:active { transform: scale(.97); }
.et-play svg { width: 40px; height: 40px; }
.et-play .ico-again, .et-play.is-replay .ico-play { display: none; }
.et-play.is-replay .ico-again { display: block; width: 34px; height: 34px; }
.et-play:not(.is-replay) { animation: et-pulse 2.4s ease-out infinite; }
@keyframes et-pulse { 0% { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 40px rgba(0,0,0,.6), 0 0 0 0 rgba(255,255,255,.28); } 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 40px rgba(0,0,0,.6), 0 0 0 26px rgba(255,255,255,0); } }
.et-orb[data-state='good'] .et-play { border-color: var(--led); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 40px var(--led-glow); }
.et-orb[data-state='bad'] .et-play { border-color: var(--bad); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 40px oklch(0.64 0.22 25 / .5); }
.et-question { font-family: var(--display); font-stretch: 112%; font-weight: 750; font-size: clamp(20px, 2.2vw, 26px); margin: 4px 0 0; }
.et-feedback { min-height: 1.6em; margin: 0; font-weight: 650; }
.et-feedback.good { color: var(--led); }
.et-feedback.bad { color: var(--bad); }
.et-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.et-actions .btn:disabled { opacity: .35; cursor: default; }
.et-keys { margin: 8px 0 0; }
.et-side { display: grid; gap: 20px; align-content: start; }
.et-panel { padding: 20px; min-width: 0; }
.et > *, .et-side > * { min-width: 0; }
.et-opts { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 16px; }
.et-opts select { width: auto; padding-block: 8px; }
.et-answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.et-answer {
  position: relative; text-align: left; display: grid; gap: 2px; padding: 14px 14px 12px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(150deg, rgba(255,255,255,.07), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1); transition: transform .12s, border-color .2s, background .2s, box-shadow .2s;
}
.et-answer:hover { border-color: rgba(255,255,255,.28); transform: translateY(-1px); }
.et-answer b { font-size: 15.5px; }
.et-answer small { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.et-answer kbd { position: absolute; top: 10px; right: 10px; font-size: 10.5px; padding: 0 4px; }
.et-answer.good { border-color: var(--led); background: linear-gradient(150deg, rgba(90,220,110,.3), rgba(90,220,110,.06)); box-shadow: 0 0 26px var(--led-glow); }
.et-answer.bad { border-color: var(--bad); background: linear-gradient(150deg, rgba(240,80,70,.28), rgba(240,80,70,.05)); }
.et-stats { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.et-ring { position: relative; width: 116px; height: 116px; flex: none; }
.et-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.et-ring circle { fill: none; stroke-width: 8; }
.et-ring .ring-bg { stroke: rgba(255,255,255,.08); }
.et-ring .ring-fg { stroke: var(--led); stroke-linecap: round; filter: drop-shadow(0 0 6px var(--led-glow)); transition: stroke-dashoffset .6s ease; }
.et-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.et-ring b { font-family: var(--display); font-stretch: 120%; font-size: 26px; line-height: 1; }
.et-ring span { font-family: var(--mono); font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.et-nums { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; min-width: 200px; }
.et-nums b { display: block; font-family: var(--display); font-stretch: 120%; font-size: 26px; line-height: 1.1; }
.et-nums span { font-family: var(--mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.et-lower { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.et-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.et-lower .board-scroll { padding: 6px 0 0; }
#et-board.fb { min-width: 640px; }
.et-bars { display: grid; gap: 9px; }
.et-bar { display: grid; grid-template-columns: minmax(90px, 1fr) 1.4fr 74px; gap: 12px; align-items: center; font-size: 14px; }
.et-bar i { height: 8px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.et-bar em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6e6e6e, var(--led)); transition: width .6s ease; }
.et-bar small { font-family: var(--mono); color: var(--faint); font-size: 12px; text-align: right; }
.et-bar.is-empty span { color: var(--faint); }
.et-tips ul { margin: 12px 0 0; padding-left: 18px; columns: 2; column-gap: 32px; font-size: 15px; }
.et-tips li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 960px) {
  .et-grid, .et-lower { grid-template-columns: minmax(0, 1fr); }
  .et-tips ul { columns: 1; }
}
@media (max-width: 520px) {
  .et-modes { border-radius: 18px; display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; }
  .et-modes button { justify-content: center; }
  .et-modes button { padding: 9px 12px; font-size: 14.5px; }
  .et-play { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
}

/* ===== Scroll suave (Lenis, ver js/smooth.js) ===== */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }   /* Lenis hace la animación; el smooth nativo la estorbaría */
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ===== Modo app: solo horizontal ===== */
.wrap { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
html.is-app, html.is-app body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.app-rot { position: fixed; inset: 0; overflow: hidden; }
.app-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: clip; overscroll-behavior: none; -webkit-overflow-scrolling: touch; }
/* En táctil, los tamaños salen de unidades CSS: cambian en el mismo instante en que gira la pantalla
   (las variables puestas desde JS llegaban tarde y la app daba un salto al terminar el giro). */
html.can-rot { --vw: 100vw; --vh: 100dvh; --app-w: 100vw; --app-h: 100dvh; }
@media (orientation: portrait) { html.can-rot { --app-w: 100dvh; --app-h: 100vw; } }
/* iOS ignora la orientación del manifest: si el teléfono está en vertical, la app entera se gira 90°. */
@media (orientation: portrait) {
  html.is-app.can-rot .app-rot { inset: auto; top: 0; left: 0; width: var(--vh, 100vh); height: var(--vw, 100vw); transform-origin: 0 0; transform: translateX(var(--vw, 100vw)) rotate(90deg); }
}

/* Móvil en horizontal (el modo de la app): poca altura, se aprovecha el ancho. */
@media (orientation: landscape) and (max-height: 520px) {
  .et-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .et-orb { max-width: 240px; }
  .et-orb-card { padding: 14px; }
  .et-head h1, .tools-head h1 { font-size: clamp(30px, 5vw, 44px); }
  .et-head .lede, .et-keys { display: none; }
  .et { padding-top: 28px; }
  .hero h1 { font-size: clamp(34px, 6vw, 52px); }
}


/* ===== Cabecera: el logo es el menú ===== */
.nav { background: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,0)) !important; border-bottom: 0; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; pointer-events: none; }
.nav-inner { display: flex; justify-content: flex-start; align-items: center; height: 76px; padding-left: max(18px, env(safe-area-inset-left)); }
.logo-bubble {
  pointer-events: auto; position: relative; width: 58px; height: 58px; border-radius: 50%; cursor: pointer; padding: 0; color: #f2f2f2;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 15%, rgba(255,255,255,.14), rgba(255,255,255,.03) 45%, rgba(0,0,0,.2)), rgba(12,12,12,.38);
  border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.28), inset 0 -10px 18px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.4);
  transition: transform .45s cubic-bezier(.2,.9,.2,1.35), box-shadow .3s, border-color .3s;
}
.logo-bubble::before { content: ''; position: absolute; top: 5px; left: 14px; width: 24px; height: 10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.35), transparent); filter: blur(1px); pointer-events: none; }
.logo-bubble:hover { transform: scale(1.07); border-color: rgba(255,255,255,.26); box-shadow: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -10px 18px rgba(0,0,0,.35), 0 10px 34px rgba(0,0,0,.5), 0 0 24px var(--led-glow); }
.logo-bubble:active { transform: scale(.93); }
.logo-bubble:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; }
.logo-svg { width: 34px; height: 34px; grid-area: 1 / 1; transition: opacity .2s, transform .45s cubic-bezier(.2,.9,.2,1.3); filter: drop-shadow(0 0 6px rgba(80,211,107,.25)); }
.logo-bubble:hover .logo-svg { transform: rotate(-8deg); }
.logo-bubble.is-out .logo-svg { opacity: 0; transition: none; }
.burger-lines { grid-area: 1 / 1; position: relative; display: block; width: 22px; height: 14px; }
.burger-lines i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: #f2f2f2; box-shadow: 0 0 6px rgba(255,255,255,.3);
  transition: transform .45s cubic-bezier(.65,0,.35,1), opacity .25s, width .3s; }
.burger-lines i:nth-child(1) { top: 0; }
.burger-lines i:nth-child(2) { top: 6px; width: 70%; left: auto; right: 0; }
.burger-lines i:nth-child(3) { top: 12px; }
.logo-bubble:hover .burger-lines i:nth-child(2) { width: 100%; }
.menu-open .burger-lines i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger-lines i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.menu-open .burger-lines i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.bubble-x { display: none; }

/* Menú: panel que entra deslizándose desde la izquierda */
.menu-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.menu-open .menu-scrim { opacity: 1; pointer-events: auto; }
html.menu-open .nav { z-index: 63 !important; }
.menu-panel {
  position: fixed; z-index: 61; top: 0; bottom: 0; left: 0; width: min(340px, 86%); display: flex; flex-direction: column; overflow-y: auto;
  padding: calc(max(10px, env(safe-area-inset-top)) + 78px) 18px max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%), rgb(14,14,14);
  border-right: 1px solid rgba(255,255,255,.1); box-shadow: 30px 0 70px -25px rgba(0,0,0,.9);
  transform: translateX(-102%); visibility: hidden;
  transition: transform .5s cubic-bezier(.22,1,.36,1), visibility 0s linear .5s;
}
.menu-open .menu-panel { transform: none; visibility: visible; transition: transform .5s cubic-bezier(.22,1,.36,1), visibility 0s; }
.menu-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu-links li { opacity: 0; transform: translateX(-16px); transition: opacity .25s ease, transform .35s cubic-bezier(.22,1,.36,1); }
.menu-open .menu-links li { opacity: 1; transform: none; transition-duration: .4s, .5s; transition-delay: calc(.1s + var(--i) * .05s); }
.menu-links a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; text-decoration: none; font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 22px; color: var(--text); transition: background .2s, color .2s; }
.menu-links a:hover, .menu-links a:focus-visible { background: rgba(255,255,255,.06); color: var(--led); outline: none; }
.menu-links a[aria-current='page'] { color: var(--led); background: color-mix(in oklab, var(--led) 10%, transparent); box-shadow: inset 3px 0 0 var(--led); }
.menu-label { position: relative; }
.menu-num { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--faint); letter-spacing: .08em; min-width: 18px; }
.menu-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding: 16px 4px 2px; border-top: 1px solid rgba(255,255,255,.08); opacity: 0; transition: opacity .3s; }
.menu-open .menu-foot { opacity: 1; transition-delay: .3s; }
.menu-foot .seg, .menu-foot .pedal { border-radius: 99px; }
@media (max-height: 560px) {
  .menu-panel { padding-top: calc(max(8px, env(safe-area-inset-top)) + 66px); }
  .menu-links { gap: 2px; }
  .menu-links a { font-size: 18px; padding: 8px 12px; }
  .menu-foot { padding-top: 10px; }
}

/* App girada (iPhone en vertical): las mismas reglas compactas que un móvil en horizontal. */
@media (orientation: portrait) {
  html.is-app .et-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  html.is-app .et-orb { max-width: 240px; }
  html.is-app .et-head .lede, html.is-app .et-keys { display: none; }
}

/* ===== Intro: esfera de puntos → púa → big bang ===== */
html.intro-on::after { content: ''; position: fixed; inset: 0; z-index: 9998; background: #000; }
.intro { position: fixed; inset: 0; z-index: 9999; background: #000; transition: background-color .9s ease .05s; touch-action: none; }
.intro canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro.is-bang { background-color: transparent; pointer-events: none; }

/* ===== Acerca: foto ===== */
.portrait { margin: 0; overflow: hidden; padding: 0; background: none; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.about-link { display: inline-block; margin-top: 6px; color: var(--muted); text-decoration: none; font-size: 15px; }
.about-link:hover { color: var(--led); }

/* ===== Pie: preguntas en casillas + redes ===== */
.footer { border-top: 1px solid rgba(255,255,255,.06); padding: 72px 0 40px; margin-top: 40px; color: var(--faint); }
.foot-head { margin-bottom: 26px; }
.foot-head h2, .foot-follow h2 { font-family: var(--display); font-stretch: 115%; font-weight: 850; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.05; margin: 6px 0 0; color: var(--text); }
.faq-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; align-items: start; grid-auto-flow: dense; }
.faq-file {
  position: relative; border-radius: 18px; margin-top: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.015) 50%), rgba(10,10,10,.5);
  border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 30px -14px rgba(0,0,0,.7);
  transition: border-color .3s, box-shadow .3s;
}
.faq-file[open] summary { min-height: 0; }
.faq-file[open] { grid-column: 1 / -1; border-color: rgba(80,211,107,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 0 0 1px rgba(80,211,107,.08), 0 20px 50px -18px rgba(0,0,0,.8); }
.faq-file summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 14px; padding: 22px 20px 20px; min-height: 104px; font-weight: 750; font-size: 17px; line-height: 1.35; color: var(--text); }
.faq-file summary::-webkit-details-marker { display: none; }
.faq-file summary:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; border-radius: 18px; }
/* Pestaña de carpeta de archivador */
.ff-tab { position: absolute; top: -14px; left: 18px; padding: 2px 12px 4px; border-radius: 10px 10px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted);
  background: rgba(22,22,22,.85); border: 1px solid rgba(255,255,255,.1); border-bottom: 0; }
.faq-file[open] .ff-tab { color: var(--led-ink); background: var(--led); border-color: var(--led); }
.ff-q { flex: 1; }
.ff-plus { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); position: relative; transition: transform .45s cubic-bezier(.2,.9,.2,1.3), background .3s; }
.ff-plus::before, .ff-plus::after { content: ''; position: absolute; left: 7px; top: 12px; width: 10px; height: 1.5px; background: var(--led); }
.ff-plus::after { transform: rotate(90deg); }
.faq-file[open] .ff-plus { transform: rotate(135deg); background: rgba(80,211,107,.12); }
.faq-file summary:hover .ff-plus { background: rgba(255,255,255,.06); }
.ff-a { padding: 0 20px 22px 20px; perspective: 900px; }
.ff-a p { margin: 0; color: var(--muted); max-width: 72ch; transform-origin: 0 0; }
.ff-a a { color: var(--led); }
.faq-file[open] .ff-a p { animation: fan-open .75s cubic-bezier(.2,.9,.2,1) both; }
@keyframes fan-open {
  from { opacity: 0; transform: rotateX(-75deg) rotate(-7deg) translateY(-8px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
/* Al aparecer, las casillas se abren en abanico desde un mazo. */
.faq-files.reveal { opacity: 1; transform: none; }
.faq-files.reveal .faq-file { opacity: 0; transform-origin: 50% 320%; transform: rotate(calc((var(--i) - 1.5) * -9deg)) translateY(40px); transition: opacity .6s, transform .9s cubic-bezier(.2,.9,.2,1.08); transition-delay: calc(var(--i) * .07s); }
.faq-files.reveal.is-in .faq-file { opacity: 1; transform: none; }

.foot-follow { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px 48px; align-items: center; margin: 72px 0 56px; padding: clamp(24px, 4vw, 44px); border-radius: 28px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(80,211,107,.14), transparent 55%), rgba(10,10,10,.5);
  border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.foot-follow p:not(.eyebrow) { color: var(--muted); margin: 12px 0 0; max-width: 46ch; }
.follow-links { display: grid; gap: 10px; }
.about-body .follow-links { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 28px; }
.follow-btn { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); transition: background .25s, border-color .25s, transform .35s cubic-bezier(.2,.9,.2,1.3); }
.follow-btn svg { width: 26px; height: 26px; flex: none; color: var(--led); }
.follow-btn span { display: grid; line-height: 1.2; }
.follow-btn b { font-weight: 750; }
.follow-btn small { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.follow-btn:hover { background: rgba(80,211,107,.1); border-color: rgba(80,211,107,.4); transform: translateY(-2px); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.06); font-size: 14.5px; }
@media (max-width: 760px) { .foot-follow { grid-template-columns: 1fr; } }
.foot-donate { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; margin: -32px 0 56px; padding: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 44px); border-radius: 28px;
  background: radial-gradient(120% 160% at 100% 0%, rgba(255,120,150,.14), transparent 55%), rgba(10,10,10,.5);
  border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.foot-donate > div { flex: 1; min-width: 240px; }
.foot-donate h2 { font-family: var(--display); font-stretch: 115%; font-weight: 850; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.1; margin: 0; color: var(--text); }
.foot-donate p { color: var(--muted); margin: 8px 0 0; max-width: 56ch; }
.fd-heart { font-size: 34px; color: oklch(0.72 0.18 10); text-shadow: 0 0 18px oklch(0.72 0.18 10 / .6); animation: fd-beat 1.6s ease-in-out infinite; }
@keyframes fd-beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1.04); } 45% { transform: scale(1.12); } }
.footer a.fd-btn { color: var(--led-ink); padding: 13px 28px; font-size: 16px; }

/* ===== Etiqueta "Menú" junto a la burbuja ===== */
.bubble-word { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); display: grid; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; pointer-events: none; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.bubble-word > span { grid-area: 1 / 1; transition: opacity .3s, transform .3s; }
.bw-close { opacity: 0; transform: translateY(6px); }
.menu-open .bw-open { opacity: 0; transform: translateY(-6px); }
.menu-open .bw-close { opacity: 1; transform: none; }
.logo-bubble:hover .bubble-word { color: var(--led); }
.pro-badge { margin-left: auto; align-self: center; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; padding: 3px 7px; border-radius: 99px; color: var(--led-ink); background: var(--led); box-shadow: 0 0 12px var(--led-glow); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Herramientas: título y selector tipo dock ===== */
.tools-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title prefs' 'dock dock'; gap: 18px 20px; align-items: start; }
.tools-title { grid-area: title; }
.tools-sub { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); margin: 12px 0 4px; max-width: 52ch; }
.dock-wrap { grid-area: dock; display: grid; gap: 8px; justify-items: start; }
.dock-cap { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.dock { display: flex; gap: 6px; padding: 6px; border-radius: 24px; overflow-x: auto; max-width: 100%; scrollbar-width: none;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.015)), rgba(10,10,10,.45);
  border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 16px 40px -18px rgba(0,0,0,.8); }
.dock::-webkit-scrollbar { display: none; }
.dock .tab { display: grid; justify-items: center; gap: 5px; min-width: 84px; padding: 10px 12px 8px; border-radius: 18px; border: 1px solid transparent; background: none; color: var(--muted); font-size: 12.5px; font-weight: 650; cursor: pointer; transition: background .25s, color .25s, transform .35s cubic-bezier(.2,.9,.2,1.3), border-color .25s; }
.dock .tab svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s cubic-bezier(.2,.9,.2,1.4); }
.dock .tab svg .f { fill: currentColor; stroke: none; }
.dock .tab:hover { color: var(--text); background: rgba(255,255,255,.05); }
.dock .tab:hover svg { transform: translateY(-2px) scale(1.06); }
.dock .tab[aria-selected='true'] { color: var(--led); background: rgba(80,211,107,.1); border-color: rgba(80,211,107,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 22px rgba(80,211,107,.15); }
.dock .tab[aria-selected='true'] svg { filter: drop-shadow(0 0 6px var(--led-glow)); }
.prefs-pop { grid-area: prefs; position: relative; justify-self: end; }
.prefs-pop summary { list-style: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); transition: color .2s, transform .4s; }
.prefs-pop summary::-webkit-details-marker { display: none; }
.prefs-pop summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.prefs-pop[open] summary, .prefs-pop summary:hover { color: var(--led); }
.prefs-pop[open] summary { transform: rotate(60deg); }
.prefs-pop .prefs { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: max-content; max-width: min(92vw, 520px); padding: 14px; border-radius: 20px;
  background: rgba(14,14,14,.82); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); }

/* ===== Modo pantalla: horizontal, sin scroll de página ===== */
html.fit, html.fit body { height: var(--app-h, 100dvh); overflow: hidden; }
html.fit .app-scroll { overflow: hidden; }
html.fit .footer { display: none; }
html.fit .nav { position: fixed; top: 0; left: 0; z-index: 50; background: none !important; }
html.fit .nav-inner { height: auto; padding: max(8px, env(safe-area-inset-top)) 0 0 max(10px, env(safe-area-inset-left)); justify-content: flex-start; }
html.fit .logo-bubble { width: 46px; height: 46px; }
html.fit .burger-lines { width: 19px; }
html.fit .bubble-word { display: none; }
html.fit main { height: var(--app-h, 100dvh); display: flex; flex-direction: column; overflow: hidden; }
html.fit .wrap { max-width: none; }

/* Herramientas */
/* El título deja sitio a la burbuja del menú, que respeta el margen del notch / isla del iPhone. */
html.fit .tools-head { flex: none; display: flex; align-items: center; gap: 12px; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px calc(max(10px, env(safe-area-inset-left)) + 58px); }
html.fit .tools-title { min-width: 0; flex: 1; }
html.fit .tools-title .eyebrow, html.fit .about-link, html.fit .dock-cap { display: none; }
html.fit .tools-head h1 { font-size: clamp(17px, 2.3vw, 30px); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) {
  html.fit .tools-head .dock .tab { min-width: 52px; padding: 5px 6px 4px; font-size: 9.5px; }
  html.fit .tools-head .dock .tab svg { width: 20px; height: 20px; }
  html.fit .tools-head { gap: 8px; }
}
html.fit .tools-sub { font-size: 12px; margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.fit .dock-wrap { flex: none; }
html.fit .dock { padding: 4px; border-radius: 18px; gap: 2px; }
html.fit .dock .tab { min-width: 62px; padding: 5px 8px 4px; gap: 2px; font-size: 10.5px; border-radius: 14px; }
html.fit .dock .tab svg { width: 22px; height: 22px; }
html.fit .prefs-pop summary { width: 38px; height: 38px; }
html.fit .panel.is-active { flex: 1; min-height: 0; padding: 0 max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); overflow: hidden; }
html.fit .panel-head { display: none; }
html.fit .info { padding: 10px 12px; }
html.fit .info h3 { margin-bottom: 6px; }
html.fit .board-scroll { padding: 6px 8px 2px; }
html.fit [data-lenis-prevent], html.fit .fit-scroll { overscroll-behavior: contain; }
/* Navegador: controles a la izquierda, mástil y teoría a la derecha */
html.fit #navegador.is-active { display: grid; grid-template-columns: clamp(180px, 15vw, 240px) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); align-content: start; gap: 6px 12px; }
html.fit #navegador .panel-head { display: block; grid-column: 2; margin: 0; }
html.fit #navegador .panel-head h2 { font-size: 17px; }
html.fit .panel-head p { display: none; }
html.fit #navegador .controls { grid-column: 1; grid-row: 1 / 4; min-height: 0; grid-template-columns: 1fr; gap: 6px; margin: 0; overflow-y: auto; align-content: start; padding-right: 2px; }
html.fit .control label, html.fit .control .lbl { font-size: 10px; }
html.fit .control select { padding-block: 6px; font-size: 14px; }
html.fit #navegador .board-card { grid-column: 2; grid-row: 2; }
html.fit #navegador .board-scroll, html.fit #juego .board-scroll { overflow: hidden; padding: 6px 10px 2px; }
/* El mástil conserva su forma; si no cabe a lo alto se limita y se centra.
   La fórmula y los acordes van justo debajo, sin huecos; el espacio sobrante queda al final. */

html.fit #nav-board .fb-svg, html.fit #game-board .fb-svg { display: block; width: 100%; height: auto; max-height: max(110px, calc(var(--app-h, 100dvh) - 270px)); margin: 0 auto; }
html.fit #navegador .board-scroll .fb, html.fit #juego .board-scroll .fb { min-width: 0; width: auto; }
html.fit .board-scroll .fb { min-width: 560px; }
html.fit #navegador .board-foot { padding: 3px 10px; gap: 8px; }
html.fit #navegador .board-foot .btn { padding: 4px 12px; font-size: 13px; }
html.fit #navegador .board-foot .check { font-size: 13px; }
html.fit #navegador .formula .f-note { min-width: 34px; padding: 3px 4px; border-radius: 9px; }
html.fit #navegador .formula b { font-size: 15px; }
html.fit #navegador .formula span { font-size: 10.5px; }
html.fit #navegador .formula .f-step { font-size: 10px; padding: 1px 4px; }
html.fit #navegador .legend { display: none; }
html.fit #navegador .info-grid { grid-column: 2; grid-row: 3; align-self: start; margin: 0; gap: 8px; min-height: 0; max-height: 100%; overflow-y: auto; align-content: start; align-items: start; }
html.fit #navegador .info-grid .muted { font-size: 13px; margin-top: 6px !important; }
/* Juego */
html.fit #juego .game { height: 100%; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: stretch; }
html.fit #juego .game > :last-child { order: 0; display: flex !important; flex-direction: column; min-height: 0; overflow: hidden; gap: 8px !important; }
html.fit #juego .board-card { flex: none; }
html.fit #juego .game-side { align-content: start; }
html.fit #juego .feedback:empty { display: none; }
html.fit #juego .game-side { overflow-y: auto; gap: 8px; }
html.fit #juego .prompt { padding: 8px 14px; }
html.fit #juego .prompt .big { font-size: clamp(26px, 4vw, 44px); }
html.fit .scoreboard b { font-size: 20px; }
/* Círculo */
html.fit #circulo .circle-wrap { height: 100%; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: stretch; }
html.fit #circulo .circle-wrap { grid-template-rows: minmax(0, 1fr); }
html.fit #circulo .circle-svg { --c: min(calc(var(--app-h, 100dvh) - 86px), 48vw); width: var(--c); height: var(--c); max-width: none; }
html.fit #circulo .circle-wrap > div { overflow-y: auto; gap: 8px !important; align-content: start; }
/* Afinador y metrónomo */
html.fit #afinador .tuner, html.fit #metronomo .metro { height: 100%; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
html.fit #afinador .tuner > div:last-child, html.fit #metronomo .metro > div:last-child { overflow-y: auto; align-content: start; }
html.fit .tuner-face, html.fit .metro-face { padding: 12px 16px; display: grid; align-content: center; }
html.fit .tuner-note { font-size: clamp(36px, calc(var(--app-h, 100dvh) * .11), 80px); }
html.fit .meter { height: 34px; margin: 10px auto 4px; }
html.fit #t-freq { margin: 6px 0 8px !important; }
html.fit .tuner-face .btn { padding-block: 9px; }
html.fit .bpm { font-size: clamp(40px, calc(var(--app-h, 100dvh) * .14), 96px); }
html.fit .tempo-tip { font-size: 14px; }
@media (orientation: portrait) {
  /* App girada: el ancho de la app es el alto del teléfono, las unidades vw no sirven aquí */
  html.is-app.fit #circulo .circle-svg { --c: min(calc(var(--app-h) - 86px), calc(var(--app-w) * .48)); }
}

/* Oído en modo pantalla: orbe a la izquierda, respuestas y mapa a la derecha */
html.fit .et { flex: 1; min-height: 0; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px calc(max(10px, env(safe-area-inset-left)) + 58px); grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px 12px; overflow: hidden; }
html.fit .et-head { grid-column: 1; margin: 0; gap: 0; }
html.fit .et-head .eyebrow, html.fit .et-head .lede, html.fit .et-keys { display: none; }
html.fit .et-head h1 { font-size: clamp(18px, 2.4vw, 28px); white-space: nowrap; }
html.fit .et-modes { grid-column: 2; grid-row: 1; justify-self: end; padding: 3px; flex-wrap: nowrap; }
html.fit .et-modes button { padding: 6px 12px; font-size: 13px; }
html.fit .et-grid { grid-column: 1 / -1; grid-row: 2; min-height: 0; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 12px; }
html.fit .et-orb-card { min-height: 0; padding: 10px; gap: 4px; align-content: center; overflow: hidden; }
html.fit .et-orb { width: min(200px, calc(var(--app-h, 100dvh) * .3)); max-width: none; }
html.fit .et-orb-card { justify-items: center; }
html.fit .et-question { font-size: 17px; }
html.fit .et-side { min-height: 0; overflow-y: auto; display: grid; gap: 10px; align-content: start; }
html.fit .et-lower, html.fit .et-tips { display: none; }
html.fit .et-side .et-reveal { display: block; }

/* ===== Studio (siempre a pantalla completa) ===== */
.page-studio main.studio { position: relative; height: var(--app-h, 100dvh); display: flex; flex-direction: column; gap: 8px; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); overflow: hidden; }
.st-top { flex: none; display: flex; align-items: center; gap: 10px 16px; padding: 6px 10px 6px 64px; border-radius: 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  background: rgba(10,10,10,.5); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.st-top::-webkit-scrollbar { display: none; }
.st-top .t-group { flex: none; gap: 8px; flex-wrap: nowrap; }
.st-top .t-right { margin-left: auto; }
.st-top .t-play { width: 46px; height: 40px; }
.st-top .t-pos { font-size: 18px; min-width: 60px; }
.st-top #r-bpm-range { width: 110px; }
.st-top .t-bpm { width: 62px; padding: 6px; font-size: 15px; }
.st-top .seg button { padding: 6px 10px; font-size: 13px; }
.st-top .check { font-size: 13px; white-space: nowrap; }
.t-sq { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
.t-rec { width: 44px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; }
.rec-dot { width: 16px; height: 16px; border-radius: 50%; background: oklch(0.64 0.22 25); box-shadow: 0 0 0 calc(var(--lvl, 0) * 9px) oklch(0.64 0.22 25 / .3); transition: box-shadow .08s; }
.is-rec .t-rec { border-color: oklch(0.64 0.22 25); background: oklch(0.64 0.22 25 / .18); }
.is-rec .rec-dot { animation: rec-blink 1s steps(2) infinite; }
@keyframes rec-blink { 50% { opacity: .35; } }
.st-toggle { display: inline-flex; align-items: center; gap: 6px; }
.st-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.st-toggle svg .f { fill: currentColor; stroke: none; }
.st-toggle[aria-expanded='true'] { color: var(--led); border-color: rgba(80,211,107,.5); background: rgba(80,211,107,.1); }
.st-tabbtn svg { width: 22px; height: 22px; }
.st-body { flex: 1; min-height: 0; display: flex; gap: 8px; position: relative; }
.st-lib { flex: none; width: 260px; max-height: none; display: none; }
/* Biblioteca del Studio: dos páginas lado a lado (categorías → clips) */
.lib-open .st-lib { display: flex; }
.st-lib { overflow: hidden; padding: 0; }
.lib-pages { flex: none; display: flex; width: 200%; height: 100%; transition: transform .45s cubic-bezier(.2,.9,.2,1); }
.st-lib[data-page='clips'] .lib-pages { transform: translateX(-50%); }
.lib-page { width: 50%; min-width: 0; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.st-lib .lib-head { flex: none; align-items: center; gap: 8px; padding: 10px 10px 6px 14px; }
.lib-sub { flex: none; margin: 0; padding: 0 14px 8px; font-size: 13px; color: var(--muted); }
.lib-x, .lib-back { flex: none; width: 36px; height: 36px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--text); font-size: 16px; cursor: pointer; display: grid; place-items: center; }
.lib-back span { font-size: 26px; line-height: 1; margin-top: -3px; }
.lib-x:hover, .lib-back:hover { border-color: var(--led); color: var(--led); }
.lib-catname { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 800; color: oklch(0.8 0.14 var(--hue, 142)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-lib .lib-cats { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; list-style: none; margin: 0; padding: 4px 8px 10px; display: grid; gap: 6px; align-content: start; border: 0; }
.lib-cat { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; cursor: pointer; text-align: left; color: var(--text); font: inherit; font-weight: 700; font-size: 15.5px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-left: 4px solid oklch(0.72 0.15 var(--hue)); transition: background .2s, transform .2s; }
.lib-cat:hover, .lib-cat:focus-visible { background: rgba(255,255,255,.08); outline: none; }
.lib-cat:active { transform: scale(.98); }
.lib-cat .dot { display: none; }
.lib-cat span { flex: 1; }
.lib-cat small { color: var(--faint); font-weight: 500; font-size: 12px; }
.lib-cat b { color: var(--muted); font-size: 20px; line-height: 1; }
.lib-cat[aria-pressed='true'] { background: oklch(0.72 0.15 var(--hue) / .12); }
.st-lib .lib-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 8px 6px; touch-action: pan-y; }
.st-lib .lib-item { grid-template-columns: 40px 1fr auto 40px; padding: 7px 8px; border-radius: 12px; margin-bottom: 6px; }
.st-lib .lib-play, .st-lib .lib-add { width: 40px; height: 38px; border-radius: 10px; }
.st-lib .lib-add { background: rgba(80,211,107,.12); border-color: rgba(80,211,107,.4); }
.lib-hint { flex: none; margin: 0; padding: 6px 14px 10px; }
.clip.is-new { animation: clip-new .9s cubic-bezier(.2,.9,.2,1); }
@keyframes clip-new { 0% { transform: scale(.6); opacity: 0; box-shadow: 0 0 0 0 var(--led); } 50% { opacity: 1; box-shadow: 0 0 0 6px rgba(80,211,107,.35); } 100% { transform: none; } }
@media (max-width: 1099px), (max-height: 699px) {
  .lib-open .st-lib { position: absolute; z-index: 20; left: 0; top: 0; bottom: 0; width: min(340px, 82%); border-radius: 20px;
    background: rgba(12,12,12,.94); box-shadow: 24px 0 60px rgba(0,0,0,.7); animation: lib-in .35s cubic-bezier(.2,.9,.2,1); }
}
@keyframes lib-in { from { transform: translateX(-24px); opacity: 0; } }
/* En pantallas bajas el panel ocupa todo el alto (también sobre la barra de arriba) para que la lista respire. */
@media (max-height: 699px) {
  .studio .st-body { position: static; }
  .lib-open .st-lib { top: max(6px, env(safe-area-inset-top)); bottom: max(6px, env(safe-area-inset-bottom)); left: max(6px, env(safe-area-inset-left)); z-index: 56; }
}
@media (max-height: 480px) {
  .lib-sub { display: none; }
  .lib-cat { padding: 9px 12px; font-size: 14.5px; }
  .st-lib .lib-item { padding: 4px 6px; margin-bottom: 4px; }
  .st-lib .lib-play, .st-lib .lib-add { height: 34px; }
  .lib-hint { font-size: 11.5px; padding: 4px 12px 8px; }
}
@media (min-width: 1100px) and (min-height: 700px) { .lib-x { display: none; } }
.st-ed { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-ed .ed-bar { min-height: 0; padding: 6px 10px; flex: none; }
.st-ed .ed-foot { flex: none; }
.st-ed .ed-sel { font-size: 14px; }
.tracks { flex: 1; min-height: 0; display: flex; overflow-y: auto; overflow-x: hidden; background: rgba(0,0,0,.25); }
.tr-heads { flex: none; width: 140px; align-self: flex-start; border-right: 1px solid rgba(255,255,255,.08); background: rgba(14,14,14,.6); position: relative; z-index: 4; }
.tr-head { height: 72px; padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.06); display: grid; align-content: center; gap: 4px; font-size: 13px; }
.tr-ruler-sp { height: 28px; padding: 0; }
.tr-drums { height: 96px; }
.tr-drums b, .tr-name { font-weight: 750; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tr-name { flex: 1; min-width: 0; }
.tr-arm, .tr-mute, .tr-del { flex: none; width: 26px; height: 24px; border-radius: 7px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; display: grid; place-items: center; padding: 0; }
.tr-arm::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid oklch(0.64 0.22 25); }
.tr-arm[aria-pressed='true']::before { background: oklch(0.64 0.22 25); box-shadow: 0 0 8px oklch(0.64 0.22 25); }
.tr-mute[aria-pressed='true'] { background: var(--amber); color: #1a1407; border-color: var(--amber); }
.tr-del:hover { color: var(--bad); border-color: var(--bad); }
.tr-vol { flex: 1; min-width: 0; height: 18px; }
.tr-vol::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; }
.is-armed { background: linear-gradient(90deg, oklch(0.64 0.22 25 / .12), transparent); }
.tr-add { width: 100%; height: 44px; border: 0; border-top: 1px dashed rgba(255,255,255,.12); background: none; color: var(--led); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.tr-add:hover { background: rgba(80,211,107,.08); }
.studio .timeline { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; background: none; align-self: flex-start; }
.studio .tl-inner { height: auto; }
.studio .tl-ruler { position: relative; inset: auto; }
.studio .tl-lane { position: relative; top: auto; bottom: auto; height: 96px; border-bottom: 1px solid rgba(255,255,255,.06); }
.studio .clip { top: 8px; height: 80px; }
.studio .clip-mini { bottom: 6px; }
.tl-alane { position: relative; height: 72px; border-bottom: 1px solid rgba(255,255,255,.06);
  background-image: linear-gradient(90deg, var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, oklch(0.26 0.008 85 / .3) 1px, transparent 1px); }
.tl-alane.is-muted { opacity: .45; }
.aclip { position: absolute; top: 6px; height: 60px; border-radius: 6px; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  background: oklch(0.45 0.13 30 / .45); border: 1px solid oklch(0.7 0.16 30); box-shadow: inset 0 3px 0 oklch(0.7 0.16 30); }
.aclip canvas { position: absolute; left: 0; bottom: 2px; pointer-events: none; }
.aclip-name { position: absolute; left: 6px; top: 3px; font-size: 11px; font-family: var(--mono); color: oklch(0.97 0.02 30); pointer-events: none; white-space: nowrap; }
.aclip-name b { color: var(--led); }
.aclip.is-sel { outline: 2px solid var(--text); outline-offset: 1px; z-index: 2; }
.aclip.is-rec { background: oklch(0.64 0.22 25 / .35); border-color: oklch(0.64 0.22 25); box-shadow: none; animation: rec-blink 1.2s ease-in-out infinite; pointer-events: none; }
.st-ed .ed-foot { padding: 6px 10px; gap: 8px 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.st-ed .ed-foot::-webkit-scrollbar { display: none; }
.st-ed .ed-foot .t-field { flex: none; font-size: 12.5px; }
.st-input select { max-width: 170px; }
.st-len { flex: none; font-size: 12px; white-space: nowrap; }
.st-pop { position: absolute; z-index: 30; right: 12px; top: 64px; width: min(560px, calc(100% - 24px)); padding: 14px; border-radius: 22px; background: rgba(14,14,14,.85); }
.st-pop[hidden] { display: none; }
.st-pop .mixer { margin-top: 8px; gap: 8px; }
.st-pop-opts { display: flex; gap: 18px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
@media (max-width: 999px) { .st-top #r-bpm-range, .st-toggle span { display: none; } }
@media (max-width: 999px) { .st-pop .mixer { grid-template-columns: repeat(5, 1fr); } }
.st-pop .mixer label { padding: 8px; font-size: 12.5px; }
.st-toast { position: absolute; left: 50%; bottom: 18px; z-index: 40; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 14px; font-size: 14px;
  background: rgba(20,20,20,.92); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 30px rgba(0,0,0,.6); transition: opacity .3s, transform .4s cubic-bezier(.2,.9,.2,1.2); }
.st-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
/* Tablatura */
.tab-sheet { position: absolute; z-index: 25; left: 10px; right: 10px; bottom: 8px; height: min(46%, 300px); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: rgba(12,12,12,.9); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 -20px 60px -10px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12);
  animation: sheet-up .45s cubic-bezier(.2,.9,.2,1.1); }
.tab-sheet[hidden] { display: none; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.tab-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.08); flex: none; }
.tab-bar .t-field { margin-left: auto; font-size: 12.5px; }
.tab-bar select { max-width: 220px; padding-block: 5px; }
.tab-scroll { flex: 1; min-height: 0; overflow: auto; background: linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.tab-svg { display: block; cursor: pointer; max-width: none; height: auto; }
.tb-str { stroke: rgba(255,255,255,.28); stroke-width: 1; }
.tb-bar { stroke: rgba(255,255,255,.5); stroke-width: 1.2; }
.tb-num { fill: var(--faint); font: 500 10px var(--mono); }
.tb-open { fill: var(--muted); font: 700 10px var(--mono); text-anchor: end; }
.tb-bg { fill: #121212; }
.tb-fret { fill: #f4f4f4; font: 700 12.5px var(--mono); text-anchor: middle; }
.tb-stem, .tb-flag { stroke: rgba(255,255,255,.6); stroke-width: 1.3; fill: none; }
.tb-half { fill: none; stroke: rgba(255,255,255,.6); }
.tb-head { stroke: var(--led); stroke-width: 2; filter: drop-shadow(0 0 4px var(--led)); }
.tab-open .tl-inner, .tab-open .tr-heads { margin-bottom: 200px; }
/* Escalas y notas recomendadas (segunda vista de la hoja) */
.tab-sheet[data-view='guide'] { height: min(62%, 400px); background: rgb(12,12,12); }
.tab-sheet[data-view='guide'] #s-tabinfo { display: none; }
.sheet-seg button { padding: 5px 11px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.guide { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 30%, 340px); gap: 12px; padding: 10px 12px 10px 14px; }
.guide[hidden] { display: none; }
.gd-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.gd-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; }
.gd-key select { width: auto; padding: 4px 30px 4px 10px; font-size: 13.5px; font-weight: 700; }
.gd-label { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.gd-auto { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 3px 10px; font: 700 11px var(--mono); cursor: pointer; }
.gd-auto[aria-pressed='true'] { color: var(--led-ink); background: var(--led); border-color: var(--led); box-shadow: 0 0 12px -2px var(--led); }
.gd-why { color: var(--faint); }
.gd-scales { display: flex; gap: 6px; overflow-x: auto; flex: none; scrollbar-width: none; padding-bottom: 1px; }
.gd-scales::-webkit-scrollbar { display: none; }
.gd-scale, .gd-cat, .gd-note, .gd-chord { flex: none; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--text); border-radius: 999px; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.gd-scale:active, .gd-cat:active, .gd-note:active, .gd-chord:active { transform: scale(.96); }
.gd-scale { padding: 5px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.gd-scale small { color: var(--faint); margin-left: 4px; }
.gd-scale.is-best::after { content: '★'; margin-left: 5px; color: var(--amber); }
.gd-scale[aria-pressed='true'] { background: var(--led); border-color: var(--led); color: var(--led-ink); }
.gd-scale[aria-pressed='true'] small { color: inherit; opacity: .7; }
.gd-board { flex: 1; min-height: 70px; display: flex; align-items: center; }
.gd-board .fb-svg { display: block; width: 100%; height: 100%; max-height: 100%; }
.gd-board .fb-note.has-ring .fb-ring { stroke: var(--amber); }
.gd-legend { display: flex; gap: 12px; flex-wrap: wrap; flex: none; color: var(--faint); }
.gd-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.gd-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-root { background: var(--hot); } .lg-scale { background: var(--led); } .lg-target { border: 2px solid var(--amber); } .lg-out { background: rgba(255,255,255,.2); }
.gd-next { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); }
.gd-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.gd-flow b { color: oklch(0.82 0.13 var(--hue, 142)); font-size: 15px; }
.gd-cats { display: flex; gap: 5px; flex-wrap: wrap; }
.gd-next > .gd-label { margin-top: 2px; }
.gd-cat { padding: 3px 9px; font-size: 11.5px; color: var(--muted); }
.gd-cat[aria-pressed='true'] { color: #0b0b0b; background: oklch(0.8 0.13 var(--hue, 142)); border-color: transparent; font-weight: 700; }
.gd-tip { margin: 0; font-size: 13.5px; line-height: 1.4; }
.gd-notes, .gd-chords { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gd-notes .gd-label, .gd-chords .gd-label { flex-basis: 100%; }
.gd-note { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 11px; border-color: color-mix(in oklab, var(--amber) 60%, transparent); }
.gd-note b { font-size: 15px; }
.gd-note small, .gd-chord small { color: var(--faint); font-size: 10.5px; }
.gd-note.is-root { border-color: var(--hot); }
.gd-chord { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 11px; border-radius: 10px; }
.gd-chord b { font-size: 14px; }
.gd-played { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.gd-played b { color: var(--text); }
@media (max-width: 760px) { .guide { grid-template-columns: minmax(0, 1fr) clamp(190px, 38%, 260px); gap: 8px; padding: 8px; } .gd-legend { display: none; } .sheet-seg button { padding: 4px 8px; font-size: 12px; } }
@media (max-height: 480px) {
  html.fit #navegador .panel-head { display: none; }
  html.fit #navegador .formula + p, html.fit #navegador #n-chord-note { display: none; }
  .st-top { gap: 8px; padding-block: 4px; }
  .st-top .t-play, .t-rec { width: 40px; height: 36px; }
  .t-sq { width: 34px; height: 34px; }
  .st-top .t-pos { font-size: 16px; min-width: 50px; }
  .st-top .t-field .mono { display: none; }
  .st-top .seg button { padding: 5px 8px; font-size: 12px; }
  .st-toggle { padding: 6px 9px; }
  .st-ed .ed-bar { padding: 4px 8px; }
  .st-ed .ed-bar .btn { padding: 5px 10px; font-size: 12.5px; }
  .st-ed .ed-sel { font-size: 12.5px; }
  .st-ed .ed-foot { padding: 4px 8px; }
  .st-ed .ed-foot select { padding-block: 4px; font-size: 13px; }
  .st-len { display: none; }
  .tr-drums, .studio .tl-lane { height: 76px; }
  .studio .clip { top: 6px; height: 64px; }
  .tr-head:not(.tr-ruler-sp):not(.tr-drums), .tl-alane { height: 64px; }
  .aclip { height: 52px; }
  .tab-sheet { height: 58%; }
  .tab-sheet[data-view='guide'] { height: calc(100% - 52px); }
  .tab-bar { padding-block: 5px; gap: 8px; }
  .gd-legend { display: none; }
  .gd-tip { font-size: 12.5px; }
  .gd-next { padding: 8px 10px; gap: 7px; }
  .gd-note, .gd-chord { padding: 3px 9px; }
  .gd-note b, .gd-chord b { font-size: 13px; }
  .gd-scale { padding: 4px 10px; font-size: 12px; }
}
@media (min-width: 1100px) and (min-height: 700px) {
  .tr-heads { width: 150px; }
  .tab-sheet { height: min(40%, 340px); }
}
/* Paywall */
.paywall { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: radial-gradient(70% 70% at 50% 40%, rgba(0,0,0,.35), rgba(0,0,0,.75)); overflow-y: auto; }
.paywall[hidden] { display: none; }
.is-locked { filter: blur(6px) saturate(.7); pointer-events: none; }
.pw-card { width: min(560px, 100%); padding: clamp(18px, 4vh, 36px) clamp(20px, 4vw, 40px); text-align: center; display: grid; gap: 10px; justify-items: center; border-radius: 28px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(80,211,107,.16), transparent 60%), rgba(12,12,12,.7) !important; }
.pw-badge { font: 700 11px var(--mono); letter-spacing: .2em; padding: 4px 10px; border-radius: 99px; color: var(--led-ink); background: var(--led); box-shadow: 0 0 18px var(--led-glow); }
.pw-card h1 { font-size: clamp(34px, 7vh, 56px); margin: 0; }
.pw-lede { color: var(--muted); margin: 0; }
.pw-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; text-align: left; font-size: 14.5px; }
.pw-list li { padding-left: 26px; position: relative; color: var(--text); }
.pw-list li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 11px; height: 6px; border-left: 2px solid var(--led); border-bottom: 2px solid var(--led); transform: rotate(-45deg); }
.pw-buy { font-size: 17px; padding: 13px 26px; border-radius: 16px; }
.pw-stores { display: grid; gap: 6px; justify-items: center; }
.pw-restore { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; }
.pw-back { color: var(--faint); font-size: 13px; text-decoration: none; }
.pw-back:hover { color: var(--text); }
@media (max-height: 520px) {
  .pw-lede, .pw-card h1 + .pw-lede { display: none; }
  .pw-card h1 { font-size: 34px; }
  .pw-list { font-size: 13px; gap: 4px; }
  .pw-buy { padding: 10px 20px; }
  .pw-card { grid-template-columns: 1fr 1fr; text-align: left; justify-items: start; align-items: center; gap: 6px 22px; }
  .pw-card > .pw-badge, .pw-card > h1, .pw-card > .pw-lede { grid-column: 1; }
  .pw-card > .pw-list { grid-column: 2; grid-row: 1 / 4; }
  .pw-card > .pw-buy, .pw-card > .pw-stores, .pw-card > .pw-restore, .pw-card > .pw-back { grid-column: 1 / -1; justify-self: center; }
}

/* ===== Transiciones entre páginas y herramientas ===== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .3s cubic-bezier(.4, 0, .2, 1) both; }
::view-transition-new(root) { animation: vt-in .55s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); filter: blur(8px); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.015); filter: blur(8px); } }
.bg-metal { view-transition-name: bg; }             /* el fondo no parpadea al cambiar de página */
::view-transition-group(bg), ::view-transition-new(bg) { animation: none; }
::view-transition-old(bg) { display: none; }
.logo-bubble { view-transition-name: menu-bubble; } /* la burbuja del menú se queda quieta */
html:not(.vt) body { animation: page-in .5s cubic-bezier(.2, .9, .2, 1) both; }
html.is-leaving body { opacity: 0; transition: opacity .24s; }
@keyframes page-in { from { opacity: 0; } }  /* solo opacidad: transform o filter en body moverían las capas fijas */
.panel.is-active { animation: panel-in .5s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
.pw-stores a[aria-disabled='true'] { opacity: .45; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
/* Botones "i" con explicaciones */
.tip-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tip-row.is-h3 { margin-bottom: 14px; }
.tip-row.is-h3 > h3 { margin-bottom: 0; }
html.fit .tip-row.is-h3 { margin-bottom: 6px; }
.tip-i { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; margin-left: 2px; border-radius: 50%; cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--led) 55%, transparent); background: color-mix(in oklab, var(--led) 12%, transparent); color: var(--led);
  font: italic 700 11.5px/1 Georgia, 'Times New Roman', serif; text-transform: none; letter-spacing: 0; vertical-align: middle; transition: background .2s, color .2s, transform .15s; }
.tip-i:hover, .tip-i[aria-expanded='true'] { background: var(--led); color: var(--led-ink); }
.tip-i:active { transform: scale(.92); }
.tip-i::before { content: ''; position: absolute; inset: -12px; }
.tip-i { position: relative; }
.tip-pop { position: fixed; z-index: 90; width: min(320px, calc(100vw - 20px)); padding: 12px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; color: var(--text);
  background: rgba(16,16,16,.96); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 18px 50px -10px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: tip-in .22s cubic-bezier(.2,.9,.2,1.1); }
.tip-pop b { display: block; margin-bottom: 4px; color: var(--led); font-size: 14px; }
.tip-pop p { margin: 0; color: var(--muted); }
.tip-pop p strong { color: var(--text); }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px) scale(.98); } }
/* Escalas recomendadas para metal */
.scale-style { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.scale-style b, .gd-scale.is-metal::before { font: 700 10px var(--mono); letter-spacing: .08em; color: var(--hot); border: 1px solid color-mix(in oklab, var(--hot) 55%, transparent); border-radius: 999px; padding: 1px 6px; margin-right: 4px; vertical-align: 1px; }
.gd-scale.is-metal::before { content: 'METAL'; font-size: 8.5px; padding: 0 5px; }
.gd-scale[aria-pressed='true'].is-metal::before { color: var(--led-ink); border-color: currentColor; }
html.fit .scale-style { margin-top: 6px; font-size: 12.5px; }
/* Editor de batería: rejilla sencilla, una fila por instrumento */
.btn-edit { border-color: color-mix(in oklab, var(--led) 60%, transparent); color: var(--led); }
html.dedit-on .nav { opacity: 0; pointer-events: none !important; }
html.dedit-on .nav * { pointer-events: none !important; }
.dedit { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 8px; background: rgb(10,10,10);
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); animation: sheet-up .35s cubic-bezier(.2,.9,.2,1.05); }
.dedit[hidden] { display: none; }
.dedit-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: none; }
.dedit-bar .t-play { width: 48px; height: 42px; }
.dedit-title { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.dedit-title small { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.dedit-title b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dedit-pages button { padding: 6px 11px; font-size: 13px; }
.dedit-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.dedit-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(70px, 110px) repeat(var(--n, 16), minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(18px, 1fr);
  gap: 3px; column-gap: 3px; overflow: auto; padding: 8px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); }
.dg-count { font: 600 11px var(--mono); color: var(--faint); text-align: center; padding-bottom: 2px; align-self: end; }
.dg-count.is-beat { color: var(--text); font-size: 13px; }
.dg-count.is-now { color: var(--led); }
.dg-name { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; padding-right: 6px; }
.dg-name i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: oklch(0.75 0.15 var(--hue)); }
.dg-cell { min-width: 0; min-height: 0; padding: 0; border: 1px solid rgba(255,255,255,.07); border-radius: 6px; background: rgba(255,255,255,.045); cursor: pointer; transition: background .12s, transform .1s, box-shadow .12s; }
.dg-cell.is-beat { background: rgba(255,255,255,.085); }
.dg-cell.gap, .dg-count.gap { margin-left: 5px; }
.dg-cell:hover { border-color: oklch(0.75 0.15 var(--hue) / .7); }
.dg-cell:active { transform: scale(.9); }
.dg-cell.is-on { background: oklch(0.72 0.16 var(--hue)); border-color: oklch(0.85 0.12 var(--hue)); box-shadow: 0 0 12px -3px oklch(0.72 0.16 var(--hue)); }
.dg-cell.is-on.is-soft { background: oklch(0.72 0.16 var(--hue) / .5); }
.dg-cell.is-now { outline: 2px solid var(--led); outline-offset: -1px; }
.dg-cell.is-now.is-on { transform: scale(1.08); }
.dedit-hint { margin: 0; flex: none; color: var(--faint); }
@media (max-height: 480px) {
  .dedit { gap: 5px; }
  .dedit-bar { gap: 8px; }
  .dedit-bar .t-play { width: 40px; height: 34px; }
  .dedit-title b { font-size: 15px; }
  .dedit-actions .btn { padding: 5px 9px; font-size: 12px; }
  .dedit-pages button { padding: 4px 8px; font-size: 12px; }
  .dedit-grid { padding: 5px; gap: 2px; column-gap: 2px; grid-template-columns: minmax(58px, 78px) repeat(var(--n, 16), minmax(0, 1fr)); }
  .dg-name { font-size: 11px; gap: 5px; }
  .dg-cell { border-radius: 4px; }
  .dg-cell.gap, .dg-count.gap { margin-left: 3px; }
  .dedit-hint { display: none; }
}
/* Crédito: una mención corta con los canales */
.credit-sec { padding-block: clamp(40px, 7vw, 80px); }
.credit { text-align: center; display: grid; justify-items: center; gap: 6px; }
.credit .eyebrow { margin: 0; }
.credit-name { margin: 0; font-size: clamp(28px, 4vw, 44px); }
.credit-p { margin: 4px 0 14px; color: var(--muted); max-width: 46ch; }
.credit .follow-links { justify-content: center; }
.credit .follow-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* Premium: cartel compartido (afinador y Studio) y canje de códigos */
.pw-card { position: relative; }
.pw-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; font-size: 15px; }
.pw-x:hover { background: rgba(255,255,255,.12); }
.pw-code { display: grid; gap: 6px; justify-items: center; width: 100%; margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.pw-code-row { display: flex; gap: 6px; width: min(360px, 100%); }
.pw-code-row .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); text-align: center; }
.pw-msg { margin: 0; min-height: 1.2em; color: var(--bad, #ff6b6b); }
.pw-msg.is-ok { color: var(--led); }
.pw-msg:empty { display: none; }
@media (max-height: 520px) { .pw-card > .pw-code { grid-column: 1 / -1; padding-top: 6px; } }
#afinador.is-premium > *:not(.panel-head) { filter: blur(5px) saturate(.6); pointer-events: none; }
.tab.is-pro { position: relative; }
.tab.is-pro::after { content: 'PRO'; position: absolute; top: 2px; right: 2px; font: 700 7.5px var(--mono); letter-spacing: .08em; padding: 1px 4px; border-radius: 99px; color: var(--led-ink); background: var(--led); }
/* Pistas de audio: canales (mono/estéreo), paneo y bordes para recortar */
.tr-audio, .tl-alane { height: 88px; }
.tr-audio { gap: 3px; }
.aclip { height: 76px; }
.tr-st { flex: none; height: 22px; padding: 0 6px; border-radius: 7px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--muted); font: 700 9.5px var(--mono); letter-spacing: .06em; cursor: pointer; }
.tr-st:hover { color: var(--text); }
.tr-pan { flex: 1; min-width: 0; height: 16px; --fill: 50%; }
.tr-pan::-webkit-slider-runnable-track { background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.18)); }
.tr-pan::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4px; background: var(--amber); }
.tr-pan::-moz-range-thumb { width: 12px; height: 12px; background: var(--amber); }
.aclip-h { position: absolute; top: 0; bottom: 0; width: 12px; cursor: ew-resize; z-index: 1; }
.aclip-h.is-l { left: 0; }
.aclip-h.is-r { right: 0; }
.aclip-h::after { content: ''; position: absolute; top: 50%; width: 4px; height: 26px; margin-top: -13px; border-radius: 3px; background: rgba(255,255,255,.55); opacity: 0; transition: opacity .15s; }
.aclip-h.is-l::after { left: 3px; }
.aclip-h.is-r::after { right: 3px; }
.aclip.is-sel .aclip-h::after, .aclip:hover .aclip-h::after { opacity: 1; }
@media (pointer: coarse) { .aclip-h { width: 18px; } .aclip.is-sel .aclip-h::after { opacity: 1; } }
#s-cut:disabled { opacity: .4; }
/* Panel de entrada y salida */
.st-io { width: min(420px, calc(100% - 24px)); display: grid; gap: 12px; max-height: calc(100% - 76px); overflow-y: auto; }
.st-io .lib-title { margin: 0; }
.io-sec { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.io-sec p { margin: 0; color: var(--faint); }
.io-label { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.io-label b { font-size: 15px; }
.io-ico { width: 22px; text-align: center; }
.io-meter-row { display: flex; align-items: center; gap: 10px; }
.io-meter { flex: 1; height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.io-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--led), oklch(0.85 0.17 110) 75%, var(--hot)); background-size: 420px 100%; transition: width .06s linear; }
.io-meter i.is-hot { box-shadow: 0 0 10px var(--hot); }
.io-chan { width: fit-content; }
.st-iobtn { border-color: color-mix(in oklab, var(--led) 45%, transparent); }
@media (max-height: 480px) {
  .tr-audio, .tl-alane { height: 76px; }
  .tr-head:not(.tr-ruler-sp):not(.tr-drums).tr-audio { height: 76px; }
  .studio .tl-alane { height: 76px; }
  .aclip { height: 64px; }
  .tr-audio .tr-arm, .tr-audio .tr-mute, .tr-audio .tr-del { height: 20px; width: 22px; }
  .tr-st { height: 19px; }
  .st-io { gap: 8px; top: 52px; max-height: calc(100% - 60px); }
}
/* El botón de audio siempre muestra su nombre: es lo primero que hay que encontrar para grabar. */
.st-top .st-iobtn span { display: inline !important; }
.io-label .fine { font-size: 12.5px; color: var(--faint); flex-basis: 100%; }
.io-sec p { font-size: 12.5px; line-height: 1.4; }
@media (max-height: 480px) {
  .st-io { width: min(720px, calc(100% - 24px)); grid-template-columns: 1.25fr 1fr; gap: 6px 16px; padding: 12px 14px; }
  .st-io > .lib-title { grid-column: 1 / -1; }
  .st-io .io-sec:nth-of-type(1) { grid-column: 1; grid-row: 2 / 4; }
  .st-io .io-sec { padding-top: 8px; gap: 6px; }
  .io-label .fine, #s-iotip { display: none; }
}
.io-sec { align-content: start; }
@media (max-height: 520px) {
  .paywall { padding: 8px; }
  .pw-card { width: min(780px, 100%); padding: 14px 20px; gap: 6px 22px; align-items: start; }
  .pw-card > .pw-list { grid-column: 2; grid-row: 1 / 7; font-size: 12.5px; padding-right: 30px; }
  .pw-card > .pw-buy, .pw-card > .pw-stores, .pw-card > .pw-code { grid-column: 1; justify-self: stretch; }
  .pw-card > .pw-restore, .pw-card > .pw-back { grid-column: 1; justify-self: start; }
  .pw-card h1 { font-size: 30px; }
  .pw-code { justify-items: start; padding-top: 6px; }
  .pw-code-row { width: 100%; }
}
/* ===== Cuenta ===== */
.menu-account { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; text-align: left; transition: background .2s; }
.menu-account:hover { background: rgba(255,255,255,.08); }
.ma-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--led-ink); background: var(--led); }
.menu-account:not(.is-in) .ma-av { background: rgba(255,255,255,.1); }
.menu-account:not(.is-in) .ma-av::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); box-shadow: 0 13px 0 -3px var(--muted); transform: translateY(-3px); }
.ma-txt { flex: 1; min-width: 0; display: grid; }
.ma-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-txt small { color: var(--faint); font-size: 12px; }
.acc-modal .pw-card { width: min(420px, 100%); text-align: left; justify-items: stretch; gap: 12px; display: grid !important; grid-template-columns: 1fr !important; }
.acc-modal .pw-card > * { grid-column: 1 !important; grid-row: auto !important; }
.acc-step { display: grid; gap: 12px; }
.acc-step[hidden] { display: none; }
.acc-step h2 { margin: 0; font-size: 26px; }
.acc-lede { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.acc-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 14px; border: 0; font: 600 16px var(--body); cursor: pointer; }
.acc-btn svg { width: 20px; height: 20px; }
.acc-apple { background: #fff; color: #000; }
.acc-fb { background: #1877f2; color: #fff; }
.acc-btn[hidden] { display: none; }
.acc-or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.1); }
.acc-form { display: flex; gap: 8px; }
.acc-form .input { flex: 1; min-width: 0; }
.acc-digits { font: 700 24px var(--mono); letter-spacing: .4em; text-align: center; }
.acc-who { margin: 0; color: var(--muted); word-break: break-all; }
.acc-free { font: 700 11px var(--mono); letter-spacing: .14em; color: var(--muted); padding: 4px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.15); }
.acc-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.acc-bar i { display: block; height: 100%; background: var(--led); border-radius: inherit; }
.acc-quota p, .st-cloud .acc-bar + p { margin: 4px 0 0; color: var(--faint); }
.acc-del { color: var(--hot); }
.acc-card.is-busy { opacity: .6; pointer-events: none; }
.pw-login { background: none; border: 0; color: var(--led); cursor: pointer; font-size: 13px; text-decoration: underline; }
@media (max-height: 520px) {
  .acc-modal .pw-card { padding: 12px 16px; gap: 8px; }
  .acc-step { gap: 8px; }
  .acc-step h2 { font-size: 21px; }
  .acc-lede { font-size: 13px; }
  .acc-btn { padding: 9px 14px; font-size: 14.5px; }
  .pw-card > .pw-login { grid-column: 1; justify-self: start; }
}
/* ===== Proyecto en la nube (Studio) ===== */
.st-cloud { width: min(400px, calc(100% - 24px)); display: grid; gap: 10px; max-height: calc(100% - 76px); overflow-y: auto; }
.st-cloud .lib-title { margin: 0; }
.cl-name { display: grid; gap: 4px; }
.cl-status { margin: 0; font-size: 13px; color: var(--led); }
.cl-status.is-err { color: var(--hot); }
.cl-h { margin: 6px 0 0; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.cl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cl-list li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 12px; background: rgba(255,255,255,.03); }
.cl-list li.is-cur { background: color-mix(in oklab, var(--led) 12%, transparent); }
.cl-pn { flex: 1; min-width: 0; display: grid; }
.cl-pn b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-here { font: 700 10px var(--mono); color: var(--led); letter-spacing: .08em; text-transform: uppercase; }
.cl-del { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; color: var(--faint); cursor: pointer; }
.cl-del:hover { color: var(--hot); background: rgba(255,255,255,.06); }
.st-cloudbtn .cl-ok { opacity: 0; transition: opacity .3s; }
.st-cloudbtn.is-synced .cl-ok { opacity: 1; stroke: var(--led); }
.st-cloudbtn.is-busy svg { animation: cl-pulse 1s ease-in-out infinite; }
@keyframes cl-pulse { 50% { opacity: .35; } }
@media (max-height: 480px) { .st-cloud { top: 52px; max-height: calc(100% - 60px); gap: 7px; } }
/* ===== MIDI en el editor de batería ===== */
.dedit-midi { display: inline-flex; align-items: center; gap: 6px; }
.midi-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); }
.dedit-midi.is-on .midi-dot { background: var(--led); box-shadow: 0 0 8px var(--led); }
.midi-pop { top: 62px; right: 12px; width: min(400px, calc(100% - 24px)); max-height: calc(100% - 74px); overflow-y: auto; display: grid; gap: 8px; z-index: 5; }
.midi-pop .lib-title { margin: 0; }
.midi-status { margin: 0; font-weight: 600; font-size: 14px; color: var(--muted); }
.midi-status.is-on { color: var(--led); }
.midi-status.is-denied, .midi-status.is-unsupported { color: var(--amber); }
.midi-pop > p.fine { margin: 0; color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.midi-map { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.midi-map li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; background: rgba(255,255,255,.03); font-size: 13px; }
.midi-map li > i { width: 9px; height: 9px; border-radius: 50%; background: oklch(0.75 0.15 var(--hue)); }
.midi-map small { color: var(--faint); font-size: 11px; }
.midi-map .btn { padding: 3px 9px; font-size: 12px; }
.midi-map .btn.is-learn, .dg-name.is-learn { animation: midi-learn 1s ease-in-out infinite; }
.midi-map .btn.is-learn { background: var(--amber); color: #1a1407; border-color: var(--amber); }
.dg-name.is-learn { color: var(--amber); }
@keyframes midi-learn { 50% { opacity: .55; } }
.dg-count.is-cursor { color: var(--amber); }
.dg-cell.is-cursor { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--amber) 70%, transparent); }
.dg-count { cursor: pointer; }
@media (max-height: 480px) { .midi-pop { top: 50px; max-height: calc(100% - 58px); gap: 6px; } .midi-map li { padding: 2px 6px; } }
/* ===== Política de privacidad ===== */
.page-legal main { padding-top: 96px; }
.legal-wrap { max-width: 760px; }
.legal { display: none; }
html[lang="es"] .legal[lang="es"], html[lang="en"] .legal[lang="en"], html[lang="de"] .legal[lang="de"] { display: block; }
.legal h1 { font-size: clamp(30px, 5vw, 48px); margin: 8px 0 6px; }
.legal h2 { font-size: 20px; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--muted); line-height: 1.6; }
.legal li { margin-bottom: 8px; }
.legal b { color: var(--text); }
.legal a { color: var(--led); }
.legal-date { font-family: var(--mono); font-size: 12.5px; color: var(--faint) !important; }
.acc-legal { margin: 0; font-size: 12px; color: var(--faint); }
.acc-legal a { color: var(--muted); }
.acc-news { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.4; color: var(--muted); cursor: pointer; }
.acc-news input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--led); cursor: pointer; }
.studio .tl-lane.is-muted { opacity: .45; }
/* ===== Efectos por pista ===== */
.tr-fx { flex: none; height: 22px; padding: 0 6px; border-radius: 7px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--muted); font: 800 9.5px var(--mono); letter-spacing: .06em; cursor: pointer; }
.tr-fx.is-on { color: var(--led-ink); background: var(--led); border-color: var(--led); box-shadow: 0 0 10px -2px var(--led); }
.st-fx { width: min(760px, calc(100% - 24px)); max-height: calc(100% - 76px); overflow-y: auto; display: grid; gap: 10px; }
.fx-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fx-head .lib-title { margin: 0; }
.fx-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-presets .fine { margin-right: 4px; color: var(--faint); }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.fx-grid.is-off { opacity: .45; }
.fx-sec { display: grid; gap: 6px; align-content: start; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.fx-amp { grid-column: 1 / -1; }
.fx-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fx-sh b { font-size: 14px; }
.fx-seg { width: fit-content; max-width: 100%; overflow-x: auto; }
.fx-seg button { padding: 5px 10px; font-size: 12.5px; white-space: nowrap; }
.fx-on { border: 1px solid rgba(255,255,255,.16); background: none; color: var(--muted); border-radius: 99px; padding: 2px 10px; font: 700 10.5px var(--mono); letter-spacing: .08em; cursor: pointer; }
.fx-on[aria-pressed='true'] { color: var(--led-ink); background: var(--led); border-color: var(--led); }
.fx-sl { display: grid; grid-template-columns: 74px 1fr 52px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.fx-sl output { font: 600 11.5px var(--mono); text-align: right; color: var(--text); }
.fx-sl input { width: 100%; }
.fx-file { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-file select { flex: 1; min-width: 140px; padding-block: 5px; }
.fx-note { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.4; }
.fx-note a { color: var(--led); }
.fx-err { margin: 0; color: var(--hot); font-size: 12.5px; }
.fx-mon { font-size: 13px; }
@media (max-height: 480px) { .st-fx { top: 50px; max-height: calc(100% - 58px); gap: 7px; padding: 10px 12px; } .fx-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; } .fx-sec { padding: 8px; } }
/* Tocar en vivo con efectos */
.t-live { height: 42px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 14px; }
.t-live svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.t-live[aria-pressed='true'] { color: var(--led-ink); background: var(--led); border-color: var(--led); box-shadow: 0 0 16px -2px var(--led); }
.t-live[aria-pressed='true'] svg { animation: cl-pulse 1.4s ease-in-out infinite; }
.t-live-txt { font-size: 13px; font-weight: 700; }
@media (max-width: 999px) { .t-live-txt { display: none; } .t-live { padding: 0 10px; } }
@media (max-height: 480px) { .t-live { height: 36px; } }
.fx-head { flex-wrap: wrap; }
.fx-head .lib-title { flex: 1; }
.fx-live[aria-pressed='true'] { color: var(--led-ink); background: var(--led); border-color: var(--led); }
/* Loop: en pantallas pequeñas un solo botón que cambia de modo */
.t-loopcycle { display: none; align-items: center; gap: 5px; }
.t-loopcycle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.t-loopcycle span { font: 700 11px var(--mono); letter-spacing: .04em; }
.t-loopcycle:not(.is-off) { color: var(--led); border-color: color-mix(in oklab, var(--led) 50%, transparent); }
.t-loopcycle.is-off { color: var(--faint); }
@media (max-width: 999px) {
  .st-top .t-opts .seg { display: none; }
  .t-loopcycle { display: inline-flex; padding: 6px 9px; }
}
/* Teléfonos pequeños (iPhone SE, 8): la barra se compacta un poco más. */
@media (max-width: 760px) {
  .st-top .st-iobtn span, .t-loopcycle span { display: none !important; }
  .st-top #r-home, .st-top .t-pos { display: none; }
  .st-top { gap: 6px; }
}
/* ===== Ajustes del repaso de pantallas ===== */
/* Las fichas del FAQ se abren en abanico: que no empujen la página hacia los lados. */
.footer { overflow-x: clip; }
/* Acordes de la escala: el selector Tríadas/Cuatriadas cabe en móviles. */
html.fit #navegador .info h3 { flex-wrap: wrap; row-gap: 6px; }
html.fit #navegador .info h3 .seg button { padding: 4px 8px; font-size: 11.5px; }
/* Paneles flotantes del Studio: fondo casi opaco para leer bien encima de las pistas. */
.st-pop { background: rgba(14,14,14,.97); }
/* Cabecera de pista de audio en móviles: las tres filas caben enteras. */
@media (max-height: 480px) {
  .tr-head.tr-audio { padding: 3px 6px; gap: 2px; align-content: center; }
  .tr-audio .tr-row { gap: 4px; }
  .tr-audio .tr-name { font-size: 12px; }
}
/* ===== Efectos con aspecto de equipo: amplis, perillas y pedalera ===== */
.st-fx { width: min(940px, calc(100% - 24px)); gap: 12px; }
.fx-power { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: var(--muted); border-radius: 99px; padding: 4px 12px; font: 800 11px var(--mono); letter-spacing: .1em; cursor: pointer; }
.fx-power[aria-pressed='true'] { color: var(--led-ink); background: var(--led); border-color: var(--led); box-shadow: 0 0 14px -2px var(--led); }
/* Fila de amplis */
.amp-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.amp-pick { flex: none; width: 118px; display: grid; justify-items: center; gap: 3px; padding: 8px 6px 7px; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.amp-pick:hover { border-color: rgba(255,255,255,.2); }
.amp-pick:active { transform: scale(.97); }
.amp-pick.is-sel { border-color: var(--led); background: color-mix(in oklab, var(--led) 10%, transparent); box-shadow: 0 0 0 1px var(--led) inset; }
.amp-pick b { font-size: 12.5px; line-height: 1.15; text-align: center; }
.amp-pick small { font-size: 10.5px; color: var(--faint); text-align: center; line-height: 1.2; }
.amp-mini { position: relative; width: 92px; height: 44px; border-radius: 6px; background: var(--tolex, #161616); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 14px -6px rgba(0,0,0,.8); overflow: hidden; }
.amp-mini::before { content: ''; position: absolute; left: 5px; right: 5px; top: 5px; height: 15px; border-radius: 3px; background: var(--plate, #2a2a2a); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.amp-mini::after { content: ''; position: absolute; left: 10px; right: 10px; top: 10px; height: 5px; background: radial-gradient(circle, var(--knobc, #111) 2px, transparent 2.5px) 0 0 / 11px 5px repeat-x; }
.amp-mini i { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 16px; border-radius: 2px; background: var(--grill, repeating-linear-gradient(90deg, #2b2b2b 0 2px, #1c1c1c 2px 4px)); }
.amp-pick.is-none .amp-mini { background: rgba(255,255,255,.05); box-shadow: none; }
.amp-pick.is-none .amp-mini::before, .amp-pick.is-none .amp-mini::after { display: none; }
.amp-pick.is-none .amp-mini { display: grid; place-items: center; }
/* Estilos de cada ampli (tolex, panel, perillas, grill y color del indicador) */
.face-clean { --tolex: #141414; --plate: linear-gradient(180deg, #2b2b2b, #151515); --knobc: #f2f2f2; --grill: repeating-linear-gradient(90deg, #c9c9c9 0 2px, #9c9c9c 2px 4px); --kv: #9fd8ff; --brand: #f4f4f4; }
.face-brit { --tolex: #121212; --plate: linear-gradient(180deg, #e8c766, #b48a2c); --knobc: #1a1a1a; --grill: repeating-linear-gradient(45deg, #3a2f1c 0 2px, #241d10 2px 4px); --kv: #f0c75a; --brand: #2a1f08; }
.face-dual { --tolex: #101010; --plate: repeating-linear-gradient(45deg, #b8bcc2 0 3px, #8f949b 3px 6px); --knobc: #0e0e0e; --grill: repeating-linear-gradient(90deg, #262626 0 2px, #171717 2px 4px); --kv: #e0e4ea; --brand: #111; }
.face-teuton { --tolex: #0d0f16; --plate: linear-gradient(180deg, #1c2233, #0d111c); --knobc: #8fb3ff; --grill: repeating-linear-gradient(90deg, #1b2030 0 2px, #10131c 2px 4px); --kv: #5b8cff; --brand: #9cc0ff; }
.face-inferno { --tolex: #0e0e0e; --plate: linear-gradient(180deg, #2a2a2a, #121212); --knobc: #d9d9d9; --grill: repeating-linear-gradient(90deg, #3a0f0f 0 2px, #210707 2px 4px); --kv: #ff4d3a; --brand: #ff5a46; }
.face-djent { --tolex: #e9e9e6; --plate: linear-gradient(180deg, #fafafa, #d9d9d6); --knobc: #222; --grill: repeating-linear-gradient(90deg, #2b2b2b 0 2px, #1a1a1a 2px 4px); --kv: #50d36b; --brand: #1a1a1a; }
.face-nam { --tolex: #101014; --plate: linear-gradient(90deg, #1b1b22, #24243a); --knobc: #50d36b; --grill: linear-gradient(90deg, #1d1d26, #2a2a44); --kv: #50d36b; --brand: #e8e8f0; }
/* Cabezal elegido */
.amp-head { display: grid; gap: 10px; padding: 12px 14px 12px; border-radius: 16px; background: var(--tolex); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 -2px 0 rgba(0,0,0,.5), 0 18px 40px -18px rgba(0,0,0,.9); border: 1px solid rgba(255,255,255,.08); }
.amp-head.is-off { opacity: .5; }
.amp-plate { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--plate); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.4); }
.amp-led { width: 10px; height: 10px; border-radius: 50%; background: #ff3b2f; box-shadow: 0 0 10px #ff3b2f; flex: none; }
.amp-head.is-off .amp-led { background: #3a1a18; box-shadow: none; }
.amp-logo { font: italic 900 20px var(--display); letter-spacing: .02em; color: var(--brand); text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.amp-style { margin-left: auto; font: 600 11px var(--mono); letter-spacing: .06em; color: var(--brand); opacity: .75; text-align: right; }
.amp-knobs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 4px 4px 0; }
.nam-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nam-row select { flex: 1; min-width: 160px; padding-block: 6px; }
.nam-t3k { text-decoration: none; }
.cab-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.cab-row .fine { color: var(--faint); font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.cab-row select { min-width: 150px; padding-block: 5px; }
.face-djent .cab-row .fine, .face-djent .kn b, .face-djent .kn small { color: #333; }
.face-djent .cab-row { border-color: rgba(0,0,0,.12); }
/* Perillas */
.kn { display: grid; justify-items: center; gap: 1px; cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 10px; padding: 2px 0; outline: none; }
.kn:focus-visible { box-shadow: 0 0 0 2px var(--led); }
.kn svg { width: 50px; height: 50px; overflow: visible; }
.kn-track { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 3.5; stroke-linecap: round; }
.kn-val { fill: none; stroke: var(--kv, var(--led)); stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 0 3px color-mix(in oklab, var(--kv, var(--led)) 60%, transparent)); }
.kn-cap { transform-origin: 24px 24px; transition: transform .05s; }
.kn-cap circle { fill: #1b1b1b; stroke: rgba(255,255,255,.18); stroke-width: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.kn-cap line { stroke: #f4f4f4; stroke-width: 2.4; stroke-linecap: round; }
.face-brit .kn-cap circle, .face-dual .kn-cap circle { fill: #0c0c0c; }
.face-djent .kn-track { stroke: rgba(0,0,0,.15); }
.kn b { font: 700 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kn small { font: 600 10.5px var(--mono); color: var(--faint); }
.kn.is-turn small { color: var(--text); }
/* Pedalera */
.pedalboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pedal { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 10px 10px 12px; border-radius: 14px; background: linear-gradient(180deg, var(--pd, #2a2a2a), color-mix(in oklab, var(--pd, #2a2a2a) 60%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 24px -12px rgba(0,0,0,.9); }
.pd-gate { --pd: #3a3d42; --kv: #c9d1d9; }
.pd-chorus { --pd: #1d5e63; --kv: #7fe3e8; }
.pd-delay { --pd: #33306b; --kv: #a8a2ff; }
.pd-rev { --pd: #1f4a2e; --kv: #7ee29b; }
.pd-top { display: flex; align-items: center; gap: 7px; }
.pd-top b { font: 800 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.pd-led { width: 8px; height: 8px; border-radius: 50%; background: #3b1714; }
.pedal.is-on .pd-led { background: #ff3b2f; box-shadow: 0 0 9px #ff3b2f; }
.pd-knobs { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 2px 4px; }
.pd-knobs .kn svg { width: 40px; height: 40px; }
.pd-knobs .kn b { color: rgba(255,255,255,.75); }
.pd-knobs .kn small { color: rgba(255,255,255,.55); }
.pd-knobs .fx-time { width: 100%; justify-content: center; display: flex; }
.pd-knobs .fx-time button { padding: 3px 7px; font-size: 11px; color: rgba(255,255,255,.8); }
.pedal:not(.is-on) .pd-knobs { opacity: .55; }
.pd-sw { justify-self: center; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: radial-gradient(circle at 35% 30%, #f5f5f5, #9a9a9a 45%, #4a4a4a 70%, #2a2a2a); box-shadow: 0 3px 6px rgba(0,0,0,.6), inset 0 -2px 3px rgba(0,0,0,.4); }
.pd-sw:active { transform: translateY(1px) scale(.96); }
.fx-foot { display: grid; gap: 4px; }
@media (max-height: 480px) {
  .st-fx { gap: 8px; }
  .amp-pick { width: 96px; padding: 6px 4px; }
  .amp-mini { width: 76px; height: 34px; }
  .amp-mini i { height: 11px; }
  .amp-pick small { display: none; }
  .amp-head { padding: 8px 10px; gap: 6px; }
  .amp-plate { padding: 5px 10px; }
  .amp-logo { font-size: 16px; }
  .kn svg { width: 40px; height: 40px; }
  .pd-knobs .kn svg { width: 34px; height: 34px; }
  .pedalboard { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .pedal { padding: 7px 6px 8px; gap: 4px; }
  .pd-top b { font-size: 10.5px; }
  .pd-sw { width: 28px; height: 28px; }
}
@media (max-width: 760px) { .amp-knobs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Nombre de pista: se toca para cambiarlo */
button.tr-name { background: none; border: 0; padding: 0; color: var(--text); text-align: left; cursor: text; border-bottom: 1px dashed transparent; }
button.tr-name:hover { border-bottom-color: rgba(255,255,255,.35); }
.tr-name-in { flex: 1; min-width: 0; width: 100%; font: 750 13px var(--body); color: var(--text); background: rgba(0,0,0,.5); border: 1px solid var(--led); border-radius: 6px; padding: 1px 5px; }
.io-midi .midi-status { flex: 1; font-size: 13px; }
@media (max-height: 480px) { .st-io .io-midi { grid-column: 1 / -1; } }
.pd-knobs .fx-time { flex-wrap: wrap; overflow: visible; max-width: 100%; }
@media (max-height: 480px), (max-width: 760px) { .pd-knobs .fx-time button { padding: 2px 4px; font-size: 10px; } }
/* ===== Pista de ambiente y biblioteca de sonidos ===== */
.tr-add-atmos { color: #9fb7ff; }
.tr-head.is-atmos { background: linear-gradient(90deg, rgba(91,140,255,.12), transparent); }
.tr-snd { flex: none; height: 22px; padding: 0 7px; border-radius: 7px; border: 1px solid rgba(143,179,255,.45); background: rgba(91,140,255,.15); color: #b9ccff; font: 800 10px var(--mono); cursor: pointer; }
.aclip.is-new { animation: clip-new 1.2s ease-out; }
.st-atmos { width: min(640px, calc(100% - 24px)); max-height: calc(100% - 76px); overflow-y: auto; display: grid; gap: 10px; }
.st-atmos .lib-title { margin: 0; flex: 1; }
.atm-opts { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.atm-opts select { width: auto; padding-block: 4px; }
.atm-hint { color: var(--faint); font-size: 12px; }
.atm-cats { width: fit-content; max-width: 100%; overflow-x: auto; }
.atm-cats button { white-space: nowrap; padding: 6px 12px; font-size: 13px; }
.atm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.atm-list li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(255,255,255,.035); border-left: 3px solid #5b8cff; }
.atm-name { display: grid; min-width: 0; }
.atm-name b { font-size: 14px; }
.atm-name small { color: var(--faint); font-size: 12px; line-height: 1.35; }
.atm-len { font-size: 11.5px; }
@media (max-height: 480px) { .st-atmos { top: 50px; max-height: calc(100% - 58px); gap: 7px; } .atm-list li { padding: 4px 6px; gap: 8px; } .atm-name small { display: none; } }
.tr-head.is-atmos .tr-st { display: none; }
.tl-alane.is-atmos .aclip { background: linear-gradient(180deg, rgba(91,140,255,.55), rgba(60,90,200,.4)); border-color: #7fa2ff; }
.tl-alane.is-atmos .aclip-name { color: #e6ecff; }
/* Estado de los efectos, claro a primera vista */
.fx-state { margin: -2px 0 0; font-size: 13px; color: var(--faint); }
.fx-state.is-on { color: var(--led); }
.amp-empty { padding: 14px 16px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.16); color: var(--muted); font-size: 13.5px; text-align: center; }
.pedal { transition: filter .25s, box-shadow .25s, opacity .25s; }
.pedal:not(.is-on) { filter: saturate(.2) brightness(.62); }
.pedal.is-on { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 2px color-mix(in oklab, var(--kv) 70%, transparent), 0 10px 28px -10px color-mix(in oklab, var(--kv) 60%, transparent); }
.pd-state { justify-self: center; font: 800 10px var(--mono); letter-spacing: .14em; color: rgba(255,255,255,.55); margin-top: -2px; }
.pedal.is-on .pd-state { color: #fff; }
.pedal.is-on .pd-sw { box-shadow: 0 0 0 2px #ff3b2f, 0 3px 6px rgba(0,0,0,.6), inset 0 -2px 3px rgba(0,0,0,.4); }
.tr-head.is-new { animation: head-new 1.4s ease-out; }
@keyframes head-new { 0% { background: rgba(91,140,255,.45); } 100% { background: transparent; } }
/* Arrastrar clips entre pistas e insertarlos entre otros */
.aclip.is-dragging { z-index: 6; box-shadow: 0 12px 28px -8px rgba(0,0,0,.8), 0 0 0 2px var(--text); opacity: .92; cursor: grabbing; }
.aclip.is-shifting, .clip.is-shifting { transition: transform .16s ease-out; outline: 1px dashed rgba(255,255,255,.45); }
.tl-alane.is-drop { background-color: rgba(80,211,107,.07); box-shadow: inset 0 0 0 1px rgba(80,211,107,.4); }
.tl-alane.is-atmos.is-drop { background-color: rgba(91,140,255,.1); box-shadow: inset 0 0 0 1px rgba(143,179,255,.5); }
.clip.is-dragging { z-index: 6; box-shadow: 0 12px 28px -8px rgba(0,0,0,.8), 0 0 0 2px var(--text); opacity: .92; }
/* Barra del Studio en teléfonos con isla dinámica (márgenes laterales): más compacta y, si aun así no cabe, se desliza. */
@media (max-width: 999px) {
  .st-top { overflow-x: auto; scrollbar-width: none; }
  .st-top::-webkit-scrollbar { display: none; }
  .st-top .t-group { flex: none; }
  .st-top .st-iobtn span, .t-loopcycle span { display: none !important; }
  .st-top #r-home { display: none; }
}
