/* ========================================================
   JAZZ GUITAR — SHARED STYLES
   Bloque I: Fundamentos
   Paleta primaveral fresca · Jazz luminoso
   ======================================================== */

:root {
  /* Fondos frescos — blanco con toques verdosos */
  --bg:  #f9fcf8;
  --bg2: #f0f5ee;
  --bg3: #dfe8dc;

  /* Textos suaves — gris carbón cálido */
  --fg:  #2c3a2e;
  --fg2: #5a6e5c;
  --fg3: #8fa892;

  /* Dorado jazz — ámbar luminoso */
  --gold:      #c88518;
  --gold-dim:  rgba(200,133,24,0.10);
  --gold-glow: rgba(200,133,24,0.28);

  /* Azul cielo primaveral */
  --blue:     #3a7ec8;
  --blue-dim: rgba(58,126,200,0.10);

  /* Verde hoja nueva */
  --green:     #3a9e68;
  --green-dim: rgba(58,158,104,0.10);

  /* Coral / rosa vivo */
  --red:     #d45050;
  --red-dim: rgba(212,80,80,0.10);

  /* Lavanda floral */
  --purple:     #8668c0;
  --purple-dim: rgba(134,104,192,0.10);

  /* Coral melocotón */
  --coral:     #e07048;
  --coral-dim: rgba(224,112,72,0.10);

  /* Notas musicales */
  --major: #c88518;
  --minor: #3a7ec8;
  --root:  #3a9e68;

  /* Tipografía */
  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Source Sans 3', system-ui, sans-serif;
  --mono:  'Inconsolata', 'Courier New', monospace;

  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain overlay suave — textura de papel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ====== HERO ====== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
  /* Degradado primaveral: blanco → menta suave */
  background: linear-gradient(160deg,
    #ffffff 0%,
    #f4faf5 35%,
    #e8f4ec 100%);
}

/* Destellos de color tipo pétalos de primavera */
.hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle,
    rgba(58,158,104,0.08) 0%,
    rgba(134,104,192,0.05) 50%,
    transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero::after {
  display: none; /* el grain va en body::after, no aquí */
}

/* Manchas de color — flores de primavera */
.hero .color-blob-1 {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58,158,104,0.10), transparent 70%);
  top: -80px; left: -80px;
  pointer-events: none;
}

.hero .color-blob-2 {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(134,104,192,0.08), transparent 70%);
  bottom: -60px; right: -60px;
  pointer-events: none;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.4s forwards;
  color: var(--fg);
}

.hero h1 em { font-style: italic; color: var(--gold); font-weight: 400; }

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--fg2);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.6s forwards;
}

.hero-scroll {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--fg3);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.8s forwards;
}

.hero-scroll span {
  display: block;
  margin-top: 12px;
  font-size: 20px;
  animation: bob 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ====== SECTIONS ====== */
.chapter {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  min-height: 80vh;
  padding: 100px 0;
  position: relative;
}

/* Alternar fondo entre secciones para dar ritmo visual */
.section:nth-child(odd)  { background: var(--bg); }
.section:nth-child(even) { background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%); }

.section-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-tag::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 640px;
  color: var(--fg);
}

.section h2 em { font-style: italic; color: var(--gold); }

.section-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg2);
  max-width: 600px;
  font-weight: 300;
}

.section-body strong { color: var(--fg); font-weight: 600; }

/* Two column layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.split-text { padding-top: 20px; }
.split-viz  { position: sticky; top: 80px; }

/* ====== PANEL TRIGGERS (etiquetas clicables) ====== */
.panel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  border: 1.5px solid;
  margin: 4px 2px;
  white-space: nowrap;
  font-weight: 500;
}

.panel-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  filter: brightness(1.05);
}

.panel-trigger.historia {
  background: rgba(114,83,168,0.10);
  border-color: rgba(114,83,168,0.35);
  color: var(--purple);
}
.panel-trigger.teoria {
  background: rgba(184,114,10,0.10);
  border-color: rgba(184,114,10,0.35);
  color: var(--gold);
}
.panel-trigger.escucha {
  background: rgba(46,139,90,0.10);
  border-color: rgba(46,139,90,0.35);
  color: var(--green);
}
.panel-trigger.bases {
  background: rgba(36,96,167,0.10);
  border-color: rgba(36,96,167,0.35);
  color: var(--blue);
}

/* ====== SLIDE PANEL ====== */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43,32,24,0.35);
  backdrop-filter: blur(6px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.panel-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(580px, 92vw);
  height: 100vh;
  background: var(--bg);
  border-left: 2px solid var(--bg3);
  box-shadow: -8px 0 40px rgba(43,32,24,0.12);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.slide-panel.open { transform: translateX(0); }

.panel-header {
  padding: 24px 28px;
  border-bottom: 1.5px solid var(--bg3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg2);
}

.panel-type {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.panel-type .icon { font-size: 16px; }

.panel-type.historia { color: var(--purple); }
.panel-type.teoria   { color: var(--gold); }
.panel-type.escucha  { color: var(--green); }
.panel-type.bases    { color: var(--blue); }

.panel-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  color: var(--fg3);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.panel-close:hover {
  background: var(--bg3);
  color: var(--fg);
  border-color: var(--fg3);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--fg3) transparent;
}

.panel-content::-webkit-scrollbar { width: 6px; }
.panel-content::-webkit-scrollbar-thumb { background: var(--fg3); border-radius: 3px; }

.panel-content h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.3;
  color: var(--fg);
}

.panel-content h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  margin: 28px 0 12px;
  color: var(--fg);
}

.panel-content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--fg2);
  margin-bottom: 12px;
  font-weight: 300;
}

.panel-content strong { color: var(--fg); font-weight: 600; }
.panel-content em { color: var(--gold); font-style: italic; }

.panel-content .quote {
  border-left: 3px solid var(--gold);
  background: var(--gold-dim);
  border-radius: 0 8px 8px 0;
  padding: 14px 20px;
  margin: 20px 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--fg2);
  font-size: 16px;
  line-height: 1.6;
}

.panel-content .quote cite {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-style: normal;
  color: var(--fg3);
  font-family: var(--mono);
}

.panel-content .song-card {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s var(--ease);
}

.panel-content .song-card:hover {
  border-color: var(--gold);
  transform: translateX(3px);
  box-shadow: 0 3px 12px rgba(184,114,10,0.12);
}

.song-card .song-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.song-card .song-icon.focal { background: var(--gold-dim); }
.song-card .song-icon.ref   { background: var(--bg3); }

.song-card .song-info  { flex: 1; }
.song-card .song-title  { font-size: 15px; color: var(--fg); font-weight: 500; }
.song-card .song-artist { font-size: 13px; color: var(--fg3); font-weight: 300; }
.song-card .song-note   { font-size: 12px; color: var(--fg3); margin-top: 4px; font-weight: 300; }

.song-card .song-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.song-card .song-tag.focal  { background: var(--gold-dim);  color: var(--gold); }
.song-card .song-tag.listen { background: var(--green-dim); color: var(--green); }

.panel-content .theory-box {
  background: linear-gradient(135deg, rgba(184,114,10,0.10), rgba(184,114,10,0.05));
  border: 1.5px solid rgba(184,114,10,0.25);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.panel-content .theory-box .tb-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}

.panel-content .theory-box p { color: var(--fg2); margin-bottom: 8px; }
.panel-content .theory-box p:last-child { margin-bottom: 0; }

.panel-content .listen-guide {
  background: linear-gradient(135deg, rgba(46,139,90,0.08), rgba(46,139,90,0.03));
  border: 1.5px solid rgba(46,139,90,0.20);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.listen-guide .lg-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.listen-guide .lg-title {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--fg);
  margin-bottom: 8px;
}

.listen-guide p { font-size: 14px; color: var(--fg2); margin-bottom: 0; }

.panel-content .separator {
  height: 1.5px;
  background: var(--bg3);
  margin: 24px 0;
  border-radius: 1px;
}

/* ====== YOUTUBE EMBED ====== */
.yt-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
  background: var(--bg3);
}

.yt-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

.listening-box .yt-embed {
  margin-top: 16px;
  padding-bottom: 42%; /* Slightly shorter for inline use */
}

/* ====== INTERACTIVE FRETBOARD ====== */
.fretboard-container {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 32px 24px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(43,32,24,0.06);
}

.fretboard-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent,
    rgba(184,114,10,0.5),
    rgba(46,139,90,0.4),
    rgba(36,96,167,0.4),
    transparent);
  border-radius: 2px 2px 0 0;
}

.fb-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--fg3);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.fretboard { position: relative; width: 100%; overflow-x: auto; }
.fb-svg    { display: block; width: 100%; }

.fb-note {
  cursor: pointer;
  transition: all 0.2s var(--ease-back);
}

.fb-note:hover   { filter: brightness(1.2); transform: scale(1.15); }
.fb-note.playing { animation: notePulse 0.4s var(--ease-back); }

@keyframes notePulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); filter: brightness(1.3); }
  100% { transform: scale(1); }
}

.fb-controls {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.fb-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  color: var(--fg2);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.fb-btn:hover  { background: var(--bg3); color: var(--fg); border-color: var(--fg3); }
.fb-btn.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }

/* ====== INTERVAL / NOTE PLAYER ====== */
.interval-player {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(43,32,24,0.06);
}

.ip-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--fg3);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.ip-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-bottom: 28px;
}

.ip-note {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  transition: all 0.3s var(--ease-back);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.ip-note.root         { background: var(--root);  color: #fff; box-shadow: 0 4px 20px rgba(46,139,90,0.35); }
.ip-note.third-maj,
.ip-note.interval-maj { background: var(--major); color: #fff; box-shadow: 0 4px 20px rgba(184,114,10,0.35); }
.ip-note.third-min,
.ip-note.interval-min { background: var(--minor); color: #fff; box-shadow: 0 4px 20px rgba(36,96,167,0.35); }
.ip-note.ringing      { transform: scale(1.18); }

.ip-arrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ip-arrow .semitones {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

.ip-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.ip-play {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.ip-play.major { background: var(--major); color: white; }
.ip-play.minor { background: var(--minor); color: white; }
.ip-play.both  { background: var(--bg3); color: var(--fg); border: 1.5px solid var(--fg3); }
.ip-play:hover  { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 6px 18px rgba(0,0,0,0.15); }
.ip-play:active { transform: scale(0.97); }

/* ====== EAR TRAINING QUIZ ====== */
.quiz-box {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 2px 16px rgba(43,32,24,0.06);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.quiz-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
}

.quiz-score   { font-family: var(--mono); font-size: 14px; color: var(--fg2); }
.quiz-score b { color: var(--green); }

.quiz-prompt {
  font-family: var(--serif);
  font-size: 22px;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.4;
  color: var(--fg);
}

.quiz-play-btn {
  display: flex;
  margin: 0 auto 32px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--bg3);
  color: var(--fg);
  font-size: 28px;
  cursor: pointer;
  transition: all 0.2s var(--ease-back);
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(43,32,24,0.10);
}

.quiz-play-btn:hover  { border-color: var(--gold); transform: scale(1.10); box-shadow: 0 6px 24px rgba(184,114,10,0.20); }
.quiz-play-btn.playing { border-color: var(--gold); box-shadow: 0 0 28px var(--gold-glow); }

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-opt {
  padding: 18px;
  border-radius: 10px;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--fg);
  font-weight: 400;
  box-shadow: 0 1px 6px rgba(43,32,24,0.06);
}

.quiz-opt:hover   { border-color: var(--gold); background: var(--gold-dim); color: var(--gold); }
.quiz-opt.correct { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.quiz-opt.wrong   { border-color: var(--red);   background: var(--red-dim);   color: var(--red); }
.quiz-opt.disabled { pointer-events: none; opacity: 0.5; }

.quiz-feedback {
  text-align: center;
  margin-top: 20px;
  font-size: 15px;
  min-height: 24px;
  font-weight: 300;
  transition: opacity 0.3s;
}

.quiz-next {
  display: none;
  margin: 20px auto 0;
  padding: 10px 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 600;
}

.quiz-next:hover { background: rgba(184,114,10,0.20); }

/* ====== CHECKLIST ====== */
.checklist {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 2px 16px rgba(43,32,24,0.06);
}

.cl-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 600;
}

.cl-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1.5px solid var(--bg3);
  cursor: pointer;
  transition: opacity 0.2s;
  border-radius: 4px;
}

.cl-item:last-child { border-bottom: none; }

.cl-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--fg3);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-back);
  background: var(--bg);
}

.cl-item.checked .cl-check {
  background: var(--green);
  border-color: var(--green);
}
.cl-check svg { opacity: 0; transition: all 0.2s var(--ease-back); width: 14px; height: 14px; }
.cl-item.checked .cl-check svg { opacity: 1; transform: scale(1); }

.cl-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg2);
  transition: color 0.2s;
}

.cl-item.checked .cl-text { color: var(--fg3); text-decoration: line-through; }

.cl-progress {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cl-bar      { flex: 1; height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.cl-bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), #5cb87a); border-radius: 3px; transition: width 0.4s var(--ease); }
.cl-pct      { font-family: var(--mono); font-size: 13px; color: var(--fg3); min-width: 40px; text-align: right; }

/* ====== LISTENING BOX ====== */
.listening-box {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 32px 0;
  box-shadow: 0 2px 12px rgba(43,32,24,0.06);
}

.lb-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  border: 1.5px solid rgba(184,114,10,0.20);
}

.lb-content { flex: 1; }
.lb-tag   { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin-bottom: 6px; font-weight: 600; }
.lb-title { font-family: var(--serif); font-size: 18px; color: var(--fg); margin-bottom: 4px; }
.lb-desc  { font-size: 14px; color: var(--fg3); font-weight: 300; }

/* ====== VERDICT ====== */
.verdict {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(43,32,24,0.06);
}

.verdict-icon { font-size: 48px; margin-bottom: 16px; }
.verdict h3 { font-family: var(--serif); font-size: 28px; margin-bottom: 12px; color: var(--fg); }
.verdict p  { font-size: 16px; color: var(--fg2); max-width: 480px; margin: 0 auto; line-height: 1.6; font-weight: 300; }

/* ====== NAVIGATION ====== */
.unit-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg2);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1.5px solid var(--bg3);
  background: var(--bg2);
  transition: all 0.2s var(--ease);
  box-shadow: 0 2px 8px rgba(43,32,24,0.06);
}

.nav-link:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184,114,10,0.15);
}

.nav-link.disabled { opacity: 0.35; pointer-events: none; }

.nav-link .arrow      { font-size: 18px; }
.nav-link .nav-text   { display: flex; flex-direction: column; gap: 2px; }
.nav-link .nav-label  { font-size: 10px; color: var(--fg3); text-transform: uppercase; letter-spacing: 2px; }
.nav-link .nav-title  { font-size: 14px; }

/* ====== FOOTER ====== */
.foot {
  text-align: center;
  padding: 40px 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg3);
  letter-spacing: 2px;
  border-top: 1.5px solid var(--bg3);
  background: var(--bg2);
}

/* ====== PANEL TRIGGERS ROW ====== */
.triggers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

/* ====== INDEX PAGE ====== */
.index-hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px 40px;
  position: relative;
  background: linear-gradient(160deg, #fff8ec 0%, #fdf3e3 50%, #f7e8d0 100%);
}

.unit-cards {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  gap: 20px;
}

.unit-card {
  display: flex;
  text-decoration: none;
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 32px;
  gap: 24px;
  align-items: center;
  transition: all 0.25s var(--ease);
  box-shadow: 0 2px 10px rgba(43,32,24,0.06);
}

.unit-card:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(184,114,10,0.15);
}

.unit-card .uc-num {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  color: var(--gold);
  min-width: 56px;
  text-align: center;
}

.unit-card .uc-body  { flex: 1; }

.unit-card .uc-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 6px;
}

.unit-card .uc-desc {
  font-size: 15px;
  color: var(--fg2);
  font-weight: 300;
  line-height: 1.5;
}

.unit-card .uc-piece {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg3);
  margin-top: 8px;
  letter-spacing: 0.5px;
}

.unit-card .uc-arrow { font-size: 24px; color: var(--fg3); transition: color 0.2s; }
.unit-card:hover .uc-arrow { color: var(--gold); }

/* ====== RUBRICA ====== */
.rubrica {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 16px;
  padding: 28px;
  margin-top: 24px;
  box-shadow: 0 2px 12px rgba(43,32,24,0.06);
}

.rubrica-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
}

.rubrica-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.rubrica-row.header { margin-bottom: 16px; }

.rubrica-cell {
  font-size: 13px;
  color: var(--fg2);
  line-height: 1.5;
  font-weight: 300;
}

.rubrica-cell.label {
  font-weight: 500;
  color: var(--fg);
  font-size: 14px;
}

.rubrica-cell.header-cell {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg3);
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--bg3);
  font-weight: 600;
}

/* ====================================================
   NUEVAS MEJORAS — añadidas tras revisión pedagógica
   ==================================================== */

/* ====== B1: SCROLL ANIMATIONS ====== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== B2: FRETBOARD FEEDBACK ====== */
@keyframes fbPulse {
  0%   { r: 12; }
  40%  { r: 15; }
  100% { r: 12; }
}
.fb-note-pulse {
  animation: fbPulse 0.35s var(--ease-back) forwards;
}
.fb-note-name {
  text-align: center;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  height: 36px;
  line-height: 36px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  letter-spacing: 1px;
}

/* ====== A3: QUIZ STREAK ====== */
.quiz-streak {
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--fg3);
  margin-top: 12px;
  min-height: 18px;
  transition: color 0.3s;
}
.streak-stars {
  letter-spacing: 2px;
  font-size: 13px;
}

/* ====== A1: UNIT PROGRESS (index) ====== */
.uc-progress-bar {
  height: 5px;
  background: var(--bg3);
  border-radius: 3px;
  margin: 10px 0 6px;
  overflow: hidden;
}
.uc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #5cb87a);
  border-radius: 3px;
  transition: width 0.6s var(--ease);
}
.uc-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 2px;
}
.uc-badge.locked   { background: var(--bg3); color: var(--fg3); }
.uc-badge.progress { background: var(--gold-dim); color: var(--gold); }
.uc-badge.done     { background: var(--green-dim); color: var(--green); }

/* ====== A2: MINI-ROADMAP ====== */
.session-roadmap {
  background: var(--bg2);
  border-bottom: 1.5px solid var(--bg3);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(43,32,24,0.06);
}
.srm-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.srm-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.srm-unit.current { opacity: 1; }
.srm-unit.done    { opacity: 0.7; }
.srm-unit-id {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--fg3);
}
.srm-unit.current .srm-unit-id { color: var(--gold); font-weight: 600; }
.srm-unit.done    .srm-unit-id { color: var(--green); }
.srm-dots { display: flex; gap: 4px; }
.srm-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg3);
  color: var(--fg3);
  font-family: var(--mono);
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.srm-dot.active { background: var(--gold-dim); color: var(--gold); border: 1.5px solid var(--gold); }
.srm-dot.done   { background: var(--green-dim); color: var(--green); border: 1.5px solid var(--green); }
.srm-unit-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--fg3);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.srm-unit.current .srm-unit-label { color: var(--fg2); }
.srm-connector {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--bg3);
  margin: 0 4px;
  padding-bottom: 14px;
}

/* ====== A4: TIMER DE PRÁCTICA ====== */
.practice-timer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 40px;
  padding: 8px 14px;
  box-shadow: 0 4px 20px rgba(43,32,24,0.10);
  font-family: var(--mono);
  transition: all 0.3s var(--ease);
}
.practice-timer.running {
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(46,139,90,0.18);
}
.practice-timer.done {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(184,114,10,0.25);
}
.timer-btn, .timer-reset {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  opacity: 0.7;
  transition: opacity 0.15s, transform 0.15s;
}
.timer-btn:hover, .timer-reset:hover { opacity: 1; transform: scale(1.15); }
.timer-display {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--fg2);
  min-width: 48px;
  text-align: center;
}
.practice-timer.running .timer-display { color: var(--green); }
.practice-timer.done    .timer-display { color: var(--gold); }

/* ====== A5: DIARIO DE PRÁCTICA ====== */
.diary-box {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: 14px;
  padding: 24px;
  margin-top: 20px;
}
.diary-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}
.diary-textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--bg3);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--fg2);
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  min-height: 80px;
}
.diary-textarea:focus { border-color: var(--gold); }
.diary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.diary-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg3);
  letter-spacing: 0.5px;
}
.diary-saved {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.5px;
  min-height: 16px;
  transition: opacity 0.3s;
}

/* ====== TOAST NOTIFICATIONS ====== */
.app-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg);
  border: 1.5px solid var(--bg3);
  border-radius: 40px;
  padding: 12px 28px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--fg2);
  box-shadow: 0 8px 32px rgba(43,32,24,0.15);
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  pointer-events: none;
  white-space: nowrap;
}
.app-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast.toast-green { border-color: var(--green); color: var(--green); }
.app-toast.toast-gold  { border-color: var(--gold);  color: var(--gold); }

/* ====== B4: HERO IDENTITY DECORATION ====== */
.hero-deco {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.18;
  pointer-events: none;
}

/* ====== B5: QUIZ PLAY BUTTON ENHANCED ====== */
@keyframes quizPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,114,10,0.3); }
  50%       { box-shadow: 0 0 0 10px rgba(184,114,10,0); }
}
.quiz-play-btn:not(.playing) {
  animation: quizPulse 2s ease-in-out infinite;
}
.quiz-play-btn.playing {
  animation: none;
  border-color: var(--gold);
  box-shadow: 0 0 28px var(--gold-glow);
}

/* ====== B6: MICROINTERACCIONES EN TRIGGERS ====== */
@keyframes emojiBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35) rotate(-5deg); }
  70%  { transform: scale(0.95) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.panel-trigger:hover .pt-emoji,
.panel-trigger:hover > *:first-child {
  display: inline-block;
  animation: emojiBounce 0.3s var(--ease-back) forwards;
}
.panel-trigger:active {
  transform: scale(0.94) translateY(0) !important;
}

/* ====== B3: TIMELINE EN PANELES HISTORIA ====== */
.history-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 24px;
  overflow-x: auto;
  padding: 8px 0;
}
.htl-event {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.htl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--gold);
  flex-shrink: 0;
}
.htl-dot.alt { background: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.htl-dot.focal { background: var(--green); box-shadow: 0 0 0 2px var(--green); width: 14px; height: 14px; }
.htl-year {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.htl-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--fg3);
  white-space: nowrap;
  max-width: 60px;
  text-align: center;
  line-height: 1.3;
}
.htl-line {
  height: 2px;
  flex: 1;
  min-width: 20px;
  background: linear-gradient(90deg, var(--bg3), var(--bg3));
  margin: 0 4px;
  margin-bottom: 26px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .split          { grid-template-columns: 1fr; gap: 40px; }
  .split-viz      { position: static; }
  .section        { padding: 60px 0; min-height: auto; }
  .ip-display     { gap: 16px; }
  .ip-note        { width: 56px; height: 56px; font-size: 18px; }
  .slide-panel    { width: 100vw; }
  .unit-nav       { flex-direction: column; gap: 12px; }
  .rubrica-row    { grid-template-columns: 1fr; gap: 4px; }
  .fretboard      { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fb-svg         { min-width: 480px; }
}

/* ====== DARK MODE ====== */
[data-theme="dark"] {
  --bg:  #1a1612;
  --bg2: #231e18;
  --bg3: #342b22;

  --fg:  #e8ddd0;
  --fg2: #b8a898;
  --fg3: #7a6b5c;

  --gold:      #d4952e;
  --gold-dim:  rgba(212,149,46,0.15);
  --gold-glow: rgba(212,149,46,0.35);

  --blue:     #4a8fd4;
  --blue-dim: rgba(74,143,212,0.15);

  --green:     #4aad78;
  --green-dim: rgba(74,173,120,0.15);

  --red:     #e05555;
  --red-dim: rgba(224,85,85,0.15);

  --purple:     #9b7fd4;
  --purple-dim: rgba(155,127,212,0.15);

  --coral:     #e07850;
  --coral-dim: rgba(224,120,80,0.15);

  --major: #d4952e;
  --minor: #4a8fd4;
  --root:  #4aad78;
}

[data-theme="dark"] body {
  background: var(--bg);
}

[data-theme="dark"] body::after {
  opacity: 0.015;
}

[data-theme="dark"] .hero {
  background: linear-gradient(160deg,
    #1e1a14 0%,
    #221c16 40%,
    #2a2118 100%);
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(circle,
    rgba(212,149,46,0.08) 0%,
    rgba(74,173,120,0.04) 50%,
    transparent 70%);
}

[data-theme="dark"] .index-hero {
  background: linear-gradient(160deg,
    #1e1a14 0%,
    #221c16 40%,
    #2a2118 100%);
}

[data-theme="dark"] .fretboard-container {
  box-shadow: 0 2px 16px rgba(0,0,0,0.20);
}

[data-theme="dark"] .interval-player,
[data-theme="dark"] .quiz-box {
  box-shadow: 0 2px 16px rgba(0,0,0,0.20);
}

[data-theme="dark"] .panel-overlay {
  background: rgba(0,0,0,0.55);
}

[data-theme="dark"] .slide-panel {
  box-shadow: -8px 0 40px rgba(0,0,0,0.40);
}

[data-theme="dark"] .quiz-play-btn {
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

[data-theme="dark"] .song-card:hover {
  box-shadow: 0 3px 12px rgba(212,149,46,0.15);
}

[data-theme="dark"] .ip-note {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

[data-theme="dark"] .unit-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.20);
}

[data-theme="dark"] .unit-card:hover {
  box-shadow: 0 6px 24px rgba(212,149,46,0.15);
}

/* Dark mode toggle button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--bg3);
  background: var(--bg2);
  color: var(--fg3);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
}

.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.1);
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

[data-theme="dark"] .theme-toggle {
  box-shadow: 0 2px 12px rgba(0,0,0,0.30);
}
