/* ============================================================
   HymnTutor — “Sing With Understanding”
   Visual language: aged hymnal paper, burgundy leather, gilt edges.
   ============================================================ */

:root {
  --paper: #faf6ec;
  --paper-deep: #f3ecdc;
  --paper-card: #fffdf6;
  --ink: #2b2620;
  --ink-soft: #5d5548;
  --ink-faint: #8a8172;
  --burgundy: #6e2639;
  --burgundy-deep: #521b2a;
  --burgundy-bright: #8e3349;
  --gold: #b8912f;
  --gold-soft: #d9c58a;
  --green: #3e5c46;
  /* The four voice-part colors — single source of truth. Used for the notes
     and chips in the Practice Room, the colored example notes in the lessons,
     and the voice-card borders. practice.js and curriculum.js read these off
     :root at runtime, so change a part's color here and it changes everywhere. */
  --voice-soprano: #b8912f;
  --voice-alto: #8e3349;
  --voice-tenor: #2c9949;
  --voice-bass: #3971a8;
  --line: #e2d8c2;
  --shadow: 0 2px 6px rgba(60, 45, 20, 0.08), 0 12px 32px rgba(60, 45, 20, 0.08);
  --shadow-lift: 0 4px 10px rgba(60, 45, 20, 0.12), 0 18px 44px rgba(60, 45, 20, 0.14);
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --music: "Noto Music", "Segoe UI Symbol", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(184, 145, 47, 0.07), transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(110, 38, 57, 0.05), transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(180deg, var(--burgundy-deep), var(--burgundy));
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(40, 10, 20, 0.25);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  font-family: var(--music);
  font-size: 26px;
  color: var(--gold-soft);
  line-height: 1;
}

.brand-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.5px;
  color: #f7efdd;
}

.brand-accent { color: var(--gold-soft); }

.header-right { display: flex; align-items: center; gap: 12px; }

.instrument-pick {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(230, 205, 150, 0.35);
  padding: 4px 10px 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.instrument-pick:hover { background: rgba(255, 255, 255, 0.18); }
.instrument-pick span { font-size: 15px; line-height: 1; }
.instrument-pick select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: #ecdfc6;
  font-family: var(--sans);
  font-size: 13.5px;
  cursor: pointer;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d9c58a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}
.instrument-pick select:focus { outline: none; }
.instrument-pick select option { color: #2b2620; background: #fffdf6; }

.user-chip {
  font-size: 13.5px;
  color: #ecdfc6;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(230, 205, 150, 0.35);
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.18); }

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

.app-main {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

.loading {
  text-align: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-faint);
  padding: 90px 0;
}

.site-footer {
  text-align: center;
  padding: 28px 20px 36px;
  color: var(--ink-faint);
  font-size: 14px;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}
.site-footer p { margin: 4px 0; }
.footer-verse { font-family: var(--serif); font-style: italic; font-size: 15px; }

/* ---------- Dashboard hero ---------- */

.hero {
  text-align: center;
  margin: 8px auto 44px;
  max-width: 700px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--burgundy-deep);
  line-height: 1.15;
}

.hero .hero-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0;
  color: var(--gold);
}
.hero .hero-rule::before,
.hero .hero-rule::after {
  content: "";
  height: 1px;
  width: 90px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.hero .hero-rule::after {
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}
.hero .hero-rule span { font-family: var(--music); font-size: 20px; }

.hero p {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0;
}

.hero .continue-btn { margin-top: 24px; }

/* ---------- Module cards ---------- */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}

.module-card:not(.locked):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.module-card.locked {
  opacity: 0.62;
  cursor: default;
  background: var(--paper-deep);
}
.module-card.locked::before { background: var(--line); }

.module-num {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.module-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--burgundy-deep);
  line-height: 1.2;
}

.module-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
  flex: 1;
}

.module-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

.locked-tag {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* progress ring */
.ring { width: 44px; height: 44px; }
.ring .ring-bg { stroke: var(--line); }
.ring .ring-fg { stroke: var(--green); transition: stroke-dashoffset 0.5s ease; }
.ring text {
  font: 700 11px var(--sans);
  fill: var(--ink-soft);
}
.ring.done .ring-fg { stroke: var(--gold); }
.ring.done text { fill: var(--gold); }

/* ---------- Module page ---------- */

.crumbs {
  font-size: 14px;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.crumbs a { color: var(--burgundy); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.module-header { margin-bottom: 28px; }
.module-header .module-num { font-size: 15px; }
.module-header h1 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  margin: 4px 0 8px;
  color: var(--burgundy-deep);
}
.module-header p { color: var(--ink-soft); font-size: 18px; margin: 0; max-width: 640px; }

.lesson-list { display: flex; flex-direction: column; gap: 12px; }

.lesson-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lesson-row:hover { transform: translateX(4px); box-shadow: var(--shadow-lift); }

.lesson-status {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 15px;
  border: 2px solid var(--line);
  color: var(--ink-faint);
  background: #fff;
}
.lesson-status.completed { border-color: var(--green); background: var(--green); color: #fff; }
.lesson-status.started { border-color: var(--gold); color: var(--gold); }

.lesson-row-body { flex: 1; }
.lesson-row-body h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
}
.lesson-row-body .lesson-kind {
  font-size: 12.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lesson-row .lesson-score { font-size: 13.5px; color: var(--green); font-weight: 600; }
.lesson-row .go { color: var(--gold); font-size: 20px; }

/* ---------- Lesson page ---------- */

.lesson-page { max-width: 780px; margin: 0 auto; }

.lesson-header { margin-bottom: 8px; }
.lesson-header .lesson-kind {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold);
  font-weight: 700;
}
.lesson-header h1 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--burgundy-deep);
  margin: 4px 0 20px;
}

.lesson-content {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 40px 38px;
}

.lesson-content h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--burgundy);
  margin: 34px 0 10px;
}
.lesson-content h2:first-child { margin-top: 0; }

.lesson-content p { margin: 12px 0; }
.lesson-content strong { color: var(--burgundy-deep); }
.lesson-content ul { padding-left: 24px; }
.lesson-content li { margin: 6px 0; }

.callout {
  display: flex;
  gap: 14px;
  background: linear-gradient(90deg, rgba(184, 145, 47, 0.10), rgba(184, 145, 47, 0.04));
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15.5px;
}
.callout .callout-icon { font-size: 20px; line-height: 1.4; }

.callout.hymnal {
  background: linear-gradient(90deg, rgba(110, 38, 57, 0.08), rgba(110, 38, 57, 0.03));
  border-left-color: var(--burgundy);
}

.figure {
  margin: 22px 0;
  text-align: center;
}
.figure svg { max-width: 100%; height: auto; }
.figure figcaption {
  font-size: 14px;
  color: var(--ink-faint);
  font-style: italic;
  margin-top: 6px;
}

/* clickable notes glow */
.note-hit { cursor: pointer; }
.note-hit:hover .notehead { fill: var(--burgundy-bright); }
.note-hit:hover .stem, .note-hit:hover .noteflag { stroke: var(--burgundy-bright); }
.note-playing .notehead { fill: var(--gold) !important; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  padding: 11px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--burgundy-bright), var(--burgundy));
  color: #fdf7ea;
  box-shadow: 0 3px 10px rgba(110, 38, 57, 0.35);
}
.btn-primary:hover { background: linear-gradient(180deg, #a03d55, var(--burgundy-bright)); }

.btn-secondary {
  background: transparent;
  color: var(--burgundy);
  border: 1.5px solid var(--burgundy);
}
.btn-secondary:hover { background: rgba(110, 38, 57, 0.06); }

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--burgundy); }

.btn:disabled { opacity: 0.45; cursor: default; }

.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  gap: 12px;
}

/* ---------- Quiz ---------- */

.quiz-progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  margin-bottom: 26px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 3px;
  transition: width 0.35s ease;
}

.quiz-question h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0 0 18px;
  color: var(--ink);
}

.quiz-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.quiz-choice {
  text-align: left;
  font-size: 16px;
  font-family: var(--sans);
  padding: 13px 18px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.quiz-choice:hover:not(:disabled) { border-color: var(--gold); background: #fffcf2; }
.quiz-choice.correct { border-color: var(--green); background: #eef5ef; color: var(--green); font-weight: 600; }
.quiz-choice.wrong { border-color: var(--burgundy-bright); background: #f9eef0; color: var(--burgundy); }
.quiz-choice:disabled { cursor: default; }

.quiz-feedback {
  margin-top: 16px;
  padding: 13px 17px;
  border-radius: 10px;
  font-size: 15px;
}
.quiz-feedback.good { background: #eef5ef; border: 1px solid #c6dcc9; color: var(--green); }
.quiz-feedback.bad { background: #f9eef0; border: 1px solid #e5c3ca; color: var(--burgundy); }

.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result .score-big {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 700;
  color: var(--burgundy-deep);
  line-height: 1;
}
.quiz-result .score-label { color: var(--ink-soft); margin: 8px 0 20px; }
.quiz-result .pass-badge {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.quiz-result .pass-badge.pass { background: #eef5ef; color: var(--green); border: 1px solid #c6dcc9; }
.quiz-result .pass-badge.fail { background: #f9eef0; color: var(--burgundy); border: 1px solid #e5c3ca; }

/* ---------- Drill ---------- */

.drill-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin: 4px 0 18px;
}
.drill-stat { text-align: center; }
.drill-stat .stat-num {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  color: var(--burgundy-deep);
  line-height: 1.1;
}
.drill-stat .stat-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.drill-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.drill-note-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--burgundy);
  background: #fff;
  border: 2px solid var(--gold-soft);
  cursor: pointer;
  transition: all 0.12s ease;
}
.drill-note-btn:hover:not(:disabled) { background: var(--gold-soft); color: var(--burgundy-deep); transform: translateY(-2px); }
.drill-note-btn.correct { background: var(--green); border-color: var(--green); color: #fff; }
.drill-note-btn.wrong { background: var(--burgundy-bright); border-color: var(--burgundy-bright); color: #fff; }
.drill-note-btn:disabled { cursor: default; }
.drill-note-btn.word {
  width: auto;
  height: 52px;
  padding: 0 26px;
  border-radius: 26px;
  font-size: 19px;
}

.drill-feedback { text-align: center; min-height: 28px; font-size: 16px; margin-top: 14px; font-weight: 600; }
.drill-feedback.good { color: var(--green); }
.drill-feedback.bad { color: var(--burgundy); }

/* ---------- Hymn page anatomy hotspots ---------- */

.hotspot { cursor: pointer; }
.hotspot .hotspot-ring {
  fill: rgba(184, 145, 47, 0.14);
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  transition: fill 0.15s ease;
}
.hotspot:hover .hotspot-ring { fill: rgba(184, 145, 47, 0.30); }
.hotspot.active .hotspot-ring { fill: rgba(110, 38, 57, 0.18); stroke: var(--burgundy); stroke-dasharray: none; }
.hotspot .hotspot-num {
  font: 700 12px var(--sans);
  fill: #fff;
}
.hotspot .hotspot-dot { fill: var(--gold); }
.hotspot.active .hotspot-dot { fill: var(--burgundy); }
.hotspot.visited .hotspot-dot { fill: var(--green); }

.anatomy-panel {
  margin-top: 14px;
  background: #fffdf4;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  padding: 16px 20px;
  min-height: 84px;
  text-align: left;
}
.anatomy-panel h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--burgundy-deep);
}
.anatomy-panel p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.anatomy-panel .hint { color: var(--ink-faint); font-style: italic; }

/* ---------- Voice part cards ---------- */

.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.voice-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.voice-card.soprano { border-top-color: var(--voice-soprano); }
.voice-card.alto { border-top-color: var(--voice-alto); }
.voice-card.tenor { border-top-color: var(--voice-tenor); }
.voice-card.bass { border-top-color: var(--voice-bass); }
.voice-card h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; color: var(--ink); }
.voice-card .voice-who { font-size: 13px; color: var(--ink-faint); }
.voice-card .voice-where { font-size: 13.5px; margin-top: 8px; color: var(--ink-soft); }

/* ---------- Practice Room ---------- */

.hymn-sheet {
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px 26px;
}
.hymn-sheet.embedded {
  padding: 20px 22px 16px;
  margin: 10px 0;
  box-shadow: none;
}

.hymn-head { position: relative; margin-bottom: 6px; }
.hymn-number {
  position: absolute;
  left: 0; top: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
}
.hymn-titles h1 {
  text-align: center;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 60px 4px;
}
.hymn-credits {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 11.5px;
  letter-spacing: 0.6px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.hymn-credit-right { text-align: right; }

.practice-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  margin: 14px 0 10px;
  position: sticky;
  top: 66px;
  z-index: 20;
}

.part-chips { display: flex; gap: 6px; }
.part-chip {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid var(--part-color);
  color: var(--part-color);
  background: #fff;
  cursor: pointer;
  transition: all 0.12s ease;
}
.part-chip.loud { background: var(--part-color); color: #fff; }
.part-chip.mute { opacity: 0.4; text-decoration: line-through; }

.tempo-ctl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.tempo-ctl input[type="range"] { width: 110px; accent-color: var(--burgundy); }
.toolbar-check { font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.toolbar-check input { accent-color: var(--burgundy); }

.hymn-music { margin-top: 8px; }
.hymn-system { display: block; margin: 2px 0; }

.col-band { fill: transparent; cursor: pointer; transition: fill 0.12s ease; }
.col-band:hover { fill: rgba(184, 145, 47, 0.14); }
.col-band.active { fill: rgba(184, 145, 47, 0.22); }

.hymn-copyright {
  text-align: center;
  font-size: 11px;
  font-style: italic;
  color: var(--ink-faint);
  margin: 10px 0 0;
}

.practice-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(120deg, var(--burgundy-deep), var(--burgundy) 60%, #7e3046);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 22px 28px;
  margin: 0 0 30px;
  color: #f3e9d4;
  text-decoration: none;
  border: 1px solid rgba(230, 205, 150, 0.35);
  transition: transform 0.15s ease;
}
.practice-banner:hover { transform: translateY(-2px); }
.practice-banner .pb-icon { font-family: var(--music); font-size: 38px; color: var(--gold-soft); }
.practice-banner h3 { margin: 0 0 2px; font-family: var(--serif); font-size: 24px; color: #fbf3e1; }
.practice-banner p { margin: 0; font-size: 14.5px; color: #e3d3b4; }
.practice-banner .go { margin-left: auto; font-size: 24px; color: var(--gold-soft); }

@media (max-width: 640px) {
  .hymn-sheet { padding: 18px 12px; }
  .practice-toolbar { top: 58px; }
}

/* ---------- Dev user switcher modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(35, 25, 15, 0.5);
  display: grid; place-items: center;
  z-index: 100;
}
.modal {
  background: var(--paper-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 28px 32px;
  width: min(430px, 92vw);
}
.modal h2 { font-family: var(--serif); margin: 0 0 4px; color: var(--burgundy-deep); }
.modal p { font-size: 14.5px; color: var(--ink-soft); margin: 4px 0 16px; }
.modal input[type="email"], .modal input[type="text"] {
  width: 100%;
  font-size: 16px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  font-family: var(--sans);
  background: #fff;
}
.modal input:focus { outline: none; border-color: var(--gold); }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- Misc ---------- */

.play-hint {
  font-size: 13.5px;
  color: var(--ink-faint);
  font-style: italic;
  text-align: center;
  margin-top: -8px;
}

.divider-notes {
  text-align: center;
  color: var(--gold);
  font-family: var(--music);
  font-size: 18px;
  letter-spacing: 12px;
  margin: 30px 0 6px;
}

@media (max-width: 640px) {
  .app-main { padding: 22px 14px 56px; }
  .lesson-content { padding: 24px 20px 28px; }
  .hero h1 { font-size: 34px; }
  .module-header h1 { font-size: 30px; }
  .site-header { padding: 12px 16px; }
  .brand-text { font-size: 22px; }
}
