/* Public gallery: scoped to preserve the established South Era theme. */
.se-public .se-gallery {
  padding: 62px 0 76px;
  color: #f4efe6;
}
.se-gallery [hidden] { display: none !important; }
.se-gallery-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 490px);
  align-items: end;
  gap: 32px;
  padding-bottom: 30px;
  border-bottom: 1px solid #d3b77d38;
}
.se-gallery-eyebrow,
.se-gallery-viewer-label {
  display: block;
  color: #d8bd8c;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: .11em;
}
.se-gallery-heading h1 {
  margin: 9px 0 0;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: #f4efe6;
}
.se-public .se-gallery-heading > p {
  margin: 0;
  color: #c8c7c6;
  font-size: 17px;
  line-height: 1.75;
}
.se-gallery-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 10px;
  color: #bfc0c6;
}
.se-gallery-note > span {
  color: #d8bd8c;
  font-size: 28px;
  line-height: 1;
}
.se-public .se-gallery-note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}
.se-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 22px;
  padding: 25px 0 26px;
}
.se-gallery-filters { display: flex; flex-wrap: wrap; gap: 9px; }
.se-gallery-filters button,
.se-gallery-viewer button {
  appearance: none;
  border: 1px solid #a897793f;
  border-radius: 5px;
  padding: 11px 15px;
  min-height: 46px;
  background: #191a20;
  color: #ddd8cf;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.se-gallery-filters button span {
  display: inline-block;
  margin-left: 8px;
  color: #bfc0c6;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.se-gallery-filters button:hover,
.se-gallery-viewer button:hover {
  color: #fff7e9;
  border-color: #d8bd8c;
  background: #29251e;
}
.se-gallery-filters button.is-active {
  background: #d8bd8c;
  border-color: #d8bd8c;
  color: #171511;
}
.se-gallery-filters button.is-active span { color: #393127; }
.se-public .se-gallery-result {
  margin: 0;
  color: #bfc0c6;
  font-size: 14px;
  line-height: 1.6;
}
.se-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.se-gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d3b77d2e;
  border-radius: 7px;
  background: #18191f;
}
.se-gallery-card.is-featured { grid-column: span 2; }
.se-gallery-open {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.se-gallery-media {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  background: #101114;
  border-bottom: 1px solid #d3b77d24;
}
.se-gallery-card.is-featured .se-gallery-media { aspect-ratio: 16 / 9; }
.se-gallery-card.is-video .se-gallery-media { aspect-ratio: 16 / 10; }
.se-gallery-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 40%, #b78b4533, transparent 65%), linear-gradient(135deg, #1b1c24, #101114);
  color: #d8bd8c;
  font-size: 16px;
}
.se-gallery-play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid #d8bd8c8a;
  border-radius: 50%;
  background: #d8bd8c12;
  box-shadow: 0 0 0 8px #d8bd8c07;
}
.se-gallery-play-icon svg { width: 32px; height: 32px; }
.se-gallery-video-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d8bd8c5e;
  border-radius: 4px;
  padding: 5px 10px;
  background: #101114e6;
  color: #f2dfb8;
  font-size: 14px;
}
.se-gallery-video-badge svg { width: 14px; height: 14px; }
.se-gallery-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform .25s ease;
}
.se-gallery-card.is-featured .se-gallery-media img { object-position: 65% center; }
.se-gallery-zoom {
  position: absolute;
  right: 15px;
  bottom: 15px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #fff3;
  border-radius: 50%;
  background: #101114d9;
  color: #f7e9cf;
  font-size: 22px;
}
.se-gallery-zoom svg { width: 20px; height: 20px; }
.se-gallery-card-copy { flex: 0 0 auto; padding: 20px 22px 23px; }
.se-gallery-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #d6bc8d;
  font-size: 14px;
  line-height: 1.5;
}
.se-gallery-card-meta > span:last-child { color: #c0b9ac; white-space: nowrap; }
.se-gallery-card h2 {
  margin: 10px 0 8px;
  color: #f4efe6;
  font-family: Cinzel, Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
}
.se-public .se-gallery-card-copy p {
  margin: 0;
  color: #c3c3c9;
  font-size: 16px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.se-gallery-card-copy time { display: block; margin-top: 14px; color: #b7b4ae; font-size: 14px; }
.se-gallery-card:hover { border-color: #d3b77d85; }
.se-gallery-open:hover .se-gallery-media img { transform: scale(1.025); }
.se-gallery :is(a, button):focus-visible {
  outline: 3px solid #f0cf8b;
  outline-offset: 4px;
}
.se-gallery-open:focus-visible { outline-offset: -4px; border-radius: 6px; }
.se-public :is(.se-gallery-noscript, .se-gallery-empty) {
  padding: 24px 0;
  margin: 0;
  font-size: 17px;
  color: #c8c7c6;
}

.se-gallery-viewer {
  width: min(1140px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: #f4efe6;
  background: #15161b;
  border: 1px solid #d8bd8c7a;
  border-radius: 8px;
  box-shadow: 0 25px 90px #0009;
}
.se-gallery-viewer::backdrop { background: #06070ae8; }
.se-gallery-viewer:not([open]) { display: none; }
.se-gallery-viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 23px;
  border-bottom: 1px solid #d3b77d2e;
}
.se-gallery-viewer-top > div { min-width: 0; }
.se-gallery-viewer-top h2 {
  margin: 4px 0 0;
  color: #f4efe6;
  font-family: Cinzel, Georgia, serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.35;
}
.se-gallery-close { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.se-gallery-close > span { font-size: 25px; line-height: 1; }
.se-gallery-viewer-media {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: #0c0d10;
}
.se-gallery-viewer-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: max(190px, calc(100vh - 330px));
  max-height: max(190px, calc(100dvh - 330px));
  object-fit: contain;
}
.se-gallery-viewer-media video {
  display: block;
  width: 100%;
  max-height: max(220px, calc(100vh - 330px));
  max-height: max(220px, calc(100dvh - 330px));
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}
.se-gallery-embed {
  width: 100%;
  height: min(57vw, max(220px, calc(100vh - 330px)));
  height: min(57vw, max(220px, calc(100dvh - 330px)));
  min-height: 180px;
  background: #000;
}
.se-gallery-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.se-public .se-gallery-media-error {
  margin: 0;
  padding: 16px 23px;
  background: #4a351b4d;
  color: #f0d4a3;
  font-size: 16px;
  line-height: 1.65;
}
.se-gallery-viewer-bottom { padding: 17px 23px 19px; }
.se-public .se-gallery-viewer-bottom > p:first-child {
  margin: 0 0 16px;
  color: #d1d1d5;
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.se-gallery-original {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #e9cb91;
  font-size: 16px;
  text-underline-offset: 4px;
}
.se-gallery-original:hover { color: #fff0d2; }
.se-gallery-viewer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.se-gallery-viewer-controls button { display: flex; align-items: center; gap: 10px; }
.se-gallery-viewer-controls button:disabled { opacity: .45; cursor: default; }
.se-gallery-viewer-controls > span {
  min-width: 70px;
  color: #d8bd8c;
  font-size: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.se-public .se-gallery-viewer-help {
  margin: 14px 0 0;
  color: #bfc0c6;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 950px) {
  .se-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .se-gallery-heading { grid-template-columns: 1fr; gap: 22px; }
  .se-gallery-heading > p { max-width: 65ch; }
}
@media (max-width: 600px) {
  .se-public .se-gallery { padding: 38px 0 50px; }
  .se-gallery-heading { gap: 18px; padding-bottom: 23px; }
  .se-gallery-toolbar { gap: 14px; padding-top: 22px; }
  .se-gallery-filters { gap: 8px; }
  .se-gallery-filters button { padding: 10px 12px; }
  .se-gallery-filters button span { margin-left: 5px; }
  .se-gallery-grid { grid-template-columns: 1fr; gap: 20px; }
  .se-gallery-card.is-featured { grid-column: auto; }
  .se-gallery-media { aspect-ratio: 6 / 5; }
  .se-gallery-card.is-featured .se-gallery-media { aspect-ratio: 16 / 10; }
  .se-gallery-card-copy { padding: 18px 18px 21px; }
  .se-gallery-viewer {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  .se-gallery-viewer-top { padding: 14px; gap: 12px; align-items: flex-start; }
  .se-gallery-viewer-top h2 { font-size: 20px; }
  .se-gallery-viewer-label { font-size: 14px; letter-spacing: .025em; }
  .se-gallery-viewer .se-gallery-close { padding: 10px; gap: 8px; font-size: 14px; }
  .se-gallery-viewer-media { padding: 8px; }
  .se-gallery-viewer-media img { max-height: max(180px, calc(100dvh - 360px)); }
  .se-gallery-viewer-bottom { padding: 15px 14px; }
  .se-gallery-viewer-controls { gap: 8px; }
  .se-gallery-viewer-controls button { padding: 10px; gap: 7px; font-size: 14px; }
  .se-gallery-viewer-controls > span { min-width: 54px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .se-gallery *, .se-gallery *::before, .se-gallery *::after { transition: none !important; }
}
