/* ==========================================================================
   PlantZoneOne – PZO Version 2.0 – gemeinsames Design für alle Seiten
   --------------------------------------------------------------------------
   • Schriften liegen lokal in assets/fonts (keine Verbindung zu Google → DSGVO)
   • Farben stehen als Variablen oben; Hell/Dunkel folgt der Geräte-Einstellung
   • Jahreszeit setzt assets/pzo.js automatisch (html[data-jahreszeit])
   ========================================================================== */

@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Farben & Maße ---------- */
:root {
  --boden: #EEF2EB;        /* Seitenhintergrund */
  --papier: #FFFFFF;       /* Flächen */
  --papier-2: #F6F8F4;     /* leicht abgesetzte Flächen */
  --tinte: #17301F;        /* Text: Tannengrün statt Schwarz */
  --tinte-2: #4D6253;      /* Nebentext */
  --linie: #D7E0D2;        /* Rahmen, Trennlinien */
  --blatt: #2E7A47;        /* Hauptfarbe: Buttons, Links */
  --blatt-dunkel: #215C35;
  --blatt-hell: #DCEFD9;
  --laub: #CFE7C9;         /* Blattfüllung in der Illustration */
  --saison: #6FAE5A; --saison-hell: #E3F0DC;
  --hinweis: #FFF6E0; --hinweis-rand: #E8C26A;
  --fehler: #B42318; --fehler-hell: #FDECEA;
  --erfolg: #1E7B3E; --erfolg-hell: #E3F4E6;

  --schrift: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titel: "Bricolage", "Figtree", system-ui, sans-serif;
  --radius: 14px; --radius-klein: 9px;
  --schatten: 0 1px 2px rgba(23, 48, 31, .06), 0 6px 20px -8px rgba(23, 48, 31, .18);
  --breite: 1080px;
  color-scheme: light dark;
}

/* ---------- Jahreszeiten (Farbe von Boden, Akzent und Illustration) ---------- */
html[data-jahreszeit="winter"]    { --boden: #EAF0F3; --saison: #7FA9D1; --saison-hell: #DDE9F4; --laub: #D5E8D6; }
html[data-jahreszeit="fruehling"] { --boden: #F0F4EA; --saison: #E583A9; --saison-hell: #FBE4ED; --laub: #CDEBC3; }
html[data-jahreszeit="sommer"]    { --boden: #F3F3E5; --saison: #EFAE24; --saison-hell: #FCEFC6; --laub: #C6E6B8; }
html[data-jahreszeit="herbst"]    { --boden: #F3EEE6; --saison: #D66F28; --saison-hell: #F8DFCB; --laub: #F2C9A0; }

@media (prefers-color-scheme: dark) {
  :root, html[data-jahreszeit] {
    --papier: #16241B; --papier-2: #1B2C21;
    --tinte: #E4EEE5; --tinte-2: #A3B8A8; --linie: #2B3F31;
    --blatt: #6CC48A; --blatt-dunkel: #8AD6A3; --blatt-hell: #1F3A28; --laub: #2C5A3A;
    --hinweis: #2E2615; --hinweis-rand: #8A6E2C;
    --fehler: #F28B82; --fehler-hell: #3A1C1A; --erfolg: #7FD49A; --erfolg-hell: #17301F;
    --schatten: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -10px rgba(0,0,0,.6);
  }
  :root { --boden: #0F1A13; --saison-hell: #1F3A28; }
  html[data-jahreszeit="winter"]    { --boden: #0E1719; --saison-hell: #1B2C3A; }
  html[data-jahreszeit="fruehling"] { --boden: #111A12; --saison-hell: #3A1F2C; }
  html[data-jahreszeit="sommer"]    { --boden: #13190F; --saison-hell: #3A3016; }
  html[data-jahreszeit="herbst"]    { --boden: #17150F; --saison-hell: #3D2616; --laub: #6B4524; }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Firefox/Samsung auf dem Handy vergrößern Text sonst automatisch („Font Inflation“) – dann ragt er über den Rand */
html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Lange Wörter (Namen, Links, Schlüssel) dürfen umbrechen statt über den Rand zu ragen */
h1, h2, h3, p, li, dd, dt, label, strong, span, a, td, th, summary, .code-block { overflow-wrap: break-word; }
/* Raster- und Flex-Kinder dürfen schmaler werden als ihr längstes Wort */
.seitenkopf > *, .werkzeug > *, .kachel > *, .raster-2 > *, .raster-3 > *, .karten > *, .leiste > *, .streifen > *, .hinweis > *, .eintraege li > * { min-width: 0; }
input, textarea, select, button { max-width: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--boden); color: var(--tinte);
  font: 400 1.0625rem/1.55 var(--schrift);
}
h1, h2, h3 { font-family: var(--titel); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--blatt); text-underline-offset: .18em; }
a:hover { color: var(--blatt-dunkel); }
:focus-visible { outline: 3px solid var(--blatt); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile (oben ein Streifen in der Jahreszeiten-Farbe) ---------- */
.kopf { border-top: 4px solid var(--saison); border-bottom: 1px solid var(--linie); background: color-mix(in srgb, var(--papier) 72%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.kopf-innen { max-width: var(--breite); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
.marke { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--tinte); font: 800 1.15rem/1 var(--titel); letter-spacing: -0.02em; }
.marke .icon { color: var(--blatt); width: 26px; height: 26px; }
.kopf nav { margin-left: auto; display: flex; gap: 2px; }
.kopf nav a, .kopf nav button { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--tinte-2); font: 700 .95rem/1 var(--schrift); padding: 9px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; }
.kopf nav a:hover, .kopf nav button:hover, .kopf nav a[aria-current="page"] { background: var(--blatt-hell); color: var(--tinte); }

/* ---------- Seite ---------- */
.seite { flex: 1; width: 100%; max-width: var(--breite); margin: 0 auto; padding: 24px 20px 32px; }
.seite-schmal { max-width: 760px; }
.seitenkopf { margin-bottom: 24px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; }
.seitenkopf .icon-gross { grid-row: span 2; width: 52px; height: 52px; padding: 12px; border-radius: 14px; background: var(--saison-hell); color: var(--tinte); }
.seitenkopf h1 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.seitenkopf p { color: var(--tinte-2); margin: 0; }

/* ---------- Startseite ---------- */
.start { display: grid; gap: 14px; align-content: start; }
.begruessung { display: grid; grid-template-columns: 1fr 210px; align-items: center; gap: 24px; min-height: 140px; padding: 18px 22px 18px 28px; border-radius: calc(var(--radius) + 4px);
  background: radial-gradient(120% 140% at 100% 100%, var(--saison-hell) 0%, color-mix(in srgb, var(--saison-hell) 55%, var(--papier)) 55%, var(--papier) 100%);
  border: 1px solid color-mix(in srgb, var(--saison) 30%, var(--linie)); overflow: hidden; }
.begruessung h1 { margin-bottom: .25em; }
.begruessung p { font-size: 1.12rem; color: var(--tinte-2); margin: 0; }

/* Jahreszeiten-Illustration: Keimling + Wetter */
.szene { width: 210px; height: 150px; justify-self: end; overflow: visible; margin: -6px -6px -14px 0; }
.szene .erde { fill: var(--saison); opacity: .45; }
.szene .stiel { fill: none; stroke: var(--blatt); stroke-width: 5; stroke-linecap: round; }
.szene .blattform { fill: var(--laub); stroke: var(--blatt); stroke-width: 4; stroke-linejoin: round; }
.szene .schnee { fill: #fff; stroke: #C9D9E6; stroke-width: 1.5; }
.szene .bluete { fill: #F7B7CF; stroke: #D9668F; stroke-width: 2; } .szene .bluete-mitte { fill: #F4C542; }
.szene .sonne { fill: #F6C445; } .szene .strahl { stroke: #F6C445; stroke-width: 5; stroke-linecap: round; }
.szene .wetter > * { opacity: 0; }
.szene .flocke { fill: #fff; stroke: #B7CCDD; stroke-width: 1; }
.szene .bluetenblatt { fill: #F4A9C6; }
.szene .laubblatt { fill: #D9772B; } .szene .laubblatt.b { fill: #E9A23B; } .szene .laubblatt.c { fill: #B5531F; }
.szene [data-nur] { display: none; }
html[data-jahreszeit="winter"] .szene [data-nur~="winter"],
html[data-jahreszeit="fruehling"] .szene [data-nur~="fruehling"],
html[data-jahreszeit="sommer"] .szene [data-nur~="sommer"],
html[data-jahreszeit="herbst"] .szene [data-nur~="herbst"] { display: inline; }
@media (prefers-color-scheme: dark) { .szene .schnee, .szene .flocke { fill: #DCE8F2; stroke: none; } }
@media (prefers-reduced-motion: no-preference) {
  .szene .stiel { stroke-dasharray: 200; stroke-dashoffset: 200; animation: wachsen 1.2s .1s cubic-bezier(.4,0,.2,1) forwards; }
  .szene .blattform { transform-box: fill-box; transform: scale(0); animation: aufgehen .6s cubic-bezier(.3,1.4,.5,1) forwards; }
  .szene .blattform.links { transform-origin: right bottom; animation-delay: .95s; }
  .szene .blattform.rechts { transform-origin: left bottom; animation-delay: 1.15s; }
  .szene .wetter > * { animation: fallen 7s linear infinite; }
  .szene .wetter > :nth-child(2) { animation-delay: -1.6s; animation-duration: 8s; }
  .szene .wetter > :nth-child(3) { animation-delay: -3.1s; animation-duration: 6.5s; }
  .szene .wetter > :nth-child(4) { animation-delay: -4.4s; animation-duration: 7.5s; }
  .szene .wetter > :nth-child(5) { animation-delay: -5.6s; animation-duration: 9s; }
  .szene .wetter > :nth-child(6) { animation-delay: -2.4s; animation-duration: 8.5s; }
  .szene .strahlen { transform-box: fill-box; transform-origin: center; animation: drehen 40s linear infinite; }
}
@media (prefers-reduced-motion: reduce) { .szene .wetter > * { opacity: .9; } }
@keyframes wachsen { to { stroke-dashoffset: 0; } }
@keyframes aufgehen { to { transform: scale(1); } }
@keyframes fallen { 0% { opacity: 0; transform: translate(0, -20px) rotate(0); } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-18px, 150px) rotate(220deg); } }
@keyframes drehen { to { transform: rotate(360deg); } }

/* Schmaler Hinweisstreifen */
.streifen { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: var(--radius); border: 1px solid var(--hinweis-rand); background: var(--hinweis); font-size: .97rem; line-height: 1.4; }
.streifen .icon { color: var(--tinte); }
.streifen p { margin: 0; }
.streifen a { white-space: nowrap; font-weight: 700; }
.streifen.wartung { background: var(--fehler-hell); border-color: var(--fehler); }

/* Kacheln der Startseite */
.kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.kachel { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; height: 100%; padding: 14px; min-width: 0; border-radius: var(--radius); background: var(--papier); border: 1px solid var(--linie); box-shadow: var(--schatten); text-decoration: none; color: var(--tinte); transition: border-color .15s, transform .15s; }
.kachel:hover { border-color: var(--blatt); color: var(--tinte); transform: translateY(-2px); }
.kachel .icon-kachel { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--blatt-hell); color: var(--blatt); }
.kachel strong { font: 700 1.05rem/1.2 var(--titel); min-width: 0; }
.kachel span.text { color: var(--tinte-2); font-size: .88rem; line-height: 1.3; }
.kachel.hilfe .icon-kachel { background: var(--saison-hell); color: var(--tinte); }

/* Leiste unten auf der Startseite: Live-Alarm + App */
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--papier); border: 1px solid var(--linie); }
.leiste .text { flex: 1 1 260px; color: var(--tinte-2); font-size: .97rem; line-height: 1.4; }
.leiste .text strong { color: var(--tinte); }
.leiste .knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.meldung { font-size: .92rem; margin: 6px 0 0; }
.meldung.ok { color: var(--erfolg); } .meldung.fehler { color: var(--fehler); }

/* ---------- Flächen ---------- */
.flaeche { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 22px; }
.flaeche + .flaeche { margin-top: 18px; }
.raster-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.raster-2 > .flaeche + .flaeche { margin-top: 0; }

/* ---------- Hinweise ---------- */
.hinweis { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--hinweis-rand); background: var(--hinweis); }
.hinweis .icon { margin-top: 3px; color: var(--tinte); }
.hinweis p { margin: 0 0 .4em; } .hinweis p:last-child { margin: 0; }
.hinweis.info { background: var(--papier-2); border-color: var(--linie); }
.hinweis.fehler { background: var(--fehler-hell); border-color: var(--fehler); }
.hinweis.erfolg { background: var(--erfolg-hell); border-color: var(--erfolg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem/1 var(--schrift); padding: 12px 18px; border-radius: 999px; border: 1.5px solid var(--linie); background: var(--papier); color: var(--tinte); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--blatt); color: var(--tinte); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blatt); border-color: var(--blatt); color: #fff; }
.btn.primary:hover { background: var(--blatt-dunkel); border-color: var(--blatt-dunkel); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary, .btn.primary:hover { color: #0F1A13; } }
.btn.gefahr { color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 40%, transparent); }
.btn.klein { padding: 8px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Einheitlicher Zurück-Button (immer am Seitenende) */
.zurueck { text-align: center; margin-top: 15px; }
.seite > .zurueck { margin-top: 28px; }

/* ---------- Formulare ---------- */
.feld { display: block; margin-bottom: 14px; }
.feld > span { display: block; font-weight: 700; margin-bottom: 6px; }
.feld small { display: block; color: var(--tinte-2); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=date], input[type=number], textarea, select {
  width: 100%; font: inherit; color: var(--tinte); background: var(--papier-2);
  border: 1.5px solid var(--linie); border-radius: var(--radius-klein); padding: 10px 12px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blatt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blatt) 25%, transparent); }

/* ---------- Listen mit Status ---------- */
.eintraege { list-style: none; margin: 0; padding: 0; }
.eintraege li { padding: 12px 0; border-bottom: 1px solid var(--linie); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.eintraege li:last-child { border-bottom: 0; }
.eintraege .titel { font-weight: 700; }
.eintraege .meta { color: var(--tinte-2); font-size: .9rem; grid-column: 1; }
.status { align-self: start; display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--papier-2); border: 1px solid var(--linie); white-space: nowrap; }
.status .icon { width: 1em; height: 1em; }
.status.offen { background: var(--hinweis); border-color: var(--hinweis-rand); }
.status.erledigt { background: var(--erfolg-hell); border-color: color-mix(in srgb, var(--erfolg) 45%, transparent); color: var(--erfolg); }
.status.arbeit { background: var(--blatt-hell); border-color: color-mix(in srgb, var(--blatt) 40%, transparent); }

/* ---------- Fußzeile ---------- */
.fuss { border-top: 1px solid var(--linie); color: var(--tinte-2); font-size: .88rem; padding-bottom: env(safe-area-inset-bottom); }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.fuss a { color: var(--tinte-2); }
.fuss .version { margin-left: auto; }

/* ---------- Admin-Bereich ---------- */
.admin .kopf { background: var(--tinte); border-bottom: 0; }
.admin .kopf .marke, .admin .kopf nav a, .admin .kopf nav button { color: #EAF2EA; }
.admin .kopf .marke .icon { color: #8AD6A3; }
.admin .kopf nav a:hover, .admin .kopf nav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-zusatz { font: 600 .8rem/1 var(--schrift); padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.12); color: #CFE3D3; }
@media (prefers-color-scheme: dark) { .admin .kopf { background: #0A120D; border-bottom: 1px solid var(--linie); } }
.werkzeuge { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.werkzeug { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 16px; border-radius: var(--radius); background: var(--papier); border: 1px solid var(--linie); text-decoration: none; color: var(--tinte); }
.werkzeug:hover { border-color: var(--blatt); color: var(--tinte); }
.werkzeug .icon-kachel { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--blatt-hell); color: var(--blatt); }
.werkzeug strong { font: 700 1.03rem/1.3 var(--titel); }
.werkzeug span { color: var(--tinte-2); font-size: .92rem; line-height: 1.35; }

/* ---------- Tablet & Handy ---------- */
@media (max-width: 900px) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .kopf-innen { padding: 8px 14px; }
  .kopf nav a span, .kopf nav button span { display: none; }
  .seite { padding: 12px 12px 20px; }
  .start { gap: 10px; }
  .begruessung { grid-template-columns: 1fr 92px; gap: 8px; min-height: 0; padding: 14px 10px 14px 16px; }
  .begruessung h1 { font-size: 1.65rem; }
  .begruessung p { font-size: .98rem; }
  .szene { width: 92px; height: 80px; margin: 0 0 -10px; }
  .streifen { padding: 10px 12px; font-size: .9rem; align-items: flex-start; }
  .streifen a { white-space: normal; }
  .kacheln { gap: 10px; }
  .kachel { padding: 10px; gap: 0 9px; grid-template-rows: 1fr; }
  .kachel .icon-kachel { grid-row: auto; }
  .kachel .icon-kachel { width: 34px; height: 34px; border-radius: 9px; }
  .kachel .icon-kachel .icon { width: 1.1em; height: 1.1em; }
  .kachel strong { font-size: .93rem; line-height: 1.15; }
  .kachel span.text { display: none; }
  .leiste { padding: 12px; gap: 8px; }
  .leiste .text { font-size: .92rem; flex-basis: 100%; }
  .leiste .knoepfe, .leiste .knoepfe .btn { width: 100%; }
  .raster-2 { grid-template-columns: 1fr; }
  .seitenkopf .icon-gross { width: 44px; height: 44px; padding: 10px; }
  .fuss-innen { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .szene * { animation: none !important; } .szene .stiel { stroke-dashoffset: 0; } .szene .blattform { transform: none; } }

/* ==========================================================================
   Weitere Bausteine für Unterseiten
   ========================================================================== */

/* Längere Texte (Datenschutz, Impressum, FAQ, Anleitung) */
.prosa { max-width: 72ch; }
.prosa h2 { margin-top: 1.6em; }
.prosa h3 { margin-top: 1.3em; }
.prosa ul, .prosa ol { padding-left: 1.3em; margin: 0 0 1em; }
.prosa li { margin-bottom: .35em; }
.prosa > :first-child { margin-top: 0; }

/* Aufklapp-Fragen (FAQ) */
details.frage { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 0 16px; }
details.frage + details.frage { margin-top: 8px; }
details.frage summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.frage summary::-webkit-details-marker { display: none; }
details.frage summary::after { content: "+"; font: 700 1.3rem/1 var(--titel); color: var(--blatt); }
details.frage[open] summary::after { content: "–"; }
details.frage > :not(summary) { padding-bottom: 14px; margin-top: 0; }

/* Raster mit drei Spalten */
.raster-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .raster-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .raster-3 { grid-template-columns: 1fr; } }

/* Karten in einer Liste (z. B. ThemenTalks, Notizen der MutmachWand) */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.karte { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; box-shadow: var(--schatten); }
.karte h3 { margin-bottom: .3em; }
.karte .meta { color: var(--tinte-2); font-size: .88rem; }
.notiz { background: var(--saison-hell); border: 1px solid color-mix(in srgb, var(--saison) 30%, var(--linie)); border-radius: var(--radius); padding: 16px; font-size: 1.02rem; }

/* Filter-Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.chip { font: 700 .88rem/1 var(--schrift); padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--linie); background: var(--papier); color: var(--tinte); cursor: pointer; }
.chip:hover { border-color: var(--blatt); }
.chip.aktiv, .chip[aria-pressed="true"] { background: var(--blatt); border-color: var(--blatt); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.aktiv, .chip[aria-pressed="true"] { color: #0F1A13; } }

/* Kleine Kennzeichnung */
.marker { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--blatt-hell); color: var(--tinte); }

/* Leerer Zustand / Laden */
.leer { text-align: center; color: var(--tinte-2); padding: 28px 16px; border: 1.5px dashed var(--linie); border-radius: var(--radius); }

/* Tabellen */
.tabelle-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--papier); }
table.tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.tabelle th, table.tabelle td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.tabelle th { font-weight: 700; background: var(--papier-2); }
table.tabelle tr:last-child td { border-bottom: 0; }

/* Dialoge (Bearbeiten-Fenster usw.) */
.dialog-huelle { position: fixed; inset: 0; background: rgba(10, 20, 14, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.dialog { background: var(--papier); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 22px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
dialog { border: 0; border-radius: var(--radius); padding: 22px; background: var(--papier); color: var(--tinte); width: min(560px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(10, 20, 14, .45); }

/* Knopfreihen */
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

/* Tipp-Text unter Formularen, Status-Meldungen */
.leise { color: var(--tinte-2); font-size: .92rem; }

/* Zusatz-Navigation: Zurück-Button oben + schwebender "Nach oben"-Knopf (von pzo.js erzeugt) */
.zurueck-oben { margin: 0 0 18px; }
.nach-oben {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  padding: 10px 16px; box-shadow: var(--schatten);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.nach-oben.sichtbar { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .nach-oben { transition: none; } }
