* {
  box-sizing: border-box;
}

:root {
  --bg: #f4f1eb;
  --paper: #fffdfa;
  --ink: #171717;
  --muted: rgba(23, 23, 23, 0.62);
  --line: rgba(23, 23, 23, 0.14);
  --accent: #1d4ed8;
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #15803d;
}

body {
  margin: 0;
  font-family: Inter, "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.9), transparent 32%), var(--bg);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.checker-header,
.checker-panel,
.result-section {
  background: rgba(255, 253, 250, 0.86);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.07);
}

.checker-header {
  padding: 28px;
  margin-bottom: 18px;
}

.top-controls,
.brand-row,
.score-tools,
.playback-tools,
.exercise-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.top-controls {
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 14px;
}

.lead {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.checker-panel,
.result-section {
  padding: 22px;
  margin-bottom: 18px;
}

.hidden-input {
  display: none;
}

select,
input,
.button {
  font: inherit;
}

select,
input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: white;
}

.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.button.primary {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.button.small {
  font-size: 0.92rem;
}

.exercise-tools,
.score-tools,
.playback-tools {
  margin-bottom: 16px;
}

.exercise-description,
.playback-hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.score-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  overflow: hidden;
}

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

.score-head h2,
.current-notes h2,
.result-section h2 {
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}

.score-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.score-status {
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.score-editor {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
  outline: none;
}

.staff-line,
.ledger-line {
  stroke: #171717;
  stroke-width: 1.1;
}

.measure-line {
  stroke: rgba(0,0,0,0.16);
  stroke-width: 1;
}

.playhead {
  stroke: var(--danger);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.slot-marker,
.downbeat-marker {
  fill: rgba(0,0,0,0.22);
}

.voice-label,
.note-label {
  fill: rgba(0,0,0,0.62);
  font-size: 13px;
}

.clef-symbol {
  font-family: "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  fill: rgba(0,0,0,0.74);
  dominant-baseline: middle;
  pointer-events: none;
}

.clef-symbol.treble {
  font-size: 58px;
}

.clef-symbol.bass {
  font-size: 48px;
}

.note-head {
  fill: #fff;
  stroke: #171717;
  stroke-width: 1.9;
}

.note-head.cantus {
  stroke: #6b7280;
}

.note-head.selected,
.note-stem.selected,
.note-label.selected {
  stroke: var(--accent);
  fill: var(--accent);
}

.note-head.playing,
.note-stem.playing,
.note-label.playing {
  stroke: var(--danger);
  fill: var(--danger);
}

.note-head.error,
.note-stem.error,
.note-label.error {
  stroke: var(--danger);
  fill: var(--danger);
}

.note-stem {
  stroke: #171717;
  stroke-width: 1.5;
}

.note-stem.cantus {
  stroke: #6b7280;
}

.accidental {
  font-size: 20px;
  fill: #171717;
  dominant-baseline: middle;
}

.issue-ring {
  fill: none;
  stroke: var(--danger);
  stroke-width: 2;
  opacity: 0.85;
}

.current-notes {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
}

.current-notes p {
  margin: 6px 0;
  word-break: break-word;
}

.summary-box {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.result-item {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
  line-height: 1.6;
}

.result-item.error {
  border-color: rgba(220, 38, 38, 0.3);
}

.result-item.warn {
  border-color: rgba(217, 119, 6, 0.35);
}

.result-item.ok {
  border-color: rgba(21, 128, 61, 0.28);
}

.result-label {
  display: inline-block;
  min-width: 48px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 18px, 1120px);
    padding-top: 12px;
  }

  .checker-header,
  .checker-panel,
  .result-section {
    border-radius: 18px;
    padding: 16px;
  }

  .score-head {
    display: block;
  }

  .score-status {
    display: inline-block;
    margin-top: 10px;
  }
}


/* Module 1 Senzoku-style fixed SVG notation */
.score-editor {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.score-shell,
.score-card,
.score-panel,
.editor-panel {
  overflow-x: auto;
  max-width: 100%;
}

.senzoku-staff-line {
  stroke: rgba(20, 20, 20, 0.62);
  stroke-width: 1.05;
}

.senzoku-measure-line {
  stroke: rgba(20, 20, 20, 0.18);
  stroke-width: 1;
}

.senzoku-measure-line.strong {
  stroke: rgba(20, 20, 20, 0.32);
  stroke-width: 1.25;
}

.senzoku-input-highlight {
  fill: rgba(255, 79, 139, 0.07);
  pointer-events: none;
}

.senzoku-cursor-line {
  stroke: #ff4f8b;
  stroke-width: 3.2;
  stroke-linecap: round;
  pointer-events: none;
}

.senzoku-cursor-triangle {
  fill: #ff4f8b;
  pointer-events: none;
}

.senzoku-whole-note {
  fill: #ffffff;
  stroke: #171717;
  stroke-width: 2;
}

.senzoku-whole-note.cantus {
  stroke: rgba(20, 20, 20, 0.55);
}

.senzoku-whole-note.selected {
  stroke: #ff4f8b;
  stroke-width: 2.4;
}

.senzoku-whole-note.playing {
  stroke: var(--danger);
  fill: rgba(239, 68, 68, 0.08);
}

.senzoku-whole-note.error {
  stroke: var(--danger);
}

.senzoku-selected-ring {
  fill: none;
  stroke: #ff4f8b;
  stroke-width: 1.6;
  opacity: 0.65;
}

.senzoku-accidental {
  font-size: 20px;
}

.senzoku-accidental.selected {
  fill: #ff4f8b;
}

.senzoku-label {
  font-size: 12px;
  letter-spacing: 0.02em;
  fill: rgba(20, 20, 20, 0.55);
}


/* Module 1 music-font noteheads.
   Uses local notation fonts when available. No font files are bundled. */
.music-font-notehead,
.music-font-accidental,
.music-font-clef {
  font-family:
    "Opus Std",
    "Opus",
    "Opus Text",
    "Bravura",
    "Petaluma",
    "Noto Music",
    "Segoe UI Symbol",
    "Apple Symbols",
    serif;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  font-variant-ligatures: none;
}

.music-font-notehead {
  font-size: 34px;
  fill: #171717;
  stroke: none;
}

.music-font-notehead.cantus {
  fill: rgba(20, 20, 20, 0.62);
}

.music-font-notehead.selected {
  fill: #ff4f8b;
}

.music-font-notehead.playing {
  fill: var(--danger);
}

.music-font-notehead.error {
  fill: var(--danger);
}

.music-font-accidental {
  font-size: 25px;
  fill: #171717;
}

.music-font-accidental.selected {
  fill: #ff4f8b;
}

.music-font-accidental.playing,
.music-font-accidental.error {
  fill: var(--danger);
}

.music-font-clef {
  fill: rgba(20, 20, 20, 0.72);
}

.music-font-clef.treble {
  font-size: 56px;
}

.music-font-clef.bass {
  font-size: 47px;
}

.senzoku-whole-note {
  stroke: none;
}


/* Module 1 PNG notation mode */
.score-editor {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.score-shell,
.score-card,
.score-panel,
.editor-panel {
  overflow-x: auto;
  max-width: 100%;
}

.png-notation {
  pointer-events: none;
  user-select: none;
}

.png-staff {
  opacity: 0.86;
}

.png-clef {
  opacity: 0.92;
}

.png-notehead {
  opacity: 1;
}

.png-notehead.cantus {
  opacity: 0.68;
}

.png-notehead.selected {
  filter:
    invert(41%)
    sepia(84%)
    saturate(2534%)
    hue-rotate(313deg)
    brightness(103%)
    contrast(102%);
}

.png-notehead.playing,
.png-notehead.error,
.png-accidental.playing,
.png-accidental.error {
  filter:
    invert(31%)
    sepia(88%)
    saturate(2604%)
    hue-rotate(340deg)
    brightness(95%)
    contrast(92%);
}

.png-accidental {
  opacity: 0.95;
}

.png-accidental.selected {
  filter:
    invert(41%)
    sepia(84%)
    saturate(2534%)
    hue-rotate(313deg)
    brightness(103%)
    contrast(102%);
}

.senzoku-input-highlight {
  fill: rgba(255, 79, 139, 0.07);
  pointer-events: none;
}

.senzoku-cursor-line {
  stroke: #ff4f8b;
  stroke-width: 3.2;
  stroke-linecap: round;
  pointer-events: none;
}

.senzoku-cursor-triangle {
  fill: #ff4f8b;
  pointer-events: none;
}

.senzoku-measure-line {
  stroke: rgba(20, 20, 20, 0.18);
  stroke-width: 1;
}

.senzoku-measure-line.strong {
  stroke: rgba(20, 20, 20, 0.32);
  stroke-width: 1.25;
}

.senzoku-selected-ring {
  fill: none;
  stroke: #ff4f8b;
  stroke-width: 1.6;
  opacity: 0.65;
}

.senzoku-label {
  font-size: 12px;
  letter-spacing: 0.02em;
  fill: rgba(20, 20, 20, 0.55);
}


/* Bigger staff tuning for Module 1 PNG notation */
.png-staff {
  opacity: 0.9;
}

.png-clef {
  opacity: 0.94;
}

.note-label {
  font-size: 13px;
}


/* Wider horizontal spacing for Module 1 PNG notation */
.score-editor {
  min-width: 1480px;
}

.score-shell,
.score-card,
.score-panel,
.editor-panel {
  overflow-x: auto;
}


/* Staff stretch fix:
   Five-line PNG uses preserveAspectRatio='none' in JS so it fills the full measure width. */
.png-staff {
  opacity: 0.92;
}


/* DAW-style voice mute buttons for Module 1 */
.voice-mute-button {
  cursor: pointer;
  pointer-events: auto;
}

.voice-mute-button-bg {
  fill: rgba(255,255,255,0.86);
  stroke: rgba(20,20,20,0.25);
  stroke-width: 1;
}

.voice-mute-button-label {
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: rgba(20,20,20,0.72);
  pointer-events: none;
  user-select: none;
}

.voice-mute-button:hover .voice-mute-button-bg {
  stroke: rgba(255,79,139,0.8);
  fill: rgba(255,79,139,0.08);
}

.voice-mute-button.muted .voice-mute-button-bg {
  fill: #ff4f8b;
  stroke: #ff4f8b;
}

.voice-mute-button.muted .voice-mute-button-label {
  fill: #ffffff;
}

.png-notehead.muted-voice,
.png-accidental.muted-voice {
  opacity: 0.28;
}

.voice-mute-button.muted + .voice-label {
  opacity: 0.4;
}


/* 2026-06-01 bass-up / mute-visible / score-scroll patch */
.score-box {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.score-editor {
  width: max(100%, 1480px) !important;
  min-width: 1480px !important;
  max-width: none !important;
}

.voice-mute-button {
  display: block;
  visibility: visible;
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

.voice-mute-button-bg {
  fill: rgba(255,255,255,0.94);
  stroke: rgba(20,20,20,0.38);
  stroke-width: 1.2;
}

.voice-mute-button-label {
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: rgba(20,20,20,0.76);
  pointer-events: none;
  user-select: none;
}

.voice-mute-button.muted .voice-mute-button-bg {
  fill: #ff4f8b;
  stroke: #ff4f8b;
}

.voice-mute-button.muted .voice-mute-button-label {
  fill: #fff;
}


/* 2026-06-01 note small / mute visible / toolbar alignment patch */
.voice-mute-button {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer;
}

.voice-mute-button-bg {
  fill: rgba(255,255,255,0.98);
  stroke: rgba(20,20,20,0.48);
  stroke-width: 1.35;
}

.voice-mute-button-label {
  font-size: 14px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: rgba(20,20,20,0.82);
  pointer-events: none;
  user-select: none;
}

.voice-mute-button.muted .voice-mute-button-bg {
  fill: #ff4f8b;
  stroke: #ff4f8b;
}

.voice-mute-button.muted .voice-mute-button-label {
  fill: #fff;
}

/* Keep exercise buttons in one row where space allows. */
.exercise-controls,
.controls-row,
.control-row,
.toolbar,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.score-box {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.score-editor {
  width: max(100%, 1480px) !important;
  min-width: 1480px !important;
  max-width: none !important;
}


/* 2026-06-01 note smaller / duplicate example removed / mute button visibility */
.voice-mute-button {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer;
}

.voice-mute-button-bg {
  fill: rgba(255,255,255,0.98);
  stroke: rgba(20,20,20,0.62);
  stroke-width: 1.45;
}

.voice-mute-button-label {
  font-size: 15px;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: rgba(20,20,20,0.86);
  pointer-events: none;
  user-select: none;
}

.voice-mute-button:hover .voice-mute-button-bg {
  stroke: #ff4f8b;
  fill: rgba(255,79,139,0.08);
}

.voice-mute-button.muted .voice-mute-button-bg {
  fill: #ff4f8b;
  stroke: #ff4f8b;
}

.voice-mute-button.muted .voice-mute-button-label {
  fill: #ffffff;
}


/* 2026-06-01 keep exercise selector / remove level selector / MIDI right */
.module1-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 12px 0 12px;
}

.module1-toolbar-left,
.module1-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.module1-toolbar-right {
  margin-left: auto;
}

.midi-export-button {
  margin-left: 32px;
}

@media (max-width: 760px) {
  .module1-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .module1-toolbar-right {
    margin-left: 0;
    justify-content: flex-start;
  }

  .midi-export-button {
    margin-left: 0;
  }
}


/* 2026-06-01 repaired removal:
   Keep exercise selector, remove level selector, nudge treble noteheads down slightly. */


/* 2026-06-01 robust exercise selector and visible HTML mute buttons */
.module1-exercise-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 8px;
}

.exercise-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.module1-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 10px 0 12px;
}

.module1-toolbar-left,
.module1-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.module1-toolbar-right {
  margin-left: auto;
}

.midi-export-button {
  margin-left: 32px;
}

.html-voice-mute-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}

.html-mute-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(20,20,20,0.25);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: rgba(20,20,20,0.82);
  cursor: pointer;
  font: inherit;
}

.html-mute-button .mute-label {
  font-size: 12px;
}

.html-mute-button .mute-key {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(20,20,20,0.25);
  font-size: 13px;
  font-weight: 800;
}

.html-mute-button.muted {
  border-color: #ff4f8b;
  background: rgba(255,79,139,0.08);
}

.html-mute-button.muted .mute-key {
  background: #ff4f8b;
  border-color: #ff4f8b;
  color: #fff;
}

.score-box {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.score-editor {
  width: max(100%, 1480px) !important;
  min-width: 1480px !important;
  max-width: none !important;
}

@media (max-width: 760px) {
  .module1-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .module1-toolbar-right {
    margin-left: 0;
    justify-content: flex-start;
  }

  .midi-export-button {
    margin-left: 0;
  }

  .html-voice-mute-panel {
    flex-wrap: wrap;
  }
}


/* 2026-06-01 light reverb / arrow restore / staff-left square mute buttons */
.score-box {
  position: relative;
}

.staff-mute-overlay {
  position: absolute;
  left: 74px;
  top: 156px;
  z-index: 20;
  pointer-events: none;
}

.staff-mute-button {
  position: absolute;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1.4px solid rgba(20,20,20,0.72);
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  color: rgba(20,20,20,0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.staff-mute-button.counterpoint {
  top: 0;
  left: 0;
}

.staff-mute-button.cantus {
  top: 170px;
  left: 0;
}

.staff-mute-button:hover {
  border-color: #ff4f8b;
  background: rgba(255,79,139,0.08);
}

.staff-mute-button.muted {
  border-color: #ff4f8b;
  background: #ff4f8b;
  color: #fff;
}

@media (max-width: 760px) {
  .staff-mute-overlay {
    left: 70px;
  }
}


/* 2026-06-01 layout repair: clean controls, 10 exercises, score-stage mute overlay */
.module1-exercise-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.exercise-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.exercise-description {
  margin: 0;
  color: rgba(20,20,20,0.62);
  font-size: 14px;
}

.module1-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 10px 0 12px;
}

.module1-toolbar-left,
.module1-toolbar-right,
.score-tools,
.playback-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.module1-toolbar-right {
  margin-left: auto;
}

.midi-export-button {
  margin-left: 32px;
}

.score-box {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.score-stage {
  position: relative;
  min-width: 1480px;
  width: 1480px;
  max-width: none;
}

.score-editor {
  width: 1480px !important;
  min-width: 1480px !important;
  max-width: none !important;
  display: block;
}

.staff-mute-overlay {
  position: absolute;
  left: 72px;
  top: 132px;
  z-index: 30;
  pointer-events: none;
}

.staff-mute-button {
  position: absolute;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1.4px solid rgba(20,20,20,0.72);
  border-radius: 6px;
  background: rgba(255,255,255,0.96);
  color: rgba(20,20,20,0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.staff-mute-button.counterpoint {
  top: 0;
  left: 0;
}

.staff-mute-button.cantus {
  top: 170px;
  left: 0;
}

.staff-mute-button:hover {
  border-color: #ff4f8b;
  background: rgba(255,79,139,0.08);
}

.staff-mute-button.muted {
  border-color: #ff4f8b;
  background: #ff4f8b;
  color: #fff;
}

@media (max-width: 760px) {
  .module1-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .module1-toolbar-right {
    margin-left: 0;
    justify-content: flex-start;
  }

  .midi-export-button {
    margin-left: 0;
  }
}


/* 2026-06-01 final repair:
   Ensure exercise selector has visible width and notation PNGs are bundled. */
.exercise-control select,
#exerciseSelect {
  min-width: 260px;
  max-width: 100%;
}

.module1-exercise-row {
  align-items: center;
}

.score-stage {
  background: rgba(255, 252, 247, 0.55);
}


/* 2026-06-01 exercise select hardfix */
#exerciseSelect {
  min-width: 260px;
}


/* 2026-06-01 load/render hardfix */
#exerciseSelect {
  min-width: 260px;
}


/* 2026-06-01 stable recovery: no PNG dependency for staff/note visibility */
.senzoku-staff-line {
  stroke: rgba(20,20,20,0.68);
  stroke-width: 1.15;
}

.svg-fallback-notehead {
  fill: #fff;
  stroke: #171717;
  stroke-width: 2.1;
}

.svg-fallback-notehead.cantus {
  stroke: rgba(20,20,20,0.62);
}

.svg-fallback-notehead.selected {
  stroke: #ff4f8b;
  stroke-width: 2.5;
}

.svg-fallback-notehead.playing,
.svg-fallback-notehead.error {
  stroke: var(--danger);
}

.svg-fallback-notehead.muted-voice {
  opacity: 0.32;
}

.module1-exercise-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

#exerciseSelect {
  min-width: 260px;
}

.module1-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 10px 0 12px;
}

.module1-toolbar-left,
.module1-toolbar-right,
.score-tools,
.playback-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.module1-toolbar-right {
  margin-left: auto;
}

.score-box {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.score-stage {
  position: relative;
  min-width: 1480px;
  width: 1480px;
  max-width: none;
}

.score-editor {
  width: 1480px !important;
  min-width: 1480px !important;
  max-width: none !important;
  display: block;
}

.staff-mute-overlay {
  position: absolute;
  left: 72px;
  top: 132px;
  z-index: 30;
  pointer-events: none;
}

.staff-mute-button {
  position: absolute;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1.4px solid rgba(20,20,20,0.72);
  border-radius: 6px;
  background: rgba(255,255,255,0.96);
  color: rgba(20,20,20,0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.staff-mute-button.counterpoint { top: 0; left: 0; }
.staff-mute-button.cantus { top: 170px; left: 0; }
.staff-mute-button.muted { border-color: #ff4f8b; background: #ff4f8b; color: #fff; }


/* 2026-06-01 no-PNG stable display recovery */
.stable-staff-line {
  stroke: rgba(20,20,20,0.72);
  stroke-width: 1.15;
}

.stable-clef {
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Music", serif;
  fill: rgba(20,20,20,0.82);
  dominant-baseline: middle;
  text-anchor: middle;
}

.stable-clef.treble {
  font-size: 92px;
}

.stable-clef.bass {
  font-size: 78px;
}

.stable-accidental {
  font-family: "Segoe UI Symbol", "Apple Symbols", serif;
  font-size: 26px;
  fill: #171717;
  dominant-baseline: middle;
  text-anchor: middle;
}

.stable-accidental.selected {
  fill: #ff4f8b;
}

.stable-notehead {
  fill: #fff;
  stroke: #171717;
  stroke-width: 2.1;
}

.stable-notehead.cantus {
  stroke: rgba(20,20,20,0.62);
}

.stable-notehead.selected {
  stroke: #ff4f8b;
  stroke-width: 2.5;
}

.stable-notehead.playing,
.stable-notehead.error {
  stroke: var(--danger);
}

.stable-notehead.muted-voice {
  opacity: 0.32;
}

.module1-exercise-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

#exerciseSelect {
  min-width: 260px;
}

.module1-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 10px 0 12px;
}

.module1-toolbar-left,
.module1-toolbar-right,
.score-tools,
.playback-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.module1-toolbar-right {
  margin-left: auto;
}

.score-box {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.score-stage {
  position: relative;
  min-width: 1480px;
  width: 1480px;
  max-width: none;
}

.score-editor {
  width: 1480px !important;
  min-width: 1480px !important;
  max-width: none !important;
  display: block;
}

.staff-mute-overlay {
  position: absolute;
  left: 72px;
  top: 132px;
  z-index: 30;
  pointer-events: none;
}

.staff-mute-button {
  position: absolute;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1.4px solid rgba(20,20,20,0.72);
  border-radius: 6px;
  background: rgba(255,255,255,0.96);
  color: rgba(20,20,20,0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.staff-mute-button.counterpoint { top: 0; left: 0; }
.staff-mute-button.cantus { top: 170px; left: 0; }
.staff-mute-button.muted { border-color: #ff4f8b; background: #ff4f8b; color: #fff; }


/* 2026-06-01 stable render override fixes */
.score-stage {
  position: relative !important;
  min-width: 1480px !important;
  width: 1480px !important;
  height: 430px !important;
  max-width: none !important;
}

.score-editor {
  display: block !important;
  width: 1480px !important;
  min-width: 1480px !important;
  height: 430px !important;
  min-height: 430px !important;
  max-width: none !important;
  overflow: visible !important;
}

.stable-staff-line {
  stroke: rgba(20,20,20,0.74);
  stroke-width: 1.15;
}

.stable-clef {
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Music", serif;
  fill: rgba(20,20,20,0.82);
  dominant-baseline: middle;
  text-anchor: middle;
}

.stable-clef.treble {
  font-size: 92px;
}

.stable-clef.bass {
  font-size: 78px;
}

.stable-accidental {
  font-family: "Segoe UI Symbol", "Apple Symbols", serif;
  font-size: 26px;
  fill: #171717;
  dominant-baseline: middle;
  text-anchor: middle;
}

.stable-notehead {
  fill: #fff;
  stroke: #171717;
  stroke-width: 2.1;
}

.stable-notehead.cantus {
  stroke: rgba(20,20,20,0.62);
}

.stable-notehead.selected {
  stroke: #ff4f8b;
  stroke-width: 2.5;
}

.stable-notehead.playing,
.stable-notehead.error {
  stroke: var(--danger);
}

.stable-notehead.muted-voice,
.stable-accidental.muted-voice {
  opacity: 0.32;
}

.staff-mute-overlay {
  position: absolute !important;
  left: 72px !important;
  top: 132px !important;
  z-index: 30 !important;
  pointer-events: none !important;
}

.staff-mute-button {
  pointer-events: auto !important;
}


/* 2026-06-01 clean reset for Module 1 */
.module1-exercise-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

#exerciseSelect {
  min-width: 260px;
}

.module1-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 10px 0 12px;
}

.module1-toolbar-left,
.module1-toolbar-right,
.score-tools,
.playback-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.module1-toolbar-right {
  margin-left: auto;
}

.score-box {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.score-stage {
  position: relative !important;
  min-width: 1480px !important;
  width: 1480px !important;
  height: 430px !important;
  max-width: none !important;
  background: rgba(255, 252, 247, 0.55);
}

.score-editor {
  display: block !important;
  width: 1480px !important;
  min-width: 1480px !important;
  height: 430px !important;
  min-height: 430px !important;
  max-width: none !important;
  overflow: visible !important;
  cursor: crosshair;
  pointer-events: auto !important;
}

.stable-staff-line {
  stroke: rgba(20,20,20,0.74);
  stroke-width: 1.15;
}

.png-staff {
  opacity: 0.94;
}

.png-staff-fallback-line {
  opacity: 0.20;
}

.clef-fallback {
  opacity: 0.0;
}

.png-notation {
  pointer-events: none;
  user-select: none;
}

.png-notehead {
  opacity: 1;
}

.png-notehead.cantus {
  opacity: 0.70;
}

.png-notehead.selected {
  filter:
    invert(41%)
    sepia(84%)
    saturate(2534%)
    hue-rotate(313deg)
    brightness(103%)
    contrast(102%);
}

.png-notehead.muted-voice,
.png-accidental.muted-voice {
  opacity: 0.32;
}

.stable-notehead {
  fill: #fff;
  stroke: #171717;
  stroke-width: 2.1;
}

.stable-notehead.cantus {
  stroke: rgba(20,20,20,0.62);
}

.stable-notehead.selected {
  stroke: #ff4f8b !important;
  fill: rgba(255,79,139,0.08);
  stroke-width: 2.8 !important;
}

.stable-notehead.muted-voice {
  opacity: 0.32;
}

.stable-accidental {
  font-family: "Segoe UI Symbol", "Apple Symbols", serif;
  font-size: 26px;
  fill: #171717;
  dominant-baseline: middle;
  text-anchor: middle;
  opacity: 0.0;
}

.staff-mute-overlay {
  position: absolute !important;
  left: 72px !important;
  top: 132px !important;
  z-index: 30 !important;
  pointer-events: none !important;
}

.staff-mute-button {
  position: absolute;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1.4px solid rgba(20,20,20,0.72);
  border-radius: 6px;
  background: rgba(255,255,255,0.96);
  color: rgba(20,20,20,0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.staff-mute-button.counterpoint { top: 0; left: 0; }
.staff-mute-button.cantus { top: 170px; left: 0; }
.staff-mute-button.muted { border-color: #ff4f8b; background: #ff4f8b; color: #fff; }

.senzoku-selected-ring {
  fill: none;
  stroke: #ff4f8b;
  stroke-width: 1.6;
  pointer-events: none;
}


/* 2026-06-01 clef-aware pitch positioning */
.ledger-line {
  stroke: rgba(20,20,20,0.72);
  stroke-width: 1.15;
}


/* 2026-06-01 PNG only notes + voice sample restore */
.stable-notehead {
  display: none !important;
}

.png-notehead {
  display: block;
  opacity: 1;
}

.png-notehead.cantus {
  opacity: 0.70;
}

.analysis-summary {
  margin-top: 16px;
}


/* 2026-06-01 single analysis output */
.analysis-summary {
  display: none !important;
}

.analysis-results {
  margin-top: 0;
}

.analysis-results .analysis-count,
.analysis-results .analysis-ok,
.analysis-results .analysis-empty {
  margin: 0 0 10px;
}

.analysis-list {
  margin: 8px 0 0;
  padding-left: 1.4em;
}

.analysis-list li {
  margin: 4px 0;
}


/* 2026-06-01 inline analysis only + accidental spelling rule */
.analysis-card,
.analysis-results {
  display: none !important;
}

.analysis-inline-result {
  margin: 14px 0 0;
  padding: 0;
  color: rgba(20,20,20,0.78);
  line-height: 1.8;
}


/* 2026-06-01 remove lower analysis + letter input */
.analysis-card,
#analysisResults {
  display: none !important;
}

.analysis-inline-result {
  margin: 14px 0 0;
  padding: 0;
  color: rgba(20,20,20,0.78);
  line-height: 1.8;
}


/* 2026-06-01 large mute buttons + stronger voice playback */
.staff-mute-overlay {
  left: 18px !important;
  top: 76px !important;
}

.staff-mute-button {
  width: 52px !important;
  height: 52px !important;
  border-radius: 10px !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  border-width: 1.6px !important;
}

.staff-mute-button.counterpoint {
  top: 0 !important;
  left: 0 !important;
}

.staff-mute-button.cantus {
  top: 170px !important;
  left: 0 !important;
}


/* 2026-06-01 more audible light reverb / mute buttons down 10px */
.staff-mute-overlay {
  top: 86px !important;
}


/* 2026-06-01 Module 1 language selector */
.module1-language-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
  background: #f7f4ef;
}

.module1-language-card {
  width: min(760px, 100%);
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(20,20,20,0.10);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 54px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.module1-language-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(20,20,20,0.52);
}

.module1-language-title {
  margin: 0;
  font-size: clamp(32px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.module1-language-subtitle {
  margin: 18px 0 0;
  color: rgba(20,20,20,0.62);
  line-height: 1.7;
}

.module1-language-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.module1-language-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 18px 20px;
  border: 1px solid rgba(20,20,20,0.14);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.module1-language-link:hover {
  transform: translateY(-2px);
  border-color: rgba(20,20,20,0.36);
  background: rgba(255,255,255,0.96);
}

.module1-language-link strong {
  display: block;
  font-size: 18px;
}

.module1-language-link span {
  color: rgba(20,20,20,0.52);
  font-size: 13px;
}

.module1-language-arrow {
  font-size: 22px;
  color: rgba(20,20,20,0.48);
}

@media (max-width: 640px) {
  .module1-language-actions {
    grid-template-columns: 1fr;
  }
}


/* 2026-06-01 language switch button */
.language-switch-button-wrap {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 999;
}

.language-switch-button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 118px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid rgba(20,20,20,0.16);
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  color: rgba(20,20,20,0.86);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.language-switch-button:hover {
  transform: translateY(-1px);
  border-color: rgba(20,20,20,0.34);
  background: rgba(255,255,255,0.98);
}

.language-switch-main {
  font-size: 15px;
  line-height: 1.1;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.language-switch-sub {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.1;
  color: rgba(20,20,20,0.48);
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .language-switch-button-wrap {
    top: 12px;
    right: 12px;
  }

  .language-switch-button {
    min-width: 96px;
    min-height: 44px;
    padding: 8px 11px;
    border-radius: 12px;
  }

  .language-switch-main {
    font-size: 13px;
  }

  .language-switch-sub {
    display: none;
  }
}


/* 2026-06-01 use header language select, not page-edge button */
.language-switch-button-wrap,
.module1-language-switch {
  display: none !important;
}

.header-language-select {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(20,20,20,0.74);
  white-space: nowrap;
}

.header-language-select select {
  appearance: auto;
  min-width: 96px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(20,20,20,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  color: rgba(20,20,20,0.88);
  font: inherit;
  cursor: pointer;
}

.header-language-select select:focus {
  outline: none;
  border-color: rgba(20,20,20,0.38);
}

@media (max-width: 720px) {
  .header-language-select {
    width: 100%;
    justify-content: flex-end;
    margin-top: 14px;
  }

  .header-language-select select {
    min-width: 112px;
  }
}

.hero-top,
.page-top,
.topbar,
.site-header-top {
  display: flex;
  align-items: center;
  gap: 14px;
}


/* 2026-06-01 header language control behavior */
.language-switch-button-wrap,
.module1-language-switch {
  display: none !important;
}

.language-control select {
  cursor: pointer;
}

/* Module 1 staff extension and synth playback update. */
.score-editor,
#scoreEditor {
  overflow: visible;
}

.png-staff,
.staff-line {
  overflow: visible;
}

/* Module 1: no scrollbars, scalable score. */
html,
body {
  overflow-x: hidden !important;
}

.score-box {
  overflow: hidden !important;
  max-width: 100% !important;
}

.score-editor,
#scoreEditor {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: clamp(230px, 42vh, 360px) !important;
  min-height: 0 !important;
  overflow: visible !important;
}

@media (max-height: 760px) {
  .page {
    padding-top: 10px !important;
    padding-bottom: 16px !important;
  }

  .checker-header,
  .hero {
    margin-bottom: 10px !important;
  }

  .checker-panel {
    gap: 8px !important;
  }

  .score-box {
    padding: 10px !important;
  }

  .score-editor,
  #scoreEditor {
    height: clamp(210px, 38vh, 320px) !important;
  }
}

@media (max-width: 760px) {
  .score-editor,
  #scoreEditor {
    height: clamp(210px, 34vh, 300px) !important;
  }
}

/* Icon controls for playback buttons. */
#playPauseButton,
#resetStartButton,
#resetPlaybackButton,
#backToStartButton,
#restartButton {
  min-width: 2.45rem;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

/* Module 1 final double barline. */
.senzoku-measure-line.final-thin {
  stroke-width: 1.2 !important;
}

.senzoku-measure-line.final-thick {
  stroke-width: 2.7 !important;
}
