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

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

:root {
  --dir: 1;
}

.ds {
  width: min(100%, 280px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ds__dots {
  display: flex;
  gap: 8px;
}

.ds__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.28);
}

.ds__dot.is-active {
  background: #17141a;
}

.ds__panel {
  view-transition-name: ds-step;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background: #17141a;
  border-radius: 16px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.ds__num {
  margin: 0;
  font: 700 30px/1 "Space Mono", monospace;
  color: #fff7e6;
}

.ds__t {
  margin: 0;
  font: 600 13px/1.3 -apple-system, "Segoe UI", sans-serif;
  color: rgba(255, 247, 230, 0.88);
}

.ds__nav {
  display: flex;
  gap: 12px;
}

.ds__navBtn {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(23, 20, 26, 0.1);
  color: #17141a;
  font: 700 11px/1 -apple-system, sans-serif;
  padding: 4px 16px;
}

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

::view-transition-old(ds-step) {
  animation: ds-out 300ms ease-out both;
}

::view-transition-new(ds-step) {
  animation: ds-in 300ms ease-out both;
}

@keyframes ds-out {
  to {
    transform: translateX(calc(var(--dir) * -100%));
    opacity: 0;
  }
}
@keyframes ds-in {
  from {
    transform: translateX(calc(var(--dir) * 100%));
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .ds__panel {
    padding: 16px 12px;
  }
  .ds__num {
    font-size: 24px;
  }
  .ds__t {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
