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

.em__defs {
  position: absolute;
  width: 0;
  height: 0;
}

.em {
  display: grid;
  gap: 8px;
  box-sizing: border-box;
  width: min(100%, 432px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.em__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 16px;
  border-left: 3px solid #2f6df6;
  background: #fff7e6;
}

.em__mood {
  position: absolute;
  inset: -60% -20%;
  z-index: 0;
  mix-blend-mode: multiply;
  rotate: -9deg;
}

.em__mood--a {
  background: linear-gradient(104deg, rgba(255, 210, 63, 0) 22%, #ffd23f 48%, #ff4d1f 96%);
}

.em__mood--b {
  background: linear-gradient(104deg, rgba(76, 212, 166, 0) 22%, #4cd4a6 48%, #6ec8ff 96%);
}

.em__mood--c {
  background: linear-gradient(104deg, rgba(185, 160, 255, 0) 22%, #b9a0ff 48%, #ff9ebb 96%);
}

.em__day, .em__body {
  position: relative;
  z-index: 1;
}

.em__day {
  display: grid;
  justify-items: center;
  gap: 0;
}

.em__num {
  color: #17141a;
  font-weight: 800;
  font-size: clamp(20px, 6.4vw, 28px);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.em__mon {
  color: #17141a;
  font-weight: 700;
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1.3;
}

.em__body {
  display: grid;
  gap: 4px;
}

.em__line {
  overflow: hidden;
}

.em__title {
  margin: 0;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(11px, 3.2vw, 14px);
  line-height: 1.25;
}

.em__place {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #17141a;
  font-weight: 500;
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1.3;
}

.em__ic {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: #2f6df6;
}

.em__link {
  justify-self: start;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.em__link:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
  border-radius: 4px;
}

.em.is-demo .em__mood {
  animation-name: emTilt;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.em.is-demo .em__card:nth-child(2) .em__mood {
  animation-delay: 0.18s;
}

.em.is-demo .em__card:nth-child(3) .em__mood {
  animation-delay: 0.36s;
}

.em.is-demo .em__title {
  animation-name: emRise;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.em.is-demo .em__card:nth-child(2) .em__title {
  animation-delay: 0.18s;
}

.em.is-demo .em__card:nth-child(3) .em__title {
  animation-delay: 0.36s;
}

@keyframes emTilt {
  0% {
    rotate: -9deg;
  }
  50% {
    rotate: 9deg;
  }
  100% {
    rotate: -9deg;
  }
}
@keyframes emRise {
  0% {
    transform: translateY(120%);
  }
  30% {
    transform: translateY(0);
  }
  74% {
    transform: translateY(0);
  }
  88%, 100% {
    transform: translateY(120%);
  }
}
@media (max-width: 340px) {
  .em {
    gap: 4px;
  }
  .em__card {
    gap: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .em__body {
    gap: 0;
  }
  .em__ic {
    width: 10px;
    height: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .em.is-demo .em__mood,
  .em.is-demo .em__title {
    animation: none !important;
    transform: none !important;
  }
}
