/* Farben kommen aus dem Telegram-Design (hell/dunkel), mit Ersatzwerten für den Browser */
:root {
  --bg: var(--tg-theme-secondary-bg-color, #f1f1f4);
  --karte: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #111111);
  --hinweis: var(--tg-theme-hint-color, #6d6d72);
  --akzent: var(--tg-theme-button-color, #2481cc);
  --akzent-text: var(--tg-theme-button-text-color, #ffffff);
  --fehler: var(--tg-theme-destructive-text-color, #d93b3b);
  --linie: color-mix(in srgb, var(--hinweis) 25%, transparent);
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
h1 { font-size: 22px; margin: 4px 0 16px; line-height: 1.25; }
[hidden] { display: none !important; }

.karte { background: var(--karte); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.hinweis { color: var(--hinweis); font-size: 14px; }
.gross { font-size: 18px; font-weight: 600; }

/* Standort */
.standort { display: flex; align-items: center; gap: 12px; }
.standort-text { flex: 1; min-width: 0; }
.punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--hinweis); flex: none; }
.punkt.laden { animation: pulsieren 1s ease-in-out infinite alternate; }
.punkt.ok { background: #31a24c; }
.punkt.ungenau { background: #e8a317; }
.punkt.fehler { background: var(--fehler); }
@keyframes pulsieren { to { opacity: .3; } }
.link { background: none; border: 0; color: var(--akzent); font: inherit; font-weight: 600; padding: 6px 0 6px 8px; cursor: pointer; }

/* Foto */
.vorschau {
  aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; margin-bottom: 12px;
  background: color-mix(in srgb, var(--hinweis) 12%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.vorschau img { width: 100%; height: 100%; object-fit: cover; }
.leer { text-align: center; color: var(--hinweis); }
.leer-symbol { font-size: 40px; margin-bottom: 4px; }
.knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.knopf {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 10px; border-radius: 10px; font-weight: 600; text-align: center; cursor: pointer;
  background: color-mix(in srgb, var(--akzent) 12%, transparent); color: var(--akzent);
}
.knopf.haupt { background: var(--akzent); color: var(--akzent-text); }
.knopf input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
#foto-hinweis:not(:empty) { margin-top: 10px; }

/* Hinweis-Feld */
.beschriftung { display: block; font-weight: 600; margin-bottom: 8px; }
textarea {
  width: 100%; resize: vertical; font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--linie); border-radius: 10px; padding: 10px;
}
textarea:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }

.fehler { color: var(--fehler); background: color-mix(in srgb, var(--fehler) 10%, transparent); border-radius: 10px; padding: 12px; }

/* Senden */
.mitte { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.kreisel {
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 8px;
  border: 4px solid color-mix(in srgb, var(--akzent) 20%, transparent); border-top-color: var(--akzent);
  animation: drehen .9s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

/* Ergebnis */
.ergebnis-kopf { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 12px; }
.ergebnis-kopf h1 { margin: 2px 0 0; }
.ergebnis-symbol { font-size: 32px; line-height: 1; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
dt { color: var(--hinweis); }
dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
