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

.ag {
  width: min(100%, 436px);
}

.ag__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

.ag__title {
  font-size: clamp(13px, 3vw, 16px);
  line-height: 1;
  font-weight: 800;
  color: #fff7e6;
}

.ag__toggl {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.ag__btn {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 4px;
  color: #fff7e6;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 220ms steps(1, end), color 220ms steps(1, end);
}

.ag__btn.is-on {
  opacity: 1;
  color: #2f6df6;
}

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

.ag__pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 20px;
  border: 1px solid #2f6df6;
  border-radius: 4px;
  pointer-events: none;
  transition: transform 220ms steps(1, end);
}

.ag.is-agenda .ag__pill {
  transform: translateX(32px);
}

.ag__frame {
  container-type: inline-size;
  position: relative;
  box-sizing: border-box;
  width: var(--fw, 100%);
  height: clamp(132px, 58vh, 174px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ag__view {
  position: absolute;
  inset: 0;
}

.ag__grid {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.ag__list {
  display: none;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px;
  list-style: none;
}

@container (max-width: 176px) {
  .ag__grid {
    display: none;
  }
  .ag__list {
    display: flex;
  }
}
.ag__wd {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 8px 0;
  color: rgba(255, 247, 230, 0.72);
  font-size: clamp(8px, 1.8vw, 10px);
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
}

.ag__rows {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  padding: 4px 8px 8px;
}

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

.ag__cell {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: clamp(10px, 2.4vw, 13px);
  line-height: 1;
  font-weight: 500;
  color: rgba(255, 247, 230, 0.82);
  cursor: pointer;
}

.ag__cell.is-today {
  color: #fff7e6;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px #2f6df6;
}

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

.ag__dot {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2f6df6;
}

.ag__item {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  animation-name: ag-rise;
  animation-duration: 220ms;
  animation-timing-function: ease-out;
  animation-fill-mode: backwards;
}

.ag__item:nth-child(2) {
  animation-delay: 40ms;
}

.ag__item:nth-child(3) {
  animation-delay: 80ms;
}

.ag__item:nth-child(4) {
  animation-delay: 120ms;
}

.ag__item:nth-child(5) {
  animation-delay: 160ms;
}

@keyframes ag-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ag__item:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: -2px;
}

.ag__d {
  font-size: clamp(14px, 3.2vw, 18px);
  line-height: 1;
  font-weight: 800;
  color: #fff7e6;
}

.ag__wdn {
  min-width: 44px;
  font-size: clamp(9px, 2vw, 11px);
  line-height: 1;
  font-weight: 600;
  color: rgba(255, 247, 230, 0.55);
}

.ag__chips {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.ag__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.24);
  color: #fff7e6;
  font-size: clamp(8px, 1.9vw, 10px);
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.ag__chip::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2f6df6;
}

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

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

@keyframes ag-fold {
  0%, 6% {
    width: 34%;
  }
  24%, 54% {
    width: 100%;
  }
  72%, 100% {
    width: 34%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ag.is-demo .ag__frame {
    animation: none !important;
  }
  .ag__item {
    animation: none !important;
  }
  .ag__btn, .ag__pill, .ag__frame {
    transition: none;
  }
}
