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

.cf {
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: min(100%, 448px);
}

.cf__reads {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.cf__big {
  color: #ffffff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
}

.cf__sub {
  color: rgba(255, 247, 230, 0.78);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
}

.cf__frame {
  position: relative;
  container-type: inline-size;
  width: min(62%, 30rem);
  box-sizing: border-box;
  padding: 12px 12px 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.cf__inner {
  min-height: 92px;
}

.cf__title {
  margin: 0;
  color: #17141a;
  font-weight: 800;
  font-size: clamp(1.125rem, 13cqw, 3rem);
  line-height: 1.15;
}

.cf__lede {
  margin: 0;
  margin-top: 4px;
  color: rgba(23, 20, 26, 0.78);
  font-weight: 400;
  font-size: clamp(0.75rem, 3.4cqw, 0.875rem);
  line-height: 1.5;
}

.cf__ruler {
  display: block;
  height: 12px;
  margin-top: 8px;
  background: repeating-linear-gradient(90deg, rgba(23, 20, 26, 0.35) 0 1px, transparent 1px 16px);
}

.cf__grip {
  position: absolute;
  top: 50%;
  right: -6px;
  width: 12px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ff4d1f;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  cursor: ew-resize;
  touch-action: none;
  transform: translateY(-50%);
}

.cf__grip:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}

.cf__formula {
  margin: 0;
  color: rgba(255, 247, 230, 0.78);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
}

.cf__note {
  margin: 0;
  color: rgba(255, 247, 230, 0.78);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
}

.cf.is-demo .cf__frame {
  animation-name: cfFrame;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

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

@keyframes cfFrame {
  0%, 6% {
    width: 56%;
  }
  40%, 46% {
    width: 100%;
  }
  86%, 92% {
    width: 46%;
  }
  100% {
    width: 56%;
  }
}
@keyframes cfGrip {
  0%, 41% {
    transform: translateY(-50%) scaleX(1);
  }
  43.5% {
    transform: translateY(-50%) scaleX(1.4);
  }
  46%, 100% {
    transform: translateY(-50%) scaleX(1);
  }
}
@media (max-width: 340px) {
  .cf {
    gap: 4px;
  }
  .cf__big {
    font-size: 16px;
  }
  .cf__sub, .cf__formula {
    font-size: 10px;
  }
  .cf__note {
    display: none;
  }
  .cf__frame {
    padding: 8px 8px 0;
  }
  .cf__inner {
    min-height: 64px;
  }
  .cf__title {
    font-size: clamp(1rem, 11cqw, 2.25rem);
  }
  .cf__grip {
    height: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cf.is-demo .cf__frame {
    animation: none !important;
  }
  .cf.is-demo .cf__grip {
    animation: none !important;
    transform: translateY(-50%) !important;
  }
}
