:root {
  --ln-blue:#1769c2;
  --ln-blue-2:#0f5aa8;
  --ln-blue-soft:#dcecf8;
  --ln-blue-softer:#eaf4fa;
  --ln-green:#2da867;
  --ln-green-soft:#def1e7;
  --ln-purple:#7657c8;
  --ln-purple-soft:#e7def8;
  --ln-orange:#dc8a1b;
  --ln-orange-soft:#f9e9cf;
  --ln-coral:#e65a4f;
  --ln-gold:#f0aa24;
  --ln-navy:#173f70;
  --ln-ink:#273b4a;
  --ln-muted:#64798a;
  --ln-line:#cadbe6;
  --ln-line-strong:#adc9dc;
  --ln-surface:#f9fcfe;
  --ln-bg:#e9f1f6;
  --ln-shadow-card:0 7px 18px rgba(23,63,112,.09);
  --ln-shadow-panel:0 14px 34px rgba(23,63,112,.11);
}

/* Charte finale Lecture de notes : une seule couche visuelle, responsive et tactile. */
body.nl-harmony-module.nl-module-lecture-notes,
body.nl-harmony-module.nl-module-lecture-notes *,
body.nl-harmony-module.nl-module-lecture-notes *::before,
body.nl-harmony-module.nl-module-lecture-notes *::after {
  box-sizing:border-box;
}

body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar,
body.nl-harmony-module.nl-module-lecture-notes main,
body.nl-harmony-module.nl-module-lecture-notes .section,
body.nl-harmony-module.nl-module-lecture-notes .instrument-card,
body.nl-harmony-module.nl-module-lecture-notes #quiz,
body.nl-harmony-module.nl-module-lecture-notes #key-quiz,
body.nl-harmony-module.nl-module-lecture-notes .exercise-settings,
body.nl-harmony-module.nl-module-lecture-notes .music-panel,
body.nl-harmony-module.nl-module-lecture-notes .instrument-note,
body.nl-harmony-module.nl-module-lecture-notes .instrument-answers,
body.nl-harmony-module.nl-module-lecture-notes #key-answers {
  max-width:100%;
  min-width:0;
}
/* ===== Socle Lecture de notes ===== */
body.nl-harmony-module.nl-module-lecture-notes {
  min-height:100%;
  height:auto !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  padding:14px 10px 20px;
  background:
    radial-gradient(circle at 8% 0,rgba(242,184,75,.12),transparent 25rem),
    radial-gradient(circle at 94% 4%,rgba(23,105,194,.10),transparent 28rem),
    linear-gradient(180deg,#eef5f8 0%,var(--ln-bg) 100%) !important;
  color:var(--ln-ink);
  font-family:"Segoe UI",Roboto,Arial,sans-serif;
}

body.nl-harmony-module.nl-module-lecture-notes main {
  width:min(1100px,100%);
  margin-inline:auto;
}

body.nl-harmony-module.nl-module-lecture-notes .section,
body.nl-harmony-module.nl-module-lecture-notes .instrument-card {
  background:linear-gradient(180deg,#fff 0%,var(--ln-surface) 100%) !important;
  border:1px solid var(--ln-line) !important;
  border-radius:20px !important;
  box-shadow:var(--ln-shadow-panel) !important;
}

body.nl-harmony-module.nl-module-lecture-notes .section {
  max-width:none;
  margin-top:0;
  padding:18px 20px;
}

body.nl-harmony-module.nl-module-lecture-notes .hidden { display:none !important; }
body.nl-harmony-module.nl-module-lecture-notes .shortcut-inline { display:none !important; }

body.nl-harmony-module.nl-module-lecture-notes h1,
body.nl-harmony-module.nl-module-lecture-notes h2,
body.nl-harmony-module.nl-module-lecture-notes h3,
body.nl-harmony-module.nl-module-lecture-notes h4 { color:var(--ln-navy); }

body.nl-harmony-module.nl-module-lecture-notes .section-eyebrow,
body.nl-harmony-module.nl-module-lecture-notes .path-kicker,
body.nl-harmony-module.nl-module-lecture-notes .tutorial-kicker,
body.nl-harmony-module.nl-module-lecture-notes .intro-kicker {
  color:#5c778c;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.74rem;
  font-weight:850;
}

/* ===== Accueil ===== */
body.nl-harmony-module.nl-module-lecture-notes .tutorial-entry {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom:16px;
  padding:12px 14px;
  border:1px solid #c9dfcf;
  border-radius:15px;
  background:linear-gradient(135deg,#edf7ef,#e5f1e8);
  color:#255d42;
  font-weight:750;
}

body.nl-harmony-module.nl-module-lecture-notes .tutorial-entry button {
  min-height:42px;
  margin:0;
  padding:9px 14px;
  border:1px solid #b6d3bf;
  border-radius:11px;
  background:#e8f4eb !important;
  color:#175b3b !important;
  box-shadow:0 3px 8px rgba(38,97,63,.06);
  font-weight:850;
}

body.nl-harmony-module.nl-module-lecture-notes .home-intro {
  max-width:800px;
  margin:2px auto 18px;
  text-align:left;
}
body.nl-harmony-module.nl-module-lecture-notes .home-intro h1 {
  margin:4px 0 8px;
  font-size:1.8rem;
  line-height:1.08;
}
body.nl-harmony-module.nl-module-lecture-notes .home-intro p,
body.nl-harmony-module.nl-module-lecture-notes .mode-section-subtitle,
body.nl-harmony-module.nl-module-lecture-notes .pedagogy,
body.nl-harmony-module.nl-module-lecture-notes .tutorial-lead {
  color:var(--ln-muted);
  line-height:1.48;
}

body.nl-harmony-module.nl-module-lecture-notes .mode-grid {
  display:grid;
  gap:14px;
}
body.nl-harmony-module.nl-module-lecture-notes .mode-grid-three { grid-template-columns:repeat(3,1fr); }

body.nl-harmony-module.nl-module-lecture-notes .mode-card {
  width:100%;
  min-height:138px;
  margin:0;
  padding:18px;
  display:grid;
  grid-template-columns:50px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  border:1px solid var(--ln-line) !important;
  border-top:4px solid var(--ln-blue) !important;
  border-radius:18px !important;
  color:var(--ln-navy) !important;
  text-align:left;
  box-shadow:var(--ln-shadow-card) !important;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
body.nl-harmony-module.nl-module-lecture-notes .mode-card.mode-guided { background:linear-gradient(145deg,#f2f8fd,#dcecf8) !important; border-top-color:var(--ln-blue) !important; }
body.nl-harmony-module.nl-module-lecture-notes .mode-card.mode-tuto { background:linear-gradient(145deg,#f6f2fc,#e7def8) !important; border-top-color:var(--ln-purple) !important; }
body.nl-harmony-module.nl-module-lecture-notes .mode-card.mode-custom { background:linear-gradient(145deg,#f1faf5,#def1e7) !important; border-top-color:var(--ln-green) !important; }
body.nl-harmony-module.nl-module-lecture-notes .mode-card:hover { transform:translateY(-2px); box-shadow:0 11px 24px rgba(23,63,112,.13) !important; }
body.nl-harmony-module.nl-module-lecture-notes .mode-card.selected {
  color:var(--ln-navy) !important;
  border-color:#8db9dc !important;
  border-top-color:var(--ln-blue) !important;
  background:linear-gradient(145deg,#f8fcff,#e3f0fb) !important;
  box-shadow:0 0 0 3px rgba(23,105,194,.09),0 10px 22px rgba(23,63,112,.12) !important;
}
body.nl-harmony-module.nl-module-lecture-notes .mode-icon {
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  border-radius:14px;
  font-size:25px;
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(23,63,112,.08),0 4px 10px rgba(23,63,112,.07);
}
body.nl-harmony-module.nl-module-lecture-notes .mode-guided .mode-icon { color:var(--ln-blue); background:var(--ln-blue-soft); }
body.nl-harmony-module.nl-module-lecture-notes .mode-tuto .mode-icon { color:var(--ln-purple); background:var(--ln-purple-soft); }
body.nl-harmony-module.nl-module-lecture-notes .mode-custom .mode-icon { color:var(--ln-green); background:var(--ln-green-soft); }
body.nl-harmony-module.nl-module-lecture-notes .mode-copy { display:flex; flex-direction:column; gap:5px; }
body.nl-harmony-module.nl-module-lecture-notes .mode-copy strong { color:var(--ln-navy) !important; font-size:1.28rem; }
body.nl-harmony-module.nl-module-lecture-notes .mode-copy small { color:#587085 !important; font-size:.91rem; line-height:1.42; }
body.nl-harmony-module.nl-module-lecture-notes .mode-arrow { color:#7399b8 !important; font-size:2rem; opacity:1; }

/* ===== Titres et panneaux du parcours ===== */
body.nl-harmony-module.nl-module-lecture-notes .path-heading {
  display:flex;
  align-items:center;
  gap:14px;
  width:min(800px,100%);
  margin:10px auto 10px;
  padding:13px 16px;
  border:1px solid #d1dee8;
  border-radius:17px;
  background:linear-gradient(145deg,#fff9ef,#f3f8fc);
  box-shadow:var(--ln-shadow-card);
  text-align:left;
}
body.nl-harmony-module.nl-module-lecture-notes .path-heading h3 { margin:2px 0 0; }
body.nl-harmony-module.nl-module-lecture-notes .path-icon {
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:14px;
  background:var(--ln-orange-soft);
  color:var(--ln-orange);
  font-size:1.45rem;
}

body.nl-harmony-module.nl-module-lecture-notes #bloc-sousfamilles,
body.nl-harmony-module.nl-module-lecture-notes #bloc-instruments,
body.nl-harmony-module.nl-module-lecture-notes #bloc-niveaux:not(.hidden-soft),
body.nl-harmony-module.nl-module-lecture-notes #key-stages:not(.hidden-soft) {
  max-width:1080px;
  margin:12px auto 0;
  padding:14px 16px 16px;
  border:1px solid #d2e0e9;
  border-radius:18px;
  background:linear-gradient(180deg,#f7fbfd,#edf5fa);
  box-shadow:var(--ln-shadow-card);
}
body.nl-harmony-module.nl-module-lecture-notes #bloc-sousfamilles > h4,
body.nl-harmony-module.nl-module-lecture-notes #bloc-instruments > h4,
body.nl-harmony-module.nl-module-lecture-notes #bloc-niveaux > h4,
body.nl-harmony-module.nl-module-lecture-notes .key-stage-heading h4 {
  width:fit-content;
  margin:0 auto 12px;
  padding:7px 13px;
  border-radius:999px;
  background:#e4f0f8;
  color:var(--ln-navy);
}

/* ===== Familles / sous-familles / instruments ===== */
body.nl-harmony-module.nl-module-lecture-notes .families-row,
body.nl-harmony-module.nl-module-lecture-notes .subfamilies-row,
body.nl-harmony-module.nl-module-lecture-notes .instruments-row,
body.nl-harmony-module.nl-module-lecture-notes .key-family-choices {
  display:grid;
  gap:11px;
}
body.nl-harmony-module.nl-module-lecture-notes .families-row,
body.nl-harmony-module.nl-module-lecture-notes .instruments-row { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
body.nl-harmony-module.nl-module-lecture-notes .subfamilies-row { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }
body.nl-harmony-module.nl-module-lecture-notes .key-family-choices { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }

body.nl-harmony-module.nl-module-lecture-notes .families-row .tile,
body.nl-harmony-module.nl-module-lecture-notes #sousfamilles-container button,
body.nl-harmony-module.nl-module-lecture-notes #instruments-container button,
body.nl-harmony-module.nl-module-lecture-notes .key-family-choices button,
body.nl-harmony-module.nl-module-lecture-notes .defi-card {
  min-height:80px;
  margin:0;
  padding:13px 15px;
  border:1px solid var(--ln-line-strong) !important;
  border-radius:15px !important;
  background:linear-gradient(145deg,#eef6fb,#dcecf7) !important;
  color:var(--ln-navy) !important;
  box-shadow:var(--ln-shadow-card) !important;
  text-align:left;
  font-weight:800;
}
body.nl-harmony-module.nl-module-lecture-notes .families-row .tile[data-famille="cordes"] { background:linear-gradient(145deg,#edf6fd,#d8eafb) !important; }
body.nl-harmony-module.nl-module-lecture-notes .families-row .tile[data-famille="vents"] { background:linear-gradient(145deg,#fff6e9,#f6e2c0) !important; }
body.nl-harmony-module.nl-module-lecture-notes .families-row .tile[data-famille="claviers-soufflets"] { background:linear-gradient(145deg,#fbf9ff,#ece5fa) !important; }
body.nl-harmony-module.nl-module-lecture-notes .families-row .tile[data-famille="percussions"] { background:linear-gradient(145deg,#fff8fb,#f8e7ee) !important; }
body.nl-harmony-module.nl-module-lecture-notes .families-row .tile[data-famille="musique-ancienne"] { background:linear-gradient(145deg,#fffaf4,#f7eadb) !important; }
body.nl-harmony-module.nl-module-lecture-notes .families-row .tile[data-famille="musique-traditionnelle"] { background:linear-gradient(145deg,#faf8ff,#ebe6f8) !important; }
body.nl-harmony-module.nl-module-lecture-notes .families-row .tile[data-famille="musiques-actuelles-jazz"] { background:linear-gradient(145deg,#fff8fb,#f6e7ee) !important; }

body.nl-harmony-module.nl-module-lecture-notes .families-row .tile:hover,
body.nl-harmony-module.nl-module-lecture-notes #sousfamilles-container button:hover,
body.nl-harmony-module.nl-module-lecture-notes #instruments-container button:hover,
body.nl-harmony-module.nl-module-lecture-notes .key-family-choices button:hover,
body.nl-harmony-module.nl-module-lecture-notes .defi-card:hover { transform:translateY(-2px); border-color:#82b1d4 !important; }

body.nl-harmony-module.nl-module-lecture-notes .families-row .tile.selected,
body.nl-harmony-module.nl-module-lecture-notes #sousfamilles-container button.selected,
body.nl-harmony-module.nl-module-lecture-notes #instruments-container button.selected,
body.nl-harmony-module.nl-module-lecture-notes .key-family-choices button.selected {
  color:#fff !important;
  background:linear-gradient(145deg,#2a80d9,var(--ln-blue-2)) !important;
  border-color:var(--ln-blue) !important;
  box-shadow:0 9px 22px rgba(23,105,194,.20) !important;
}

body.nl-harmony-module.nl-module-lecture-notes .key-family-block,
body.nl-harmony-module.nl-module-lecture-notes .key-context {
  padding:15px 17px;
  border:1px solid #d1e0ea;
  border-radius:17px;
  background:linear-gradient(145deg,#f8fcff,#edf5fa);
  box-shadow:var(--ln-shadow-card);
  text-align:left;
}

/* ===== Niveaux ===== */
body.nl-harmony-module.nl-module-lecture-notes .levels-row {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:11px;
  max-width:980px;
  margin:0 auto;
}
body.nl-harmony-module.nl-module-lecture-notes .instrument-level-card {
  min-height:88px;
  margin:0;
  padding:12px 13px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  align-items:center;
  gap:10px;
  border:1px solid #abc9dd !important;
  border-top:3px solid #6ea8d3 !important;
  border-radius:14px !important;
  background:linear-gradient(145deg,#eef6fb,#dcecf7) !important;
  color:var(--ln-navy) !important;
  box-shadow:var(--ln-shadow-card) !important;
  text-align:left !important;
}
body.nl-harmony-module.nl-module-lecture-notes .instrument-level-card .level-number {
  display:grid !important;
  place-items:center !important;
  width:38px !important;
  height:38px !important;
  margin:0 !important;
  border:1px solid #bed8ea;
  border-radius:10px !important;
  background:#d4e8f6 !important;
  color:var(--ln-blue) !important;
  font-size:1rem !important;
  font-weight:900 !important;
}
body.nl-harmony-module.nl-module-lecture-notes .instrument-level-card strong { color:var(--ln-navy) !important; font-size:.94rem; line-height:1.25; }
body.nl-harmony-module.nl-module-lecture-notes .instrument-level-card:hover { transform:translateY(-2px); border-color:#75a9cf !important; }
body.nl-harmony-module.nl-module-lecture-notes .instrument-level-card.selected {
  border-color:#76a9cf !important;
  border-top-color:var(--ln-blue) !important;
  background:linear-gradient(145deg,#edf6fd,#d4e8f6) !important;
  color:var(--ln-navy) !important;
  box-shadow:0 0 0 3px rgba(23,105,194,.10),0 9px 20px rgba(23,63,112,.11) !important;
}
body.nl-harmony-module.nl-module-lecture-notes .instrument-level-card.selected::after { display:none !important; content:none !important; }
body.nl-harmony-module.nl-module-lecture-notes .instrument-level-card.selected .level-number {
  background:var(--ln-blue) !important;
  color:#fff !important;
  border-color:var(--ln-blue) !important;
}

/* Parcours cordes validé : bandeau compact + détails sobres. */
body.nl-harmony-module.nl-module-lecture-notes #etape-instrument.instrument-ready.string-missions .string-instrument-hero {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"copy action" "title action";
  align-items:center;
  gap:2px 18px;
  max-width:980px;
  margin:2px auto 14px;
  padding:13px 15px;
  border:1px solid #c8dbe7 !important;
  border-radius:16px !important;
  background:linear-gradient(145deg,#eef6fb,#dcecf7) !important;
  box-shadow:var(--ln-shadow-card) !important;
  text-align:left !important;
}
body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__content { grid-area:copy; min-width:0; }
body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__kicker { margin:0 0 3px !important; color:#61798b !important; font-size:.72rem !important; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__content h4 { margin:0 !important; color:var(--ln-navy) !important; font-size:1.5rem !important; line-height:1.08; }
body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__mission-title { grid-area:title; margin-top:4px; color:var(--ln-muted) !important; font-size:.9rem !important; font-weight:700 !important; text-align:left !important; }
body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__action { grid-area:action; justify-self:end; }
body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__action > button,
body.nl-harmony-module.nl-module-lecture-notes #change-instrument-button {
  min-height:42px !important;
  margin:0 !important;
  padding:8px 12px !important;
  border:1px solid #adc8da !important;
  border-radius:10px !important;
  background:#dcecf7 !important;
  color:#355b77 !important;
  box-shadow:none !important;
  font-weight:800 !important;
}

body.nl-harmony-module.nl-module-lecture-notes .string-level-details {
  display:grid !important;
  grid-template-columns:34px minmax(0,1fr) !important;
  align-items:center !important;
  gap:10px !important;
  max-width:980px !important;
  margin:12px auto 0 !important;
  padding:10px 12px !important;
  border:1px solid #c9dce8 !important;
  border-radius:13px !important;
  background:linear-gradient(145deg,#edf6fa,#dceaf3) !important;
  box-shadow:none !important;
}
body.nl-harmony-module.nl-module-lecture-notes .string-level-details .detail-badge {
  width:34px !important;
  height:34px !important;
  border:1px solid #b8d3e5 !important;
  border-radius:9px !important;
  background:#d4e8f6 !important;
  color:var(--ln-blue) !important;
  box-shadow:none !important;
}
body.nl-harmony-module.nl-module-lecture-notes .string-level-details p { margin:0 !important; color:#3f6078 !important; font-size:.86rem !important; font-weight:650 !important; line-height:1.4 !important; }

/* ===== Boutons d'action ===== */
body.nl-harmony-module.nl-module-lecture-notes .launch-instrument-level,
body.nl-harmony-module.nl-module-lecture-notes .button,
body.nl-harmony-module.nl-module-lecture-notes .tutorial-primary {
  min-height:46px;
  padding:10px 18px;
  border:1px solid #0f5aa8 !important;
  border-radius:11px !important;
  background:linear-gradient(180deg,#2b80d2,#1769c2) !important;
  color:#fff !important;
  box-shadow:0 7px 15px rgba(23,105,194,.20) !important;
  font-weight:850;
}
body.nl-harmony-module.nl-module-lecture-notes .launch-instrument-level:hover,
body.nl-harmony-module.nl-module-lecture-notes .button:hover,
body.nl-harmony-module.nl-module-lecture-notes .tutorial-primary:hover { background:linear-gradient(180deg,#2377c5,#0f5aa8) !important; }
body.nl-harmony-module.nl-module-lecture-notes .launch-instrument-level:disabled { opacity:.58; cursor:default; }

/* ===== Écrans d'exercice : charte compacte unique ===== */
body.nl-harmony-module.nl-module-lecture-notes .instrument-card {
  width:min(960px,100%);
  margin:0 auto;
  padding:14px 18px 18px;
}
body.nl-harmony-module.nl-module-lecture-notes .instrument-card h2 {
  margin:5px 0 3px;
  color:var(--ln-navy);
  font-size:clamp(1.2rem,2vw,1.5rem);
  line-height:1.12;
}
body.nl-harmony-module.nl-module-lecture-notes .pedagogy,
body.nl-harmony-module.nl-module-lecture-notes .sound-summary {
  margin:3px auto 5px;
  line-height:1.35;
}
body.nl-harmony-module.nl-module-lecture-notes .sound-summary {
  padding:5px 9px;
  border:1px solid #d0e0e9 !important;
  border-radius:10px !important;
  background:#edf5f9 !important;
  box-shadow:none !important;
}

/* Les trois réglages secondaires partagent désormais une seule barre compacte. */
body.nl-harmony-module.nl-module-lecture-notes .exercise-settings {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) minmax(0,1fr);
  align-items:center;
  gap:6px;
  width:100%;
  max-width:900px;
  margin:5px auto 3px;
  padding:5px;
  border:1px solid #c4dae7;
  border-radius:13px;
  background:linear-gradient(180deg,#e7f2f8,#dceaf3);
  box-shadow:0 4px 12px rgba(23,63,112,.06);
}
body.nl-harmony-module.nl-module-lecture-notes .exercise-settings.key-exercise-settings {
  grid-template-columns:minmax(0,520px);
  justify-content:center;
}
body.nl-harmony-module.nl-module-lecture-notes .exercise-settings > [hidden] { display:none !important; }
body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice,
body.nl-harmony-module.nl-module-lecture-notes .fingering-mode,
body.nl-harmony-module.nl-module-lecture-notes .note-color-mode {
  display:flex !important;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:38px;
  gap:4px;
  margin:0 !important;
  padding:0 4px !important;
  border:0 !important;
  border-radius:9px !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#38566d;
  font-size:.78rem;
  font-weight:850;
}
body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice > span,
body.nl-harmony-module.nl-module-lecture-notes .settings-label {
  flex:0 0 auto;
  margin:0 2px 0 0;
  color:#35546b;
  font-size:.74rem;
  font-weight:900;
  white-space:nowrap;
  min-width:0;
}
body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice button {
  min-height:36px;
  margin:0;
  padding:6px 9px;
  border:1px solid #aac7da !important;
  border-radius:8px !important;
  background:#d6e9f5 !important;
  color:#254e6d !important;
  box-shadow:none !important;
  font-size:.76rem;
  font-weight:850;
  white-space:nowrap;
  min-width:0;
}
body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice button.selected {
  border-color:var(--ln-blue) !important;
  background:var(--ln-blue) !important;
  color:#fff !important;
}
body.nl-harmony-module.nl-module-lecture-notes .fingering-options {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  min-width:0;
  gap:3px !important;
  margin:0;
  padding:3px !important;
  border:1px solid #bed4e2 !important;
  border-radius:9px !important;
  background:#d5e6f1 !important;
}
body.nl-harmony-module.nl-module-lecture-notes .fingering-options label { position:relative; min-width:0; cursor:pointer; }
body.nl-harmony-module.nl-module-lecture-notes .fingering-options input { position:absolute; width:1px; height:1px; opacity:0; }
body.nl-harmony-module.nl-module-lecture-notes .fingering-options input:focus-visible + span { outline:3px solid rgba(23,105,194,.28); outline-offset:2px; }
body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice button[hidden] { display:none !important; }
body.nl-harmony-module.nl-module-lecture-notes .fingering-options span {
  min-height:32px !important;
  min-width:0;
  padding:4px 7px !important;
  border-radius:7px !important;
  background:#e5f1f7 !important;
  color:#35556d !important;
  font-size:.72rem !important;
  font-weight:850 !important;
  line-height:1.12;
  text-align:center;
  white-space:nowrap;
  min-width:0;
}
body.nl-harmony-module.nl-module-lecture-notes .fingering-options input:checked + span {
  background:var(--ln-blue) !important;
  color:#fff !important;
  box-shadow:0 2px 6px rgba(23,105,194,.16) !important;
}
body.nl-harmony-module.nl-module-lecture-notes .exercise-settings-help {
  min-height:0;
  margin:0 auto 3px;
  text-align:center;
}
body.nl-harmony-module.nl-module-lecture-notes .note-color-help,
body.nl-harmony-module.nl-module-lecture-notes .fingering-notice {
  display:inline-block;
  width:auto;
  max-width:min(760px,100%);
  margin:1px 3px !important;
  padding:3px 8px !important;
  border-radius:8px !important;
  background:#eaf3f8 !important;
  color:#3d6078 !important;
  font-size:.69rem !important;
  line-height:1.2 !important;
  font-weight:700 !important;
}
body.nl-harmony-module.nl-module-lecture-notes .note-color-help[hidden],
body.nl-harmony-module.nl-module-lecture-notes .fingering-notice[hidden] { display:none !important; }

body.nl-harmony-module.nl-module-lecture-notes .music-panel {
  border:2px solid #b7d2e4 !important;
  border-radius:17px !important;
  background:linear-gradient(180deg,#f8fcff,#eaf3f9) !important;
  box-shadow:0 7px 18px rgba(23,63,112,.09) !important;
}

/* Réponses : assez teintées pour être des actions, sans aplat excessif. */
body.nl-harmony-module.nl-module-lecture-notes .instrument-answers button,
body.nl-harmony-module.nl-module-lecture-notes #key-answers button {
  min-height:48px;
  margin:0;
  padding:9px 11px;
  border:1px solid #91bddb !important;
  border-bottom:3px solid #6ca5ce !important;
  border-radius:10px !important;
  background:linear-gradient(180deg,#d8edf8,#c4e0f1) !important;
  color:var(--ln-navy) !important;
  box-shadow:0 3px 8px rgba(23,63,112,.08) !important;
  font-size:1rem;
  font-weight:900;
}
body.nl-harmony-module.nl-module-lecture-notes .instrument-answers button:hover,
body.nl-harmony-module.nl-module-lecture-notes #key-answers button:hover {
  border-color:#609fc9 !important;
  background:linear-gradient(180deg,#cfe8f6,#b8d8ec) !important;
}
body.nl-harmony-module.nl-module-lecture-notes .instrument-answers button:disabled,
body.nl-harmony-module.nl-module-lecture-notes #key-answers button:disabled { opacity:.72; }
body.nl-harmony-module.nl-module-lecture-notes .instrument-feedback,
body.nl-harmony-module.nl-module-lecture-notes #key-feedback,
body.nl-harmony-module.nl-module-lecture-notes .keyboard-hint,
body.nl-harmony-module.nl-module-lecture-notes #key-score,
body.nl-harmony-module.nl-module-lecture-notes #score { color:var(--ln-muted); }

/* ===== Manette / clavier ===== */
html[data-notalix-input="gamepad"] body.nl-harmony-module.nl-module-lecture-notes [data-notalix-focus="true"],
html[data-input-mode="gamepad"] body.nl-harmony-module.nl-module-lecture-notes .pad-focus,
html[data-input-mode="keyboard"] body.nl-harmony-module.nl-module-lecture-notes .pad-focus {
  position:relative;
  z-index:2;
  outline:4px solid var(--ln-gold) !important;
  outline-offset:4px !important;
  box-shadow:0 0 0 7px rgba(240,170,36,.18),var(--ln-shadow-card) !important;
}

/* ===== Tablette / petits écrans ===== */
@media (max-width:900px) {
  body.nl-harmony-module.nl-module-lecture-notes .mode-grid-three { grid-template-columns:1fr; }
  body.nl-harmony-module.nl-module-lecture-notes .levels-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings {
    grid-template-columns:1fr 1fr;
  }
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings .live-sound-choice { grid-column:1 / -1; }
}

@media (max-width:760px) {
  body.nl-harmony-module.nl-module-lecture-notes { padding:7px 6px 14px; }
  body.nl-harmony-module.nl-module-lecture-notes .section,
  body.nl-harmony-module.nl-module-lecture-notes .instrument-card { padding:12px; border-radius:16px !important; }
  body.nl-harmony-module.nl-module-lecture-notes .shortcut-help { display:none !important; }
}

@media (max-width:420px) {
  body.nl-harmony-module.nl-module-lecture-notes { padding:4px 3px 10px; }
  body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar {
    width:min(1100px,calc(100% - 4px));
    max-width:calc(100% - 4px);
    gap:4px;
    padding:6px 7px;
  }
  body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar__back {
    max-width:70px;
    min-height:34px;
    padding:6px 6px;
    font-size:9.5px;
  }
  body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar__brand { gap:4px; min-width:0; }
  body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar__note { font-size:18px; }
  body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar__name { font-size:15px; letter-spacing:.025em; }
  body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar__by { display:none; }
  body.nl-harmony-module.nl-module-lecture-notes .notalix-global-topbar__module {
    min-height:18px;
    padding:3px 5px;
    font-size:6.9px;
    letter-spacing:.04em;
  }
}

/* ===== Portrait : réglages compacts, exercice vertical ===== */
@media (orientation:portrait) and (max-width:640px) {
  body.nl-harmony-module.nl-module-lecture-notes .instrument-card {
    width:100% !important;
    margin:5px auto 10px !important;
    padding:10px 9px 14px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .instrument-card h2 {
    margin:5px 0 3px !important;
    font-size:clamp(1.12rem,5.7vw,1.42rem) !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings,
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings.key-exercise-settings {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:4px !important;
    width:100% !important;
    max-width:390px !important;
    padding:4px !important;
    margin:4px auto 2px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice,
  body.nl-harmony-module.nl-module-lecture-notes .fingering-mode,
  body.nl-harmony-module.nl-module-lecture-notes .note-color-mode {
    display:grid !important;
    grid-template-columns:62px minmax(0,1fr);
    min-height:40px;
    gap:4px !important;
    padding:0 !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice > span,
  body.nl-harmony-module.nl-module-lecture-notes .settings-label {
    width:auto;
    margin:0;
    text-align:right;
    font-size:.72rem;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice {
    grid-template-columns:62px repeat(2,minmax(0,1fr));
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice button {
    width:100%;
    min-height:38px;
    padding:5px 5px;
    font-size:.72rem;
  }
  body.nl-harmony-module.nl-module-lecture-notes .fingering-options { width:100%; }
  body.nl-harmony-module.nl-module-lecture-notes .fingering-options span {
    min-height:36px !important;
    padding:3px 4px !important;
    font-size:.68rem !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz .music-panel,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .music-panel {
    width:100% !important;
    max-width:300px !important;
    height:205px !important;
    margin:7px auto 10px !important;
    padding:7px 9px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz .instrument-note,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .instrument-note {
    width:100% !important;
    height:172px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .instrument-answers,
  body.nl-harmony-module.nl-module-lecture-notes #key-answers {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    width:100% !important;
    max-width:370px !important;
    gap:7px !important;
    margin:7px auto 9px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .instrument-answers button,
  body.nl-harmony-module.nl-module-lecture-notes #key-answers button { min-height:48px !important; padding:9px 5px !important; }
  body.nl-harmony-module.nl-module-lecture-notes .instrument-hint {
    position:static !important;
    transform:none !important;
    width:100% !important;
    max-width:330px !important;
    max-width:100% !important;
    margin:7px auto 0 !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero {
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-areas:"copy" "title" "action" !important;
    gap:4px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__action { justify-self:stretch !important; width:100%; margin-top:6px; }
  body.nl-harmony-module.nl-module-lecture-notes .string-instrument-hero__action > button { width:100% !important; }
  body.nl-harmony-module.nl-module-lecture-notes .levels-row { grid-template-columns:1fr !important; }

  body.nl-harmony-module.nl-module-lecture-notes #quiz,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz {
    width:100% !important;
    max-width:100% !important;
    overflow-x:clip !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz > *,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz > * {
    min-width:0 !important;
    max-width:100% !important;
  }
}

@media (orientation:portrait) and (max-width:370px) {
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice,
  body.nl-harmony-module.nl-module-lecture-notes .fingering-mode,
  body.nl-harmony-module.nl-module-lecture-notes .note-color-mode {
    grid-template-columns:1fr !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice > span { grid-column:1 / -1; text-align:center; }
  body.nl-harmony-module.nl-module-lecture-notes .settings-label { text-align:center; }
}

/* ===== Paysage : barre de réglages très basse + note à gauche / réponses à droite ===== */
@media (orientation:landscape) and (min-width:560px) {
  html,
  body.nl-harmony-module.nl-module-lecture-notes {
    min-height:100%;
    height:auto !important;
    overflow-x:hidden !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .instrument-card {
    width:min(1080px,calc(100% - 12px)) !important;
    margin:4px auto 7px !important;
    padding:6px 12px 9px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .instrument-card h2 {
    margin:1px 0 2px !important;
    font-size:clamp(1.06rem,2.1vw,1.3rem) !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .pedagogy { margin:1px auto 2px !important; font-size:.72rem !important; }
  body.nl-harmony-module.nl-module-lecture-notes .sound-summary { display:none !important; }
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings {
    grid-template-columns:auto minmax(250px,1fr) minmax(250px,1fr) !important;
    gap:4px !important;
    width:min(920px,100%) !important;
    min-height:42px;
    margin:2px auto !important;
    padding:3px 4px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings.key-exercise-settings {
    grid-template-columns:minmax(0,500px) !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice,
  body.nl-harmony-module.nl-module-lecture-notes .fingering-mode,
  body.nl-harmony-module.nl-module-lecture-notes .note-color-mode {
    min-height:34px;
    gap:3px !important;
    padding:0 2px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice button { min-height:34px; padding:4px 7px; font-size:.7rem; }
  body.nl-harmony-module.nl-module-lecture-notes .fingering-options { padding:2px !important; gap:2px !important; }
  body.nl-harmony-module.nl-module-lecture-notes .fingering-options span { min-height:30px !important; padding:3px 5px !important; font-size:.67rem !important; }
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings-help { margin:0 !important; line-height:1; }
  body.nl-harmony-module.nl-module-lecture-notes .note-color-help,
  body.nl-harmony-module.nl-module-lecture-notes .fingering-notice { margin:0 2px !important; padding:2px 7px !important; font-size:.64rem !important; }

  body.nl-harmony-module.nl-module-lecture-notes #quiz:not([hidden]) {
    display:grid !important;
    grid-template-columns:minmax(220px,.88fr) minmax(0,1.12fr);
    grid-template-areas:
      "music answers"
      "music keyboard"
      "music feedback"
      "music progress"
      "music score";
    column-gap:18px;
    row-gap:3px;
    align-items:center;
    width:min(980px,100%);
    margin:4px auto 0;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz #music-panel {
    grid-area:music;
    align-self:center;
    width:min(100%,320px) !important;
    height:clamp(195px,38vh,245px) !important;
    margin:0 auto !important;
    padding:7px 9px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz .instrument-note {
    width:100% !important;
    height:calc(clamp(195px,38vh,245px) - 28px) !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz #answers {
    grid-area:answers;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:7px !important;
    width:100% !important;
    margin:0 !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz #answers button {
    min-height:46px !important;
    padding:6px 6px !important;
    font-size:.94rem !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz .keyboard-hint { grid-area:keyboard; margin:0 !important; font-size:.66rem !important; line-height:1.1; }
  body.nl-harmony-module.nl-module-lecture-notes #quiz #feedback { grid-area:feedback; margin:0 !important; min-height:18px; font-size:.78rem; }
  body.nl-harmony-module.nl-module-lecture-notes #quiz .instrument-progress { grid-area:progress; width:100%; margin:0 !important; }
  body.nl-harmony-module.nl-module-lecture-notes #quiz #score { grid-area:score; margin:0 !important; font-size:1.05rem !important; }

  body.nl-harmony-module.nl-module-lecture-notes #key-quiz:not([hidden]) {
    display:grid !important;
    grid-template-columns:minmax(220px,.88fr) minmax(0,1.12fr);
    grid-template-areas:
      "hud hud"
      "badge answers"
      "music answers"
      "music keyboard"
      "music feedback"
      "music progress"
      "music score";
    column-gap:18px;
    row-gap:3px;
    align-items:center;
    width:min(980px,100%);
    margin:4px auto 0;
  }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz #challenge-hud { grid-area:hud; margin:0 !important; }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz #clef-badge { grid-area:badge; margin:0 auto !important; }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .music-panel {
    grid-area:music;
    width:min(100%,320px) !important;
    height:clamp(195px,38vh,245px) !important;
    margin:0 auto !important;
    padding:7px 9px !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .instrument-note {
    width:100% !important;
    height:calc(clamp(195px,38vh,245px) - 28px) !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz #key-answers {
    grid-area:answers;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:7px !important;
    width:100% !important;
    margin:0 !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz #key-answers button {
    min-height:46px !important;
    padding:6px 6px !important;
    font-size:.94rem !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .keyboard-hint { grid-area:keyboard; margin:0 !important; font-size:.66rem !important; line-height:1.1; }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz #key-feedback { grid-area:feedback; margin:0 !important; min-height:18px; font-size:.78rem; }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .instrument-progress { grid-area:progress; width:100%; margin:0 !important; }
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz #key-score { grid-area:score; margin:0 !important; font-size:1.05rem !important; }
}

/* Paysages bas : on protège les 48 px tactiles et on retire seulement le secondaire. */
@media (orientation:landscape) and (max-height:500px) and (min-width:560px) {
  body.nl-harmony-module.nl-module-lecture-notes .instrument-card { padding-block:4px 7px !important; }
  body.nl-harmony-module.nl-module-lecture-notes .pedagogy { display:none !important; }
  body.nl-harmony-module.nl-module-lecture-notes .exercise-settings { min-height:38px; }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice > span,
  body.nl-harmony-module.nl-module-lecture-notes .settings-label { font-size:.66rem; }
  body.nl-harmony-module.nl-module-lecture-notes #quiz #music-panel,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .music-panel {
    height:190px !important;
    width:min(100%,325px) !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes #quiz .instrument-note,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .instrument-note { height:162px !important; }
  body.nl-harmony-module.nl-module-lecture-notes #quiz .keyboard-hint,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz .keyboard-hint { display:none !important; }
  body.nl-harmony-module.nl-module-lecture-notes #quiz #answers button,
  body.nl-harmony-module.nl-module-lecture-notes #key-quiz #key-answers button { min-height:48px !important; }
}


@media (max-width:360px) and (orientation:portrait) {
  body.nl-harmony-module.nl-module-lecture-notes .instrument-card h2 {
    font-size:clamp(1.04rem, 5.2vw, 1.28rem) !important;
    line-height:1.12 !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .pedagogy {
    font-size:.68rem !important;
    line-height:1.22 !important;
  }
  body.nl-harmony-module.nl-module-lecture-notes .live-sound-choice button,
  body.nl-harmony-module.nl-module-lecture-notes .fingering-options span {
    font-size:.66rem !important;
  }
}
