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

@property --col {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 30%;
}
@property --row {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 66%;
}
.tp {
  --col: 30%;
  --row: 66%;
  width: min(320px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tp__box {
  display: grid;
  grid-template-columns: var(--col) 8px 1fr;
  height: 128px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.tp__main {
  display: grid;
  grid-template-rows: var(--row) 8px 1fr;
  overflow: hidden;
}

.tp__side,
.tp__edit,
.tp__term {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
}

.tp__side {
  background: rgba(47, 109, 246, 0.2);
}

.tp__edit {
  background: rgba(255, 247, 230, 0.06);
}

.tp__term {
  background: rgba(23, 20, 26, 0.55);
}

.tp__ico {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: #fff7e6;
}

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

.tp__term .tp__ico {
  color: #4cd4a6;
}

.tp__row,
.tp__tok {
  flex: 0 0 auto;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.3);
}

.tp__row--on {
  background: #fff7e6;
}

.tp__tok--a {
  width: 78%;
  background: #2f6df6;
}

.tp__tok--b {
  width: 54%;
}

.tp__tok--c {
  width: 90%;
}

.tp__tok--d {
  width: 62%;
  background: rgba(76, 212, 166, 0.7);
}

.tp__bar {
  background: rgba(255, 247, 230, 0.16);
  touch-action: none;
  transition: background 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tp__bar--v {
  cursor: col-resize;
}

.tp__bar--h {
  cursor: row-resize;
}

.tp__bar:hover {
  background: #2f6df6;
}

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

.tp__cap {
  margin: 0;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: rgba(255, 247, 230, 0.55);
  text-align: center;
}

.tp.is-demo {
  animation: tp-move 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes tp-move {
  0%, 6% {
    --col: 30%;
    --row: 66%;
  }
  26% {
    --col: 56%;
    --row: 66%;
  }
  44% {
    --col: 16%;
    --row: 66%;
  }
  60% {
    --col: 30%;
    --row: 30%;
  }
  76% {
    --col: 30%;
    --row: 78%;
  }
  88%, 100% {
    --col: 30%;
    --row: 66%;
  }
}
.tp.is-demo .tp__bar--v {
  animation: tp-hot-a 2s steps(1, end) infinite;
}

.tp.is-demo .tp__bar--h {
  animation: tp-hot-b 2s steps(1, end) infinite;
}

@keyframes tp-hot-a {
  0%, 5% {
    background: rgba(255, 247, 230, 0.16);
  }
  6%, 45% {
    background: #2f6df6;
  }
  46%, 100% {
    background: rgba(255, 247, 230, 0.16);
  }
}
@keyframes tp-hot-b {
  0%, 45% {
    background: rgba(255, 247, 230, 0.16);
  }
  46%, 87% {
    background: #2f6df6;
  }
  88%, 100% {
    background: rgba(255, 247, 230, 0.16);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tp.is-demo,
  .tp.is-demo .tp__bar--v,
  .tp.is-demo .tp__bar--h {
    animation: none !important;
  }
  .tp__bar {
    transition: none;
  }
}
@media (max-width: 340px) {
  .tp__box {
    height: 112px;
  }
  .tp__side, .tp__edit, .tp__term {
    padding: 4px;
  }
}
