@property --n {
  syntax: "<integer>";
  inherits: false;
  initial-value: 0;
}
html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.dz {
  --dz-ring: #6ec8ff;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 164px;
  overflow: hidden;
}

.dz__zone {
  position: relative;
  margin: 12px 12px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  border: 2px dashed rgba(255, 247, 230, 0.28);
  background: rgba(33, 29, 38, 0.6);
  cursor: pointer;
}

.dz__zone:focus-visible {
  outline: 2px solid #6ec8ff;
  outline-offset: 2px;
}

.dz__ring {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 2px solid #6ec8ff;
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
}

.dz__zone.is-over .dz__ring {
  opacity: 1;
  transform: scale(1);
  transition: opacity 220ms ease-out, transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dz__zone.is-dropped .dz__ring {
  opacity: 1;
  transform: scale(1.08);
  transition: opacity 220ms ease-out, transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dz__icon {
  position: relative;
  z-index: 1;
  display: flex;
  color: rgba(255, 247, 230, 0.82);
}

.dz__label {
  position: relative;
  z-index: 1;
  font-weight: 600;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.3;
  color: #fff7e6;
  text-align: center;
  padding: 0 12px;
}

.dz__badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(42, 36, 50, 0.92);
  font-weight: 600;
  font-size: 10px;
  line-height: 1.2;
  color: rgba(255, 247, 230, 0.82);
  opacity: 0;
  --n: 0;
}

.dz__zone.is-over .dz__badge {
  opacity: 1;
  transition: opacity 220ms ease-out;
}

.dz__n {
  counter-reset: dzn var(--n);
}

.dz__n::before {
  content: counter(dzn);
}

.dz__bar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 12px;
}

.dz__meta {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 247, 230, 0.72);
}

@keyframes dzRing {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  8% {
    opacity: 1;
    transform: scale(1.06);
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  18% {
    transform: scale(1);
    animation-timing-function: ease-out;
  }
  54% {
    opacity: 1;
    transform: scale(1);
  }
  60% {
    opacity: 1;
    transform: scale(1.08);
  }
  70% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 0;
    transform: scale(0.94);
  }
}
@keyframes dzCount {
  0%, 6% {
    --n: 0;
    opacity: 0;
  }
  10% {
    --n: 1;
    opacity: 1;
  }
  22% {
    --n: 2;
  }
  34% {
    --n: 3;
  }
  44% {
    --n: 2;
  }
  52% {
    --n: 1;
  }
  58%, 100% {
    --n: 0;
    opacity: 0;
  }
}
.is-demo .dz__ring {
  animation-name: dzRing;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.is-demo .dz__badge {
  animation-name: dzCount;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .dz__label {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .dz__ring, .is-demo .dz__badge {
    animation: none !important;
    opacity: 0 !important;
  }
}
