.cal-page {
  padding: 7.5rem 0 2rem;
  background: var(--ivory);
  flex: 1 0 auto;
}
.cal-page.is-ready .cal-enter {
  animation: cal-enter 0.55s ease both;
}
.cal-enter:nth-child(1) { animation-delay: 0.02s; }
.cal-enter:nth-child(2) { animation-delay: 0.08s; }
.cal-enter:nth-child(3) { animation-delay: 0.14s; }
.cal-enter:nth-child(4) { animation-delay: 0.2s; }
@keyframes cal-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-page.is-ready .cal-enter { animation: none; }
  .cal-day.has-events,
  .cal-upcoming-item { transition: none; }
}
.cal-side {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--navy2);
  color: var(--white);
}
.cal-side-head {
  padding: 1.35rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.cal-side-head h1 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  color: var(--white);
}
.cal-side-head h1 span {
  color: var(--gold);
}
.cal-lead {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.cal-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 10rem;
  min-width: 9rem;
  border: 1px solid rgba(180, 154, 112, 0.45);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0;
  padding: 0.65rem 0.85rem;
  cursor: text;
}
.cal-search:focus-within {
  border-color: var(--gold);
}
.cal-search-icon {
  color: var(--gold);
  flex: 0 0 auto;
  display: block;
}
.cal-search input {
  border: 0;
  outline: none;
  width: 100%;
  min-width: 0;
  background: transparent;
  font: inherit;
  color: var(--white);
}
.cal-search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.cal-filter-menu {
  position: relative;
}
.cal-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(180, 154, 112, 0.55);
  background: rgba(180, 154, 112, 0.08);
  color: var(--gold);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  border-radius: 0;
}
.cal-filter-toggle[aria-expanded="true"] {
  border-color: var(--gold);
  background: rgba(180, 154, 112, 0.16);
}
.cal-filters {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 5;
  min-width: 10.5rem;
  display: grid;
  gap: 0;
  border: 1px solid rgba(180, 154, 112, 0.45);
  background: var(--navy);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}
.cal-filters[hidden] {
  display: none;
}
.cal-filters button {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
}
.cal-filters button:last-child {
  border-bottom: 0;
}
.cal-filters button:hover,
.cal-filters button:focus-visible {
  background: rgba(180, 154, 112, 0.12);
  color: var(--gold);
  outline: none;
}
.cal-filters button.is-active {
  color: var(--gold);
  background: rgba(180, 154, 112, 0.18);
}
.cal-hero {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(20, 40, 63, 0.12);
  margin-bottom: 1.5rem;
  background: var(--white);
  /* Wider than tall — landscape stage */
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: min(58vh, 34rem);
  min-height: 22rem;
  transition: box-shadow 0.45s ease, min-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.cal-hero.is-detail {
  box-shadow: 0 32px 70px rgba(20, 40, 63, 0.22);
  aspect-ratio: auto;
  min-height: 28rem;
  max-height: none;
}
.cal-browse {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(360px, 1.35fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cal-hero.is-detail .cal-browse {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96) translateY(-8px);
}
.cal-detail {
  display: none;
  color: var(--white);
  padding: 1.5rem clamp(1.25rem, 3vw, 2rem) 1.85rem;
  background: var(--navy);
  border-left: 5px solid var(--gold);
  transform-origin: 70% 40%;
}
.cal-hero.is-detail .cal-detail {
  display: block;
  animation: cal-detail-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.cal-hero.is-closing .cal-detail {
  animation: cal-detail-card-out 0.28s ease forwards;
}
.cal-detail[hidden] { display: none !important; }
@keyframes cal-detail-card-in {
  0% {
    opacity: 0;
    transform: translateX(48px) scale(0.92);
    filter: blur(2px);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
@keyframes cal-detail-card-out {
  to {
    opacity: 0;
    transform: translateX(28px) scale(0.96);
  }
}
.cal-detail-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1.35rem;
  animation: cal-detail-child 0.4s ease 0.05s both;
}
.cal-back {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  border-radius: 0;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.cal-back:hover,
.cal-back:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(180, 154, 112, 0.1);
  outline: none;
}
.cal-detail-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: stretch;
  min-height: 22rem;
}
.cal-detail-media,
.cal-detail-fallback {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  max-height: 32rem;
  animation: cal-detail-child 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}
.cal-detail-media {
  object-fit: cover;
  object-position: center top;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.cal-detail-fallback {
  display: grid;
  place-items: center;
  background: rgba(180, 154, 112, 0.12);
  color: var(--gold);
  font-size: clamp(3.4rem, 8vw, 5.5rem);
  font-weight: 700;
  font-family: Manrope, sans-serif;
  border: 1px solid rgba(180, 154, 112, 0.35);
}
.cal-detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: cal-detail-child 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}
.cal-detail-copy h2 {
  margin: 0 0 0.55rem;
  color: var(--white);
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.cal-detail-copy .cat {
  color: var(--gold);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.cal-detail-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
}
.cal-detail-meta strong {
  display: inline-block;
  min-width: 4.2rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-right: 0.55rem;
}
.cal-detail-copy p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 40rem;
  margin-bottom: 1.45rem;
  line-height: 1.65;
}
.cal-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  background: var(--gold);
  color: #14283f;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cal-add:hover { background: #c6af89; }
.cal-add:active { transform: translateY(1px); }
@keyframes cal-detail-child {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-hero.is-detail .cal-detail,
  .cal-hero.is-closing .cal-detail,
  .cal-detail-bar,
  .cal-detail-media,
  .cal-detail-fallback,
  .cal-detail-copy {
    animation: none !important;
  }
  .cal-browse,
  .cal-hero {
    transition: none !important;
  }
}
.cal-month {
  background: var(--navy);
  color: var(--white);
  padding: 1.4rem 1.35rem 1.6rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.cal-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-month-head h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: -0.02em;
}
.cal-month-head button {
  border: 0;
  background: transparent;
  color: var(--white);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0;
  cursor: pointer;
}
.cal-month-head button:hover,
.cal-month-head button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  text-align: center;
}
.cal-weekdays {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.cal-day {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--gold);
  min-height: 2.5rem;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cal-day:disabled {
  opacity: 0.2;
  cursor: default;
  color: rgba(255, 255, 255, 0.35);
}
.cal-day.is-selected {
  box-shadow: inset 0 0 0 2px var(--gold);
  color: var(--white);
}
.cal-day.has-events {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}
.cal-day.has-events.is-selected {
  box-shadow: inset 0 0 0 2px var(--white);
  color: var(--navy);
  background: var(--gold);
}
.cal-day.has-events.is-pulse {
  animation: cal-day-pulse 0.55s ease;
}
@keyframes cal-day-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.cal-side > .cal-upcoming {
  flex: 1 1 auto;
}
.cal-upcoming {
  background: transparent;
  color: var(--white);
  padding: 1.1rem 1.2rem 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.cal-upcoming h3 {
  margin: 0 0 0.85rem;
  color: var(--white);
  font-size: 1.05rem;
}
.cal-upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cal-upcoming-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.cal-page,
.cal-page * {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.cal-page::-webkit-scrollbar,
.cal-page *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.cal-upcoming-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.cal-upcoming-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 0.15rem;
  color: inherit;
  scroll-margin-top: 6rem;
  animation: cal-item-in 0.35s ease both;
}
.cal-upcoming-item.is-highlight {
  background: rgba(180, 154, 112, 0.14);
  outline: 1px solid rgba(180, 154, 112, 0.55);
}
@keyframes cal-item-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}
.cal-upcoming-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.cal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}
.cal-arrow {
  width: 2rem;
  height: 2rem;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  color: var(--white);
}
.cal-status {
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--line);
  background: var(--white);
  color: var(--muted);
}
.cal-status[hidden] { display: none; }
@media (max-width: 860px) {
  .cal-hero {
    aspect-ratio: auto;
    max-height: none;
    min-height: 0;
  }
  .cal-browse {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cal-detail-body {
    grid-template-columns: 1fr;
  }
  .cal-detail-media,
  .cal-detail-fallback {
    min-height: 16rem;
    max-height: 20rem;
  }
  .cal-search:hover,
  .cal-search:focus-within {
    width: 100%;
  }
}
