.c52-agenda-section {
  --c52-primary: #e20052;
  --c52-secondary: #00b6f0;
  --c52-tertiary: #05af62;

  --c52-white: #ffffff;
  --c52-page-ink: #1c2430;
  --c52-ink: #1f2937;
  --c52-ink-soft: #5f6b7a;
  --c52-ink-muted: #8a93a1;

  --c52-line: #e8ebf0;
  --c52-line-strong: #d8dde6;
  --c52-surface: #f4f6fa;
  --c52-surface-soft: #fafbfd;

  --c52-radius-xl: 34px;
  --c52-radius-lg: 22px;
  --c52-radius-md: 14px;

  --c52-bar-height: 28px;
  --c52-bar-gap: 6px;
  --c52-cell-min-height: 168px;

  position: relative;
  padding: 96px 0;
  isolation: isolate;
}

.c52-agenda-wrap {
  position: relative;
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px;
  border-radius: 40px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(96, 165, 250, 0.14));
  border: 1px solid rgba(164, 180, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 70px rgba(83, 98, 194, 0.18),
    0 0 80px rgba(147, 118, 255, 0.24);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.c52-agenda-wrap::before,
.c52-agenda-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.c52-agenda-wrap::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 121, 249, 0.24), transparent 34%),
    radial-gradient(circle at 100% 50%, rgba(96, 165, 250, 0.16), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(167, 139, 250, 0.14), transparent 34%);
  opacity: 0.95;
}

.c52-agenda-wrap::after {
  inset: 1px;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(173, 190, 255, 0.1);
}

.c52-agenda-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e7ebf1;
  border-radius: 30px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 30px rgba(15, 23, 42, 0.06);
}

.c52-agenda-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(244, 246, 250, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.c52-agenda-toolbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--c52-line);
  background: #ffffff;
}

.c52-agenda-toolbar__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.c52-agenda-toolbar__title {
  color: var(--c52-page-ink);
  text-align: center;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.c52-agenda-toolbar__modes {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.c52-nav-btn,
.c52-today-btn,
.c52-mode-btn {
  appearance: none;
  border: 1px solid var(--c52-line-strong);
  background: var(--c52-white);
  color: var(--c52-ink);
  border-radius: 12px;
  cursor: pointer;
  transition: 180ms ease;
  font: inherit;
}

.c52-nav-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
}

.c52-today-btn,
.c52-mode-btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 600;
}

.c52-nav-btn:hover,
.c52-today-btn:hover,
.c52-mode-btn:hover {
  background: var(--c52-surface-soft);
  border-color: #cfd5df;
}

.c52-mode-btn.is-active {
  background: #f7f8fb;
  border-color: #cfd5df;
  color: var(--c52-page-ink);
  box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.02);
}

.c52-agenda-panels {
  position: relative;
  z-index: 1;
  padding: 18px;
  background: #ffffff;
}

.c52-panel {
  display: none;
}

.c52-panel.is-active {
  display: block;
}

/* MONTH */
.c52-month-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.c52-month-scroll::-webkit-scrollbar {
  height: 8px;
}

.c52-month-scroll::-webkit-scrollbar-thumb {
  background: #d8dde6;
  border-radius: 999px;
}

.c52-month-board {
  min-width: 920px;
}

.c52-month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding-bottom: 10px;
}

.c52-month-weekday {
  padding: 8px 14px 10px;
  text-align: right;
  color: var(--c52-ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.c52-month-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--c52-line);
  border-left: 1px solid var(--c52-line);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.c52-month-row {
  position: relative;
  isolation: isolate;
  --c52-lanes: 1;
  min-height: calc(var(--c52-cell-min-height) + (var(--c52-lanes) - 1) * 24px);
  background: var(--c52-white);
}

.c52-month-row + .c52-month-row {
  border-top: 1px solid var(--c52-line);
}

.c52-month-cells {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: inherit;
}

.c52-month-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  border-right: 1px solid var(--c52-line);
  background: var(--c52-white);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.c52-month-cell:hover {
  background: #fcfcfd;
}

.c52-month-cell.is-outside {
  background: #f8f9fb;
}

.c52-month-cell.is-outside .c52-month-cell__date {
  color: #98a2af;
  background: #eef1f5;
  border-color: #e4e8ef;
}

.c52-month-cell.is-quiet {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.c52-month-cell.is-quiet::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #edf1f6, transparent);
  pointer-events: none;
}

.c52-month-cell.has-stage:hover {
  background: #ffffff;
  transform: translateY(-1px);
  z-index: 2;
}

.c52-month-cell__top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 40px;
  margin-bottom: 4px;
}

.c52-month-cell__date {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c52-page-ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: #f4f6fa;
  border: 1px solid #e5e9f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.c52-month-cell.has-stage:hover .c52-month-cell__date {
  background: #ffffff;
  border-color: #d7dfeb;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 6px 12px rgba(15, 23, 42, 0.05);
}

.c52-month-cell.is-today .c52-month-cell__date {
  color: #ffffff;
  background: linear-gradient(135deg, var(--c52-secondary), #1f8fff);
  border-color: transparent;
  box-shadow:
    0 10px 20px rgba(0, 182, 240, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.c52-month-cell__content {
  margin-top: calc(var(--c52-lanes) * (var(--c52-bar-height) + var(--c52-bar-gap)) + 10px);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 98px;
  gap: 8px;
}

.c52-month-cell__content--empty {
  margin-top: calc(var(--c52-lanes) * (var(--c52-bar-height) + var(--c52-bar-gap)) + 10px);
  min-height: 20px;
}

.c52-month-cell.has-overflow .c52-month-cell__chip,
.c52-month-cell.has-stage .c52-month-cell__chip,
.c52-month-cell.has-compact .c52-month-cell__chip {
  margin-top: auto;
}

.c52-month-cell__chip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f4f6fa;
  border: 1px solid #e4e8ef;
  color: var(--c52-page-ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

/* HERO STAGE */
.c52-month-stage {
  position: relative;
  flex: 1;
  min-height: 106px;
  border-radius: 18px;
  overflow: hidden;
  background: #182130;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 20px rgba(15, 23, 42, 0.10);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.c52-month-cell.has-stage:hover .c52-month-stage {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 24px rgba(15, 23, 42, 0.14);
}

.c52-month-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  pointer-events: none;
}

.c52-month-stage__slides {
  position: absolute;
  inset: 0;
}

.c52-month-stage__slide {
  position: absolute;
  inset: 0;
  background-color: #243246;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 520ms ease, transform 1600ms ease;
}

.c52-month-stage__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.c52-month-stage__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 12, 20, 0.10) 0%, rgba(7, 12, 20, 0.18) 28%, rgba(7, 12, 20, 0.42) 60%, rgba(7, 12, 20, 0.84) 100%),
    radial-gradient(circle at 14% 18%, rgba(255,255,255,0.14), transparent 28%);
  transition: background 180ms ease;
}

.c52-month-cell.has-stage:hover .c52-month-stage__overlay {
  background:
    linear-gradient(180deg, rgba(7, 12, 20, 0.08) 0%, rgba(7, 12, 20, 0.16) 26%, rgba(7, 12, 20, 0.38) 58%, rgba(7, 12, 20, 0.78) 100%),
    radial-gradient(circle at 14% 18%, rgba(255,255,255,0.16), transparent 28%);
}

.c52-month-stage__meta {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.c52-month-stage__count,
.c52-month-stage__weekday {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.c52-month-stage__body {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c52-month-stage__title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0,0,0,0.28);
}

.c52-month-stage__progress {
  display: flex;
  gap: 4px;
}

.c52-month-stage__progress-item {
  flex: 1 1 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  transition: background 220ms ease;
}

.c52-month-stage__progress-item.is-active {
  background: rgba(255, 255, 255, 0.98);
}

/* COMPACT STARTS */
.c52-month-starts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c52-month-start {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--c52-ink);
  font-size: 0.88rem;
  line-height: 1.3;
}

.c52-month-start__point {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.c52-month-start__text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* MONTH BARS */
.c52-month-bars {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.c52-month-bar {
  position: absolute;
  z-index: 5;
  height: var(--c52-bar-height);
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 5px 12px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.10);
  pointer-events: auto;
  cursor: pointer;
}

.c52-month-bar::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0));
  pointer-events: none;
}

.c52-month-bar.is-continued-start {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.c52-month-bar.is-continued-end {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.c52-month-bar.is-start {
  box-shadow:
    0 5px 12px rgba(15, 23, 42, 0.08),
    inset 3px 0 0 rgba(255,255,255,0.16),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

.c52-month-bar.is-end {
  box-shadow:
    0 5px 12px rgba(15, 23, 42, 0.08),
    inset -3px 0 0 rgba(255,255,255,0.16),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

.c52-month-bar--primary {
  background: linear-gradient(135deg, rgba(226, 0, 82, 0.94), rgba(235, 72, 136, 0.90));
}

.c52-month-bar--secondary {
  background: linear-gradient(135deg, rgba(0, 182, 240, 0.96), rgba(41, 126, 255, 0.92));
}

.c52-month-bar--tertiary {
  background: linear-gradient(135deg, rgba(5, 175, 98, 0.96), rgba(18, 199, 120, 0.92));
}

.c52-month-bar__label {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PLACEHOLDER */
.c52-placeholder {
  padding: 42px 30px;
  border: 1px solid var(--c52-line);
  border-radius: var(--c52-radius-lg);
  background: var(--c52-white);
}

.c52-placeholder__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--c52-ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.c52-placeholder__title {
  margin: 0 0 14px;
  color: var(--c52-page-ink);
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.c52-placeholder__text {
  margin: 0;
  max-width: 68ch;
  color: var(--c52-ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

/* BREAKPOINTS */
@media (max-width: 1400px) {
  .c52-agenda-wrap {
    width: min(100% - 36px, 1360px);
  }
}

@media (max-width: 1200px) {
  .c52-agenda-toolbar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }

  .c52-agenda-toolbar__nav,
  .c52-agenda-toolbar__modes {
    justify-content: center;
  }

  .c52-agenda-toolbar__title {
    order: -1;
  }
}

@media (max-width: 992px) {
  .c52-agenda-panels {
    padding: 14px;
  }

  .c52-month-board {
    min-width: 860px;
  }

  .c52-month-row {
    min-height: 154px;
  }
}

@media (max-width: 768px) {
  .c52-agenda-section {
    padding: 72px 0;
  }

  .c52-agenda-wrap {
    width: min(100% - 24px, 1360px);
    padding: 12px;
    border-radius: 28px;
  }

  .c52-agenda-card {
    border-radius: 22px;
  }

  .c52-agenda-toolbar {
    padding: 18px 16px 16px;
  }

  .c52-agenda-toolbar__modes {
    width: 100%;
  }

  .c52-mode-btn {
    flex: 1 1 auto;
  }

  .c52-month-weekday {
    font-size: 0.84rem;
  }

  .c52-month-cell__date {
    min-width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .c52-month-bar {
    height: 24px;
    font-size: 0.76rem;
  }

  .c52-month-stage {
    display: none;
  }

  .c52-placeholder {
    padding: 30px 18px;
  }
}

@media (max-width: 576px) {
  .c52-agenda-toolbar__nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .c52-nav-btn,
  .c52-today-btn,
  .c52-mode-btn {
    min-height: 40px;
  }

  .c52-agenda-toolbar__title {
    font-size: 1.35rem;
  }

  .c52-placeholder__text {
    font-size: 0.95rem;
  }
}