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

@property --split {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 46%;
}
.hg {
  --split: 46%;
  width: min(300px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hg__box {
  display: grid;
  grid-template-columns: var(--split) 20px 1fr;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(23, 20, 26, 0.2);
}

.hg__pane {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

.hg__ln {
  flex: 0 0 auto;
  height: 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.2);
}

.hg__ln--d {
  background: rgba(255, 247, 230, 0.32);
}

.hg__ln--s {
  width: 58%;
}

.hg__pane--l {
  background: rgba(255, 247, 230, 0.9);
}

.hg__pane--r {
  background: rgba(23, 20, 26, 0.78);
}

.hg__bar {
  position: relative;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.hg__hair {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 20px;
  border-radius: 999px;
  background: #17141a;
  transform: translateX(-10px) scaleX(0.1);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hg__dots {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hg__dots s {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff7e6;
}

.hg.is-near .hg__hair,
.hg__bar:hover .hg__hair {
  transform: translateX(-10px) scaleX(1);
}

.hg.is-near .hg__dots,
.hg__bar:hover .hg__dots {
  opacity: 1;
  transform: scale(1);
}

.hg.is-drag .hg__hair {
  background: #2f6df6;
}

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

.hg__cap {
  margin: 0;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  color: #17141a;
  text-align: center;
}

.hg.is-demo .hg__hair {
  animation-name: hg-hair;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes hg-hair {
  0%, 10% {
    transform: translateX(-10px) scaleX(0.1);
    background: #17141a;
  }
  26%, 34% {
    transform: translateX(-10px) scaleX(1);
    background: #17141a;
  }
  44%, 72% {
    transform: translateX(-10px) scaleX(1);
    background: #2f6df6;
  }
  86%, 100% {
    transform: translateX(-10px) scaleX(0.1);
    background: #17141a;
  }
}
.hg.is-demo .hg__dots {
  animation-name: hg-dots;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes hg-dots {
  0%, 12% {
    opacity: 0;
    transform: scale(0.5);
  }
  28%, 74% {
    opacity: 1;
    transform: scale(1);
  }
  86%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
}
.hg.is-demo {
  animation-name: hg-split;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes hg-split {
  0%, 40% {
    --split: 46%;
  }
  70% {
    --split: 66%;
  }
  86%, 100% {
    --split: 46%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hg.is-demo,
  .hg.is-demo .hg__hair,
  .hg.is-demo .hg__dots {
    animation: none !important;
  }
  .hg__hair, .hg__dots {
    transition: none;
  }
}
@media (max-width: 340px) {
  .hg__box {
    height: 104px;
  }
}
