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

.m3 {
  container-type: inline-size;
  width: min(100%, 436px);
}

.m3__strip {
  display: flex;
  gap: 8px;
}

.m3__card {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.06);
}

.m3__card--mid {
  background: rgba(255, 247, 230, 0.12);
}

.m3__label {
  display: block;
  margin: 0 0 4px;
  font-size: clamp(9px, 2.6cqw, 13px);
  line-height: 1;
  font-weight: 800;
  color: #17141a;
}

.m3__card--mid .m3__label {
  color: #17141a;
}

.m3__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.m3__row {
  display: contents;
}

.m3__cell {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 0;
  font-size: clamp(7px, 2.2cqw, 11px);
  line-height: 1;
}

.m3__cell--blank {
  visibility: hidden;
}

.m3__num {
  font-weight: 600;
  color: #17141a;
}

.m3__card--side .m3__num {
  font-weight: 500;
  color: rgba(23, 20, 26, 0.9);
}

.m3__sel {
  position: absolute;
  inset: -1px;
  display: grid;
  place-items: center;
  background: #fff7e6;
  color: #c93000;
  font-weight: 800;
  border-radius: 4px;
  transform: scale(0);
  pointer-events: none;
}

.m3__cell.is-sel .m3__sel {
  transform: scale(1);
}

.m3__cell.is-today .m3__sel {
  box-shadow: inset 0 0 0 2px #ff4d1f;
}

.m3__cell:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 1px;
  z-index: 1;
}

@container (max-width: 330px) {
  .m3__sel {
    inset: 0;
  }
  .m3__cell {
    font-size: 7px;
  }
}
.m3__live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.m3.is-demo .m3__p1 {
  animation-name: m3-p1;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.m3.is-demo .m3__p2 {
  animation-name: m3-p2;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.m3.is-demo .m3__p3 {
  animation-name: m3-p3;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.m3.is-demo .m3__p4 {
  animation-name: m3-p4;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.m3.is-demo .m3__p5 {
  animation-name: m3-p5;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes m3-p1 {
  0%, 8% {
    transform: scale(0);
  }
  12%, 90% {
    transform: scale(1);
  }
  94%, 100% {
    transform: scale(0);
  }
}
@keyframes m3-p2 {
  0%, 16% {
    transform: scale(0);
  }
  20%, 82% {
    transform: scale(1);
  }
  86%, 100% {
    transform: scale(0);
  }
}
@keyframes m3-p3 {
  0%, 24% {
    transform: scale(0);
  }
  28%, 74% {
    transform: scale(1);
  }
  78%, 100% {
    transform: scale(0);
  }
}
@keyframes m3-p4 {
  0%, 32% {
    transform: scale(0);
  }
  36%, 66% {
    transform: scale(1);
  }
  70%, 100% {
    transform: scale(0);
  }
}
@keyframes m3-p5 {
  0%, 40% {
    transform: scale(0);
  }
  44%, 58% {
    transform: scale(1);
  }
  62%, 100% {
    transform: scale(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .m3.is-demo .m3__p1,
  .m3.is-demo .m3__p2,
  .m3.is-demo .m3__p3,
  .m3.is-demo .m3__p4,
  .m3.is-demo .m3__p5 {
    animation: none !important;
  }
}
