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

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

.phone {
  box-sizing: border-box;
  width: min(296px, 88vw);
  background: #fff7e6;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}
.phone__label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  color: #17141a;
}
.phone__row {
  display: flex;
  gap: 8px;
}
.phone__trigger-wrap {
  position: relative;
  flex: 0 0 auto;
}
.phone__trigger {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 8px;
  background: #fff;
  font-weight: 600;
  font-size: clamp(13px, 3.6vw, 15px);
  font-family: inherit;
  color: #17141a;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 220ms ease-out;
}
.phone__trigger:focus-visible {
  outline: none;
  border-color: #2f6df6;
}
.phone__trigger[aria-expanded=true] {
  border-color: #2f6df6;
}
.phone__flag {
  font-size: 16px;
  line-height: 1;
}
.phone__dial {
  font-variant-numeric: tabular-nums;
}
.phone__chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 220ms ease-out;
}
.phone__trigger[aria-expanded=true] .phone__chevron {
  transform: rotate(180deg);
}
.phone__input {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 12px;
  font-weight: 500;
  font-size: clamp(14px, 4.2vw, 16px);
  font-family: inherit;
  color: #17141a;
  background: #fff;
  transition: border-color 220ms ease-out;
}
.phone__input:focus {
  outline: none;
  border-color: #2f6df6;
}
.phone__hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.72);
}
.phone__listbox {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: min(190px, 75vw);
  max-height: 160px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  z-index: 10;
  transform-origin: top;
  opacity: 0;
  transform: scaleY(0.9) translateY(-4px);
  pointer-events: none;
}
.phone__listbox.is-open {
  opacity: 1;
  transform: scaleY(1) translateY(0);
  pointer-events: auto;
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}
.phone__option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #17141a;
  cursor: pointer;
}
.phone__option-dial {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
.phone__option--active {
  background: rgba(47, 109, 246, 0.12);
}
.phone__option[aria-selected=true] {
  font-weight: 700;
  color: #2f6df6;
}

@media (prefers-reduced-motion: reduce) {
  .phone__listbox {
    transition: none !important;
  }
  .phone__trigger, .phone__input, .phone__chevron {
    transition: none;
  }
}
