:root {
  /* hell: Seite, Karten, Felder */
  --schwarz: #e9ecf1;
  --flaeche: #ffffff;
  --flaeche-2: #f3f5f8;
  --rand: #d9dee8;
  --orange: #f28c1b;
  --orange-dunkel: #c96f0c;
  --orange-text: #b45309; /* Orange als Schrift auf Weiß (lesbarer Kontrast) */
  --text: #0f172a;
  --text-2: #475569;
  --rand-feld: #8592a6; /* Rand von Eingabefeldern: auch in der Sonne sichtbar */
  --rot: #dc2626;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--schwarz); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: var(--orange); }
h1 { font-size: 24px; margin: 4px 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 18px; margin: 0 0 12px; color: var(--orange); }

.kopf { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 16px; background: #000; border-bottom: 3px solid var(--orange); }
.logo { width: 48px; height: 48px; border-radius: 50%; background: #fff; object-fit: contain; }
.kopf-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.kopf-text strong { color: var(--orange); }
.kopf-text span { color: var(--text-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf nav { display: flex; gap: 4px; order: 3; width: 100%; overflow-x: auto; }
.kopf nav a { padding: 6px 12px; border-radius: 8px; color: var(--text); text-decoration: none; white-space: nowrap; }
.kopf nav a.aktiv { background: var(--orange); color: #000; font-weight: 700; }
@media (min-width: 700px) { .kopf nav { order: 0; width: auto; } }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px 80px; }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.karte.schmal { max-width: 380px; margin: 32px auto; text-align: center; }
.karte.warnung { border-color: var(--rot); }
.karte.warnung h2 { color: var(--rot); }
.leiste { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hinweis { color: var(--text-2); }
.zurueck { display: inline-block; margin-bottom: 8px; text-decoration: none; }

.feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; color: var(--text-2); font-size: 14px; text-align: left; }
input, select, textarea { font: inherit; color: var(--text); background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
input.pin { font-size: 28px; letter-spacing: .3em; text-align: center; margin: 12px 0; }
.zeitraum { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--orange); color: #000; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.knopf:hover { background: var(--orange-dunkel); }
.knopf:disabled { opacity: .5; cursor: wait; }
.knopf.zweit { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.knopf.plus { width: 56px; height: 56px; padding: 0; border-radius: 50%; font-size: 32px; line-height: 1; }
.knopf-klein { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche-2); color: var(--text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.knopf-klein.gefahr { color: var(--rot); border-color: var(--rot); }

/* Schieberegler */
.schalter { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--rand); }
.schalter:last-child { border-bottom: 0; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.schalter .regler { flex: none; position: relative; width: 60px; height: 34px; border-radius: 17px; background: #555; transition: background .15s; }
.schalter .regler::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .15s; }
.schalter input:checked + .regler { background: var(--orange); }
.schalter input:checked + .regler::after { transform: translateX(26px); }
.schalter input:focus-visible + .regler { outline: 2px solid var(--text); outline-offset: 2px; }
.schalter .beschriftung { display: flex; flex-direction: column; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.schalter small { font-weight: 400; color: var(--text-2); }
.schalter.aus { opacity: .5; cursor: not-allowed; }
.schalter.gross { border-bottom: 0; }
.schalter.gross .regler { width: 84px; height: 46px; border-radius: 23px; }
.schalter.gross .regler::after { width: 40px; height: 40px; }
.schalter.gross input:checked + .regler::after { transform: translateX(38px); }
.schalter.gross .beschriftung { font-size: 22px; }
.schalter.warnung small { color: var(--rot); font-weight: 700; }
.maschine { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--rand); }
.maschine:last-child { border-bottom: 0; }
.maschine .schalter { flex: 1; border-bottom: 0; }
.maschine select { width: auto; max-width: 45%; }

.marke { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--flaeche-2); color: var(--text-2); font-size: 12px; font-weight: 700; }
.marke.an { background: var(--orange); color: #000; }

.baustellen { list-style: none; padding: 0; margin: 0 0 16px; }
.baustellen a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 14px 16px; margin-bottom: 8px; background: var(--flaeche); border: 1px solid var(--rand); border-left: 4px solid var(--orange); border-radius: 12px; color: var(--text); text-decoration: none; }
.baustellen strong { flex: 1 1 100%; font-size: 18px; overflow-wrap: anywhere; }
.baustellen small { color: var(--text-2); }

.eintraege { list-style: none; margin: 0 0 12px; padding: 0; }
.eintraege li { padding: 10px 0; border-bottom: 1px solid var(--rand); }
.eintraege li.laeuft { border-left: 4px solid var(--orange); padding-left: 10px; }
.eintraege li.warnung { border-left: 4px solid var(--rot); padding-left: 10px; }
.marke.warn { background: var(--rot); color: #000; }
.eintraege .zeile1 { display: flex; gap: 8px; align-items: baseline; }
.eintraege .dauer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.eintraege .zeile2 { color: var(--text-2); font-size: 14px; }
.notiz { font-size: 14px; font-style: italic; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.aktionen { display: flex; gap: 8px; margin-top: 6px; }

.stamm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--rand); }
.stamm input:not([type=checkbox]) { flex: 1 1 160px; width: auto; }
.stamm select { flex: 0 1 140px; width: auto; }
.stamm.inaktiv { opacity: .6; }
.stamm small { flex-basis: 100%; color: var(--text-2); }
.mini { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; }
.mini input { width: 20px; height: 20px; min-height: 20px; accent-color: var(--orange); }

.netz { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px; background: var(--rot); color: #000; font-weight: 700; text-align: center; }
.meldung { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 30; width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--rot); color: #000; font-weight: 600; box-shadow: 0 4px 16px #0008; }
.meldung.ok { background: #46c06a; }
.dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 16px; border: 1px solid var(--rand); border-radius: 14px; background: var(--flaeche); color: var(--text); }
.dialog::backdrop { background: #000a; }

.bericht table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.bericht caption { text-align: left; font-weight: 700; padding: 6px 0; color: var(--orange); }
.bericht th, .bericht td { padding: 6px 8px; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: top; overflow-wrap: break-word; }
.bericht .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bericht tfoot th { border-top: 2px solid var(--orange); }
.bericht { overflow-x: auto; }
.bericht small.offen { display: block; color: var(--text-2); }
.bericht td:first-child, .bericht th:first-child { overflow-wrap: break-word; }
@media (max-width: 480px) {
  .bericht th, .bericht td { padding: 6px 4px; }
  /* schmale Handys: lange Werte (z. B. „2 Fuhren · 14 m³“) umbrechen statt seitlich wischen – Zahl und Einheit bleiben zusammen */
  .bericht .zahl { white-space: normal; }
}
.bericht-kopf { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.bericht-kopf h1 { margin: 0; }
.bericht-kopf p { margin: 2px 0; color: var(--text-2); }
.bericht-logo { width: 80px; height: 80px; flex: none; background: #fff; border-radius: 50%; }

/* Paket 1: Kacheln, große Knöpfe, Statusfeld, Rückgängig */
.status { text-align: center; }
.gross-zeit { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gross-zeit.aus { color: var(--text-2); font-weight: 600; font-size: 22px; }
.status .hinweis { margin: 4px 0 0; }
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.kachel { min-height: 64px; padding: 8px 12px; border: 2px solid var(--rand); border-radius: 12px; background: var(--flaeche-2); color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.kachel.gewaehlt { border-color: var(--orange); background: var(--orange); color: #000; }
.knoepfe { display: grid; gap: 10px; margin-bottom: 16px; }
.knopf.gross { min-height: 64px; font-size: 22px; width: 100%; }
.knopf.gefahr { background: var(--rot); color: #000; }
.knopf.gefahr:hover { background: #d94a4a; }
.leiste-unten { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 25; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--text); color: #000; font-weight: 600; box-shadow: 0 4px 16px #0008; }
.leiste-unten .knopf-klein { background: var(--orange); color: #000; border: 0; font-weight: 700; }
@keyframes blinken { from { box-shadow: 0 0 0 4px var(--orange); background-color: #3a2a14; } to { box-shadow: 0 0 0 0 transparent; } }
.blinkt { animation: blinken .4s ease-out; border-radius: 12px; }
.schaltzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; border-bottom: 1px solid var(--rand); }
.schaltzeile > .knopf-klein { margin: 0 0 10px; }
.schaltzeile > .knopf-klein:first-of-type { margin-left: 74px; }
.schaltzeile:last-child { border-bottom: 0; }
.schaltzeile .schalter { flex: 1 1 100%; border-bottom: 0; }
.woche { width: 100%; border-collapse: collapse; }
.woche td, .woche th { padding: 6px 4px; border-bottom: 1px solid var(--rand); text-align: left; }
.woche .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.woche tr.heute td { color: var(--orange); font-weight: 700; }
.woche tfoot th { border-top: 2px solid var(--orange); border-bottom: 0; }

.knopf.nachtragen { width: 100%; margin-bottom: 16px; }
.dialog .mini { margin-bottom: 12px; }

.kopf-zeile { display: flex; align-items: center; gap: 6px; min-width: 0; }
.kopf-text .verbindung { flex: none; font-size: 11px; color: inherit; }
.verbindung { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.kopf-text .verbindung.an, .verbindung.an { background: #1f3a26; color: #6fdc8c; }
.kopf-text .verbindung.aus, .verbindung.aus { background: var(--rot); color: #000; }

.reiter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.reiter-knopf { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.reiter-knopf.aktiv { background: var(--orange); border-color: var(--orange); color: #000; }
.stamm input.diesel { flex: 0 0 64px; width: 64px; text-align: right; }

.kunde-zeile { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.kunde-zeile.inaktiv { opacity: .6; }
.kunde-zeile .leiste { margin: 0; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kennzahl { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche); }
.kennzahl strong { font-size: 22px; color: var(--orange); font-variant-numeric: tabular-nums; }
.kennzahl small { color: var(--text-2); }
.material { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.material th, .material td { padding: 6px 4px; border-bottom: 1px solid var(--rand); text-align: left; }
.material .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mit-einheit { display: inline-flex; align-items: center; gap: 4px; }
.dialog .mit-einheit { display: flex; gap: 8px; }
.dialog .mit-einheit input { flex: 1 1 auto; min-width: 0; }
input.menge, .stamm input.menge { flex: 0 0 80px; width: 80px; min-height: 36px; padding: 4px 6px; text-align: right; }
.warn-text { color: var(--rot); font-weight: 700; }
h3 { font-size: 16px; margin: 16px 0 8px; }

.wagen { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rand); }
.wagen > div { display: flex; flex-direction: column; min-width: 0; }
.wagen small { color: var(--text-2); }
.wagen .knopf.gross { width: auto; flex: 0 0 auto; min-width: 140px; }
.art-zeile { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }
.kubik-tag { margin-top: 8px; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 8px 0 12px; }
.galerie .foto { padding: 0; border: 0; background: var(--flaeche-2); aspect-ratio: 1; overflow: hidden; border-radius: 8px; cursor: pointer; }
.galerie img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-gross { display: block; max-width: 100%; max-height: 65vh; margin: 0 auto 8px; border-radius: 8px; }
.kopf-text .verbindung.warten, .verbindung.warten { background: #4a3a10; color: #ffd36a; }
.warnkarte { border-color: var(--rot); }
.fuhre-knopf { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; min-height: 52px; padding: 4px 10px; border: 0; border-radius: 12px; background: var(--orange); color: #000; font: inherit; font-weight: 800; font-size: 20px; line-height: 1.1; cursor: pointer; }
.fuhre-knopf small { font-size: 11px; font-weight: 600; }
.fuhre-knopf:disabled { opacity: .4; }
.rechte { flex-basis: 100%; }
.rechte summary { cursor: pointer; color: var(--text-2); font-size: 14px; padding: 4px 0; }
.rechte .mini { display: flex; margin: 4px 0; }
.tag-wahl { display: flex; align-items: center; gap: 6px; }
.tag-wahl input { width: auto; min-height: 36px; padding: 4px 8px; }
.tageskarte .leiste h2 { margin: 0; }
.zeitraeume .reiter-knopf { min-height: 34px; font-size: 14px; }
.auslastung { padding: 0; margin-bottom: 10px; }
.auslastung summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.auslastung summary::-webkit-details-marker { display: none; }
.auslastung-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.auslastung-name small { color: var(--text-2); }
.auslastung-zahl { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.auslastung > .bericht { padding: 0 16px 8px; }

/* ---------- „Hell & klar“ – moderner Feinschliff nach Vorbild BeerenStark, in Merkner-Farben ----------
   Viel Weiß, weiche Schatten, runde Karten, Milchglas-Kopf; Orange als leuchtender Verlauf, Schwarz für Schrift.
   Hell ist auf der Baustelle in praller Sonne besser lesbar als dunkel. */
:root {
  --grad: linear-gradient(135deg, #ffa53a, #f27a0d);
  --glow: 0 6px 18px -4px rgba(242, 122, 13, .5);
  --ring: 0 0 0 4px rgba(242, 140, 27, .2);
  --schatten: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --schatten-klein: 0 1px 2px rgba(15, 23, 42, .07), 0 2px 6px rgba(15, 23, 42, .06);
  --rund: 18px;
}
body {
  font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "SF Pro Display", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(242, 140, 27, .10), transparent 70%),
    radial-gradient(900px 520px at 100% 0%, rgba(15, 23, 42, .05), transparent 70%),
    var(--schwarz);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-text); }
h1 { font-weight: 650; letter-spacing: -.02em; }
h2 { color: var(--text); font-weight: 650; letter-spacing: -.01em; }
h2::before { content: ""; display: inline-block; width: 6px; height: 18px; margin-right: 8px; vertical-align: -2px; border-radius: 3px; background: var(--grad); }
.leiste h2::before, .dialog h2::before { display: none; }
::selection { background: rgba(242, 140, 27, .25); }

/* Kopf: Milchglas, oben fest */
.kopf {
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 4px 16px -8px rgba(15, 23, 42, .15);
}
.logo { box-shadow: 0 3px 10px rgba(15, 23, 42, .18); }
.kopf-text strong { color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.kopf nav a { color: #334155; border-radius: 999px; padding: 7px 14px; font-weight: 500; transition: background .18s, color .18s, box-shadow .18s; }
.kopf nav a:hover { background: rgba(15, 23, 42, .05); }
.kopf nav a.aktiv { background: var(--grad); color: #111; font-weight: 700; box-shadow: var(--glow); }
@media (max-width: 699px) {
  /* Handy: alle Punkte sichtbar, notfalls in zwei Zeilen – kein Wischen nötig */
  .kopf nav { flex-wrap: wrap; overflow-x: visible; gap: 4px 2px; }
  .kopf nav a { padding: 6px 10px; font-size: .95rem; }
}

/* Karten und Listen */
.karte { background: var(--flaeche); border: 1px solid rgba(15, 23, 42, .06); border-radius: var(--rund); box-shadow: var(--schatten-klein); }
.karte.warnung, .warnkarte { border-color: #fecaca; background: #fff7f7; }
.baustellen a { background: var(--flaeche); border: 1px solid rgba(15, 23, 42, .06); border-left: 4px solid var(--orange); border-radius: 14px; box-shadow: var(--schatten-klein); transition: box-shadow .18s, transform .18s; }
.baustellen a:hover { box-shadow: var(--schatten); transform: translateY(-1px); }
.kennzahl { background: var(--flaeche); border: 1px solid rgba(15, 23, 42, .06); border-radius: 14px; box-shadow: var(--schatten-klein); }
.kennzahl strong { color: var(--text); }
.bericht caption { color: var(--orange-text); }
.bericht tfoot th, .woche tfoot th { border-top-color: var(--orange); }
.woche tr.heute td { color: var(--orange-text); }

/* Felder */
input, select, textarea { background: #fff; border: 1.5px solid var(--rand-feld); transition: border-color .18s, box-shadow .18s; }
input:hover, select:hover, textarea:hover { border-color: #64748b; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange-text); outline-offset: 1px; border-color: var(--orange-dunkel); box-shadow: 0 0 0 4px rgba(242, 140, 27, .35); }

/* Knöpfe: Orange-Verlauf mit Leuchten, schwarze Schrift (gut lesbar) */
.knopf { background: var(--grad); color: #111; box-shadow: 0 1px 2px rgba(242, 122, 13, .3), 0 4px 12px -4px rgba(242, 122, 13, .45); transition: filter .18s, box-shadow .18s, transform .18s; }
.knopf:hover { background: var(--grad); filter: saturate(1.08) brightness(1.03); box-shadow: 0 8px 22px -6px rgba(242, 122, 13, .6); }
.knopf:active { transform: translateY(1px); }
.knopf.zweit { background: #fff; color: var(--text); border: 1.5px solid var(--rand); box-shadow: var(--schatten-klein); }
.knopf.zweit:hover { border-color: var(--orange); filter: none; }
.knopf.gefahr { background: #dc2626; color: #fff; box-shadow: 0 4px 12px -4px rgba(220, 38, 38, .5); }
.knopf.gefahr:hover { background: #b91c1c; }
.knopf-klein { background: #fff; border: 1.5px solid var(--rand); box-shadow: var(--schatten-klein); transition: border-color .18s, box-shadow .18s; }
.knopf-klein:hover { border-color: #c3cad8; }
.knopf-klein.gefahr { color: #dc2626; border-color: #fecaca; background: #fef2f2; box-shadow: none; }
.fuhre-knopf { background: var(--grad); color: #111; box-shadow: var(--glow); }
.reiter-knopf { background: #fff; border: 1.5px solid var(--rand); border-radius: 999px; box-shadow: var(--schatten-klein); }
.reiter-knopf.aktiv { background: var(--grad); border-color: transparent; color: #111; box-shadow: var(--glow); }

/* Schalter und Kacheln */
.schalter .regler { background: #cbd5e1; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .15); }
.schalter .regler::after { box-shadow: 0 1px 3px rgba(15, 23, 42, .3); }
.schalter input:checked + .regler { background: var(--grad); box-shadow: var(--glow); }
.kachel { background: #fff; border: 1.5px solid var(--rand); box-shadow: var(--schatten-klein); transition: border-color .18s, box-shadow .18s; }
.kachel.gewaehlt { background: var(--grad); border-color: transparent; color: #111; box-shadow: var(--glow); }
.marke.an { background: var(--grad); color: #111; }
.marke.warn { background: #fee2e2; color: #b91c1c; }
@keyframes blinken { from { box-shadow: 0 0 0 4px var(--orange); background-color: #fff3e0; } to { box-shadow: 0 0 0 0 transparent; } }

/* Meldungen, Dialoge, Leisten */
.meldung { background: #dc2626; color: #fff; border-radius: 14px; box-shadow: var(--schatten); }
.meldung.ok { background: #047857; color: #fff; }
.knopf-klein:disabled { opacity: .4; cursor: default; }
.auslastung summary::after { content: "›"; flex: none; font-size: 22px; color: var(--text-2); transition: transform .18s; }
.auslastung[open] summary::after { transform: rotate(90deg); }
.auslastung summary:focus-visible { outline: 2px solid var(--orange-text); outline-offset: -2px; border-radius: var(--rund); }
.marke-name { font-size: 18px; letter-spacing: -.02em; }
.marke-name span, .kopf-text .marke-name span { font-size: inherit; overflow: visible; white-space: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.netz { background: #dc2626; color: #fff; }
.leiste-unten { background: #0f172a; color: #fff; border-radius: 14px; box-shadow: var(--schatten); }
.leiste-unten .knopf-klein { background: var(--grad); color: #111; border: 0; }
.dialog { border: 0; border-radius: 20px; box-shadow: 0 24px 64px rgba(15, 23, 42, .25); }
.dialog::backdrop { background: rgba(15, 23, 42, .35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.verbindung.an, .kopf-text .verbindung.an { background: #ecfdf5; color: #047857; }
.verbindung.aus, .kopf-text .verbindung.aus { background: #fef2f2; color: #dc2626; }
.verbindung.warten, .kopf-text .verbindung.warten { background: #fffbeb; color: #b45309; }
.galerie .foto { box-shadow: var(--schatten-klein); border-radius: 12px; }
.dialog.frage { position: fixed; inset: auto 12px 84px; margin: 0 auto; z-index: 26; box-shadow: 0 16px 48px rgba(15, 23, 42, .3); }
@media print {
  :root { --text: #000; --text-2: #333; --rand: #999; --orange: #000; --orange-text: #000; --flaeche: #fff; }
  .karte { box-shadow: none; }
  h2::before { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .kopf, .nicht-drucken, .netz, .meldung { display: none !important; }
  main { max-width: none; padding: 0; }
  .karte { border: 0; padding: 0; background: none; }
  .bericht table { break-inside: avoid; }
}

/* Bedienung: Hinweiskarten, Suche, Monat blättern */
.hinweiskarte { border-color: #fed7aa; background: #fff8f0; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; }
.knopfreihe .knopf { flex: 1 1 140px; }
.suche { margin-bottom: 10px; }
.monatswahl .tag-wahl select { flex: 1; min-width: 0; }
.monatswahl .tag-wahl .knopf-klein { justify-content: center; min-width: 44px; font-size: 22px; line-height: 1; }

/* Touch-Geräte: größere Treffflächen – auch mit Handschuhen */
@media (pointer: coarse) {
  .knopf { min-height: 52px; }
  .knopf.gross { min-height: 72px; font-size: 24px; }
  .knopf-klein { min-height: 44px; padding: 0 14px; }
  .kachel { min-height: 72px; }
  .schalter { min-height: 60px; }
  .schalter .regler { width: 68px; height: 38px; border-radius: 19px; }
  .schalter .regler::after { width: 32px; height: 32px; }
  .schalter input:checked + .regler::after { transform: translateX(30px); }
  .schaltzeile > .knopf-klein:first-of-type { margin-left: 82px; }
}
.feld.haken { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
.feld.haken input { width: 22px; height: 22px; min-height: 0; flex: none; padding: 0; }
.baustelle-loeschen { margin-top: 16px; }

/* Abrechnungsstand in der Baustellenliste */
.marke.offen-abr { background: #fff1e0; color: #9a4a00; }
.marke.abgerechnet { background: #dcfce7; color: #166534; }
.baustellen small.stand { flex: 1 1 100%; color: #9a4a00; }
.abgerechnet-bereich { margin-bottom: 16px; }
.abgerechnet-bereich > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 4px; cursor: pointer; list-style: none; font-weight: 700; color: #166534; }
.abgerechnet-bereich > summary::-webkit-details-marker { display: none; }
.abgerechnet-bereich > summary::after { content: "›"; font-size: 24px; line-height: 1; transition: transform .18s; }
.abgerechnet-bereich[open] > summary::after { transform: rotate(90deg); }
.abgerechnet-bereich .baustellen a { border-left-color: #22c55e; }
.karte.abschliessen .knopf { width: 100%; }

/* Datenschutz */
.datenschutz h3, .ds-vorschau h3 { margin: 14px 0 4px; font-size: 16px; }
.datenschutz p, .ds-vorschau p { margin: 0 0 6px; line-height: 1.5; }
.datenschutz .knopf.gross { margin-top: 16px; }
.ds-vorschau > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.anmelde-fuss { text-align: center; margin-top: 8px; }
.link-knopf { background: none; border: 0; padding: 8px; color: var(--text-2); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
#inhalt > .karte.schmal + .hinweiskarte { max-width: 380px; margin-left: auto; margin-right: auto; }
.feld-titel { margin: 0 0 6px; color: var(--text-2); font-size: 14px; }
