/* Notify, Oberflaeche. Minimalistisch nach A-12: ruhig, viel Weissraum, kaum Linien. */

:root {
  --grund: #faf9f7;
  --karte: #ffffff;
  --schrift: #1c1c1a;
  --leise: #86847e;
  --linie: #e8e6e1;
  --akzent: #3d6b53;
  --akzent-leise: #eef3ef;
  --dringend: #b3402c;
  --rundung: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #16171a;
    --karte: #1e2024;
    --schrift: #ececea;
    --leise: #8b8d93;
    --linie: #2b2e33;
    --akzent: #7fb694;
    --akzent-leise: #232a26;
    --dringend: #e0705c;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--grund);
  color: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
  /* Die scrollende Ordnerleiste darf das Dokument nicht breiter machen (A-05) */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ---------- Kopf ---------- */

.kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 22px) 20px 6px;
}

.kopf h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.stil-knopf {
  font: inherit;
  font-size: 14px;
  color: var(--akzent);
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer;
}

.stil-knopf:active { opacity: 0.55; }

/* ---------- Ordnerleiste ---------- */

.ordnerleiste {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 20px 14px;
  scrollbar-width: none;
  max-width: 100%;
  min-width: 0;
}

.ordnerleiste::-webkit-scrollbar { display: none; }

.ordner {
  flex: 0 0 auto;
  font-size: 14.5px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: transparent;
  color: var(--leise);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.ordner[aria-current="true"] {
  background: var(--akzent-leise);
  border-color: transparent;
  color: var(--akzent);
  font-weight: 550;
}

.ordner .zahl {
  margin-left: 6px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

/* ---------- Liste ---------- */

.liste { padding: 0 14px 40px; max-width: 100%; }

.hinweis {
  color: var(--leise);
  text-align: center;
  padding: 48px 20px;
  font-size: 15px;
}

.mitteilung {
  background: var(--karte);
  border-radius: var(--rundung);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.12s ease;
}

.mitteilung.ungelesen { border-left: 3px solid var(--akzent); }
.mitteilung.dringend  { border-left: 3px solid var(--dringend); }

.mitteilung .zeile {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
}

.mitteilung .titel {
  font-weight: 580;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mitteilung .zeit {
  flex: 0 0 auto;
  font-size: 12.5px;
  color: var(--leise);
  font-variant-numeric: tabular-nums;
}

.mitteilung .text {
  color: var(--leise);
  font-size: 14.5px;
  margin-top: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mitteilung.offen .text {
  -webkit-line-clamp: unset;
  color: var(--schrift);
  white-space: pre-wrap;
}

.mitteilung .bild {
  margin-top: 10px;
  border-radius: 8px;
  max-width: 100%;
  display: block;
}

.mitteilung .fuss {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--leise);
  display: flex;
  gap: 12px;
}

.mitteilung .fuss a { color: var(--akzent); text-decoration: none; }

/* ---------- Installhinweis ---------- */

.installhinweis {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--rundung);
  padding: 14px 16px;
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.installhinweis p { margin-bottom: 8px; color: var(--leise); }

@media (min-width: 700px) {
  body { max-width: 660px; margin: 0 auto; }
}
