/* Gestaltung wie familie-kra.us: Lora, weißes Papier, Kartengrün als Akzent */
@font-face { font-family: "Lora"; src: url("fonts/lora.woff") format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-italic.woff") format("woff"); font-style: italic; font-weight: 400 700; font-display: swap; }

:root {
  --papier: #ffffff;
  --tinte: #1f2118;
  --leise: #62665a;
  --linie: #e2e4d8;
  --akzent: #585f2c;
  --akzent-hell: #e9ecd6;
  --offen: #a8741f;
  --rot: #9b3b2e;
  --serif: "Lora", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #15160f; --tinte: #ecebe1; --leise: #a9ab9c; --linie: #34362b;
    --akzent: #b8c27a; --akzent-hell: #2c3018; --offen: #e0a94a; --rot: #e08a7a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* sonst heben display-Regeln wie .block das Ausblenden auf */
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px));
}
h1 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; margin: 0; }
button, input { font: inherit; font-size: 16px; } /* 16 px: iOS zoomt sonst beim Antippen */

.anmelden { max-width: 22rem; margin: 18vh auto 0; display: flex; flex-direction: column; gap: 1.2rem; }
.anmelden form { display: flex; flex-direction: column; gap: .7rem; }
.anmelden input[type=password], .anmelden input[type=text] { padding: .7rem .8rem; border: 1.5px solid var(--linie); border-radius: 10px; background: var(--papier); color: var(--tinte); min-height: 44px; }
.anmelden input[type=password]:focus, .anmelden input[type=text]:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.haken { display: flex; gap: .5rem; align-items: center; color: var(--leise); }
.haken input { width: 20px; height: 20px; accent-color: var(--akzent); }
button[type=submit] { min-height: 44px; border: 0; border-radius: 10px; background: var(--akzent); color: var(--papier); font-weight: 600; }
.meldung { color: var(--rot); margin: 0; }

.seite { max-width: 48rem; margin: 0 auto; padding-block: 1.2rem 3rem; display: flex; flex-direction: column; gap: 1.2rem; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; }
.leise-knopf { background: none; border: 1.5px solid var(--linie); color: var(--leise); border-radius: 999px; padding: .35rem .9rem; min-height: 38px; }
.leer { color: var(--leise); }
.fuss { margin-top: 2rem; }
.protokoll h2 { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; margin: 0 0 .5rem; }
.protokoll { overflow-x: auto; }
.protokoll table { border-collapse: collapse; width: 100%; font-size: .85rem; font-variant-numeric: tabular-nums; }
.protokoll th, .protokoll td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.protokoll th { color: var(--leise); font-weight: 600; }
.protokoll tr.warn td { color: var(--rot); }

/* P1: Tresor, Notizen, Protokoll, Sicherung */
h2 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin: 0; }
h2 small { font-family: var(--sans); font-size: .8rem; font-weight: 400; color: var(--leise); }
label { color: var(--leise); font-size: .9rem; }
.block { display: flex; flex-direction: column; gap: .7rem; border-top: 1px solid var(--linie); padding-top: 1rem; }
.hinweis { margin: 0; min-height: 1.5em; color: var(--akzent); }
.hinweis.fehler { color: var(--rot); }
.warn-kasten { border-left: 4px solid var(--offen); padding: .6rem .8rem; background: color-mix(in srgb, var(--offen) 12%, transparent); margin: 0; }
.seite input[type=text], .seite input[type=file] { padding: .6rem .7rem; border: 1.5px solid var(--linie); border-radius: 10px; background: var(--papier); color: var(--tinte); min-height: 44px; width: 100%; }
.zeile-form, .notiz-form { display: flex; flex-direction: column; gap: .45rem; }
.haupt-knopf { min-height: 44px; border: 0; border-radius: 10px; background: var(--akzent); color: var(--papier); font-weight: 600; padding: 0 1rem; }
.leise-knopf.warn { border-color: var(--rot); color: var(--rot); }
.knopfreihe, .notiz-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
.notizen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.notiz { border: 1px solid var(--linie); border-radius: 10px; padding: .6rem .8rem; display: flex; flex-direction: column; gap: .45rem; }
.notiz-kopf { display: flex; justify-content: space-between; gap: 1rem; }
.notiz-titel { font-weight: 600; overflow-wrap: anywhere; }
.notiz-betrag, .summe { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summe { margin: 0; text-align: right; font-weight: 600; }
.verlauf, .protokoll-liste { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.p-zeit { display: block; color: var(--leise); font-size: .78rem; font-variant-numeric: tabular-nums; }
.p-satz { overflow-wrap: anywhere; }
.blatt { border: 1px dashed var(--linie); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.blatt-qr { width: min(60vw, 240px); }
.blatt-qr svg { width: 100%; height: auto; display: block; }
.mono { font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; font-size: .85rem; }

@media print {
  body { background: #fff; color: #000; }
  .seite > *:not(#tresor-mit), #tresor-mit > *:not(#blatt) { display: none !important; }
  #blatt { display: flex !important; border: 0; }
  .blatt-qr { width: 6cm; }
}
