:root {
  --bg: #ececec;
  --text: #1e1e1e;
  --btn-size: 84px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 32px 20px 40px;
  background: radial-gradient(circle at 30% 10%, #f8f8f8, #e2e2e2 65%, #d8d8d8);
  color: var(--text);
  font-family: "Do Hyeon", "Noto Sans KR", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.reference-cta {
  width: min(680px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #111;
  color: #fff;
}

.reference-cta-text {
  margin: 0;
  font-size: 1rem;
}

.reference-cta-link {
  color: #111;
  background: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 12px;
}

.sound-section {
  width: min(680px, 100%);
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  box-shadow: 0 10px 30px rgba(30, 30, 30, 0.12);
}

.sound-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  font-family: "Do Hyeon", "Noto Sans KR", sans-serif;
  font-weight: 400;
  text-align: center;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.sound-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sound-button {
  --btn-hi: #c86bff;
  --btn-mid: #8d21f7;
  --btn-low: #4c0d98;
  --btn-rim: #5a12a9;
  position: relative;
  width: var(--btn-size);
  height: var(--btn-size);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background:
    radial-gradient(
      circle at 35% 24%,
      rgba(255, 255, 255, 0.65) 0 18%,
      transparent 24%
    ),
    radial-gradient(
      circle at 52% 32%,
      var(--btn-hi) 0,
      var(--btn-mid) 38%,
      color-mix(in srgb, var(--btn-mid) 65%, var(--btn-low)) 72%,
      var(--btn-low) 100%
    );
  box-shadow:
    inset 0 -9px 14px rgba(255, 255, 255, 0.28),
    inset 0 10px 16px rgba(42, 0, 89, 0.5),
    0 8px 0 var(--btn-rim),
    0 14px 18px rgba(36, 0, 72, 0.45);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    filter 0.16s ease;
}

.sound-button::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 25%,
      rgba(255, 255, 255, 0.5) 0 23%,
      transparent 32%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--btn-hi) 70%, white),
      var(--btn-mid)
    );
  box-shadow:
    inset 0 6px 10px rgba(255, 255, 255, 0.2),
    inset 0 -8px 12px rgba(51, 0, 102, 0.5);
}

.sound-button:active,
.sound-button.is-pressed {
  transform: translateY(7px) scale(0.985);
  box-shadow:
    inset 0 -8px 12px rgba(255, 255, 255, 0.26),
    inset 0 8px 14px rgba(42, 0, 89, 0.56),
    0 2px 0 var(--btn-rim),
    0 6px 10px rgba(36, 0, 72, 0.4);
}

.sound-label {
  margin: 0;
  font-size: 1.08rem;
  text-align: center;
  font-family: "Do Hyeon", "Noto Sans KR", sans-serif;
  font-weight: 400;
}

.combo-builder {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.combo-input {
  width: 100%;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 8px;
}

.mini-button {
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  background: #fff;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

.combo-save-button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #111;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.sequence-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sequence-empty {
  margin: 0;
  color: #666;
}

.sequence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  cursor: grab;
}

.sequence-item.dragging {
  opacity: 0.45;
}

.sequence-item.over {
  border-color: #111;
}

.sequence-index {
  color: #666;
  min-width: 30px;
}

.sequence-remove {
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  cursor: pointer;
  padding: 4px 8px;
}

.combo-subtitle {
  margin: 14px 0 10px;
}

.speed-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.speed-select {
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  background: #fff;
  padding: 6px 8px;
  font: inherit;
}

.combo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.combo-item {
  display: flex;
  gap: 8px;
}

.combo-play,
.combo-delete {
  border: 1px solid #d2d2d2;
  background: #fff;
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  cursor: pointer;
}

.combo-play {
  flex: 1;
  text-align: left;
}

.combo-speed-select {
  width: 72px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
}

.modal-title {
  margin: 0 0 8px;
}

.modal-text {
  margin: 0 0 14px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.modal-embed-wrap {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  background: #f7f7f7;
}

.modal-embed {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

.modal-open-link,
.modal-close-button {
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  padding: 9px 12px;
  text-decoration: none;
  color: #111;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.modal-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

@media (max-width: 480px) {
  :root {
    --btn-size: 71px;
  }

  .sound-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }

  .sound-label {
    font-size: 0.9rem;
  }
}
