.music-xml-viewer {
  margin: 0;
}

.music-xml-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 10px 15px;
  background: rgba(44, 73, 117, 0.06);
  border-radius: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
@media (min-width: 1200px) {
  .music-xml-controls {
    padding: 12px 20px;
    margin-bottom: 24px;
  }
}

.music-xml-controls label {
  font-weight: 600;
  font-size: 14px;
  color: #2f2f2f;
  margin: 0;
}
@media (min-width: 900px) {
  .music-xml-controls label {
    font-size: 15px;
  }
}

.music-xml-controls .music-xml-key-group,
.music-xml-controls .music-xml-transpose-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.music-xml-current-key {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2c4975;
  min-width: 2ch;
}

.music-xml-transpose-value {
  font-family: "Metropolis-Bold", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 3ch;
  text-align: center;
  color: #2c4975;
}

.music-xml-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid #2c4975;
  border-radius: 8px;
  background: #fff;
  color: #2c4975;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.music-xml-btn:hover {
  background: #2c4975;
  color: #fff;
}
.music-xml-btn:active {
  transform: scale(0.92);
}

.music-xml-btn-reset,
.music-xml-btn-piano {
  width: auto;
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.music-xml-render {
  border-radius: 10px;
  padding: 1rem;
  min-height: 200px;
  background: #fff;
  overflow-x: auto;
  position: relative;
}

.music-xml-viewer:not(.music-xml-loaded) .music-xml-render {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  min-height: 300px;
}

.music-xml-viewer:not(.music-xml-loaded) .music-xml-render::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(44, 73, 117, 0.15);
  border-top-color: #2c4975;
  border-radius: 50%;
  animation: music-xml-spin 0.8s linear infinite;
  margin-right: 0.75rem;
}

@keyframes music-xml-spin {
  to { transform: rotate(360deg); }
}

.music-xml-error {
  color: #c00;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
}

@media print {
  .music-xml-controls {
    display: none !important;
  }
}
