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

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

.id {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(360px, 92vw);
}

.id__field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.id__label {
  color: #17141a;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}

.id__input {
  width: 150px;
  padding: 8px 12px;
  border: 2px solid #17141a;
  border-radius: 8px;
  background: transparent;
  color: #17141a;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

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

.id__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 64px;
  height: 64px;
}

.id__cell {
  transform-origin: center;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.12);
}

.id__grid[data-tone="0"] .id__cell.is-on,
.id__mini[data-tone="0"] .id__cell.is-on {
  background: #7c90be;
}

.id__grid[data-tone="1"] .id__cell.is-on,
.id__mini[data-tone="1"] .id__cell.is-on {
  background: #9791c9;
}

.id__grid[data-tone="2"] .id__cell.is-on,
.id__mini[data-tone="2"] .id__cell.is-on {
  background: #479082;
}

.id__grid[data-tone="3"] .id__cell.is-on,
.id__mini[data-tone="3"] .id__cell.is-on {
  background: #ab5488;
}

.id__grid[data-tone="4"] .id__cell.is-on,
.id__mini[data-tone="4"] .id__cell.is-on {
  background: #c2361a;
}

.id__grid[data-tone="5"] .id__cell.is-on,
.id__mini[data-tone="5"] .id__cell.is-on {
  background: #3b4a63;
}

.id__list {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.id__item {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.id__mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 40px;
  height: 40px;
}

.id__name {
  color: #17141a;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.2;
}

.id.is-demo .id__cell {
  animation-name: idBreathe;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: calc(var(--i) * 40ms);
  animation-fill-mode: backwards;
}

@keyframes idBreathe {
  0% {
    transform: scale(0.72);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.72);
  }
}
.id.is-demo .id__input::placeholder {
  color: transparent;
}

@media (max-width: 340px), (max-height: 220px) {
  .id {
    gap: 8px;
  }
  .id__input {
    width: 120px;
    font-size: 13px;
  }
  .id__grid {
    width: 56px;
    height: 56px;
  }
  .id__mini {
    width: 32px;
    height: 32px;
  }
  .id__list {
    gap: 12px;
  }
  .id__name {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .id__cell {
    animation: none !important;
  }
}
