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

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

.cl {
  display: grid;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.cl__card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: min(252px, 92vw);
  min-height: 96px;
  padding: 16px 16px 16px 16px;
  border: 1px solid rgba(23, 20, 26, 0.2);
  border-radius: 16px;
  background: #ffffff;
  color: #17141a;
}

.cl__msg {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.cl__undo {
  grid-column: 1/-1;
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(23, 20, 26, 0.6);
  opacity: 0;
}

.cl__back {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #2f6df6;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
  cursor: pointer;
}

.cl__back:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 1px;
}

.cl__btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #17141a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.cl__btn:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 3px;
}

.cl__ring {
  position: absolute;
  inset: 0;
  border: 3px dashed currentColor;
  border-radius: 50%;
  opacity: 0.35;
  transform: rotate(0deg);
}

.cl__x {
  display: inline-flex;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cl__btn:hover .cl__ring,
.cl__btn:focus-visible .cl__ring {
  opacity: 1;
  animation-name: cl-spin;
  animation-duration: 900ms;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.cl__btn:hover .cl__x,
.cl__btn:focus-visible .cl__x {
  transform: rotate(90deg);
}

.cl__btn:active .cl__x {
  transform: rotate(90deg) scale(0.86);
}

@keyframes cl-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.cl.is-gone .cl__card {
  display: grid;
  grid-template-rows: 0fr 1fr;
  align-content: start;
  padding: 0 20px 0 16px;
  min-height: 0;
  border-style: dashed;
  overflow: hidden;
}

.cl.is-gone .cl__msg {
  grid-row: 1;
  min-height: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
}

.cl.is-gone .cl__btn {
  display: none;
}

.cl.is-gone .cl__undo {
  opacity: 1;
  padding: 8px 0;
}

@keyframes cl-loop-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes cl-loop-x {
  0%, 10% {
    transform: rotate(0deg);
  }
  30%, 100% {
    transform: rotate(90deg);
  }
}
@keyframes cl-loop-seat {
  0%, 9% {
    background: transparent;
    color: #17141a;
  }
  10%, 86% {
    background: #17141a;
    color: #ffd23f;
  }
  87%, 100% {
    background: transparent;
    color: #17141a;
  }
}
.cl.is-demo .cl__ring {
  opacity: 1;
  animation-name: cl-loop-spin;
  animation-duration: 900ms;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.cl.is-demo .cl__x {
  animation-name: cl-loop-x;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}
.cl.is-demo .cl__btn {
  animation-name: cl-loop-seat;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .cl__card {
    padding: 12px 16px 12px 12px;
    min-height: 84px;
  }
  .cl__msg {
    font-size: 12px;
  }
  .cl__btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cl.is-demo .cl__ring,
  .cl.is-demo .cl__x,
  .cl.is-demo .cl__btn {
    animation: none !important;
    transform: none !important;
  }
  .cl.is-demo .cl__ring {
    opacity: 1 !important;
  }
  .cl.is-demo .cl__x {
    transform: rotate(90deg) !important;
  }
  .cl.is-demo .cl__btn {
    background: #17141a !important;
    color: #ffd23f !important;
  }
  .cl__btn:hover .cl__ring,
  .cl__btn:focus-visible .cl__ring {
    animation: none !important;
  }
}
