body[data-song-id] .score-stage {
  margin: 22px 0 28px;
  padding: 26px;
  border: 1px solid rgba(235, 241, 255, 0.1);
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 10%, rgba(226, 185, 98, 0.16), transparent 24%),
    linear-gradient(145deg, rgba(14, 20, 34, 0.96), rgba(8, 12, 22, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.score-stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.score-stage-header h2 {
  margin: 10px 0 10px;
  color: #fff;
  font-size: clamp(1.7rem, 2vw, 2.4rem);
  letter-spacing: -0.03em;
}

.score-stage-header p,
.score-stage-caption {
  margin: 0;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.72;
}

.score-stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.score-mode-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.score-mode-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 250, 252, 0.78);
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.score-mode-button:hover {
  transform: translateY(-1px);
  border-color: rgba(226, 185, 98, 0.32);
}

.score-mode-button.is-active {
  color: #0c1322;
  border-color: rgba(226, 185, 98, 0.9);
  background: linear-gradient(135deg, #ebd7ac, #d9b15d);
}

.score-stage-options {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(232, 238, 247, 0.78);
  font-size: 0.95rem;
}

.score-follow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.score-follow input {
  accent-color: #cf9e44;
}

.score-canvas-frame {
  overflow: auto hidden;
  padding: 18px;
  border: 1px solid rgba(244, 247, 252, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(250, 245, 234, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.score-canvas {
  min-height: 222px;
}

.score-svg {
  display: block;
  width: max(100%, 880px);
  height: auto;
}

.score-paper {
  fill: rgba(255, 250, 240, 0.94);
}

.score-meta-key,
.score-time-signature,
.score-accidental,
.score-note-label,
.score-measure-number,
.score-clef {
  fill: #283042;
}

.score-clef {
  font-size: 48px;
}

.score-time-signature {
  font-size: 28px;
  font-weight: 800;
}

.score-meta-key {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.score-measure-number {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.46;
}

.score-staff-line,
.score-ledger-line {
  stroke: rgba(62, 73, 91, 0.48);
  stroke-width: 1.3;
}

.score-bar-line {
  stroke: rgba(48, 60, 78, 0.74);
  stroke-width: 1.4;
}

.score-note-head,
.score-stem {
  fill: #111827;
  stroke: #111827;
  stroke-width: 1.5;
}

.score-note-head.is-open {
  fill: rgba(255, 250, 240, 0.98);
}

.score-note-label {
  font-size: 11px;
  text-anchor: middle;
  opacity: 0.62;
}

.score-note {
  transition: transform 160ms ease;
}

.score-note.is-current .score-note-head,
.score-note.is-current .score-stem,
.score-note.is-current .score-accidental {
  fill: #c78e2f;
  stroke: #c78e2f;
}

.score-note.is-current .score-note-label {
  fill: #8a611f;
  opacity: 1;
  font-weight: 800;
}

.score-note.is-complete .score-note-head,
.score-note.is-complete .score-stem,
.score-note.is-complete .score-accidental {
  fill: rgba(88, 99, 120, 0.68);
  stroke: rgba(88, 99, 120, 0.68);
}

.score-note.is-complete .score-note-label {
  fill: rgba(88, 99, 120, 0.74);
}

.score-viewer-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 208px;
  padding: 18px;
  text-align: center;
  color: #4b5563;
}

.score-viewer-empty strong {
  font-size: 1.08rem;
  color: #111827;
}

.score-viewer-empty p {
  max-width: 560px;
  margin: 0;
  line-height: 1.7;
}

.score-stage.is-unavailable .score-stage-options,
.score-stage.is-unavailable .score-mode-group {
  opacity: 0.6;
}

@media (max-width: 960px) {
  .score-stage-header,
  .score-stage-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .score-canvas-frame {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  body[data-song-id] .score-stage {
    padding: 18px;
    border-radius: 24px;
  }

  .score-mode-group {
    width: 100%;
  }

  .score-mode-button {
    flex: 1 1 calc(33.333% - 8px);
    justify-content: center;
    text-align: center;
  }

  .score-stage-options {
    width: 100%;
    justify-content: space-between;
  }
}
