/* Kundenbuch: Inkas Farben (inkahaase.de) in Apple-Anmutung. Überschriften in Cormorant Garamond wie auf ihrer Website,
   alles andere in der Systemschrift (SF auf dem iPhone). Gruppierte Listen statt einzelner Kärtchen. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
:root {
  --papier: #faf9f6;
  --flaeche: #ffffff;
  --tinte: #2b2b2b;
  --grau: #6b6b6b;
  --trenner: #e4e4e4;
  --rand: #8a8a8a;
  --salbei: #bbc9bb;
  --salbei-hell: #e7ede5;
  --salbei-tief: #4f6448;
  --warnung-grund: #f6eedd;
  --warnung: #6e5320;
  --fehler: #a33a2c;
  --radius: 12px;
  --seite: 248px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 17px/1.42 var(--sans); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--salbei-tief); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Gerüst: linke Menüspalte ---------- */
.rahmen { min-height: 100vh; }
.seitenleiste {
  position: fixed; inset: 0 auto 0 0; width: var(--seite); z-index: 30;
  display: flex; flex-direction: column; gap: 2px;
  background: #f2f1ec; border-right: 1px solid var(--trenner);
  padding: calc(20px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom));
}
.marke-name { font: 600 28px/1.1 var(--serif); letter-spacing: 0; margin: 0 10px 22px; }
.seitenleiste a {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 10px;
  color: var(--tinte); text-decoration: none; font-size: 16px;
}
.seitenleiste a span:first-of-type { flex: 1; }
.seitenleiste a svg { color: var(--salbei-tief); }
.seitenleiste a[aria-current="page"] { background: var(--salbei); font-weight: 600; }
.seitenleiste a[aria-current="page"] svg { color: var(--tinte); }
.zahl { font-size: 14px; color: var(--grau); font-variant-numeric: tabular-nums; }
.seitenleiste a[aria-current="page"] .zahl { color: var(--tinte); }
.aufnahme-seite {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; border-radius: 12px; border: 0; background: var(--salbei-tief); color: #fff;
  font: 600 16px var(--sans); cursor: pointer;
}
.spalte { margin-left: var(--seite); min-height: 100vh; }
.kopf {
  display: flex; align-items: center; gap: 8px;
  padding: calc(22px + env(safe-area-inset-top)) 24px 10px; max-width: 760px;
}
h1 { font: 600 38px/1.05 var(--serif); letter-spacing: 0; margin: 0; }
main { padding: 0 24px 120px; max-width: 760px; outline: none; }
.schleier { position: fixed; inset: 0; z-index: 25; background: rgba(43, 43, 43, 0.28); }
.menue-knopf {
  width: 44px; height: 44px; margin-left: -10px; border: 0; background: transparent; color: var(--salbei-tief);
  display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer;
}
.menue-knopf svg { width: 26px; height: 26px; }
.aufnahme-schwebend {
  position: fixed; right: 20px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 20;
  width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--salbei-tief); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 6px 18px rgba(43, 43, 43, 0.22);
}
.aufnahme-schwebend svg { width: 28px; height: 28px; stroke-width: 1.9; }

@media (max-width: 899px) {
  .seitenleiste { transform: translateX(-105%); transition: transform 0.22s ease; }
  .seitenleiste.offen { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.12); }
  .spalte { margin-left: 0; }
  .kopf { padding: calc(10px + env(safe-area-inset-top)) 16px 4px; flex-wrap: wrap; }
  h1 { flex-basis: 100%; font-size: 34px; margin-top: 4px; }
  main { padding: 0 16px 120px; }
  .aufnahme-seite { display: none; }
}
@media (min-width: 900px) {
  .menue-knopf, .schleier, .aufnahme-schwebend { display: none !important; }
}

/* ---------- Gruppierte Listen ---------- */
h2 { font: 600 13px/1.3 var(--sans); color: var(--grau); margin: 26px 16px 7px; letter-spacing: 0; }
.gruppe { background: var(--flaeche); border-radius: var(--radius); overflow: hidden; margin: 0 0 14px; }
.gruppe > .karte {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 60px;
  margin: 0; padding: 11px 36px 11px 16px; border: 0; border-radius: 0; position: relative; background: transparent;
}
.gruppe > .karte + .karte::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--trenner); }
.gruppe > a.karte::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -5px;
  border-right: 2px solid #c4c4c4; border-top: 2px solid #c4c4c4; transform: rotate(45deg);
}
.gruppe > a.karte:active { background: var(--salbei-hell); }
.karte {
  display: block; background: var(--flaeche); color: var(--tinte); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 12px; text-decoration: none; font: inherit; border: 0; width: 100%; text-align: left;
}
.karte .zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.name { font-weight: 600; }
.klein { font-size: 15px; color: var(--grau); }
.ueberfaellig { color: var(--fehler); font-size: 15px; font-weight: 600; white-space: nowrap; }
.bald { color: var(--grau); font-size: 15px; white-space: nowrap; }
.leer { color: var(--grau); text-align: center; padding: 40px 12px; margin: 0; }
.notizen { white-space: pre-wrap; margin: 8px 0 0; }
.marke { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--salbei-hell); font-size: 14px; margin: 6px 6px 0 0; }

/* ---------- Bedienelemente ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 0;
  background: var(--salbei-hell); color: var(--salbei-tief); font: 600 16px var(--sans); text-decoration: none; cursor: pointer;
}
.knopf.haupt { background: var(--salbei-tief); color: #fff; }
.knopf.gefahr { background: #f6e6e3; color: var(--fehler); }
.knopf.leise { background: transparent; padding-left: 4px; padding-right: 4px; }
.knopf.gross { width: 100%; min-height: 52px; font-size: 17px; }
.knopf:disabled { opacity: 0.55; cursor: default; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chip {
  min-height: 44px; min-width: 44px; padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rand); background: var(--flaeche); color: var(--tinte); font: 15px var(--sans);
}
.chip[aria-pressed="true"] { background: var(--salbei); border-color: var(--salbei-tief); font-weight: 600; }
label { display: block; font: 600 13px var(--sans); color: var(--grau); margin: 16px 2px 6px; }
input, textarea, select {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--rand); background: var(--flaeche); color: var(--tinte); font: 17px var(--sans);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
:where(.knopf, .chip, .karte, input, textarea, select, .seitenleiste a, .aufnahme-seite, .aufnahme-schwebend, .menue-knopf):focus-visible {
  outline: 3px solid var(--salbei-tief); outline-offset: 2px;
}
.warnung { background: var(--warnung-grund); color: var(--warnung); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.warnung p { margin: 0 0 8px; }
.text-vorschau { font: italic 500 22px/1.35 var(--serif); letter-spacing: 0; margin: 4px 0 8px; white-space: pre-wrap; }
.pruefmaske-aktiv { padding: 18px 16px 8px; }
.pruefmaske-aktiv h2 { margin: 0 0 4px; }

/* ---------- Monat ---------- */
.monatswahl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 14px; }
.monatswahl strong { font: 600 22px var(--serif); letter-spacing: 0; }
.zahl-gross { font: 600 46px/1.05 var(--serif); letter-spacing: 0; margin: 4px 0 10px; }
.balken { height: 8px; background: var(--salbei-hell); border-radius: 999px; overflow: hidden; margin: 6px 0 8px; }
.balken > div { height: 100%; background: var(--salbei-tief); width: 0; border-radius: 999px; }
.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.raster .karte { margin: 0; }

/* ---------- Anmeldung, Fenster, Meldung ---------- */
.login { max-width: 420px; padding-top: 6vh; }
.fenster { position: fixed; inset: 0; z-index: 40; background: rgba(43, 43, 43, 0.4); display: flex; align-items: flex-end; justify-content: center; }
.fenster-karte {
  background: var(--flaeche); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; text-align: center;
  padding: 26px 20px calc(22px + env(safe-area-inset-bottom));
}
.aufnahme-zeit { font: 600 56px/1 var(--serif); letter-spacing: 0; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.fenster-text { color: var(--grau); margin: 0 0 18px; }
.meldung {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 50;
  width: min(92vw, 460px); background: var(--tinte); color: #fff; border-radius: 14px; padding: 13px 16px; text-align: center;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
