/* KiGa on control 1.1.0 – Oberfläche. Hell/Dunkel automatisch. Kein Build. Schrift Nunito liegt lokal (fonts/, OFL). */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 650 749; font-display: swap; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 750 900; font-display: swap; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); }
:root {
  --bg: #eef0f1;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --line: #d9dee2;
  --text: #1b1f23;
  --muted: #55606a;
  --ink: #3a3f44;
  --btn-bg: #3a3f44;
  --btn-text: #ffffff;
  --focus: #1d5fc4;
  --shadow: 0 1px 2px rgba(20, 28, 36, .06), 0 6px 18px -8px rgba(20, 28, 36, .14);

  --ok: #1f9d55;   --ok-text: #12663a;   --ok-bg: #e5f4ea;
  --warn: #e0a800; --warn-text: #7a5700; --warn-bg: #fbf1d0;
  --bad: #d64545;  --bad-text: #a82b2b;  --bad-bg: #fbe4e4;
  --na: #8a9199;   --na-text: #535c65;   --na-bg: #e9ecee;
  --info: #3d7ab8; --info-text: #245a8f; --info-bg: #e3eef8;
  --link: #245a8f;

  --k: #e4572e; --i: #f3a712; --g: #29a19c; --a: #4f6d7a;
  --r: 14px;
  --nav-h: 66px;
  --font: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --surface: #1a1d20;
    --surface-2: #212528;
    --line: #2f353a;
    --text: #e8ebed;
    --muted: #a5adb5;
    --ink: #c9ced3;
    --btn-bg: #dfe3e6;
    --btn-text: #14171a;
    --focus: #7fb0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px -10px rgba(0, 0, 0, .6);
    --ok-text: #6fd197;   --ok-bg: #16301f;
    --warn-text: #f0cb55; --warn-bg: #362d0e;
    --bad-text: #ff9b9b;  --bad-bg: #3b1b1b;
    --na-text: #a9b1b9;   --na-bg: #272c30;
    --info-text: #9cc6f2; --info-bg: #182a3d;
    --link: #9cc6f2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 760px) { body { font-size: 15.5px; } }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 1.7rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 720; }
h2 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 680; }
h3 { font-size: 1rem; font-weight: 650; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Start / Anmeldung ---------- */
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.boot-logo { width: 220px; height: auto; opacity: .85; }
.login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center;
  gap: 22px; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center;
}
.login img { width: min(300px, 72vw); height: auto; }
.login p { max-width: 34ch; color: var(--muted); }
.login .card { width: min(420px, 100%); text-align: left; }
.demo-hinweis {
  background: var(--ink); color: var(--bg); font-size: .75rem; padding: 3px 10px; text-align: center;
}

/* ---------- Gerüst ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand img { height: 34px; width: auto; display: block; }
.stand { flex: 1; min-width: 0; font-size: .8125rem; line-height: 1.3; color: var(--muted); }
.stand b { color: var(--text); font-weight: 600; }
.iconbtn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; color: var(--ink);
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 22px; height: 22px; }
.spin svg { animation: drehen .9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

main { padding: 18px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1040px; margin: 0 auto; }
.view { display: grid; gap: 22px; }
.view-head { display: grid; gap: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; text-decoration: none; padding: 4px 0; min-height: 36px; }
.back:hover { color: var(--text); text-decoration: underline; }

/* Navigation: Handy = untere Leiste */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  scroll-snap-type: x proximity;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; flex: 0 0 auto; min-width: 74px; padding: 6px 8px; border-radius: 12px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: .75rem; line-height: 1.2; font-weight: 550;
}
.nav a svg.ico { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] .nav-label { font-weight: 700; }
.nav .dot {
  position: absolute; top: 4px; right: 14px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--na);
}
.nav .dot.gruen { background: var(--ok); } .nav .dot.gelb { background: var(--warn); }
.nav .dot.rot { background: var(--bad); } .nav .dot.grau { background: var(--na); }
.nav .zahl {
  position: absolute; top: 1px; right: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--na-text); color: var(--surface); font-size: .72rem; font-weight: 700; display: grid; place-items: center;
}
.nav .zahl.dringend { background: var(--bad); color: #fff; }
.nav-top { display: none; }

@media (min-width: 760px) {
  .shell { display: grid; grid-template-columns: 236px 1fr; }
  .topbar { display: none; }
  .sidebar {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px;
    padding: 22px 14px 18px; border-right: 1px solid var(--line); background: var(--surface);
  }
  .sidebar .brand { padding: 0 8px; }
  .sidebar .brand img { width: 150px; height: auto; display: block; }
  .nav {
    position: static; flex-direction: column; overflow: visible; padding: 0; border: 0; background: none; gap: 2px;
  }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; min-width: 0; font-size: .95rem; }
  .nav .dot, .nav .zahl { position: static; margin-left: auto; border: 0; }
  .nav .dot { width: 12px; height: 12px; flex: none; }
  .nav .zahl { order: 3; }
  .side-foot { margin-top: auto; display: grid; gap: 8px; }
  .side-foot .stand { font-size: .8125rem; }
  .side-foot .row { display: flex; gap: 8px; }
  main { padding: 30px 36px 60px; }
}
@media (max-width: 759.98px) { .sidebar { display: contents; } .sidebar .brand, .side-foot { display: none; } }

/* ---------- Bausteine: Karten, Knöpfe, Abzeichen ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: .875rem; }
.section { display: grid; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head p { color: var(--muted); font-size: .875rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 12px; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-text); font-weight: 600; text-decoration: none;
}
.btn:hover { filter: brightness(1.12); }
.btn.sek { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.sek:hover { background: var(--surface-2); filter: none; }
.btn.gefahr { background: var(--bad-bg); color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn.klein { min-height: 38px; padding: 4px 12px; font-size: .9rem; border-radius: 10px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 650; line-height: 1.5;
  background: var(--na-bg); color: var(--na-text); white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge.dringend, .badge.rot, .badge.geht_nicht { background: var(--bad-bg); color: var(--bad-text); }
.badge.bald, .badge.gelb, .badge.dringend-m { background: var(--warn-bg); color: var(--warn-text); }
.badge.gruen, .badge.erledigt { background: var(--ok-bg); color: var(--ok-text); }
.badge.irgendwann, .badge.grau, .badge.stoert { background: var(--na-bg); color: var(--na-text); }
.badge.outline { background: none; border: 1px solid var(--line); color: var(--muted); font-weight: 550; }
.badge.in_arbeit { background: var(--warn-bg); color: var(--warn-text); }
.badge.offen { background: var(--bad-bg); color: var(--bad-text); }
.badge.auto { background: var(--ok-bg); color: var(--ok-text); }

/* Ampel-Symbol: Form + Farbe (nie nur Farbe) */
.amp { width: 22px; height: 22px; flex: none; display: block; }
.amp.gruen .f { fill: var(--ok); } .amp.gelb .f { fill: var(--warn); }
.amp.rot .f { fill: var(--bad); } .amp.grau .f { fill: none; stroke: var(--na); stroke-width: 2; stroke-dasharray: 3 2.4; }
.amp .g { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.amp.gelb .g { stroke: #2a2200; }
.amp.grau .g { stroke: var(--na-text); }
.amp.gelb .f { stroke: var(--warn-text); stroke-width: 1; }

/* Ausklappbare Zeilen */
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.row { border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row > summary, .row > .row-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 48px; padding: 8px 2px; list-style: none;
}
.row > summary { cursor: pointer; border-radius: 8px; }
.row > summary::-webkit-details-marker { display: none; }
.row > summary:hover { background: var(--surface-2); }
.row .t { font-weight: 560; overflow-wrap: break-word; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1 1 8em; }
.row .w { text-align: right; color: var(--muted); font-size: .9rem; margin-left: auto; overflow-wrap: break-word; max-width: 100%; }
.row.rot .w { color: var(--bad-text); font-weight: 600; } .row.gelb .w { color: var(--warn-text); font-weight: 600; }
.row .det { padding: 0 2px 12px 36px; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.row .hilfe { margin: 0 2px 12px 36px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.infobtn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 0; }
.infobtn svg { width: 16px; height: 16px; }
.row.grau .t { color: var(--muted); }

.gruppe-titel { font-size: .8125rem; font-weight: 700; color: var(--muted); margin: 14px 0 2px; letter-spacing: .01em; }
.gruppe-titel:first-child { margin-top: 0; }

/* ---------- Übersicht ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid; }
.banner.rot { background: var(--bad-bg); color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.banner.gelb { background: var(--warn-bg); color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.banner b { display: block; }
.banner svg { flex: none; }

.kacheln { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .kacheln { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.kachel {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-content: start; text-align: left;
  padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; overflow: hidden; min-height: 118px;
}
.kachel:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.kachel .stein {
  grid-row: span 2; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .16);
}
.kachel:nth-child(4n+1) .stein { transform: rotate(-5deg); } .kachel:nth-child(4n+2) .stein { transform: rotate(4deg); }
.kachel:nth-child(4n+3) .stein { transform: rotate(-3deg); } .kachel:nth-child(4n) .stein { transform: rotate(5deg); }
.stein.gruen { background: var(--ok); } .stein.gelb { background: var(--warn); color: #2a2200; }
.stein.rot { background: var(--bad); } .stein.grau { background: var(--na); }
.stein svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.kachel h3 { align-self: end; font-size: 1.05rem; }
.kachel .status { font-size: .8125rem; font-weight: 650; align-self: start; }
.kachel .status.gruen { color: var(--ok-text); } .kachel .status.gelb { color: var(--warn-text); }
.kachel .status.rot { color: var(--bad-text); } .kachel .status.grau { color: var(--na-text); }
.kachel p { hyphens: auto; -webkit-hyphens: auto; grid-column: 1 / -1; color: var(--muted); font-size: .875rem; margin-top: 6px; overflow-wrap: anywhere; }

.zahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .zahlen { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .zahlen { grid-template-columns: repeat(6, 1fr); } }
.zahl-k { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; align-content: start; }
.zahl-k .v { font-size: 1.45rem; font-weight: 720; letter-spacing: -.02em; line-height: 1.2; }
.zahl-k .v small { font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.zahl-k .l { font-size: .8125rem; color: var(--muted); line-height: 1.3; }
.zahl-k.gelb .v { color: var(--warn-text); } .zahl-k.rot .v { color: var(--bad-text); }

.zwei { display: grid; gap: 22px; }
@media (min-width: 960px) { .zwei { grid-template-columns: 1.15fr 1fr; align-items: start; } }

.verlauf { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.verlauf .n { font-size: .8125rem; color: var(--muted); }
.verlauf .reihe { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; }
.verlauf .tag { height: 16px; border-radius: 3px; background: var(--na); }
.verlauf .tag.gruen { background: var(--ok); } .verlauf .tag.gelb { background: var(--warn); }
.verlauf .tag.rot { background: var(--bad); } .verlauf .tag.grau { background: var(--na-bg); }

/* Vorschläge */
.vlist { display: grid; gap: 12px; }
.vk { background: var(--surface); border: 1px solid var(--line); border-left-width: 5px; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.vk.dringend { border-left-color: var(--bad); } .vk.bald { border-left-color: var(--warn); } .vk.irgendwann { border-left-color: var(--na); }
.vk.fertig { opacity: .78; box-shadow: none; }
.vk > summary { list-style: none; cursor: pointer; padding: 14px 14px 12px; display: grid; gap: 6px; }
.vk > summary::-webkit-details-marker { display: none; }
.vk .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vk .titel { font-weight: 680; font-size: 1.02rem; line-height: 1.3; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.vk .titel svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--muted); transition: transform .2s; }
.vk[open] .titel svg { transform: rotate(180deg); }
.vk .kurz { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vk[open] .kurz { display: none; }
.vk .body { padding: 0 14px 14px; display: grid; gap: 14px; }
.vk .block h4 { font-size: .8125rem; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.schritte { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.schritte > li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; }
.schritte > li::before {
  content: counter(s); width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .875rem;
  display: grid; place-items: center; grid-row: span 2;
}
.schritte .st { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-weight: 560; }
.code { grid-column: 2; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; min-width: 0; }
.code pre {
  margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
  font: .875rem/1.45 var(--mono); overflow-x: auto; white-space: pre; min-width: 0;
}
.code .btn { align-self: stretch; }
.spaeter-menu { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; border-radius: 12px; background: var(--surface-2); align-items: center; }
.tipp { font-size: .875rem; color: var(--muted); }

/* Geschäftliches */
.todos { list-style: none; margin: 0; padding: 0; display: grid; }
.todo { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 6px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.todo:first-child { border-top: 0; }
.todo.fertig .tt { text-decoration: line-through; color: var(--muted); }
.check {
  width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; padding: 0;
}
.check span { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted); display: grid; place-items: center; background: var(--surface); }
.check svg { width: 16px; height: 16px; stroke: var(--btn-text); stroke-width: 3.5; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check[aria-checked="true"] span { background: var(--ok); border-color: var(--ok); }
.check[aria-checked="true"] svg { opacity: 1; stroke: #fff; }
.check[disabled] { cursor: default; opacity: .75; }
.todo .tt { padding-top: 10px; overflow-wrap: anywhere; }
.todo .tt small { display: block; color: var(--muted); font-size: .875rem; }
.todo .acts { display: flex; }
.todo .acts .iconbtn { width: 40px; height: 40px; border: 0; background: none; }
.faellig { display: inline-block; margin-top: 2px; }

/* Server / write */
.fortschritt { height: 12px; border-radius: 6px; background: var(--na-bg); overflow: hidden; margin: 4px 0 12px; }
.fortschritt > i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.checkliste { list-style: none; padding: 0; margin: 0; display: grid; }
.checkliste li { display: grid; grid-template-columns: 44px 1fr; align-items: center; border-top: 1px solid var(--line); }
.checkliste li:first-child { border-top: 0; }
.checkliste .tx { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.restore { display: grid; gap: 10px; }

/* Bereichskopf */
.kopf { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.kopf .stein { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .16); transform: rotate(-4deg); grid-row: span 2; }
.kopf .stein.gelb { color: #2a2200; }
.kopf .stein svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.kopf .stein.gruen { background: var(--ok); } .kopf .stein.gelb { background: var(--warn); } .kopf .stein.rot { background: var(--bad); } .kopf .stein.grau { background: var(--na); }
.kopf p { color: var(--muted); }
.insta-grid { display: grid; gap: 16px; }
@media (min-width: 960px) { .insta-grid.viele { grid-template-columns: 1fr 1fr; align-items: start; } }
.insta-titel { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.insta-titel code { font-family: var(--mono); font-size: .9rem; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
.leer { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }

/* Meldungen */
.filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 560; }
.chip[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.mlist { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.mk { display: grid; gap: 6px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.mk:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.mk .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mk .tx { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk .zeit { margin-left: auto; font-size: .8125rem; color: var(--muted); }
.infos { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
.infos dt { color: var(--muted); } .infos dd { margin: 0; overflow-wrap: anywhere; }
.mtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); max-width: 340px; display: block; }
.thumb img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.segment { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.segment button { min-height: 44px; padding: 6px 14px; border: 0; background: var(--surface); border-right: 1px solid var(--line); font-weight: 560; }
.segment button:last-child { border-right: 0; }
.segment button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }

/* Formulare, Dialoge */
.feld { display: grid; gap: 4px; margin-bottom: 12px; }
.feld label, .feld .lab { font-weight: 600; font-size: .9rem; }
.feld .hint { font-size: .8125rem; color: var(--muted); }
input[type=text], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--muted) 55%, var(--line)); background: var(--surface); color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 100vw; max-height: 100dvh; }
dialog::backdrop { background: rgba(10, 14, 18, .55); }
.dlg { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.dlg h2 { margin-bottom: 8px; }
.dlg .btnrow { margin-top: 14px; justify-content: flex-end; }
dialog.gross .dlg { width: min(900px, calc(100vw - 16px)); padding: 10px; }
dialog.gross img { width: 100%; height: auto; max-height: 80dvh; object-fit: contain; display: block; border-radius: 10px; }
.warnbox { padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-text); font-size: .9rem; margin-top: 8px; }
.fehler { color: var(--bad-text); font-weight: 600; margin-top: 8px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center;
  max-width: calc(100vw - 24px); box-shadow: 0 8px 28px rgba(0, 0, 0, .3); font-weight: 560;
}
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; padding: 6px; min-height: 36px; }
@media (min-width: 760px) { .toast { bottom: 24px; } }

.ptr { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: grid; place-items: center; height: 0; overflow: hidden; color: var(--muted); font-size: .875rem; }
.ptr.an { height: 46px; background: var(--surface); border-bottom: 1px solid var(--line); }

/* Einstellungen */
.setz { display: grid; gap: 16px; }
.kopierzeile { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 6px; }
.kopierzeile code, .box {
  font: .8125rem/1.45 var(--mono); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
  overflow-x: auto; white-space: nowrap; display: block; min-width: 0;
}
.liste-z { list-style: none; padding: 0; margin: 0; display: grid; }
.liste-z li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.liste-z li:first-child { border-top: 0; }

/* Testseite für das Widget */
.testseite { background: var(--surface); min-height: 100vh; }
.testseite-inhalt { max-width: 560px; margin: 0 auto; padding: 32px 18px; display: grid; gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .view { animation: ein .22s ease-out; }
  @keyframes ein { from { opacity: 0; } to { opacity: 1; } }
}

.card > * + * { margin-top: 10px; }
.card > .card-head + *, .card > .section-head + * { margin-top: 0; }
.card > .rows, .card > .todos, .card > .checkliste { margin-top: 4px; }
.row > .hilfe { margin-top: 0; }
.brand img { border-radius: 8px; }
.view-head .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.block + .block { margin-top: 16px; }


.code { grid-template-columns: 1fr; }
.code pre { white-space: pre-wrap; word-break: break-all; }
.code .btn { justify-self: start; }
@media (min-width: 640px) { .code { grid-template-columns: 1fr auto; } }
svg.ico { width: 20px; height: 20px; flex: none; }
.nav a svg.ico { width: 24px; height: 24px; }
.kopierzeile { grid-template-columns: 1fr; }
.kopierzeile code { white-space: pre-wrap; word-break: break-all; }
.kopierzeile .btn { justify-self: start; }
@media (min-width: 900px) { .kopierzeile { grid-template-columns: 1fr auto; } }
.banner { margin-bottom: 14px; }

/* ---------- 1.1.0: Anfragen ---------- */
html, body { overflow-x: hidden; }
main { min-width: 0; }
.badge.a-neu { background: var(--bad-bg); color: var(--bad-text); }
.badge.a-in_arbeit { background: var(--warn-bg); color: var(--warn-text); }
.badge.a-beantwortet { background: var(--info-bg); color: var(--info-text); }
.badge.a-erledigt { background: var(--ok-bg); color: var(--ok-text); }
.ak { display: grid; gap: 6px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); border-left-width: 5px; background: var(--surface); text-decoration: none; color: inherit; box-shadow: var(--shadow); min-width: 0; }
.ak.neu { border-left-color: var(--bad); } .ak.in_arbeit { border-left-color: var(--warn); }
.ak.beantwortet { border-left-color: var(--info); } .ak.erledigt { border-left-color: var(--ok); opacity: .85; }
.ak:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.ak .kopf { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; min-width: 0; }
.ak .titel { font-weight: 700; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.ak .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: .8125rem; color: var(--muted); min-width: 0; }
.ak .meta span { overflow-wrap: anywhere; min-width: 0; }
.ak .tx { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.atext { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.mailzeile { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; min-width: 0; }
.mailzeile a.adr { font-weight: 650; color: var(--link); overflow-wrap: anywhere; min-width: 0; }
.notiz-hint { display: flex; gap: 6px; align-items: center; }
.notiz-hint svg { width: 16px; height: 16px; flex: none; }
.hinweis { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line); color: var(--muted); font-size: .9rem; }
.kachel.anfr .stein.neu { background: var(--warn); color: #2a2200; }
.nav .zahl.anfr { background: var(--warn); color: #2a2200; }
.segment.vier { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 560px; }
.segment.vier button { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.segment.vier button:nth-child(2n) { border-right: 0; }
.segment.vier button:nth-child(n+3) { border-bottom: 0; }
@media (min-width: 560px) {
  .segment.vier { grid-template-columns: repeat(4, 1fr); }
  .segment.vier button { border-bottom: 0; border-right: 1px solid var(--line); }
  .segment.vier button:last-child { border-right: 0; }
}
.filter { min-width: 0; }

/* Handy: Reiterleiste passt ohne Scrollen (5 Felder + „Mehr“-Blatt) */
.nav-mehr { display: none; }
.mehr-blatt { display: none; }
@media (max-width: 759.98px) {
  .nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; gap: 2px; padding-left: 4px; padding-right: 4px; }
  .nav a, .nav .nav-mehr { min-width: 0; padding: 6px 2px; }
  .nav .nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a.neben { display: none; }
  .nav .nav-mehr {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; border-radius: 12px;
    color: var(--muted); font-size: .75rem; line-height: 1.2; font-weight: 550;
  }
  .nav .nav-mehr[aria-expanded="true"], .nav .nav-mehr.aktiv { color: var(--text); background: var(--surface-2); }
  .nav .nav-mehr svg.ico { width: 24px; height: 24px; }
  .nav .dot { right: calc(50% - 22px); }
  .nav .zahl { right: calc(50% - 26px); }
  .mehr-blatt:not([hidden]) {
    display: grid; gap: 4px; position: fixed; left: 8px; right: 8px; z-index: 29;
    bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom));
    padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .mehr-blatt a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; }
  .mehr-blatt a[aria-current="page"] { background: var(--surface-2); }
  .mehr-blatt a .ico { width: 22px; height: 22px; color: var(--muted); }
  .mehr-blatt a .dot { margin-left: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--na); }
  .mehr-blatt a .dot.gruen { background: var(--ok); } .mehr-blatt a .dot.gelb { background: var(--warn); }
  .mehr-blatt a .dot.rot { background: var(--bad); }
}
.version { font-size: .75rem; color: var(--muted); }
