:root {
  --bg: #f3efe6;
  --surface: #fffdf8;
  --surface-soft: #f8f4ea;
  --ink: #21192f;
  --ink-soft: #463c58;
  --muted: #6f7c75;
  --line: #dfd8c9;
  --line-strong: #c9c0ad;
  --green: #331467;
  --green-deep: #1f0e3e;
  --green-soft: #e7e0f2;
  --mint: #d2c3ec;
  --cream: #f7f1df;
  --gold: #e8c66e;
  --terracotta: #c36a4b;
  --terracotta-soft: #f7e8e1;
  --danger: #a74435;
  --shadow: 0 22px 60px rgba(41, 35, 51, 0.08);
  --shadow-soft: 0 8px 24px rgba(41, 35, 51, 0.06);
  --radius: 24px;
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Poppins", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 7% 0%, rgba(232, 198, 110, 0.16), transparent 30rem),
    radial-gradient(circle at 96% 18%, rgba(101, 70, 155, 0.11), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

button,
dialog {
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 32px 36px;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(51, 20, 103, 0.26);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.66);
  color: var(--green);
  box-shadow: inset 0 0 0 4px rgba(255, 253, 248, 0.5);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 14px;
  letter-spacing: 0.015em;
}

.brand-text small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prototype-pill {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Screens ---------- */

.screen {
  animation: screenIn 360ms ease both;
}

.screen[hidden] {
  display: none !important;
}

/* ---------- Welcome ---------- */

.welcome-hero {
  max-width: 880px;
  margin: 74px 0 44px;
}

.welcome-hero h1,
.next-card h1,
.soon-card h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7.2vw, 5.9rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.welcome-hero h1 em {
  color: var(--green);
  font-style: italic;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: rgba(232, 198, 110, 0.9);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.11em;
}

/* ---------- Selector de octava ---------- */

.octave-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 22px;
  padding: 18px 20px 18px 24px;
  border: 1px solid rgba(51, 20, 103, 0.15);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(232, 198, 110, 0.18), transparent 18rem),
    linear-gradient(120deg, rgba(255, 253, 248, 0.94), rgba(231, 224, 242, 0.7));
  box-shadow: var(--shadow-soft);
}

.octave-panel-copy {
  max-width: 580px;
}

.octave-kicker {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.octave-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.octave-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.octave-toggle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  min-width: 250px;
  padding: 12px 14px;
  border: 1px solid rgba(51, 20, 103, 0.18);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 18px rgba(41, 35, 51, 0.06);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.octave-toggle:hover {
  border-color: rgba(51, 20, 103, 0.34);
  box-shadow: 0 10px 24px rgba(41, 35, 51, 0.09);
  transform: translateY(-1px);
}

.octave-toggle:active {
  transform: translateY(0);
}

.octave-toggle:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.28);
  outline-offset: 3px;
}

.octave-toggle-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.octave-toggle-note {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.42rem;
  letter-spacing: -0.03em;
  line-height: 1;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.octave-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.octave-toggle-copy strong {
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.octave-toggle-copy small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.octave-toggle-switch {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  margin-left: auto;
  border-radius: 999px;
  background: #e6e0d3;
  transition: background-color 180ms ease;
}

.octave-toggle-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(31, 14, 62, 0.25);
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.octave-toggle.is-low {
  border-color: rgba(232, 198, 110, 0.38);
  background: linear-gradient(140deg, #2d1459 0%, #1f0e3e 100%);
  color: #f8f3e5;
  box-shadow: 0 14px 30px rgba(31, 14, 62, 0.2);
}

.octave-toggle.is-low .octave-toggle-note {
  background: rgba(232, 198, 110, 0.18);
  color: var(--gold);
}

.octave-toggle.is-low .octave-toggle-copy small {
  color: rgba(248, 243, 229, 0.64);
}

.octave-toggle.is-low .octave-toggle-switch {
  background: var(--gold);
}

.octave-toggle.is-low .octave-toggle-switch span {
  background: var(--green-deep);
  transform: translateX(16px);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 352px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(178, 168, 148, 0.38);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease,
    background-color 200ms ease;
}

.level-card::after {
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(51, 20, 103, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.level-card:hover {
  border-color: rgba(51, 20, 103, 0.25);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.level-card:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.3);
  outline-offset: 3px;
}

.level-card--beginner {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 90% 10%, rgba(232, 198, 110, 0.2), transparent 13rem),
    linear-gradient(155deg, #2d1459 0%, #1f0e3e 72%);
  color: #f8f3e5;
  box-shadow: 0 24px 55px rgba(31, 14, 62, 0.2);
}

.level-card--beginner:hover {
  border-color: rgba(232, 198, 110, 0.35);
  box-shadow: 0 30px 65px rgba(31, 14, 62, 0.26);
}

.level-card--beginner::after {
  border-color: rgba(255, 255, 255, 0.1);
}

.level-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.level-number {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.level-card--beginner .level-number {
  color: rgba(248, 243, 229, 0.58);
}

.level-badge {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.level-badge--available {
  border-color: var(--gold);
  background: var(--gold);
  color: #2b223b;
}

.level-card--beginner .level-badge {
  border-color: rgba(232, 198, 110, 0.32);
  background: rgba(232, 198, 110, 0.13);
  color: #f0d794;
}

.level-orbits {
  position: relative;
  width: 100%;
  height: 74px;
  margin: 25px 0 22px;
}

.level-orbit {
  position: absolute;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.level-orbit--one {
  top: 10px;
  left: 0;
  background: var(--green-soft);
  color: var(--green);
}

.level-orbit--two {
  top: 0;
  left: 42px;
  background: #fbf3de;
  color: #795b17;
}

.level-orbit--three {
  top: 10px;
  left: 84px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.level-card--beginner .level-orbit--one {
  border-color: rgba(232, 198, 110, 0.38);
  background: rgba(247, 241, 223, 0.09);
  color: var(--gold);
}

.level-title {
  position: relative;
  z-index: 1;
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.level-desc {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.level-card--beginner .level-desc {
  color: rgba(248, 243, 229, 0.64);
}

.level-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.level-card--beginner .level-foot {
  border-color: rgba(248, 243, 229, 0.12);
  color: rgba(248, 243, 229, 0.54);
}

.level-arrow {
  color: var(--green);
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.level-card--beginner .level-arrow {
  color: var(--gold);
}

.level-card:hover .level-arrow {
  transform: translateX(4px);
}

.welcome-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

.welcome-footnote-icon {
  font-size: 14px;
}

/* ---------- Screen navigation ---------- */

.screen-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.screen-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.skip-link {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.skip-link:hover {
  color: var(--green);
}

.skip-link:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.22);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link span {
  display: inline-block;
  transition: transform 180ms ease;
}

.skip-link:hover span {
  transform: translateX(3px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.22);
  outline-offset: 3px;
}

.screen-chip {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Intro ---------- */

.intro {
  max-width: 760px;
  margin: 66px 0 30px;
}

.intro-exercise {
  margin-top: 38px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.2vw, 5.2rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.intro h1 em {
  color: var(--green);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: rgba(232, 198, 110, 0.9);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.11em;
}

.lede {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Headphones note ---------- */

.headphone-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid #e8d6a9;
  border-radius: 16px;
  background: #fbf3de;
  box-shadow: 0 5px 18px rgba(118, 91, 30, 0.05);
}

.headphone-note p {
  margin: 0;
  color: #5e4a1f;
  font-size: 13.5px;
  line-height: 1.5;
}

.headphone-note strong {
  color: #42320e;
}

.headphone-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2dfaa;
  color: #5d4713;
}

.headphone-icon svg {
  width: 20px;
  height: 20px;
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
  align-items: start;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  position: relative;
  border: 1px solid rgba(178, 168, 148, 0.38);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* ---------- Card shared ---------- */

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.68;
}

.card-tag {
  margin-left: auto;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------- Reference card ---------- */

.reference-card {
  overflow: hidden;
  padding: 24px;
  border-color: rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 90% 8%, rgba(232, 198, 110, 0.18), transparent 12rem),
    linear-gradient(155deg, #2d1459 0%, #1f0e3e 70%);
  color: #f8f3e5;
  box-shadow: 0 24px 55px rgba(31, 14, 62, 0.22);
}

.reference-card::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.reference-card .card-head {
  position: relative;
  z-index: 1;
}

.reference-card .card-tag {
  color: rgba(248, 243, 229, 0.58);
}

.note-display {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 30px 0 25px;
}

.note-name {
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(5rem, 10vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.72;
  transform-origin: left center;
}

.note-meta {
  color: rgba(248, 243, 229, 0.6);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reference-card.is-playing .note-name {
  animation: noteGlow 0.9s ease-in-out infinite alternate;
}

.sequence-note-display {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 30px 0 25px;
}

.sequence-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sequence-note-chip {
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5.3vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.8;
}

.sequence-note-arrow {
  color: rgba(248, 243, 229, 0.34);
  font-size: 18px;
  line-height: 1;
}

.reference-card.is-playing .sequence-note-chip {
  animation: sequenceChipGlow 0.9s ease-in-out infinite alternate;
}

.reference-card.is-playing .sequence-note-chip:nth-child(3) {
  animation-delay: -0.3s;
}

.reference-card.is-playing .sequence-note-chip:nth-child(5) {
  animation-delay: -0.6s;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 3px solid rgba(232, 198, 110, 0.8);
  outline-offset: 3px;
}

.btn-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.btn-copy strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-copy small {
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.63;
}

.btn-reference {
  z-index: 1;
  padding: 12px 14px;
  background: var(--cream);
  color: var(--green-deep);
  box-shadow: 0 12px 26px rgba(13, 5, 28, 0.2);
}

.btn-reference:hover {
  background: #fff9eb;
  box-shadow: 0 15px 30px rgba(13, 5, 28, 0.24);
}

.btn-reference.is-playing {
  background: #efe2bd;
}

.btn-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.btn-icon-play {
  background: var(--green);
  color: var(--cream);
}

.btn-icon-play svg {
  width: 17px;
  height: 17px;
  margin-left: 2px;
}

.btn-reference.is-playing .btn-icon-play svg {
  display: none;
}

.btn-reference.is-playing .btn-icon-play::after {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.equalizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 180ms ease;
}

.equalizer i {
  width: 3px;
  height: 5px;
  border-radius: 3px;
  background: var(--green);
  transform-origin: center;
}

.btn-reference.is-playing .equalizer {
  opacity: 0.75;
}

.btn-reference.is-playing .equalizer i {
  animation: equalize 0.65s ease-in-out infinite alternate;
}

.btn-reference.is-playing .equalizer i:nth-child(2) {
  animation-delay: -0.2s;
}

.btn-reference.is-playing .equalizer i:nth-child(3) {
  animation-delay: -0.4s;
}

.btn-reference.is-playing .equalizer i:nth-child(4) {
  animation-delay: -0.1s;
}

/* ---------- Mic card ---------- */

.mic-card {
  padding: 24px;
  overflow: hidden;
}

.mic-card .card-head {
  margin-bottom: 22px;
}

.mic-card .card-tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  transition: background-color 180ms ease, color 180ms ease;
}

.mic-card.is-active .card-tag {
  background: var(--green-soft);
  color: var(--green);
}

.btn-mic {
  padding: 10px 14px 10px 10px;
  background: var(--green);
  color: #fffdf8;
  box-shadow: 0 14px 28px rgba(51, 20, 103, 0.22);
}

.btn-mic:hover {
  background: #3d197a;
  box-shadow: 0 17px 32px rgba(51, 20, 103, 0.26);
}

.btn-mic .mic-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.mic-icon svg {
  width: 23px;
  height: 23px;
}

.icon-stop {
  display: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: currentColor;
}

.btn-mic.is-active {
  background: var(--ink);
  box-shadow: 0 14px 28px rgba(33, 25, 47, 0.22);
}

.btn-mic.is-active .icon-mic {
  display: none;
}

.btn-mic.is-active .icon-stop {
  display: block;
}

.mic-live-dot {
  display: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: #f18b70;
  box-shadow: 0 0 0 0 rgba(241, 139, 112, 0.4);
}

.btn-mic.is-active .mic-live-dot {
  display: block;
  animation: livePulse 1.7s ease-out infinite;
}

.btn-mic.is-connecting {
  cursor: wait;
  opacity: 0.72;
}

.btn-mic.is-connecting:hover {
  transform: none;
}

.mic-card.has-error .card-tag {
  background: #f7e6e2;
  color: var(--danger);
}

.mic-card.has-error .card-footnote {
  color: var(--danger);
}

/* ---------- Tip card ---------- */

.tip-card {
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.52);
}

.tip-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tip-card p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- Tuner card ---------- */

.tuner-card {
  min-height: 100%;
  padding: 26px 26px 24px;
  overflow: hidden;
}

.tuner-card::before {
  position: absolute;
  top: -130px;
  right: -130px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 195, 236, 0.3), transparent 65%);
  content: "";
  pointer-events: none;
}

.tuner-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tuner-head .eyebrow {
  margin-bottom: 7px;
}

.tuner-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.live-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.75);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.live-badge[data-state="listening"],
.live-badge[data-state="voice"] {
  border-color: #c5b6df;
  background: var(--green-soft);
  color: var(--green);
}

.live-badge[data-state="listening"] .live-dot {
  animation: livePulse 1.7s ease-out infinite;
}

.live-badge[data-state="reference"] {
  border-color: #e5d19b;
  background: #fbf3de;
  color: #6e5110;
}

.live-badge[data-state="complete"] {
  border-color: #c5b6df;
  background: var(--green-soft);
  color: var(--green);
}

.live-badge[data-state="error"] {
  border-color: #e8c4bd;
  background: #f8e9e6;
  color: var(--danger);
}

.tuner-card.is-complete .target-band {
  background: rgba(201, 230, 213, 0.9);
  box-shadow: 0 0 0 8px rgba(201, 230, 213, 0.28);
}

/* ---------- Tuner stage ---------- */

.tuner-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 70px 76px 116px;
  justify-content: center;
  gap: 0 16px;
  height: 462px;
  margin: 28px 0 22px;
  padding: 4px 0;
}

.scale {
  position: relative;
  height: 100%;
}

.scale-label {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  padding-right: 9px;
  color: #9ba49e;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.scale-label.is-c {
  color: var(--ink-soft);
  font-weight: 700;
}

.scale-label.is-target {
  color: var(--green);
  font-weight: 700;
}

.scale-label.is-target::after {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: 1px;
  content: "";
}

.rail {
  position: relative;
  width: 100%;
  max-width: 76px;
  height: 100%;
  margin: 0 auto;
}

.rail::before {
  position: absolute;
  top: 3%;
  bottom: 3%;
  left: 50%;
  width: 7px;
  border-radius: 8px;
  background: #efeadf;
  content: "";
  transform: translateX(-50%);
}

.rail-lines {
  position: absolute;
  inset: 0;
}

.rail-line {
  position: absolute;
  left: 50%;
  width: 52px;
  height: 1px;
  background: #e9e3d6;
  transform: translate(-50%, -50%);
}

.rail-line.is-natural {
  width: 62px;
  background: #dcd4c4;
}

.rail-line.is-octave {
  width: 72px;
  background: #cfc6b3;
}

.target-band {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: 18px;
  border: 1px solid rgba(83, 153, 113, 0.2);
  border-radius: 999px;
  background: rgba(201, 230, 213, 0.68);
  transform: translate(-50%, -50%);
  transition: box-shadow 220ms ease, background-color 220ms ease;
}

.target-line {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
  background: rgba(51, 20, 103, 0.55);
  transform: translateY(-50%);
}

.target-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(51, 20, 103, 0.48);
  border-radius: 50%;
  background: var(--surface);
  transform: translate(-50%, -50%);
}

.tuner-stage.is-reference .target-band {
  background: rgba(232, 198, 110, 0.45);
  box-shadow: 0 0 0 7px rgba(232, 198, 110, 0.12);
  animation: targetPulse 1.1s ease-in-out infinite alternate;
}

.tuner-stage.is-reference .target-line {
  background: rgba(184, 141, 40, 0.72);
}

.ball {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 30px;
  height: 30px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 5px 14px rgba(95, 53, 38, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

.ball.is-visible {
  opacity: 1;
}

.ball.in-tune {
  background: #1f5c45;
  box-shadow:
    0 0 0 5px rgba(201, 230, 213, 0.7),
    0 5px 18px rgba(31, 92, 69, 0.32);
}

.ball-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%);
}

.ball-ring {
  position: absolute;
  inset: -11px;
  border: 1px solid rgba(195, 106, 75, 0.25);
  border-radius: 50%;
  opacity: 0;
}

.ball.in-tune .ball-ring {
  border-color: rgba(31, 92, 69, 0.25);
  animation: ballPulse 1.5s ease-out infinite;
}

/* ---------- Readout ---------- */

.readout {
  display: flex;
  flex-direction: column;
  align-self: center;
  gap: 5px;
  min-width: 0;
  padding-top: 2px;
}

.readout-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.readout-note {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.1rem, 3.4vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: color 200ms ease;
}

.readout-note.is-close {
  color: #1f5c45;
}

.readout-cents {
  color: var(--terracotta);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.readout-cents.is-close {
  color: #1f5c45;
}

.readout-hz {
  margin-top: 3px;
  color: #98a19b;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---------- Secuencia de notas ---------- */

.sequence-stage {
  position: relative;
  z-index: 1;
  margin: 25px 0 22px;
}

.sequence-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.sequence-target,
.sequence-detected {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sequence-target-note {
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 2.9rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.sequence-target-meta {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sequence-detected {
  align-items: flex-end;
  margin-left: auto;
  text-align: right;
}

.sequence-detected strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.sequence-detected #sequenceCents {
  color: var(--terracotta);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sequence-detected #sequenceCents.is-close {
  color: #1f5c45;
}

.sequence-detected #sequenceHz {
  color: #98a19b;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.sequence-dots {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  padding-bottom: 2px;
}

.sequence-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.sequence-dot.is-current {
  border-color: var(--green);
  background: var(--green);
  color: var(--cream);
  box-shadow: 0 0 0 4px rgba(210, 195, 236, 0.55);
}

.sequence-dot.is-done {
  border-color: #c5b6df;
  background: var(--green-soft);
  color: var(--green);
}

.harmony-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #dcd5e8;
  border-radius: 14px;
  background: rgba(237, 231, 248, 0.6);
}

.harmony-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.harmony-note {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
}

.harmony-note--drone {
  color: #a77b25;
}

.harmony-note small {
  display: block;
  margin-top: 3px;
  color: #a08b61;
  font-family: var(--sans);
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.harmony-symbol {
  color: #9385ab;
  font-size: 13px;
}

.harmony-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
  text-align: right;
}

.harmony-result strong {
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
}

.harmony-result #harmonyHint {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

.sequence-roll {
  position: relative;
  height: 318px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% 8%, rgba(232, 198, 110, 0.12), transparent 12rem),
    var(--surface-soft);
}

.roll-viewport {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 34px;
  left: 0;
  display: flex;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-color: rgba(51, 20, 103, 0.26) transparent;
  scrollbar-width: thin;
}

.sequence-roll.is-scroll .roll-viewport {
  overflow-x: auto;
}

.roll-viewport::-webkit-scrollbar {
  height: 6px;
}

.roll-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.roll-viewport::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(51, 20, 103, 0.26);
}

.roll-labels {
  position: sticky;
  left: 0;
  z-index: 4;
  flex: 0 0 58px;
  align-self: stretch;
  width: 58px;
  background: var(--surface-soft);
}

.roll-label {
  position: absolute;
  right: 10px;
  color: #9ba49e;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  transform: translateY(-50%);
  transition: color 180ms ease, font-weight 180ms ease;
}

.roll-label.is-target {
  color: var(--green);
  font-weight: 700;
}

.roll-area {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

.roll-canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

.roll-grid {
  position: absolute;
  inset: 0;
}

.roll-line {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px dashed #ddd6c7;
}

.roll-line.is-target {
  border-top-color: rgba(105, 68, 168, 0.38);
}

.roll-axis-pitch,
.roll-axis-time {
  position: absolute;
  bottom: 10px;
  color: #a3aaa5;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.roll-axis-pitch {
  left: 12px;
}

.roll-axis-time {
  right: 16px;
}

.roll-scroll-hint {
  position: absolute;
  top: 9px;
  right: 14px;
  z-index: 5;
  display: none;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(51, 20, 103, 0.09);
  color: var(--green);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.sequence-roll.is-scroll.is-scrollable .roll-scroll-hint {
  display: inline-flex;
}

.seq-block {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 27%;
  min-width: 72px;
  height: 52px;
  padding: 7px 11px;
  border: 1px solid #cfc4e2;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 5px 13px rgba(41, 35, 51, 0.06);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.seq-block-note {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.seq-block-step {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.seq-block.is-current {
  border-color: var(--green);
  box-shadow:
    0 0 0 4px rgba(210, 195, 236, 0.6),
    0 7px 16px rgba(41, 35, 51, 0.08);
}

.seq-block.is-current .seq-block-note {
  color: var(--green);
}

.seq-block.is-playing {
  border-color: var(--gold);
  background: #fbf3de;
  box-shadow: 0 0 0 5px rgba(232, 198, 110, 0.18), 0 8px 18px rgba(112, 83, 19, 0.11);
  transform: translate(-50%, -50%) scale(1.035);
}

/* Avanzado: las tres notas suenan a la vez en un mismo momento de la línea de
   tiempo. DO y SOL ya suenan; MI aparece como hueco hasta que se canta. */
.sequence-roll.is-advanced-harmony .seq-block {
  width: 27%;
  min-width: 84px;
  height: 38px;
  padding: 5px 11px;
  text-align: center;
}

.sequence-roll.is-advanced-harmony .seq-block--reference {
  border-color: rgba(200, 158, 55, 0.4);
  background: #fffdf6;
}

.sequence-roll.is-advanced-harmony .seq-block--reference .seq-block-note {
  color: #8a6a1f;
}

.sequence-roll.is-advanced-harmony .seq-block--reference .seq-block-step {
  color: #a77b25;
}

.sequence-roll.is-advanced-harmony .seq-block--target {
  z-index: 1;
  overflow: hidden;
  border-color: var(--green);
  background:
    linear-gradient(90deg, rgba(210, 195, 236, 0.95) var(--hold-progress, 0%), transparent var(--hold-progress, 0%)),
    #f6f3fc;
}

.sequence-roll.is-advanced-harmony .seq-block--target.is-ghost {
  border-style: dashed;
  background: rgba(246, 243, 252, 0.55);
  box-shadow: none;
}

.sequence-roll.is-advanced-harmony .seq-block--target.is-ghost .seq-block-note {
  opacity: 0.55;
}

.sequence-roll.is-advanced-harmony .seq-block--target .seq-block-note,
.sequence-roll.is-advanced-harmony .seq-block--target .seq-block-step {
  position: relative;
  color: var(--green);
}

.sequence-roll.is-advanced-harmony .seq-block--target.is-done {
  background: #1f5c45;
}

.sequence-roll.is-advanced-harmony .seq-block--target.is-done .seq-block-note,
.sequence-roll.is-advanced-harmony .seq-block--target.is-done .seq-block-step {
  color: #f7f1df;
}

.advanced-harmony-slot {
  position: absolute;
  top: 2px;
  bottom: 2px;
  z-index: 0;
  width: calc(27% + 22px);
  min-width: 106px;
  border: 1px dashed rgba(51, 20, 103, 0.2);
  border-radius: 18px;
  background: rgba(210, 195, 236, 0.16);
  pointer-events: none;
  transform: translateX(-50%);
}

.advanced-harmony-slot span {
  position: absolute;
  top: 4px;
  right: 0;
  left: 0;
  color: rgba(51, 20, 103, 0.55);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.advanced-notice {
  margin: 0 0 8px;
  padding: 7px 12px;
  border: 1px solid rgba(51, 20, 103, 0.22);
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}

.advanced-notice.is-minor {
  border-color: #c9d2e8;
  background: #eef1fa;
  color: #34456e;
}
.roll-label--reference {
  color: #a77b25;
}

.roll-line--reference {
  border-top-color: rgba(200, 158, 55, 0.28);
}

/* La flecha hacia arriba es la misma guía de Voz inmóvil, con la punta arriba. */
.seq-interval-guide.is-up .seq-interval-head {
  top: -2px;
  bottom: auto;
  border-top: 0;
  border-bottom: 7px solid var(--green);
}

.seq-interval-guide.is-up .seq-interval-label {
  top: auto;
  bottom: 0;
  transform: translateY(2px);
}

.seq-interval-guide.is-up.is-short .seq-interval-label {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

/* Carril lateral: cuando la flecha atravesaría otro bloque, sube por la
   izquierda de la columna y entra a la nota objetivo desde el costado. */
.advanced-harmony-slot.has-lane {
  width: calc(27% + 49px);
  min-width: 133px;
  transform: translateX(calc(-50% - 13.5px));
}

.seq-interval-guide.is-lane::before,
.seq-interval-guide.is-lane::after {
  position: absolute;
  left: 0;
  content: "";
  border-top: 2px dashed rgba(51, 20, 103, 0.4);
}

.seq-interval-guide.is-lane::before {
  top: 0;
  width: 12px;
  transform: translateY(-1px);
}

.seq-interval-guide.is-lane::after {
  bottom: 0;
  width: 20px;
  transform: translateY(1px);
}

.seq-interval-guide.is-lane .seq-interval-head {
  top: 0;
  bottom: auto;
  left: 12px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--green);
  border-right: 0;
  transform: translateY(-50%);
}

.seq-interval-guide.is-lane .seq-interval-label {
  top: 50%;
  right: 10px;
  bottom: auto;
  left: auto;
  transform: translateY(-50%);
}
.seq-block.is-done {
  border-color: #1f5c45;
  background: #1f5c45;
}

.seq-block.is-done .seq-block-note {
  color: #f7f1df;
}

.seq-block.is-done .seq-block-step {
  color: rgba(247, 241, 223, 0.6);
}

.seq-arrow {
  position: absolute;
  z-index: 0;
  color: var(--line-strong);
  font-size: 17px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

/* Los ejercicios largos se recorren en horizontal; el resto conserva la vista fija. */
.sequence-roll.is-scroll {
  height: 340px;
}

.sequence-roll.is-scroll .roll-area {
  flex: 0 0 var(--roll-canvas-width);
}

.sequence-roll.is-scroll .roll-label {
  font-size: 9px;
}

.sequence-roll.is-scroll .seq-block {
  width: 46px;
  min-width: 0;
  height: 34px;
  padding: 4px 2px;
  border-radius: 9px;
  text-align: center;
}

.sequence-roll.is-scroll .seq-block-note {
  font-size: 9.5px;
  line-height: 1.05;
}

.sequence-roll.is-scroll .seq-block-step {
  margin-top: 1px;
  font-size: 6px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.sequence-roll.is-scroll .seq-arrow {
  display: none;
}

/* La escala completa necesita nueve columnas compactas en la misma escalera. */
.sequence-roll.is-dense {
  height: 340px;
}

.sequence-roll.is-dense .seq-block {
  width: calc(100% / var(--seq-count) - 1%);
  min-width: 0;
  height: 38px;
  padding: 4px 2px;
  border-radius: 9px;
  text-align: center;
}

.sequence-roll.is-dense .seq-block-note {
  font-size: 10px;
  line-height: 1.05;
}

.sequence-roll.is-dense .seq-block-step {
  margin-top: 1px;
  font-size: 6.5px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.sequence-roll.is-dense .seq-arrow {
  font-size: 12px;
}

.sequence-note-row.is-dense {
  flex-wrap: wrap;
  gap: 4px 2px;
}

.sequence-note-row.is-dense .sequence-note-chip {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  letter-spacing: -0.02em;
}

.sequence-note-row.is-dense .sequence-note-arrow {
  font-size: 9px;
}

.sequence-roll.is-dense .seq-drone-label {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.sequence-dots.is-dense {
  gap: 3px;
  flex-wrap: wrap;
}

.sequence-dots.is-dense .sequence-dot {
  width: 20px;
  height: 20px;
  font-size: 7.5px;
}

.sequence-dots.is-very-dense {
  gap: 2px;
}

.sequence-dots.is-very-dense .sequence-dot {
  width: 15px;
  height: 15px;
  font-size: 6.5px;
}

.sequence-note-row.is-very-dense {
  gap: 3px 1px;
}

.sequence-note-row.is-very-dense .sequence-note-chip {
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

.sequence-note-row.is-very-dense .sequence-note-arrow {
  font-size: 8px;
}

.seq-drone-line {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(200, 158, 55, 0.55);
  box-shadow: 0 0 0 4px rgba(232, 198, 110, 0.13);
  pointer-events: none;
  transform: translateY(-50%);
}

.seq-drone-label {
  position: absolute;
  top: -16px;
  right: 2px;
  color: #9c7a2d;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.sequence-stage.is-reference .seq-drone-line,
.seq-drone-line.is-active {
  animation: dronePulse 1.4s ease-in-out infinite alternate;
}

/* Barra sostenida de Voz inmóvil: el DO ocupa los cuatro espacios de la línea de tiempo. */
.seq-sustain-bar {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(24px, 4.6vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(51, 20, 103, 0.3);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(210, 195, 236, 0.42), rgba(210, 195, 236, 0.2));
  box-shadow: 0 5px 14px rgba(51, 20, 103, 0.08);
  pointer-events: none;
  transform: translateY(-50%);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease;
}

.seq-sustain-fill {
  position: absolute;
  right: auto;
  bottom: 0;
  left: 0;
  width: var(--voice-progress, 0%);
  height: clamp(3px, 0.7vw, 5px);
  border-radius: 0 999px 999px 0;
  background: var(--green);
  transition: width 320ms ease;
}

.seq-sustain-label {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-size: clamp(7px, 1.5vw, 10px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.seq-sustain-bar.is-active {
  border-color: var(--green);
  box-shadow:
    0 0 0 4px rgba(210, 195, 236, 0.55),
    0 6px 18px rgba(51, 20, 103, 0.14);
  animation: sustainPulse 1.5s ease-in-out infinite alternate;
}

.seq-sustain-bar.is-complete {
  border-color: #1f5c45;
  background: rgba(201, 230, 213, 0.6);
}

.roll-label--sustain {
  color: var(--green);
  font-weight: 700;
}

.roll-line--sustain {
  border-top-color: rgba(51, 20, 103, 0.16);
}

/* Guía vertical de pasos entre la referencia y la nota sostenida. */
.seq-interval-guide {
  position: absolute;
  z-index: 2;
  width: 0;
  pointer-events: none;
}

.seq-interval-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-left: 2px dashed rgba(51, 20, 103, 0.4);
  transform: translateX(-1px);
}

.seq-interval-head {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 7px solid var(--green);
  filter: drop-shadow(0 2px 3px rgba(51, 20, 103, 0.16));
  transform: translateX(-50%);
}

.seq-interval-steps {
  position: absolute;
  inset: 0;
  display: block;
}

.seq-interval-step {
  position: absolute;
  left: 0;
  width: 9px;
  height: 9px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(232, 198, 110, 0.16);
  transform: translate(-50%, -50%);
}

.seq-interval-step-note {
  position: absolute;
  top: 50%;
  left: 12px;
  color: #8a6a1f;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
}

.seq-interval-label {
  position: absolute;
  top: 0;
  left: 10px;
  padding: 3px 7px;
  border: 1px solid rgba(51, 20, 103, 0.2);
  border-radius: 999px;
  background: #fffdf7;
  box-shadow: 0 3px 9px rgba(41, 35, 51, 0.08);
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-2px);
}

.seq-interval-guide.is-flip .seq-interval-label {
  right: 10px;
  left: auto;
}

.seq-interval-guide.is-flip .seq-interval-step-note {
  right: 12px;
  left: auto;
}

.seq-interval-guide.is-short .seq-interval-label {
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 720px) {
  .seq-interval-label {
    font-size: 7.5px;
  }

  .seq-interval-step-note {
    font-size: 7.5px;
  }

  .seq-interval-step {
    width: 8px;
    height: 8px;
  }
}

.seq-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 2px;
  border-radius: 2px;
  background: rgba(51, 20, 103, 0.42);
  box-shadow: 0 0 10px rgba(51, 20, 103, 0.3);
  pointer-events: none;
}

.seq-ball {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 5px 14px rgba(95, 53, 38, 0.25);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    left 90ms linear,
    top 90ms linear,
    background-color 200ms ease,
    box-shadow 200ms ease;
}

.seq-ball span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%);
}

.seq-ball.in-tune {
  background: #1f5c45;
  box-shadow:
    0 0 0 5px rgba(201, 230, 213, 0.7),
    0 5px 18px rgba(31, 92, 69, 0.32);
}

.sequence-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

/* ---------- Feedback ---------- */

.feedback {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 78px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  transition:
    background-color 220ms ease,
    border-color 220ms ease;
}

.feedback[data-state="idle"] {
  display: none;
}

.feedback-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eae4d6;
  color: var(--muted);
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  transition:
    background-color 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

.feedback-copy {
  min-width: 0;
}

.feedback-text {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.feedback-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.feedback[data-state="low"] {
  border-color: #ead6a7;
  background: #fbf3de;
}

.feedback[data-state="low"] .feedback-arrow {
  background: #f0d48c;
  color: #664b0a;
  transform: translateY(-2px);
}

.feedback[data-state="high"] {
  border-color: #e8c8ba;
  background: #f8ebe5;
}

.feedback[data-state="high"] .feedback-arrow {
  background: #ecc9b9;
  color: #743d27;
  transform: translateY(2px);
}

.feedback[data-state="intune"] {
  border-color: #c5b6df;
  background: var(--green-soft);
}

.feedback[data-state="intune"] .feedback-arrow {
  background: var(--green);
  color: var(--cream);
}

.feedback[data-state="error"] {
  border-color: #e8c4bd;
  background: #f8e9e6;
}

.feedback[data-state="error"] .feedback-arrow {
  background: #eecac2;
  color: var(--danger);
}

/* ---------- Success / next exercise ---------- */

.success-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #bcd9c8;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 20%, rgba(232, 198, 110, 0.2), transparent 9rem),
    #e3efe8;
  box-shadow: 0 10px 26px rgba(31, 92, 69, 0.08);
  animation: successIn 420ms ease both;
}

.success-panel[hidden] {
  display: none;
}

.success-check {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1f5c45;
  color: #f7f1df;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(31, 92, 69, 0.2);
}

.success-check--large {
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  font-size: 30px;
}

.success-copy {
  flex: 1;
  min-width: 0;
}

.success-kicker {
  margin: 0 0 3px;
  color: #1f5c45;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.success-title {
  margin: 0;
  color: #1d2b26;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.success-sub {
  margin: 3px 0 0;
  color: #6f7c75;
  font-size: 11px;
  line-height: 1.4;
}

.btn-next {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: var(--cream);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  transition:
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.btn-next:hover {
  background: #3d197a;
  box-shadow: 0 9px 20px rgba(51, 20, 103, 0.18);
  transform: translateY(-1px);
}

.btn-next:active {
  transform: translateY(0);
}

.btn-next:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.24);
  outline-offset: 3px;
}

.next-screen,
.soon-screen {
  display: grid;
  min-height: 68vh;
  padding: 64px 0 34px;
  place-items: center;
}

.next-card,
.soon-card {
  position: relative;
  width: min(730px, 100%);
  padding: 48px;
  overflow: hidden;
  border: 1px solid rgba(178, 168, 148, 0.38);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.next-card::before,
.soon-card::before {
  position: absolute;
  top: -180px;
  left: 50%;
  width: 500px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 195, 236, 0.38), transparent 68%);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.next-card .eyebrow,
.soon-card .eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.next-card h1,
.soon-card h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(3rem, 6vw, 4.7rem);
}

.next-card .lede,
.soon-card .lede {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 16px auto 32px;
}

.next-cheer {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: -12px auto 30px;
  padding: 9px 18px;
  border: 1px solid #e8d6a9;
  border-radius: 999px;
  background: #fbf3de;
  color: #6e5110;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.next-preview {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--surface-soft);
  text-align: left;
}

.next-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.soon-badge {
  padding: 4px 7px;
  border-radius: 999px;
  background: #fbf3de;
  color: #6e5110;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.next-preview-body {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
}

.next-preview-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--serif);
  font-size: 25px;
}

.next-preview-body h2 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.next-preview-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.next-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.next-actions .btn-primary,
.next-actions .btn-ghost {
  min-width: 184px;
}

.soon-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 auto 24px;
  border: 1px solid #e8d6a9;
  border-radius: 50%;
  background: #fbf3de;
  color: #6e5110;
  font-family: var(--serif);
  font-size: 34px;
  place-items: center;
}

.soon-card .lede {
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 34px 0 6px;
  color: #919b95;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-dot {
  color: var(--line-strong);
}

/* ---------- Dialog ---------- */

.permission-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 30px;
  border: 1px solid rgba(178, 168, 148, 0.4);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(26, 16, 42, 0.3);
}

.permission-dialog::backdrop {
  background: rgba(25, 15, 42, 0.46);
  backdrop-filter: blur(4px);
}

.permission-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.dialog-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #fbf3de;
  color: #6a4f11;
}

.dialog-icon svg {
  width: 25px;
  height: 25px;
}

.permission-dialog h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.permission-dialog p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
}

.permission-dialog .dialog-lead {
  color: var(--ink);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.btn-primary,
.btn-ghost {
  justify-content: center;
  width: auto;
  padding: 12px 17px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.btn-primary {
  background: var(--green);
  color: var(--cream);
}

.btn-primary:hover {
  background: #3d197a;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: var(--surface-soft);
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.24);
  outline-offset: 2px;
}

/* ---------- Utilities / motion ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes successIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes noteGlow {
  from {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 0 rgba(232, 198, 110, 0);
  }
  to {
    opacity: 0.86;
    transform: scale(1.015);
    text-shadow: 0 0 28px rgba(232, 198, 110, 0.24);
  }
}

@keyframes sequenceChipGlow {
  from {
    opacity: 0.72;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(-2px);
    text-shadow: 0 0 20px rgba(232, 198, 110, 0.28);
  }
}

@keyframes dronePulse {
  from {
    background: rgba(200, 158, 55, 0.48);
    box-shadow: 0 0 0 4px rgba(232, 198, 110, 0.1);
  }
  to {
    background: rgba(200, 158, 55, 0.78);
    box-shadow: 0 0 0 8px rgba(232, 198, 110, 0.2);
  }
}

@keyframes sustainPulse {
  from {
    box-shadow:
      0 0 0 3px rgba(210, 195, 236, 0.45),
      0 5px 14px rgba(51, 20, 103, 0.1);
  }
  to {
    box-shadow:
      0 0 0 7px rgba(210, 195, 236, 0.18),
      0 7px 20px rgba(51, 20, 103, 0.18);
  }
}

@keyframes equalize {
  from {
    height: 5px;
  }
  to {
    height: 18px;
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(241, 139, 112, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(241, 139, 112, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(241, 139, 112, 0);
  }
}

@keyframes ballPulse {
  0% {
    opacity: 0.65;
    transform: scale(0.82);
  }
  70% {
    opacity: 0;
    transform: scale(1.22);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes targetPulse {
  from {
    box-shadow: 0 0 0 4px rgba(232, 198, 110, 0.1);
  }
  to {
    box-shadow: 0 0 0 10px rgba(232, 198, 110, 0.16);
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .tip-card {
    grid-column: 1 / -1;
  }

  .note-name {
    font-size: 5.2rem;
  }

  .tuner-stage {
    height: 430px;
  }

  .welcome-hero {
    margin-top: 58px;
  }

  .next-card,
  .soon-card {
    padding: 38px;
  }
}

@media (max-width: 860px) {
  .level-grid {
    grid-template-columns: 1fr;
  }

  .level-card {
    min-height: 0;
  }

  .level-orbits {
    height: 70px;
    margin: 18px 0;
  }

  .level-desc {
    max-width: 560px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 22px 18px 30px;
  }

  .octave-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }

  .octave-toggle {
    width: 100%;
    min-width: 0;
  }

  .intro {
    margin-top: 46px;
  }

  .intro h1 {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }

  .lede {
    font-size: 15.5px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .tip-card {
    grid-column: auto;
  }

  .tuner-card {
    padding: 22px 18px 18px;
  }

  .tuner-stage {
    grid-template-columns: 54px minmax(52px, 72px) 86px;
    height: 390px;
    gap: 0 7px;
    margin-top: 24px;
  }

  .scale-label {
    padding-right: 5px;
    font-size: 9.5px;
  }

  .readout-note {
    font-size: 2rem;
  }

  .readout-cents {
    font-size: 9.5px;
  }

  .feedback {
    padding: 13px;
  }

  .feedback-arrow {
    width: 34px;
    height: 34px;
  }

  .live-badge {
    padding: 7px 9px;
    font-size: 8px;
  }

  .sequence-head {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
  }

  .harmony-readout {
    align-items: flex-start;
  }

  .harmony-result {
    align-items: flex-start;
    margin-left: 0;
    text-align: left;
  }

  .sequence-dots {
    padding-bottom: 1px;
  }

  .sequence-roll {
    height: 285px;
  }

  .sequence-roll.is-dense {
    height: 315px;
  }

  .sequence-roll.is-scroll {
    height: 315px;
  }

  .roll-viewport {
    right: 12px;
  }

  .roll-labels {
    flex-basis: 48px;
    width: 48px;
  }

  .seq-block {
    width: 28%;
    min-width: 58px;
    height: 46px;
    padding: 6px 8px;
  }

  .seq-block-note {
    font-size: 11.5px;
  }

  .success-panel {
    flex-wrap: wrap;
  }

  .btn-next {
    justify-content: center;
    width: 100%;
  }

  .next-card,
  .soon-card {
    padding: 30px 22px;
    border-radius: 24px;
  }

  .next-screen,
  .soon-screen {
    padding-top: 46px;
  }
}

@media (max-width: 430px) {
  .page {
    padding: 18px 16px 30px;
  }

  .welcome-hero {
    margin-top: 38px;
    margin-bottom: 26px;
  }

  .welcome-hero h1 {
    font-size: clamp(2.65rem, 13.6vw, 3.8rem);
  }

  .octave-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .octave-title {
    font-size: 1.08rem;
  }

  .octave-text {
    font-size: 11.5px;
  }

  .octave-toggle {
    gap: 11px;
    padding: 10px 12px;
  }

  .octave-toggle-note {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 1.28rem;
  }

  .octave-toggle-copy strong {
    font-size: 12.5px;
  }

  .octave-toggle-copy small {
    font-size: 9.5px;
  }

  .level-grid {
    gap: 14px;
  }

  .level-card {
    padding: 18px;
    border-radius: 20px;
  }

  .level-orbits {
    margin: 16px 0;
  }

  .level-title {
    font-size: 1.72rem;
  }

  .level-desc {
    font-size: 12px;
  }

  .welcome-footnote {
    justify-content: flex-start;
    margin-top: 20px;
    padding: 0 2px;
    font-size: 10.5px;
    text-align: left;
  }

  .intro-exercise {
    margin-top: 28px;
  }

  .intro h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
    line-height: 0.98;
  }

  .intro .lede {
    margin-top: 16px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .headphone-note {
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 13px;
    border-radius: 14px;
  }

  .headphone-note p {
    font-size: 12px;
  }

  .headphone-icon {
    width: 32px;
    height: 32px;
  }

  .headphone-icon svg {
    width: 17px;
    height: 17px;
  }

  .reference-card {
    padding: 20px;
    border-radius: 20px;
  }

  .note-display,
  .sequence-note-display {
    margin: 24px 0 20px;
  }

  .note-name {
    font-size: 4.4rem;
  }

  .screen-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .screen-nav-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .skip-link {
    font-size: 9px;
  }

  .harmony-note,
  .harmony-result strong {
    font-size: 1.15rem;
  }

  .next-actions {
    flex-direction: column;
  }

  .next-actions .btn-primary,
  .next-actions .btn-ghost {
    width: 100%;
  }

  .next-preview-body {
    align-items: flex-start;
    padding: 18px;
  }

  .next-preview-mark {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .next-card h1,
  .soon-card h1 {
    font-size: clamp(2.7rem, 13vw, 3.8rem);
  }

  .sequence-head {
    align-items: flex-start;
  }

  .sequence-target-note {
    font-size: 1.9rem;
  }

  .sequence-detected {
    margin-left: 0;
  }

  .sequence-detected strong {
    font-size: 1.35rem;
  }

  .sequence-dots {
    width: 100%;
    padding-top: 3px;
  }

  .sequence-roll {
    height: 240px;
  }

  .sequence-roll.is-dense {
    height: 270px;
  }

  .sequence-roll.is-scroll {
    height: 270px;
  }

  .roll-viewport {
    right: 10px;
  }

  .roll-labels {
    flex-basis: 42px;
    width: 42px;
  }

  .roll-label {
    right: 7px;
    font-size: 9px;
  }

  .seq-block {
    width: 29%;
    min-width: 0;
    height: 42px;
    padding: 5px 7px;
  }

  .seq-block-note {
    font-size: 10.5px;
  }

  .seq-block-step {
    font-size: 6.5px;
  }

  .sequence-roll.is-dense .seq-block {
    height: 44px;
    padding: 3px 1px;
  }

  .sequence-roll.is-dense .seq-block-note {
    font-size: 9px;
  }

  .sequence-roll.is-dense .seq-block-step {
    font-size: 5.5px;
    line-height: 1.05;
    white-space: normal;
  }

  .sequence-note-row.is-dense .sequence-note-chip {
    font-size: 1rem;
  }

  .sequence-help {
    font-size: 10px;
  }

  .sequence-note-chip {
    font-size: 2.35rem;
  }

  .topbar {
    align-items: center;
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-mark svg {
    width: 20px;
    height: 20px;
  }

  .brand-text strong {
    font-size: 13.5px;
  }

  .brand-text small {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .prototype-pill {
    padding: 6px 9px;
    font-size: 8.5px;
  }

  .headphone-note {
    align-items: flex-start;
  }

  .tuner-card {
    padding: 20px 14px 16px;
    border-radius: 20px;
  }

  .tuner-head {
    align-items: center;
    gap: 8px;
  }

  .tuner-head h2 {
    font-size: 1.42rem;
  }

  .live-badge {
    padding: 6px 8px;
    font-size: 7.5px;
    letter-spacing: 0.08em;
  }

  .tuner-stage {
    grid-template-columns: 44px minmax(44px, 60px) 72px;
    height: 330px;
    gap: 0 4px;
  }

  .scale-label {
    padding-right: 3px;
    font-size: 8.5px;
  }

  .readout-label {
    font-size: 8px;
  }

  .readout-note {
    font-size: 1.85rem;
  }

  .readout-hz {
    font-size: 9px;
  }

  .feedback {
    gap: 10px;
    min-height: 72px;
    padding: 12px;
    border-radius: 16px;
  }

  .feedback-arrow {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  .feedback-text {
    font-size: 0.95rem;
  }

  .feedback-sub {
    font-size: 10px;
  }

  .success-panel {
    gap: 10px;
    padding: 13px;
    border-radius: 16px;
  }

  .success-check {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .success-title {
    font-size: 14px;
  }

  .success-sub {
    font-size: 10.5px;
  }

  .next-card,
  .soon-card {
    padding: 26px 18px;
    border-radius: 22px;
  }

  .next-preview-body {
    gap: 12px;
    padding: 16px;
  }

  .next-preview-body p {
    font-size: 11.5px;
  }

  .next-actions {
    gap: 8px;
    margin-top: 22px;
  }

  .site-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    padding-top: 26px;
    font-size: 9px;
    line-height: 1.5;
    text-align: left;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .prototype-pill {
    display: none;
  }

  .note-name {
    font-size: 4rem;
  }

  .sequence-note-chip {
    font-size: 2.1rem;
  }

  .live-badge {
    gap: 5px;
    padding: 5px 7px;
    font-size: 7px;
  }

  .tuner-stage {
    height: 310px;
  }

  .sequence-roll.is-dense .seq-block,
  .sequence-roll.is-scroll .seq-block {
    height: 30px;
    padding: 3px 1px;
  }

  .sequence-roll.is-dense .seq-block-note,
  .sequence-roll.is-scroll .seq-block-note {
    font-size: clamp(6.5px, 2vw, 8px);
  }

  .sequence-roll.is-dense .seq-block-step,
  .sequence-roll.is-scroll .seq-block-step {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =====================================================================
   Rediseño limpio: bienvenida mínima y ejercicio sin explicaciones
   ===================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.sr-only:focus {
  outline: none;
}

/* ---------- Barra superior centrada ---------- */

.topbar--centered {
  justify-content: center;
}

.brand--centered .brand-text {
  align-items: center;
}

.brand--centered .brand-text strong {
  font-size: 15px;
  letter-spacing: 0.03em;
}

/* ---------- Bienvenida ---------- */

.welcome-hero--compact {
  max-width: none;
  margin: 36px 0 26px;
  text-align: center;
}

.welcome-hero--compact h1 {
  font-size: clamp(1.55rem, 6.8vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: nowrap;
}

.welcome-hero--compact h1 em {
  color: var(--green);
  font-style: italic;
  text-decoration: none;
}

.level-grid--choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.level-card--choice {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: start;
  min-height: 150px;
  padding: 20px 22px;
  border-radius: 20px;
}

.level-card--choice::after {
  display: none;
}

.level-card--choice .level-number {
  grid-column: 1 / -1;
  font-size: 10px;
}

.level-card--choice .level-title {
  align-self: end;
  font-size: 1.9rem;
}

.level-card--choice .level-arrow {
  align-self: end;
  justify-self: end;
}

.level-card--choice.level-card--intermediate {
  border-color: #e8d6a9;
  background: #fbf3de;
  color: #42320e;
}

.level-card--choice.level-card--intermediate .level-number,
.level-card--choice.level-card--intermediate .level-arrow {
  color: #795b17;
}

.level-card--choice.level-card--advanced {
  border-color: rgba(195, 106, 75, 0.28);
  background: var(--terracotta-soft);
  color: #6f3623;
}

.level-card--choice.level-card--advanced .level-number,
.level-card--choice.level-card--advanced .level-arrow {
  color: var(--terracotta);
}

.octave-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.octave-compact-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.octave-toggle--compact {
  gap: 10px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 14px;
}

.octave-toggle--compact .octave-toggle-label {
  font-size: 12px;
}

/* En tablet la etiqueta "Octava" sigue visible: el botón no debe ocupar todo
   el ancho o la fila desborda a la derecha. En mobile la etiqueta se oculta y
   el botón puede volver a ocupar el ancho completo. */
@media (min-width: 431px) and (max-width: 720px) {
  .octave-compact .octave-toggle {
    width: auto;
    flex: 0 1 auto;
  }
}

.octave-toggle--compact .octave-toggle-note {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.1rem;
}

.octave-toggle--compact .octave-toggle-copy strong {
  font-size: 12px;
}

.octave-toggle--compact .octave-toggle-copy small {
  font-size: 9.5px;
}

.octave-toggle--compact .octave-toggle-switch {
  width: 34px;
  height: 20px;
}

.octave-toggle--compact .octave-toggle-switch span {
  width: 14px;
  height: 14px;
}

.octave-toggle--compact.is-low .octave-toggle-switch span {
  transform: translateX(14px);
}

.welcome-footnote {
  margin-top: 22px;
}

/* ---------- Ejercicio ---------- */

.intro-exercise--hidden {
  margin: 0;
}

.screen-nav {
  flex-direction: row;
  align-items: center;
  margin-top: 14px;
}

.layout--compact {
  gap: 14px;
  margin-top: 12px;
}

.layout--compact .controls {
  gap: 12px;
}

.reference-card--compact {
  padding: 16px;
  border-radius: 20px;
}

.reference-card--compact .card-head h2,
.mic-card--compact .card-head h2 {
  font-size: 13px;
}

.reference-card--compact .note-display,
.reference-card--compact .sequence-note-display {
  gap: 6px;
  margin: 12px 0;
}

.reference-card--compact .note-name {
  font-size: clamp(2.8rem, 11vw, 4rem);
  line-height: 0.85;
}

.reference-card--compact .sequence-note-chip {
  font-size: clamp(1.6rem, 6.4vw, 2.3rem);
}

.reference-card--compact .btn-reference {
  padding: 10px 12px;
}

.mic-card--compact {
  padding: 14px 16px 16px;
  border-radius: 20px;
}

.mic-card--compact .card-head {
  margin-bottom: 10px;
}

.mic-card--inline {
  width: 100%;
  margin-top: 14px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  overflow: visible;
}

.mic-card--inline .card-tag {
  display: inline-block;
  margin: 0 0 8px;
}

.mic-card--inline .card-tag[hidden] {
  display: none;
}

.layout--compact .tuner-card {
  padding: 18px 20px 16px;
}

.layout--compact .sequence-stage {
  margin: 16px 0 14px;
}

.exercise-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.headphone-note--bottom {
  width: 100%;
  margin: 0;
  padding: 10px 14px;
}

.headphone-note--bottom p {
  font-size: 12px;
}

.headphone-note--bottom .headphone-icon {
  width: 30px;
  height: 30px;
}

.headphone-note--bottom .headphone-icon svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 720px) {
  .welcome-hero--compact {
    margin: 28px 0 20px;
  }

  .level-grid--choices {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .level-card--choice {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 18px;
  }

  .level-card--choice .level-number {
    grid-column: auto;
  }

  .level-card--choice .level-title,
  .level-card--choice .level-arrow {
    align-self: center;
  }

  .level-card--choice .level-title {
    font-size: 1.5rem;
  }

  .level-card:hover {
    transform: none;
  }

  .layout--compact .tuner-card {
    padding: 16px 14px 14px;
  }

  .layout--compact .tuner-stage {
    height: 320px;
    margin-top: 14px;
  }
}

@media (max-width: 430px) {
  .screen-nav {
    flex-direction: row;
    gap: 8px;
  }

  .layout--compact {
    gap: 12px;
  }

  .reference-card--compact {
    padding: 14px;
  }

  .reference-card--compact .note-display,
  .reference-card--compact .sequence-note-display {
    margin: 10px 0;
  }

  .mic-card--compact {
    padding: 12px 14px 14px;
  }

  .headphone-note--bottom {
    padding: 10px 12px;
  }

  .octave-compact-label {
    display: none;
  }
}

@media (max-width: 380px) {
  .layout--compact .tuner-stage {
    height: 300px;
  }
}

/* =====================================================================
   Cuenta y progreso en la nube
   ===================================================================== */

.site-footer {
  flex-direction: column;
  gap: 12px;
  padding-top: 28px;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.account-status {
  max-width: 220px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-progress {
  color: var(--muted);
}

.account-separator {
  color: var(--line-strong);
}

.account-btn {
  padding: 7px 13px;
  border: 1px solid rgba(51, 20, 103, 0.24);
  border-radius: 999px;
  background: var(--surface);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.account-btn:hover {
  border-color: rgba(51, 20, 103, 0.46);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.account-btn:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.24);
  outline-offset: 2px;
}

/* ---------- Diálogo de cuenta ---------- */

.auth-dialog {
  position: relative;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid rgba(178, 168, 148, 0.4);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(26, 16, 42, 0.3);
}

.auth-dialog::backdrop {
  background: rgba(25, 15, 42, 0.46);
  backdrop-filter: blur(4px);
}

.auth-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.auth-dialog .eyebrow {
  margin-bottom: 8px;
}

.auth-dialog h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.auth-lead {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.auth-close:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.auth-close:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.24);
  outline-offset: 2px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.auth-tab {
  flex: 1;
  padding: 9px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--green);
  box-shadow: var(--shadow-soft);
}

.auth-tab:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.24);
  outline-offset: 2px;
}

.auth-tab:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
}

.auth-field input::placeholder {
  color: #9aa49e;
}

.auth-field input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(51, 20, 103, 0.18);
}

.auth-field input:disabled {
  background: var(--surface-soft);
  cursor: not-allowed;
}

.auth-message {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-message:empty {
  margin: 0;
}

.auth-message.is-error {
  color: var(--danger);
}

.auth-message.is-success {
  color: #1f5c45;
}

.auth-submit,
.auth-signout {
  width: 100%;
  margin-top: 2px;
}

.auth-session {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.auth-session-mail {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.auth-session-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-session .auth-signout {
  margin-top: 4px;
}

@media (max-width: 720px) {
  .site-footer {
    gap: 10px;
  }

  .account-status {
    max-width: 160px;
  }
}

@media (max-width: 430px) {
  .site-footer {
    padding-top: 22px;
  }

  .site-footer-meta {
    font-size: 9px;
  }

  .account-bar {
    gap: 6px;
  }

  .account-status {
    max-width: 130px;
    font-size: 11px;
  }

  .account-btn {
    padding: 7px 12px;
  }

  .auth-dialog {
    padding: 24px 20px;
  }
}

/* =====================================================================
   Portada de tres accesos, Entrenar Oído, Haciendo Voces y Ver Voces
   ===================================================================== */

.welcome-hero--home {
  max-width: 820px;
  margin: 34px auto 28px;
}

.welcome-hero--home h1 {
  font-size: clamp(1.9rem, 7.4vw, 3.6rem);
  line-height: 1.03;
  white-space: normal;
}

.welcome-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.welcome-subtitle {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 270px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(178, 168, 148, 0.38);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.home-action::after {
  position: absolute;
  right: -85px;
  bottom: -110px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(51, 20, 103, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.home-action:hover {
  border-color: rgba(51, 20, 103, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.home-action:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.3);
  outline-offset: 3px;
}

.home-action--ear {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 92% 8%, rgba(232, 198, 110, 0.22), transparent 12rem),
    linear-gradient(155deg, #2d1459 0%, #1f0e3e 72%);
  color: #f8f3e5;
  box-shadow: 0 22px 50px rgba(31, 14, 62, 0.18);
}

.home-action--ear::after {
  border-color: rgba(255, 255, 255, 0.11);
}

.home-action--make {
  border-color: #e8d6a9;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 110, 0.28), transparent 12rem),
    #fbf3de;
  color: #42320e;
}

.home-action--see {
  border-color: rgba(195, 106, 75, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 110, 0.2), transparent 12rem),
    var(--terracotta-soft);
  color: #6f3623;
}

.home-action-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.home-action-index {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.home-action--ear .home-action-index {
  color: rgba(248, 243, 229, 0.58);
}

.home-action--make .home-action-index {
  color: #8a6923;
}

.home-action--see .home-action-index {
  color: var(--terracotta);
}

.home-action-badge {
  padding: 5px 8px;
  border: 1px solid rgba(51, 20, 103, 0.15);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.42);
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-action--ear .home-action-badge {
  border-color: rgba(232, 198, 110, 0.3);
  background: rgba(232, 198, 110, 0.12);
  color: #f0d794;
}

.home-action--make .home-action-badge {
  border-color: rgba(121, 91, 23, 0.2);
  background: rgba(255, 253, 248, 0.48);
  color: #795b17;
}

.home-action--see .home-action-badge {
  border-color: rgba(195, 106, 75, 0.22);
  background: rgba(255, 253, 248, 0.45);
  color: #8a442e;
}

.home-action--soon {
  color: #795b17;
}

.home-action-title {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 34px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.home-action-title em {
  color: var(--green);
  font-style: italic;
}

.home-action--ear .home-action-title em {
  color: var(--gold);
}

.home-action--make .home-action-title em {
  color: #8a6923;
}

.home-action--see .home-action-title em {
  color: var(--terracotta);
}

.home-action-desc {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 260px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.home-action--ear .home-action-desc {
  color: rgba(248, 243, 229, 0.66);
}

.home-action--make .home-action-desc {
  color: #725c2b;
}

.home-action--see .home-action-desc {
  color: #83503d;
}

.home-action-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.home-action--ear .home-action-foot {
  border-color: rgba(248, 243, 229, 0.14);
  color: rgba(248, 243, 229, 0.56);
}

.home-action--make .home-action-foot {
  border-color: rgba(121, 91, 23, 0.18);
  color: #8a6923;
}

.home-action--see .home-action-foot {
  border-color: rgba(195, 106, 75, 0.2);
  color: #9a5a44;
}

.home-action-arrow {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.home-action--ear .home-action-arrow {
  color: var(--gold);
}

.home-action--make .home-action-arrow {
  color: #8a6923;
}

.home-action--see .home-action-arrow {
  color: var(--terracotta);
}

.home-action:hover .home-action-arrow {
  transform: translateX(4px);
}

/* ---------- Pantallas de modo ---------- */

.mode-screen {
  padding-bottom: 18px;
}

.mode-head {
  max-width: 760px;
  margin: 30px auto 26px;
  text-align: center;
}

.mode-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.mode-head h1 em {
  color: var(--green);
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: rgba(232, 198, 110, 0.9);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.1em;
}

.mode-head .lede {
  max-width: 570px;
  margin: 14px auto 0;
  font-size: 15px;
}

#earTrainingScreen .level-grid,
#earTrainingScreen .octave-compact,
#earTrainingScreen .welcome-footnote {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Haciendo Voces: marcador de posición ---------- */

.mode-placeholder {
  position: relative;
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 36px 34px 32px;
  overflow: hidden;
  border: 1px solid rgba(178, 168, 148, 0.4);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 110, 0.2), transparent 16rem),
    var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.mode-placeholder::after {
  position: absolute;
  top: -140px;
  left: 50%;
  width: 380px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 195, 236, 0.38), transparent 70%);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.mode-placeholder-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border: 1px solid #e8d6a9;
  border-radius: 50%;
  background: #fbf3de;
  color: #6e5110;
  font-family: var(--serif);
  font-size: 28px;
  place-items: center;
}

.mode-placeholder .eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}

.mode-placeholder h2 {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 480px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.mode-placeholder-text {
  position: relative;
  z-index: 1;
  max-width: 470px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.mode-placeholder-wave {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 46px;
  margin: 18px 0 22px;
}

.mode-placeholder-wave i {
  width: 4px;
  height: 32%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), #9880c2);
  opacity: 0.68;
}

.mode-placeholder-wave i:nth-child(2),
.mode-placeholder-wave i:nth-child(8) {
  height: 56%;
}

.mode-placeholder-wave i:nth-child(3),
.mode-placeholder-wave i:nth-child(7) {
  height: 82%;
}

.mode-placeholder-wave i:nth-child(4),
.mode-placeholder-wave i:nth-child(6) {
  height: 100%;
}

.mode-placeholder-wave i:nth-child(5) {
  height: 64%;
  background: linear-gradient(180deg, var(--gold), var(--terracotta));
}

.mode-placeholder .btn-primary {
  position: relative;
  z-index: 1;
  min-width: 180px;
}

/* ---------- Ver Voces: grabación ---------- */

.voice-stage {
  display: grid;
  gap: 16px;
  width: min(840px, 100%);
  margin: 0 auto;
}

.voice-record-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(178, 168, 148, 0.4);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 195, 236, 0.35), transparent 18rem),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.voice-record-intro {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(178, 168, 148, 0.4);
}

.voice-record-intro .eyebrow {
  margin-bottom: 6px;
}

.voice-record-intro h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.voice-record-intro > p:not(.eyebrow) {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.voice-reference {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(178, 168, 148, 0.36);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 195, 236, 0.3), transparent 12rem),
    rgba(255, 253, 248, 0.6);
}

.voice-reference-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.voice-reference-head .eyebrow {
  margin-bottom: 4px;
}

.voice-reference h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.voice-reference-hint {
  flex: 0 1 150px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

.voice-reference-piano {
  width: min(170px, 100%);
  height: 240px;
  margin: 0 auto;
}

.voice-reference-piano .voice-chart-keys {
  height: 100%;
}

.voice-reference-piano .voice-chart-key {
  font-size: 8.5px;
}

.voice-reference-piano .voice-chart-key.is-accidental .voice-chart-key-name {
  font-size: 7.5px;
}

.voice-record-card.is-recording .voice-reference {
  display: none;
}

@media (max-width: 430px) {
  .voice-record-intro h2 {
    font-size: 1.4rem;
  }

  .voice-reference {
    padding: 12px;
  }

  .voice-reference-head {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .voice-reference-hint {
    flex-basis: 100%;
    max-width: none;
    text-align: left;
  }

  .voice-reference-piano {
    height: 220px;
  }
}

.voice-record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.voice-timer-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.voice-timer-label {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.voice-timer {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 10vw, 3.9rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.voice-timer-limit {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.voice-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.voice-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.voice-state[data-state="recording"] {
  border-color: rgba(195, 106, 75, 0.3);
  background: var(--terracotta-soft);
  color: #9a442d;
}

.voice-state[data-state="recording"]::before {
  background: #d1583b;
  box-shadow: 0 0 0 0 rgba(209, 88, 59, 0.35);
  animation: voicePulse 1.4s ease-out infinite;
}

.voice-state[data-state="connecting"] {
  border-color: #e8d6a9;
  background: #fbf3de;
  color: #795b17;
}

.voice-state[data-state="error"] {
  border-color: rgba(167, 68, 53, 0.25);
  background: var(--terracotta-soft);
  color: var(--danger);
}

.voice-progress {
  height: 6px;
  margin: 18px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e1d5;
}

.voice-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #7251ab 62%, var(--gold));
  transition: width 100ms linear;
}

.voice-live-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(51, 20, 103, 0.14);
  border-radius: 14px;
  background: var(--green-soft);
}

.voice-live-note[hidden] {
  display: none;
}

.voice-live-note-label {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.voice-live-note-name {
  color: var(--voice-current, var(--green));
  font-family: var(--serif);
  font-size: clamp(1.55rem, 5vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.voice-live-note-detail {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.btn-voice-record {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: linear-gradient(145deg, #331467, #1f0e3e);
  color: var(--cream);
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 16px 32px rgba(31, 14, 62, 0.18);
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.btn-voice-record:hover {
  background: #3d197a;
  box-shadow: 0 19px 38px rgba(31, 14, 62, 0.24);
  transform: translateY(-1px);
}

.btn-voice-record:active {
  transform: translateY(0);
}

.btn-voice-record:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.26);
  outline-offset: 3px;
}

.btn-voice-record:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.btn-voice-record.is-recording {
  background: linear-gradient(145deg, #c36a4b, #9a442d);
  box-shadow: 0 16px 32px rgba(154, 68, 45, 0.2);
}

.voice-record-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
}

.voice-record-icon svg {
  width: 23px;
  height: 23px;
}

.btn-voice-record.is-recording .voice-record-icon .icon-mic {
  display: none;
}

.btn-voice-record.is-recording .voice-record-icon .icon-stop {
  display: block;
}

.btn-voice-record .btn-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.btn-voice-record .btn-copy small {
  display: block;
  margin-top: 3px;
  color: rgba(247, 241, 223, 0.7);
  font-size: 10.5px;
  line-height: 1.3;
}

.voice-record-pulse {
  display: none;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-radius: 50%;
  background: #ffd6c9;
  box-shadow: 0 0 0 0 rgba(255, 214, 201, 0.45);
  animation: voicePulse 1.4s ease-out infinite;
}

.btn-voice-record.is-recording .voice-record-pulse {
  display: block;
}

.voice-record-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

/* ---------- Ver Voces: visualización y resultado ---------- */

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.voice-actions .btn-primary,
.voice-actions .btn-ghost {
  min-width: 170px;
}

.voice-result-actions {
  margin-top: 14px;
}

.voice-result-actions[hidden] {
  display: none;
}

.voice-result-actions [hidden] {
  display: none;
}

.voice-result-actions .btn-primary,
.voice-result-actions .btn-ghost {
  min-width: 140px;
}

#voiceListenBtn.is-playing {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.voice-delete-btn {
  border-color: rgba(154, 61, 43, 0.28);
  color: #9a3d2b;
}

.voice-delete-btn:hover {
  background: rgba(154, 61, 43, 0.07);
}

.voice-take-1 {
  --voice-color: #331467;
  --voice-bar-bg: rgba(51, 20, 103, 0.26);
  --voice-bar-border: rgba(51, 20, 103, 0.6);
  --voice-chip-bg: #e7e0f2;
  --voice-chip-border: rgba(51, 20, 103, 0.18);
  --voice-chip-text: #331467;
}

.voice-take-2 {
  --voice-color: #c36a4b;
  --voice-bar-bg: rgba(195, 106, 75, 0.24);
  --voice-bar-border: rgba(195, 106, 75, 0.62);
  --voice-chip-bg: #f7e8e1;
  --voice-chip-border: rgba(195, 106, 75, 0.22);
  --voice-chip-text: #a34f35;
}

.voice-take-3 {
  --voice-color: #4f6fb3;
  --voice-bar-bg: rgba(79, 111, 179, 0.22);
  --voice-bar-border: rgba(79, 111, 179, 0.62);
  --voice-chip-bg: #e8edf8;
  --voice-chip-border: rgba(79, 111, 179, 0.22);
  --voice-chip-text: #3f5c99;
}

.voice-visualizer,
.voice-result {
  padding: 22px;
  border: 1px solid rgba(178, 168, 148, 0.4);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.voice-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.voice-result-head .eyebrow {
  margin-bottom: 6px;
}

.voice-result-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.voice-result-meta {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.voice-key-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0 2px;
}

.voice-key-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.voice-key-control select {
  min-width: 132px;
  padding: 6px 26px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.voice-key-control select:focus-visible {
  outline: 2px solid rgba(51, 20, 103, 0.3);
  outline-offset: 2px;
}

.voice-chart {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  height: 320px;
  margin-top: 4px;
}

.voice-chart-keys {
  position: relative;
  height: 100%;
}

.voice-chart-key {
  position: absolute;
  left: 0;
  right: 4px;
  display: flex;
  align-items: center;
  width: auto;
  padding: 0 6px;
  border: 1px solid #d8d1c2;
  border-radius: 5px;
  background: linear-gradient(90deg, #fffdf8, #f3efe6);
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: left;
  transform: translateY(-50%);
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
  z-index: 1;
}

.voice-chart-key.is-accidental {
  right: 0;
  left: auto;
  width: 58%;
  padding: 0;
  border-color: #221140;
  border-radius: 4px;
  background: linear-gradient(90deg, #422476, #1f0e3e);
  box-shadow: 0 2px 4px rgba(31, 14, 62, 0.22);
  z-index: 2;
}

.voice-chart-key.is-natural:hover {
  border-color: rgba(51, 20, 103, 0.45);
  background: var(--green-soft);
  color: var(--green);
}

.voice-chart-key.is-accidental:hover {
  border-color: var(--gold);
  background: linear-gradient(90deg, #4f2d8a, #331467);
}

.voice-chart-key.is-octave {
  border-color: rgba(51, 20, 103, 0.42);
}

.voice-chart-key.is-playing {
  border-color: var(--gold);
  background: #fbf3de;
  color: var(--green-deep);
  box-shadow: 0 0 0 2px rgba(232, 198, 110, 0.35);
}

.voice-chart-key.is-accidental.is-playing {
  background: linear-gradient(90deg, #8a6a1e, #5d4713);
  box-shadow: 0 0 0 2px rgba(232, 198, 110, 0.42);
}

.voice-chart-key:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  z-index: 3;
}

.voice-chart-key-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-chart-key-name.is-octave {
  color: var(--green);
  font-weight: 700;
}

.voice-chart-key.is-accidental .voice-chart-key-name {
  width: 100%;
  padding: 0 2px;
  color: #f7f1df;
  font-size: 7.5px;
  letter-spacing: -0.04em;
  text-align: center;
}

.voice-chart-keys.is-dense .voice-chart-key-name:not(.is-octave) {
  opacity: 0;
}

.voice-chart-keys.is-dense .voice-chart-key-name.is-scale {
  opacity: 1;
  font-size: 7.5px;
}

.voice-chart-keys.is-dense .voice-chart-key.is-accidental .voice-chart-key-name {
  font-size: 7px;
}

.voice-chart-keys.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.voice-chart-plot {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  border-radius: 0 10px 0 0;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(51, 20, 103, 0.055) calc(25% - 1px),
      rgba(51, 20, 103, 0.055) 25%
    ),
    linear-gradient(180deg, rgba(255, 253, 248, 0.4), rgba(231, 224, 242, 0.34));
  isolation: isolate;
}

.voice-chart-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.voice-chart-bars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.voice-chart-bar {
  position: absolute;
  min-width: 3px;
  height: clamp(6px, 1.1vw, 9px);
  border: 1px solid var(--voice-bar-border, rgba(183, 139, 36, 0.55));
  border-radius: 999px;
  background: var(--voice-bar-bg, rgba(232, 198, 110, 0.78));
  box-shadow: 0 1px 2px rgba(121, 91, 23, 0.14);
  transform: translateY(-50%);
}

.voice-chart-line {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px solid rgba(111, 124, 117, 0.12);
}

.voice-chart-line.is-natural {
  border-top-color: rgba(111, 124, 117, 0.25);
}

.voice-chart-line.is-octave {
  border-top-color: rgba(51, 20, 103, 0.38);
}

.voice-chart-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.voice-chart-path {
  fill: none;
  stroke: var(--voice-color, var(--green));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
  filter: drop-shadow(0 2px 3px rgba(51, 20, 103, 0.18));
}

.voice-chart-path.voice-take-2 {
  stroke-width: 3;
}

.voice-chart-path.voice-take-3 {
  stroke-width: 2.8;
}

.voice-chart-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 0 68px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.voice-chart-legend {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.voice-harmony-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.voice-harmony-note[hidden] {
  display: none;
}

.voice-sync {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.voice-sync[hidden] {
  display: none;
}

.voice-sync-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.voice-sync-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.voice-sync-hint {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.voice-sync-controls {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.voice-sync-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--green);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.voice-sync-btn:hover {
  background: var(--green-soft);
}

.voice-sync-btn:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.28);
  outline-offset: 2px;
}

.voice-sync-value {
  min-width: 54px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.voice-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.voice-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--voice-chip-text, var(--ink-soft));
  font-size: 10.5px;
  font-weight: 600;
}

.voice-legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--voice-color, var(--green));
}

.voice-chart-empty {
  margin-top: 6px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}

.voice-chart-empty p {
  margin: 0;
}

.voice-chart-empty strong {
  color: var(--ink-soft);
}

.voice-notes-wrap {
  margin-top: 18px;
}

.voice-notes-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.voice-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.voice-notes-groups {
  display: grid;
  gap: 14px;
}

.voice-notes-group {
  display: grid;
  gap: 7px;
}

.voice-notes-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--voice-chip-text, var(--green));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voice-notes-group-head .voice-legend-dot {
  width: 8px;
  height: 8px;
}

.voice-notes-group-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.voice-note-chip {
  padding: 6px 10px;
  border: 1px solid var(--voice-chip-border, rgba(51, 20, 103, 0.16));
  border-radius: 999px;
  background: var(--voice-chip-bg, var(--green-soft));
  color: var(--voice-chip-text, var(--green));
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1;
}

.voice-note-chip--more {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
}

@keyframes voicePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(209, 88, 59, 0.36);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(209, 88, 59, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(209, 88, 59, 0);
  }
}

@media (max-width: 980px) {
  .home-actions {
    grid-template-columns: 1fr;
  }

  .home-action {
    min-height: 150px;
  }

  .home-action-title {
    margin-top: 20px;
  }

  .home-action-desc {
    max-width: 440px;
  }
}

@media (max-width: 720px) {
  .welcome-hero--home {
    margin: 28px auto 22px;
  }

  .home-action {
    min-height: 138px;
    padding: 18px;
  }

  .home-action-title {
    margin-top: 16px;
    font-size: 1.8rem;
  }

  .home-action-desc {
    font-size: 11.5px;
  }

  .home-action-foot {
    padding-top: 14px;
  }

  .mode-head {
    margin: 22px auto 20px;
  }

  .mode-head .lede {
    font-size: 14px;
  }

  .mode-placeholder {
    padding: 30px 20px 26px;
    border-radius: 24px;
  }

  .voice-record-card,
  .voice-visualizer,
  .voice-result {
    padding: 18px;
    border-radius: 20px;
  }

  .voice-record-top {
    gap: 10px;
  }

  .voice-timer {
    font-size: 2.8rem;
  }

  .voice-chart {
    grid-template-columns: 58px minmax(0, 1fr);
    height: 280px;
  }

  .voice-reference-piano {
    width: min(160px, 100%);
    height: 220px;
  }

  .voice-chart-axis {
    margin-left: 58px;
  }

  .voice-chart-key {
    padding: 0 5px;
    font-size: 9px;
  }

  .voice-visualizer.is-live .voice-result-head {
    display: none;
  }

  .voice-visualizer.is-live .voice-chart {
    height: 210px;
  }

  .voice-record-card.is-recording {
    padding: 14px;
  }

  .voice-record-card.is-recording .voice-timer {
    font-size: 2rem;
  }

  .voice-record-card.is-recording .voice-progress {
    margin: 10px 0;
  }

  .voice-record-card.is-recording .voice-live-note {
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  .voice-record-card.is-recording .voice-live-note-name {
    font-size: 1.5rem;
  }

  .voice-record-card.is-recording .btn-voice-record {
    padding: 10px 12px;
  }

  .voice-record-card.is-recording .voice-record-icon {
    width: 42px;
    height: 42px;
  }

  .voice-record-card.is-recording .voice-record-note {
    display: none;
  }

  .voice-actions {
    flex-direction: column;
  }

  .voice-actions .btn-primary,
  .voice-actions .btn-ghost {
    width: 100%;
    min-width: 0;
  }

  .voice-result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .voice-result-actions #voiceHarmonyBtn,
  .voice-result-actions #voiceListenBtn,
  .voice-result-actions #voiceDeleteTakeBtn {
    grid-column: 1 / -1;
  }

  .voice-result-actions .btn-ghost {
    padding: 10px 8px;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .welcome-hero--home h1 {
    font-size: 1.85rem;
  }

  .welcome-subtitle {
    font-size: 12px;
  }

  .home-action {
    min-height: 0;
    padding: 16px;
  }

  .home-action-title {
    margin-top: 14px;
    font-size: 1.65rem;
  }

  .home-action-desc {
    margin-top: 8px;
    font-size: 11px;
  }

  .home-action-foot {
    margin-top: 16px;
  }

  .mode-head {
    margin-top: 18px;
  }

  .mode-head h1 {
    font-size: 2.05rem;
  }

  .mode-head .lede {
    font-size: 13px;
  }

  .mode-placeholder h2 {
    font-size: 1.7rem;
  }

  .voice-record-card,
  .voice-visualizer,
  .voice-result {
    padding: 16px;
  }

  .voice-timer {
    font-size: 2.55rem;
  }

  .voice-state {
    padding: 6px 8px;
    font-size: 7.5px;
  }

  .btn-voice-record {
    gap: 11px;
    padding: 12px;
  }

  .voice-record-icon {
    width: 44px;
    height: 44px;
  }

  .voice-chart {
    grid-template-columns: 54px minmax(0, 1fr);
    height: 260px;
  }

  .voice-visualizer.is-live .voice-chart {
    height: 180px;
  }

  .voice-chart-axis {
    margin-left: 54px;
  }

  .voice-chart-key {
    padding: 0 5px;
    font-size: 8.5px;
  }

  .voice-result-head {
    flex-direction: column;
    gap: 8px;
  }

  .voice-result-meta {
    align-self: flex-start;
  }
}

@media (max-width: 380px) {
  .voice-chart {
    height: 200px;
  }

  .voice-chart-key {
    padding: 0 4px;
    font-size: 7.5px;
  }

  .voice-chart-key.is-accidental .voice-chart-key-name {
    font-size: 7px;
  }

  .voice-reference-piano {
    width: min(150px, 100%);
    height: 200px;
  }

  .voice-reference-piano .voice-chart-key {
    font-size: 7.5px;
  }

  .voice-reference-piano .voice-chart-key.is-accidental .voice-chart-key-name {
    font-size: 7px;
  }

  .voice-timer {
    font-size: 2.3rem;
  }
}

.welcome-hero h1:focus,
.mode-head h1:focus,
.voice-soon-card h1:focus,
.voice-visualizer h2:focus,
.voice-result h2:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .voice-state[data-state="recording"]::before,
  .voice-record-pulse {
    animation: none;
  }

  .voice-progress span {
    transition: none;
  }
}

/* =====================================================================
   Haciendo Voces: bloques, Los 3 pasos y colchón armónico
   ===================================================================== */

.voice-block-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(920px, 100%);
  margin: 0 auto;
}

.voice-block-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 228px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(178, 168, 148, 0.38);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.voice-block-card::after {
  position: absolute;
  right: -80px;
  bottom: -105px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(51, 20, 103, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.voice-block-card:hover {
  border-color: rgba(51, 20, 103, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.voice-block-card:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.3);
  outline-offset: 3px;
}

.voice-block-card--immovable {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 92% 8%, rgba(232, 198, 110, 0.2), transparent 12rem),
    linear-gradient(155deg, #2d1459 0%, #1f0e3e 72%);
  color: #f8f3e5;
  box-shadow: 0 22px 50px rgba(31, 14, 62, 0.18);
}

.voice-block-card--immovable::after {
  border-color: rgba(255, 255, 255, 0.11);
}

.voice-block-card--steps {
  border-color: #e8d6a9;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 110, 0.3), transparent 12rem),
    #fbf3de;
  color: #42320e;
}

.voice-block-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.voice-block-index {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.voice-block-card--immovable .voice-block-index {
  color: rgba(248, 243, 229, 0.58);
}

.voice-block-card--steps .voice-block-index {
  color: #8a6923;
}

.voice-block-badge {
  padding: 5px 8px;
  border: 1px solid rgba(51, 20, 103, 0.15);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.42);
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.voice-block-card--immovable .voice-block-badge {
  border-color: rgba(232, 198, 110, 0.3);
  background: rgba(232, 198, 110, 0.12);
  color: #f0d794;
}

.voice-block-card--steps .voice-block-badge {
  border-color: rgba(121, 91, 23, 0.2);
  background: rgba(255, 253, 248, 0.48);
  color: #795b17;
}

.voice-block-title {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.voice-block-title em {
  color: var(--green);
  font-style: italic;
}

.voice-block-card--immovable .voice-block-title em {
  color: var(--gold);
}

.voice-block-card--steps .voice-block-title em {
  color: #8a6923;
}

.voice-block-desc {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 250px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.voice-block-card--immovable .voice-block-desc {
  color: rgba(248, 243, 229, 0.66);
}

.voice-block-card--steps .voice-block-desc {
  color: #725c2b;
}

.voice-block-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.voice-block-card--immovable .voice-block-foot {
  border-color: rgba(248, 243, 229, 0.14);
  color: rgba(248, 243, 229, 0.56);
}

.voice-block-card--steps .voice-block-foot {
  border-color: rgba(121, 91, 23, 0.18);
  color: #8a6923;
}

.voice-block-arrow {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.voice-block-card--immovable .voice-block-arrow {
  color: var(--gold);
}

.voice-block-card--steps .voice-block-arrow {
  color: #8a6923;
}

.voice-block-card:hover .voice-block-arrow {
  transform: translateX(4px);
}

.mode-head--three-steps {
  margin-bottom: 22px;
}

.three-steps-chord-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(920px, 100%);
  margin: 0 auto 14px;
}

.three-steps-chord-pill {
  display: flex;
  flex: 1 1 86px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  max-width: 140px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(178, 168, 148, 0.42);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.three-steps-chord-pill:hover {
  border-color: rgba(51, 20, 103, 0.3);
  transform: translateY(-2px);
}

.three-steps-chord-pill:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.3);
  outline-offset: 3px;
}

.three-steps-chord-pill.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fffdf8;
}

.three-steps-chord-pill-root {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1;
}

.three-steps-chord-pill-quality {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.three-steps-chord-pill.is-active .three-steps-chord-pill-quality {
  color: rgba(255, 253, 248, 0.74);
}

.three-steps-chord {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(920px, 100%);
  margin: 0 auto 14px;
  padding: 22px 24px;
  border: 1px solid rgba(178, 168, 148, 0.4);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 195, 236, 0.42), transparent 17rem),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.three-steps-chord-copy {
  max-width: 560px;
}

.three-steps-chord-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.three-steps-chord-copy p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.three-steps-chord-notes {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.three-steps-chord-notes span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #e8d6a9;
  border-radius: 50%;
  background: #fffaf0;
  color: #6e5110;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1;
}

.three-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(920px, 100%);
  margin: 0 auto;
}

.three-steps-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 235px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(178, 168, 148, 0.38);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.three-steps-card::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(51, 20, 103, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.three-steps-card:hover {
  border-color: rgba(51, 20, 103, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.three-steps-card:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.3);
  outline-offset: 3px;
}

.three-steps-card--down {
  border-color: #cfc4e2;
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 195, 236, 0.5), transparent 13rem),
    var(--green-soft);
}

.three-steps-card--up {
  border-color: #e8d6a9;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 110, 0.32), transparent 13rem),
    #fbf3de;
  color: #42320e;
}

.three-steps-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.three-steps-card-index {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.three-steps-card--down .three-steps-card-index {
  color: #5b4581;
}

.three-steps-card--up .three-steps-card-index {
  color: #8a6923;
}

.three-steps-card-badge {
  padding: 5px 8px;
  border: 1px solid rgba(51, 20, 103, 0.16);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.55);
  color: var(--green);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.three-steps-card--up .three-steps-card-badge {
  border-color: rgba(121, 91, 23, 0.2);
  color: #795b17;
}

.three-steps-card-title {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 24px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.three-steps-card-title em {
  color: var(--green);
  font-style: italic;
}

.three-steps-card--up .three-steps-card-title em {
  color: #8a6923;
}

.three-steps-card-path {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 16px 0 12px;
}

.three-steps-card-path span {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(51, 20, 103, 0.14);
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1;
}

.three-steps-card--up .three-steps-card-path span {
  border-color: rgba(121, 91, 23, 0.18);
  color: #6e5110;
}

.three-steps-card-path i {
  color: #9385ab;
  font-size: 12px;
  font-style: normal;
}

.three-steps-card--up .three-steps-card-path i {
  color: #b39b62;
}

.three-steps-card-desc {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 390px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.three-steps-card--down .three-steps-card-desc {
  color: #5b4581;
}

.three-steps-card--up .three-steps-card-desc {
  color: #725c2b;
}

.three-steps-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(51, 20, 103, 0.13);
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.three-steps-card--up .three-steps-card-foot {
  border-color: rgba(121, 91, 23, 0.18);
  color: #8a6923;
}

.three-steps-card-arrow {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.three-steps-card:hover .three-steps-card-arrow {
  transform: translateX(4px);
}

/* ---------- Colchón armónico dentro del ejercicio ---------- */

.chord-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #e8d6a9;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(251, 243, 222, 0.82), rgba(255, 253, 248, 0.94));
}

.chord-display-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chord-display-label {
  color: #6e5110;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.chord-display-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8a6923;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.chord-display-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.chord-display.is-playing {
  border-color: #c5b6df;
  background:
    linear-gradient(135deg, rgba(231, 224, 242, 0.92), rgba(255, 253, 248, 0.96));
}

.chord-display.is-playing .chord-display-label,
.chord-display.is-playing .chord-display-state {
  color: var(--green);
}

.chord-display.is-playing .chord-display-state::before {
  animation: livePulse 1.5s ease-out infinite;
}

.chord-display-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chord-display-note {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #e8d6a9;
  border-radius: 10px;
  background: var(--surface);
  color: #6e5110;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1;
}

.chord-display.is-playing .chord-display-note {
  border-color: #c5b6df;
  background: var(--green-soft);
  color: var(--green);
}

/* ---------- Pantalla de introducción de ejercicio ---------- */

.voice-soon-card h1 {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.voice-soon-card .voice-actions {
  position: relative;
  z-index: 1;
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 860px) {
  .voice-block-grid {
    grid-template-columns: 1fr;
  }

  .voice-block-card {
    min-height: 160px;
  }

  .voice-block-title {
    margin-top: 18px;
  }
}

@media (max-width: 720px) {
  .voice-block-card {
    min-height: 0;
    padding: 18px;
  }

  .voice-block-title {
    margin-top: 14px;
    font-size: 1.8rem;
  }

  .voice-block-desc {
    font-size: 11.5px;
  }

  .three-steps-chord {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .three-steps-chord-notes span {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .three-steps-grid {
    grid-template-columns: 1fr;
  }

  .three-steps-card {
    min-height: 0;
    padding: 18px;
  }

  .three-steps-card-title {
    margin-top: 16px;
    font-size: 1.9rem;
  }

  .three-steps-card:hover,
  .voice-block-card:hover {
    transform: none;
  }
}

@media (max-width: 430px) {
  .voice-block-card,
  .three-steps-card {
    padding: 16px;
    border-radius: 20px;
  }

  .voice-block-title {
    font-size: 1.65rem;
  }

  .voice-block-desc,
  .three-steps-card-desc {
    font-size: 11px;
  }

  .three-steps-chord {
    padding: 16px;
    border-radius: 20px;
  }

  .three-steps-chord-copy p:last-child {
    font-size: 11.5px;
  }

  .three-steps-chord-notes {
    gap: 6px;
  }

  .three-steps-chord-notes span {
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }

  .three-steps-card-path span {
    min-width: 42px;
    height: 35px;
    font-size: 0.98rem;
  }

  .chord-display {
    padding: 10px 12px;
  }

  .chord-display-note {
    min-width: 42px;
    height: 31px;
    font-size: 0.98rem;
  }

  .voice-soon-card .voice-actions {
    flex-direction: column;
  }

  .voice-soon-card .voice-actions .btn-primary,
  .voice-soon-card .voice-actions .btn-ghost {
    width: 100%;
  }
}

/* =====================================================================
   Pantallas de bienvenida (antes de las 3 opciones)
   ===================================================================== */

.intro-screen {
  display: flex;
  justify-content: center;
  padding: clamp(18px, 6vh, 64px) 0 30px;
}

.intro-panel {
  width: min(680px, 100%);
  padding: clamp(30px, 5vw, 52px) clamp(22px, 5vw, 56px);
  border: 1px solid rgba(178, 168, 148, 0.38);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(210, 195, 236, 0.32), transparent 22rem),
    var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.intro-step {
  display: inline-flex;
  align-items: center;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-title {
  max-width: 540px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.intro-title:focus {
  outline: none;
}

.intro-title em {
  color: var(--green);
  font-style: italic;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: rgba(232, 198, 110, 0.9);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.11em;
}

.intro-copy {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 2vw, 16.5px);
  line-height: 1.65;
}

.intro-copy--soft {
  margin-top: 12px;
  color: var(--muted);
}

.intro-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.intro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(51, 20, 103, 0.2);
  transition:
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.intro-btn:hover {
  background: #3d197a;
  box-shadow: 0 16px 30px rgba(51, 20, 103, 0.24);
  transform: translateY(-2px);
}

.intro-btn:active {
  transform: translateY(0);
}

.intro-btn:focus-visible {
  outline: 3px solid rgba(51, 20, 103, 0.28);
  outline-offset: 3px;
}

.intro-headphone {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border: 1px solid #e8d6a9;
  border-radius: 50%;
  background: #fbf3de;
  color: #5d4713;
}

.intro-headphone svg {
  width: 30px;
  height: 30px;
}

.intro-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
}

.intro-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.intro-dots span.is-active {
  width: 18px;
  border-radius: 999px;
  background: var(--green);
}

/* =====================================================================
   Orden de los ejercicios: resultado arriba, micrófono y referencia abajo
   ===================================================================== */

.layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.layout > .tuner-card {
  order: 1;
  width: min(900px, 100%);
  min-height: 0;
}

.layout > .controls {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: min(820px, 100%);
}

.layout .controls > .mic-card {
  order: 1;
}

.layout .controls > .reference-card {
  order: 2;
}

.layout .controls > .tip-card {
  order: 3;
}

@media (max-width: 720px) {
  .intro-screen {
    padding-top: 16px;
  }

  .intro-panel {
    padding: 30px 20px 26px;
    border-radius: 24px;
  }

  .intro-step {
    margin-bottom: 15px;
  }

  .intro-actions {
    margin-top: 24px;
  }

  .intro-actions .intro-btn {
    width: 100%;
  }

  .intro-headphone {
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
  }

  .intro-headphone svg {
    width: 25px;
    height: 25px;
  }
}

/* =====================================================================
   Pantallas de enfoque: sin pie y con una tarjeta previa al ejercicio
   ===================================================================== */

body.is-intro .site-footer {
  display: none;
}

.octave-compact--exercise {
  margin: 12px 0 18px;
}

.prep-screen .mode-placeholder {
  margin-top: 24px;
}

.prep-screen .mode-placeholder-text {
  max-width: 520px;
}

@media (max-width: 720px) {
  .prep-screen .mode-placeholder {
    margin-top: 18px;
    padding: 28px 20px 24px;
    border-radius: 24px;
  }

  .prep-screen .voice-actions {
    margin-top: 20px;
  }

  .prep-screen .voice-actions .btn-primary {
    width: 100%;
  }
}

/* Voz inmovil: bloques compactos para que MI y FA no se pisen en la linea de tiempo. */
.sequence-roll.is-voice-immovable .seq-block {
  height: 34px;
  padding: 4px 6px;
}

.sequence-roll.is-voice-immovable .seq-block-note {
  font-size: 11px;
}

.sequence-roll.is-voice-immovable .seq-block-step {
  font-size: 6.5px;
}

@media (max-width: 720px) {
  .sequence-roll.is-voice-immovable .seq-block {
    height: 30px;
    padding: 3px 5px;
  }

  .sequence-roll.is-voice-immovable .seq-block-note {
    font-size: 10px;
  }

  .sequence-roll.is-voice-immovable .seq-block-step {
    font-size: 6px;
  }
}

@media (max-width: 430px) {
  .sequence-roll.is-voice-immovable .seq-block {
    height: 28px;
    padding: 3px 4px;
  }

  .sequence-roll.is-voice-immovable .seq-block-note {
    font-size: 9.5px;
  }

  .sequence-roll.is-voice-immovable .seq-block-step {
    font-size: 6px;
  }
}

@media (max-width: 380px) {
  .sequence-roll.is-voice-immovable .seq-block {
    height: 26px;
    padding: 2px 3px;
  }

  .sequence-roll.is-voice-immovable .seq-block-note {
    font-size: 9px;
  }

  .sequence-roll.is-voice-immovable .seq-block-step {
    display: none;
  }
}

/* =====================================================================
   Ver Voces · Canto en vivo
   ===================================================================== */

.voice-live-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  width: min(840px, 100%);
  margin: 0 auto 16px;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid rgba(31, 14, 62, 0.55);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 110, 0.2), transparent 15rem),
    radial-gradient(circle at 0% 100%, rgba(210, 195, 236, 0.14), transparent 17rem),
    linear-gradient(145deg, #260f4d, #1a0936);
  color: var(--cream);
  box-shadow: 0 18px 42px rgba(31, 14, 62, 0.18);
}

.voice-live-entry::before {
  position: absolute;
  top: -74px;
  right: -52px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(210, 195, 236, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(210, 195, 236, 0.04),
    0 0 0 58px rgba(210, 195, 236, 0.025);
  content: "";
  pointer-events: none;
}

.voice-live-entry-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.voice-live-entry .eyebrow {
  margin-bottom: 6px;
  color: rgba(210, 195, 236, 0.72);
}

.voice-live-entry h2 {
  margin: 0 0 6px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.voice-live-entry-copy > p:not(.eyebrow) {
  max-width: 54ch;
  margin: 0;
  color: rgba(247, 241, 223, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.voice-live-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.voice-live-entry-tags span {
  padding: 4px 8px;
  border: 1px solid rgba(210, 195, 236, 0.18);
  border-radius: 999px;
  background: rgba(210, 195, 236, 0.06);
  color: rgba(210, 195, 236, 0.8);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.voice-live-entry-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(232, 198, 110, 0.48);
  border-radius: 16px;
  background: linear-gradient(145deg, #f6e4b0, #e8c66e);
  color: #1f0e3e;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 12px 28px rgba(232, 198, 110, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.voice-live-entry-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(232, 198, 110, 0.24);
}

.voice-live-entry-btn:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.voice-live-entry-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.voice-live-entry-btn-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.voice-live-entry-btn-copy strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.voice-live-entry-btn-copy small {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.66;
  text-transform: uppercase;
}

.voice-live-entry-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
}

.voice-live-entry-wave i {
  display: block;
  width: 2px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
  animation: liveVoiceWave 1.2s ease-in-out infinite;
}

.voice-live-entry-wave i:nth-child(2) {
  height: 15px;
  animation-delay: 0.1s;
}

.voice-live-entry-wave i:nth-child(3) {
  height: 21px;
  animation-delay: 0.2s;
}

.voice-live-entry-wave i:nth-child(4) {
  height: 13px;
  animation-delay: 0.3s;
}

.voice-live-entry-wave i:nth-child(5) {
  height: 8px;
  animation-delay: 0.4s;
}

@keyframes liveVoiceWave {
  0%,
  100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: scaleY(1);
  }
}

.live-voice-stage {
  position: relative;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(31, 14, 62, 0.55);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(210, 195, 236, 0.08), transparent 26rem),
    linear-gradient(160deg, #1e0b40, #110625 58%, #0c0419);
  color: var(--cream);
  box-shadow: 0 24px 60px rgba(31, 14, 62, 0.22);
}

.live-voice-hud {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 2px 4px 14px;
}

.live-voice-now {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
}

.live-voice-now-label {
  grid-column: 1 / -1;
  color: rgba(210, 195, 236, 0.58);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-voice-now-note {
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.9rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.live-voice-now-detail {
  overflow: hidden;
  color: rgba(247, 241, 223, 0.66);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-voice-session {
  flex: 0 0 auto;
  text-align: right;
}

.live-voice-session-label {
  display: block;
  color: rgba(210, 195, 236, 0.5);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-voice-clock {
  display: block;
  margin-top: 2px;
  color: rgba(247, 241, 223, 0.92);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.live-voice-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(210, 195, 236, 0.18);
  border-radius: 999px;
  background: rgba(210, 195, 236, 0.07);
  color: rgba(210, 195, 236, 0.82);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-voice-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.live-voice-state[data-state="listening"] {
  border-color: rgba(169, 129, 238, 0.3);
  background: rgba(169, 129, 238, 0.1);
  color: #be9df8;
}

.live-voice-state[data-state="listening"]::before {
  box-shadow: 0 0 0 0 rgba(169, 129, 238, 0.4);
  animation: voicePulse 1.4s ease-out infinite;
}

.live-voice-state[data-state="silence"] {
  border-color: rgba(232, 198, 110, 0.25);
  background: rgba(232, 198, 110, 0.08);
  color: #f0d99c;
}

.live-voice-state[data-state="connecting"] {
  border-color: rgba(232, 198, 110, 0.28);
  background: rgba(232, 198, 110, 0.08);
  color: #f0d99c;
}

.live-voice-state[data-state="error"] {
  border-color: rgba(255, 159, 137, 0.3);
  background: rgba(195, 106, 75, 0.14);
  color: #ffb9a7;
}

.live-voice-state[data-state="preview"] {
  border-color: rgba(210, 195, 236, 0.22);
  background: rgba(210, 195, 236, 0.07);
  color: rgba(210, 195, 236, 0.85);
}

.live-voice-canvas-wrap {
  position: relative;
  height: clamp(300px, 46vh, 460px);
  overflow: hidden;
  border: 1px solid rgba(210, 195, 236, 0.12);
  border-radius: 20px;
  background: #0c0419;
}

.live-voice-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.live-voice-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 24px;
  background: radial-gradient(circle at 50% 45%, rgba(12, 4, 25, 0.28), rgba(12, 4, 25, 0.78));
  text-align: center;
}

.live-voice-overlay[hidden] {
  display: none;
}

.live-voice-overlay-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 2px;
  border: 1px solid rgba(210, 195, 236, 0.22);
  border-radius: 50%;
  background: rgba(210, 195, 236, 0.06);
  color: rgba(210, 195, 236, 0.92);
  box-shadow: 0 0 0 10px rgba(210, 195, 236, 0.03);
}

.live-voice-overlay-icon svg {
  width: 23px;
  height: 23px;
}

.live-voice-overlay-title {
  margin: 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.live-voice-overlay-text {
  max-width: 36ch;
  margin: 0;
  color: rgba(247, 241, 223, 0.68);
  font-size: 11.5px;
  line-height: 1.5;
}

.live-voice-overlay .voice-live-entry-btn {
  margin-top: 8px;
}

.live-voice-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  padding: 6px 10px;
  border: 1px solid rgba(210, 195, 236, 0.16);
  border-radius: 999px;
  background: rgba(12, 4, 25, 0.72);
  color: rgba(247, 241, 223, 0.7);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
  animation: liveVoiceHint 4.5s ease forwards;
}

@keyframes liveVoiceHint {
  0%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.live-voice-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 4px 0;
  color: rgba(210, 195, 236, 0.48);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-voice-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(210, 195, 236, 0.12);
  border-radius: 14px;
  background: rgba(210, 195, 236, 0.1);
}

.live-voice-stat {
  padding: 10px 12px;
  background: rgba(12, 4, 25, 0.45);
}

.live-voice-stat span {
  display: block;
  color: rgba(210, 195, 236, 0.5);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.live-voice-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
}

.live-voice-privacy {
  width: min(960px, 100%);
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 720px) {
  .voice-live-entry {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .voice-live-entry-btn {
    width: 100%;
    justify-content: center;
  }

  .live-voice-stage {
    padding: 14px;
    border-radius: 22px;
  }

  .live-voice-hud {
    flex-wrap: wrap;
  }

  .live-voice-session {
    margin-left: auto;
  }

  .live-voice-state {
    order: 3;
  }

  .live-voice-canvas-wrap {
    height: clamp(280px, 48vh, 360px);
  }
}

@media (max-width: 430px) {
  .voice-live-entry {
    padding: 16px;
    border-radius: 20px;
  }

  .voice-live-entry h2 {
    font-size: 1.4rem;
  }

  .live-voice-stage {
    padding: 11px;
    border-radius: 20px;
  }

  .live-voice-now-note {
    font-size: 2rem;
  }

  .live-voice-now-detail {
    font-size: 9.5px;
  }

  .live-voice-canvas-wrap {
    height: 300px;
    border-radius: 16px;
  }

  .live-voice-overlay {
    padding: 16px;
  }

  .live-voice-stat {
    padding: 8px 7px;
  }

  .live-voice-stat span {
    font-size: 6.8px;
    letter-spacing: 0.1em;
  }

  .live-voice-stat strong {
    font-size: 10.5px;
  }

  .live-voice-hint {
    width: calc(100% - 24px);
    text-align: center;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-live-entry-wave i,
  .live-voice-state[data-state="listening"]::before,
  .live-voice-hint {
    animation: none;
  }
}

/* Bloque 03 · Dibujá la segunda voz (enlace a practica.html) */
.voice-block-card--draw {
  grid-column: 1 / -1;
  text-decoration: none;
  color: inherit;
}


/* =====================================================================
   Estética Haciendo Voces: violeta solo para titulares, logo y felicitaciones.
   Las tarjetas de menú vuelven a la lógica de 3 bloques: clarito / naranja / rojito.
   ===================================================================== */
.brand-logo { display: block; height: 46px; width: auto; border-radius: 10px; }

.home-action--ear,
.voice-block-card--immovable,
.level-card--beginner,
.reference-card {
  background: linear-gradient(150deg, #f8f4fd 0%, #ece4f8 100%) !important;
  border: 1px solid #dccff0 !important;
  color: #2b2240 !important;
  box-shadow: 0 22px 50px rgba(70, 45, 120, 0.10) !important;
}
.home-action--ear *,
.voice-block-card--immovable *,
.level-card--beginner *,
.reference-card * { color: inherit !important; border-color: rgba(107, 63, 196, 0.25) !important; }
.home-action--ear em, .voice-block-card--immovable em, .level-card--beginner em,
.home-action--ear .home-action-index, .voice-block-card--immovable .voice-block-index,
.home-action--ear .home-action-badge, .voice-block-card--immovable .voice-block-badge,
.home-action--ear .home-action-arrow, .voice-block-card--immovable .voice-block-arrow,
.reference-card .single-note-name, #singleNoteName, .reference-card .sequence-note-display strong { color: #6b3fc4 !important; }
.home-action--ear::after, .voice-block-card--immovable::after { opacity: .25; }
/* el botón de play mantiene su círculo oscuro con ícono claro */
.reference-card .btn-icon-play, .reference-card .btn-icon-play * { color: #fff !important; }
.reference-card p, .reference-card small { color: #5c5470 !important; }

/* Bloque 03 de Haciendo Voces (Segundas voces): rojito */
.voice-block-card--draw {
  background: linear-gradient(150deg, #fdf1ec 0%, #f6dfd4 100%) !important;
  border-color: #ecc9b9 !important;
}
.voice-block-card--draw em, .voice-block-card--draw .voice-block-index,
.voice-block-card--draw .voice-block-badge, .voice-block-card--draw .voice-block-arrow { color: #c36a4b !important; border-color: rgba(195,106,75,.4) !important; }

/* Ver Voces · en vivo: más clarito */
.live-voice-stage {
  background:
    radial-gradient(circle at 50% 0%, rgba(230, 220, 250, 0.14), transparent 26rem),
    linear-gradient(160deg, #4a3183, #3a2570 58%, #2f1e5e) !important;
}
.live-voice-canvas-wrap { background: #33235f !important; }
