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

.ph {
  position: relative;
  box-sizing: border-box;
  width: 168px;
  height: 156px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.ph__page {
  box-sizing: border-box;
  padding: 16px 12px;
}

.ph__ln {
  display: block;
  height: 6px;
  margin: 0 0 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.14);
}

.ph__dim {
  position: absolute;
  inset: 0;
  background: rgba(23, 20, 26, 0.45);
  opacity: 0;
}

.ph.is-open .ph__dim {
  opacity: 1;
}

.ph__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: #fff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform: translateY(100%);
}

.ph.is-open .ph__sheet {
  transform: translateY(0);
}

.ph__grab {
  display: block;
  width: 32px;
  height: 4px;
  margin: 0 auto 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.2);
  cursor: pointer;
}

.ph__grab:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 4px;
}

.ph__bar {
  box-sizing: border-box;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(23, 20, 26, 0.05);
}

.ph__mag {
  display: inline-flex;
  color: rgba(23, 20, 26, 0.42);
}

.ph__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #17141a;
}

.ph__input:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
  border-radius: 4px;
}

.ph__list {
  margin: 8px 0 0;
}

.ph__opt {
  box-sizing: border-box;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(23, 20, 26, 0.82);
  white-space: nowrap;
  cursor: pointer;
}

.ph__opt.is-at {
  background: rgba(47, 109, 246, 0.12);
  color: #2f6df6;
}

.ph.is-demo .ph__sheet {
  animation: sheet-slide 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.ph.is-demo .ph__dim {
  animation: dim-fade 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes sheet-slide {
  0%, 34% {
    transform: translateY(0);
  }
  56%, 70% {
    transform: translateY(100%);
  }
  92%, 100% {
    transform: translateY(0);
  }
}
@keyframes dim-fade {
  0%, 34% {
    opacity: 1;
  }
  56%, 70% {
    opacity: 0;
  }
  92%, 100% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ph.is-demo .ph__sheet,
  .ph.is-demo .ph__dim {
    animation: none !important;
  }
}
