.sound-test-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(21, 12, 6, 0.68);
  backdrop-filter: blur(5px);
}

.sound-test-overlay[hidden], .sound-test-overlay [hidden] { display: none; }
.sound-test-panel {
  width: min(660px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #c59b66;
  border-radius: 16px;
  color: #4c2b12;
  background: linear-gradient(180deg, #fffaf0, #f7ead5);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  color-scheme: light;
}

.sound-test-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #dec8a9;
  background: #fff8eb;
}
.sound-test-header h2, .sound-test-header p { margin: 0; }
.sound-test-header h2 { font-family: Georgia, serif; font-size: 2rem; }
.sound-test-kicker { color: #964b22; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sound-test-body { padding: 20px 24px 24px; }
.sound-test-guide { margin: 0 0 18px; line-height: 1.5; color: #71543a; }
.sound-test-selectors { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; }
.sound-test-label { display: grid; gap: 7px; font-size: 0.86rem; font-weight: 800; }
.sound-test-label select {
  width: 100%;
  min-width: 0;
  padding: 10px 9px;
  border: 1px solid #b9a081;
  border-radius: 7px;
  font: inherit;
  color: #4c2b12;
  background: #fffdf8;
  text-overflow: ellipsis;
}
.sound-test-player { margin-top: 20px; padding: 20px; border: 1px solid #dcc09b; border-radius: 11px; background: rgba(255, 255, 255, 0.6); }
.sound-test-track-name { margin: 0; font-family: Georgia, serif; font-size: 1.28rem; line-height: 1.35; overflow-wrap: anywhere; }
.sound-test-track-detail { margin: 5px 0 0; font-size: 0.82rem; color: #8b633c; }
.sound-test-status { min-height: 1.5em; margin: 14px 0; color: #71543a; font-size: 0.9rem; line-height: 1.5; }
.sound-test-status.is-error { color: #9a341f; }
.sound-test-panel button { min-width: 80px; padding: 10px 16px; font-weight: 800; color: #4c2b12; border-color: #b79a77; background: linear-gradient(180deg, #fffdf7, #efddbd); box-shadow: 0 3px 8px rgba(66, 35, 14, 0.1); }
.sound-test-panel button:hover { border-color: #965629; }
.sound-test-panel button:disabled { opacity: 0.5; }
.sound-test-panel :focus-visible { outline: 3px solid #a14321; outline-offset: 3px; }
.sound-test-transport { display: flex; gap: 10px; }
.sound-test-panel .sound-test-play { color: #fff6df; border-color: #873f20; background: linear-gradient(180deg, #b76735, #87431f); }
.sound-test-timeline { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 18px; }
.sound-test-panel input[type="range"] { width: 100%; margin: 6px 0; accent-color: #ad542a; cursor: pointer; }
.sound-test-panel input:disabled { cursor: default; opacity: 0.5; }
.sound-test-time { color: #71543a; font-size: 0.78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sound-test-volume { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 22px; font-size: 0.9rem; font-weight: 800; }
.sound-test-volume input { grid-column: 1 / -1; }
.sound-test-help { margin: 20px 0 0; font-size: 0.8rem; line-height: 1.5; color: #816044; }

@media (max-width: 560px) {
  .sound-test-overlay { padding: 8px; }
  .sound-test-panel { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 11px; }
  .sound-test-header { padding: 16px; gap: 10px; }
  .sound-test-header h2 { font-size: 1.65rem; }
  .sound-test-kicker { font-size: 0.58rem; }
  .sound-test-body { padding: 16px 16px 20px; }
  .sound-test-selectors { grid-template-columns: minmax(0, 1fr); }
  .sound-test-player { padding: 16px; }
  .sound-test-timeline { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sound-test-time { text-align: right; }
}
