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

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

.ca {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(100%, 300px);
}

.ca__scene {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #452040 0%, #905947 100%);
}

.ca__lowsun {
  position: absolute;
  left: 50%;
  top: 26px;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.9) 0 40%, rgba(255, 210, 63, 0) 75%);
}

.ca__road {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  clip-path: polygon(26% 0, 74% 0, 100% 100%, 0 100%);
  background: #241019;
  overflow: hidden;
}

.ca__marks {
  position: absolute;
  left: 50%;
  top: -72px;
  width: 8px;
  height: 144px;
  margin-left: -4px;
  animation-name: caFlow;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.ca__dash {
  display: block;
  width: 8px;
  height: 12px;
  margin-bottom: 12px;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.75);
}

.ca__car {
  position: absolute;
  left: 50%;
  bottom: 46px;
  width: 104px;
  height: 58px;
  margin-left: -52px;
  animation-name: caNear;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.ca__body {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  bottom: 6px;
  border-radius: 16px 16px 8px 8px;
  background: #17141a;
}

.ca__shield {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 20px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #55506b 0%, #3a3547 100%);
}

.ca__grille {
  position: absolute;
  left: 30px;
  right: 30px;
  top: 34px;
  height: 6px;
  border-radius: 999px;
  background: #17141f;
}

.ca__lamp {
  position: absolute;
  top: 30px;
  width: 14px;
  height: 10px;
  border-radius: 999px;
  background: #fff2c8;
  box-shadow: 0 0 10px rgba(255, 242, 200, 0.9);
}

.ca__lamp--l {
  left: 6px;
}

.ca__lamp--r {
  right: 6px;
}

.ca__glow {
  position: absolute;
  top: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.55) 0 38%, rgba(255, 210, 63, 0) 72%);
  animation-name: caGlow;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  transition: transform 300ms ease-out, opacity 300ms ease-out;
}

.ca__glow--l {
  left: -10px;
}

.ca__glow--r {
  right: -10px;
}

.ca.is-beam .ca__glow {
  animation-name: none;
  transform: scale(1.7);
  opacity: 1;
}

.ca__indi {
  position: absolute;
  top: 44px;
  width: 8px;
  height: 6px;
  border-radius: 999px;
  background: #c8b48f;
  animation-name: caBlink;
  animation-duration: 500ms;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.ca__indi--l {
  left: 0;
}

.ca__indi--r {
  right: 0;
}

.ca__wheel {
  position: absolute;
  bottom: 0;
  width: 16px;
  height: 8px;
  border-radius: 0 0 999px 999px;
  background: #0e0c12;
}

.ca__wheel--l {
  left: 14px;
}

.ca__wheel--r {
  right: 14px;
}

.ca__btn {
  box-sizing: border-box;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: #0a4fe8;
  color: #fff7e6;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

@keyframes caNear {
  from {
    transform: scale(0.84);
  }
  to {
    transform: scale(1.1);
  }
}
@keyframes caGlow {
  from {
    transform: scale(0.92);
    opacity: 0.5;
  }
  to {
    transform: scale(1.08);
    opacity: 0.8;
  }
}
@keyframes caFlow {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(72px);
  }
}
@keyframes caBlink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.12;
  }
  100% {
    opacity: 1;
  }
}
.ca:not(.is-demo) .ca__car {
  animation-name: none;
}

@media (max-width: 340px) {
  .ca__scene {
    height: 126px;
  }
  .ca__road {
    height: 64px;
  }
  .ca__car {
    bottom: 34px;
    width: 88px;
    margin-left: -44px;
  }
  .ca__glow {
    width: 36px;
    height: 36px;
  }
  .ca__btn {
    padding: 4px 12px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ca__car, .ca__glow, .ca__marks, .ca__indi {
    animation-name: none !important;
  }
  .ca__glow {
    transition: none !important;
  }
}
