/* Öffentliches Frontend. Vorgabe: design/frontend-design.md. Klassen f-*, Tokens --f-*. */

/* ==== Schriften ==== */
@font-face {
  font-family: 'Geist';
  src: url('../fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* ==== Tokens ==== */
:root {
  color-scheme: dark;

  /* Flächen */
  --f-bg: #0a0a0b;
  --f-bg-viewer: #000000;
  --f-bg-panel: #0f0f11;
  --f-bg-sheet: #111113;
  --f-bg-tile: #141416;
  --f-bg-hover: #1d1d21;
  --f-bg-hover-2: #1b1b1f;
  --f-pill-bg: rgba(16, 16, 18, .92);
  --f-chip-bg: rgba(16, 16, 18, .7);
  --f-float-bg: rgba(16, 16, 18, .8);
  --f-scrim: rgba(0, 0, 0, .45);

  /* Text */
  --f-text: #ecebe7;
  --f-text-strong: #ffffff;
  --f-text-title: #f4f2ee;
  --f-text-year: #d8d6d1;
  --f-text-caption: #cfccc6;
  --f-text-icon: #b9b6b0;
  --f-text-dim: #a9a6a0;
  --f-text-muted: #8d8a84;
  --f-accent: #d4a35a;

  /* Linien */
  --f-line: #1f1f23;
  --f-line-float: #25252a;
  --f-line-control: #2c2c31;
  --f-line-control-hover: #46464d;
  --f-handle: #3a3a40;
  --f-rail: rgba(255, 255, 255, .16);
  --f-focus: #ecebe7;
  --f-focus-halo: rgba(0, 0, 0, .6);

  /* Verläufe und Textschatten (Konstanten aus der Design-Doku, Abschnitt 2 und K4) */
  --f-grad-cap: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .7) 55%, rgba(0, 0, 0, 0) 100%);
  --f-grad-tl: linear-gradient(to left, rgba(10, 10, 11, .96) 55%, rgba(10, 10, 11, 0));
  --f-shadow-text: 0 1px 8px rgba(0, 0, 0, .6);

  /* Schriften */
  --f-font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --f-fs-2xs: .6875rem;   /* 11 */
  --f-fs-xs: .75rem;      /* 12 */
  --f-fs-data: .78125rem; /* 12,5 */
  --f-fs-sm: .8125rem;    /* 13 */
  --f-fs-md: .875rem;     /* 14 */
  --f-fs-base: .9375rem;  /* 15 */
  --f-fs-input: 1rem;     /* 16 */
  --f-fs-lg: 1.0625rem;   /* 17 */
  --f-fs-xl: 1.5rem;      /* 24 */
  --f-fs-2xl: 1.875rem;   /* 30 */
  --f-ls-tight: -.02em;

  /* Maße (Desktop-Werte; Mobil siehe Media Query) */
  --f-grid-gap: 10px;
  --f-gutter-tl: 80px;
  --f-grid-pad-bottom: 150px;
  --f-cols: 3;
  --f-panel-w: 380px;
  --f-panel-pad-x: 28px;
  --f-section-pad-y: 22px;
  --f-stage-pad: 40px;
  --f-hit: 44px;
  --f-nav-btn: 56px;
  --f-pill-h: 48px;

  /* Radien, Schatten, Blur */
  --f-radius-tile: 2px;
  --f-radius-pill: 999px;
  --f-radius-sheet: 16px;
  --f-shadow-pill: 0 10px 30px rgba(0, 0, 0, .6);
  --f-shadow-photo: drop-shadow(0 30px 60px rgba(0, 0, 0, .85)) drop-shadow(0 6px 16px rgba(0, 0, 0, .7)); /* Foto in der Vollbild-Bühne, als filter-Wert: weit + eng */
  --f-shadow-photo-box: 0 30px 60px rgba(0, 0, 0, .85), 0 6px 16px rgba(0, 0, 0, .7); /* dasselbe als box-shadow, mobil am Rahmen (günstiger beim Wischen) */
  --f-shadow-panel: -24px 0 60px rgba(0, 0, 0, .7); /* Info-Panel Vollbild, fällt nach links auf die Bühne */
  --f-shadow-sheet: 0 -24px 60px rgba(0, 0, 0, .7); /* Bottom-Sheet mobil, fällt nach oben aufs Foto */
  --f-blur-ambient: 48px; /* Ambient-Hintergrund der Vollbild-Bühne */
  --f-blur-pill: 14px;
  --f-blur-chip: 10px;

  /* Bewegung */
  --f-ease-out: cubic-bezier(.2, .8, .2, 1);
  --f-ease-zoom: cubic-bezier(.2, .7, .2, 1);
  --f-ease: ease;
  --f-dur-fast: .2s;
  --f-dur-caption: .25s;
  --f-dur-base: .3s;
  --f-dur-pill: .35s;
  --f-dur-sheet: .4s;
  --f-dur-panel: .5s;
  --f-dur-zoom: .7s;
}

/* ==== Grundgerüst ==== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scrollbar-width: thin;
  scrollbar-color: var(--f-line-control) transparent;
  -webkit-text-size-adjust: 100%;
}
html.f-lock { overflow: hidden; scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--f-bg);
  color: var(--f-text);
  font-family: var(--f-font-sans);
  font-size: var(--f-fs-base);
  line-height: 1.4;
}

a { color: var(--f-text); }
a:hover { color: var(--f-text-strong); }

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--f-focus);
  outline-offset: 2px;
}
[tabindex="-1"]:focus { outline: none; } /* nur programmatischer Fokus auf Container */

.f-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.f-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-200%);
}
.f-skip:focus { transform: none; }

.f-main { display: block; }

/* ==== Buttons ==== */
.f-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--f-pill-h);
  padding: 0 30px;
  border: 1px solid var(--f-line-control);
  border-radius: var(--f-radius-pill);
  background: var(--f-bg);
  color: var(--f-text);
  font: 500 var(--f-fs-md)/1 var(--f-font-sans);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--f-dur-fast) var(--f-ease), border-color var(--f-dur-fast) var(--f-ease);
}
.f-btn:hover {
  background: var(--f-bg-hover-2);
  border-color: var(--f-line-control-hover);
  color: var(--f-text);
}
.f-btn[hidden] { display: none; }
.f-btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ==== Raster und Kachel ==== */
.f-grid {
  padding: var(--f-grid-gap) var(--f-gutter-tl) 0 var(--f-grid-gap);
  column-count: var(--f-cols);
  column-gap: var(--f-grid-gap);
}
/* JS-Masonry: Kacheln absolut positioniert (Größe und Position per CSSOM), DOM-Reihenfolge bleibt chronologisch */
.f-grid.is-masonry {
  position: relative;
  column-count: auto;
}
.f-grid[hidden] { display: none; }
.f-tile {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0 0 var(--f-grid-gap);
  break-inside: avoid;
  background: var(--f-bg-tile);
  border-radius: var(--f-radius-tile);
  cursor: zoom-in;
  text-decoration: none;
  scroll-margin-top: var(--f-grid-gap);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.is-masonry .f-tile { position: absolute; margin: 0; }
.f-tile:focus-visible { box-shadow: 0 0 0 2px var(--f-focus-halo); }
.f-tile__blur,
.f-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--f-fx, 50%) var(--f-fy, 50%);
}
.f-tile__img {
  transition: transform var(--f-dur-zoom) var(--f-ease-zoom), opacity var(--f-dur-pill) var(--f-ease);
}
.f-tile__blur[hidden] { display: none; }
.f-tile.is-pending .f-tile__img { opacity: 0; }
.f-tile.is-broken .f-tile__img { display: none; }
.f-tile.is-broken::after {
  content: "Bild nicht verfügbar";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 var(--f-fs-2xs)/1.4 var(--f-font-mono);
  color: var(--f-text-muted);
}
.f-tile__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 40px 10px 9px;
  background: var(--f-grad-cap);
  text-shadow: var(--f-shadow-text);
  pointer-events: none;
}
.f-tile__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: var(--f-fs-sm);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--f-text-title);
}
.f-tile__meta {
  font: 400 var(--f-fs-2xs)/1.4 var(--f-font-mono);
  letter-spacing: .03em;
  color: var(--f-text-caption);
}
.f-tile__unit { display: none; }

/* Seitenverhältnis des Titelbilds (0,5 bis 1,8) und Fokus (10-%-Schritte) */
.f-tile--ar-5 { aspect-ratio: 5 / 10; }
.f-tile--ar-6 { aspect-ratio: 6 / 10; }
.f-tile--ar-7 { aspect-ratio: 7 / 10; }
.f-tile--ar-8 { aspect-ratio: 8 / 10; }
.f-tile--ar-9 { aspect-ratio: 9 / 10; }
.f-tile--ar-10 { aspect-ratio: 10 / 10; }
.f-tile--ar-11 { aspect-ratio: 11 / 10; }
.f-tile--ar-12 { aspect-ratio: 12 / 10; }
.f-tile--ar-13 { aspect-ratio: 13 / 10; }
.f-tile--ar-14 { aspect-ratio: 14 / 10; }
.f-tile--ar-15 { aspect-ratio: 15 / 10; }
.f-tile--ar-16 { aspect-ratio: 16 / 10; }
.f-tile--ar-17 { aspect-ratio: 17 / 10; }
.f-tile--ar-18 { aspect-ratio: 18 / 10; }
.f-tile--fx-0 { --f-fx: 0%; }
.f-tile--fx-1 { --f-fx: 10%; }
.f-tile--fx-2 { --f-fx: 20%; }
.f-tile--fx-3 { --f-fx: 30%; }
.f-tile--fx-4 { --f-fx: 40%; }
.f-tile--fx-5 { --f-fx: 50%; }
.f-tile--fx-6 { --f-fx: 60%; }
.f-tile--fx-7 { --f-fx: 70%; }
.f-tile--fx-8 { --f-fx: 80%; }
.f-tile--fx-9 { --f-fx: 90%; }
.f-tile--fx-10 { --f-fx: 100%; }
.f-tile--fy-0 { --f-fy: 0%; }
.f-tile--fy-1 { --f-fy: 10%; }
.f-tile--fy-2 { --f-fy: 20%; }
.f-tile--fy-3 { --f-fy: 30%; }
.f-tile--fy-4 { --f-fy: 40%; }
.f-tile--fy-5 { --f-fy: 50%; }
.f-tile--fy-6 { --f-fy: 60%; }
.f-tile--fy-7 { --f-fy: 70%; }
.f-tile--fy-8 { --f-fy: 80%; }
.f-tile--fy-9 { --f-fy: 90%; }
.f-tile--fy-10 { --f-fy: 100%; }

/* Hinweis über dem Raster (?ab=) */
.f-note {
  margin: 0;
  padding: 14px var(--f-gutter-tl) 0 var(--f-grid-gap);
  font: 400 var(--f-fs-2xs)/1.4 var(--f-font-mono);
  letter-spacing: .04em;
  color: var(--f-text-muted);
}
.f-note a {
  color: var(--f-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ==== Zeitachse ==== */
.f-timeline {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: var(--f-gutter-tl);
  padding-right: env(safe-area-inset-right);
  opacity: .6;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  transition: opacity var(--f-dur-base) var(--f-ease), width var(--f-dur-base) var(--f-ease);
}
.f-timeline::-webkit-scrollbar { display: none; }
.f-timeline:hover,
.f-timeline:focus-within,
.f-timeline.is-open {
  width: 150px;
  opacity: 1;
  background: var(--f-grad-tl);
}
.f-timeline[hidden] { display: none; }
.f-timeline__rail {
  position: fixed;
  top: 28px;
  bottom: 28px;
  right: calc(20px + env(safe-area-inset-right));
  width: 1px;
  background: var(--f-rail);
  pointer-events: none;
}
.f-timeline__list {
  margin: auto 0;
  padding: 22px 0;
  list-style: none;
}
.f-timeline__item { display: block; margin: 0; padding: 0; }
.f-timeline__link {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-right: 20px;
  color: var(--f-text-dim);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.f-timeline__link:focus-visible { outline-offset: -2px; }
.f-timeline__item--year .f-timeline__link { height: 28px; color: var(--f-text-year); }
.f-timeline__item--month .f-timeline__link { height: 24px; }
.f-timeline__label { font: 400 var(--f-fs-2xs)/1 var(--f-font-sans); letter-spacing: .04em; }
.f-timeline__item--year .f-timeline__label { font-family: var(--f-font-mono); font-weight: 500; }
.f-timeline__item--month .f-timeline__label {
  opacity: 0;
  transition: opacity var(--f-dur-fast) var(--f-ease);
}
.f-timeline:hover .f-timeline__item--month .f-timeline__label,
.f-timeline:focus-within .f-timeline__item--month .f-timeline__label,
.f-timeline.is-open .f-timeline__item--month .f-timeline__label { opacity: 1; }
.f-timeline__tick { flex: none; height: 1px; background: currentColor; }
.f-timeline__item--year .f-timeline__tick { width: 14px; }
.f-timeline__item--month .f-timeline__tick { width: 7px; }
.f-timeline__link:hover { color: var(--f-text-strong); }
.f-timeline__item--year .f-timeline__link.is-active { color: var(--f-text-strong); }
.f-timeline__item--month .f-timeline__link.is-active { color: var(--f-accent); }
.f-timeline__item--month .f-timeline__link.is-active .f-timeline__tick { width: 16px; height: 2px; }

/* ==== Such-Pille, Seitenlinks, Zähler, Leerzustand ==== */
.f-pill {
  position: fixed;
  left: calc(20px + env(safe-area-inset-left));
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  height: var(--f-pill-h);
  padding: 0 2px;
  background: var(--f-pill-bg);
  -webkit-backdrop-filter: blur(var(--f-blur-pill));
  backdrop-filter: blur(var(--f-blur-pill));
  border: 1px solid var(--f-line-float);
  border-radius: var(--f-radius-pill);
  box-shadow: var(--f-shadow-pill);
}
.f-pill:has(.f-pill__input:focus-visible) { outline: 2px solid var(--f-focus); outline-offset: 2px; }
.f-pill__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--f-hit);
  height: var(--f-hit);
  border-radius: var(--f-radius-pill);
  color: var(--f-text-icon);
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--f-dur-fast) var(--f-ease), color var(--f-dur-fast) var(--f-ease);
}
button.f-pill__btn { padding: 0; border: 0; background: transparent; font: inherit; }
.f-pill__btn:hover { background: var(--f-bg-hover); color: var(--f-text-strong); }
.f-pill__btn:focus-visible { outline-offset: -2px; }
.f-pill__field {
  position: relative;
  display: flex;
  align-items: center;
  width: 0;
  overflow: hidden;
  transition: width var(--f-dur-pill) var(--f-ease-out);
}
.f-pill:has(.f-pill__input:focus) .f-pill__field,
.f-pill.is-open .f-pill__field { width: 230px; }
.f-pill__input {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--f-text);
  font: 400 var(--f-fs-md)/1 var(--f-font-sans);
}
.f-pill__input:focus,
.f-pill__input:focus-visible { outline: none; }
.f-pill__input::placeholder { color: var(--f-text-muted); opacity: 1; }
.f-pill__input::-webkit-search-cancel-button,
.f-pill__input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
/* Ohne :has() bleibt das Feld offen, der Ring sitzt am Eingabefeld */
@supports not selector(:has(*)) {
  .f-pill__field { width: 230px; }
  .f-pill__input:focus-visible { outline: 2px solid var(--f-focus); outline-offset: -2px; }
}
.f-pill__sep {
  flex: none;
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--f-line-control);
}

.f-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px var(--f-gutter-tl) calc(var(--f-grid-pad-bottom) + env(safe-area-inset-bottom)) var(--f-grid-gap);
  text-align: center;
}
.f-count {
  margin: 0;
  font: 400 var(--f-fs-2xs)/1.4 var(--f-font-mono);
  letter-spacing: .04em;
  color: var(--f-text-muted);
}
.f-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 12px;
}
.f-pager__info {
  order: 3;
  flex-basis: 100%;
  font: 400 var(--f-fs-2xs)/1.4 var(--f-font-mono);
  letter-spacing: .04em;
  color: var(--f-text-muted);
}

.f-empty {
  max-width: 28rem;
  margin: 0 auto;
  padding: 120px max(24px, var(--f-gutter-tl)) 0;
  text-align: center;
}
.f-empty__title { margin: 0; font-size: var(--f-fs-base); color: var(--f-text-muted); }
.f-empty__text {
  margin: 10px 0 0;
  font-size: var(--f-fs-sm);
  line-height: 1.6;
  color: var(--f-text-muted);
  overflow-wrap: anywhere;
}
.f-empty__action { margin: 20px 0 0; }
/* Fehlerzustand beim Nachladen sitzt im Fuß über dem Button */
.f-foot .f-empty { padding: 0; }

/* Vollbild Desktop, Info-Block und Vollbild mobil: siehe viewer.css */

/* ==== Textseiten ==== */
.f-doc {
  display: block;
  max-width: 40rem;
  margin: 0 auto;
  padding: 24px 20px 64px;
}
.f-doc__back { margin-bottom: 32px; }
.f-doc__title {
  margin: 0 0 32px;
  font-size: var(--f-fs-2xl);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: var(--f-ls-tight);
  color: var(--f-text-title);
}
.f-doc__body {
  font-size: var(--f-fs-base);
  line-height: 1.7;
  color: var(--f-text-caption);
}
.f-doc__body h2 {
  margin: 32px 0 8px;
  font-size: var(--f-fs-lg);
  font-weight: 500;
  color: var(--f-text-title);
}
.f-doc__body a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--f-text-muted);
}
.f-doc__body a:hover { color: var(--f-text-strong); }
.f-doc__foot {
  margin-top: 48px;
  font: 400 var(--f-fs-2xs)/1.4 var(--f-font-mono);
  color: var(--f-text-muted);
}
.f-doc__foot [aria-current="page"] { color: var(--f-text-strong); }

/* ==== Fehlerseite ==== */
.f-error-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 30rem;
  margin: 0 auto;
  padding: 24px;
}
.f-error-page__code {
  margin: 0 0 12px;
  font: 400 var(--f-fs-2xs)/1.4 var(--f-font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--f-text-muted);
}
.f-error-page__title {
  margin: 0 0 12px;
  font-size: var(--f-fs-2xl);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: var(--f-ls-tight);
  color: var(--f-text-title);
  overflow-wrap: anywhere;
}
.f-error-page__text {
  margin: 0 0 12px;
  font-size: var(--f-fs-md);
  line-height: 1.6;
  color: var(--f-text-dim);
  overflow-wrap: anywhere;
}
.f-error-page__actions { margin: 20px 0 0; }

/* ==== Media Queries ==== */
@media (max-width: 767.98px) {
  :root {
    --f-grid-gap: 8px;
    --f-gutter-tl: 32px;
    --f-grid-pad-bottom: 120px;
    --f-cols: 2;
  }
  .f-btn { padding: 0 28px; }
  .f-pill { left: calc(14px + env(safe-area-inset-left)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  .f-pill:has(.f-pill__input:focus) .f-pill__field,
  .f-pill.is-open .f-pill__field { width: min(170px, calc(100vw - 160px)); }
  .f-pill__input { font-size: var(--f-fs-input); }
  .f-pill__sep { margin: 0 2px; }
  .f-timeline:hover,
  .f-timeline:focus-within,
  .f-timeline.is-open { width: 112px; }
  .f-timeline__rail { right: calc(12px + env(safe-area-inset-right)); top: 24px; bottom: 24px; }
  .f-timeline__list { padding: 18px 0; }
  .f-timeline__link { gap: 8px; padding-right: 12px; }
  /* zugeklappt nur Striche (32 px Streifen), Jahreszahlen erst beim Öffnen */
  .f-timeline__item--year .f-timeline__label { opacity: 0; transition: opacity var(--f-dur-fast) var(--f-ease); }
  .f-timeline:hover .f-timeline__item--year .f-timeline__label,
  .f-timeline:focus-within .f-timeline__item--year .f-timeline__label,
  .f-timeline.is-open .f-timeline__item--year .f-timeline__label { opacity: 1; }
  .f-empty { padding-top: 80px; }
  .f-timeline__item--year .f-timeline__link { height: 24px; }
  .f-timeline__item--year .f-timeline__tick { width: 12px; }
  .f-timeline__item--month .f-timeline__tick { width: 6px; }
  .f-timeline__item--month .f-timeline__link.is-active .f-timeline__tick { width: 14px; }
  .f-foot { padding-top: 40px; gap: 12px; }
}
@media (min-width: 768px) {
  .f-doc { padding: 48px 24px 96px; }
  .f-tile__cap { gap: 5px; padding: 56px 18px 16px; }
  .f-tile__title { font-size: var(--f-fs-lg); }
  .f-tile__meta { white-space: pre; }
  .f-tile__unit { display: inline; }
}
@media (max-height: 860px) {
  .f-timeline__item--year .f-timeline__link { height: 24px; }
}
/* Touch: Zeilen der geöffneten Zeitachse 44 px hoch */
@media (pointer: coarse) {
  html:not(.f-js) .f-timeline__link { min-height: var(--f-hit); } /* mit JS: zugeklappt normale Höhe */
  .f-timeline:focus-within .f-timeline__link,
  .f-timeline.is-open .f-timeline__link { height: var(--f-hit); }
}
/* Caption nur bei Hover/Fokus, wenn Maus und breites Fenster; sonst dauerhaft */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .f-tile__cap { opacity: 0; transition: opacity var(--f-dur-caption) var(--f-ease); }
  .f-tile:hover .f-tile__cap,
  .f-tile:focus-visible .f-tile__cap { opacity: 1; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .f-tile:hover .f-tile__img { transform: scale(1.03); }
}
@media (min-width: 1100px) { :root { --f-cols: 4; } }
@media (min-width: 1800px) { :root { --f-cols: 5; } }

/* ==== Reduced Motion ==== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .f-mv__hint svg { animation: none; }
}
