html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.compareBox {
  --split: 50%;
  position: relative;
  width: 220px;
  height: 70px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff7e6;
}

.textLayer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #17141a;
}

.textLayer.is-raw {
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 0 1.4px rgba(23, 20, 26, 0.55), 0 0 0.5px rgba(23, 20, 26, 0.4);
}

.textLayer.is-fixed {
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: none;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
  transition: clip-path 140ms ease-out;
}

@supports (-webkit-font-smoothing: antialiased) or (font-smoothing: antialiased) {
  .wrap:not(.force-fallback) .textLayer.is-fixed {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}
.handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 3px;
  margin-left: -1.5px;
  background: #c93000;
  cursor: ew-resize;
  transition: left 140ms ease-out;
}
.handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #c93000;
  transform: translate(-50%, -50%);
}
.handle:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.foot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modeLabel {
  color: #17141a;
  font-size: 10px;
  font-weight: 700;
}

.simToggle {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #17141a;
  color: #fff7e6;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease-out;
}
.simToggle:active {
  transform: scale(0.96);
}
.simToggle[aria-pressed=true] {
  background: #c93000;
}
.simToggle:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .compareBox {
    width: 190px;
    height: 62px;
  }
  .textLayer {
    font-size: 19px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .textLayer.is-fixed {
    transition: none;
  }
  .handle {
    transition: none;
  }
  .simToggle {
    transition: none;
  }
}
