* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #eee;
  font: 14px Arial, sans-serif;
}
header {
  position: relative;
  z-index: 3;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 16px;
  background: #000;
  border-bottom: 1px solid #fff5;
}
h1 { margin: 0; font-size: 15px; font-weight: normal; color: #a7a7a7; }
.header-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  margin-left: auto;
}
.year-jump { flex: none; color: #b5b5b5; font-size: 12px; }
.year-jump select { color: #eee; background: #282828; border: 1px solid #666; border-radius: 3px; padding: 3px; }
.category-menu { display: flex; align-self: stretch; align-items: center; }
.topic-menu { position: relative; flex: none; }
.category-menu-toggle {
  padding: 4px 9px;
  border: 1px solid #678671;
  border-radius: 3px;
  color: #fff;
  background: repeating-linear-gradient(135deg, #26382c 0 2px, #142119 2px 5px);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.category-menu-toggle[aria-expanded="true"] { border-bottom-color: #91bd98; }
.category-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: min(400px, calc(100vw - 20px));
  visibility: hidden;
  transition: visibility 0s 180ms;
}
.topic-menu .category-panel { left: 0; right: auto; width: min(235px, calc(100vw - 20px)); }
.category-panel-content {
  max-height: 65dvh;
  overflow: auto;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #537659;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  color: #f1f5ef;
  background: #000;
  box-shadow: 0 5px 12px #0008;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 180ms ease;
}
.category-menu-toggle[aria-expanded="true"] + .category-panel {
  visibility: visible;
  transition-delay: 0s;
}
.category-menu-toggle[aria-expanded="true"] + .category-panel .category-panel-content {
  clip-path: inset(0);
}
.category-panel fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.category-panel legend { margin-bottom: 5px; color: #c9e2cc; font-weight: bold; }
.category-panel label { display: flex; align-items: center; gap: 6px; padding: 4px 0; cursor: pointer; }
.category-panel input { flex: none; margin: 0; accent-color: #91bd98; }
.category-all { border-bottom: 1px solid #35483a; margin-bottom: 5px; }
.category-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 9px; }
.category-empty {
  position: absolute;
  inset: 43% 0 auto;
  margin: 0 auto;
  width: max-content;
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 4px;
  background: #142219;
  color: #fff;
  pointer-events: none;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 270px;
  background: #fff url('bsvgerthe/historama/historama_BG_03.jpg') center top / cover no-repeat;
}
.stage:not([data-topic="bsv"]) { background: linear-gradient(145deg, #1c2c23, #0a110d); }
.stage[data-topic="ausfluege"] {
  isolation: isolate;
  overflow: clip;
  background: #f6dba9 url('bilder/vater-kind-strand.png') right bottom / cover no-repeat;
}
.shark-fin, .sand-crab, .crab-trail, .tumbleweed { display: none; }
.banknotes { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .stage[data-topic="ausfluege"]::before,
  .stage[data-topic="ausfluege"]::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: inherit;
    visibility: hidden;
  }
  .stage[data-topic="ausfluege"]::before,
  .stage[data-beach-idle="grass"]::after {
    visibility: visible;
  }
  .stage[data-topic="ausfluege"]::before {
    /* Match the beach image dimensions so the soft mask follows its shoreline. */
    mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221672%22%20height%3D%22941%22%20viewBox%3D%220%200%201672%20941%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22shore%22%20x%3D%22-20%25%22%20y%3D%22-25%25%22%20width%3D%22140%25%22%20height%3D%22150%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%2219%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20fill%3D%22white%22%20filter%3D%22url(%23shore)%22%20d%3D%22M940%20-120C975%20-38%201020%2042%201110%2091S1210%20164%201280%20224S1410%20288%201485%20333S1640%20396%201810%20479L1810%20-120Z%22%2F%3E%3C%2Fsvg%3E") right bottom / cover no-repeat;
    filter: url(#beach-water-ripples);
  }
  .stage[data-topic="ausfluege"]::after {
    /* The mask fades out before the base of each clump. */
    mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221672%22%20height%3D%22941%22%20viewBox%3D%220%200%201672%20941%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22edge%22%20x%3D%22-20%25%22%20y%3D%22-25%25%22%20width%3D%22140%25%22%20height%3D%22150%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%229%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20fill%3D%22white%22%20filter%3D%22url(%23edge)%22%20d%3D%22M1385%20904C1407%20876%201434%20867%201460%20846S1492%20826%201515%20806S1615%20766%201720%20768L1720%20869C1654%20866%201612%20862%201570%20871S1494%20890%201455%20897S1410%20906%201385%20904Z%22%2F%3E%3C%2Fsvg%3E") right bottom / cover no-repeat;
    filter: url(#beach-grass-wind);
  }
  .stage[data-topic="ausfluege"] .shark-fin.swimming {
    --shark-size: clamp(75px, 8vw, 120px);
    display: block;
    position: absolute;
    z-index: -1;
    right: calc(-.42 * var(--shark-size));
    top: var(--shark-top);
    width: var(--shark-size);
    aspect-ratio: 1;
    pointer-events: none;
    animation: shark-pass var(--shark-duration) linear both;
  }
  .shark-fin-body {
    position: absolute;
    inset: 0;
    background: url('bilder/haifischflosse-foto.png') center / contain no-repeat;
  }
  .stage[data-topic="ausfluege"] .sand-crab.crawling {
    --crab-size: clamp(40px, 4.7vw, 75px);
    display: block;
    position: absolute;
    z-index: -1;
    top: var(--crab-start-y);
    left: var(--crab-start-x);
    width: var(--crab-size);
    aspect-ratio: 1;
    filter: drop-shadow(3px 4px 2px #60472280);
    pointer-events: none;
    animation: crab-cross var(--crab-duration) linear both;
  }
  .crab-leg,
  .sand-crab-body {
    position: absolute;
    inset: 0;
    background: url('bilder/strandkrebs.png') center / contain no-repeat;
  }
  .sand-crab-body {
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 100% 31%, 71% 31%, 66% 57%, 60% 81%, 60% 100%,
      40% 100%, 40% 81%, 34% 57%, 29% 31%, 0 31%);
  }
  .stage[data-topic="ausfluege"] .crab-trail {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
  }
  .crab-print {
    fill: none;
    stroke: #8b6339;
    stroke-width: .8;
    stroke-linecap: round;
    opacity: 0;
    filter: drop-shadow(.4px .5px .25px #fff5d1);
    animation: crab-print-fade 12s var(--print-delay) linear both;
  }
  .stage[data-topic="ausfluege"] .tumbleweed {
    --tumbleweed-size: clamp(132px, 13vw, 190px);
    --tumbleweed-pace: cubic-bezier(.37, .32, .63, .68);
    display: block;
    position: absolute;
    z-index: -1;
    left: calc(0px - var(--tumbleweed-size) - 18px);
    top: var(--tumbleweed-top, 24%);
    width: var(--tumbleweed-size);
    aspect-ratio: 1;
    pointer-events: none;
    visibility: hidden;
  }
  .stage[data-topic="ausfluege"] .tumbleweed.rolling {
    visibility: visible;
    animation: tumbleweed-cross var(--tumbleweed-duration) linear both;
    animation-timing-function: var(--tumbleweed-pace);
  }
  .tumbleweed::before,
  .tumbleweed::after {
    content: '';
    position: absolute;
  }
  .tumbleweed::before {
    inset: 0;
    background: url('bilder/steppenlaeufer-foto.png') center / contain no-repeat;
  }
  .tumbleweed.rolling::before {
    animation: tumbleweed-spin var(--tumbleweed-duration) linear both;
    animation-timing-function: var(--tumbleweed-pace);
  }
  .tumbleweed::after {
    z-index: -1;
    inset: auto 15% 1px;
    height: 9px;
    border-radius: 50%;
    background: #7e542a40;
    filter: blur(3px);
  }
  .stage[data-topic="ausfluege"] .banknotes {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  }
  .banknote {
    position: absolute;
    left: -150px;
    top: var(--note-top);
    width: min(var(--note-width), max(64px, 20vw));
    aspect-ratio: 417 / 218;
    animation: banknote-drift var(--note-duration) var(--note-delay) var(--note-wind) both;
  }
  .banknote::before {
    content: '';
    position: absolute;
    inset: 32% 6% 10%;
    border-radius: 16%;
    background: #72502c73;
    filter: blur(4px);
    transform: translate(10px, var(--note-shadow-offset)) skewX(-15deg) rotate(-9deg);
  }
  .banknote-paper {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: banknote-flutter var(--note-flutter) var(--note-delay) ease-in-out infinite alternate;
  }
  .banknote-paper::before,
  .banknote-paper::after {
    content: '';
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    background: linear-gradient(115deg, #193a1725, transparent 32%, #fffce33b 57%, #37572326),
      var(--note-face) center / 100% 100% no-repeat;
    box-shadow: inset 0 0 1px #31432070;
  }
  /* Original 72 dpi specimen images from the ECB's Europa series download. */
  .banknote-paper::before { --note-face: url('bilder/hundert-euro-front.jpg'); }
  .banknote-paper::after {
    --note-face: url('bilder/hundert-euro-reverse.jpg');
    transform: rotateY(180deg);
  }
  .banknote.lands {
    --note-drop: clamp(22px, 6vh, 55px);
    animation-name: banknote-land;
  }
  .banknote.lands .banknote-paper {
    animation: banknote-settle var(--note-duration) var(--note-delay) ease-in-out both;
  }
  .banknote.lands::before {
    animation: banknote-shadow-land var(--note-duration) var(--note-delay) ease-in-out both;
  }
}
@keyframes shark-pass {
  0% { transform: translate(calc(-1 * var(--shark-travel)), calc(-1 * var(--shark-travel))); opacity: 0; }
  16% { opacity: .92; }
  62% {
    transform: translate(calc(-.38 * var(--shark-travel)), calc(-.38 * var(--shark-travel)));
    opacity: 1;
  }
  80% { opacity: .94; }
  100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes crab-cross {
  0% { transform: translate(0, 0) rotate(24deg); opacity: 0; }
  12% { opacity: 1; }
  36%, 42% {
    transform: translate(var(--crab-mid-x), var(--crab-mid-y)) rotate(24deg);
  }
  50% {
    transform: translate(var(--crab-mid-x), var(--crab-mid-y)) rotate(-24deg);
  }
  87% { opacity: 1; }
  100% {
    transform: translate(var(--crab-end-x), var(--crab-end-y)) rotate(-24deg);
    opacity: 0;
  }
}
@keyframes crab-print-fade {
  0% { opacity: 0; }
  4%, 28% { opacity: .3; }
  100% { opacity: 0; }
}
@keyframes banknote-drift {
  0% { transform: translate(0, 0); }
  24% { transform: translate(26vw, var(--note-drift)); }
  51% { transform: translate(53vw, var(--note-rise)); }
  77% { transform: translate(79vw, calc(-.7 * var(--note-drift))); }
  100% { transform: translate(calc(100vw + 300px), var(--note-exit)); }
}
@keyframes banknote-land {
  0% { transform: translate(0, 0); }
  21% {
    transform: translate(calc(var(--note-stop) * .58), var(--note-drift));
    animation-timing-function: cubic-bezier(.25, .55, .5, 1);
  }
  40%, 55% {
    transform: translate(var(--note-stop), var(--note-drop));
    animation-timing-function: ease-in-out;
  }
  68% { transform: translate(calc(var(--note-stop) + 9vw), var(--note-rise)); }
  100% { transform: translate(calc(100vw + 300px), var(--note-exit)); }
}
@keyframes banknote-shadow-land {
  0%, 25%, 72%, 100% {
    transform: translate(10px, var(--note-shadow-offset)) skewX(-15deg) rotate(-9deg);
    filter: blur(4px);
  }
  40%, 55% {
    transform: translate(1px, 2px) rotate(var(--note-rest-angle));
    filter: blur(1px);
  }
}
@keyframes banknote-settle {
  0% { transform: rotate(-24deg) rotateY(12deg); }
  16% { transform: rotate(27deg) rotateY(-80deg); }
  28% { transform: rotate(-14deg) rotateY(18deg); }
  40%, 55% {
    transform: rotate(var(--note-rest-angle)) rotateY(0deg) scaleY(.64);
  }
  63% { transform: rotate(-29deg) rotateY(65deg); }
  75% { transform: rotate(43deg) rotateY(155deg); }
  86% { transform: rotate(15deg) rotateY(238deg); }
  100% { transform: rotate(68deg) rotateY(360deg); }
}
@keyframes banknote-flutter {
  0% { transform: rotate(-20deg) rotateY(10deg) rotateX(12deg); }
  30% { transform: rotate(3deg) rotateY(30deg) rotateX(-14deg); }
  57% { transform: rotate(27deg) rotateY(161deg) rotateX(21deg); }
  82% { transform: rotate(12deg) rotateY(196deg) rotateX(-10deg); }
  100% { transform: rotate(-8deg) rotateY(208deg) rotateX(8deg); }
}
@keyframes tumbleweed-cross {
  from { transform: translateX(0); }
  to { transform: translateX(var(--tumbleweed-distance)); }
}
@keyframes tumbleweed-spin {
  from { rotate: 0turn; }
  to { rotate: var(--tumbleweed-turns); }
}
.stage.topic-without-events :is(.date-calendar, .viewport, .move) { visibility: hidden; }
.date-calendar {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  pointer-events: none;
}
.date-calendar::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0 -12px auto;
  height: 11px;
  border-radius: 0 0 18px 18px;
  background: #080c09;
  border-bottom: 2px solid #537659;
}
.calendar-page {
  display: grid;
  justify-items: center;
  padding: 15px 9px 7px;
  border-radius: 0 0 4px 4px;
  background: #fff9e9;
  color: #1b3a26;
  box-shadow: 0 2px #e7ddc2, 0 4px 6px #121e1680;
}
.calendar-month { font-size: 13px; }
.calendar-year { font-size: 23px; font-weight: bold; line-height: 1.05; }
.calendar-page--falling {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  transform-origin: 50% 10px;
  animation: tear-off-page 400ms ease-in both;
}
@keyframes tear-off-page {
  0% { transform: perspective(240px) rotateX(-7deg); opacity: 1; }
  25% { transform: perspective(240px) translateY(18px) rotateX(-25deg) rotateZ(5deg); opacity: .9; }
  100% { transform: perspective(240px) translate(35px, 120px) rotateX(-46deg) rotateZ(28deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .calendar-page--falling { animation: none; }
  .category-panel, .category-panel-content { transition: none; }
}
.viewport {
  position: absolute;
  inset: 0;
  overflow: auto hidden;
  scrollbar-width: none;
  cursor: grab;
}
.viewport::-webkit-scrollbar { display: none; }
.viewport.dragging { cursor: grabbing; user-select: none; }
.track { position: relative; height: 100%; }
.scale {
  position: absolute;
  bottom: 0;
  height: 38px;
  overflow: hidden;
  color: white;
  pointer-events: none;
}
.month {
  position: absolute;
  overflow: hidden;
  bottom: 9px;
  height: 19px;
  line-height: 19px;
  border-inline: 1px solid #fffffff0;
  background: #333a;
  color: #fff;
  font-size: 11px;
  text-align: center;
  text-shadow: 0 1px 2px #17231a;
}
.month.new-year { bottom: 0; height: 38px; line-height: 38px; background: #355c3c; }

.card {
  --category: #355c3c;
  --card-surface: #fffffff2;
  position: absolute;
  scale: var(--card-scale, 1);
  transform-origin: var(--pointer, 50%) bottom;
  width: min(var(--card-width, 308px), calc(100vw - 38px));
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #111;
  cursor: pointer;
  text-align: left;
  filter: drop-shadow(0 1px 4px #0009);
}
.card:after {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--pointer, 50%);
  transform: translateX(-50%);
  border: solid transparent;
  border-width: 14px 8px 0;
  border-top-color: var(--card-surface);
}
.card:focus-visible, .move:focus-visible { outline: 3px solid #13271a; outline-offset: 3px; }
.card:hover, .card:focus-visible { z-index: 1; --card-surface: #fff; }
.card.dense:not(:hover):not(:focus-visible) { --card-surface: #ffffffdc; }
.card.compact { --card-width: 156px; }
.card.compact .card-body { min-height: 0; }
.card.compact .card-title { font-size: 13px; line-height: 15px; }
.card.compact :is(.when, .brief, .more) { display: none; }
.card-body {
  display: flex;
  flex-direction: column;
  min-height: 102px;
  max-height: var(--card-max, 180px);
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 6px;
  background: var(--card-surface);
}
.tag {
  position: absolute;
  bottom: 100%;
  left: 12px;
  min-width: 84px;
  max-width: calc(100% - 24px);
  padding: 3px 8px;
  overflow: hidden;
  background: var(--category);
  color: #fff;
  font-size: 10px;
  line-height: 12px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
  text-align: center;
}
.card-title {
  flex: none;
  font-size: 16px;
  font-weight: normal;
  line-height: 16px;
}
.card:has(.brief img) .card-title { max-width: 240px; }
.when { flex: none; margin-top: 2px; color: #333; font-size: 12px; }
.brief { flex: 1; display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 4px; min-height: 0; overflow: hidden; font-size: 13px; line-height: 15px; }
.brief img { flex: none; width: 61px; height: 62px; object-fit: cover; border: 1px solid #fff; }
.summary { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.more { flex: none; align-self: flex-end; padding: 0 5px; border-radius: 4px; background: #777; color: #fff; font-size: 12px; line-height: 15px; }

.card:not(.compact) .card-body:has(.brief img) {
  display: grid;
  grid-template-columns: min(38%, 106px) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  column-gap: 8px;
  min-height: min(160px, var(--card-max, 180px));
}
.card:not(.compact):has(.brief img) :is(.card-title, .when) { grid-column: 1 / -1; }
.card:not(.compact) .brief:has(img) { display: contents; }
.card:not(.compact) .brief img {
  grid-area: 3 / 1 / 5 / 2;
  align-self: stretch;
  width: 100%;
  height: auto;
  min-height: 0;
  margin-top: 7px;
}
.card:not(.compact) .brief:has(img) .summary {
  grid-area: 3 / 2 / 4 / 3;
  margin: 7px 0 4px;
  font-size: 13px;
  line-height: 15px;
}
.card:not(.compact):has(.brief img) .more {
  grid-area: 4 / 2 / 5 / 3;
  justify-self: end;
}

.move {
  position: absolute;
  bottom: 40px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #666;
  border-radius: 50%;
  background: #fafafa;
  color: #333;
  font-size: 24px;
  line-height: 22px;
  cursor: pointer;
  box-shadow: 0 1px 4px #0006;
}
.move:disabled { visibility: hidden; }
.previous { left: 11px; }
.next { right: 11px; }

.decade-register {
  --frame-width: 132px;
  --register-height: 45px;
  position: relative;
  z-index: 2;
  height: var(--register-height);
  border-top: 1px solid #355c3c;
  background: #000;
}
.decade-labels {
  position: absolute;
  inset: 4px calc(var(--frame-width) / 2) 0;
}
.decade-label {
  position: absolute;
  inset-block: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-inline-end: 1px solid #355c3c;
  border-radius: 4px 4px 0 0;
  background: #142219;
  color: #e1ece2;
  font-size: 11px;
  white-space: nowrap;
}
.decade-label:nth-child(even) { background: #0a120d; }
.scrubber-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: var(--frame-width);
  height: 65px;
  padding: 0 4px;
  object-fit: contain;
  touch-action: none;
  cursor: grab;
  will-change: transform;
}
.decade-scrubber {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  touch-action: none;
  cursor: grab;
}
.decade-register:has(.decade-scrubber:focus-visible) { outline: 2px solid #fff; outline-offset: -2px; }
:is(.decade-scrubber, .scrubber-indicator):active { cursor: grabbing; }

@media (max-width: 590px) {
  .decade-label { overflow: visible; }
  .decade-label:nth-child(odd) > span { visibility: hidden; }
  .decade-label > span { font-size: 10px; }
  .decade-suffix { display: none; }
}

dialog {
  width: min(780px, 94vw);
  max-height: min(700px, 88dvh);
  background: #050505;
  color: #ddd;
  border: 2px solid #777;
  border-radius: 6px;
  padding: 0;
  box-shadow: 0 3px 15px #000;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #000b; }
.dialog-top, .dialog-bottom {
  flex: none;
  min-height: 30px;
  background: linear-gradient(#212121, #121212);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  font-size: 12px;
}
.dialog-top > :last-child, .dialog-bottom > :last-child { justify-self: end; }
.dialog-bottom > :first-child { justify-self: start; }
#detail-media { font-style: italic; }
dialog button { background: transparent; color: #ddd; border: 1px solid transparent; border-radius: 3px; padding: 2px 7px; cursor: pointer; }
dialog button:hover:not(:disabled) { border-color: #888; }
dialog button:disabled { opacity: .45; cursor: default; }
.dialog-top button { font-size: 17px; line-height: 17px; }
.dialog-content { min-height: 0; display: flex; gap: 16px; padding: 12px 14px; overflow: auto; }
.copy { flex: 1; min-width: 0; }
.copy h2 { margin: 9px 0 10px; font-size: 24px; font-weight: normal; text-transform: uppercase; }
.detail-category { display: inline-block; padding: 2px 6px; border-radius: 2px; background: #484848; font-size: 12px; }
.copy p { line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.copy p:empty, .videos:empty { display: none; }
.copy .lead { font-weight: bold; font-style: italic; color: #fff; }
.copy a, .photo p a { color: #eee; }
.videos { padding-left: 20px; }
.videos li + li { margin-top: 6px; }
.gallery-close-label { display: none; }
dialog.gallery-open {
  width: 96vw;
  height: 94dvh;
  max-height: 94dvh;
  background: #202020;
}
.gallery-open .copy { display: none; }
.gallery-open .dialog-content { flex: 1; display: block; padding: 10px; }
.gallery-open .gallery-close-label { display: inline; }
.gallery-open #close { min-height: 38px; padding: 5px 12px; }
.photo-grid:not([hidden]) { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-grid {
  --tile-height: clamp(90px, 13vw, 240px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.photo-grid li {
  --ratio: 1.5;
  flex: var(--ratio) 1 calc(var(--tile-height) * var(--ratio));
  min-width: 0;
  height: var(--tile-height);
}
.photo-grid::after { content: ""; flex: 1000 1 0; }
.photo-grid .gallery-tile {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #343434;
}
.gallery-tile img:not([hidden]) { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-tile:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.gallery-open:has(.photo-view:not([hidden])) .dialog-bottom { display: none; }
.photo-view:not([hidden]) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  height: 100%;
}
#gallery-back { justify-self: start; min-height: 36px; }
.gallery-image-area {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.gallery-image-area button { min-width: 42px; min-height: 50px; font-size: 28px; }
#gallery-image, #gallery-image-error { grid-area: 1 / 2; }
#gallery-image { width: 100%; height: 100%; object-fit: contain; touch-action: pan-y pinch-zoom; }
#gallery-image-error { text-align: center; }
#gallery-next { grid-column: 3; }
.photo { order: -1; flex: 0 1 35%; min-width: 0; margin: 0; text-align: center; }
.photo > a img { display: block; width: 100%; max-height: 44dvh; object-fit: contain; }
.photo figcaption { padding: 5px 0; background: #eee; color: #222; font-size: 12px; }
.photo figcaption:empty { display: none; }
.photo-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
.image-thumbs { display: flex; gap: 4px; overflow-x: auto; }
.image-thumb { flex: 0 0 54px; height: 44px; padding: 2px; }
.image-thumb[aria-pressed=true] { border-color: #eee; }
.image-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 600px) {
  header { gap: 8px; padding-inline: 9px; }
  h1 { font-size: 12px; }
  .year-jump label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stage { background-position: center top; background-size: auto 100%; }
  .dialog-content { flex-direction: column; }
  .photo > a img { max-height: 32dvh; }
}
