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 --w {
  syntax: "<length>";
  inherits: true;
  initial-value: 280px;
}
.as {
  --w: 280px;
  --split: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.as__frame {
  display: grid;
  place-items: center;
  width: 288px;
  max-width: 92vw;
  height: 116px;
}

.as__box {
  box-sizing: border-box;
  width: min(var(--w), 100%);
  height: 116px;
  display: grid;
  grid-template-columns: var(--split) 8px 1fr;
  grid-template-rows: 1fr;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(23, 20, 26, 0.24);
}

.as.is-stack .as__box {
  grid-template-columns: 1fr;
  grid-template-rows: var(--split) 8px 1fr;
}

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

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

.as__ln--d {
  background: rgba(255, 247, 230, 0.3);
}

.as__ln--s {
  width: 56%;
}

.as__pane--a {
  background: rgba(255, 247, 230, 0.88);
}

.as__pane--b {
  background: rgba(23, 20, 26, 0.72);
}

.as__bar {
  display: grid;
  place-items: center;
  background: rgba(47, 109, 246, 0.9);
  cursor: col-resize;
  touch-action: none;
}

.as.is-stack .as__bar {
  cursor: row-resize;
}

.as__grip {
  display: block;
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: #fff7e6;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.as.is-stack .as__grip {
  transform: rotate(90deg);
}

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

.as__cap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  color: #17141a;
  text-align: center;
}

.as__ico {
  display: block;
  width: 14px;
  height: 14px;
}

.as__ico svg {
  display: block;
  width: 14px;
  height: 14px;
}

.as__ico--narrow {
  opacity: 0.35;
}

.as.is-demo .as__box {
  animation-name: as-width, as-mode;
  animation-duration: 2s, 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), steps(1, end);
  animation-iteration-count: infinite, infinite;
}

@keyframes as-width {
  0%, 10% {
    --w: 280px;
  }
  44%, 58% {
    --w: 148px;
  }
  88%, 100% {
    --w: 280px;
  }
}
@keyframes as-mode {
  0%, 30% {
    grid-template-columns: var(--split) 8px 1fr;
    grid-template-rows: 1fr;
  }
  31%, 71% {
    grid-template-columns: 1fr;
    grid-template-rows: var(--split) 8px 1fr;
  }
  72%, 100% {
    grid-template-columns: var(--split) 8px 1fr;
    grid-template-rows: 1fr;
  }
}
.as.is-demo .as__grip {
  animation: as-grip 2s steps(1, end) infinite;
}

@keyframes as-grip {
  0%, 30% {
    transform: rotate(0deg);
  }
  31%, 71% {
    transform: rotate(90deg);
  }
  72%, 100% {
    transform: rotate(0deg);
  }
}
.as.is-demo .as__ico--wide {
  animation: as-w 2s steps(1, end) infinite;
}

.as.is-demo .as__ico--narrow {
  animation: as-n 2s steps(1, end) infinite;
}

@keyframes as-w {
  0%, 30% {
    opacity: 1;
  }
  31%, 71% {
    opacity: 0.35;
  }
  72%, 100% {
    opacity: 1;
  }
}
@keyframes as-n {
  0%, 30% {
    opacity: 0.35;
  }
  31%, 71% {
    opacity: 1;
  }
  72%, 100% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .as.is-demo .as__box,
  .as.is-demo .as__grip,
  .as.is-demo .as__ico--wide,
  .as.is-demo .as__ico--narrow {
    animation: none !important;
  }
  .as__grip {
    transition: none;
  }
}
@media (max-width: 340px) {
  .as__frame {
    height: 104px;
  }
  .as__box {
    height: 104px;
  }
}
