/* Lightbox — shared by the card gallery and the tank exhibit. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.lightbox[hidden] { display: none; }

.lightbox-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(92dvh, 900px);
  overflow: auto;
  padding: 1rem 1.1rem 1.2rem;
  background: #000;
  border: 1px solid var(--green, #33ff33);
  color: var(--green, #33ff33);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.lightbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}

.lightbox-title {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lightbox-open,
.lightbox-x,
.lightbox-view {
  flex: none;
  background: transparent;
  border: 1px solid var(--green, #33ff33);
  color: var(--green, #33ff33);
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  /* The site-wide :focus-visible outline would sit outside the 1px border
     and read as a doubled red frame. The filled hover/focus is the cue. */
  outline: none;
}
.lightbox-open:hover,
.lightbox-open:focus-visible,
.lightbox-x:hover,
.lightbox-x:focus-visible,
.lightbox-view:hover,
.lightbox-view:focus-visible {
  background: var(--red, #ff2200);
  color: #fff;
  border-color: var(--red, #ff2200);
}

/* Storyline / Rise: drop the 16:9 box and use the viewport. */
.lightbox.is-large {
  padding: 0.55rem;
}
.lightbox.is-large .lightbox-panel {
  width: min(1680px, 100%);
  height: calc(100dvh - 1.1rem);
  max-height: calc(100dvh - 1.1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.7rem 0.8rem 0.8rem;
}
.lightbox.is-large .lightbox-head { margin-bottom: 0.55rem; }
.lightbox.is-large .lightbox-stage {
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.lightbox.is-large .lightbox-desc,
.lightbox.is-large .lightbox-meta { flex: none; }

.lightbox-stage {
  aspect-ratio: 16 / 9;
  background: #050805;
  border: 1px solid rgba(51, 255, 51, 0.35);
  overflow: hidden;
}
.lightbox-stage video,
.lightbox-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* Portrait stills (About) drop the 16:9 letterbox so the photo is not cropped. */
.lightbox.is-photo .lightbox-stage {
  aspect-ratio: auto;
  background: #000;
}
.lightbox-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72dvh, 820px);
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-fallback {
  position: relative;
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--green, #33ff33);
  background-color: #050805;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.lightbox-fallback.has-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.lightbox-fallback > * { position: relative; z-index: 1; }
.lightbox-fallback p { margin: 0; max-width: 22rem; line-height: 1.45; }

.lightbox-view {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.55rem 0.9rem;
}

.lightbox-desc,
.lightbox-meta { margin: 0.7rem 0 0; line-height: 1.45; }
.lightbox-meta {
  color: var(--green-dim, #1f9e2a);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
