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

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

.tm {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.tm__card {
  box-sizing: border-box;
  width: min(236px, 92vw);
  padding: 12px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
}

.tm__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tm__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2f6df6;
}

.tm__who {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.tm__line {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.tm__line--a {
  opacity: 0.95;
}

.tm__line--b {
  opacity: 0.7;
}

.tm__line--c {
  opacity: 0.45;
}

.tm__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 12px 4px 4px;
  border: 1px solid rgba(255, 247, 230, 0.24);
  border-radius: 999px;
  background: rgb(19.937254902%, 18.5254901961%, 19.7960784314%);
  color: #fff7e6;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
}

.tm__btn:focus-visible {
  outline: 2px solid #b9a0ff;
  outline-offset: 2px;
}

.tm__disc {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffd23f;
  color: #17141a;
  font-size: 20px;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tm__sun,
.tm__moon {
  position: absolute;
  grid-area: 1/1;
  transition: opacity 0ms, transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tm__moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}

.tm__t {
  position: relative;
  display: inline-grid;
}

.tm__t-day,
.tm__t-night {
  grid-area: 1/1;
}

.tm__t-night {
  opacity: 0;
}

.tm.is-dark .tm__t-day {
  opacity: 0;
}

.tm.is-dark .tm__t-night {
  opacity: 1;
}

.tm.is-dark .tm__card {
  background: rgb(20.4549019608%, 17.7254901961%, 26.3607843137%);
  color: #fff7e6;
}

.tm.is-dark .tm__sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}

.tm.is-dark .tm__moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.tm.is-dark .tm__disc {
  background: #b9a0ff;
  color: #17141a;
  transform: rotate(180deg);
}

@keyframes tm-loop-sun {
  0%, 36% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
  52%, 78% {
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
  }
  94%, 100% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}
@keyframes tm-loop-moon {
  0%, 36% {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
  }
  52%, 78% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
  94%, 100% {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
  }
}
@keyframes tm-loop-card {
  0%, 44% {
    background: #fff7e6;
    color: #17141a;
  }
  45%, 79% {
    background: rgb(20.4549019608%, 17.7254901961%, 26.3607843137%);
    color: #fff7e6;
  }
  80%, 100% {
    background: #fff7e6;
    color: #17141a;
  }
}
@keyframes tm-loop-disc {
  0%, 36% {
    background: #ffd23f;
    color: #17141a;
    transform: rotate(0deg);
  }
  52%, 78% {
    background: #b9a0ff;
    color: #17141a;
    transform: rotate(180deg);
  }
  94%, 100% {
    background: #ffd23f;
    color: #17141a;
    transform: rotate(360deg);
  }
}
@keyframes tm-loop-day {
  0%, 44% {
    opacity: 1;
  }
  45%, 79% {
    opacity: 0;
  }
  80%, 100% {
    opacity: 1;
  }
}
@keyframes tm-loop-night {
  0%, 44% {
    opacity: 0;
  }
  45%, 79% {
    opacity: 1;
  }
  80%, 100% {
    opacity: 0;
  }
}
.tm.is-demo .tm__t-day {
  animation-name: tm-loop-day;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tm.is-demo .tm__t-night {
  animation-name: tm-loop-night;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tm.is-demo .tm__sun {
  animation-name: tm-loop-sun;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}
.tm.is-demo .tm__moon {
  animation-name: tm-loop-moon;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}
.tm.is-demo .tm__card {
  animation-name: tm-loop-card;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tm.is-demo .tm__disc {
  animation-name: tm-loop-disc;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .tm__card {
    padding: 8px;
    width: min(224px, 92vw);
  }
  .tm__line {
    font-size: 11px;
  }
  .tm__btn {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tm.is-demo .tm__sun,
  .tm.is-demo .tm__moon,
  .tm.is-demo .tm__card,
  .tm.is-demo .tm__disc,
  .tm.is-demo .tm__t-day,
  .tm.is-demo .tm__t-night {
    animation: none !important;
    transform: none !important;
  }
  .tm.is-demo .tm__sun {
    opacity: 0 !important;
  }
  .tm.is-demo .tm__moon {
    opacity: 1 !important;
  }
  .tm.is-demo .tm__card {
    background: rgb(20.4549019608%, 17.7254901961%, 26.3607843137%) !important;
    color: #fff7e6 !important;
  }
  .tm.is-demo .tm__disc {
    background: #b9a0ff !important;
  }
  .tm.is-demo .tm__t-day {
    opacity: 0 !important;
  }
  .tm.is-demo .tm__t-night {
    opacity: 1 !important;
  }
}
