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

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

.ai__field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai__label {
  color: #b6b0c0;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}

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

.ai__input:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 2px;
}

.ai__avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #3b4a63;
  color: #fff7e6;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}

.ai__avatar[data-tone="0"] {
  background: #7c90be;
}

.ai__avatar[data-tone="1"] {
  background: #9791c9;
}

.ai__avatar[data-tone="2"] {
  background: #479082;
}

.ai__avatar[data-tone="3"] {
  background: #ab5488;
}

.ai__avatar[data-tone="4"] {
  background: #c2361a;
}

.ai__avatar[data-tone="5"] {
  background: #3b4a63;
}

.ai__hint {
  margin: 0;
  color: #b6b0c0;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.3;
}

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

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

.ai__dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #3b4a63;
  color: #fff7e6;
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
}

.ai__dot[data-tone="0"] {
  background: #7c90be;
}

.ai__dot[data-tone="1"] {
  background: #9791c9;
}

.ai__dot[data-tone="2"] {
  background: #479082;
}

.ai__dot[data-tone="3"] {
  background: #ab5488;
}

.ai__dot[data-tone="4"] {
  background: #c2361a;
}

.ai__dot[data-tone="5"] {
  background: #3b4a63;
}

.ai__name {
  color: #b6b0c0;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.2;
}

.ai.is-demo .ai__dot {
  animation-name: aiRise;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.ai.is-demo .ai__item:nth-child(2) .ai__dot {
  animation-delay: 140ms;
}

.ai.is-demo .ai__item:nth-child(3) .ai__dot {
  animation-delay: 280ms;
}

.ai.is-demo .ai__item:nth-child(4) .ai__dot {
  animation-delay: 420ms;
}

.ai.is-demo .ai__item:nth-child(5) .ai__dot {
  animation-delay: 560ms;
}

@keyframes aiRise {
  0% {
    transform: translateY(6px) scale(0.94);
  }
  36% {
    transform: translateY(-8px) scale(1.06);
  }
  78% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
.ai.is-demo .ai__input::placeholder {
  color: transparent;
}

@media (max-width: 340px), (max-height: 220px) {
  .ai {
    gap: 8px;
  }
  .ai__field {
    gap: 8px;
  }
  .ai__input {
    width: 120px;
    font-size: 13px;
  }
  .ai__avatar {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  .ai__dot {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .ai__row {
    gap: 8px;
  }
  .ai__hint {
    font-size: 10px;
  }
  .ai__name {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ai__dot {
    animation: none !important;
  }
}
