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

.phs {
  position: relative;
  width: min(92vw, 160vh - 12.8vw);
  aspect-ratio: 480/300;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: #17141a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 20px;
}

.phs__card {
  width: 100%;
  max-width: 21em;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.phs__title {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.phs__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phs__label {
  font-weight: 600;
  font-size: 11px;
  color: rgba(255, 247, 230, 0.64);
}

.phs__staticField {
  --glow: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 247, 230, 0.07);
  border: 1px solid rgba(255, 247, 230, 0.16);
  color: rgba(255, 247, 230, 0.8);
  font-size: 13px;
  box-shadow: 0 0 0 calc(1px + var(--glow) * 3px) rgba(255, 210, 63, calc(0.2 + var(--glow) * 0.6));
}

.phs__field {
  --glow: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 247, 230, 0.07);
  border: 1px solid rgba(255, 247, 230, 0.16);
  box-shadow: 0 0 0 calc(1px + var(--glow) * 3px) rgba(255, 210, 63, calc(0.2 + var(--glow) * 0.6));
}

.phs__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff7e6;
  font-size: 13px;
  letter-spacing: 0.06em;
  font-family: inherit;
  min-width: 0;
}

.phs__eyeBtn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #fff7e6;
  cursor: pointer;
  flex: none;
}

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

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

.phs__autofillBtn, .phs__generateBtn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.phs__autofillBtn {
  background: rgba(255, 247, 230, 0.1);
  color: #fff7e6;
}

.phs__generateBtn {
  background: #fff7e6;
  color: #17141a;
}

.phs__autofillBtn:focus-visible, .phs__generateBtn:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 2px;
}

.phs__icoWrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
}

.phs__copyIcon {
  width: 14px;
  height: 14px;
  opacity: 1;
  transition: opacity 220ms ease-out;
}

.phs__checkIcon {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 220ms ease-out;
}

.phs__checkBar {
  position: absolute;
  left: 1px;
  top: 7px;
  height: 2px;
  background: currentColor;
  border-radius: 4px;
  transform-origin: left center;
}

.phs__checkBar--short {
  width: 5px;
  transform: rotate(225deg);
}

.phs__checkBar--long {
  width: 10px;
  transform: rotate(-48deg);
}

.phs.is-generated .phs__copyIcon {
  opacity: 0;
}

.phs.is-generated .phs__checkIcon {
  opacity: 1;
}

.phs::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 210, 63, 0);
  transition: background-color 0.3s ease;
}

.phs.is-generated::before {
  background: rgba(255, 210, 63, 0.1);
}

.phs__hint {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 247, 230, 0.56);
}

@media (max-width: 340px) {
  .phs {
    padding: 12px;
  }
  .phs__card {
    gap: 8px;
  }
  .phs__hint {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .phs__copyIcon, .phs__checkIcon {
    transition: none;
  }
  .phs::before {
    transition: none;
  }
}
