/* Dash – Stil „Papier“ nach design/claude-design (Farbwerte: design/claude-design/README.md).
   Schriften liegen selbst gehostet unter /schriften/ (keine Google Fonts). */

@font-face {
  font-family: "Fraunces";
  src: url("/schriften/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/schriften/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="hell"] {
  --grund: #faf7f1;
  --karte: #fffdf9;
  --tinte: #2b2621;
  --tinte-2: #5a5249;
  --gedaempft: #736a60;
  --linie: #e9e2d7;
  --flaeche: #f3eee5;
  --rand-feld: #ddd4c6;
  --akzent: #b9603a;
  --akzent-text: #9c4d2b;
  --akzent-flaeche: #f6e9e0;
  --ok: #7c9885;
  --ok-text: #4f6b58;
  --ok-flaeche: #ecf1ea;
  --warn: #c79a4e;
  --warn-text: #80591a;
  --warn-flaeche: #f7efdf;
  --krit: #b23b2e;
  --krit-text: #b23b2e;
  --krit-flaeche: #f8e8e3;
  --schatten: 0 1px 2px rgba(70, 50, 30, 0.04), 0 12px 28px -20px rgba(70, 50, 30, 0.22);
  color-scheme: light;
}
[data-theme="dunkel"] {
  --grund: #1b1814;
  --karte: #23201b;
  --tinte: #efe8dc;
  --tinte-2: #c9bfb0;
  --gedaempft: #9d9283;
  --linie: #38322b;
  --flaeche: #2c2822;
  --rand-feld: #4a4239;
  --akzent: #dc8a62;
  --akzent-text: #e49a74;
  --akzent-flaeche: #3a271d;
  --ok: #93b09c;
  --ok-text: #a3c2ac;
  --ok-flaeche: #253029;
  --warn: #d8ad62;
  --warn-text: #e0b96f;
  --warn-flaeche: #352b1b;
  --krit: #e07a68;
  --krit-text: #ea8b79;
  --krit-flaeche: #3b2420;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.02), 0 12px 28px -18px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--tinte);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.serif { font-family: Fraunces, Georgia, serif; }
.zahlen-schrift { font-variant-numeric: lining-nums tabular-nums; }
.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gedaempft);
}
.gedaempft { color: var(--gedaempft); }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 6px; }

/* ── Knöpfe ── */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--linie); background: var(--karte); color: var(--tinte-2);
  font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.knopf:hover { border-color: var(--rand-feld); }
.knopf[aria-pressed="true"] { background: var(--akzent-flaeche); color: var(--akzent-text); border-color: var(--akzent); }
.knopf-primaer {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 22px; border-radius: 12px; border: 0;
  background: var(--akzent); color: #fffdf9; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.knopf-primaer:disabled { opacity: 0.6; cursor: default; }
.knopf-text { border: 0; background: none; color: var(--akzent-text); min-height: 44px; padding: 0 8px; cursor: pointer; font-size: 13.5px; }
.knopf-gefahr { color: var(--krit-text); }

/* ── Formularfelder ── */
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld > span { font-size: 13px; font-weight: 500; }
.eingabe {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--rand-feld); background: var(--karte); font-size: 15px;
}
textarea.eingabe { padding: 10px 14px; min-height: 80px; resize: vertical; }
.fehlertext { color: var(--krit-text); font-size: 13.5px; font-weight: 500; min-height: 20px; margin: 0; }

/* ── App-Hülle ── */
.huelle { min-height: 100vh; display: flex; align-items: stretch; }
.seitenleiste {
  flex: 0 0 240px; padding: 32px 16px 24px; border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh;
}
.wortmarke { padding: 0 12px; }
.wortmarke b { display: block; font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.wortmarke span { font-size: 12px; color: var(--gedaempft); }
.navliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.navliste a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; text-decoration: none; color: var(--tinte-2);
}
.navliste a[aria-current="page"] { color: var(--akzent-text); background: var(--akzent-flaeche); font-weight: 500; }
.quellenstatus { margin-top: auto; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; font-size: 12.5px; color: var(--gedaempft); text-decoration: none; }
.quellenstatus.gestoert { color: var(--krit-text); }
.punkt { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.inhalt { flex: 1 1 auto; min-width: 0; padding: 36px 44px 64px; }
.spalte { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

.kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.kopf h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 42px; line-height: 1.1; letter-spacing: -0.015em; }
.kopf p { margin: 8px 0 0; font-size: 15px; color: var(--gedaempft); }
.kopf-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Handlungsbedarf ── */
.bedarf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; padding: 4px 20px;
  border: 1px solid var(--linie); border-radius: 14px; background: var(--karte); box-shadow: var(--schatten);
}
.bedarf .label { margin-right: 4px; }
.bedarf a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; text-decoration: none; color: var(--tinte-2); }
.bedarf .n { font-family: Fraunces, Georgia, serif; font-size: 23px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.bedarf .ruhig { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; color: var(--ok-text); font-size: 14px; }
.s-kritisch { --s: var(--krit); --s-text: var(--krit-text); }
.s-warnung { --s: var(--warn); --s-text: var(--warn-text); }
.s-akzent { --s: var(--akzent); --s-text: var(--akzent-text); }
.bedarf a .punkt { background: var(--s); }
.bedarf a .n { color: var(--s-text); }

/* ── Kacheln ── */
.raster { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.raster > .reihe { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.raster > .reihe.breit { flex: 1.3 1 380px; }
.kachel {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; box-shadow: var(--schatten);
  padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 24px;
}
.kachel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.kachel-kopf h2 { margin: 0; }
.stand { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; color: var(--gedaempft); }
.stand .punkt { width: 6px; height: 6px; }
.stand.laedt .punkt { background: var(--linie); }
.stand.fehler { color: var(--krit-text); }
.stand.fehler .punkt { background: var(--krit); }

.skelett { display: flex; flex-direction: column; gap: 12px; }
.skelett i { display: block; height: 12px; border-radius: 6px; background: var(--flaeche); }
.skelett .bloecke { display: flex; gap: 12px; }
.skelett .bloecke i { flex: 1; height: 44px; border-radius: 10px; }
.leer { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 10px 0 4px; }
.leer .haken { width: 40px; height: 40px; border-radius: 50%; background: var(--ok-flaeche); color: var(--ok-text); display: inline-flex; align-items: center; justify-content: center; }
.leer b { font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 21px; line-height: 1.2; }
.leer p { margin: 0; font-size: 14px; color: var(--gedaempft); }
.fehlerband {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 10px 10px 14px;
  border-radius: 12px; background: var(--krit-flaeche);
}
.fehlerband div { flex: 1 1 170px; min-width: 0; }
.fehlerband b { display: block; font-size: 13.5px; color: var(--krit-text); }
.fehlerband span { font-size: 12.5px; color: var(--tinte-2); }

/* Heute: Zeitleiste */
.tag-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.tag-kopf h3 { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 19px; }
.tag-kopf span { font-size: 12px; color: var(--gedaempft); }
.termin { display: grid; grid-template-columns: 56px minmax(0, 1fr); text-decoration: none; color: var(--tinte); }
.termin .von { padding-top: 10px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.termin .was { position: relative; border-left: 1px solid var(--linie); padding: 9px 0 11px 16px; display: flex; flex-direction: column; gap: 1px; }
.termin .was::before { content: ""; position: absolute; left: -5px; top: 16px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--gedaempft); background: var(--karte); }
.termin .titel { font-size: 14.5px; font-weight: 500; }
.termin .ort { font-size: 12.5px; color: var(--gedaempft); }
.jetzt { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; min-height: 32px; }
.jetzt > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--akzent-text); font-variant-numeric: tabular-nums; }
.jetzt > span:last-child { position: relative; display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--linie); padding-left: 16px; min-height: 32px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--akzent-text); }
.jetzt > span:last-child::before { content: ""; position: absolute; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--akzent); }
.jetzt > span:last-child::after { content: ""; flex: 1; height: 1px; background: var(--akzent); opacity: 0.35; }
.keine-termine { font-size: 13.5px; color: var(--gedaempft); padding: 6px 0 0 72px; }

/* 2Do-Zeilen */
.todo { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 0; border-top: 1px solid var(--linie); }
.todo:first-child { border-top: 0; }
.haekchen {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--rand-feld);
  background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: transparent; padding: 0;
  position: relative;
}
.haekchen::after { content: ""; position: absolute; inset: -10px; } /* Klickfläche 44 px */
.haekchen:hover { border-color: var(--ok); color: var(--ok); }
.haekchen[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fffdf9; }
.todo .text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--tinte); }
.todo .text b { font-weight: 400; font-size: 14px; }
.todo .text span { font-size: 12px; color: var(--gedaempft); display: inline-flex; align-items: center; gap: 6px; }
.prio { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--linie); }
.prio-hoch { background: var(--krit); }
.prio-mittel { background: var(--warn); }
.faellig { font-size: 12.5px; white-space: nowrap; color: var(--gedaempft); }
.faellig.ueber { color: var(--krit-text); font-weight: 600; }
.faellig.heute { color: var(--warn-text); font-weight: 600; }

/* Mail */
.zahlenreihe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zahl { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--flaeche); min-height: 44px; }
.zahl b { font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 34px; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.zahl span { font-size: 12.5px; color: var(--tinte-2); }
.zahl.krit { background: var(--krit-flaeche); } .zahl.krit b { color: var(--krit-text); }
.zahl.akz { background: var(--akzent-flaeche); } .zahl.akz b { color: var(--akzent-text); }
.mailzeile { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 0; border-top: 1px solid var(--linie); text-decoration: none; color: var(--tinte); }
.mailzeile .punkt { background: var(--krit); width: 8px; height: 8px; }
.mailzeile.warnung .punkt { background: var(--warn); }
.mailzeile > span:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mailzeile small { font-size: 12px; color: var(--gedaempft); }

/* Apps */
.appgruppe { display: flex; flex-direction: column; gap: 10px; }
.appgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.app { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--linie); border-radius: 12px; text-decoration: none; color: var(--tinte); background: var(--karte); }
.app:hover { border-color: var(--akzent); }
.app b { font-weight: 500; }
.app span { font-size: 12px; color: var(--gedaempft); }
.appgruppe.leise .app { min-height: 44px; background: transparent; }

/* ── Datenschutzmodus ── */
[data-datenschutz="an"] .geheim:not(.aufgedeckt) { filter: blur(5px); }
.geheim { transition: filter 0.15s; }

/* ── Anmeldung ── */
.anmeldung { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.anmeldung aside {
  flex: 1 1 420px; padding: 48px 56px; background: var(--flaeche); border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.anmeldung aside .wm { font-family: Fraunces, Georgia, serif; font-size: 26px; letter-spacing: -0.01em; }
.anmeldung aside p.gross { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 300; font-size: 52px; line-height: 1.08; letter-spacing: -0.02em; }
.anmeldung main { flex: 1 1 420px; padding: 48px 24px; display: flex; align-items: center; justify-content: center; }
.anmeldung form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.anmeldung h1 { margin: 8px 0 6px; font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: -0.015em; }
.anmeldung .eyebrow { color: var(--akzent-text); }
.codefeld { position: relative; }
.codefeld .boxen { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.codefeld .boxen span { height: 56px; border-radius: 10px; border: 1px solid var(--rand-feld); background: var(--karte); display: flex; align-items: center; justify-content: center; font-family: Fraunces, Georgia, serif; font-size: 26px; }
.codefeld .boxen span.aktiv { border: 1.5px solid var(--akzent); }
.codefeld input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; }
.merken { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; }
.merken input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--akzent); }

/* ── PIN ── */
.pin { max-width: 420px; margin: 0 auto; min-height: 100vh; padding: 28px 24px 24px; display: flex; flex-direction: column; }
.pin .oben { display: flex; align-items: center; justify-content: space-between; }
.pin .oben b { font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 21px; }
.pin .mitte { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px 0; }
.pin .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--akzent-flaeche); color: var(--akzent-text); display: inline-flex; align-items: center; justify-content: center; font-family: Fraunces, Georgia, serif; font-size: 24px; }
.pin h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.15; }
.pin .mitte p { margin: 6px 0 0; color: var(--tinte-2); }
.pin .punkte { display: flex; gap: 14px; padding: 6px 0; }
.pin .punkte span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--rand-feld); }
.pin .punkte span.voll { background: var(--akzent); border-color: var(--akzent); }
.pin .punkte.falsch span { border-color: var(--krit); }
.tasten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tasten button { height: 68px; border-radius: 18px; border: 1px solid var(--linie); background: var(--karte); font-family: Fraunces, Georgia, serif; font-size: 30px; cursor: pointer; box-shadow: 0 1px 2px rgba(70, 50, 30, 0.05); }
.tasten button.loeschen { border: 0; background: transparent; box-shadow: none; color: var(--tinte-2); display: inline-flex; align-items: center; justify-content: center; }
.tasten button:active { background: var(--flaeche); }
.pin .unten { display: flex; justify-content: center; padding-top: 10px; }

/* ── Sperre ── */
.verwischt { filter: blur(14px); pointer-events: none; user-select: none; }
.sperre { position: fixed; inset: 0; z-index: 10; background: color-mix(in srgb, var(--grund) 55%, transparent); overflow: auto; }

/* ── Seiten ── */
.seitenkopf h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 36px; letter-spacing: -0.015em; }
.seitenkopf p { margin: 6px 0 0; color: var(--gedaempft); }
.abschnitt { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.abschnitt h2 { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: 21px; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 52px; border-top: 1px solid var(--linie); padding: 6px 0; }
.zeile:first-of-type { border-top: 0; }
.zeile > div { min-width: 0; display: flex; flex-direction: column; }
.zeile small { color: var(--gedaempft); font-size: 12.5px; }
.wahl { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.neu-2do { display: grid; grid-template-columns: minmax(0, 1fr) 160px 140px 150px auto; gap: 8px; align-items: end; }
.bereich-kopf { margin: 8px 0 0; }

/* ── Handy ── */
.untennav { display: none; }
@media (max-width: 767px) {
  .seitenleiste { display: none; }
  .inhalt { padding: 20px 16px 96px; }
  .kopf h1 { font-size: 30px; }
  .kopf-knoepfe .knopf .lang { display: none; }
  .bedarf { position: sticky; top: 8px; z-index: 5; padding: 2px 14px; gap: 0 16px; }
  .kachel { padding: 18px 16px 20px; }
  .untennav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    background: var(--karte); border-top: 1px solid var(--linie); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .untennav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; min-height: 52px; font-size: 11.5px; text-decoration: none; color: var(--tinte-2); border-radius: 10px; }
  .untennav a[aria-current="page"] { color: var(--akzent-text); background: var(--akzent-flaeche); }
  .anmeldung aside { display: none; }
  .neu-2do { grid-template-columns: 1fr 1fr; }
  .neu-2do .eingabe-titel { grid-column: 1 / -1; }
}

/* Ergänzungen */
.augenknopf { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--gedaempft); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pin .mitte .tasten, .pin .tasten, .pin-klein .tasten { width: 100%; max-width: 340px; }
.pin-klein .mitte { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pin-klein .punkte { display: flex; gap: 14px; }
.pin-klein .punkte span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--rand-feld); }
.pin-klein .punkte span.voll { background: var(--akzent); border-color: var(--akzent); }
.pin-klein .tasten button { height: 56px; }
.sperre .pin { background: transparent; }
