/* ERZEUGT aus bauteile/luchs/bauteil.css mit werkzeuge/bauen.py – nicht von Hand ändern. Fassung G1. */
/* Luchs 1.0 – braucht dist/grundstein.css (Rollen, Marke) davor. */
/* Luchs 1.0 · Kamera. Maße und Aufbau genau nach Vorschau 6 (Stand Vorschau 5 + Prüfer 3, 5, 6; „Fertig“ quer a).
   Kamera immer dunkel, auch im hellen Modus; nur „Kamera nicht erlaubt“ ist hell (wie Fundus). Farben nur über Rollen (werte.json „fest“).
   Sichere Ränder über --sicher-* (env()). Zustand an .luchs: data-zustand · data-lage · data-hand · data-netz · data-fotos · data-zoom-art. */
.luchs-vollbild { position: fixed; inset: 0; z-index: 50; }
.luchs {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--kamera-grund); color: var(--kamera-text); font-family: var(--schrift);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.luchs.luchs-vollbild { position: fixed; }
.luchs button { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.luchs button:focus-visible { outline: var(--fokus-breite) solid var(--kamera-text); outline-offset: 2px; }
.luchs-datei { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Kopf wie jede Unterseite: Zurück mit Bewegungsecho, Trennstrich, Titel – ohne „online“ (Costa 28.11., „a“) */
.luchs-rand-oben { flex: none; height: var(--sicher-oben); background: var(--kamera-kopf); }
.luchs-kopf {
  flex: none; height: 64px; display: flex; align-items: center; gap: 12px; background: var(--kamera-kopf);
  padding: 0 calc(16px + var(--sicher-rechts)) 0 calc(16px + var(--sicher-links)); box-sizing: border-box;
}
.luchs[data-lage="quer"] .luchs-kopf { height: 44px; }
.luchs-zurueck { width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.luchs-strich { width: 1px; height: 28px; background: var(--kamera-strich); flex: none; }
.luchs-titel { margin: 0; flex: 1; min-width: 0; font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.luchs-tri { flex: none; height: 5px; }

.luchs-mitte { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.luchs[data-lage="quer"] .luchs-mitte { flex-direction: row; }
.luchs-randseite { display: none; flex: none; background: var(--kamera-grund); }
.luchs[data-lage="quer"] .luchs-randseite { display: block; width: var(--sicher-links); order: 0; }
.luchs[data-lage="quer"][data-hand="links"] .luchs-randseite { width: var(--sicher-rechts); order: 3; }

/* Bildfläche */
.luchs-sucher { flex: 1; position: relative; overflow: hidden; min-height: 0; background: var(--kamera-grund); order: 1; }
.luchs-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--kamera-grund); transform-origin: 50% 50%; }
.luchs-video.zoom-2 { transform: scale(2); }

/* Ziel-Schild oben links (12 px), Grund .3 mit Unschärfe 6 px, leichter Schatten an der Schrift */
.luchs-ziel {
  position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); box-sizing: border-box;
  background: var(--kamera-ziel-grund); border-radius: 22px; padding: 10px 16px; font-size: 15px; font-weight: 700; line-height: 1.25;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-shadow: var(--schatten-kamera-schrift);
}
.luchs-ziel-zeichen { display: flex; flex: none; }
.luchs[data-netz="aus"] .luchs-ziel-zeichen { display: none; }
.luchs-ziel-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Vorschaubilder als Stapel unten links (48 × 48), Zahl in grüner Plakette (12 px) */
.luchs-stapel { position: absolute; bottom: 10px; left: 12px; width: 48px; height: 48px; display: none; }
.luchs[data-fotos="n"][data-zustand="laeuft"] .luchs-stapel { display: block; }
.luchs-stapel i { position: absolute; inset: 0; border-radius: 8px; border: 2px solid var(--kamera-text); background: var(--kamera-stapel-leer); overflow: hidden; }
.luchs-stapel i:nth-child(1) { transform: translate(-4px, -4px); opacity: .5; }
.luchs-stapel i:nth-child(2) { transform: translate(-2px, -2px); opacity: .75; }
.luchs-stapel i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.luchs-stapel b {
  position: absolute; right: -8px; top: -10px; background: var(--kamera-gruen); color: var(--auf-kamera-gruen); font-size: 12px; font-weight: 700;
  border-radius: 10px; padding: 1px 7px; border: 2px solid var(--kamera-grund); line-height: 1.4;
}

/* Zoom-Stufen im Bild, unten mittig, 10 px über dem Bildrand: sichtbar 40 × 30, Schrift 13, Weiß 88 %, 2 px Abstand,
   Grund .22 mit Unschärfe 6 px; gewählte Stufe mit 2 px weißem Rahmen, fett. Tippfläche unsichtbar 44 × 44 (wie FU9a). */
.luchs-zoom {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: none; gap: 2px; padding: 3px;
  background: var(--kamera-zoom-grund); border-radius: 20px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.luchs[data-zustand="laeuft"] .luchs-zoom:not(:empty) { display: flex; }
.luchs .luchs-z { position: relative; width: 44px; height: 44px; margin: -7px -2px; display: grid; place-items: center; font-size: 13px; color: var(--kamera-zoom-text); }
.luchs-z::before { content: ""; position: absolute; left: 2px; top: 7px; width: 40px; height: 30px; box-sizing: border-box; border-radius: 15px; border: 1.5px solid transparent; }
.luchs-z.an { color: var(--kamera-text); font-weight: 800; }
.luchs-z.an::before { border: 2px solid var(--kamera-text); }
.luchs-z:focus-visible { outline: 0; }
.luchs-z:focus-visible::before { outline: var(--fokus-breite) solid var(--kamera-text); outline-offset: 1px; }

/* Satz im Bild (Ausschnitt-Hinweis wie funke; Meldungen nach dem Auslösen) – über den Zoom-Stufen */
.luchs-satz, .luchs-hinweis {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); margin: 0; max-width: calc(100% - 24px); box-sizing: border-box;
  padding: 6px 12px; border-radius: 16px; background: var(--kamera-ziel-grund); font-size: 13px; font-weight: 700; text-align: center;
  text-shadow: var(--schatten-kamera-schrift); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: none;
}
.luchs.mit-satz .luchs-satz { display: block; }
.luchs.mit-ausschnitt:not(.mit-satz)[data-zustand="laeuft"] .luchs-hinweis { display: block; }

.luchs-blitz { position: absolute; inset: 0; background: var(--kamera-blitz); opacity: 0; pointer-events: none; }
.luchs-blitz.an { animation: luchs-blitz .18s ease-out; }
@keyframes luchs-blitz { from { opacity: .7; } to { opacity: 0; } }

/* Startet: Satz „Kamera startet …“ im Bild, Auslöser grau (.45), keine Zoom-Stufen */
.luchs-start { position: absolute; inset: 0; background: var(--kamera-start); display: none; place-items: center; font-size: 16px; color: var(--kamera-leise); }
.luchs[data-zustand="startet"] .luchs-start { display: grid; }
.luchs[data-zustand="startet"] .luchs-ziel, .luchs[data-zustand="startet"] .luchs-stapel { visibility: hidden; }

/* Startet nicht: Kasten im Sucher, „Noch einmal“ 44 px hoch */
.luchs-kasten {
  position: absolute; inset: 0; background: var(--kamera-kasten); display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px 24px; gap: 10px; box-sizing: border-box;
}
.luchs[data-zustand="nicht"] .luchs-kasten { display: flex; }
.luchs-kasten-titel { margin: 0; font-size: 22px; font-weight: 800; }
.luchs-kasten-satz { margin: 0; font-size: 15px; color: var(--kamera-leise); line-height: 1.4; }
.luchs .luchs-noch { margin-top: 6px; border: 2px solid var(--kamera-text); border-radius: 12px; padding: 0 20px; height: 44px; font-weight: 700; font-size: 16px; }

/* Bedienzone: hoch 112 px (Zähler · Auslöser 86 · Fertig 104 × 56), Hand-Spiegelung */
.luchs-bedien { flex: none; order: 2; background: var(--kamera-grund); display: grid; align-items: center; justify-items: center;
  height: 112px; grid-template-columns: 1fr auto 1fr; }
.luchs-zaehler { text-align: center; line-height: 1.1; order: 1; }
.luchs-zaehler b { display: block; font-size: 28px; font-weight: 800; }
.luchs-zaehler span { font-size: 15px; }
.luchs-auslwrap { position: relative; order: 2; }
.luchs-fertig { order: 3; }
.luchs[data-hand="links"] .luchs-zaehler { order: 3; }
.luchs[data-hand="links"] .luchs-fertig { order: 1; }
.luchs .luchs-ausl { width: 86px; height: 86px; border-radius: 50%; border: 3px solid var(--kamera-gruen); display: grid; place-items: center; box-sizing: border-box; position: relative; }
.luchs-ausl i {
  width: 76px; height: 76px; border-radius: 50%; background: var(--kamera-text); border: 6px solid var(--kamera-grund); box-sizing: border-box;
  outline: 3px solid var(--kamera-text); outline-offset: -1px; display: grid; place-items: center; color: var(--kamera-hell-text);
}
.luchs-ausl i svg { display: none; }
.luchs[data-zustand="nicht"] .luchs-ausl i svg { display: block; }
.luchs[data-zustand="startet"] .luchs-ausl { opacity: .45; }
.luchs-ausl.sichert::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid transparent; border-right-color: var(--kamera-ring);
  animation: luchs-ring .8s linear infinite; pointer-events: none;
}
@keyframes luchs-ring { to { transform: rotate(360deg); } }
.luchs-kamera-app { position: absolute; top: 89px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; display: none; }
.luchs[data-zustand="nicht"] .luchs-kamera-app { display: block; }
/* Kleiner Bildschirm hoch (iPhone 8, Nachtrag 1 Frage 1 c): Bedienzone 120 px in allen Zuständen, Auslöser 86 bleibt mittig;
   „Kamera-App“ rückt dicht unter den Auslöser (Zeile 12 px), damit die Schrift ganz sichtbar ist (≥ 4 px über der Unterkante). */
.luchs[data-bildschirm="klein"][data-lage="hoch"] .luchs-bedien { height: 120px; }
.luchs[data-bildschirm="klein"][data-lage="hoch"] .luchs-kamera-app { top: 86px; line-height: 12px; }
.luchs .luchs-fertig {
  background: var(--kamera-gruen); color: var(--auf-kamera-gruen); border-radius: 16px; width: 104px; height: 56px;
  display: grid; place-items: center; align-content: center; line-height: 1.15; visibility: hidden;
}
.luchs[data-fotos="n"] .luchs-fertig { visibility: visible; }
.luchs-fertig b { font-size: 19px; font-weight: 800; }
.luchs-fertig span { font-size: 13px; }

/* Quer: Kopf 44 + 5 px; Bedienspalte 196 px (+ Sicherheitsrand) auf der Daumenseite, oben „Fertig · Serie beenden“, Mitte Auslöser,
   unten Zähler, Abstand 12 px (2a Nr. 5: Zähler 28/15 unter dem Auslöser) */
.luchs[data-lage="quer"] .luchs-bedien {
  height: auto; width: calc(196px + var(--sicher-rechts)); padding-right: var(--sicher-rechts); box-sizing: border-box;
  grid-template-columns: none; grid-template-rows: 1fr auto 1fr; gap: 12px; order: 3;
}
.luchs[data-lage="quer"][data-hand="links"] .luchs-bedien { width: calc(196px + var(--sicher-links)); padding-right: 0; padding-left: var(--sicher-links); order: 0; }
.luchs[data-lage="quer"] .luchs-fertig { order: 1; }
.luchs[data-lage="quer"] .luchs-auslwrap { order: 2; }
.luchs[data-lage="quer"] .luchs-zaehler { order: 3; }

.luchs-rand-unten { flex: none; height: var(--sicher-unten); background: var(--kamera-grund); }

/* Nicht erlaubt: helle Seite mit Anleitung iPhone/Android wie Fundus; quer die beiden Knöpfe in einer 220 px breiten Spalte auf der
   Daumenseite, Anleitung daneben scrollbar; am iPhone X rücken Spalte und Anleitung um den Sicherheitsrand aus der Kerbe (2a Nr. 6). */
.luchs-hell { display: none; flex: 1; min-height: 0; background: var(--kamera-hell-grund); color: var(--kamera-hell-text); flex-direction: column; }
.luchs[data-zustand="verboten"] .luchs-mitte { display: none; }
.luchs[data-zustand="verboten"] .luchs-hell { display: flex; }
.luchs[data-zustand="verboten"] .luchs-rand-oben, .luchs[data-zustand="verboten"] .luchs-kopf,
.luchs[data-zustand="verboten"] .luchs-rand-unten { background: var(--kamera-hell-grund); color: var(--kamera-hell-text); }
.luchs[data-zustand="verboten"] .luchs-zurueck:focus-visible { outline-color: var(--kamera-hell-text); }
.luchs-hell-inhalt {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 16px 0;
  -webkit-mask-image: linear-gradient(var(--kamera-grund) 85%, transparent); mask-image: linear-gradient(var(--kamera-grund) 85%, transparent);
  -webkit-user-select: text; user-select: text;
}
.luchs-hell-symbol { width: 76px; height: 76px; border-radius: 50%; background: var(--kamera-hell-symbol); display: grid; place-items: center; margin: 4px auto 10px; }
.luchs-hell h2 { margin: 0 0 8px; font-size: 26px; text-align: center; font-weight: 800; }
.luchs-hell-inhalt p { margin: 0 0 12px; color: var(--kamera-hell-neben); font-size: 15px; }
.luchs-hell-inhalt .luchs-hell-ueber { color: var(--kamera-hell-text); font-weight: 700; }
.luchs-weg { border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.luchs-weg.eigen { background: var(--kamera-hell-kasten); }
.luchs-weg.anders, .luchs-weg.gleich { border: 1px solid var(--kamera-hell-rand); }
.luchs-weg ol { margin: 4px 0 0; padding-left: 20px; }
.luchs-hell-knoepfe { flex: none; display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--kamera-hell-linie); background: var(--kamera-hell-grund); }
.luchs .luchs-hk {
  flex: 1; border-radius: 16px; height: 64px; display: grid; place-items: center; align-content: center; line-height: 1.2; text-align: center;
}
.luchs-hk b { font-size: 17px; }
.luchs-hk span { font-size: 13px; }
.luchs .luchs-hk.neben { border: 2px solid var(--kamera-hell-text); }
.luchs .luchs-hk.haupt { background: var(--kamera-gruen); color: var(--auf-kamera-gruen); }
.luchs .luchs-hk:focus-visible { outline-color: var(--kamera-hell-text); }
.luchs[data-lage="quer"] .luchs-hell { flex-direction: row; padding-left: var(--sicher-links); }
.luchs[data-lage="quer"] .luchs-hell-knoepfe {
  flex-direction: column; justify-content: center; align-items: stretch; width: calc(220px + var(--sicher-rechts)); box-sizing: border-box;
  padding-right: calc(16px + var(--sicher-rechts)); border-top: 0; border-left: 1px solid var(--kamera-hell-linie);
}
.luchs[data-lage="quer"] .luchs-hk { flex: none; }
.luchs[data-lage="quer"][data-hand="links"] .luchs-hell { padding-left: 0; padding-right: var(--sicher-rechts); }
.luchs[data-lage="quer"][data-hand="links"] .luchs-hell-knoepfe {
  order: -1; width: calc(220px + var(--sicher-links)); padding-right: 16px; padding-left: calc(16px + var(--sicher-links));
  border-left: 0; border-right: 1px solid var(--kamera-hell-linie);
}

@media (prefers-reduced-motion: reduce) {
  .luchs-blitz.an { animation-duration: .01s; }
  .luchs-ausl.sichert::after { animation-duration: 2.4s; }
}
