/* SightCrafter — calm by design (spec §0): the score is the loudest thing
   on the page. Everything else stays quiet; juice responds, never leads. */

body {
  font-family: system-ui, sans-serif;
  margin: 24px auto;
  max-width: 900px;
  padding: 0 16px;
  color: #222;
  background: #fafaf7;
}

header h1 { margin-bottom: 0; }
.tagline { margin-top: 2px; color: #777; font-style: italic; }
.song-title { color: #555; font-weight: 600; margin-bottom: 4px; }

/* section map (§10): the song's skeleton, assembling as blocks master */
#section-map { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0;
               align-items: center; }
.sec-label {
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 0.72rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chip {
  border: 1px solid #d5d2c8;
  background: #f1efe9;
  color: #666;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.chip.active { border-color: #1e6fd9; color: #1e6fd9; background: #eaf1fc; }
.chip.mastered {
  background: #e4f4e9;
  border-color: #1fa050;
  color: #157038;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.chip.mastered.active { outline: 2px solid #1e6fd9; }

#score-wrap { position: relative; }
#score {
  background: #fff;
  border: 1px solid #e4e2dc;
  border-radius: 8px;
  padding: 8px;
  margin: 12px 0;
  overflow-x: auto;
}

/* SVG overlays drawn by juice.js */
.arc-label { font: italic 11px Georgia, serif; fill: #7b5cc6; }
.block-name {
  font: 600 13px system-ui, sans-serif;
  fill: #157038;
  letter-spacing: 0.08em;
}
.reveal-in { animation: reveal 0.9s ease; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }

/* completion pop (§10) — a moment, then gone; never blocks the staff */
#pop-host {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.pop {
  position: absolute;
  font-size: 1.6rem; font-weight: 700; color: #1fa050;
  background: rgba(255,255,255,0.92);
  border: 2px solid #1fa050;
  border-radius: 12px;
  padding: 10px 26px;
  animation: pop 1.6s ease forwards;
}
.pop-big { color: #7b5cc6; border-color: #7b5cc6; font-size: 1.9rem; }
@keyframes pop {
  0%   { transform: scale(0.6); opacity: 0; }
  12%  { transform: scale(1.06); opacity: 1; }
  20%  { transform: scale(1); }
  75%  { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

#status { font-size: 1.05rem; }
.diag { color: #9a6a00; min-height: 1.4em; }
.streak { min-height: 1.2em; color: #bbb; font-size: 0.9rem; transition: color 0.4s; }
.streak.on { color: #1e6fd9; }

.controls { display: flex; gap: 10px; margin-top: 6px; }
.controls button {
  border: 1px solid #d5d2c8; background: #fff; border-radius: 8px;
  padding: 6px 14px; cursor: pointer; font-size: 0.9rem; color: #444;
}
.controls button:disabled { opacity: 0.5; cursor: default; }

#kbd-help {
  background: #f1efe9; border-radius: 8px; padding: 4px 16px; margin-top: 10px;
  font-size: 0.85rem; color: #555;
}
#kbd-help pre { font-size: 0.8rem; }
.hidden { display: none; }

#midi-status { color: #999; font-size: 0.85rem; margin-top: 24px; }
