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

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

.cal {
  box-sizing: border-box;
  width: min(300px, 92vw);
  color: #17141a;
}

.cal__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cal__bar {
  margin: 0 0 4px;
}

.cal__title {
  margin: 0;
  font-size: clamp(11px, 3vw, 14px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

.cal__dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 0 0 4px;
  font-size: clamp(7px, 2vw, 9px);
  line-height: 1.2;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.72);
  text-align: center;
}

.cal__grid {
  display: grid;
  gap: 4px;
  grid-template-rows: auto auto auto auto auto;
}

.cal__row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal__cell {
  position: relative;
  box-sizing: border-box;
  min-height: clamp(16px, 4.8vw, 22px);
  padding: 4px 0;
  display: grid;
  place-items: start center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  font-size: clamp(8px, 2.2vw, 10px);
  line-height: 1;
  font-weight: 700;
  color: #17141a;
  cursor: pointer;
}

.cal__cell.is-out {
  background: rgba(255, 255, 255, 0.22);
  color: rgba(23, 20, 26, 0.72);
}

.cal__cell.is-today {
  box-shadow: inset 0 0 0 2px #2f6df6;
}

.cal__cell[aria-selected=true] {
  background: #fff;
  box-shadow: 0 0 0 2px #2f6df6;
}

.cal__cell:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 1px;
}

.cal__cell.is-chips {
  min-height: clamp(40px, 12vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border-radius: 8px;
}

.cal__n {
  font-size: clamp(8px, 2.2vw, 10px);
  line-height: 1.1;
  font-weight: 700;
  text-align: center;
}

.cal__chip {
  display: block;
  box-sizing: border-box;
  height: clamp(9px, 2.6vw, 11px);
  padding: 0 4px;
  border-radius: 4px;
  font-size: clamp(6px, 1.8vw, 8px);
  line-height: clamp(9px, 2.6vw, 11px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.cal__chip--blue {
  background: #0a4fe8;
  color: #fff7e6;
}

.cal__chip--ink {
  background: #17141a;
  color: #fff7e6;
}

.cal__chip--mint {
  background: #4cd4a6;
  color: #17141a;
}

.cal__morebtn {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: clamp(9px, 2.6vw, 11px);
  padding: 0;
  border: 0;
  background: rgba(23, 20, 26, 0.1);
  border-radius: 4px;
  color: #17141a;
  font-family: inherit;
  font-size: clamp(6px, 1.8vw, 8px);
  line-height: 1;
  font-weight: 800;
  text-align: left;
  text-indent: 2px;
  cursor: pointer;
  transition: background 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cal__morebtn:hover {
  background: rgba(23, 20, 26, 0.18);
}

.cal__morebtn:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 1px;
}

.cal__morewrap {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  display: grid;
  grid-template-rows: 0fr;
  box-sizing: border-box;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transition: grid-template-rows 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 2;
}

.cal__more {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
  padding: 0 4px;
}

.cal__cell.is-open .cal__morewrap {
  grid-template-rows: 1fr;
}

.cal__cell.is-open .cal__more {
  padding: 4px;
}

.cal__cell.is-demo .cal__morewrap {
  animation-name: more-open;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.cal__cell.is-demo .cal__more {
  animation-name: more-pad;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes more-open {
  0% {
    grid-template-rows: 0fr;
  }
  25% {
    grid-template-rows: 1fr;
  }
  70% {
    grid-template-rows: 1fr;
  }
  95% {
    grid-template-rows: 0fr;
  }
  100% {
    grid-template-rows: 0fr;
  }
}
@keyframes more-pad {
  0% {
    padding: 0 4px;
  }
  25% {
    padding: 4px;
  }
  70% {
    padding: 4px;
  }
  95% {
    padding: 0 4px;
  }
  100% {
    padding: 0 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cal__cell.is-demo .cal__morewrap,
  .cal__cell.is-demo .cal__more {
    animation: none !important;
  }
  .cal__morewrap, .cal__morebtn {
    transition: none;
  }
}
