:root {
  color-scheme: light;
  background: #182d26;
  color: #23392d;
  font-family: system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: clamp(1rem, 4vw, 4rem);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 16% 19%, #ffe1a240 0 1px, transparent 2px) 0 0 / 127px 103px,
    radial-gradient(circle at 68% 71%, #ffefd51f 0 1px, transparent 2px) 0 0 / 83px 139px,
    radial-gradient(ellipse at 48% 28%, #324b3c, transparent 75%);
}

.card {
  width: min(100%, 74rem);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "message art";
  padding: clamp(0.45rem, 1vw, 0.75rem);
  border: 1px solid #ecce92;
  border-radius: 1.15rem;
  background: #f9f1e4;
  box-shadow: 0 1.5rem 4rem #0a161180, 0 0 0 0.35rem #ffdf9a20;
}

.card-art {
  grid-area: art;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 0.65rem;
  background: radial-gradient(ellipse at 68% 28%, #fff8df, transparent 63%), #e3e3ce;
}

.card-art > :is(img, canvas) {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-art > img[hidden] {
  display: none;
}

.motion-control {
  position: absolute;
  z-index: 1;
  inset: auto 0.55rem 0.55rem auto;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid #3c493945;
  border-radius: 50%;
  background: #f9f1e4;
  color: #23392d;
  cursor: pointer;
}

.motion-control[hidden] {
  display: none;
}

.motion-control span {
  width: 0.58rem;
  height: 0.72rem;
  border-inline: 2px solid currentColor;
}

.motion-control.is-paused span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border: 0;
  border-block: 0.36rem solid transparent;
  border-left: 0.56rem solid currentColor;
}

.card-message {
  grid-area: message;
  align-self: center;
  padding: clamp(2.2rem, 4.5vw, 4.5rem) 0.85rem;
  text-align: center;
}

h1 {
  margin: 1.15rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4.6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.candles {
  display: flex;
  width: max-content;
  height: 3.2rem;
  align-items: flex-end;
  gap: 0.4rem;
  margin: 0 auto;
  padding: 0 0.65rem 0.18rem;
  border-bottom: 1px solid #b19665;
}

.candle {
  position: relative;
  width: 0.78rem;
  height: 1.9rem;
  border-radius: 0.18rem 0.18rem 0.08rem 0.08rem;
  background: linear-gradient(90deg, #a35247, #c47c69 48%, #a35247);
}

.candle + .candle {
  height: 1.48rem;
}

.candle::before {
  position: absolute;
  bottom: calc(100% + 0.1rem);
  left: 50%;
  width: 0.48rem;
  height: 0.72rem;
  border-radius: 85% 15% 62% 38%;
  background: linear-gradient(#d8933c, #ffd78b);
  box-shadow: 0 0 0.6rem #f0ad5b80;
  transform: translateX(-50%) rotate(9deg);
  content: "";
}

@media (max-width: 47rem) {
  .card {
    max-width: 33rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "art" "message";
  }

  .card-message {
    padding-block: 1.5rem 2rem;
  }

  h1 {
    font-size: clamp(2rem, 8.5vw, 3.5rem);
  }
}
