@property --ax {
  syntax: "<length>";
  initial-value: 20px;
  inherits: true;
}
@property --ay {
  syntax: "<length>";
  initial-value: 112px;
  inherits: true;
}
@property --bx {
  syntax: "<length>";
  initial-value: 300px;
  inherits: true;
}
@property --by {
  syntax: "<length>";
  initial-value: 28px;
  inherits: true;
}
@property --mx {
  syntax: "<length>";
  initial-value: 160px;
  inherits: true;
}
@property --my {
  syntax: "<length>";
  initial-value: 70px;
  inherits: true;
}
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);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cmp {
  --ax: 20px;
  --ay: 112px;
  --bx: 300px;
  --by: 28px;
  --mx: 160px;
  --my: 70px;
  box-sizing: border-box;
  width: min(392px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.cmp__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}

.cmp__title {
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cmp__val {
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  color: #ffd23f;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cmp__plot {
  position: relative;
}

.cmp__svg {
  display: block;
  width: 100%;
  height: auto;
}

.cmp__grid line {
  stroke: rgba(255, 247, 230, 0.14);
  stroke-width: 1;
}

.cmp__labels text {
  fill: rgba(255, 247, 230, 0.5);
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
}

.cmp__line {
  fill: none;
  stroke: #2f6df6;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cmp__l1, .cmp__l2 {
  fill: none;
  stroke: #ffd23f;
  stroke-width: 2;
  stroke-dasharray: 6 6;
  stroke-linecap: round;
}

.cmp__draw1 {
  transform-box: fill-box;
  transform-origin: 0% 100%;
}

.cmp__draw2 {
  transform-box: fill-box;
  transform-origin: 100% 0%;
}

.cmp__baseIn, .cmp__pinBIn, .cmp__badgeIn {
  transform-box: fill-box;
  transform-origin: center;
}

.cmp__aring {
  fill: none;
  stroke: #fff7e6;
  stroke-width: 2.5;
}

.cmp__adot {
  fill: #fff7e6;
}

.cmp__bring {
  fill: none;
  stroke: #ffd23f;
  stroke-width: 2.5;
}

.cmp__bdot {
  fill: #ffd23f;
}

.cmp__badgeIn rect {
  fill: #ffd23f;
}

.cmp__badgeIn text {
  fill: #17141a;
  font-size: 12px;
  font-weight: 800;
}

.cmp__pt {
  position: absolute;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

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

.cmp__dot {
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto;
  border-radius: 50%;
  background: #fff7e6;
  transition-property: transform, background-color;
  transition-duration: 220ms;
  transition-timing-function: ease-out;
}

.cmp__pt:hover .cmp__dot {
  transform: scale(1.35);
}

.cmp__pt[aria-pressed=true] .cmp__dot {
  background: #ffd23f;
  transform: scale(1.2);
}

.cmp.is-demo .cmp__pt[aria-pressed=true] .cmp__dot {
  background: #fff7e6;
  transform: none;
}

.cmp__hint {
  margin: 0;
  padding: 0 4px;
  font-size: 11px;
  line-height: 16px;
  color: rgba(255, 247, 230, 0.55);
}

.cmp__base {
  transform: translate(var(--ax), var(--ay));
}

.cmp__link, .cmp__pinB, .cmp__badge1 {
  opacity: 0;
}

.cmp__badge2 {
  opacity: 0;
  transform: translate(240px, 37px);
}

.cmp__linkpos {
  transform: translate(var(--ax), var(--ay));
}

.cmp__draw1 {
  transform: scale(0);
}

.cmp__pinB {
  transform: translate(var(--bx), var(--by));
}

.cmp__pinBIn {
  transform: scale(0.5);
}

.cmp__badge1 {
  transform: translate(var(--mx), var(--my));
}

.cmp__badgeIn {
  transform: scale(1);
}

.cmp__l1 {
  opacity: 0;
}

.cmp__l2 {
  opacity: 0;
}

.cmp[data-b] .cmp__link,
.cmp[data-b] .cmp__pinB,
.cmp[data-b] .cmp__badge1 {
  opacity: 1;
}

.cmp[data-b] .cmp__l1 {
  opacity: 1;
}

.cmp[data-b] .cmp__draw1 {
  transform: scale(1);
}

.cmp[data-b] .cmp__pinBIn {
  transform: scale(1);
}

.cmp:not(.is-demo) .cmp__base,
.cmp:not(.is-demo) .cmp__linkpos,
.cmp:not(.is-demo) .cmp__draw1,
.cmp:not(.is-demo) .cmp__pinB,
.cmp:not(.is-demo) .cmp__pinBIn,
.cmp:not(.is-demo) .cmp__badge1 {
  transition-property: transform, opacity;
  transition-duration: 220ms;
  transition-timing-function: ease-out;
}

.cmp:not(.is-demo) .cmp__badge1 {
  transform: translate(var(--mx), var(--my)) scale(0.7);
}

.cmp[data-b]:not(.is-demo) .cmp__badge1 {
  transform: translate(var(--mx), var(--my)) scale(1);
}

.cmp.is-demo .cmp__base {
  animation-name: cp-base-pos;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes cp-base-pos {
  0% {
    transform: translate(20px, 112px);
  }
  46% {
    transform: translate(300px, 28px);
  }
  84% {
    transform: translate(20px, 112px);
  }
  100% {
    transform: translate(20px, 112px);
  }
}
.cmp.is-demo .cmp__baseIn {
  animation-name: cp-base-pop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes cp-base-pop {
  0%, 46%, 84% {
    transform: scale(0.5);
  }
  8%, 54%, 92% {
    transform: scale(1.15);
  }
  14%, 60%, 98%, 100% {
    transform: scale(1);
  }
}
.cmp.is-demo .cmp__link {
  animation-name: cp-link-face;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes cp-link-face {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  46% {
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  84% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cmp.is-demo .cmp__linkpos {
  animation-name: cp-link-pos;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes cp-link-pos {
  0% {
    transform: translate(20px, 112px);
  }
  46% {
    transform: translate(300px, 28px);
  }
  100% {
    transform: translate(300px, 28px);
  }
}
.cmp.is-demo .cmp__l1 {
  animation-name: cp-l1-face;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes cp-l1-face {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  46% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cmp.is-demo .cmp__l2 {
  animation-name: cp-l2-face;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes cp-l2-face {
  0% {
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  84% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cmp.is-demo .cmp__draw1 {
  animation-name: cp-draw1;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes cp-draw1 {
  0%, 12% {
    transform: scale(0);
  }
  26%, 100% {
    transform: scale(1);
  }
}
.cmp.is-demo .cmp__draw2 {
  animation-name: cp-draw2;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes cp-draw2 {
  0%, 58% {
    transform: scale(0);
  }
  72%, 100% {
    transform: scale(1);
  }
}
.cmp.is-demo .cmp__pinB {
  animation-name: cp-pinb-pos, cp-pinb-face;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), steps(1, end);
  animation-iteration-count: infinite, infinite;
}

@keyframes cp-pinb-pos {
  0% {
    transform: translate(300px, 28px);
  }
  58% {
    transform: translate(180px, 46px);
  }
  100% {
    transform: translate(180px, 46px);
  }
}
@keyframes cp-pinb-face {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  46% {
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  84% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cmp.is-demo .cmp__pinBIn {
  animation-name: cp-pinb-pop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes cp-pinb-pop {
  0%, 12% {
    transform: scale(0.4);
  }
  20% {
    transform: scale(1.15);
  }
  28%, 46% {
    transform: scale(1);
  }
  58% {
    transform: scale(0.4);
  }
  66% {
    transform: scale(1.15);
  }
  74%, 100% {
    transform: scale(1);
  }
}
.cmp.is-demo .cmp__badge1 {
  animation-name: cp-b1-face;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes cp-b1-face {
  0% {
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  42% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cmp.is-demo .cmp__badge1 .cmp__badgeIn {
  animation-name: cp-b1-pop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes cp-b1-pop {
  0%, 24% {
    transform: scale(0.55);
  }
  32% {
    transform: scale(1.08);
  }
  40%, 100% {
    transform: scale(1);
  }
}
.cmp.is-demo .cmp__badge2 {
  animation-name: cp-b2-face;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes cp-b2-face {
  0% {
    opacity: 0;
  }
  68% {
    opacity: 1;
  }
  80% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cmp.is-demo .cmp__badge2 .cmp__badgeIn {
  animation-name: cp-b2-pop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes cp-b2-pop {
  0%, 68% {
    transform: scale(0.55);
  }
  76% {
    transform: scale(1.08);
  }
  84%, 100% {
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .cmp {
    padding: 8px;
    gap: 4px;
  }
  .cmp__hint {
    display: none;
  }
  .cmp__title, .cmp__val {
    font-size: 12px;
    line-height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cmp.is-demo .cmp__base,
  .cmp.is-demo .cmp__baseIn,
  .cmp.is-demo .cmp__link,
  .cmp.is-demo .cmp__linkpos,
  .cmp.is-demo .cmp__l1,
  .cmp.is-demo .cmp__l2,
  .cmp.is-demo .cmp__draw1,
  .cmp.is-demo .cmp__draw2,
  .cmp.is-demo .cmp__pinB,
  .cmp.is-demo .cmp__pinBIn,
  .cmp.is-demo .cmp__badge1,
  .cmp.is-demo .cmp__badge2 {
    animation: none !important;
  }
  .cmp:not(.is-demo) .cmp__base,
  .cmp:not(.is-demo) .cmp__linkpos,
  .cmp:not(.is-demo) .cmp__draw1,
  .cmp:not(.is-demo) .cmp__pinB,
  .cmp:not(.is-demo) .cmp__pinBIn,
  .cmp:not(.is-demo) .cmp__badge1,
  .cmp:not(.is-demo) .cmp__badgeIn,
  .cmp__dot {
    transition: none !important;
  }
}
