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 {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(300px, 88vw);
  padding: 12px;
  border-radius: 16px;
  background-color: #fff7e6;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.dz__ic {
  display: inline-flex;
  flex: 0 0 auto;
}

.dz__ic svg {
  display: block;
}

.dz__head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  color: #c2361a;
}

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

.dz__label {
  display: block;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  color: #c2361a;
}

.dz__slot {
  position: relative;
  display: block;
}

.dz__input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #17141a;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 14px;
  line-height: 32px;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px #ffe0d8;
}

.dz__input:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.dz__ghost {
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  display: none;
  align-items: center;
}

.dz.is-demo .dz__ghost {
  display: flex;
}

.dz.is-demo .dz__input {
  color: transparent;
}

.dz.is-demo .dz__input::placeholder {
  color: transparent;
}

.dz__typed {
  display: block;
  overflow: hidden;
  width: 0;
  white-space: nowrap;
  border-right: 2px solid #c2361a;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 14px;
  line-height: 22px;
  font-weight: 700;
  color: #17141a;
}

.dz__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background-color: #c2361a;
  color: #fff7e6;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  transition-property: background-color, color;
  transition-duration: 220ms;
  transition-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
}

.dz__btn[aria-disabled=true] {
  background-color: #ffe0d8;
  color: #17141a;
  cursor: default;
}

.dz__btn:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 3px;
}

.dz__live {
  position: relative;
  margin: 0;
  height: 16px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  color: #17141a;
}

.dz__word {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
}

.dz:not(.is-demo) .dz__word[data-word=lock] {
  opacity: 1;
}

.dz:not(.is-demo) .dz__btn[aria-disabled=false] ~ .dz__live .dz__word[data-word=lock] {
  opacity: 0;
}

.dz:not(.is-demo) .dz__btn[aria-disabled=false] ~ .dz__live .dz__word[data-word=open] {
  opacity: 1;
}

.dz__scrim {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background-color: #17141a;
  opacity: 0;
  visibility: hidden;
}

.dz__dialog {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background-color: #ffffff;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  opacity: 0;
  visibility: hidden;
}

.dz:not(.is-demo)[data-open=yes] .dz__scrim {
  opacity: 0.78;
  visibility: visible;
}

.dz:not(.is-demo)[data-open=yes] .dz__dialog {
  opacity: 1;
  visibility: visible;
}

.dz__dtitle {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  color: #17141a;
}

.dz__dbody {
  margin: 0;
  font-size: 10px;
  line-height: 14px;
  font-weight: 500;
  color: #17141a;
}

.dz__drow {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.dz__dbtn {
  box-sizing: border-box;
  flex: 1 1 auto;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.dz__dbtn:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.dz__dbtn--no {
  background-color: #fff7e6;
  color: #17141a;
}

.dz__dbtn--yes {
  background-color: #c2361a;
  color: #fff7e6;
}

.dz.is-demo .dz__typed {
  animation-name: dz-type, dz-caret;
  animation-duration: 2s, 400ms;
  animation-timing-function: steps(6, end), steps(1, end);
  animation-iteration-count: infinite, infinite;
}

@keyframes dz-type {
  0% {
    width: 0ch;
  }
  55% {
    width: 6ch;
  }
  100% {
    width: 6ch;
  }
}
@keyframes dz-caret {
  0% {
    border-right-color: #c2361a;
  }
  50% {
    border-right-color: transparent;
  }
  100% {
    border-right-color: transparent;
  }
}
.dz.is-demo .dz__btn {
  animation-name: dz-unlock, dz-nudge;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite, infinite;
}

@keyframes dz-unlock {
  0% {
    background-color: #ffe0d8;
    color: #c2361a;
  }
  58% {
    background-color: #c2361a;
    color: #fff7e6;
  }
  100% {
    background-color: #c2361a;
    color: #fff7e6;
  }
}
@keyframes dz-nudge {
  0% {
    transform: translateY(0);
  }
  56% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(-3px);
  }
  66% {
    transform: translateY(0);
  }
  69% {
    transform: translateY(2px);
  }
  76% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
.dz.is-demo .dz__word {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.dz.is-demo .dz__word[data-word=lock] {
  animation-name: dz-w-lock;
}

.dz.is-demo .dz__word[data-word=open] {
  animation-name: dz-w-open;
}

@keyframes dz-w-lock {
  0% {
    opacity: 1;
  }
  58% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes dz-w-open {
  0% {
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
.dz.is-demo .dz__scrim {
  animation-name: dz-scrim;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes dz-scrim {
  0% {
    opacity: 0;
    visibility: hidden;
  }
  70% {
    opacity: 0.78;
    visibility: visible;
  }
  100% {
    opacity: 0.78;
    visibility: visible;
  }
}
.dz.is-demo .dz__dialog {
  animation-name: dz-open;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes dz-open {
  0% {
    opacity: 0;
    visibility: hidden;
  }
  70% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 1;
    visibility: visible;
  }
}
.dz.is-demo .dz__dbtn--yes {
  animation-name: dz-yes-pulse;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes dz-yes-pulse {
  0% {
    transform: scale(1);
  }
  72% {
    transform: scale(1);
  }
  82% {
    transform: scale(1.08);
  }
  90% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .dz {
    gap: 4px;
    padding: 8px;
  }
  .dz__head {
    font-size: 12px;
    line-height: 16px;
  }
  .dz__desc {
    font-size: 10px;
    line-height: 13px;
  }
  .dz__label {
    font-size: 9px;
    line-height: 12px;
  }
  .dz__input {
    height: 28px;
    font-size: 12px;
    line-height: 28px;
  }
  .dz__typed {
    font-size: 12px;
    line-height: 18px;
  }
  .dz__btn {
    height: 28px;
    font-size: 12px;
  }
  .dz__live {
    height: 14px;
    font-size: 9px;
    line-height: 14px;
  }
  .dz__dialog {
    left: 8px;
    right: 8px;
    bottom: 8px;
    gap: 0;
    padding: 8px;
  }
  .dz__dtitle {
    font-size: 12px;
    line-height: 16px;
  }
  .dz__dbody {
    font-size: 9px;
    line-height: 12px;
  }
  .dz__drow {
    margin-top: 4px;
  }
  .dz__dbtn {
    height: 26px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dz.is-demo .dz__typed,
  .dz.is-demo .dz__btn,
  .dz.is-demo .dz__word,
  .dz.is-demo .dz__scrim,
  .dz.is-demo .dz__dialog,
  .dz.is-demo .dz__dbtn--yes {
    animation: none !important;
  }
  .dz.is-demo .dz__typed {
    width: 6ch !important;
  }
  .dz.is-demo .dz__btn {
    background-color: #c2361a !important;
    color: #fff7e6 !important;
  }
  .dz.is-demo .dz__word[data-word=open] {
    opacity: 1 !important;
  }
  .dz.is-demo .dz__scrim {
    opacity: 0.78 !important;
    visibility: visible !important;
  }
  .dz.is-demo .dz__dialog {
    opacity: 1 !important;
    visibility: visible !important;
  }
}
