/* Arbeitszentrale · Root & Rise
   Farben aus der Palette der Website (theme.json), Schriften lokal (keine
   externen Dienste). Ruhig und klar: Papier, Moor, Fjord. Safran markiert
   „heute“, Mohn markiert Überfälliges. */

@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/fonts/hanken-grotesk-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: "Hanken Grotesk"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 250 500; font-display: swap;
  src: url("/fonts/source-serif-4-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: "Source Serif 4"; font-style: normal; font-weight: 250 500; font-display: swap;
  src: url("/fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --papier: #F7F4EE;
  --leinen: #EDE7DB;
  --flaeche: #FFFDF9;
  --linie: #DED6C7;
  --linie-zart: #E9E2D5;
  --text: #1F2D2A;
  --text-sanft: #54615C;
  --text-leise: #7A847F;
  --fjord: #3D5C63;
  --fjord-tief: #2F4A50;
  --fjord-hell: #DCE6E6;
  --salbei: #C9D6D0;
  --safran: #E3A447;
  --safran-hell: #F8E7C8;
  --mohn: #B4472C;
  --mohn-hell: #F5DCD3;
  --fokus: #3D5C63;
  --schatten: 0 1px 2px rgb(31 45 42 / 6%), 0 8px 24px rgb(31 45 42 / 8%);

  --b-food: #C8862A;
  --b-web: #3D5C63;
  --b-alltag: #6E8B7E;
  --b-programm: #A0703F;
  --b-movement: #4F7356;
  --b-buch: #6B7570;
  --b-recht: #7D5E78;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --unten: env(safe-area-inset-bottom, 0px);
  --oben: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #162120;
    --leinen: #1F2D2A;
    --flaeche: #1C2826;
    --linie: #34433F;
    --linie-zart: #2A3835;
    --text: #F1ECE1;
    --text-sanft: #B9C2BC;
    --text-leise: #8C9792;
    --fjord: #8FB3B8;
    --fjord-tief: #A9C7CB;
    --fjord-hell: #263B3E;
    --safran-hell: #3D3220;
    --mohn: #E58A6F;
    --mohn-hell: #3E2620;
    --fokus: #A9C7CB;
    --schatten: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    --b-web: #7FA3A9;
    --b-buch: #9AA39E;
    --b-recht: #B08EAA;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font: 400 16px/1.5 var(--sans);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--fjord); }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.laedt { padding: 3rem 1.5rem; color: var(--text-sanft); text-align: center; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Hinweis in der Testumgebung ---------------------------------------- */

.test-hinweis {
  position: sticky; top: 0; z-index: 30;
  padding: calc(0.35rem + var(--oben)) 1rem 0.35rem; text-align: center; font-size: 0.82rem;
  background: var(--safran-hell); color: color-mix(in srgb, var(--safran) 35%, var(--text));
  border-bottom: 1px solid color-mix(in srgb, var(--safran) 35%, transparent);
}
.test-hinweis + #app .inhalt { padding-top: 0.75rem; }
.test-hinweis + #app .seitenleiste { top: 2rem; height: calc(100dvh - 2rem); }

/* ---- Grundgerüst --------------------------------------------------------- */

.rahmen { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.seitenleiste { display: none; }
.inhalt { min-width: 0; padding: calc(var(--oben) + 0.75rem) 1rem calc(6rem + var(--unten)); }
.inhalt-innen { max-width: 920px; margin: 0 auto; }

.reiter {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--papier) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--linie);
  padding: 0.25rem 0.25rem calc(0.25rem + var(--unten));
}
.reiter a {
  display: grid; justify-items: center; gap: 2px; padding: 0.4rem 0 0.3rem;
  font-size: 0.72rem; letter-spacing: 0.01em; color: var(--text-leise); text-decoration: none; border-radius: 8px;
}
.reiter a svg { width: 22px; height: 22px; }
.reiter a[aria-current="page"] { color: var(--text); }
.reiter a[aria-current="page"] svg { color: var(--fjord); }

@media (min-width: 900px) {
  .rahmen { grid-template-columns: 248px 1fr; }
  .reiter { display: none; }
  .seitenleiste {
    display: flex; flex-direction: column; gap: 1.5rem;
    position: sticky; top: 0; height: 100dvh; padding: 1.5rem 1rem;
    border-right: 1px solid var(--linie-zart); background: var(--papier);
  }
  .inhalt { padding: 2rem 2.5rem 4rem; }
}

.marke { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.5rem; text-decoration: none; color: inherit; }
.marke img { width: 36px; height: 36px; border-radius: 9px; }
.marke b { display: block; font: 400 1.15rem/1.1 var(--serif); }
.marke small { display: block; color: var(--text-leise); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }

.navi { display: grid; gap: 2px; }
.navi a {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.7rem;
  color: var(--text-sanft); text-decoration: none; border-radius: 8px; font-size: 0.95rem;
}
.navi a svg { width: 19px; height: 19px; flex: none; }
.navi a:hover { background: var(--leinen); color: var(--text); }
.navi a[aria-current="page"] { background: var(--leinen); color: var(--text); font-weight: 500; }
.navi a[aria-current="page"] svg { color: var(--fjord); }
.navi .zahl { margin-left: auto; font-size: 0.78rem; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.navi .zahl.warnung { color: var(--mohn); font-weight: 600; }
.navi-unten { margin-top: auto; display: grid; gap: 0.25rem; padding: 0 0.5rem; font-size: 0.82rem; color: var(--text-leise); }
.navi-unten button { justify-self: start; background: none; border: 0; padding: 0.3rem 0; color: var(--text-sanft); cursor: pointer; }
.navi-unten button:hover { color: var(--text); text-decoration: underline; }

/* ---- Kopf einer Ansicht: Horizont mit aufgehender Sonne ------------------- */

.kopf { position: relative; padding: 0.75rem 0 1.1rem; margin-bottom: 0.25rem; }
.kopf::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--linie) 0%, var(--linie) 70%, color-mix(in srgb, var(--safran) 70%, var(--linie)) 88%, var(--linie) 100%);
}
.kopf::before {
  content: ""; position: absolute; right: 9%; bottom: 0; width: 44px; height: 22px;
  border-radius: 44px 44px 0 0;
  background: radial-gradient(circle at 50% 100%, var(--safran) 0 40%, color-mix(in srgb, var(--safran) 30%, transparent) 44%, transparent 72%);
  opacity: 0.85;
}
.kopf-zeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kopf h1 { margin: 0; font: 300 clamp(1.8rem, 5vw, 2.4rem)/1.1 var(--serif); letter-spacing: -0.01em; }
.kopf .unterzeile { margin: 0.25rem 0 0; color: var(--text-sanft); font-size: 0.95rem; }
.kopf .knoepfe { display: flex; gap: 0.5rem; flex-wrap: wrap; padding-right: calc(9% + 56px); }
@media (max-width: 899px) {
  .kopf .knoepfe { padding-right: 0; }
  .kopf .knoepfe .knopf.haupt { display: none; } /* am Handy übernimmt der runde Plus-Knopf */
  .kopf::before { right: 1rem; }
}

/* ---- Knöpfe ------------------------------------------------------------- */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 42px; padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--text);
  font-weight: 500; font-size: 0.95rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.knopf svg { width: 18px; height: 18px; flex: none; }
.knopf:hover { border-color: var(--text-leise); }
.knopf.haupt { background: var(--fjord); border-color: var(--fjord); color: #fff; }
.knopf.haupt:hover { background: var(--fjord-tief); border-color: var(--fjord-tief); }
@media (prefers-color-scheme: dark) { .knopf.haupt { color: #10201F; } }
.knopf.leise { background: transparent; border-color: transparent; color: var(--text-sanft); }
.knopf.leise:hover { background: var(--leinen); color: var(--text); }
.knopf.gefahr { color: var(--mohn); }
.knopf.gefahr:hover { border-color: var(--mohn); }
.knopf.klein { min-height: 34px; padding: 0.3rem 0.75rem; font-size: 0.875rem; }
.knopf.rund { width: 42px; padding: 0; }
.knopf.klein.rund { width: 34px; }
.knopf:disabled { opacity: 0.55; cursor: progress; }

.neu-knopf {
  position: fixed; right: 1rem; bottom: calc(4.6rem + var(--unten)); z-index: 21;
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--fjord); color: #fff; box-shadow: var(--schatten); cursor: pointer;
  display: grid; place-items: center;
}
.neu-knopf svg { width: 26px; height: 26px; }
@media (prefers-color-scheme: dark) { .neu-knopf { color: #10201F; } }
@media (min-width: 900px) { .neu-knopf { display: none; } }

/* ---- Leiste mit Ansichten, Suche, Filter -------------------------------- */

.ansichten {
  display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none;
  margin: 1rem -1rem 0; padding: 0 1rem 0.25rem; scroll-snap-type: x proximity;
}
.ansichten::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .ansichten { margin: 1rem 0 0; padding: 0 0 0.25rem; flex-wrap: wrap; } }
.ansichten a {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--linie);
  color: var(--text-sanft); text-decoration: none; font-size: 0.9rem; background: var(--flaeche);
}
.ansichten a .zahl { font-size: 0.78rem; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.ansichten a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--papier); }
.ansichten a[aria-current="page"] .zahl { color: color-mix(in srgb, var(--papier) 75%, transparent); }

.werkzeuge { display: flex; gap: 0.5rem; margin: 0.9rem 0 0.25rem; align-items: center; flex-wrap: wrap; }
.suche { position: relative; flex: 1 1 220px; }
.suche svg { position: absolute; left: 0.8rem; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--text-leise); pointer-events: none; }
.suche input[type="search"] { padding-left: 2.5rem; border-radius: 999px; }

.filter {
  display: grid; gap: 0.6rem 0.75rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  margin: 0.6rem 0 0; padding: 0.9rem; border: 1px solid var(--linie-zart); border-radius: var(--radius); background: var(--flaeche);
}
.filter label { display: grid; gap: 0.2rem; font-size: 0.8rem; color: var(--text-sanft); }
.filter .filter-ende { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-sanft); }

/* ---- Eingabefelder ------------------------------------------------------ */

input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 44px; padding: 0.55rem 0.75rem;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche);
  font-size: 16px; /* verhindert Zoomen auf dem iPhone */
  -webkit-appearance: none; appearance: none;
}
input[type="date"], input[type="time"] { min-width: 0; display: block; }
select {
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-leise) 50%), linear-gradient(135deg, var(--text-leise) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fjord); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fjord) 18%, transparent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--mohn); }
::placeholder { color: var(--text-leise); opacity: 1; }

.feld { display: grid; gap: 0.3rem; min-width: 0; align-content: start; }
.feld > span:first-child { font-size: 0.85rem; font-weight: 500; color: var(--text-sanft); }
.feld .pflicht { color: var(--mohn); margin-left: 0.15rem; }
.feld .hinweis { font-size: 0.8rem; color: var(--text-leise); line-height: 1.4; }
.feld .hinweis.schutz { color: var(--text-sanft); display: flex; gap: 0.35rem; }
.feld .hinweis.schutz svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--b-programm); }
.feld .fehler { font-size: 0.82rem; color: var(--mohn); }
.schalter { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; cursor: pointer; }
.schalter input { width: 22px; height: 22px; accent-color: var(--fjord); margin: 0; }

/* ---- Listen ------------------------------------------------------------- */

.gruppe { margin-top: 1.5rem; }
.gruppe > h2 {
  display: flex; align-items: baseline; gap: 0.6rem; margin: 0 0 0.4rem;
  font: 500 0.78rem/1.2 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-leise);
}
.gruppe > h2 .zahl { letter-spacing: 0; font-variant-numeric: tabular-nums; }
.gruppe.ueberfaellig > h2 { color: var(--mohn); }
.gruppe.heute > h2 { color: color-mix(in srgb, var(--safran) 70%, var(--text)); }

.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie-zart); }
.liste > li { border-bottom: 1px solid var(--linie-zart); }

.eintrag { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.8rem 0.25rem; }
.eintrag-text { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 0.2rem; }
.eintrag-text:hover .eintrag-titel { color: var(--fjord); }
.eintrag-titel { font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.eintrag.inaktiv .eintrag-titel { color: var(--text-leise); }
.eintrag.erledigt .eintrag-titel { color: var(--text-leise); text-decoration: line-through; text-decoration-color: var(--linie); }
.eintrag-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; font-size: 0.84rem; color: var(--text-sanft); }
.eintrag-meta > * { display: inline-flex; align-items: center; gap: 0.3rem; }
.eintrag-meta svg { width: 14px; height: 14px; }
.eintrag-rechts { flex: none; text-align: right; font-size: 0.84rem; color: var(--text-sanft); font-variant-numeric: tabular-nums; }

.abhaken {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  border: 1.5px solid var(--text-leise); background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0;
  color: transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.abhaken svg { width: 15px; height: 15px; }
.abhaken:hover { border-color: var(--fjord); color: var(--fjord); }
.abhaken[aria-pressed="true"] { background: var(--fjord); border-color: var(--fjord); color: #fff; }
@media (pointer: coarse) { .abhaken { width: 30px; height: 30px; } }

.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--b, var(--text-leise)); flex: none; }
.marke-text { padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--leinen); color: var(--text-sanft); font-size: 0.78rem; line-height: 1.5; }
.marke-text.hoch { background: var(--mohn-hell); color: var(--mohn); font-weight: 600; }
.marke-text.warten { background: var(--fjord-hell); color: var(--fjord-tief); }
.marke-text.entscheidung { background: var(--safran-hell); color: color-mix(in srgb, var(--safran) 45%, var(--text)); }
.marke-text.abnahme { background: var(--salbei); color: #2F4A44; }
@media (prefers-color-scheme: dark) { .marke-text.abnahme { background: #2E3E39; color: var(--text-sanft); } }
.frist-ueber { color: var(--mohn); font-weight: 600; }
.frist-heute { color: color-mix(in srgb, var(--safran) 55%, var(--text)); font-weight: 600; }
.leise { color: var(--text-leise); }

.leer { padding: 2.5rem 1rem; text-align: center; color: var(--text-sanft); }
.leer b { display: block; font: 300 1.4rem/1.3 var(--serif); color: var(--text); margin-bottom: 0.3rem; }

/* ---- Termine (Woche) ---------------------------------------------------- */

.woche-navi { display: flex; align-items: center; gap: 0.4rem; margin: 1rem 0 0.5rem; flex-wrap: wrap; }
.woche-navi .knopf[aria-current="page"] { border-color: var(--text-sanft); font-weight: 600; }
.woche-navi .titel { font: 400 1.1rem/1.2 var(--serif); margin-right: auto; }
.tag { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--linie-zart); }
.tag:first-of-type { border-top: 1px solid var(--linie-zart); }
.tag-datum { display: grid; align-content: start; justify-items: start; gap: 0.1rem; }
.tag-datum b { font: 300 1.7rem/1 var(--serif); font-variant-numeric: lining-nums; }
.tag-datum span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-leise); }
.tag.ist-heute .tag-datum b { color: color-mix(in srgb, var(--safran) 70%, var(--text)); }
.tag.ist-heute .tag-datum span { color: color-mix(in srgb, var(--safran) 60%, var(--text)); font-weight: 600; }
.tag.vergangen .tag-datum { opacity: 0.6; }
.tag-termine { display: grid; gap: 0.35rem; min-width: 0; }
.tag-termine .tag-leer { display: flex; align-items: center; justify-content: space-between; color: var(--text-leise); font-size: 0.9rem; min-height: 34px; }
.termin {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.1rem 0.75rem; text-align: left; width: 100%;
  padding: 0.55rem 0.75rem; border: 1px solid var(--linie-zart); border-left: 3px solid var(--b, var(--fjord));
  border-radius: 8px; background: var(--flaeche); cursor: pointer;
}
.termin:hover { border-color: var(--linie); border-left-color: var(--b, var(--fjord)); }
.termin .uhr { font-variant-numeric: tabular-nums; color: var(--text-sanft); font-size: 0.88rem; padding-top: 1px; }
.termin .was { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.termin .wo { grid-column: 2; font-size: 0.84rem; color: var(--text-sanft); display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; }
.termin .wo > * { display: inline-flex; align-items: center; gap: 0.3rem; }
.termin .wo svg { width: 14px; height: 14px; flex: none; }
.termin.abgesagt .was { text-decoration: line-through; color: var(--text-leise); }
.tag-plus { justify-self: start; }
@media (max-width: 640px) {
  .tag { grid-template-columns: 2.6rem 1fr; gap: 0.6rem; }
  .termin { grid-template-columns: 1fr; }
  .termin .uhr { font-size: 0.82rem; }
  .termin .wo { grid-column: 1; }
  .tag-termine > .tag-plus { display: none; } /* Termin am Tag: runder Plus-Knopf oder leere Tage */
}

/* ---- Zeiten (Summen) ---------------------------------------------------- */

.summen { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; margin: 1rem 0 0.25rem; }
.summe { padding: 0.75rem 0.9rem; border: 1px solid var(--linie-zart); border-radius: var(--radius); background: var(--flaeche); }
.summe b { display: block; font: 300 1.6rem/1.15 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.summe span { font-size: 0.8rem; color: var(--text-sanft); }

/* ---- Karten, Abschnitte ------------------------------------------------- */

.karten { display: grid; gap: 0.6rem; margin-top: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.karte {
  display: grid; gap: 0.25rem; padding: 1rem 1.1rem; border: 1px solid var(--linie-zart); border-radius: var(--radius);
  background: var(--flaeche); text-decoration: none; color: inherit; text-align: left; cursor: pointer;
}
.karte:hover { border-color: var(--linie); }
.karte b { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.karte b svg { width: 18px; height: 18px; color: var(--fjord); }
.karte span { font-size: 0.88rem; color: var(--text-sanft); }

.abschnitt { margin-top: 1.75rem; }
.abschnitt h2 { font: 400 1.25rem/1.3 var(--serif); margin: 0 0 0.6rem; }
.abschnitt p { margin: 0.4rem 0; color: var(--text-sanft); max-width: 62ch; }
.abschnitt .knoepfe { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.protokoll-zeile { display: grid; gap: 0.15rem; padding: 0.6rem 0.25rem; font-size: 0.9rem; }
.protokoll-zeile small { color: var(--text-leise); font-size: 0.8rem; }

/* ---- Dialog (Formular) -------------------------------------------------- */

dialog.blatt {
  width: min(680px, 100vw); max-width: 100vw; max-height: 100dvh; margin: auto; padding: 0;
  border: 0; border-radius: 14px; background: var(--papier); color: var(--text); box-shadow: var(--schatten);
}
dialog.blatt::backdrop { background: rgb(22 33 32 / 38%); backdrop-filter: blur(2px); }
dialog.blatt[open] { animation: auf .18s ease-out; }
@keyframes auf { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
.blatt-form { display: flex; flex-direction: column; max-height: min(92dvh, 900px); }
.blatt-kopf { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem 0.75rem; border-bottom: 1px solid var(--linie-zart); }
.blatt-kopf h2 { flex: 1; margin: 0; font: 400 1.35rem/1.2 var(--serif); }
.blatt-inhalt { overflow-y: auto; padding: 1.1rem 1.25rem 1.25rem; display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; overscroll-behavior: contain; }
.blatt-inhalt > .ganz { grid-column: 1 / -1; }
.blatt-fuss {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.8rem 1.25rem calc(0.8rem + var(--unten));
  border-top: 1px solid var(--linie-zart); background: color-mix(in srgb, var(--leinen) 45%, var(--papier));
}
.blatt-fuss .rechts { margin-left: auto; display: flex; gap: 0.5rem; }
.blatt-meta { grid-column: 1 / -1; font-size: 0.8rem; color: var(--text-leise); }
.blatt-meldung { grid-column: 1 / -1; padding: 0.6rem 0.8rem; border-radius: 8px; background: var(--mohn-hell); color: var(--mohn); font-size: 0.9rem; }
.blatt-zusatz { grid-column: 1 / -1; border-top: 1px solid var(--linie-zart); padding-top: 1rem; display: grid; gap: 0.5rem; }
.blatt-zusatz h3 { margin: 0; font: 500 0.78rem/1.2 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-leise); }
.blatt-zusatz ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; font-size: 0.9rem; }

.auswahl-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; grid-column: 1 / -1; }
.auswahl-liste button {
  width: 100%; text-align: left; display: grid; gap: 0.15rem; padding: 0.75rem 0.9rem; cursor: pointer;
  border: 1px solid var(--linie-zart); border-radius: var(--radius); background: var(--flaeche);
}
.auswahl-liste button:hover { border-color: var(--fjord); }
.auswahl-liste b { font-weight: 500; }
.auswahl-liste span { font-size: 0.85rem; color: var(--text-sanft); }

@media (max-width: 640px) {
  dialog.blatt { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  dialog.blatt[open] { animation: hoch .22s ease-out; }
  @keyframes hoch { from { translate: 0 30px; opacity: 0.6; } to { translate: 0 0; opacity: 1; } }
  .blatt-form { height: 100dvh; max-height: 100dvh; }
  .blatt-kopf { padding-top: calc(0.9rem + var(--oben)); }
  .blatt-inhalt { grid-template-columns: 1fr; flex: 1; }
  .blatt-fuss .rechts { width: 100%; margin-left: 0; }
  .blatt-fuss .rechts .knopf { flex: 1; }
}

/* ---- Meldungen ---------------------------------------------------------- */

.meldungen { position: fixed; z-index: 50; left: 50%; translate: -50% 0; bottom: calc(5.5rem + var(--unten)); display: grid; gap: 0.5rem; width: min(440px, calc(100vw - 2rem)); pointer-events: none; }
@media (min-width: 900px) { .meldungen { bottom: 1.5rem; } }
.meldung {
  pointer-events: auto; display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.8rem 0.7rem 1rem;
  border-radius: 10px; background: var(--text); color: var(--papier); box-shadow: var(--schatten); font-size: 0.92rem;
  animation: auf .18s ease-out;
}
.meldung.fehler { background: var(--mohn); color: #fff; }
.meldung span { flex: 1; }
.meldung button { background: none; border: 1px solid color-mix(in srgb, var(--papier) 40%, transparent); color: inherit; border-radius: 999px; padding: 0.25rem 0.75rem; cursor: pointer; font-weight: 500; }

/* ---- Anmeldung ---------------------------------------------------------- */

.anmeldung { min-height: 100dvh; display: grid; place-items: center; padding: calc(1.5rem + var(--oben)) 1rem calc(1.5rem + var(--unten)); }
.anmeldung-karte { width: min(400px, 100%); }
.anmeldung-horizont { position: relative; height: 88px; margin-bottom: 1.25rem; overflow: hidden; }
.anmeldung-horizont::before {
  content: ""; position: absolute; left: 50%; bottom: -46px; width: 92px; height: 92px; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle, var(--safran) 0 46%, color-mix(in srgb, var(--safran) 30%, transparent) 50%, transparent 72%);
  animation: aufgang 1.6s cubic-bezier(.2,.7,.2,1) both;
}
.anmeldung-horizont::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--linie) 15%, var(--linie) 85%, transparent); }
@keyframes aufgang { from { translate: -50% 40px; opacity: 0; } to { translate: -50% 0; opacity: 1; } }
.anmeldung h1 { margin: 0; text-align: center; font: 300 2rem/1.15 var(--serif); }
.anmeldung .unterzeile { margin: 0.35rem 0 1.5rem; text-align: center; color: var(--text-leise); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.anmeldung form { display: grid; gap: 0.9rem; }
.anmeldung .knopf.haupt { width: 100%; min-height: 48px; }
.anmeldung .text { margin: 0; color: var(--text-sanft); font-size: 0.95rem; text-align: center; }
.anmeldung .verweise { display: flex; justify-content: center; gap: 1rem; margin-top: 0.5rem; font-size: 0.9rem; }
.anmeldung .verweise a, .anmeldung .verweise button { color: var(--text-sanft); background: none; border: 0; padding: 0.25rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.anmeldung .info { padding: 0.7rem 0.9rem; border-radius: 8px; background: var(--fjord-hell); color: var(--fjord-tief); font-size: 0.92rem; }
.anmeldung .fehler { padding: 0.7rem 0.9rem; border-radius: 8px; background: var(--mohn-hell); color: var(--mohn); font-size: 0.92rem; }
.code-feld input { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

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