/* Kunst · Gestaltung
   Weisse Galeriewand, Graphit für Text, om3-Rot nur für Auslöser, Status und Hinweise.
   Das Foto steht gross; die Angaben darunter sind gesetzt wie ein Museumsschild. */
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-latin-opsz-normal.woff2') format('woff2-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-latin-opsz-italic.woff2') format('woff2-variations');
  font-weight: 200 800; font-style: italic; font-display: swap;
}
:root {
  --wand: #ffffff;
  --flaeche: #f3f3f1;
  --graphit: #222322;
  --grau: #686a66;
  --hell: #9a9c97;
  --linie: #e3e3df;
  --rot: #e73b1f;
  --oliv: #5f6b3a;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --rand: 16px;
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --wand: #151614; --flaeche: #1f201e; --graphit: #ededea; --grau: #a9aba5; --hell: #7c7e79; --linie: #30322e; --oliv: #a3b06f; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wand); color: var(--graphit); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--rot); outline-offset: 2px; border-radius: 4px; }
img { display: block; max-width: 100%; }

.seite { max-width: 640px; margin: 0 auto; padding: calc(var(--oben) + 14px) var(--rand) calc(var(--unten) + 100px); }
.kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.kopf h1 { font: 400 32px/1.1 var(--serif); letter-spacing: -0.01em; margin: 0; }
.kopf .rechts { color: var(--grau); font-size: 14px; }
h2 { font: 500 21px/1.25 var(--serif); margin: 30px 0 10px; }
.klein { font-size: 13px; color: var(--hell); }
.leer { color: var(--grau); padding: 18px 0; }

/* Leiste unten */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--wand) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--linie); padding: 6px 8px calc(var(--unten) + 6px); }
.leiste nav { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.leiste a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--grau); text-decoration: none; font-size: 12px; }
.leiste a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.leiste a[aria-current='page'] { color: var(--graphit); }
.leiste a[aria-current='page'] svg { stroke: var(--rot); }

/* Aufnehmen */
.ausloeser-feld { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6vh 0 4vh; }
.ausloeser { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 3px solid var(--graphit); background: var(--wand); display: grid; place-items: center; }
.ausloeser::after { content: ''; width: 86px; height: 86px; border-radius: 50%; background: var(--rot); }
.ausloeser input, .dateiwahl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ausloeser-feld p { margin: 0; color: var(--grau); text-align: center; max-width: 30ch; }
.dateiwahl { position: relative; display: inline-flex; color: var(--grau); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; overflow: hidden; }

.entwurf { margin: 6px 0 10px; }
.entwurf .fotos { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; align-items: start; }
.entwurf .fotos figure { margin: 0; }
.entwurf .fotos img { width: 100%; border-radius: 4px; background: var(--flaeche); }
.entwurf figcaption { font-size: 13px; color: var(--grau); margin-top: 5px; }
.platz { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 2; border: 1.5px dashed var(--linie); border-radius: 4px; color: var(--grau); font-size: 14px; text-align: center; padding: 8px; overflow: hidden; }
.platz input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.knopf { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 12px 22px; min-height: 48px; font-weight: 500; }
.knopf.haupt { background: var(--rot); border-color: var(--rot); color: #fff; }
.knopf.still { background: transparent; }
.knopf:disabled { opacity: .45; cursor: default; }
.textknopf { background: none; border: 0; padding: 12px 4px; min-height: 48px; font-size: 15px; color: var(--grau); }
.gefahr { color: var(--rot); }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.reihe.ende { justify-content: flex-end; }
.feld { display: block; margin: 0 0 14px; }
.feld > span { display: block; font-size: 14px; color: var(--grau); margin-bottom: 5px; }
.feld input, .feld textarea, .feld select { width: 100%; min-height: 46px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); padding: 10px 12px; font-size: 16px; }
.feld textarea { min-height: 76px; resize: vertical; }
.schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.schalter input { width: 22px; height: 22px; accent-color: var(--rot); flex: none; }
.fehlertext { color: var(--rot); font-size: 14px; margin: 0 0 12px; }

/* Raster der Werke */
.raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 14px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 560px) { .raster { grid-template-columns: repeat(3, 1fr); } }
.kachel { display: block; text-decoration: none; }
.kachel .bild { aspect-ratio: 4 / 5; background: var(--flaeche); overflow: hidden; border-radius: 2px; position: relative; }
.kachel .bild img { width: 100%; height: 100%; object-fit: cover; }
.kachel .bild .marke { position: absolute; left: 8px; bottom: 8px; background: var(--wand); color: var(--graphit); font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.kachel .bild .marke.rot { color: var(--rot); }
.kachel .wer { font: 600 14px/1.3 var(--sans); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel .was { font: italic 400 15px/1.3 var(--serif); color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monat { font: 500 17px/1.3 var(--serif); color: var(--grau); margin: 26px 0 12px; }

.suche { display: flex; gap: 10px; margin-bottom: 8px; }
.suche input { flex: 1; min-height: 44px; border: 1px solid var(--linie); border-radius: 999px; background: var(--flaeche); padding: 8px 16px; font-size: 16px; }
.filter { border: 1px solid var(--linie); background: transparent; border-radius: 999px; padding: 8px 14px; color: var(--grau); }
.filter[aria-pressed='true'] { background: var(--graphit); border-color: var(--graphit); color: var(--wand); }

/* Werk */
.werkbild { margin: 0 calc(var(--rand) * -1) 0; background: var(--flaeche); }
.werkbild img { width: 100%; max-height: 72dvh; object-fit: contain; margin: 0 auto; }
.zurueck { display: inline-flex; align-items: center; gap: 6px; color: var(--grau); text-decoration: none; font-size: 15px; margin-bottom: 10px; min-height: 40px; }
.schild { margin: 22px 0 4px; padding-left: 14px; border-left: 3px solid var(--graphit); }
.schild .kuenstler { font: 600 17px/1.3 var(--sans); }
.schild .kuenstler a { text-decoration: none; }
.schild .lebensdaten { font-weight: 400; color: var(--grau); }
.schild .titel { font: italic 400 24px/1.25 var(--serif); margin: 2px 0 4px; }
.schild .angabe { font-size: 15px; color: var(--grau); }
.sicherheit { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; margin-top: 12px; color: var(--grau); }
.sicherheit::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sicherheit.gesichert { color: var(--oliv); }
.sicherheit.unsicher { color: var(--rot); }
.text { font: 400 18px/1.62 var(--serif); margin: 0 0 12px; max-width: 64ch; text-wrap: pretty; }
.deutung { font-style: italic; }
.vermerk { font-size: 13px; color: var(--hell); margin: -4px 0 12px; }
.rueckfrage { border-left: 3px solid var(--rot); background: var(--flaeche); padding: 12px 14px; margin: 16px 0; border-radius: 0 8px 8px 0; }
.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.liste li { border-bottom: 1px solid var(--linie); padding: 11px 0; }
.liste li .neben { color: var(--grau); font-size: 14px; }
.liste a { text-decoration: none; display: block; }
.quellen a { color: var(--grau); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.schildfoto { max-width: 240px; border-radius: 4px; margin-top: 8px; }
.aktionen { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 0; }
.herz[aria-pressed='true'] { color: var(--rot); border-color: var(--rot); }

/* Erkennung läuft */
.laeuft { margin: 22px 0; }
.laeuft p { margin: 0 0 10px; font: italic 400 19px/1.4 var(--serif); color: var(--grau); }
.balken { height: 2px; background: var(--linie); overflow: hidden; position: relative; }
.balken::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--rot); left: -30%; }
@media (prefers-reduced-motion: no-preference) { .balken::after { animation: wandern 1.8s ease-in-out infinite; } @keyframes wandern { to { left: 100%; } } }

/* Künstler */
.liste a.person, .person { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.person .rund { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--flaeche); }
.person .rund img { width: 100%; height: 100%; object-fit: cover; }
.person .name { font-weight: 600; }
.person .zahl { color: var(--grau); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Blatt */
.blatt-hinter { position: fixed; inset: 0; background: #0007; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.blatt { width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto; background: var(--wand); border-radius: 18px 18px 0 0; padding: 10px var(--rand) calc(var(--unten) + 20px); }
.blatt .griff { width: 40px; height: 5px; border-radius: 3px; background: var(--linie); margin: 0 auto 12px; }
.blatt h2 { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) { .blatt { animation: hoch .22s ease-out; } @keyframes hoch { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } } }

.anmelden { max-width: 380px; margin: 0 auto; padding: calc(var(--oben) + 12vh) var(--rand) 40px; }
.anmelden h1 { font: 400 44px/1.1 var(--serif); margin: 0 0 6px; }
.anmelden p { color: var(--grau); margin: 0 0 26px; }
.anmelden .knopf { width: 100%; margin-top: 6px; }
.meldung { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--unten) + 84px); z-index: 50; background: var(--graphit); color: var(--wand); padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); }
.wartet { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.wartet img { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; }
.wartet span { color: var(--grau); font-size: 14px; }
.verborgen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.schild + .text { margin-top: 18px; }
