.schedule {
  --primary: var(--calendar-accent);
}

.banner {
  container-type: inline-size;
  min-height: 142px;
  overflow: hidden;
  padding: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--header), var(--primary-dark) 58%, var(--banner-end));
  color: var(--banner-text);
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}

.banner.text-dark {
  color: var(--banner-text);
}

.banner.text-light {
  color: var(--banner-text);
}

.banner > img,
.banner > p,
.banner > h1,
.banner > span,
.banner > .banner-dots {
  margin-right: 18px;
  margin-left: 18px;
}

.banner > img:first-child {
  margin-top: 18px;
}

.banner-slide {
  position: relative;
  isolation: isolate;
  min-height: 142px;
  padding: 18px 24px;
  will-change: transform, opacity;
}

.banner-slide.is-entering {
  animation: bannerSlideSpring 640ms linear both;
}

.banner.has-image .banner-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(15 23 42 / 58%) 0%, rgb(15 23 42 / 20%) 46%, rgb(15 23 42 / 72%) 100%);
}

.banner.has-image.text-dark .banner-slide::before {
  background: linear-gradient(180deg, rgb(255 255 255 / 62%) 0%, rgb(255 255 255 / 28%) 46%, rgb(255 255 255 / 76%) 100%);
}

.banner-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, currentColor 22%, transparent);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.banner-chip + p {
  margin-top: 10px;
}

.banner-bg-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  object-fit: cover;
}

.banner-logo {
  width: 44px;
  height: 44px;
  display: block;
  margin-bottom: 10px;
  object-fit: contain;
}

.banner p,
.banner h1 {
  margin: 0;
}

.banner h1 {
  margin-top: 7px;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(13px, 4.8cqw, 22px);
  letter-spacing: 0;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner span {
  display: block;
  margin-top: 9px;
  color: color-mix(in srgb, currentColor 82%, transparent);
  font-size: 14px;
}

.banner-dots {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.banner-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 34%, transparent);
}

.banner-dots button.active {
  width: 18px;
  background: currentColor;
}

@keyframes bannerSlideSpring {
  0% {
    opacity: 0;
    transform: translateX(34px) scale(0.985);
  }
  42% {
    opacity: 1;
    transform: translateX(-6px) scale(1.004);
  }
  66% {
    transform: translateX(2px) scale(0.998);
  }
  82% {
    transform: translateX(-1px) scale(1.001);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.event-list {
  max-height: var(--schedule-list-height, 216px);
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
  display: block;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.event-list::-webkit-scrollbar {
  display: none;
}

.schedule-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.schedule-item.is-important {
  background: transparent;
}

.schedule-item.is-today .schedule-date {
  border-right-color: var(--primary);
}

.schedule-item.is-today .schedule-date strong {
  color: var(--primary);
  animation: todayPulse 2.4s ease-in-out infinite;
}

@keyframes todayPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.schedule-date {
  display: grid;
  align-content: center;
  align-self: stretch;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.schedule-date strong,
.schedule-date small,
.schedule-copy strong,
.schedule-copy > span {
  display: block;
}

.schedule-date strong {
  font-size: 18px;
  line-height: 1.15;
}

.schedule-date small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-copy {
  min-width: 0;
}

.schedule-copy strong,
.schedule-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-copy strong {
  font-size: 14px;
  line-height: 1.35;
}

.schedule-copy > span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.row-chevron {
  color: var(--muted);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  text-align: right;
}

.schedule-location::before {
  content: " · ";
}

.schedule.style-badge {
  --schedule-list-height: 270px;
}

.schedule.style-badge .schedule-item {
  grid-template-columns: minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 12px 0;
}

.schedule.style-badge .schedule-date {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  gap: 5px;
  align-self: start;
  padding-right: 0;
  border-right: 0;
  text-align: left;
}

.schedule.style-badge .schedule-date strong,
.schedule.style-badge .schedule-date small {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.3;
}

.schedule.style-badge .schedule-copy {
  grid-column: 1;
  grid-row: 2;
}

.schedule.style-badge .schedule-meta {
  overflow: visible;
  white-space: normal;
}

.schedule.style-badge .schedule-location {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 11px;
}

.schedule.style-badge .schedule-location::before {
  content: none;
}

.schedule.style-badge .row-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.schedule.style-timeline .schedule-item {
  grid-template-columns: 62px minmax(0, 1fr) 18px;
  align-items: start;
  padding: 0 0 18px;
  border-bottom: 0;
}

.schedule.style-timeline .schedule-item:last-child {
  padding-bottom: 0;
}

.schedule.style-timeline .schedule-date {
  position: relative;
  align-content: start;
  align-self: stretch;
  padding: 0 0 0 18px;
  border-right: 0;
  text-align: left;
}

.schedule.style-timeline .schedule-date::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 1px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

.schedule.style-timeline .schedule-date::after {
  content: "";
  position: absolute;
  top: 17px;
  bottom: -18px;
  left: 5px;
  width: 1px;
  background: var(--line);
}

.schedule.style-timeline .schedule-item:last-child .schedule-date::after {
  display: none;
}

.schedule.style-timeline .schedule-date strong {
  font-size: 13px;
}

.schedule.style-timeline .schedule-date small {
  margin-top: 1px;
}

.schedule-empty {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}

.event-detail {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.event-detail div {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
}

.event-detail dt {
  color: var(--muted);
  font-weight: 800;
}

.event-detail dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.event-modal-images {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.event-modal-image {
  display: flex;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-alt);
}

.event-modal-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(62vh, 520px);
  object-fit: contain;
}

@keyframes calendarItemEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.schedule.is-visible .schedule-item {
  animation: calendarItemEnter 380ms ease both;
}

.schedule.is-visible .schedule-item:nth-child(1) { animation-delay: 0ms; }
.schedule.is-visible .schedule-item:nth-child(2) { animation-delay: 50ms; }
.schedule.is-visible .schedule-item:nth-child(3) { animation-delay: 100ms; }
.schedule.is-visible .schedule-item:nth-child(4) { animation-delay: 150ms; }
.schedule.is-visible .schedule-item:nth-child(5) { animation-delay: 200ms; }
.schedule.is-visible .schedule-item:nth-child(6) { animation-delay: 250ms; }
.schedule.is-visible .schedule-item:nth-child(n+7) { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .schedule.is-visible .schedule-item,
  .schedule-item.is-today .schedule-date strong {
    animation: none;
    opacity: 1;
    transform: none;
    width: auto;
  }
}

@media (max-width: 420px) {
  .banner {
    min-height: 128px;
  }

  .banner-slide {
    min-height: 128px;
    padding: 16px 18px;
  }

  .banner-logo {
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
  }

  .banner h1 {
    font-size: clamp(13px, 5.2cqw, 19px);
  }

  .banner span {
    margin-top: 7px;
    font-size: 12.5px;
    line-height: 1.35;
  }
}

@media (max-width: 359px) {
  .schedule-item {
    grid-template-columns: 52px minmax(0, 1fr) 16px;
    gap: 9px;
  }

  .schedule-date {
    padding-right: 9px;
  }

  .schedule-date strong {
    font-size: 16px;
  }
}
