/* Selbst gehostet statt von fonts.googleapis.com: funktioniert offline und
   verrät Google keine Seitenaufrufe. Barlow Condensed und IBM Plex stehen
   unter der SIL Open Font License 1.1, siehe app/static/fonts/LICENSE. */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/BarlowCondensed-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/BarlowCondensed-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/BarlowCondensed-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/BarlowCondensed-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/IBMPlexMono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/IBMPlexMono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/IBMPlexMono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/IBMPlexMono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/IBMPlexSans-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/IBMPlexSans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/IBMPlexSans-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/IBMPlexSans-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/IBMPlexSans-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/IBMPlexSans-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Die Oberfläche ist durchgehend hell gestaltet. Ohne diese Angabe rendert der
     Browser im Dunkelmodus des Systems seine eigenen Bedienelemente dunkel – die
     Vorschlagsliste unter einem Eingabefeld bekam dann weiße Schrift auf Weiß. */
  color-scheme: light;
  --linen: #EFEBE3;
  --paper: #FAF8F4;
  --ink: #1B1814;
  --ink-2: #5A544B;
  --rule: #D8D2C6;
  --roast: #3F2415;
  --crema: #D9A441;
  --bean: #5E7A3F;
  --alarm: #B6412C;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--linen); color: var(--ink); font: 15px/1.45 var(--body); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0; text-transform: uppercase; }
h1 { font-size: 34px; line-height: 1; }
h2 { font-size: 20px; color: var(--roast); margin-bottom: 10px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Shell */
/* Höhe wächst mit: Passt die Navigation nicht in eine Zeile, bricht sie um,
   statt die ganze Seite seitlich aufzuschieben. */
.top { background: var(--roast); color: var(--paper); display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px 24px; padding: 6px 28px; min-height: 56px; position: sticky; top: 0; z-index: 5; }
.brand { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: baseline; gap: 10px; }
.brand small { font-weight: 500; font-size: 13px; color: var(--crema); letter-spacing: .12em; }
.brand img { height: 44px; width: auto; display: block; }
/* Mit Logo statt Schriftzug mittig ausrichten – baseline stammt aus der Textzeit. */
.brand { align-items: center; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: 4px; font-weight: 500; color: #E8DFD2; }
.nav a.on, .nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
/* Zurück steht über dem Seitentitel statt in der Navigation: Dort war es der
   dreizehnte Punkt und drückte die Kopfzeile in eine zweite Zeile. */
a.zurueck { display: inline-block; margin-bottom: 10px; color: var(--ink-2);
  text-decoration: none; font-size: 13px; font-weight: 500; }
a.zurueck:hover { color: var(--ink); }
main { max-width: 1180px; margin: 0 auto; padding: 28px 28px 64px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.head p { margin: 4px 0 0; color: var(--ink-2); }

/* Cards, grid */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  .top { gap: 10px; padding: 0 14px; }
  .brand { font-size: 17px; flex-shrink: 0; }
  .nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 6px 9px; }
}

/* Buchen-Knopf bleibt beim Scrollen durch die Zählliste erreichbar */
.aktionsleiste { position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px;
  background: var(--linen); padding: 12px 0; margin-top: 8px;
  border-top: 1px solid var(--rule); }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 18px 20px; }
.card.warn { border-color: var(--alarm); }
.card.flat { background: transparent; border-style: dashed; color: var(--ink-2); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding: 6px 10px 8px; border-bottom: 2px solid var(--rule); }
td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tr.low td { background: #FBF1EE; }
/* Gruppenüberschrift in Listen: klar als Zwischentitel lesbar, nicht als Datenzeile.
   Eigener Hintergrund, damit eingefärbte Zeilen (rot bei Minusbestand) nicht anstoßen. */
tr.gruppe td { background: var(--linen); border-bottom: 1px solid var(--rule);
  border-top: 2px solid var(--rule); padding: 10px; font-family: var(--display);
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--roast); }
tr.gruppe:first-child td { border-top: 0; }
tr.muted td { color: var(--ink-2); }
td a { text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }

/* Fill bar = Sack-Füllstand */
.fill { position: relative; height: 10px; background: var(--linen); border-radius: 2px; overflow: visible; min-width: 120px; }
.fill > i { display: block; height: 100%; background: var(--bean); border-radius: 2px; }
.fill.low > i { background: var(--alarm); }
.fill > b { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--ink); opacity: .6; }

/* Kennzahlen: der Zustand auf einen Blick, bevor irgendeine Liste beginnt */
.kennzahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kennzahl { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px;
  padding: 16px 18px; border-top: 3px solid var(--rule); }
.kennzahl.warnt { border-top-color: var(--alarm); }
.kennzahl .wert { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }
.kennzahl.warnt .wert { color: var(--alarm); }
.kennzahl .titel { font-weight: 600; font-size: 13px; margin-top: 6px; }
.kennzahl .note { font-size: 12px; margin-top: 1px; }
@media (max-width: 820px) { .kennzahlen { grid-template-columns: repeat(2, 1fr); } }

/* Ausschank auf der Übersicht: kompakt nebeneinander statt als große Kacheln */
.plaetze { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.platz { border-left: 4px solid var(--crema); padding: 2px 0 2px 12px; }
.platz .label { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em;
  font-size: 12px; color: var(--ink-2); }
.platz .bean { font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1.15; }
.platz .bean.empty { color: var(--alarm); font-weight: 500; }
td.dringend { color: var(--alarm); font-weight: 600; }

/* Ausschank tiles */
.slot { background: var(--paper); border: 1px solid var(--rule); border-left: 6px solid var(--crema); border-radius: 6px; padding: 16px 18px; }
.slot .label { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--ink-2); }
.slot .bean { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.05; margin: 2px 0 10px; }
.slot .bean.empty { color: var(--alarm); }

/* Forms */
/* Auch für <div class="row">, etwa Filterleisten außerhalb eines Formulars. */
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 4px; background: #fff; color: var(--ink); min-width: 0; }
input[type=number] { width: 110px; font-family: var(--mono); }
input[type=date] { width: 150px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--crema); outline-offset: 1px; }
button, .btn { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 4px; border: 1px solid var(--roast); background: var(--roast); color: #fff; cursor: pointer; text-decoration: none; }
button.ghost { background: transparent; color: var(--roast); }
button.sm { padding: 4px 9px; font-size: 13px; }
button.danger { border-color: var(--alarm); background: transparent; color: var(--alarm); }
label.chk { flex-direction: row; align-items: center; gap: 6px; }

/* Bits */
.tag { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 3px; background: var(--linen); color: var(--ink-2); }
.tag.open { background: #F7E7C3; color: #6A4A10; }
.tag.eingang, .tag.wareneingang { background: #E3EAD7; color: #36501E; }
.tag.verkauf { background: var(--linen); }
.tag.inventur, .tag.korrektur { background: #E7E1F2; color: #4A3A74; }
.kpi { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; }
.kpi small { font-size: 16px; color: var(--ink-2); font-family: var(--body); font-weight: 500; margin-left: 6px; text-transform: none; }
.note { font-size: 13px; color: var(--ink-2); }
/* Korrekturformulare stehen eingeklappt in der Zeile: Sie werden selten gebraucht,
   sollen aber dort sein, wo die Zeile steht – nicht auf einer eigenen Seite. */
/* Der Abmeldeknopf sitzt in der Navigation und soll wie ein Menüpunkt aussehen,
   nicht wie ein Formular. */
.nav .ich { margin-left: auto; opacity: .85; }
.nav .ich:hover { opacity: 1; }
.nav .abmelden { display: inline; margin-left: 10px; }
.nav .abmelden button { font: inherit; background: none; border: 0; padding: 0;
  color: var(--crema); cursor: pointer; opacity: .85; }
.nav .abmelden button:hover { opacity: 1; text-decoration: underline; }

/* Unauffälliger Textknopf in Tabellenzeilen – kein Button, aber gleich gross. */
.sm-link { font-size: 12px; padding: 4px 9px; border: 1px solid var(--rule);
  border-radius: 5px; color: var(--ink-2); text-decoration: none; display: inline-block; }
.sm-link:hover { background: var(--linen); color: var(--ink); }
details.aendern { display: inline-block; }
details.aendern > summary { list-style: none; cursor: pointer; display: inline-block;
  font-size: 12px; padding: 4px 9px; border: 1px solid var(--rule); border-radius: 5px;
  color: var(--ink-2); }
details.aendern > summary::-webkit-details-marker { display: none; }
details.aendern[open] > summary { background: var(--linen); color: var(--ink); }
details.aendern > form { text-align: left; white-space: normal; }
.msg { padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; border: 1px solid; }
.msg.ok { background: #E9F0DF; border-color: var(--bean); }
.msg.err { background: #FBF1EE; border-color: var(--alarm); }
.msg ul { margin: 6px 0 0 18px; }
/* Balkenverlauf mit Skala. Der Wert erscheint beim Überfahren sofort – das native
   title-Attribut braucht dafür rund eine Sekunde und wird leicht übersehen. */
.verlauf { display: flex; gap: 8px; }
.verlauf .achse { display: flex; flex-direction: column; justify-content: space-between;
  font-size: 11px; color: var(--ink-2); font-family: var(--mono); text-align: right;
  min-width: 42px; padding-bottom: 1px; }
.verlauf .flaeche { flex: 1; position: relative; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; position: relative; }
.spark i { flex: 1; background: var(--roast); opacity: .8; border-radius: 2px 2px 0 0;
  min-height: 2px; position: relative; }
.spark i:hover { opacity: 1; background: var(--crema); }
.spark i[data-info]:hover::after {
  content: attr(data-info); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); white-space: nowrap; z-index: 3;
  background: var(--roast); color: var(--paper); font-family: var(--body); font-size: 12px;
  padding: 4px 8px; border-radius: 4px; pointer-events: none;
}
/* In einer scrollbaren Tabelle würde ein nach rechts überstehender Tooltip am
   Containerrand abgeschnitten – dort öffnet er deshalb nach links. */
.spark.kompakt i[data-info]:hover::after { left: auto; right: 0; transform: none; }
/* Durchschnitt als gestrichelte Linie – ohne Bezugsgröße sagen Balken wenig aus. */
.spark .mittel { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--ink-2);
  opacity: .55; pointer-events: none; }
/* Wert direkt an der Linie – mit Papierhintergrund, damit er über den Balken lesbar bleibt */
.spark .mittel::after { content: attr(data-wert); position: absolute; left: 0; bottom: 2px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
  background: var(--paper); padding: 0 4px; border-radius: 2px; }
/* Liegt der Schnitt fast auf der Spitze, säße die Beschriftung über dem Diagramm
   und ragte in die Überschrift – dann nach unten klappen. */
.spark .mittel.tief::after { bottom: auto; top: 2px; }
.verlauf-x { display: flex; justify-content: space-between; font-size: 11px;
  color: var(--ink-2); font-family: var(--mono); margin-top: 4px; }
.filters a { margin-right: 12px; text-decoration: none; font-weight: 500; color: var(--ink-2); }
.filters a.on { color: var(--ink); border-bottom: 2px solid var(--crema); }
details summary { cursor: pointer; font-weight: 500; color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) { .fill > i { transition: width .4s ease; } }

/* Mobil-Overrides – bewusst am Dateiende: sie müssen NACH den Basisregeln stehen,
   sonst gewinnt bei gleicher Spezifität die spätere Basisregel (padding usw.). */
@media (max-width: 820px) {
  main { padding: 14px; }
  .card { padding: 14px; }
  td, th { padding: 8px 5px; }
  .mobil-weg { display: none; }
  /* Zählliste auf Handybreite: schmale Eingabe; 16px Schrift, sonst zoomt iOS
     beim Antippen in die Seite. Artikelname darf umbrechen. */
  input[name^="zaehlwert_"] { width: 72px !important; font-size: 16px; padding: 9px 6px; }
  td.diff { font-size: 12px; }
  table a { overflow-wrap: break-word; hyphens: auto; }
  /* Breite Tabellen wischen in ihrer Karte, statt die Seite zu sprengen. display:block
     macht die Tabelle scrollbar; die Inventur-Tabelle bleibt ausgenommen, sie ist
     bereits auf Handybreite gebaut. */
  .card > table, .card > div > table { display: block; overflow-x: auto; }
  form .card > table { display: table; }
  .kennzahl .wert { font-size: 32px; }
}

/* Gerendertes Handbuch unter /hilfe */
.handbuch h1 { margin-bottom: 6px; }
.handbuch h2 { margin: 26px 0 10px; padding-top: 14px; border-top: 1px solid var(--rule); }
.handbuch p, .handbuch li { max-width: 72ch; }
.handbuch ul { padding-left: 22px; margin: 8px 0; }
.handbuch li { margin: 4px 0; }
.handbuch table { margin: 10px 0; }
.handbuch hr { border: 0; border-top: 1px solid var(--rule); margin: 22px 0; }
.handbuch code { background: var(--linen); padding: 1px 5px; border-radius: 3px; font-family: var(--mono); font-size: 13px; }

/* Druck: Navigation und Bedienelemente weg, Inhalte aufs Papier.
   Eingabefelder der Zählliste werden zu Schreiblinien. */
.no-druck { }
@media print {
  .top, button, .btn, .no-druck, .suche, datalist, .verlauf-x { display: none !important; }
  body, html { background: #fff; }
  .card { border: none; padding: 0 0 12px; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  input[name^="zaehlwert_"] { border: none !important; border-bottom: 1px solid #555 !important;
    border-radius: 0; background: transparent; }
  .aktionsleiste { display: none !important; }
}
/* Burger-Menü: Am Handy wird die Linkleiste zum aufklappbaren Menü unter dem Header.
   Steht bewusst am Dateiende, damit es die Basis- und die ältere Mobilregel überstimmt. */
.burger { display: none; margin-left: auto; background: none; border: 0; color: var(--paper);
  font-size: 22px; line-height: 1; padding: 8px 10px; cursor: pointer; }
@media (max-width: 820px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 56px; left: 0; right: 0; z-index: 5;
    flex-direction: column; gap: 2px; margin-left: 0; padding: 6px 10px 14px;
    background: var(--roast); box-shadow: 0 10px 18px rgba(0,0,0,.28); overflow-x: visible; }
  body.menue-offen .nav { display: flex; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav a.zurueck { margin-left: 0; }
}

/* Statuskarten je Messpunkt: passen sich selbst an die Zahl der Messpunkte an –
   eine feste Spaltenzahl inline hätte die Handy-Regel von .kennzahlen überstimmt. */
.wasser-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px; margin-bottom: 20px; }

.fuss { text-align: center; color: var(--ink-2); font-size: 12px; letter-spacing: .04em;
  padding: 10px 0 26px; }

/* Fragezeichen-Hilfe: Formularhinweise stecken im Tooltip statt als Absatz unterm
   Formular. tabindex im Markup macht das Zeichen fokussierbar – am Handy öffnet
   Antippen den Hinweis, ohne Hover. */
.hilfe { position: relative; display: inline-block; width: 17px; height: 17px; line-height: 17px;
  text-align: center; border-radius: 50%; background: var(--rule); color: var(--ink-2);
  font-size: 12px; font-weight: 600; cursor: help; vertical-align: 2px;
  font-family: var(--body); text-transform: none; letter-spacing: 0; user-select: none; }
.hilfe:hover, .hilfe:focus, .hilfe.offen { background: var(--roast); color: var(--paper); outline: none; }
.hilfe:hover::after, .hilfe:focus::after, .hilfe.offen::after {
  content: attr(data-info); position: absolute; z-index: 6; top: calc(100% + 8px); left: -6px;
  width: max-content; max-width: min(320px, 82vw); white-space: normal; text-align: left;
  background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 400; line-height: 1.45;
  padding: 8px 11px; border-radius: 5px; box-shadow: 0 6px 14px rgba(0,0,0,.22); }
/* Wo rechts kein Platz mehr ist, öffnet der Kasten nach links – die Klasse
   setzt ein kleines Skript in base.html anhand der Position des Zeichens. */
.hilfe.rechts:hover::after, .hilfe.rechts:focus::after, .hilfe.rechts.offen::after { left: auto; right: -6px; }
/* In der unten klebenden Aktionsleiste öffnet der Hinweis nach oben. */
.aktionsleiste .hilfe:hover::after, .aktionsleiste .hilfe:focus::after, .aktionsleiste .hilfe.offen::after { top: auto; bottom: calc(100% + 8px); }

@media (max-width: 820px) {
  /* Am Handy als Leiste am unteren Rand statt am Fragezeichen verankert –
     rechts vom Anker liefe der Kasten sonst aus dem Bild. Die aktionsleiste-
     Selektoren stehen mit dabei, damit deren Desktop-Regel (öffnet nach oben)
     hier nicht per Spezifität gewinnt. */
  .hilfe:hover::after, .hilfe:focus::after, .hilfe.offen::after,
  .hilfe.rechts:hover::after, .hilfe.rechts:focus::after, .hilfe.rechts.offen::after,
  .aktionsleiste .hilfe:hover::after, .aktionsleiste .hilfe:focus::after, .aktionsleiste .hilfe.offen::after {
    position: fixed; top: auto; left: 14px; right: 14px; bottom: 14px;
    width: auto; max-width: none; font-size: 14px; padding: 11px 14px;
  }
}

/* Eigene Vorschlagsliste statt der browsereigenen: Deren Aussehen kommt vom
   Betriebssystem – im Dunkelmodus erschien weiße Schrift auf unserem hellen Grund.
   Diese hier gehorcht der Seite. */
.vorschlaege { position: absolute; top: 100%; left: 0; z-index: 7; min-width: 100%;
  margin-top: 3px; background: var(--paper); border: 1px solid var(--rule); border-radius: 5px;
  box-shadow: 0 8px 18px rgba(0,0,0,.16); max-height: 230px; overflow-y: auto; display: none; }
.vorschlaege.offen { display: block; }
.vorschlaege div { padding: 7px 12px; font-size: 14px; color: var(--ink);
  cursor: pointer; white-space: nowrap; }
.vorschlaege div.aktiv, .vorschlaege div:hover { background: var(--linen); }

/* Abhaken mit Personenauswahl: Der Erledigt-Knopf klappt eine kleine Liste auf. */
.abhaken { display: inline-block; position: relative; }
.abhaken > summary { list-style: none; cursor: pointer; display: inline-block; }
.abhaken > summary::-webkit-details-marker { display: none; }
.abhaken .wer { position: absolute; right: 0; top: calc(100% + 4px); z-index: 7;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 5px;
  box-shadow: 0 8px 18px rgba(0,0,0,.16); padding: 10px 12px; text-align: left; white-space: nowrap; }
.abhaken .wer button { margin-top: 2px; }
