html, body {
  margin: 0;
  overflow: hidden;
}

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

.dd {
  --step: calc((min(320px, 90vw) + 4px) / 5);
  box-sizing: border-box;
  width: min(320px, 90vw);
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.dd__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.dd__ico {
  display: inline-flex;
  color: #2f6df6;
}

.dd__title {
  font-size: clamp(11px, 3.4vw, 14px);
  font-weight: 700;
}

.dd__live {
  margin-left: auto;
  font-size: clamp(8px, 2.4vw, 10px);
  font-weight: 700;
  color: #0a4fe8;
  white-space: nowrap;
}

.dd__dow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 0 0 4px;
  font-size: clamp(8px, 2.4vw, 10px);
  font-weight: 700;
  text-align: center;
  color: rgba(23, 20, 26, 0.72);
}

.dd__grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dd__r {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.dd__c {
  position: relative;
  box-sizing: border-box;
  height: clamp(34px, 10.5vw, 42px);
  border-radius: 8px;
  background: rgba(23, 20, 26, 0.05);
}

.dd__c::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed #2f6df6;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dd__c.is-over::after {
  opacity: 1;
}

.dd__n {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: clamp(8px, 2.4vw, 10px);
  font-weight: 700;
  color: rgba(23, 20, 26, 0.72);
}

.dd__n.is-today {
  color: #0a4fe8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dd__chip {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  box-sizing: border-box;
  height: clamp(14px, 4.4vw, 18px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  background: #0a4fe8;
  color: #fff7e6;
  font-family: inherit;
  font-size: clamp(8px, 2.3vw, 9px);
  font-weight: 700;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  overflow: hidden;
  white-space: nowrap;
  transition: box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dd__grip {
  display: inline-flex;
  flex: 0 0 auto;
  opacity: 0.75;
}

.dd__t {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd__chip:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.dd__chip.is-grab {
  z-index: 5;
  transform: translateY(-6px) scale(1.06) rotate(-4deg);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  cursor: grabbing;
  pointer-events: none;
}

.dd.is-demo .dd__chip--fly {
  z-index: 5;
  animation-name: dd-fly;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.dd.is-demo .dd__c--to::after {
  animation-name: dd-ring;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.dd.is-demo .dd__c--from::after {
  animation-name: dd-ring-back;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes dd-fly {
  0%, 6% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    box-shadow: 0 0 0 rgba(23, 20, 26, 0);
  }
  20% {
    transform: translate(0, -6px) scale(1.06) rotate(-4deg);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  40% {
    transform: translate(var(--step), -6px) scale(1.06) rotate(-4deg);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  50%, 58% {
    transform: translate(var(--step), 0) scale(1) rotate(0deg);
    box-shadow: 0 0 0 rgba(23, 20, 26, 0);
  }
  70% {
    transform: translate(var(--step), -6px) scale(1.06) rotate(4deg);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  88% {
    transform: translate(0, -6px) scale(1.06) rotate(4deg);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    box-shadow: 0 0 0 rgba(23, 20, 26, 0);
  }
}
@keyframes dd-ring {
  0%, 13% {
    opacity: 0;
  }
  14%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}
@keyframes dd-ring-back {
  0%, 61% {
    opacity: 0;
  }
  62%, 93% {
    opacity: 1;
  }
  94%, 100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dd.is-demo .dd__chip--fly,
  .dd.is-demo .dd__c--to::after,
  .dd.is-demo .dd__c--from::after {
    animation: none !important;
  }
  .dd__chip, .dd__c::after {
    transition: none;
  }
}
