.overlay-shell {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay-shell[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.overlay-panel {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: min(88vh, 920px);
  background: #000;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-large);
  padding: 40px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: auto;
}

.overlay-shell[aria-hidden="false"] .overlay-panel {
  transform: translateY(0);
}

.modal-panel {
  width: min(960px, 100%);
}

.overlay-copy-block {
  margin: 24px 0;
}

.overlay-copy-block h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.overlay-track {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--panel-fill);
  border-radius: var(--radius-medium);
  margin-bottom: 24px;
}

.track-art {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-small);
  object-fit: cover;
}

.track-copy {
  display: flex;
  flex-direction: column;
}

.overlay-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 200ms ease;
}

.step-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel-line-strong);
}

.step-row.active {
  color: var(--text-main);
}

.step-row.active .step-marker {
  background: #fff;
  box-shadow: 0 0 10px #fff;
}

.step-row.done {
  color: var(--brand-spotify);
}

.step-row.done .step-marker {
  background: var(--brand-spotify);
}

.overlay-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-body {
  margin-top: 24px;
}

.modal-video-shell {
  width: 100%;
  max-width: min(92vw, 860px);
  margin: 0 auto;
  border-radius: var(--radius-medium);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--panel-line);
}

.modal-video {
  width: 100%;
  max-height: min(72vh, 820px);
  display: block;
  border-radius: var(--radius-medium);
  background: #000;
  object-fit: contain;
}

.modal-code {
  background: #050505;
  border: 1px solid var(--panel-line);
  padding: 24px;
  border-radius: var(--radius-medium);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-soft);
  overflow-x: auto;
}

@keyframes overlay-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .overlay-shell {
    padding: 12px;
  }

  .overlay-panel {
    padding: 18px;
    max-height: 90vh;
  }

  .modal-panel {
    width: 100%;
  }

  .modal-body {
    margin-top: 16px;
  }

  .modal-video {
    max-height: 60vh;
  }
}
