/* wien · besichtigungen – schwarz / weiß, keine rundungen */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --grau: #6b6b6b;
  --linie: #000000;
  --fein: #d9d9d9;
  --feld: #f3f3f3;
  --gut: #1f8a4c;
  --mittel: #d39b00;
  --schlecht: #d0311d;
  --neutral: #9a9a9a;
  --besucht: #e6e6e6;
  --feld-an: #e6e6e6;
  --tint: 20%;
  --kopf-h: 52px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --fg: #ffffff; --grau: #9a9a9a; --linie: #ffffff; --fein: #333333; --feld: #141414;
    --gut: #3fcf7f; --mittel: #ffc233; --schlecht: #ff5a43; --neutral: #777777; --besucht: #262626; --feld-an: #262626; --tint: 32%;
  }
}

* { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; flex: none; }
b { font-weight: 700; }

/* ---------- kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  height: calc(var(--kopf-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  background: #000; color: #fff; border-bottom: 1px solid #fff;
}
.logo { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; color: #fff; text-decoration: none; }
.kopf-titel { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync { width: 8px; height: 8px; background: #fff; }
.sync.laeuft { background: #777; }
.sync.fehler { background: var(--schlecht); }
.person { border: 0; background: #000; color: #fff; padding: 4px 10px; font-size: 14px; }

main { max-width: 680px; margin: 0 auto; padding: 12px 16px 80px; }

/* ---------- login ---------- */
.login { max-width: 360px; margin: 10vh auto 0; }
.login h1 { font-family: "Silkscreen", monospace; font-weight: 400; font-size: 34px; margin: 0 0 4px; }
.login p { color: var(--grau); margin: 0 0 24px; }
.feld { display: block; margin-bottom: 16px; }
.feld span { display: block; font-size: 13px; margin-bottom: 6px; }
.feld input { width: 100%; padding: 12px; border: 0; background: var(--feld); font-size: 17px; }
.wahl { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.wahl button, .segment button { padding: 11px; border: 0; background: var(--bg); }
.wahl button[aria-pressed="true"], .segment button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.knopf { width: 100%; padding: 13px; border: 0; background: var(--fg); color: var(--bg); font-weight: 700; }
.knopf:disabled { opacity: .4; }
.fehler-text { color: var(--schlecht); font-size: 14px; min-height: 20px; margin: 10px 0 0; }

/* ---------- liste ---------- */
.tag-kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 26px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--linie); font-size: 13px;
}
.tag-kopf b { font-size: 17px; }
.tag-kopf.heute b::after { content: " ●"; }
.karte {
  display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: baseline;
  border-bottom: 1px solid var(--fein); padding: 12px 0; text-decoration: none; color: inherit;
}
.karte:active { background: var(--feld); }
.karte .zeit { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.karte .zeit small { display: block; font-weight: 400; font-size: 11px; color: var(--grau); }
.karte .adr { font-weight: 700; line-height: 1.25; }
.karte > div:nth-child(2) { min-width: 0; }
.karte .meta { display: flex; font-size: 13px; color: var(--grau); margin-top: 2px; white-space: nowrap; }
.karte .meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.karte .meta b { flex: none; font-weight: 400; }
.karte .rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.punkte { display: flex; gap: 3px; }
.kuerzel { width: 22px; height: 22px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--feld); }
.kuerzel.an { background: var(--fg); color: var(--bg); }
.fortschritt { font-size: 12px; color: var(--grau); font-variant-numeric: tabular-nums; }
.schnitt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* besucht: grau hinterlegt */
.karte.besucht { background: var(--besucht); margin: 0 -16px; padding: 12px 16px; border-bottom-color: var(--bg); }
.besucht-marke { display: inline-flex !important; align-items: center; gap: 3px; margin-top: 3px; color: var(--fg) !important; font-weight: 700 !important; }
.besucht-marke svg { width: 12px; height: 12px; stroke-width: 3; }

/* ---------- detail ---------- */
.zurueck { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 10px; text-decoration: none; font-size: 14px; }
.titel h1 { font-size: 24px; line-height: 1.15; margin: 0 0 4px; letter-spacing: -.01em; }
.titel .unter { color: var(--grau); font-size: 14px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0; }
.aktion {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; flex: 1 1 auto; justify-content: center;
  border: 0;
  background: var(--feld); color: var(--fg); text-decoration: none; font-size: 14px;
}
.aktion.an { background: var(--fg); color: var(--bg); }

.block { border-top: 2px solid var(--linie); padding: 12px 0 4px; margin: 18px 0; }
.block h2 {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center;
}
.block h2 span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--grau); }
.eck { margin: 0; padding: 0; list-style: none; }

/* ampel: hartes farbsignal, sonst schwarz/weiß */
.t-gut { --c: var(--gut); } .t-mittel { --c: var(--mittel); } .t-schlecht { --c: var(--schlecht); } .t-neutral { --c: var(--neutral); }
.a-gut { color: var(--gut); } .a-mittel { color: var(--mittel); } .a-schlecht { color: var(--schlecht); } .a-neutral { color: var(--neutral); }
.schlecht { color: var(--schlecht); }
.grau { color: var(--grau); }

.blick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 4px; }
.chip { border: 0; background: color-mix(in srgb, var(--c) var(--tint), var(--bg)); padding: 7px 8px 9px; min-width: 0; }
.chip small { display: block; font-size: 11px; color: var(--fg); opacity: .65; }
.chip b { display: block; font-size: 14px; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--linie); }
.kennzahlen div { padding: 9px 0 8px; white-space: nowrap; }
.kennzahlen b { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.kennzahlen small { font-size: 13px; color: var(--grau); margin-left: 3px; }
.kennzahlen small.dicht { margin-left: 1px; }
.kennzahlen div:nth-child(2) { text-align: center; }
.kennzahlen div:nth-child(3) { text-align: right; }
.liste { display: grid; grid-template-columns: 96px 1fr; margin: 0; font-size: 15px; }
.liste dt, .liste dd { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--fein); }
.liste dt { color: var(--grau); font-size: 13px; padding-top: 7px; }

.band { margin-top: 12px; border: 0; border-top: 6px solid var(--c); border-bottom: 1px solid var(--linie); padding: 8px 0 9px; }
.band b { display: block; font-size: 16px; }
.band span { display: block; margin-top: 2px; font-size: 14px; }
.grund { font-size: 13px; color: var(--grau); margin: 10px 0 0; }
.weiter { font-size: 13px; color: var(--grau); margin: 10px 0 0; }

/* fragen */
.frage { padding: 10px 0; border-top: 1px solid var(--fein); }
.frage:first-of-type { border-top: 0; padding-top: 0; }
.frage-text { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; }
.haken { width: 18px; height: 18px; background: var(--feld); display: grid; place-items: center; margin-top: 2px; flex: none; }
.haken svg { width: 12px; height: 12px; stroke-width: 3; opacity: 0; }
.frage.erledigt .haken { background: var(--fg); color: var(--bg); }
.frage.erledigt .haken svg { opacity: 1; }
.frage textarea, .notiz {
  width: 100%; margin-top: 8px; padding: 9px 10px; min-height: 40px; resize: none;
  border: 0; background: var(--feld); font-size: 15px;
}
.frage.erledigt textarea { background: var(--feld); }
.frage textarea:focus, .notiz:focus, .neu-frage input:focus, .feld input:focus { outline: 0; background: var(--feld-an); }
.frage-meta { font-size: 12px; color: var(--grau); margin-top: 4px; display: flex; justify-content: space-between; }
.frage-meta button { border: 0; background: none; color: var(--grau); padding: 0; font-size: 12px; text-decoration: underline; }
.neu-frage { display: flex; margin-top: 12px; }
.neu-frage input { flex: 1; padding: 9px 10px; border: 0; background: var(--feld); font-size: 15px; }
.neu-frage button { border: 0; background: var(--fg); color: var(--bg); width: 44px; display: grid; place-items: center; }

/* bewertung */
.segment { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.zeile { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--fein); }
.zeile:first-of-type { border-top: 0; }
.zeile label { font-size: 15px; }
.sterne { display: flex; gap: 3px; }
.stern { width: 34px; height: 34px; border: 0; background: var(--feld); font-size: 14px; font-weight: 700; padding: 0; }
.stern.an { background: var(--fg); color: var(--bg); }
.sterne.nur-lesen .stern { pointer-events: none; }
.verdeckt { text-align: center; color: var(--grau); padding: 18px 8px; font-size: 14px; background: var(--feld); }
.verdeckt button { margin-top: 10px; border: 0; background: var(--bg); padding: 6px 14px; font-size: 14px; }
.summe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; text-align: center; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.summe div { padding: 8px 4px; }
.summe div:last-child { background: var(--fg); color: var(--bg); }
.summe b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.summe small { font-size: 12px; opacity: .7; }

/* menü */
.menue { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 20; display: flex; align-items: flex-end; }
.menue[hidden] { display: none; }
.menue-karte { width: 100%; max-width: 680px; margin: 0 auto; background: var(--bg); border-top: 2px solid var(--linie); padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
.menue-wer { color: var(--grau); font-size: 13px; margin: 6px 0; }
.menue-zeile { display: block; width: 100%; text-align: left; padding: 14px 0; border: 0; border-top: 1px solid var(--fein); background: none; color: var(--fg); text-decoration: none; font-size: 16px; }
.menue-zu { color: var(--grau); }

.leer { color: var(--grau); text-align: center; padding: 40px 0; }
.hinweis-fuss { color: var(--grau); font-size: 12px; text-align: center; margin-top: 28px; }

.besucht-knopf { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 24px 0 0; padding: 14px; border: 0; background: var(--feld); color: var(--fg); font-size: 16px; font-weight: 700; }
.besucht-knopf:active { background: var(--feld-an); }
.besucht-knopf.an { background: var(--fg); color: var(--bg); }

/* notiz: unten fix */
body.mit-notiz main { padding-bottom: 140px; }
.notizleiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: var(--bg); border-top: 2px solid var(--linie);
  padding: 0 0 calc(6px + env(safe-area-inset-bottom));
}
.notizleiste textarea {
  display: block; width: 100%; margin: 0; padding: 12px 16px 8px;
  border: 0; outline: 0; background: var(--bg); font-size: 15px; line-height: 1.35; resize: none; overflow-y: auto;
}
.fremde-notiz { margin: 12px 0 0; padding: 9px 10px; background: var(--feld); font-size: 15px; white-space: pre-wrap; }

/* aufbruch: durchgehende zeile oben in der notizleiste */
.aufbruch {
  padding: 6px 16px; background: var(--fg); color: var(--bg);
  font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aufbruch:empty { display: none; }
.aufbruch.knapp { font-weight: 700; }
.aufbruch.drueber { background: var(--schlecht); color: #fff; font-weight: 700; }

/* ios: formularfelder ohne systemstil, notizleiste immer deckend */
input, textarea, button { -webkit-appearance: none; appearance: none; }
.notizleiste { background-color: var(--bg); isolation: isolate; transform: translateZ(0); }
.notizleiste textarea, .notizleiste textarea:focus { background-color: var(--bg); }

/* ---------- fotos ---------- */
.notiz-zeile { display: flex; align-items: flex-end; }
.notizleiste .notiz-zeile textarea { flex: 1; width: auto; min-width: 0; }
.kamera { flex: none; position: relative; width: 58px; height: 46px; display: grid; place-items: center; border: 0; background: var(--bg); color: var(--fg); padding: 0; }
.kamera svg { width: 26px; height: 26px; }
.kamera:active { background: var(--feld); }
.kamera-zahl { position: absolute; top: 3px; right: 8px; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kamera-zahl:empty { display: none; }
.foto-kat, .kat-chips { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.foto-kat::-webkit-scrollbar, .kat-chips::-webkit-scrollbar { display: none; }
.foto-kat { border-bottom: 1px solid var(--fein); }
.foto-kat[hidden] { display: none; }
.foto-kat > span { flex: none; padding: 9px 6px 9px 16px; font-size: 12px; font-weight: 700; }
.foto-kat button, .kat-chips button { flex: none; padding: 9px 9px; border: 0; background: none; color: inherit; font-size: 12px; white-space: nowrap; }
.foto-kat button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.fotos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-bottom: 8px; }
.fotos button { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--feld); overflow: hidden; }
.fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fotos small { position: absolute; left: 0; bottom: 0; max-width: 100%; padding: 1px 4px; background: var(--fg); color: var(--bg); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fotos .wartet img { opacity: .45; }
.fotos .mediathek { color: var(--fg); font-size: 11px; line-height: 1.25; }
.kat-fotos { display: flex; gap: 3px; padding: 0 0 8px; overflow-x: auto; scrollbar-width: none; }
.kat-fotos button { flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: var(--feld); }
.kat-fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.leuchte-offen { overflow: hidden; }
.leuchte { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #000; color: #fff; }
.leuchte-kopf { display: flex; align-items: center; justify-content: space-between; padding: calc(6px + env(safe-area-inset-top)) 8px 6px 16px; font-size: 13px; border-bottom: 1px solid #333; }
.leuchte-kopf button { border: 0; background: none; color: #fff; font-size: 30px; line-height: 1; padding: 4px 10px; }
.leuchte-bild { flex: 1; min-height: 0; position: relative; }
.leuchte-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.leuchte-fuss { border-top: 1px solid #333; padding: 0 0 calc(8px + env(safe-area-inset-bottom)); }
.leuchte .kat-chips button { color: #fff; }
.leuchte .kat-chips button:first-child { padding-left: 16px; }
.leuchte .kat-chips button[aria-pressed="true"] { background: #fff; color: #000; }
.leuchte .weg { display: block; width: 100%; margin: 0; padding: 12px 16px; border: 0; border-top: 1px solid #333; background: none; color: #fff; text-align: left; font-size: 13px; }
.leuchte .weg.sicher { background: var(--schlecht); font-weight: 700; }

/* bilder aus dem inserat, vor den eigenen fotos */
.fotos .plan { background: #fff; }
.fotos .plan img { object-fit: contain; padding: 3px; }
.leuchte-bild.plan { background: #fff; }
.leuchte-bild.zoom { overflow: auto; -webkit-overflow-scrolling: touch; }
.leuchte-bild.zoom img { position: static; width: 250%; height: auto; max-width: none; object-fit: initial; }