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

.ca {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-bottom: 8px;
}

.ca__card {
  width: min(100%, 420px);
  background: #fff7e6;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  padding: 12px 16px 8px;
}

.ca__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ca__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(12px, 3vw, 14px);
  color: #17141a;
}

.ca__chip {
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 10px);
  color: rgba(23, 20, 26, 0.66);
  border: 1px solid rgba(23, 20, 26, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
}

.ca__plot {
  position: relative;
}

.ca__svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.ca__grid line {
  stroke: rgba(23, 20, 26, 0.12);
  stroke-width: 1;
}

.ca__ticks text, .ca__labels text {
  fill: rgba(23, 20, 26, 0.72);
  font-weight: 700;
  font-size: 9px;
  text-anchor: end;
  dominant-baseline: middle;
}

.ca__labels text {
  text-anchor: middle;
  font-size: 9.5px;
}

.ca__axis {
  stroke: rgba(23, 20, 26, 0.32);
  stroke-width: 1.5;
}

.ca__layer {
  fill-opacity: 0.9;
  stroke: #fff7e6;
  stroke-width: 1.5;
}

.ca__layer--1 {
  fill: #2f6df6;
}

.ca__layer--2 {
  fill: #c2361a;
}

.ca__layer--3 {
  fill: #2b9d74;
}

.ca__lab {
  fill: #17141a;
  font-weight: 800;
  font-size: 10px;
  dominant-baseline: middle;
}

.ca__lab--2 {
  fill: #ffffff;
}

.ca__guide {
  stroke: #fff7e6;
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  opacity: 0;
}

.ca__guide.is-on {
  opacity: 0.95;
}

.ca__tip {
  position: absolute;
  top: 4px;
  transform: translate(-50%, -4px) scale(0.96);
  transform-origin: 50% 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  background: #17141a;
  color: #ffffff;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 700;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
}

.ca__tip.is-on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}

.ca__tipMon {
  font-size: 11px;
}

.ca__tipRow {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ca__tipName {
  opacity: 0.72;
}

.ca__tipRow b {
  font-size: 11px;
  margin-left: auto;
}

.ca__sw {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.ca__sw--1 {
  background: #2f6df6;
}

.ca__sw--2 {
  background: #c2361a;
}

.ca__sw--3 {
  background: #2b9d74;
}

.ca__sr {
  position: fixed;
  top: 0;
  left: -640px;
  width: 320px;
  margin: 0;
}

.ca.is-demo .ca__layer {
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.ca.is-demo .ca__layer--1 {
  animation-name: caWipe1;
}

.ca.is-demo .ca__layer--2 {
  animation-name: caWipe2;
}

.ca.is-demo .ca__layer--3 {
  animation-name: caWipe3;
}

@keyframes caWipe1 {
  0%, 4% {
    clip-path: inset(100% 0 0 0);
  }
  26%, 96% {
    clip-path: inset(0 0 0 0);
  }
  98%, 100% {
    clip-path: inset(100% 0 0 0);
  }
}
@keyframes caWipe2 {
  0%, 28% {
    clip-path: inset(100% 0 0 0);
  }
  48%, 96% {
    clip-path: inset(0 0 0 0);
  }
  98%, 100% {
    clip-path: inset(100% 0 0 0);
  }
}
@keyframes caWipe3 {
  0%, 50% {
    clip-path: inset(100% 0 0 0);
  }
  66%, 96% {
    clip-path: inset(0 0 0 0);
  }
  98%, 100% {
    clip-path: inset(100% 0 0 0);
  }
}
.ca.is-demo .ca__lab,
.ca.is-demo .ca__tip,
.ca.is-demo .ca__guide {
  animation-name: caReveal;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes caReveal {
  0%, 68% {
    opacity: 0;
  }
  70%, 96% {
    opacity: 1;
  }
  98%, 100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .ca__labels text:nth-child(even) {
    display: none;
  }
  .ca__labels text {
    font-size: 9px;
  }
  .ca__card {
    padding: 8px 12px 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ca.is-demo .ca__layer,
  .ca.is-demo .ca__lab,
  .ca.is-demo .ca__tip,
  .ca.is-demo .ca__guide {
    animation: none !important;
  }
  .ca.is-demo .ca__layer {
    clip-path: none !important;
  }
  .ca.is-demo .ca__lab {
    opacity: 1 !important;
  }
}
