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

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

.dk {
  position: relative;
  box-sizing: border-box;
  width: clamp(248px, 78vw, 320px);
  height: 216px;
  overflow: hidden;
  border-radius: 16px;
  background: #fbf6ee;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.dk__view {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dk__doc {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.dk__body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.dk__title {
  margin: 0;
  color: #1b1a20;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  font-family: inherit;
}

.dk__row {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #b9b3c4;
}

.dk__row--full {
  width: 100%;
}

.dk__row--wide {
  width: 86%;
}

.dk__row--mid {
  width: 68%;
}

.dk__row--short {
  width: 44%;
}

.dk__row--accent {
  width: 52%;
  background: #479089;
}

.dk__bar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 4px;
  background: #1b1a20;
}

.is-demo .dk__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.dk__nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.dk__pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 25%;
  height: 100%;
  border-radius: 12px;
  background: #b3dad5;
  transform: translateX(calc(var(--n, 0) * 100%));
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dk__tab {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  color: #b9b3c4;
  text-decoration: none;
}

.dk__tab.is-on {
  color: #1b1a20;
}

.dk__tab:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 0;
}

.dk__ic {
  display: block;
}

.dk__ic svg {
  display: block;
}

.dk__label {
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  font-family: inherit;
}

.is-demo .dk__pill {
  animation-name: dockSlide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

.is-demo .dk__tab {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.is-demo .dk__tab:nth-child(1) {
  animation-name: onA;
}

.is-demo .dk__tab:nth-child(2) {
  animation-name: onB;
}

.is-demo .dk__tab:nth-child(3) {
  animation-name: onC;
}

.is-demo .dk__tab:nth-child(4) {
  animation-name: onD;
}

.is-demo .dk__ic {
  animation-name: icPop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.is-demo .dk__tab:nth-child(1) .dk__ic {
  animation-delay: -1.92s;
}

.is-demo .dk__tab:nth-child(2) .dk__ic {
  animation-delay: -1.46s;
}

.is-demo .dk__tab:nth-child(3) .dk__ic {
  animation-delay: -1.02s;
}

.is-demo .dk__tab:nth-child(4) .dk__ic {
  animation-delay: -0.5s;
}

@keyframes dockSlide {
  0% {
    transform: translateX(300%);
  }
  10%, 22% {
    transform: translateX(0);
  }
  34%, 46% {
    transform: translateX(100%);
  }
  58%, 70% {
    transform: translateX(200%);
  }
  82%, 100% {
    transform: translateX(300%);
  }
}
@keyframes onA {
  0%, 3.9% {
    color: #b9b3c4;
  }
  4%, 21.9% {
    color: #1b1a20;
  }
  22%, 100% {
    color: #b9b3c4;
  }
}
@keyframes onB {
  0%, 26.9% {
    color: #b9b3c4;
  }
  27%, 45.9% {
    color: #1b1a20;
  }
  46%, 100% {
    color: #b9b3c4;
  }
}
@keyframes onC {
  0%, 48.9% {
    color: #b9b3c4;
  }
  49%, 71.4% {
    color: #1b1a20;
  }
  71.5%, 100% {
    color: #b9b3c4;
  }
}
@keyframes onD {
  0%, 3.9% {
    color: #1b1a20;
  }
  4%, 74.9% {
    color: #b9b3c4;
  }
  75%, 100% {
    color: #1b1a20;
  }
}
@keyframes icPop {
  0% {
    transform: translateY(0) scale(1);
  }
  5% {
    transform: translateY(-5px) scale(1.16);
  }
  12%, 100% {
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .dk {
    height: 156px;
  }
  .dk__doc {
    min-height: 220px;
  }
  .dk__body {
    gap: 4px;
    padding: 12px;
  }
  .dk__title {
    font-size: 13px;
  }
  .dk__row {
    height: 6px;
  }
  .dk__ic svg {
    width: 18px;
    height: 18px;
  }
  .dk__label {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .dk__pill, .is-demo .dk__tab, .is-demo .dk__ic {
    animation: none !important;
  }
  .dk__pill {
    transition: none !important;
  }
  .is-demo .dk__tab.is-on {
    color: #1b1a20;
  }
}
