body.site-shell #main-content .gallery-page {
  margin-block: 24px 32px;
  color: var(--text);
  position: relative;
}
body.site-shell #main-content .gallery-page [hidden] {
  display: none;
}
body.site-shell #main-content .gallery-page .gallery-filters {
  padding: 24px;
  border: 1px solid var(--control-border);
  border-radius: 16px;
  background: var(--surface-raised);
  color: var(--text);
}
body.site-shell #main-content .gallery-page .gallery-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}
body.site-shell #main-content .gallery-page .gallery-filter-details {
  margin-top: 16px;
}
body.site-shell #main-content .gallery-page .gallery-filter-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--link);
  font-size: 17px;
  font-weight: 600;
  list-style: none;
}
body.site-shell #main-content .gallery-page .gallery-filter-details summary::-webkit-details-marker {
  display: none;
}
body.site-shell #main-content .gallery-page .gallery-filter-details summary:hover {
  background: var(--button-secondary-hover);
  color: var(--button-secondary-ink);
}
body.site-shell #main-content .gallery-page .gallery-filter-details summary .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
body.site-shell #main-content .gallery-page .gallery-filter-details[open] summary .icon {
  transform: rotate(180deg);
}
body.site-shell #main-content .gallery-page .gallery-filter-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: 16px;
}
body.site-shell #main-content .gallery-page .gallery-filters > div {
  min-width: 0;
}
body.site-shell #main-content .gallery-page .gallery-filters label {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 17px;
}
body.site-shell #main-content .gallery-page .gallery-filters :is(input, select) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
body.site-shell #main-content .gallery-page .gallery-filters input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
body.site-shell #main-content .gallery-page .gallery-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 16px;
  scroll-margin-top: 24px;
}
body.site-shell #main-content .gallery-page .gallery-heading h2, body.site-shell #main-content .gallery-page .gallery-heading p {
  margin: 0;
}
body.site-shell #main-content .gallery-page .gallery-heading p {
  font-size: 16px;
  color: var(--text-muted);
}
body.site-shell #main-content .gallery-page .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
body.site-shell #main-content .gallery-page .gallery-grid:has(> .gallery-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.site-shell #main-content .gallery-page .gallery-card:only-child {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
body.site-shell #main-content .gallery-page .gallery-card:only-child .gallery-card__cover {
  aspect-ratio: auto;
  min-height: 280px;
  border-radius: 15px 0 0 15px;
}
body.site-shell #main-content .gallery-page .gallery-card {
  min-width: 0;
  border: 1px solid var(--control-border);
  border-radius: 16px;
  background: var(--surface-raised);
  color: var(--text);
}
body.site-shell #main-content .gallery-page .gallery-card__cover {
  display: block;
  position: relative;
  aspect-ratio: 800/530;
  border-radius: 15px 15px 0 0;
  background: var(--button-secondary-surface);
  color: var(--button-secondary-ink);
  text-decoration: none;
}
body.site-shell #main-content .gallery-page .gallery-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
body.site-shell #main-content .gallery-page .gallery-card__placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  height: 100%;
  color: inherit;
}
body.site-shell #main-content .gallery-page .gallery-card__placeholder .icon {
  width: 48px;
  height: 48px;
}
body.site-shell #main-content .gallery-page .gallery-card__photo-count {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 10px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 16px;
}
body.site-shell #main-content .gallery-page .gallery-card__body {
  padding: 24px;
}
body.site-shell #main-content .gallery-page .gallery-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.35;
  overflow-wrap: break-word;
}
body.site-shell #main-content .gallery-page .gallery-card h3 a {
  color: var(--link);
  text-decoration: none;
}
body.site-shell #main-content .gallery-page .gallery-card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
body.site-shell #main-content .gallery-page .gallery-card p {
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 16px;
}
body.site-shell #main-content .gallery-page .gallery-card .gallery-card__meta {
  font-size: 16px;
  color: var(--text-muted);
}
body.site-shell #main-content .gallery-page .gallery-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
body.site-shell #main-content .gallery-page .gallery-empty {
  padding: 40px 24px;
  text-align: center;
  border: 1px solid var(--control-border);
  border-radius: 16px;
  background: var(--surface-raised);
  color: var(--text);
}
body.site-shell #main-content .gallery-page .gallery-empty h2 {
  margin: 16px 0;
  font-size: 26px;
}
body.site-shell #main-content .gallery-page .gallery-empty p {
  max-width: 60ch;
  margin: 0 auto 24px;
}
body.site-shell #main-content .gallery-page .gallery-empty__icon {
  display: grid;
  place-items: center;
  margin: auto;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--button-secondary-surface);
  color: var(--button-secondary-ink);
}
body.site-shell #main-content .gallery-page .gallery-empty__icon .icon {
  width: 40px;
  height: 40px;
}
body.site-shell #main-content .gallery-page .gallery-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}
body.site-shell #main-content .gallery-page .gallery-album-info {
  padding: 24px;
  border: 1px solid var(--control-border);
  border-radius: 16px;
  background: var(--surface-raised);
  color: var(--text);
}
body.site-shell #main-content .gallery-page .gallery-album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}
body.site-shell #main-content .gallery-page .gallery-album-meta p {
  margin: 0;
  font-size: 16px;
  color: var(--text-muted);
}
body.site-shell #main-content .gallery-page .gallery-album-info .rich-text {
  max-width: 85ch;
  margin-bottom: 20px;
}
body.site-shell #main-content .gallery-page .gallery-hint {
  margin: 24px 0 16px;
  color: var(--text-muted);
  font-size: 16px;
}
body.site-shell #main-content .gallery-page .gallery-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
body.site-shell #main-content .gallery-page .gallery-photos figure {
  margin: 0;
  min-width: 0;
}
body.site-shell #main-content .gallery-page .gallery-photos a {
  display: block;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--surface-raised);
}
body.site-shell #main-content .gallery-page .gallery-photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: contain;
  border-radius: 11px;
}
body.site-shell #main-content .gallery-page .gallery-photos figcaption {
  padding-top: 12px;
  font-size: 16px;
  color: var(--text-muted);
}
body.site-shell #main-content .gallery-page .gallery-viewer {
  width: min(1200px, 100vw - 32px);
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--control-border);
  border-radius: 16px;
  background: var(--surface-raised);
  color: var(--text);
  overflow: auto;
}
body.site-shell #main-content .gallery-page .gallery-viewer::backdrop {
  background: rgba(8, 18, 40, 0.85);
}
body.site-shell #main-content .gallery-page .gallery-viewer__header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
body.site-shell #main-content .gallery-page .gallery-viewer h2 {
  margin: 0;
  font-size: 24px;
  color: inherit;
}
body.site-shell #main-content .gallery-page .gallery-viewer p {
  font-size: 16px;
  color: inherit;
  margin: 16px 0;
}
body.site-shell #main-content .gallery-page .gallery-viewer figure {
  margin: 0;
}
body.site-shell #main-content .gallery-page .gallery-viewer figure img {
  display: block;
  width: 100%;
  max-height: 60dvh;
  object-fit: contain;
}
body.site-shell #main-content .gallery-page .gallery-viewer [hidden] {
  display: none;
}
body.site-shell #main-content .gallery-page .gallery-viewer figcaption {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.5;
  color: inherit;
}
body.site-shell #main-content .gallery-page .gallery-viewer__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

body.site-shell #main-content .events-workspace #event-calendar[hidden] {
  display: none;
}

body.site-shell .events-actions [aria-current=page] {
  outline: 3px solid var(--button-focus);
  outline-offset: 3px;
}

@media (max-width: 1099px) {
  body.site-shell #main-content .gallery-page .gallery-grid, body.site-shell #main-content .gallery-page .gallery-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.site-shell #main-content .gallery-page .gallery-filter-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  body.site-shell #main-content .gallery-page .gallery-grid, body.site-shell #main-content .gallery-page .gallery-photos, body.site-shell #main-content .gallery-page .gallery-filter-options, body.site-shell #main-content .gallery-page .gallery-search-row, body.site-shell #main-content .gallery-page .gallery-grid:has(> .gallery-card:nth-child(2):last-child) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  body.site-shell #main-content .gallery-page .gallery-card:only-child {
    display: block;
  }
  body.site-shell #main-content .gallery-page .gallery-card:only-child .gallery-card__cover {
    aspect-ratio: 800/530;
    min-height: 0;
    border-radius: 15px 15px 0 0;
  }
  body.site-shell #main-content .gallery-page .gallery-filters, body.site-shell #main-content .gallery-page .gallery-album-info, body.site-shell #main-content .gallery-page .gallery-card__body {
    padding: 20px 16px;
  }
  body.site-shell #main-content .gallery-page .gallery-viewer {
    padding: 20px 16px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
  body.site-shell #main-content .gallery-page .gallery-viewer__controls > * {
    flex: 1 1 100%;
  }
}
