/**
 * 21C Exhibitions Showcase front-end (carousel + exhibition overlay).
 * Reuses 21c-systems Frontend Styler tokens / cs-media-card patterns.
 */

.c21-exhibitions-showcase {
  --c21-exhibitions-gap: var(--auth-capture-item-spacing, 0.75rem);
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.c21-exhibitions-showcase *,
.c21-exhibitions-showcase *::before,
.c21-exhibitions-showcase *::after {
  box-sizing: border-box;
}

.c21-exhibitions-showcase__admin-notice {
  margin: 0 0 0.75rem;
}

/* ---- Welcome / Enter (pre-overlay) ---- */

.c21-exhibitions-showcase__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 3.25rem;
}

.c21-exhibitions-showcase__welcome {
  width: 100%;
  margin: 0 0 1.75rem;
  color: #1a1a1a;
  font-size: 1.125rem;
  line-height: 1.55;
}

.c21-exhibitions-showcase__welcome > *:first-child {
  margin-top: 0;
}

.c21-exhibitions-showcase__welcome > *:last-child {
  margin-bottom: 0;
}

.c21-exhibitions-showcase__welcome h1,
.c21-exhibitions-showcase__welcome h2,
.c21-exhibitions-showcase__welcome h3 {
  margin: 0 0 0.65rem;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
}

.c21-exhibitions-showcase__welcome h1 {
  font-size: 1.85rem;
}

.c21-exhibitions-showcase__welcome h2 {
  font-size: 1.55rem;
}

.c21-exhibitions-showcase__welcome h3 {
  font-size: 1.3rem;
}

.c21-exhibitions-showcase__enter-wrap {
  margin: 0;
  padding: 0;
}

.c21-exhibitions-showcase__enter {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.9rem 1.85rem;
  border: 0;
  border-radius: 0.65rem;
  background: #171717;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.14);
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.c21-exhibitions-showcase__enter:hover,
.c21-exhibitions-showcase__enter:focus {
  background: #2e2e2e;
  color: #ffffff;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 10px 22px rgba(0, 0, 0, 0.18);
  outline: none;
  transform: translateY(-1px);
}

.c21-exhibitions-showcase__enter:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 3px;
}

.c21-exhibitions-showcase__enter:active {
  background: #0f0f0f;
  transform: translateY(0);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 4px 10px rgba(0, 0, 0, 0.14);
}

/* ---- Carousel (in-page + overlay track) ---- */

.c21-exhibitions-showcase__carousel {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}

.c21-exhibitions-showcase__track {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.c21-exhibitions-showcase__track::-webkit-scrollbar {
  display: none;
}

.c21-exhibitions-showcase__slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  scroll-snap-align: start;
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* ---- Focus panel media lists ---- */

.c21-exhibitions-showcase__subgallery {
  margin-top: 0.75rem;
}

.c21-exhibitions-showcase__subgallery-label {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.c21-exhibitions-showcase__subgallery-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
}

.c21-exhibitions-showcase__subgallery[data-slot="video"] .c21-exhibitions-showcase__subgallery-list,
.c21-exhibitions-showcase__subgallery[data-slot="audio"] .c21-exhibitions-showcase__subgallery-list,
.c21-exhibitions-showcase__subgallery[data-slot="document"] .c21-exhibitions-showcase__subgallery-list {
  grid-template-columns: 1fr;
}

.c21-exhibitions-showcase__subgallery-item img,
.c21-exhibitions-showcase__subgallery-item video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--cs-media-card-radius, 30px) * 0.25);
}

.c21-exhibitions-showcase__subgallery-item audio {
  width: 100%;
}

.c21-exhibitions-showcase__doc-link {
  display: inline-block;
  color: var(--auth-color-primary, #2563eb);
}

/* ---- Focus carousel template (base; overlay overrides below) ---- */

.c21-exhibitions-focus {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.c21-exhibitions-focus__stage {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.c21-exhibitions-focus.is-about-open .c21-exhibitions-focus__stage,
.c21-exhibitions-focus.is-media-open .c21-exhibitions-focus__stage {
  gap: var(--c21-exhibitions-gap);
}

.c21-exhibitions-focus__primary {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  transition: flex-basis 0.35s ease, max-width 0.35s ease;
}

.c21-exhibitions-focus.is-about-open:not(.is-media-open) .c21-exhibitions-focus__primary,
.c21-exhibitions-focus.is-media-open:not(.is-about-open) .c21-exhibitions-focus__primary {
  flex: 1 1 70%;
  max-width: 70%;
}

.c21-exhibitions-focus.is-about-open.is-media-open .c21-exhibitions-focus__primary {
  flex: 1 1 40%;
  max-width: 40%;
}

.c21-exhibitions-focus__media {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.c21-exhibitions-focus__image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

.c21-exhibitions-focus__placeholder {
  min-height: 12rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

.c21-exhibitions-focus__title-plaque {
  display: none;
}

.c21-exhibitions-focus__header {
  display: none;
}

.c21-exhibitions-focus__plaque-btn {
  display: none;
}

.c21-exhibitions-focus__panel {
  flex: 0 0 0;
  max-width: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition:
    flex-basis 0.35s ease,
    max-width 0.35s ease,
    opacity 0.25s ease,
    visibility 0.25s ease;
  background: var(--cs-media-card-bg, #f8f9fb);
  border: 1px solid var(--auth-color-border, #d1d5db);
  border-radius: calc(var(--cs-media-card-radius, 30px) * 0.35);
  box-sizing: border-box;
}

.c21-exhibitions-focus.is-about-open .c21-exhibitions-focus__panel--about,
.c21-exhibitions-focus.is-media-open .c21-exhibitions-focus__panel--media {
  flex: 0 0 30%;
  max-width: 30%;
  opacity: 1;
  visibility: visible;
  overflow: auto;
  padding: var(--cs-media-card-padding, 1rem);
}

.c21-exhibitions-focus:not(.is-about-open) .c21-exhibitions-focus__panel--about,
.c21-exhibitions-focus:not(.is-media-open) .c21-exhibitions-focus__panel--media {
  pointer-events: none;
  border-width: 0;
  padding: 0;
  margin: 0;
}

.c21-exhibitions-focus__panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.c21-exhibitions-focus__panel-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.c21-exhibitions-focus__close {
  min-width: 2.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #111;
}

.c21-exhibitions-focus__section {
  margin: 0 0 1rem;
}

.c21-exhibitions-focus__section:last-child {
  margin-bottom: 0;
}

.c21-exhibitions-focus__section-title {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--auth-color-text, #111827);
}

.c21-exhibitions-focus__section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.c21-exhibitions-focus__section[data-slot="gallery_image"] .c21-exhibitions-focus__section-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.4rem;
}

.c21-exhibitions-focus__section-item img,
.c21-exhibitions-focus__section-item video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--cs-media-card-radius, 30px) * 0.2);
}

.c21-exhibitions-focus__section-item audio {
  width: 100%;
}

.c21-exhibitions-focus__media-caption {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--auth-color-muted, #6b7280);
}

.c21-exhibitions-focus__doc-link {
  color: var(--auth-color-primary, #2563eb);
}

.c21-exhibitions-focus__panel-links {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

/*
 * Same look as Read more / Read less: panel text colour, underline only on hover
 * and keyboard focus. Every state is listed so theme link rules cannot win.
 */
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__work-page-link,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__work-page-link:visited,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__work-page-link:hover,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__work-page-link:focus,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__artist-profile-link,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__artist-profile-link:visited,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__artist-profile-link:hover,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__artist-profile-link:focus {
  color: inherit;
  text-decoration: none;
  text-decoration-color: currentColor;
}

.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__work-page-link:hover,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__work-page-link:focus-visible,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__artist-profile-link:hover,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__artist-profile-link:focus-visible {
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__work-page-link:focus-visible,
.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__artist-profile-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.c21-exhibitions-focus .c21-exhibitions-focus__panel-links .c21-exhibitions-focus__panel-links-sep {
  color: inherit;
  text-decoration: none;
}

.c21-exhibitions-focus__about-short[hidden],
.c21-exhibitions-focus__about-full[hidden] {
  display: none !important;
}

.c21-exhibitions-focus__about-full:focus {
  outline: none;
}

/* Button reset so it reads as text in the panel colour; underline only on hover and keyboard focus. */
.c21-exhibitions-focus .c21-exhibitions-focus__about-description .c21-exhibitions-focus__read-more,
.c21-exhibitions-focus .c21-exhibitions-focus__about-description .c21-exhibitions-focus__read-more:hover,
.c21-exhibitions-focus .c21-exhibitions-focus__about-description .c21-exhibitions-focus__read-more:focus {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: inherit;
  text-decoration: none;
  text-decoration-color: currentColor;
  cursor: pointer;
}

.c21-exhibitions-focus .c21-exhibitions-focus__about-description .c21-exhibitions-focus__read-more:hover,
.c21-exhibitions-focus .c21-exhibitions-focus__about-description .c21-exhibitions-focus__read-more:focus-visible {
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.c21-exhibitions-focus .c21-exhibitions-focus__about-description .c21-exhibitions-focus__read-more:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---- Fullscreen exhibition overlay ---- */

.c21-exhibitions-showcase__overlay[hidden] {
  display: none !important;
}

.c21-exhibitions-showcase__overlay {
  --c21-exhibitions-overlay-gap: clamp(0.75rem, 2.5vw, 1.75rem);
  --c21-exhibitions-overlay-accent: #e11d48;
  --c21-exhibitions-overlay-accent-hover: #fb7185;
  --c21-exhibitions-plaque-bg: #ffffff;
  --c21-exhibitions-plaque-text: #111111;
  --c21-exhibitions-plaque-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  --c21-exhibitions-panel-bg: #f7f7f7;
  /* Fixed header strip height — fits plaque/tab buttons; never changes with panel state. */
  --c21-exhibitions-plaque-header-height: 2.15rem;
  --c21-exhibitions-plaque-tab-block: var(--c21-exhibitions-plaque-header-height);
  /* Image max-height reserve: nameplate + its margins under the painting. */
  --c21-exhibitions-nameplate-reserve: 5.25rem;
  --c21-exhibitions-painting-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --c21-exhibitions-bar-bg: #111111;
  --c21-exhibitions-bar-height: 3.25rem;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  background-color: #0a0a0a;
  color: #f5f5f5;
  overflow: hidden;
  height: 100%;
  max-height: 100dvh;
}

html.c21-exhibitions-exhibition-open,
body.c21-exhibitions-exhibition-open {
  overflow: hidden;
}

.c21-exhibitions-showcase__overlay:fullscreen,
.c21-exhibitions-showcase__overlay:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-height: none;
}

.c21-exhibitions-showcase__overlay-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.c21-exhibitions-showcase__overlay-body {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.65rem clamp(4.5rem, 9vw, 6.5rem) 0.35rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.c21-exhibitions-showcase__overlay-loading,
.c21-exhibitions-showcase__empty {
  margin: 2rem 1rem;
  text-align: center;
  color: #d4d4d4;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__gallery,
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__gallery[data-display="carousel"],
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__carousel {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__track {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__slide {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

/*
 * Fixed header strip: always present, fixed height, holds both plaque/tab buttons.
 * Painting and panels live in .focus__stage below — buttons can never cover the image.
 */
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__header {
  position: relative;
  display: block;
  flex: 0 0 var(--c21-exhibitions-plaque-header-height);
  height: var(--c21-exhibitions-plaque-header-height);
  width: 100%;
  margin: 0;
  padding: 0;
  z-index: 6;
  /* Height must not depend on panel open/closed state */
  box-sizing: border-box;
}

/* Plaque buttons — live inside the header strip only */
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--c21-exhibitions-plaque-bg);
  color: var(--c21-exhibitions-plaque-text);
  box-shadow: var(--c21-exhibitions-plaque-shadow);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn-label {
  display: inline-block;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-chevron {
  display: block;
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.25s ease;
  /* Closed: chevron points down (reveal) */
  transform: rotate(0deg);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn[aria-expanded="true"] .c21-exhibitions-focus__plaque-chevron {
  /* Open: chevron points up (collapse) */
  transform: rotate(180deg);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--about {
  left: 0.35rem;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--media {
  right: 0.35rem;
}

/*
 * Open state: tab within the same header strip, visually connected to its panel below.
 * Closed state above is unchanged (white, shadow, full rounding).
 */
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn[aria-expanded="true"] {
  background: var(--c21-exhibitions-panel-bg);
  box-shadow: none;
  /* Top corners only — bottom flush with panel top at the strip/stage boundary */
  border-radius: 0.5rem 0.5rem 0 0;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--about[aria-expanded="true"] {
  left: 0;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--media[aria-expanded="true"] {
  right: 0;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  align-items: stretch;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__primary {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/*
 * Media column fills primary; image is capped to leave room for the nameplate.
 * Nameplate is a sibling of the image inside this column, so leftover stage height
 * falls BELOW the nameplate — not between painting and nameplate.
 */
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__media {
  flex: 1 1 auto;
  min-height: min(36vh, 14rem);
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__image {
  position: static;
  display: block;
  flex: 0 1 auto;
  min-height: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  /* Cap to media height minus nameplate so the img box = visible painting, not the stage */
  max-height: calc(100% - var(--c21-exhibitions-nameplate-reserve));
  margin: 0 auto;
  object-fit: contain;
  object-position: top center;
  box-shadow: var(--c21-exhibitions-painting-shadow);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__placeholder {
  position: static;
  display: block;
  flex: 0 1 auto;
  min-height: 0;
  width: min(100%, 28rem);
  height: min(40vh, 16rem);
  max-width: 100%;
  max-height: calc(100% - var(--c21-exhibitions-nameplate-reserve));
  margin: 0 auto;
  background: #262626;
  box-shadow: var(--c21-exhibitions-painting-shadow);
}

/* Title / artist glance plaque — fixed gap below the image’s own bottom edge */
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__title-plaque {
  display: block;
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  max-width: min(28rem, 92%);
  margin: 1.75rem auto 0.35rem;
  padding: 0.55rem 1.1rem 0.65rem;
  background: var(--c21-exhibitions-plaque-bg);
  color: var(--c21-exhibitions-plaque-text);
  box-shadow: var(--c21-exhibitions-plaque-shadow);
  border-radius: 0.2rem;
  text-align: center;
  line-height: normal;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__title-plaque-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--c21-exhibitions-plaque-text);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__title-plaque-artist {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.3;
  color: #444;
}

/* Drawers */
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__panel {
  background: var(--c21-exhibitions-panel-bg);
  color: #1a1a1a;
  border-color: #e5e5e5;
  box-shadow: var(--c21-exhibitions-plaque-shadow);
}

/* Square the corner under the open tab so button + panel read as one shape.
 * Panels start at the top of the stage (directly under the fixed header strip). */
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-about-open .c21-exhibitions-focus__panel--about {
  border-top-left-radius: 0;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-media-open .c21-exhibitions-focus__panel--media {
  border-top-right-radius: 0;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-about-open .c21-exhibitions-focus__panel--about,
.c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-media-open .c21-exhibitions-focus__panel--media {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__panel-title {
  color: #111;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__close {
  border-color: #d4d4d4;
  background: #fff;
  color: #111;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__about-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__about-artist {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: #444;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__about-description {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #222;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__about-description p:last-child {
  margin-bottom: 0;
}

/* About-panel details + price rows: shared Systems record-detail-fields.css. */

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__section-title {
  color: #111;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__media-caption {
  color: #444;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-focus__doc-link {
  color: var(--c21-exhibitions-overlay-accent);
}

/* ---- Bottom bar ---- */

.c21-exhibitions-showcase__overlay-bar {
  flex: 0 0 auto;
  z-index: 8;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 0.75rem;
  min-height: var(--c21-exhibitions-bar-height);
  padding: 0.4rem var(--c21-exhibitions-overlay-gap);
  background: var(--c21-exhibitions-bar-bg);
  color: #f5f5f5;
  border-top: 1px solid #262626;
}

.c21-exhibitions-showcase__overlay-bar-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  z-index: 1;
}

/* ---- Share button (immediately left of the title) ---- */

.c21-exhibitions-showcase__share-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 2;
  margin-left: auto;
}

/*
 * The bar's gap separates Share from the title. The title is capped so Share
 * (about 1.7rem plus that 0.75rem gap) always stays right of the centred music
 * player, whose half-width is at most min(15rem, 21vw).
 */
.c21-exhibitions-showcase__share-wrap + .c21-exhibitions-showcase__overlay-bar-title {
  margin-left: 0;
  padding-left: 0;
  max-width: min(30rem, 40vw, calc(50vw - min(15rem, 21vw) - var(--c21-exhibitions-overlay-gap) - 2.25rem - 3px));
}

/* Hover and focus repeat the normal look so theme button rules cannot change it. */
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share,
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share:hover,
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share:focus {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  border: 1.5px solid #ffffff;
  border-radius: 0.35rem;
  background: #0a0a0a;
  color: #ffffff;
  /* Same height as EXIT: 0.9rem icon + 2 × 0.3rem padding = EXIT's 0.7rem text + 2 × 0.4rem. */
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.3rem;
  box-shadow: none;
  text-shadow: none;
  outline: none;
  cursor: pointer;
  transition: none;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.75));
}

.c21-exhibitions-showcase__share-icon {
  display: block;
  width: 1em;
  height: 1em;
}

/* Right-aligned to the button, which always sits in the right half of the bar. */
.c21-exhibitions-showcase__share-box {
  position: absolute;
  right: 0;
  left: auto;
  bottom: calc(100% + 0.45rem);
  max-width: calc(100vw - 2 * var(--c21-exhibitions-overlay-gap));
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 9rem;
  padding: 0.35rem;
  font-family: inherit;
  letter-spacing: inherit;
  background: #1f1f1f;
  border: 1px solid #404040;
  border-radius: 0.35rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.c21-exhibitions-showcase__share-box[hidden] {
  display: none !important;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share-option,
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share-option:visited {
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #f5f5f5;
  /* Buttons do not inherit fonts by default; these match the bar title, which inherits from the bar. */
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: inherit;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share-option:hover,
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share-option:focus {
  background: #262626;
  color: #ffffff;
  text-decoration: none;
  outline: none;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__share-option:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

.c21-exhibitions-showcase__overlay-bar-title {
  margin: 0 0 0 auto;
  padding: 0 0 0 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  /*
   * Share the bar with centered now-playing: was min(42rem, ~50%), which starved the
   * music label. Cap both sides near ~30rem / ~40vw so typical titles + tracks fit;
   * very long values still ellipsis (tooltip covers the full track line).
   */
  max-width: min(30rem, 40vw);
  z-index: 1;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.c21-exhibitions-showcase__exit {
  --c21-exhibitions-exit-neon: #7dffa8;
  --c21-exhibitions-exit-neon-core: #b8ffd4;
  appearance: none;
  border: 1.5px solid var(--c21-exhibitions-exit-neon);
  border-radius: 0.35rem;
  background: #0a0a0a;
  color: var(--c21-exhibitions-exit-neon-core);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  text-shadow:
    0 0 2px var(--c21-exhibitions-exit-neon-core),
    0 0 6px var(--c21-exhibitions-exit-neon),
    0 0 12px rgba(125, 255, 168, 0.85),
    0 0 20px rgba(57, 255, 154, 0.55);
  box-shadow:
    0 0 2px var(--c21-exhibitions-exit-neon),
    0 0 6px rgba(125, 255, 168, 0.75),
    0 0 12px rgba(57, 255, 154, 0.45),
    inset 0 0 6px rgba(125, 255, 168, 0.18);
  transition: color 0.15s ease, border-color 0.15s ease, text-shadow 0.15s ease, box-shadow 0.15s ease;
}

.c21-exhibitions-showcase__exit:hover,
.c21-exhibitions-showcase__exit:focus {
  color: #eafff2;
  border-color: #b8ffd4;
  outline: none;
  text-shadow:
    0 0 3px #fff,
    0 0 8px var(--c21-exhibitions-exit-neon-core),
    0 0 16px var(--c21-exhibitions-exit-neon),
    0 0 28px rgba(57, 255, 154, 0.7);
  box-shadow:
    0 0 3px #b8ffd4,
    0 0 8px rgba(125, 255, 168, 0.9),
    0 0 16px rgba(57, 255, 154, 0.55),
    inset 0 0 8px rgba(125, 255, 168, 0.28);
}

.c21-exhibitions-showcase__overlay-exit-fs {
  appearance: none;
  border: 0;
  background: transparent;
  color: #a3a3a3;
  font-size: 0.7rem;
  line-height: 1.2;
  padding: 0.25rem 0.35rem;
  cursor: pointer;
  text-decoration: underline;
}

.c21-exhibitions-showcase__overlay-exit-fs[hidden] {
  display: none !important;
}

.c21-exhibitions-showcase__music-controls {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
  /* Matched to exhibition title budget so neither starves the other under typical lengths. */
  max-width: min(30rem, 42vw);
  z-index: 0;
}

.c21-exhibitions-showcase__music-controls--empty {
  pointer-events: none;
}

.c21-exhibitions-showcase__music-mute,
.c21-exhibitions-showcase__music-volume-btn {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f5f5f5;
  cursor: pointer;
}

.c21-exhibitions-showcase__music-mute:hover,
.c21-exhibitions-showcase__music-volume-btn:hover,
.c21-exhibitions-showcase__music-mute:focus,
.c21-exhibitions-showcase__music-volume-btn:focus {
  color: #fff;
  background: #262626;
}

.c21-exhibitions-showcase__music-mute[aria-pressed="true"] {
  color: #a3a3a3;
}

.c21-exhibitions-showcase__speaker-icon {
  display: block;
}

.c21-exhibitions-showcase__now-playing {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #d4d4d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.c21-exhibitions-showcase__now-playing[hidden] {
  display: none !important;
}

.c21-exhibitions-showcase__volume-wrap {
  position: relative;
  flex: 0 0 auto;
}

.c21-exhibitions-showcase__volume-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  z-index: 12;
  padding: 0.55rem 0.7rem;
  background: #1f1f1f;
  border: 1px solid #404040;
  border-radius: 0.35rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.c21-exhibitions-showcase__volume-popover[hidden] {
  display: none !important;
}

.c21-exhibitions-showcase__music-volume {
  width: 8.5rem;
  max-width: 28vw;
  height: 1.25rem;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: var(--c21-exhibitions-overlay-accent, #e11d48);
}

/* Large circular arrows flanking the painting — subtle, wall-toned, no glow. */
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav {
  position: absolute;
  top: 50%;
  z-index: 7;
  transform: translateY(-50%);
  margin: 0;
  width: clamp(3.25rem, 7vw, 4.25rem);
  height: clamp(3.25rem, 7vw, 4.25rem);
  border-radius: 50%;
  border: 1px solid rgba(245, 245, 245, 0.12);
  background: rgba(10, 10, 10, 0.28);
  color: #0a0a0a;
  box-shadow: none;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav-arrow {
  display: block;
  width: clamp(1.35rem, 3vw, 1.75rem);
  height: clamp(1.35rem, 3vw, 1.75rem);
  /* Soft mid-tone over the dark wall — readable without shouting */
  color: rgba(245, 245, 245, 0.42);
  filter: drop-shadow(0 0 1px rgba(10, 10, 10, 0.55));
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav--prev {
  left: clamp(0.85rem, 2.5vw, 1.75rem);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav--next {
  right: clamp(0.85rem, 2.5vw, 1.75rem);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav:hover,
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav:focus {
  background: rgba(10, 10, 10, 0.42);
  border-color: rgba(245, 245, 245, 0.2);
  outline: none;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav:hover .c21-exhibitions-showcase__nav-arrow,
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav:focus .c21-exhibitions-showcase__nav-arrow {
  color: rgba(245, 245, 245, 0.62);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav[hidden] {
  display: none !important;
}

/* Buy controls inside About panel */
.c21-exhibitions-buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin: 0.25rem 0 0;
}

.c21-exhibitions-buy__email-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  color: #333;
}

.c21-exhibitions-buy__name,
.c21-exhibitions-buy__email {
  width: 100%;
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #c4c4c4;
  border-radius: 0.35rem;
  background: #fff;
  color: #1c1830;
  box-sizing: border-box;
}

.c21-exhibitions-buy__button {
  width: 100%;
  box-sizing: border-box;
}

.c21-exhibitions-buy__message {
  margin: 0;
  color: #b32d2e;
  font-size: 0.9rem;
}

.c21-exhibitions-buy__sold {
  margin: 0.5rem 0 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-buy__name,
.c21-exhibitions-showcase__overlay .c21-exhibitions-buy__email {
  background: #fff;
  border-color: #c4c4c4;
  color: #111;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-buy__message {
  color: #b91c1c;
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-buy__sold {
  color: #666;
}

/*
 * Background music (SoundCloud): keep the iframe in the document (not
 * display:none) so the Widget can become READY before Enter, but keep it
 * visually and interactively invisible — this is not a player UI.
 */
.c21-exhibitions-showcase__bg-music {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.c21-exhibitions-showcase__bg-music-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
}

/* ---- Mobile: painting → Listen group → About group ---- */
@media (max-width: 700px) {
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus {
    padding-top: 0.35rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Dissolve header so buttons can reorder with panels below the painting */
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__header {
    display: contents;
    flex: none;
    height: auto;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn {
    position: static;
    display: inline-flex;
    top: auto;
    bottom: auto;
    height: auto;
    min-height: var(--c21-exhibitions-plaque-header-height);
    width: auto;
    margin: 0.35rem 0;
    padding: 0.55rem 0.95rem;
    border-radius: 0.5rem;
  }

  /* Mobile: button sits above its panel — drop bottom margin when open so they meet */
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn[aria-expanded="true"] {
    margin-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__stage {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__primary,
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-about-open .c21-exhibitions-focus__primary,
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-media-open .c21-exhibitions-focus__primary,
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-about-open.is-media-open .c21-exhibitions-focus__primary {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    height: auto;
    order: 1;
  }

  /* Both buttons share one row under the painting; a lone button fills the row. */
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--about,
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--media {
    flex: 1 1 0;
    min-width: 0;
    align-self: stretch;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--about {
    order: 2;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__plaque-btn--media {
    order: 3;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__panel--media,
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-media-open .c21-exhibitions-focus__panel--media {
    order: 5;
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-media-open .c21-exhibitions-focus__panel--media {
    border-top-right-radius: 0;
    /* Tab is right-aligned; keep a slight top-left round on the free corner */
    border-top-left-radius: 0.5rem;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__panel--about,
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-about-open .c21-exhibitions-focus__panel--about {
    order: 4;
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-about-open .c21-exhibitions-focus__panel--about {
    border-top-left-radius: 0;
    border-top-right-radius: 0.5rem;
  }

  /* Both tabs sit on the About panel, which comes first under the row. */
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus.is-about-open.is-media-open .c21-exhibitions-focus__panel--about {
    border-top-right-radius: 0;
  }

  /*
   * Header + stage dissolved — children wrap into full-width rows (painting,
   * button row, panels). align-content keeps spare height out of the button row.
   */
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    column-gap: 0.5rem;
    row-gap: 0;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus__stage {
    display: contents;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus:not(.is-media-open) .c21-exhibitions-focus__panel--media,
  .c21-exhibitions-showcase__overlay .c21-exhibitions-focus:not(.is-about-open) .c21-exhibitions-focus__panel--about {
    display: none;
  }

  /* Phones: EXIT left and Share right on the first row, then music, then title. */
  .c21-exhibitions-showcase__overlay-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-height: 0;
    padding: 0.5rem var(--c21-exhibitions-overlay-gap) 0.65rem;
  }

  .c21-exhibitions-showcase__overlay-bar-left {
    position: relative;
    z-index: 1;
    order: 1;
  }

  .c21-exhibitions-showcase__share-wrap {
    order: 2;
    margin-left: auto;
  }

  .c21-exhibitions-showcase__music-controls {
    position: relative;
    left: auto;
    transform: none;
    max-width: none;
    width: 100%;
    order: 3;
  }

  .c21-exhibitions-showcase__overlay-bar-title,
  .c21-exhibitions-showcase__share-wrap + .c21-exhibitions-showcase__overlay-bar-title {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
    order: 4;
  }

  .c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__nav {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.85rem;
  }

  .c21-exhibitions-showcase__overlay-body {
    padding-left: 3.75rem;
    padding-right: 3.75rem;
  }

  .c21-exhibitions-showcase__now-playing {
    font-size: 0.7rem;
  }
}

/* ---- Crossfade transition ---- */

.c21-exhibitions-showcase__carousel--crossfade {
  --c21-exhibitions-crossfade-duration: 0.55s;
}

.c21-exhibitions-showcase__carousel--crossfade .c21-exhibitions-showcase__track {
  position: relative;
  display: block;
  overflow: hidden;
  scroll-snap-type: none;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: auto;
  touch-action: pan-y;
}

.c21-exhibitions-showcase__carousel--crossfade .c21-exhibitions-showcase__slide {
  flex: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--c21-exhibitions-crossfade-duration) ease;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.c21-exhibitions-showcase__carousel--crossfade .c21-exhibitions-showcase__slide.is-active {
  position: relative;
  inset: auto;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.c21-exhibitions-showcase__carousel--crossfade .c21-exhibitions-showcase__slide.is-entering,
.c21-exhibitions-showcase__carousel--crossfade .c21-exhibitions-showcase__slide.is-leaving {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.c21-exhibitions-showcase__carousel--crossfade .c21-exhibitions-showcase__slide.is-entering {
  opacity: 0;
  z-index: 2;
}

.c21-exhibitions-showcase__carousel--crossfade .c21-exhibitions-showcase__slide.is-leaving {
  opacity: 0;
  z-index: 2;
}

.c21-exhibitions-showcase__overlay
  .c21-exhibitions-showcase__carousel--crossfade
  .c21-exhibitions-showcase__track {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.c21-exhibitions-showcase__overlay
  .c21-exhibitions-showcase__carousel--crossfade
  .c21-exhibitions-showcase__slide.is-active {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.c21-exhibitions-showcase__overlay
  .c21-exhibitions-showcase__carousel--crossfade
  .c21-exhibitions-showcase__slide.is-leaving,
.c21-exhibitions-showcase__overlay
  .c21-exhibitions-showcase__carousel--crossfade
  .c21-exhibitions-showcase__slide.is-entering {
  display: flex;
  flex-direction: column;
}

/* ---- Theatre curtain (opening / closing) ----
 * Closed by default in plain CSS. JS moves data-state one step at a time, each
 * step starting when the previous transition has ended:
 *   Begin:  closed → text-out → light-out → opening → (removed)
 *   Finish: open → closing → light-in → closed
 * light-out / light-in are skipped when the spotlight is off. data-screen
 * (welcome | thanks) stays fixed through a sequence, so entrance animations are
 * never removed mid-fade. Only transform and opacity change; nothing is hidden
 * or moved in the layout until the whole layer is removed.
 * Per-exhibition values arrive as custom properties on the exhibition root:
 * --c21-exhibitions-curtain-color, -speed, -close-speed, -intro, -stagger,
 * -spotlight, -spotlight-core, -text-fade, -spotlight-fade, -title-color.
 * Never redeclare those here, or they would override the inherited values.
 */

.c21-exhibitions-curtain {
  --c21-exhibitions-curtain-ease: cubic-bezier(0.65, 0, 0.35, 1);
  /* When the staggered entrance starts (after the fade in from black on first open). */
  --c21-exhibitions-curtain-start: 0.3s;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100dvh;
  max-height: 100%;
  z-index: 20;
  overflow: hidden;
  /* Other text on the curtain follows the title colour; buttons keep their own. */
  color: var(--c21-exhibitions-curtain-title-color, #ffffff);
  outline: none;
}

.c21-exhibitions-curtain[hidden] {
  display: none !important;
}

/* Velvet panels: repeating vertical folds, darker outer edges, shadow at the seam. */
.c21-exhibitions-curtain__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  background-color: var(--c21-exhibitions-curtain-color, #8b1a1a);
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0.5) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.42) 0,
      rgba(0, 0, 0, 0.1) 1.7%,
      rgba(255, 255, 255, 0.12) 3.4%,
      rgba(0, 0, 0, 0.1) 5.1%,
      rgba(0, 0, 0, 0.42) 6.8%
    );
  transition: transform var(--c21-exhibitions-curtain-speed, 3000ms) var(--c21-exhibitions-curtain-ease);
  will-change: transform;
}

.c21-exhibitions-curtain__panel--left {
  left: 0;
  z-index: 2;
  transform-origin: left top;
  box-shadow: inset -28px 0 40px -14px rgba(0, 0, 0, 0.7), 10px 0 24px rgba(0, 0, 0, 0.45);
}

.c21-exhibitions-curtain__panel--left::before,
.c21-exhibitions-curtain__panel--right::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.c21-exhibitions-curtain__panel--left::before {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 20%);
}

.c21-exhibitions-curtain__panel--right {
  right: 0;
  z-index: 1;
  transform-origin: right top;
  box-shadow: inset 28px 0 40px -14px rgba(0, 0, 0, 0.7);
}

.c21-exhibitions-curtain__panel--right::before {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 20%);
}

/* Slow sway — on `rotate`, so it never competes with the `transform` transition.
 * Not tied to data-state: stopping it mid-swing would make the panels jump. */
.c21-exhibitions-curtain:not([data-sway="0"]) .c21-exhibitions-curtain__panel--left {
  animation: c21-exhibitions-curtain-sway-left 9s ease-in-out infinite;
}

.c21-exhibitions-curtain:not([data-sway="0"]) .c21-exhibitions-curtain__panel--right {
  animation: c21-exhibitions-curtain-sway-right 10s ease-in-out infinite;
}

@keyframes c21-exhibitions-curtain-sway-left {
  0%,
  100% {
    rotate: 0deg;
  }
  50% {
    rotate: 0.35deg;
  }
}

@keyframes c21-exhibitions-curtain-sway-right {
  0%,
  100% {
    rotate: 0deg;
  }
  50% {
    rotate: -0.35deg;
  }
}

/* Parted: panels bunch slightly toward the outer edges and slide fully out of view. */
.c21-exhibitions-curtain[data-state="opening"] .c21-exhibitions-curtain__panel--left,
.c21-exhibitions-curtain[data-state="open"] .c21-exhibitions-curtain__panel--left {
  transform: translateX(-100%) scaleX(0.9);
}

.c21-exhibitions-curtain[data-state="opening"] .c21-exhibitions-curtain__panel--right,
.c21-exhibitions-curtain[data-state="open"] .c21-exhibitions-curtain__panel--right {
  transform: translateX(100%) scaleX(0.9);
}

.c21-exhibitions-curtain[data-state="closing"] .c21-exhibitions-curtain__panel {
  transition-duration: var(--c21-exhibitions-curtain-close-speed, 3000ms);
}

/* Spotlight: bright centre + soft pool (brightness via -spotlight-core / -spotlight,
 * both 0–1, set per exhibition) + edge vignette. Not rendered at brightness 0. */
.c21-exhibitions-curtain__spotlight {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(
      ellipse 26% 34% at 50% 44%,
      rgba(255, 246, 220, calc(0.7 * var(--c21-exhibitions-curtain-spotlight-core, 0.25))) 0%,
      rgba(255, 246, 220, 0) 100%
    ),
    radial-gradient(
      ellipse 46% 56% at 50% 44%,
      rgba(255, 236, 190, calc(0.4 * var(--c21-exhibitions-curtain-spotlight, 0.5))) 0%,
      rgba(255, 236, 190, 0) 70%
    ),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  transition: opacity var(--c21-exhibitions-curtain-spotlight-fade, 1000ms) ease;
}

.c21-exhibitions-curtain[data-state="light-out"] .c21-exhibitions-curtain__spotlight,
.c21-exhibitions-curtain[data-state="opening"] .c21-exhibitions-curtain__spotlight,
.c21-exhibitions-curtain[data-state="open"] .c21-exhibitions-curtain__spotlight,
.c21-exhibitions-curtain[data-state="closing"] .c21-exhibitions-curtain__spotlight {
  opacity: 0;
}

/* Title, video and button centred on the curtain; they fade as one group.
 * Welcome and thank-you screens use this same column: Begin and Exit take the
 * same slot after the video, so they line up by construction. */
.c21-exhibitions-curtain__content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* If the column is taller than the screen, keep its top on screen. */
  justify-content: safe center;
  gap: clamp(1rem, 3dvh, 2rem);
  padding: clamp(1.5rem, 8dvh, 5rem) clamp(1.5rem, 6vw, 5rem);
  text-align: center;
  pointer-events: none;
  transition: opacity var(--c21-exhibitions-curtain-text-fade, 1000ms) ease;
}

.c21-exhibitions-curtain__content > * {
  pointer-events: auto;
}

.c21-exhibitions-curtain:not([data-state="closed"]) .c21-exhibitions-curtain__content {
  opacity: 0;
}

/* Once the text has faded out, invisible buttons must not catch clicks. Not
 * during text-out: dropping pointer events there would end :hover mid-fade. */
.c21-exhibitions-curtain:not([data-state="closed"]):not([data-state="text-out"]) .c21-exhibitions-curtain__content > * {
  pointer-events: none;
}

/* !important: the CSS Styler outputs its Typography heading colour as
 * `.c21-heading { color: … !important }`, and only another !important
 * declaration (at equal or higher specificity) can beat it. */
.c21-exhibitions-curtain__content .c21-heading {
  margin: 0;
  color: var(--c21-exhibitions-curtain-title-color, #ffffff) !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

/* The video gives up height first, so the button never leaves a short screen. */
.c21-exhibitions-curtain__video {
  width: min(100%, 42rem);
  max-height: 45dvh;
  min-height: 0;
  flex: 0 1 auto;
  object-fit: contain;
}

/* Begin and Exit share this class (and every Styler rule on it). */
.c21-exhibitions-curtain__begin {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* Pressed (aria-disabled while its sequence runs): no greyed-out look. Out-ranks
 * the primitive's disabled rules (up to (0,4,1)) in every state; the curtain
 * JS also freezes the computed colours at the moment of the click. */
.auth-app .c21-exhibitions-curtain button.c21-exhibitions-curtain__begin.c21-btn[aria-disabled="true"],
.auth-app .c21-exhibitions-showcase__overlay button.c21-exhibitions-showcase__finish.c21-btn[aria-disabled="true"] {
  cursor: default;
  opacity: 1;
}

.auth-app .c21-exhibitions-curtain button.c21-exhibitions-curtain__begin.c21-btn[aria-disabled="true"] {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.auth-app .c21-exhibitions-curtain button.c21-exhibitions-curtain__begin.c21-btn[aria-disabled="true"]:not(:focus-visible),
.auth-app .c21-exhibitions-showcase__overlay button.c21-exhibitions-showcase__finish.c21-btn[aria-disabled="true"]:not(:focus-visible) {
  filter: none;
}

/* Keyboard focus only, kept while a pressed button fades. The white ring sits
 * outside the button so it reads on the velvet and the black fade-in; the dark
 * halo keeps it readable under a bright spotlight or on a light curtain colour.
 * Out-ranks the primitive's `filter` rules on :focus and [aria-disabled]. */
.auth-app .c21-exhibitions-curtain .c21-exhibitions-curtain__begin.c21-btn:focus-visible,
.auth-app .c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__finish.c21-btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.75));
}

/* No ring on mouse focus. */
.auth-app .c21-exhibitions-curtain .c21-exhibitions-curtain__begin.c21-btn:focus:not(:focus-visible),
.auth-app .c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__finish.c21-btn:focus:not(:focus-visible) {
  outline: none;
}

.c21-exhibitions-curtain__begin[hidden] {
  display: none !important;
}

/* Welcome entrance: title, then video, then Begin, --c21-exhibitions-curtain-stagger apart.
 * Title "None" still waits for its turn, then appears without animation. */
.c21-exhibitions-curtain[data-screen="welcome"] .c21-exhibitions-curtain__content .c21-heading {
  animation: c21-exhibitions-curtain-fade 1ms linear var(--c21-exhibitions-curtain-start) both;
}

.c21-exhibitions-curtain[data-screen="welcome"] .c21-exhibitions-curtain__content .c21-exhibitions-curtain__title--fade {
  animation: c21-exhibitions-curtain-fade 0.9s ease var(--c21-exhibitions-curtain-start) both;
}

.c21-exhibitions-curtain[data-screen="welcome"] .c21-exhibitions-curtain__content .c21-exhibitions-curtain__title--rise {
  animation: c21-exhibitions-curtain-rise 0.9s ease var(--c21-exhibitions-curtain-start) both;
}

.c21-exhibitions-curtain[data-screen="welcome"] .c21-exhibitions-curtain__content .c21-exhibitions-curtain__title--zoom {
  animation: c21-exhibitions-curtain-zoom 2.4s ease-out var(--c21-exhibitions-curtain-start) both;
}

.c21-exhibitions-curtain[data-screen="welcome"] .c21-exhibitions-curtain__video {
  animation: c21-exhibitions-curtain-fade 0.8s ease
    calc(var(--c21-exhibitions-curtain-start) + var(--c21-exhibitions-curtain-stagger, 400ms)) both;
}

.c21-exhibitions-curtain[data-screen="welcome"] .c21-exhibitions-curtain__begin {
  animation: c21-exhibitions-curtain-fade 0.8s ease
    calc(var(--c21-exhibitions-curtain-start) + var(--c21-exhibitions-curtain-stagger, 400ms)) both;
}

/* With a video, Begin comes one step later. */
.c21-exhibitions-curtain[data-screen="welcome"]:has(.c21-exhibitions-curtain__video) .c21-exhibitions-curtain__begin {
  animation-delay: calc(var(--c21-exhibitions-curtain-start) + var(--c21-exhibitions-curtain-stagger, 400ms) * 2);
}

@keyframes c21-exhibitions-curtain-zoom {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes c21-exhibitions-curtain-rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes c21-exhibitions-curtain-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade in from black — first open only (data-intro stays until Finish, so the
 * entrance timing never changes mid-sequence). Pure CSS: starts when shown.
 * The black backdrop goes when the panels start to move; they cover the screen then. */
.c21-exhibitions-curtain[data-intro][data-state="closed"]::before,
.c21-exhibitions-curtain[data-intro][data-state="text-out"]::before,
.c21-exhibitions-curtain[data-intro][data-state="light-out"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
}

/* The staggered entrance starts once the fade in from black has finished. */
.c21-exhibitions-curtain[data-intro] {
  --c21-exhibitions-curtain-start: var(--c21-exhibitions-curtain-intro, 1.5s);
}

/* `backwards` fill: once finished it no longer holds opacity, so the spotlight's
 * own fade-out transition is never overridden. */
.c21-exhibitions-curtain[data-intro] .c21-exhibitions-curtain__panel,
.c21-exhibitions-curtain[data-intro] .c21-exhibitions-curtain__spotlight {
  animation: c21-exhibitions-curtain-intro var(--c21-exhibitions-curtain-intro, 1.5s) ease-in-out backwards;
}

.c21-exhibitions-curtain[data-intro]:not([data-sway="0"]) .c21-exhibitions-curtain__panel--left {
  animation:
    c21-exhibitions-curtain-intro var(--c21-exhibitions-curtain-intro, 1.5s) ease-in-out backwards,
    c21-exhibitions-curtain-sway-left 9s ease-in-out infinite;
}

.c21-exhibitions-curtain[data-intro]:not([data-sway="0"]) .c21-exhibitions-curtain__panel--right {
  animation:
    c21-exhibitions-curtain-intro var(--c21-exhibitions-curtain-intro, 1.5s) ease-in-out backwards,
    c21-exhibitions-curtain-sway-right 10s ease-in-out infinite;
}

@keyframes c21-exhibitions-curtain-intro {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Exhibition underneath: hidden while the curtains are closed, revealed as they part. */
.c21-exhibitions-showcase__overlay[data-c21-curtain="closed"] .c21-exhibitions-showcase__overlay-stage,
.c21-exhibitions-showcase__overlay[data-c21-curtain="text-out"] .c21-exhibitions-showcase__overlay-stage,
.c21-exhibitions-showcase__overlay[data-c21-curtain="light-out"] .c21-exhibitions-showcase__overlay-stage,
.c21-exhibitions-showcase__overlay[data-c21-curtain="light-in"] .c21-exhibitions-showcase__overlay-stage {
  opacity: 0;
}

.c21-exhibitions-showcase__overlay[data-c21-curtain="opening"] .c21-exhibitions-showcase__overlay-stage {
  opacity: 1;
  transition: opacity calc(var(--c21-exhibitions-curtain-speed, 3000ms) * 0.9) ease
    calc(var(--c21-exhibitions-curtain-speed, 3000ms) * 0.1);
}

/* Finish replaces Next on the last work. */
.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__finish {
  position: absolute;
  top: 50%;
  right: clamp(0.85rem, 2.5vw, 1.75rem);
  z-index: 7;
  transform: translateY(-50%);
}

.c21-exhibitions-showcase__overlay .c21-exhibitions-showcase__finish[hidden] {
  display: none !important;
}

/* Reduced motion: no fade-in, sway, title animation, text / spotlight steps or
 * parting — the whole curtain layer simply fades out on Begin and in on Finish. */
@media (prefers-reduced-motion: reduce) {
  .c21-exhibitions-curtain {
    transition: opacity 0.4s ease;
  }

  .c21-exhibitions-curtain[data-state="opening"],
  .c21-exhibitions-curtain[data-state="open"] {
    opacity: 0;
  }

  /* !important because the sway / intro selectors are more specific. */
  .c21-exhibitions-curtain .c21-exhibitions-curtain__panel,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__panel--left,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__panel--right {
    animation: none !important;
    rotate: none;
    transform: none;
    transition: none;
  }

  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__spotlight,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__content {
    animation: none !important;
    opacity: 1;
    transition: none;
  }

  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__content .c21-heading,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__content .c21-exhibitions-curtain__title--fade,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__content .c21-exhibitions-curtain__title--rise,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__content .c21-exhibitions-curtain__title--zoom,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__video,
  .c21-exhibitions-curtain[data-state] .c21-exhibitions-curtain__begin {
    animation: none;
  }

  .c21-exhibitions-showcase__overlay[data-c21-curtain="opening"] .c21-exhibitions-showcase__overlay-stage {
    transition: opacity 0.4s ease;
  }
}
