/* ============================================================
   BUGCAM.CSS - Bildschirm melden (App 355, app/bugcam.js). Farben aus style.css (--karte, --tinte, --linie, --gruen-dunkel),
   hell und dunkel; Schliessen als roter pulsierender Kreis oben rechts wie .popupzu (Liebe zum Detail, 6.10.2026).
   ============================================================ */
.bugcam { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 12px; background: rgba(20, 24, 18, .55); }
.bugcam[hidden] { display: none; }
.bugcam-karte { position: relative; width: min(640px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--karte, #FAFCF5); color: var(--tinte, #27331F); border: 2px solid var(--gruen-dunkel, #5C804E); border-radius: 20px;
  padding: 16px 18px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.bugcam-titel { display: flex; align-items: center; gap: 10px; margin: 0 48px 10px 0; font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; font-size: 1.4rem; letter-spacing: .04em; }
/* Die Linse: kleines Kameraauge mit Kobold-Rot, statt eines Systemsymbols */
.bugcam-linse { width: 26px; height: 26px; border-radius: 50%; flex: none; background: radial-gradient(circle at 38% 35%, #fff 0 12%, #2A2118 13% 42%, #B0303A 43% 64%, #6E4B2C 65%);
  box-shadow: 0 0 0 2px #2A2118; }
.bugcam-zu { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 700; line-height: 1; background: #B0303A; color: #fff; border: 2.5px solid #fff; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3); animation: bugcamzu 1.8s ease-in-out infinite; }
.bugcam-zu span { display: block; transition: transform .18s; }
.bugcam-zu:hover span, .bugcam-zu:focus-visible span { transform: rotate(90deg); }
@keyframes bugcamzu { 0%, 100% { box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 0 rgba(176,48,58,.55); } 60% { box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 9px rgba(176,48,58,0); } }
.bugcam-wahl { display: grid; gap: 10px; margin: 12px 0; }
.bugcam-feld { display: grid; gap: 6px; font-weight: 600; }
.bugcam-feld textarea { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; font-size: 1rem; padding: 10px 12px; border: 2px solid var(--linie, #C9D3BE);
  border-radius: 12px; background: var(--grund, #EEF3E6); color: var(--tinte, #27331F); resize: vertical; min-height: 4.5em; }
.bugcam-werkzeuge { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.bugcam-werkzeuge button { min-height: 44px; }
.bugcam-werkzeuge button.an { background: var(--gruen-dunkel, #5C804E); color: #fff; }
.bugcam-bild { border: 2px solid var(--linie, #C9D3BE); border-radius: 12px; overflow: hidden; background: #000; }
.bugcam-bild canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.bugcam-bild canvas.hand { touch-action: pan-y pinch-zoom; cursor: grab; }   /* App 356: mit der Hand scrollt der Finger, statt zu malen */
.bugcam-haken { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; cursor: pointer; }
.bugcam-haken input { width: 24px; height: 24px; flex: none; margin: 2px 0 0; }
.bugcam-pflicht { padding: 8px 10px; border-radius: 12px; border: 2px dashed var(--gruen-dunkel, #5C804E); }
.bugcam-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bugcam-klein { font-size: .9rem; opacity: .9; margin: 6px 0; }
.bugcam-meldung { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #FBE3E1; color: #6B1A1F; font-weight: 600; }
.bugcam-danke { font-size: 1.15rem; font-weight: 600; }
.bugcam-mehr { position: sticky; bottom: -18px; margin: 12px -18px -18px; padding: 8px 12px; text-align: center; font-weight: 600; font-size: .9rem;
  background: var(--gruen-dunkel, #5C804E); color: #fff; border-radius: 0 0 18px 18px; }
.bugcam-mehr[hidden] { display: none; }
/* "Erst hinscrollen": kleine Leiste unten, die Seite bleibt bedienbar */
.bugcam-leiste { position: fixed; left: 50%; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1201; width: min(460px, calc(100vw - 24px));
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 16px;
  background: var(--karte, #FAFCF5); color: var(--tinte, #27331F); border: 2px solid var(--gruen-dunkel, #5C804E); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.bugcam-leiste p { flex-basis: 100%; margin: 0; text-align: center; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .bugcam-zu { animation: none; } .bugcam-zu span { transition: none; } }
html[data-bewegung="aus"] .bugcam-zu { animation: none; }
@media (max-width: 520px) { .bugcam { padding: 0; place-items: stretch; } .bugcam-karte { max-height: 100dvh; border-radius: 0; border-width: 0; } }

/* App 356: schwebender Knopf auf jeder Seite ohne eigenen (alle ausser spiel.html), wie der Knopf im Spiel. Ueber der Fusszeile der
   Startseite (--fussh), sonst unten links im sicheren Bereich. */
.bugcam-schwebe { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); bottom: calc(var(--fussh, 0px) + max(10px, env(safe-area-inset-bottom, 0px))); z-index: 35;
  width: 52px; height: 52px; min-height: 0; padding: 0; border-radius: 50%; background: #8a1f1f; border: 3px solid #F2E8C9; color: #F2E8C9; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4), 0 0 0 2px #8a1f1f; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.bugcam-schwebe:hover { transform: translateY(-2px); }
/* App 389 (B11): die schwebende Blase verdeckt nie den letzten Knopf einer Seite (konto.html am Handy: "Code schicken"): Platz darunter */
body:has(.bugcam-schwebe) main { padding-bottom: calc(var(--fussh, 0px) + 76px); }
.bugcam-schwebe:focus-visible { outline: 3px solid #FFE89A; outline-offset: 2px; }
.bugcam-schwebefig { width: 30px; height: 30px; object-fit: contain; margin: -4px 0 -5px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.bugcam-schwebe span { font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; font-size: .5rem; letter-spacing: .02em; line-height: 1; }
/* App 357/358 (Wuensche des Autors 27.10.2026): ohne Linse; der Kobold groesser, ausserhalb des Flusses und oben aus dem Kreis;
   „BUG“ und „CAM“ zweizeilig eng und mittig im Knopf. */
.bugcam-schwebefig { position: absolute; left: 50%; bottom: calc(50% + 10px); margin: 0; transform: translateX(-50%) scale(1.5); transform-origin: 50% 100%; pointer-events: none; }
.bugcam-schwebe span { font-size: .62rem; line-height: .92; letter-spacing: .04em; text-align: center; }
@media print { .bugcam-schwebe { display: none; } }
@media (prefers-reduced-motion: reduce) { .bugcam-schwebe:hover { transform: none; } }

/* App 360: sichtbarer Hinweis waehrend der Aufnahme und beim Senden (drehendes Zeichen). Ruhig, kein Blinken. */
.bugcam-arbeitet { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1202;
  display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 14px;
  background: #2A2118; color: #F2E8C9; font: 600 .95rem/1.3 "Nunito", sans-serif; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.bugcam-dreher { flex: none; display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent;
  animation: bugcamdreh .9s linear infinite; vertical-align: -3px; margin-right: 6px; }
.bugcam-arbeitet .bugcam-dreher { margin-right: 0; }
@keyframes bugcamdreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bugcam-dreher { animation-duration: 2.4s; } }
/* App 360 (F-0011): solange die BUGCAM offen ist (Aufnahme, Bearbeiten, Senden), sind ihre Knoepfe sichtbar gesperrt. */
html.bugcam-offen .bugcam-schwebe, html.bugcam-offen .dbugknopf, .dbugknopf[aria-disabled="true"] { opacity: .45; filter: grayscale(.6); pointer-events: none; cursor: default; }
/* App 378: Glanz - BUGCAM-Blase und ihr X gewoelbt wie die anderen roten Knoepfe */
html.glanz .bugcam-schwebe { background: radial-gradient(circle at 34% 28%, #C9484A 0%, #9A2626 45%, #741515 100%); }
html.glanz .bugcam-zu { background: radial-gradient(circle at 34% 28%, #CC4650 0%, #B3323D 42%, #94222D 78%, #741822 100%); text-shadow: 0 1px 1px rgba(0, 0, 0, .45); }

/* App 417 (F-0082, Meldung des Autors 18.11.2026: "Abzeichen-Popups sind nicht per BUGCAM zu fotografieren"): das Abzeichen-Fenster
   (.abzpopup, z-index 200, ganzer Bildschirm) lag ueber dem BUGCAM-Knopf (35) und der BUGCAM selbst (bis 416: 120). Die BUGCAM liegt
   jetzt ueber allem (1200), und solange ein Abzeichen-Fenster offen ist, hebt sich der Knopf darueber - samt Fussleiste im Spiel,
   in der er dort steckt; das Fenster haelt dann unten Abstand zu ihr. */
body:has(.abzpopup) .bugcam-schwebe, body:has(.abzpopup) .dbugknopf, body:has(.abzpopup) #fuss:has(.dbugknopf) { z-index: 201; }
body:has(#fuss .dbugknopf) .abzpopup { padding-bottom: calc(var(--fussh, 0px) + 16px); }
