/* La maqueta en reposo es el fotograma final, también con JS desactivado. */
.demo-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.demo-phone { width: min(320px, 100%); padding: 8px; user-select: none; }
.demo-screen {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 453px;
  border: 1px solid var(--sunken);
  border-radius: 26px;
  background: var(--bg);
  color: var(--ink);
  font: 400 13px/1.4 var(--body);
}
.demo-status {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 38px;
  padding-inline: 17px;
  font: 600 11px/1.4 var(--mono);
}
.demo-status i { width: 70px; height: 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.demo-status svg { width: 32px; justify-self: end; }
.demo-home { width: 90px; height: 3px; margin: 10px auto 7px; border-radius: 3px; background: var(--muted); }
.demo-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 5px 12px 0;
}
.demo-title { margin-bottom: 2px; font: 600 25px/1.15 var(--display); letter-spacing: -.025em; }
.demo-subtitle { font: 600 17px/1.2 var(--display); }
.demo-caption { color: var(--muted); font: 600 11px/1.4 var(--body); letter-spacing: .055em; text-transform: uppercase; }
.demo-detail { margin-top: 4px; color: var(--muted); font-size: 12px; }
.demo-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-top-color: var(--sheen);
  border-radius: var(--radius);
  background: var(--surface);
}
.demo-panel:last-child { flex: 1; }
.demo-icon { display: block; width: 16px; height: 16px; flex: none; }
.demo-button {
  position: relative;
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control);
  background: var(--raised);
  font-weight: 600;
  white-space: nowrap;
}
.demo-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.demo-touch {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border: 1px solid var(--accent-text);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--on-accent);
  opacity: 0;
  pointer-events: none;
}
.demo-replay {
  position: absolute;
  inset: 38px 0 20px;
  z-index: 3;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent-text);
  opacity: 0;
  pointer-events: none;
}
.demo-replay .demo-icon { width: 28px; height: 28px; }
.demo-roll { flex: none; display: inline-block; height: 1.15em; overflow: hidden; line-height: 1.15; vertical-align: baseline; }
.demo-roll-strip { display: grid; justify-items: end; transform: translateY(-50%); }

/* Hoy */
.demo-streak {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  color: var(--accent-text);
  font: 600 34px/1.15 var(--mono);
}
.demo-streak > :last-child { font-size: 15px; }
.demo-streak > :last-child .demo-roll-strip { justify-items: start; }
.demo-challenge { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.demo-challenge-state, .demo-groove-state { display: grid; align-items: center; margin-top: 10px; min-height: 34px; }
.demo-challenge-state > *, .demo-groove-state > * { grid-area: 1 / 1; }
.demo-start, .demo-attempt { opacity: 0; }
.demo-attempt { color: var(--accent-text); }
.demo-attempt i { display: block; height: 3px; margin-top: 4px; border-radius: 3px; background: var(--accent); transform-origin: left; }
.demo-done { display: flex; align-items: center; gap: 6px; color: var(--success); font-weight: 600; }
.demo-routine { display: grid; grid-template-rows: auto repeat(3, 1fr); }
.demo-routine .demo-subtitle { margin-bottom: 6px; }
.demo-filler { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 29px; border-top: 1px solid var(--line); }
.demo-filler span, .demo-filler i { width: 63%; height: 5px; border-radius: 4px; background: var(--line-strong); }
.demo-filler:nth-of-type(3) span { width: 46%; }
.demo-filler:nth-of-type(4) span { width: 54%; }
.demo-filler i { width: 16%; background: var(--sheen); }

/* Transcribir */
.demo-trans { display: grid; gap: 8px; }
.demo-audio { font-weight: 600; }
.demo-wave { position: relative; height: 104px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); }
.demo-wave > svg { position: absolute; inset: 25px 0 15px; width: 100%; height: calc(100% - 40px); fill: #6F6862; }
.demo-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); font: 600 11px/1.4 var(--mono); }
.demo-bars span { padding: 4px 5px; border-left: 1px solid var(--line-strong); }
.demo-bars span:first-child { border-left: 0; }
.demo-loop {
  position: absolute;
  inset: 0 25% 0 25%;
  z-index: 1;
  border-inline: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 17%, transparent);
}
.demo-loop span {
  position: absolute;
  bottom: 3px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 11px/1.4 var(--mono);
}
.demo-loop span:first-child { left: 3px; }
.demo-loop span:last-child { right: 3px; }
.demo-loop-touch { inset: auto; left: calc(75% - 11px); bottom: 1px; z-index: 2; }
.demo-wave-head, .demo-tab-head { position: absolute; inset: 0; z-index: 2; transform: translateX(50%); pointer-events: none; }
.demo-wave-head i, .demo-tab-head i { display: block; width: 1px; height: 100%; background: var(--accent); }
.demo-wave-head i::before { content: ""; display: block; width: 7px; height: 4px; border-radius: 0 0 4px 4px; background: var(--accent); transform: translateX(-3px); }
.demo-transport { display: flex; align-items: center; gap: 7px; }
.demo-playback {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: auto;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.demo-playback > * { grid-area: 1 / 1; }
.demo-playback .demo-icon { opacity: 0; }
.demo-pause-icon { width: 8px; height: 11px; border-inline: 2px solid currentColor; }
.demo-speed-label { color: var(--muted); font-size: 12px; }
.demo-minus { min-width: 32px; padding-inline: 6px; font-size: 16px; }
.demo-speed { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 46px; color: var(--accent-text); font: 600 13px/1.15 var(--mono); }
.demo-score { display: grid; align-content: space-between; gap: 5px; background: var(--surface); }
.demo-staff { display: block; width: 100%; height: 52px; color: var(--ink); overflow: visible; }
.demo-staff-lines { fill: none; stroke: #6E5F4C; }
.demo-score-note ellipse { fill: currentColor; }
.demo-score-note path { stroke: currentColor; }
.demo-tab {
  position: relative;
  height: 60px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) left 11px / 100% 1px,
    linear-gradient(var(--line-strong), var(--line-strong)) left 23px / 100% 1px,
    linear-gradient(var(--line-strong), var(--line-strong)) left 35px / 100% 1px,
    linear-gradient(var(--line-strong), var(--line-strong)) left 47px / 100% 1px;
  background-repeat: no-repeat;
  font: 600 11px/1 var(--mono);
}
.demo-tab-title { position: absolute; top: 21px; inset-inline-start: 0; padding: 2px 4px 2px 0; background: var(--surface); color: var(--muted); }
.demo-fret {
  position: absolute;
  top: 11px;
  left: var(--note-x);
  display: grid;
  place-items: center;
  width: 17px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-text);
  transform: translate(-50%, -50%);
}
.demo-fret.demo-note-1 { --note-x: 30%; top: 23px; }
.demo-fret.demo-note-2 { --note-x: 42%; }
.demo-fret.demo-note-3 { --note-x: 54%; }
.demo-fret.demo-note-4 { --note-x: 66%; }
.demo-tab-head { opacity: .6; }

/* Escucha y repite */
.demo-listen { display: flex; flex-direction: column; }
.demo-listen-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
.demo-tempo { color: var(--muted); font: 600 11px/1.4 var(--mono); }
.demo-controls { display: flex; align-items: center; gap: 7px; margin: 12px 0 6px; }
.demo-meter { display: flex; align-items: center; justify-content: flex-end; gap: 2px; margin-left: auto; color: var(--accent-text); }
.demo-meter i { width: 2px; height: 15px; border-radius: 2px; background: currentColor; opacity: .3; transform: scaleY(.35); }
.demo-hint-panel { flex: 1; display: grid; align-content: center; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.demo-hint-value { font-size: 16px; font-weight: 600; }
.demo-chord-values { display: flex; align-items: center; gap: 12px; }
.demo-chord-values span + span { padding-left: 12px; border-left: 1px solid var(--line-strong); }
.demo-beats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.demo-beat { display: grid; gap: 4px; color: var(--muted); font: 600 11px/1.4 var(--mono); }
.demo-beat div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.demo-step { position: relative; height: 19px; border-radius: 3px; background: var(--sunken); }
.demo-step b { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent-soft); }
.demo-step-hit b { background: var(--accent); }

/* GrooveTrain */
.demo-groove {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 10px;
  background: #2E2112;
  color: #E1D5C3;
  border-color: #4A3C2F;
  border-top-color: #6E5F4C;
}
.demo-cells { display: grid; grid-template: repeat(4, minmax(45px, 1fr)) / repeat(4, 1fr); gap: 5px; }
.demo-cell {
  --tile: #5A3F1E;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--sunken);
  border-radius: 6px;
  background: var(--tile);
}
.demo-cell:nth-child(8n + 2) { --tile: #2F4A3F; }
.demo-cell:nth-child(8n + 3) { --tile: #5A3A2A; }
.demo-cell:nth-child(8n + 4) { --tile: #3C3227; }
.demo-cell:nth-child(8n + 5) { --tile: #2C4750; }
.demo-cell:nth-child(8n + 6) { --tile: #4A3A22; }
.demo-cell:nth-child(8n + 7) { --tile: #3B4A2E; }
.demo-cell:nth-child(8n + 8) { --tile: #503040; }
.demo-cell > i { position: absolute; inset: 0; border: 1px solid var(--accent); border-radius: inherit; background: color-mix(in srgb, var(--accent) 35%, transparent); opacity: .28; }
.demo-cell:last-child > i { opacity: .8; }
.demo-cell .demo-icon { width: 23px; height: 20px; z-index: 1; }
.demo-rail {
  position: relative;
  height: 38px;
  margin-top: 3px;
  background:
    linear-gradient(#C6AB80, #C6AB80) left bottom 2px / 100% 1px no-repeat,
    linear-gradient(#C6AB80, #C6AB80) left bottom 6px / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, #4A3C2F 0 5px, transparent 5px 9px) left bottom / 100% 9px no-repeat;
}
.demo-train { position: absolute; inset: 0 64px 7px 0; transform: translateX(100%); }
.demo-train i { display: block; width: 64px; height: 100%; }
.demo-train svg { display: block; width: 100%; height: 100%; }
.demo-groove-state { margin-top: 0; }
.demo-groove-start, .demo-count-in, .demo-groove-playing { opacity: 0; }
.demo-count-in { display: flex; align-items: baseline; gap: 7px; }
.demo-count-in .demo-roll { color: var(--accent-text); font: 600 16px/1.15 var(--mono); }
.demo-count-in .demo-roll-strip { transform: translateY(-75%); }
.demo-groove-result { display: flex; align-items: baseline; gap: 6px; color: var(--accent-text); font-weight: 600; }
.demo-groove-result strong { font: 600 24px/1.15 var(--mono); }

@media (max-width: 860px) {
  .demo-phone { width: min(300px, 100%); margin-inline: auto; }
  .demo-title { font-size: 23px; }
}

/* Pulido (Claude): rutina con sus bloques reales, ayuda previa a las pistas y reinicio sin icono. */
.demo-routine-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); color: var(--ink); font: 600 12px/1.3 var(--body); }
.demo-routine-row b { color: var(--ink); font: 600 12px/1 var(--mono); }
.demo-key { position: relative; }
.demo-listen-note { position: absolute; inset: 10px 0 auto; color: var(--muted); font: 400 12px/1.45 var(--body); opacity: 0; }
