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);
}

.dt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(100%, 400px);
  height: 248px;
}

.dt__area {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dt__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  height: 28px;
  padding: 0 4px;
  flex: 0 0 auto;
  background: #fff7e6;
  box-shadow: inset 1px 1px 0 0 #ffffff, inset -1px -1px 0 0 #17141a, inset 2px 2px 0 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 0 rgba(23, 20, 26, 0.32);
}

.dt__slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  height: 20px;
  padding: 0 8px;
  border: 0;
  background: #fff7e6;
  color: #17141a;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 0 #ffffff, inset -1px -1px 0 0 rgba(23, 20, 26, 0.5);
}

.dt__slot:active {
  box-shadow: inset 1px 1px 0 0 rgba(23, 20, 26, 0.5), inset -1px -1px 0 0 #ffffff;
}

.dt__slot.is-min {
  background: #0a4fe8;
  color: #fff7e6;
  box-shadow: inset 1px 1px 0 0 rgba(23, 20, 26, 0.5), inset -1px -1px 0 0 #ffffff;
}

.dt__slotIco {
  display: grid;
  place-items: center;
  font-size: 12px;
}

.dt__slotTitle {
  white-space: nowrap;
}

.dt__clock {
  margin-left: auto;
  padding-right: 4px;
  color: rgba(23, 20, 26, 0.72);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
}

.win {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 272px);
  height: 120px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff7e6;
  box-shadow: inset 1px 1px 0 0 #ffffff, inset -1px -1px 0 0 #17141a, inset 2px 2px 0 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 0 rgba(23, 20, 26, 0.32), 0 14px 24px rgba(23, 20, 26, 0.32);
}

.win.is-flying {
  transition: translate 300ms cubic-bezier(0.2, 0.8, 0.2, 1), scale 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.win.is-min {
  opacity: 0;
  scale: 0.12;
  pointer-events: none;
}

.win__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 4px;
  flex: 0 0 auto;
  background: #0a4fe8;
  color: #fff7e6;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.win__bar:active {
  cursor: grabbing;
}

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

.win__ico {
  display: grid;
  place-items: center;
  font-size: 14px;
}

.win__title {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
}

.win__min {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  flex: 0 0 auto;
  background: #fff7e6;
  color: #17141a;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 0 #ffffff, inset -1px -1px 0 0 rgba(23, 20, 26, 0.5);
}

.win__min:active {
  box-shadow: inset 1px 1px 0 0 rgba(23, 20, 26, 0.5), inset -1px -1px 0 0 #ffffff;
}

.win__panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  background: #ffffff;
  box-shadow: inset 1px 1px 0 0 rgba(23, 20, 26, 0.45), inset -1px -1px 0 0 #ffffff;
}

.win__line {
  margin: 0;
  color: #17141a;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.5;
}

.win__line--dim {
  color: rgba(23, 20, 26, 0.72);
}

.win__status {
  margin: 0;
  flex: 0 0 auto;
  height: 16px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  background: #ffffff;
  color: rgba(23, 20, 26, 0.72);
  font-weight: 500;
  font-size: 10px;
  line-height: 1.4;
  box-shadow: inset 1px 1px 0 0 rgba(23, 20, 26, 0.35), inset -1px -1px 0 0 #ffffff;
}

.dt.is-demo .win {
  animation-name: winFly;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.dt.is-demo .dt__slot {
  animation-name: dtSlotCut;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes winFly {
  0%, 8% {
    translate: 0 0;
    scale: 1;
    opacity: 1;
  }
  30%, 41% {
    translate: 24px 12px;
    scale: 1;
    opacity: 1;
  }
  51%, 74% {
    translate: -104px 64px;
    scale: 0.12;
    opacity: 0;
  }
  86%, 100% {
    translate: 0 0;
    scale: 1;
    opacity: 1;
  }
}
@keyframes dtSlotCut {
  0%, 50% {
    background: #fff7e6;
    color: #17141a;
    box-shadow: inset 1px 1px 0 0 #ffffff, inset -1px -1px 0 0 rgba(23, 20, 26, 0.5);
  }
  51%, 85% {
    background: #0a4fe8;
    color: #fff7e6;
    box-shadow: inset 1px 1px 0 0 rgba(23, 20, 26, 0.5), inset -1px -1px 0 0 #ffffff;
  }
  86%, 100% {
    background: #fff7e6;
    color: #17141a;
    box-shadow: inset 1px 1px 0 0 #ffffff, inset -1px -1px 0 0 rgba(23, 20, 26, 0.5);
  }
}
@media (max-width: 340px) {
  .dt {
    height: 174px;
  }
  .win {
    height: 104px;
  }
  .win__bar {
    height: 20px;
  }
  .win__line {
    font-size: 10px;
  }
  .win__status {
    font-size: 9px;
  }
  .dt__slot {
    height: 18px;
    font-size: 10px;
  }
  .dt__clock {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dt.is-demo .win, .dt.is-demo .dt__slot {
    animation: none !important;
  }
  .win.is-flying {
    transition: none !important;
  }
}
