.ceremony {
  max-width: 1040px;
  margin: 48px auto 0;
  padding: 56px 40px;
  scroll-margin-top: 85px;
  color: #171717;
  background: #ffffffed;
  border-radius: 24px;
}

.ceremony header {
  text-align: center;
  margin-bottom: 30px;
}

.ceremony .event-date {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #3388b7;
  margin: 0 0 16px;
}

.ceremony h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}

.ceremony .intro {
  max-width: 680px;
  margin: auto;
  color: #525252;
  font-size: 17px;
  line-height: 1.8;
}

.ceremony-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 24px;
}

.ceremony-filters button {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid #d5e2eb;
  border-radius: 99px;
  padding: 9px 15px;
  background: #fff;
  color: #4c5e6c;
  cursor: pointer;
  min-height: 42px;
}

.ceremony-filters button[aria-pressed="true"] {
  background: #2f83b0;
  color: white;
  border-color: #2f83b0;
}

.ceremony figure {
  margin: 0;
  background: white;
  overflow: hidden;
  border: 1px solid #e0e6eb;
  border-radius: 14px;
  box-shadow: 0 14px 35px #244f6c0a;
}

.ceremony-stage {
  position: relative;
  background: #f3f6f8;
}

.ceremony-stage.is-loading .ceremony-photo img {
  opacity: 0.55;
  filter: saturate(0.85);
}

.ceremony-stage-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  place-items: center;
  background: rgba(243, 246, 248, 0.28);
  pointer-events: none;
}

.ceremony-stage-loader.is-visible,
.ceremony-stage.is-loading .ceremony-stage-loader {
  display: grid;
}

.ceremony-stage-loader::after {
  content: "";
  width: 36px;
  height: 36px;
  border: 3px solid rgba(47, 131, 176, 0.22);
  border-top-color: #2f83b0;
  border-radius: 50%;
  animation: ceremony-stage-spin 0.7s linear infinite;
}

@keyframes ceremony-stage-spin {
  to {
    transform: rotate(360deg);
  }
}

.ceremony-photo {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  border: 0;
  background: none;
}

.ceremony-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.ceremony-zoom {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fffef2ef;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  pointer-events: none;
}

.ceremony-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #ffffff70;
  box-shadow: 0 2px 8px #0002;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background: #ffffffed;
  color: #173f59;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ceremony-arrow.previous {
  left: 14px;
}

.ceremony-arrow.next {
  right: 14px;
}

.ceremony iconify-icon,
.ceremony-lightbox iconify-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.ceremony figcaption {
  padding: 23px 28px 26px;
}

.ceremony-caption-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #3980a4;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.ceremony-caption-top output {
  color: #7a8790;
  font-weight: 500;
  white-space: nowrap;
}

.ceremony-caption {
  font-size: 15px;
  line-height: 1.85;
  color: #404d56;
  margin: 0;
  min-height: 56px;
}

.ceremony-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: #a7bdcc transparent;
}

.ceremony-thumbs button {
  width: 104px;
  min-width: 104px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.ceremony-thumbs button[aria-current="true"] {
  border-color: #3286b1;
}

.ceremony-thumbs img {
  width: 94px;
  height: 63px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.ceremony-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 18px 0 0;
}

.ceremony-bottom p {
  font-size: 12px;
  color: #7a8790;
  margin: 0;
}

.ceremony-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #303f9f;
  color: white;
  padding: 12px 20px;
  font-weight: 650;
  font-size: 13px;
  border-radius: 11px;
  white-space: nowrap;
  text-decoration: none;
}

.ceremony-bottom a:hover {
  color: white;
  opacity: 0.92;
}

.ceremony-lang {
  display: none;
  gap: 3px;
  background: white;
  border: 1px solid #d9e3e9;
  border-radius: 30px;
  padding: 3px;
  width: max-content;
  margin: 18px auto 0;
  box-shadow: none;
}

.ceremony-lang a {
  color: #43515c;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 20px;
  text-decoration: none;
}

.ceremony-lang a.active {
  background: #2f83b0;
  color: white;
}

/* Album-style lightbox (BCON album_lightbox) */
.lightbox-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #fff;
  animation: album-lightbox-spin 1s linear infinite;
  z-index: 9999;
  display: none;
}

.lightbox-loader.is-visible {
  display: block;
}

@keyframes album-lightbox-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.ceremony-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10000;
}

.ceremony-lightbox.is-active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content-wrapper {
  display: block;
  position: relative;
  width: max-content;
  max-width: min(96vw, 100%);
  overflow: visible;
  pointer-events: none;
  box-sizing: border-box;
}

.lightbox-content-wrapper > img {
  width: auto;
  height: auto;
  max-width: min(96vw, 1600px);
  max-height: min(86vh, calc(100vh - 6.5rem));
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  pointer-events: auto;
  transform: scale(0.98);
  transition: transform 0.3s ease, opacity 0.2s ease;
  display: block;
  object-fit: contain;
}

.ceremony-lightbox.is-active .lightbox-content-wrapper > img {
  transform: scale(1);
}

.lightbox-meta {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(52rem, calc(100% - 1.5rem));
  max-width: min(52rem, calc(100% - 1.5rem));
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10005;
  pointer-events: none;
  box-sizing: border-box;
}

.lightbox-meta-fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}

.lightbox-meta-group {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
  pointer-events: auto;
  padding: 4px 5px 4px 10px;
  border-radius: 999px;
  background: rgba(16, 22, 30, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.lightbox-meta-group.is-visible {
  display: inline-flex;
}

.lightbox-meta-group--category {
  border-color: rgba(70, 180, 229, 0.35);
  padding-left: 5px;
}

.lightbox-tags-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
}

.lightbox-tag-pill {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.94);
  color: #1a2330;
  border: none;
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.lightbox-caption {
  margin: 0;
  width: 100%;
  max-width: 100%;
  max-height: min(22vh, 9.5rem);
  overflow-y: auto;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(10, 16, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}

.lightbox-close {
  position: absolute;
  top: 88px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
  opacity: 0.8;
  transition: opacity 0.2s;
  background: none;
  border: 0;
  padding: 0;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-progress {
  position: absolute;
  top: 96px;
  left: 24px;
  z-index: 10001;
  padding: 8px 12px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0.9;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 16px;
  font-size: 24px;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  border: 0;
  z-index: 10002;
  transition: background-color 0.2s;
}

.lightbox-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-btn.prev {
  left: 20px;
}

.lightbox-btn.next {
  right: 20px;
}

.lightbox-btn.disabled {
  opacity: 0.3;
  cursor: default;
  display: none;
}

.ceremony button:focus-visible,
.ceremony-lang a:focus-visible,
.ceremony-lightbox button:focus-visible,
.ceremony-lightbox a:focus-visible {
  outline: 3px solid #de52a8;
  outline-offset: 4px;
}

.ceremony-archive {
  text-align: center;
  margin-top: 2.5rem;
}

.ceremony-archive a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 1023px) {
  .ceremony-lang {
    display: flex;
  }
}

@media (max-width: 767px) {
  .lightbox-progress {
    top: 80px;
    left: 14px;
    font-size: 12px;
    padding: 6px 10px;
  }

  .lightbox-close {
    top: 72px;
    right: 18px;
    font-size: 34px;
  }

  .lightbox-btn {
    padding: 12px;
    font-size: 20px;
  }

  .lightbox-btn.prev {
    left: 8px;
  }

  .lightbox-btn.next {
    right: 8px;
  }

  .lightbox-content-wrapper > img {
    max-width: 96vw;
    max-height: min(82vh, calc(100vh - 5.5rem));
  }

  .lightbox-meta {
    bottom: 8px;
    width: min(52rem, calc(100% - 1rem));
  }

  .lightbox-caption {
    font-size: 12px;
    max-height: min(24vh, 8.5rem);
    padding: 9px 12px;
  }
}

@media (max-width: 640px) {
  .ceremony {
    margin: 24px 12px 0;
    padding: 36px 16px;
    border-radius: 18px;
  }

  .ceremony h2 {
    font-size: 29px;
    line-height: 1.3;
  }

  .ceremony .event-date {
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  .ceremony .intro {
    font-size: 15px;
    line-height: 1.8;
  }

  .ceremony-filters {
    gap: 6px;
    margin: 24px 0 18px;
  }

  .ceremony-filters button {
    font-size: 12px;
    padding: 7px 12px;
  }

  .ceremony figcaption {
    padding: 18px;
  }

  .ceremony-caption {
    font-size: 14px;
    min-height: 0;
  }

  .ceremony-arrow {
    width: 38px;
    height: 38px;
  }

  .ceremony-arrow.previous {
    left: 8px;
  }

  .ceremony-arrow.next {
    right: 8px;
  }

  .ceremony-zoom {
    top: 9px;
    right: 9px;
    padding: 6px 8px;
  }

  .ceremony-zoom span {
    display: none;
  }

  .ceremony-bottom {
    flex-direction: column;
    gap: 16px;
  }

  .ceremony-thumbs button {
    width: 84px;
    min-width: 84px;
  }

  .ceremony-thumbs img {
    width: 74px;
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ceremony,
  .ceremony *,
  .ceremony-lightbox,
  .ceremony-lightbox * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
