/* Tageszettel – Gestaltung „Tasten“ (SPEC §10 r2).
   Regel: Was einen Rahmen hat, kann man drücken. Gruppen ohne Rahmen sind nur Text.
   Farben: Staude-Weiß (Grund), Abbund-Braun (Tinte, Hauptaktion), Zollstock-Gelb (nur Leiste), Bleistift-Rot (nur „fehlt“). */

@font-face {
  font-family: 'Atkinson Next';
  src: url(../schrift/atkinson-hyperlegible-next-latin-wght-normal.woff2) format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  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: 'Atkinson Next';
  src: url(../schrift/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2) format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  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;
}

:root {
  --grund: #FEFFFC;
  --tinte: #4C3526;
  --tinte-2: #6B584B;      /* Nebentext, 6,7:1 auf Grund */
  --gelb: #E5CB8B;
  --rot: #D95060;
  --perl: #E8EBEA;
  --linie: rgba(76, 53, 38, .22);
  --rand: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--tinte);
  font: 450 18px/1.4 'Atkinson Next', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.demo { font-size: 16px; color: var(--tinte-2); padding: 6px var(--rand); border-bottom: 1px solid var(--linie); text-align: center; }
/* V19.13 (Rundgang 24.10., P33): Rückweg zu OBHOLZ SOLUTIONS, leise wie in den anderen Demos. */
.demo a { display: inline-block; padding: 12px 0; margin: -12px 0; color: inherit; text-underline-offset: 0.18em; }   /* V19.14 (Owner 24.10., P43): Tippfläche 44 px, die Leiste bleibt so hoch wie sie ist */
.demo a:hover { color: var(--tinte); }
.sprung { position: absolute; left: 8px; top: -80px; display: flex; align-items: center; min-height: 56px; background: var(--tinte); color: var(--grund); padding: 0 20px; border-radius: 6px; z-index: 80; }
.sprung:focus { top: 8px; }

.rahmen { max-width: 560px; margin: 0 auto; padding: 0 var(--rand); }
main { outline: none; }
#seite { display: none; }

/* ---------- Tasten ---------- */
.taste {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 16px;
  font-weight: 700; line-height: 1.2; text-align: center;
  color: var(--tinte); background: var(--grund);
  border: 2px solid var(--tinte); border-radius: 7px;
  box-shadow: 0 3px 0 var(--tinte);           /* Tastenkante, kein weicher Schatten */
  margin-bottom: 3px;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease-out, box-shadow .08s ease-out, background-color .12s;
}
.taste:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--tinte); }
.taste[aria-pressed="true"] { background: var(--tinte); color: var(--grund); }
.taste:disabled { color: var(--tinte-2); border-style: dashed; border-color: var(--tinte-2); cursor: default; box-shadow: none; }
.taste.haupt { width: 100%; min-height: 64px; font-size: 22px; font-weight: 800; background: var(--tinte); color: var(--grund); }
.taste.breit { width: 100%; }
.taste.haupt.vorerst { background: var(--grund); color: var(--tinte); }
.taste.haupt .tz-klein { color: var(--grund); }
/* Tätigkeiten: leichtere Kante, bis sie gewählt sind */
.taste.leicht { border-color: var(--tinte-2); box-shadow: 0 3px 0 var(--tinte-2); font-weight: 600; }
.taste.leicht[aria-pressed="true"] { border-color: var(--tinte); box-shadow: 0 3px 0 var(--tinte); font-weight: 700; }
.taste.leicht:active:not(:disabled) { box-shadow: 0 0 0 var(--tinte-2); }
.taste.leise { border-width: 2px; box-shadow: none; margin-bottom: 0; font-weight: 600; }
.taste.quadrat { width: 56px; padding: 0; font-size: 30px; font-weight: 700; flex: none; }
.taste.klein { min-height: 56px; font-size: 17px; }
.taste.zweizeilig { flex-direction: column; gap: 2px; padding: 10px 16px; min-height: 76px; }
.tz-gross { font-size: 21px; font-weight: 800; }
.tz-klein { font-size: 16px; font-weight: 600; color: var(--tinte-2); overflow-wrap: anywhere; }

/* Feld-Taste: Beschriftung über Wert (Baustelle, Mit dabei) */
.taste.feld { width: 100%; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; padding: 10px 16px; min-height: 80px; }
.feld-name { font-size: 16px; font-weight: 600; color: var(--tinte-2); }
.feld-wert { font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.feld-wert .nr { font-weight: 800; }
.feld-wert.offen { color: var(--tinte-2); font-weight: 700; }

/* ---------- Kopf ---------- */
.kopf { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 12px; padding: 16px 0 12px; }
.ueber { font-size: 16px; font-weight: 700; color: var(--tinte-2); }
.datum { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -.015em; white-space: nowrap; }
.kopf-nav { display: flex; gap: 8px; }
.wer { justify-self: start; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 56px; padding: 0 2px; background: none; border: 0; text-align: left; cursor: pointer; }
.wer-name { font-size: 19px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.wer-hinweis { font-size: 16px; color: var(--tinte-2); }
.kopf > .taste:last-child { align-self: center; }

/* ---------- Blöcke ---------- */
.abschnitt, .gruppe { margin-top: 16px; }
.gruppe { border-top: 1px solid var(--linie); padding-top: 14px; }
.gruppe h2, .abschnitt-titel { font-size: 20px; font-weight: 800; }
.gruppe-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stunden { font-size: 18px; font-weight: 700; white-space: nowrap; }
.stunden b { font-size: 40px; font-weight: 800; letter-spacing: -.01em; }
.stunden .nacht { display: block; text-align: right; font-size: 16px; color: var(--tinte-2); font-weight: 600; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 3px solid var(--tinte); margin-bottom: 10px; }
#t-wie-gestern { margin-top: 4px; }
#t-plus-abschnitt { margin-top: 16px; }
#t-frei { margin-top: 16px; }

/* Fehlt: rote Kontur oder Marke, Text bleibt braun */
.fehlt-text { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin: 8px 0 0; }
.fehlt-text::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 3px; background: var(--rot); }
.taste.feld.fehlt { border-color: var(--rot); box-shadow: 0 3px 0 var(--rot); }
.gruppe.fehlt { border-top: 3px solid var(--rot); }
.notiz.fehlt textarea { border-color: var(--rot); }

/* Stellreihen: [−] Wert [+] */
.stell { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 8px; margin-top: 10px; }
.stell .taste.quadrat { width: 64px; min-height: 64px; font-size: 32px; }
.stell-mitte { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.stell-mitte label { font-size: 16px; font-weight: 600; color: var(--tinte-2); }
.wert {
  width: 100%; min-width: 0; height: 64px; padding: 0; text-align: center;
  font-size: 56px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  background: transparent; border: 0; border-bottom: 2px solid var(--tinte); border-radius: 0;
}
.wert::placeholder { color: var(--tinte-2); }
.mit-einheit { display: flex; align-items: baseline; justify-content: center; gap: 6px; min-width: 0; }
.mit-einheit .wert { width: 3.2ch; flex: none; font-size: 40px; height: 56px; }
.einheit { font-size: 20px; font-weight: 700; }
.stell.klein { grid-template-columns: 56px minmax(0, 1fr) 56px; margin-top: 4px; }
.stell.klein .taste.quadrat { width: 56px; min-height: 56px; font-size: 28px; }
.stell.klein .wert { font-size: 30px; height: 56px; width: 4.2ch; }
.stell.klein .mit-einheit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; width: 100%; }
.stell.klein .mit-einheit .wert { width: 100%; text-align: right; }
.stell.klein .einheit { text-align: left; overflow-wrap: anywhere; }

/* Tätigkeiten als Tasten */
.tasten-feld { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px 10px; margin-top: 12px; }
.tasten-feld .taste { padding: 0 10px; text-wrap: balance; }
.notiz { margin-top: 14px; }
.notiz label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
textarea {
  width: 100%; min-height: 96px; padding: 10px 12px; font-size: 18px; line-height: 1.4;
  background: var(--grund); border: 2px solid var(--tinte); border-radius: 7px; resize: vertical;
}

/* Material */
.mat-zeile { margin-top: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--linie); }
.mat-name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.mat-fuer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.mat-fuer-text { font-size: 16px; font-weight: 600; color: var(--tinte-2); }
.mat-fuer .taste { flex: 1 1 110px; min-height: 56px; font-size: 17px; }
.tasten-reihe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tasten-reihe .taste { flex: 1 1 200px; }
.material + .taste.feld, .gruppe + .taste.feld { margin-top: 16px; }

.gesichert { font-size: 16px; color: var(--tinte-2); margin-top: 20px; }

/* Hauptaktion fest unten in der Daumenzone */
.unten {
  position: sticky; bottom: 0; z-index: 5; margin-top: 16px;
  padding: 10px 0 max(12px, env(safe-area-inset-bottom));
  background: var(--grund); border-top: 1px solid var(--linie);
}
.unten-tag { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; margin-bottom: 10px; }
.unten-tag:empty, .unten.tag-oben .unten-tag { display: none; }
.ut-std { font-size: 17px; font-weight: 700; white-space: nowrap; }
.ut-std b { font-size: 28px; font-weight: 800; }
.ut-vor { display: block; font-size: 16px; font-weight: 600; color: var(--tinte-2); line-height: 1.1; }
.unten-tag .zs { margin: 0; }
.unten-tag .zs-klein .zs-bahn { height: 20px; }
.fehlt-liste { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.fehlt-liste::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 3px; background: var(--rot); }

/* ---------- Zollstock-Leiste ---------- */
.zs { position: relative; margin: 12px 0 2px; padding-bottom: 24px; }
.zs-bahn { position: relative; height: 34px; }
.zs-bahn::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--linie); }
.zs-stab { position: absolute; top: 0; bottom: 0; }
.zs-glied {
  position: absolute; top: 0; bottom: 0;
  background: var(--gelb); border: 2px solid var(--tinte); border-left-width: 0;
}
.zs-glied:first-child { border-left-width: 2px; border-radius: 4px 0 0 4px; }
.zs-glied.letztes { border-radius: 0 4px 4px 0; }
.zs-glied:first-child.letztes { border-radius: 4px; }
.zs-glied + .zs-glied::before {
  content: ''; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--tinte); z-index: 2;
}
.zs-pause { position: absolute; top: 2px; bottom: 2px; background: repeating-linear-gradient(135deg, rgba(76, 53, 38, .6) 0 2px, transparent 2px 7px); }
.zs-s { position: absolute; top: 2px; width: 2px; height: 6px; margin-left: -1px; background: var(--tinte); }
.zs-s.h { height: 12px; }
.zs-skala span { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 16px; font-weight: 600; color: var(--tinte-2); line-height: 1; }
.zs-klein { margin: 8px 0 0; padding-bottom: 0; }
.zs-klein .zs-bahn { height: 16px; }
.zs-klein .zs-glied { border-width: 1.5px; border-left-width: 0; }
.zs-klein .zs-glied:first-child { border-left-width: 1.5px; }
.zs-klein .zs-glied + .zs-glied::before { width: 5px; height: 5px; margin-top: -2.5px; left: -3.5px; }

/* Flug beim Abschließen (Kernmoment) */
.zs-flug { position: fixed; z-index: 60; pointer-events: none; transform-origin: 0 0; }
.zs-flug .zs-stab { left: 0 !important; width: 100% !important; perspective: 500px; }
.zs-flug .zs-glied { border-left-width: 2px; border-radius: 3px; }
.zs-flug.zs-klein .zs-glied { border-left-width: 1.5px; }

/* ---------- Woche als Zollstock (6 Glieder, Mo–Sa) ---------- */
.wstab { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 18px 0 6px; }
.wglied {
  position: relative; min-width: 0; min-height: 82px; padding: 12px 0 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--tinte); background: var(--grund);
  border: 2px solid var(--tinte); margin-left: -2px; border-radius: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wglied:first-child { margin-left: 0; border-radius: 6px 0 0 6px; }
.wglied:last-child { border-radius: 0 6px 6px 0; }
.wglied.fertig, .wglied.geschickt { background: var(--gelb); }
.wglied.frei { background: var(--perl); }
.wglied.wartet { background: var(--grund); }
.wglied:disabled { cursor: default; color: var(--tinte-2); }
.wglied.geschickt::before { content: ''; position: absolute; left: 9px; top: 6px; width: 6px; height: 11px; border: solid var(--tinte); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.wglied .niete { position: absolute; right: -6px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--tinte); z-index: 2; }
.wglied.offen::before, .wglied.fehlt::before { content: ''; position: absolute; left: 6px; right: 6px; top: 6px; height: 5px; border-radius: 2px; background: var(--rot); }
.wglied[aria-current="date"]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 4px; border-radius: 2px; background: var(--tinte); }
.gt-wt { font-size: 16px; font-weight: 700; }
.gt-std { font-size: 21px; font-weight: 800; line-height: 1.1; min-height: 1.1em; }
.gt-std.wort { font-size: 16px; line-height: 1.54; }
.wglied:focus-visible { z-index: 3; outline-offset: -7px; }

/* ---------- Abgeschlossen ---------- */
.fertig-kopf { margin-top: 2px; }
.fertig-um { font-size: 26px; font-weight: 800; line-height: 1.2; }
.beleg { font-size: 18px; margin-top: 6px; }
.hinweis { font-size: 16px; color: var(--tinte-2); margin-top: 8px; }
.zusammen { margin: 14px 0 0; }
.zusammen div { padding: 12px 0; border-top: 1px solid var(--linie); }
.zusammen dt { font-size: 16px; font-weight: 600; color: var(--tinte-2); }
.zusammen dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.zusammen dd b { font-size: 30px; font-weight: 800; }
.zusammen .notiztext { display: block; font-size: 17px; font-weight: 500; white-space: pre-line; margin-top: 4px; }
.versand { font-size: 17px; font-weight: 700; margin: 14px 0 12px; display: flex; gap: 8px; align-items: baseline; }
.versand.fertig::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 3px; background: var(--gelb); outline: 2px solid var(--tinte); outline-offset: -2px; transform: translateY(1px); }
.versand { flex-wrap: wrap; }
.versand span { font-weight: 500; flex-basis: 100%; padding-left: 22px; }

/* ---------- Woche ---------- */
.summe { font-size: 18px; margin-top: 4px; }
.summe b { font-size: 30px; font-weight: 800; }
.wliste { display: grid; gap: 12px; margin-top: 16px; }
.wzeile { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 10px 14px 12px; text-align: left; justify-content: stretch; }
.wzeile .zs { grid-column: 1 / -1; }
.wz-tag { font-size: 19px; font-weight: 800; }
.wz-std { font-size: 19px; font-weight: 800; }
.wz-status { grid-column: 1 / -1; font-size: 16px; font-weight: 600; color: var(--tinte-2); display: flex; align-items: center; gap: 8px; }
.wzeile.offen .wz-status::before, .wzeile.fehlt .wz-status::before, .wzeile.fertig .wz-status::before { content: ''; width: 12px; height: 12px; border-radius: 3px; background: var(--rot); flex: none; }
.wzeile.fertig .wz-status::before { background: var(--gelb); outline: 2px solid var(--tinte); outline-offset: -2px; }
.wzeile.geschickt .wz-status::before, .versand.geschickt::before { content: ''; flex: none; width: 6px; height: 11px; margin: 0 4px 3px 3px; border: solid var(--tinte); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.woche-ende { margin-top: 28px; }

/* ---------- Erststart ---------- */
.start { padding: 20px 0 32px; }
.start-marke { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.start-marke img { flex: none; border-radius: 4px; }
.start-titel { font-size: 40px; font-weight: 800; line-height: 1.05; }
.start-text { font-size: 22px; font-weight: 700; margin-top: 10px; }
.start-klein { font-size: 17px; margin-top: 8px; color: var(--tinte-2); }
.start-gruppe { font-size: 16px; font-weight: 700; color: var(--tinte-2); margin: 22px 0 8px; }
.namen { display: grid; gap: 10px; }
.taste.name { width: 100%; justify-content: flex-start; min-height: 64px; font-size: 22px; font-weight: 700; text-align: left; }

/* ---------- Blatt (Auswahl) ---------- */
#blatt {
  width: 100%; max-width: 560px; max-height: min(92dvh, 900px); margin: auto auto 0; padding: 0;
  border: 0; border-radius: 12px 12px 0 0; background: var(--grund); color: var(--tinte); overflow: auto; overscroll-behavior: contain;
}
#blatt::backdrop { background: rgba(40, 28, 20, .55); }
#blatt[open] { animation: hoch .16s ease-out; }
@keyframes hoch { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.blatt-kopf { position: sticky; top: 0; z-index: 2; min-height: 81px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--rand); background: var(--grund); border-bottom: 1px solid var(--linie); }
.blatt-kopf h2 { font-size: 24px; font-weight: 800; }
#blatt-titel:focus { outline: none; }
.blatt-inhalt { padding: 6px var(--rand) 28px; }
.blatt-fuss { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 10px; padding: 10px var(--rand) max(12px, env(safe-area-inset-bottom)); background: var(--grund); border-top: 1px solid var(--linie); }
.blatt-fuss .taste[hidden] { display: none; }
.blatt-text { font-size: 17px; margin: 10px 0 4px; }
.blatt-inhalt h3 { font-size: 16px; font-weight: 700; color: var(--tinte-2); margin: 20px 0 6px; }
.wahl { display: grid; gap: 10px; margin-top: 12px; }
.wahl-zeile { width: 100%; min-height: 64px; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 16px; text-align: left; }
.wahl-zeile .wz-name { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.wahl-zeile .wz-ort { font-size: 16px; font-weight: 500; }
.wahl-zeile[aria-pressed="true"] .wz-ort { color: var(--grund); }
.wahl-zeile:not([aria-pressed="true"]) .wz-ort { color: var(--tinte-2); }
.suche { position: sticky; top: 81px; z-index: 1; background: var(--grund); padding: 10px 0 8px; }
.suche label, .neu label { display: block; font-size: 16px; font-weight: 600; color: var(--tinte-2); margin-bottom: 4px; }
.feld-eingabe {
  width: 100%; min-height: 56px; padding: 0 14px; font-size: 19px;
  background: var(--grund); border: 2px solid var(--tinte); border-radius: 7px;
}
.mat-wahl { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.mat-wahl.hat .mat-name::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border-radius: 2px; background: var(--gelb); outline: 2px solid var(--tinte); }
.neu { margin-top: 24px; padding-top: 14px; border-top: 3px solid var(--tinte); }
.neu h3 { margin-top: 0 !important; }
.neu-reihe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.neu-reihe > div { min-width: 0; }
.neu .taste { margin-top: 12px; }

/* ---------- Meldung ---------- */
#meldung {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: min(528px, calc(100% - 24px)); z-index: 70;
  display: none; align-items: center; gap: 14px; padding: 10px 10px 10px 16px;
  background: var(--tinte); color: var(--grund); border-radius: 8px; font-weight: 700;
}
#meldung.zeigt { display: flex; }
#meldung.still { position: fixed; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
#meldung .taste { min-height: 56px; background: var(--grund); color: var(--tinte); border-color: var(--grund); box-shadow: none; margin: 0; }
#meldung .taste:focus-visible { outline-color: var(--grund); }

.warnung { margin-top: 12px; padding: 12px 14px; border: 3px solid var(--rot); border-radius: 7px; }
.warnung p { font-weight: 700; margin-bottom: 10px; }

/* ---------- Rotte und Verweise (r5) ---------- */
a.taste { text-decoration: none; }
a.wer { color: inherit; text-decoration: none; }
#t-wie-gestern + #t-rotte { margin-top: 12px; }

/* ---------- Büro: Zettel sammeln (r5) ---------- */
.buero { max-width: 1180px; margin: 0 auto; padding: 0 var(--rand) 40px; outline: none; }
.b-raster { display: grid; gap: 28px; }
.b-raster > * { min-width: 0; }
.taste.ablage { width: 100%; min-height: 136px; flex-direction: column; gap: 6px; padding: 16px; border-width: 3px; box-shadow: 0 4px 0 var(--tinte); }
.taste.ablage .tz-gross { font-size: 24px; }
.taste.ablage .tz-klein { font-size: 17px; }
.taste.ablage.zieht { background: var(--gelb); }
.b-hinweis { font-size: 16px; color: var(--tinte-2); margin-top: 8px; }
.b-bericht { font-size: 17px; font-weight: 700; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linie); }
.b-leer { font-size: 20px; font-weight: 700; margin-top: 24px; }
.b-h2 { font-size: 20px; font-weight: 800; }
.b-stand { margin-top: 22px; padding-top: 12px; border-top: 3px solid var(--tinte); }
.b-zahl { font-size: 20px; font-weight: 700; margin-top: 2px; }
.b-zahl b { font-size: 56px; font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.b-noch { font-size: 17px; margin-top: 4px; }
.b-stand .fehlt-text { align-items: flex-start; margin-top: 12px; }
.b-stand .fehlt-text::before { margin-top: 4px; }
.b-liste { margin: 4px 0 0 22px; }
.b-liste li { font-size: 17px; padding: 3px 0; }
.b-offen { margin-left: 0; }
.b-offen li { padding: 6px 0; border-bottom: 1px solid var(--linie); }
.b-offen-mit { display: block; font-size: 16px; color: var(--tinte-2); }
.b-einzug { padding-left: 22px; }
.b-links > #b-beispiel { margin-top: 20px; }
.b-vorschau { display: none; }
.b-datei { margin-top: 24px; }
.b-brett, .b-bs { padding-top: 12px; border-top: 3px solid var(--tinte); }
.b-bs { margin-top: 32px; }
.b-tabelle { overflow-x: auto; margin-top: 10px; }
.brett { width: 100%; min-width: 640px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.brett th, .brett td { padding: 8px 6px; border-bottom: 1px solid var(--linie); text-align: center; vertical-align: middle; font-weight: 600; }
.brett thead th { font-size: 17px; font-weight: 800; border-bottom: 2px solid var(--tinte); }
.brett thead .b-heute { box-shadow: inset 0 -5px 0 var(--tinte); }
.b-tag { display: block; font-size: 16px; font-weight: 600; color: var(--tinte-2); }
.brett .b-name { position: sticky; left: 0; z-index: 1; text-align: left; font-size: 17px; font-weight: 700; white-space: nowrap; background: var(--grund); padding-left: 0; }
.brett .b-gruppe th { text-align: left; font-size: 16px; font-weight: 700; color: var(--tinte-2); padding: 18px 0 6px; }
.b-z b { display: block; font-size: 21px; font-weight: 800; }
.b-ueber { display: block; font-size: 16px; color: var(--tinte-2); white-space: nowrap; }
.b-z.weg { background: var(--perl); }
.b-weg { font-size: 16px; font-weight: 700; }
.b-marke { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.b-marke::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--rot); }
.b-noch-z { font-size: 16px; color: var(--tinte-2); white-space: nowrap; }
.brett .b-summe { font-size: 21px; font-weight: 800; border-left: 2px solid var(--tinte); }
.b-bs-liste { margin-top: 6px; }
.b-bs-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--linie); }
.b-bs-name { font-size: 19px; font-weight: 800; overflow-wrap: break-word; hyphens: auto; }
.b-bs-name .nr { font-weight: 800; }
.b-bs-std { font-size: 18px; font-weight: 700; text-align: right; white-space: nowrap; }
.b-bs-std b { font-size: 30px; font-weight: 800; }
.b-bs-stab { grid-column: 1 / -1; height: 20px; min-width: 12px; background-color: var(--gelb); border: 2px solid var(--tinte); border-radius: 4px;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--glied) - 2px), var(--tinte) calc(var(--glied) - 2px) var(--glied)); }
.b-bs-mat { grid-column: 1 / -1; font-size: 17px; }
.b-regie { grid-column: 1 / -1; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--linie); }
.b-regie-kopf { font-size: 17px; font-weight: 700; }
.b-regie-kopf b { font-weight: 800; }
.b-regie .b-liste { margin-left: 0; }
.b-regie .b-liste li { padding: 5px 0; }
.b-regie-wann { display: block; font-size: 16px; font-weight: 700; }
.b-regie-wer { display: block; font-size: 16px; color: var(--tinte-2); }
.b-regie-notiz { display: block; font-size: 17px; }
.b-bs-zeile .b-pruefen { grid-column: 1 / -1; align-items: flex-start; margin-top: 6px; }
.b-bs-zeile .b-pruefen::before { margin-top: 4px; }
@media (max-width: 599px) {
  .b-bs-zeile { grid-template-columns: minmax(0, 1fr); }
  .b-bs-std { text-align: left; }
}
.b-fuss { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--linie); }
.b-fuss .taste.breit { width: auto; flex: 1 1 280px; max-width: 440px; }
@media (min-width: 960px) {
  .b-raster { grid-template-columns: 360px minmax(0, 1fr); gap: 56px; align-items: start; }
  .b-links { align-self: stretch; display: flex; flex-direction: column; }   /* so hoch wie die Woche: die Hauptaktion klebt unten im Bild */
  .b-datei { margin-top: auto; position: sticky; bottom: 0; z-index: 1; background: var(--grund); padding: 12px 0; box-shadow: 0 -1px 0 var(--linie); }
  .b-vorschau { display: block; }
}

/* ---------- Breiten ---------- */
@media (max-width: 380px) {
  :root { --rand: 12px; }
    .datum { font-size: 36px; }
  .stunden b { font-size: 36px; }
  .wert { font-size: 52px; }
}
@media (min-width: 960px) {
  .rahmen { max-width: 1040px; display: grid; grid-template-columns: minmax(0, 560px) 400px; justify-content: center; gap: 56px; }
  #seite { display: block; position: sticky; top: 0; align-self: start; padding: 20px 0 24px; max-height: 100vh; overflow: auto; }
  .ansicht-woche #seite, .ansicht-start #seite { display: none; }
  .ansicht-woche .rahmen, .ansicht-start .rahmen { grid-template-columns: minmax(0, 560px); }
  .nur-schmal { display: none !important; }
  #seite .datum { font-size: 30px; }
  #blatt { margin: auto; border-radius: 12px; max-height: 86dvh; }
  .suche { top: 81px; }
}

/* Fokus per Tab nie unter der festen Leiste; beim Tippen am Handy klebt die Leiste nicht */
html { scroll-padding-bottom: 190px; }
@media (max-width: 959px) {
  body.tastatur .unten { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
