/* Dark colour scheme (docs/design). Fonts: SIL OFL 1.1, see fonts/OFL-*.txt */
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url(fonts/archivo-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #0F1113; --flaeche: #17191C; --rahmen: #26292E; --akzent: #F2A33A;
  --text: #F3F1EC; --sek: #A3A9B1; --tag: #22262B;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 "IBM Plex Sans", system-ui, sans-serif; }
a { color: var(--akzent); }
h1, h2, .marke, .kachel b { font-family: "Archivo", system-ui, sans-serif; font-weight: 700; }
h1 { margin: 0; font-size: clamp(27px, 5vw, 38px); line-height: 1.15; }
h2 { margin: 0; font-size: 20px; }

.marke { font-size: 13px; letter-spacing: .18em; color: var(--akzent); text-decoration: none; }
main { flex: 1; min-width: 0; max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; padding-top: max(24px, env(safe-area-inset-top));
  display: flex; flex-direction: column; gap: 20px; }

/* Navigation: tab bar at the bottom on phones, sidebar on wide screens (docs/design). */
.rahmen { display: flex; min-height: 100vh; }
.hauptnav { display: flex; gap: 6px; }
.nav { display: flex; align-items: center; gap: 10px; color: #9DA3AB; text-decoration: none; font-weight: 500; border-radius: 10px; }
.nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav.aktiv { color: var(--akzent); font-weight: 600; }
@media (max-width: 799px) {
  .hauptnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; justify-content: space-around;
    padding: 8px 4px max(8px, env(safe-area-inset-bottom)); background: #0B0C0E; border-top: 1px solid #23262B; }
  .hauptnav .marke { display: none; }
  .nav { flex-direction: column; gap: 3px; font-size: 11.5px; min-width: 64px; }
  main { padding-bottom: 110px; }
}
@media (min-width: 800px) {
  .hauptnav { flex-direction: column; flex: 0 0 210px; padding: 28px 18px; border-right: 1px solid #1F2226;
    position: sticky; top: 0; height: 100vh; }
  .hauptnav .marke { margin-bottom: 18px; }
  .nav { padding: 9px 10px; font-size: 15px; }
  .nav.aktiv { background: #241A0B; }
}

.sek { color: var(--sek); font-size: 14px; }
.akzent { color: var(--akzent); }
.lbl { font-size: 11.5px; letter-spacing: .14em; color: var(--sek); }
.titelzeile { display: flex; flex-direction: column; gap: 6px; }
.zurueck { color: var(--text); text-decoration: none; font-size: 14px; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; }
.kachel { display: flex; flex-direction: column; background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: 16px; padding: 14px 18px; }
.kachel b { font-size: 30px; }

.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--rahmen); background: var(--flaeche); color: var(--text); text-decoration: none; }
.zeile:hover { border-color: #3A3E44; }
.haupt { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.name { font-size: 16px; font-weight: 600; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--tag); color: #C9CDD2; white-space: nowrap; }
.tag.akzent { background: #241A0B; color: #E7C9A0; border: 1px solid #5A3E14; }
.status { min-width: 150px; font-size: 13px; color: var(--sek); }
.status.akzent { color: var(--akzent); }
.stern { cursor: pointer; font: inherit; width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid #2E3136; background: var(--bg); color: #5B6168; font-size: 20px; }
.stern.an { color: var(--akzent); border-color: #5A3E14; background: #241A0B; }

.leer { padding: 32px 20px; border: 1px dashed #2E3136; border-radius: 16px; text-align: center; }
.karte { height: min(60vh, 480px); border-radius: 16px; border: 1px solid var(--rahmen); background: var(--flaeche); }
.leaflet-container { font: inherit; }

.knopf { display: inline-block; padding: 10px 16px; border-radius: 12px; border: 0; background: var(--akzent); color: var(--bg);
  font: 600 15px/1.2 "IBM Plex Sans", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.knopf.gefahr { background: #7A2A22; color: var(--text); }
.formular { display: flex; flex-direction: column; gap: 14px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld input[type=text], .feld input[type=file] { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rahmen);
  background: var(--flaeche); color: var(--text); font: inherit; }
.feld input[type=range] { accent-color: var(--akzent); max-width: 420px; }
.wahl { cursor: pointer; }
.wahl input { width: 20px; height: 20px; accent-color: var(--akzent); }
.fehler { padding: 12px 14px; border-radius: 12px; background: #2A1512; border: 1px solid #7A2A22; }
.loeschen summary { cursor: pointer; }
.loeschen form { margin-top: 10px; }
.inhalt { gap: 8px; }
.inhalt p { margin: 0 0 6px; }
.hinweis { font-size: 18px; font-weight: 600; }
.reihe { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.reihe input[type=text], .reihe input[type=number] { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rahmen);
  background: var(--flaeche); color: var(--text); font: inherit; }
.feld input[type=number] { width: 120px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rahmen); background: var(--flaeche); color: var(--text); font: inherit; }
.knopf.zweit { background: var(--tag); color: var(--text); border: 1px solid var(--rahmen); }
.punkt { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px; background: var(--sek); }
.karte.fehlt { outline: 2px solid var(--akzent); }
.stand { gap: 6px; }
.stand progress { width: 100%; height: 8px; accent-color: var(--akzent); }
.tag.text-fertig { color: #BFE3C0; background: #14261A; }
.tag.text-knapp { color: var(--sek); }
.tag.text-fehler { color: #F0B3AA; background: #2A1512; }
.verweis { color: var(--text); text-decoration: none; }
.verweis:hover .name { color: var(--akzent); }
.titel { align-items: center; flex-wrap: nowrap; }
.umbruch { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: 13px; }
.zwischen { justify-content: space-between; align-items: baseline; }
.karte-liste { gap: 10px; }
.liste.eng { gap: 6px; }
.zeile.kompakt { padding: 8px 12px; border-radius: 12px; background: transparent; }
.zeile.favorit { border: 2px solid var(--akzent); background: #241A0B; }
.wert { display: flex; gap: 4px; }
.wert .p { width: 7px; height: 7px; border-radius: 50%; background: #33373C; }
.wert .p.an { background: var(--akzent); }
.knopf.breit { display: block; text-align: center; padding: 14px; }
.wege { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.weg { gap: 6px; text-decoration: none; color: var(--text); }
.weg:hover { border-color: var(--akzent); }
.karte.klein { height: min(40vh, 280px); }
.zeile .name a { color: var(--text); }
.punkt.an { background: var(--akzent); }
.titelzeile .punkt { display: inline-block; vertical-align: middle; width: 10px; height: 10px; }
input[type=search] { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rahmen); background: var(--flaeche); color: var(--text); font: inherit; }
.umschalter { display: flex; border: 1px solid var(--rahmen); border-radius: 10px; overflow: hidden; }
.umschalter button { border: 0; background: var(--flaeche); color: var(--sek); padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.umschalter button.an { background: #241A0B; color: var(--akzent); }
.knopf.klein { padding: 4px 10px; }
select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rahmen); background: var(--flaeche); color: var(--text); font: inherit; max-width: 100%; }
.vorlesen { gap: 6px; }
.vorlesen audio { width: 100%; max-width: 480px; }
.altfoto { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.altfoto img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 14px; background: #000; }
img.mini { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: 0 0 56px; }
.kamera, .vergleich { position: relative; width: 100%; max-width: 720px; border-radius: 14px; overflow: hidden; background: #000; }
.kamera video, .vergleich img { display: block; width: 100%; }
.kamera .ueberlagerung, .vergleich .damals { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rahmen); background: var(--flaeche); color: var(--text); font: inherit; resize: vertical; }
.fund { gap: 8px; }
.fund p { margin: 0; font-size: 16px; }
.fundbild { max-width: 100%; max-height: 300px; border-radius: 12px; align-self: flex-start; }
.galerie { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.aufnahme { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 2px solid var(--akzent); background: #000; }
.aufnahme > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.aufnahme .einschub { position: absolute; top: 8px; right: 8px; width: 34%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 8px; border: 2px solid var(--text); filter: sepia(0.3); }
.aufnahme .unterschrift { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 13px; font-weight: 600;
  color: var(--text); background: linear-gradient(transparent, rgba(0,0,0,.8)); }
