/* Schreibstube (2.1.1, [M] 20.11.2026) — „Das Design soll sich gut in die Apple-Umgebung einfügen, eher schlicht.“
 *
 * Nur für die schlichte Ansicht (body.schlicht) und die Anmeldeseite unter der eigenen Adresse. Alles Übrige der
 * Plattform bleibt „Papier und Tinte“. Grundsätze hier:
 *   Systemschrift (San Francisco auf Mac, iPhone, iPad; sonst die des Geräts) — bewusste Ausnahme von Fira Sans,
 *   nur hier. Viel Weißraum, ruhige Grautöne wie bei Apple, ein Blau für das, was man selbst tut. Die Kopfzeile
 *   durchscheinend. Größere Rundungen. Alle Farben doppelt, hell und dunkel; Kontrast mindestens 4,5:1
 *   (tests/test_schreibstube.py rechnet nach).
 */
body.schlicht {
  --grund:        #f5f5f7;
  --flaeche:      #ffffff;
  --flaeche-2:    #ebebf0;
  --rand:         #d2d2d7;
  --rand-stark:   #b0b0b8;
  --rand-feld:    #86868b;
  --text:         #1d1d1f;
  --text-leise:   #515156;
  --text-still:   #5e5e63;
  --akzent:       #0066cc;
  --akzent-stark: #0055b3;
  --akzent-hell:  #e8f1fb;
  --akzent-text:  #ffffff;
  --link:         #0066cc;
  --fokus-hof:    rgba(0, 102, 204, .25);
  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto,
             Arial, sans-serif;
  --r-klein:  12px;
  --r-feld:   12px;
  --r-mittel: 18px;
  --r-gross:  22px;
  --schatten-1: 0 1px 2px rgba(0, 0, 0, .04);
  --schatten-2: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px -10px rgba(0, 0, 0, .18);
  font-family: var(--schrift);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.003em;
}
@media (prefers-color-scheme: dark) {
  body.schlicht {
    --grund:        #000000;
    --flaeche:      #1c1c1e;
    --flaeche-2:    #2c2c2e;
    --rand:         #38383a;
    --rand-stark:   #48484a;
    --rand-feld:    #8e8e93;
    --text:         #f5f5f7;
    --text-leise:   #c7c7cc;
    --text-still:   #a1a1a6;
    --akzent:       #0a64c8;
    --akzent-stark: #1a74d8;
    --akzent-hell:  #0f2238;
    --akzent-text:  #ffffff;
    --link:         #4da3ff;
    --fokus-hof:    rgba(77, 163, 255, .30);
  }
}

body.schlicht h1, body.schlicht h2, body.schlicht h3 { font-weight: 600; letter-spacing: -.015em; }
body.schlicht .card { border-color: transparent; box-shadow: var(--schatten-2); }

/* Kopfzeile: durchscheinend wie in Safari und den Apple-Apps. */
body.schlicht .top {
  background: color-mix(in srgb, var(--grund) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rand);
}
body.schlicht .brand { font-weight: 600; letter-spacing: -.01em; }

/* Die Leiste: Projekte, Allgemein, Gedächtnis — wie die Segmente einer Apple-App. Auf dem Handy seitlich wischbar. */
.stube-leiste {
  display: flex; align-items: center; gap: .75rem; justify-content: space-between;
  max-width: var(--breite); margin: 0 auto; padding: .75rem var(--seite) 0;
}
.stube-raeume { display: flex; align-items: center; gap: .4rem; overflow-x: auto; min-width: 0;
                scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
.stube-raeume::-webkit-scrollbar { display: none; }
.stube-raum {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; flex: none;
  min-height: var(--ziel); padding: 0 .95rem; border-radius: var(--r-voll);
  color: var(--text); background: var(--flaeche); box-shadow: var(--schatten-1); font-size: .9375rem;
  cursor: pointer; list-style: none;
}
.stube-raum::-webkit-details-marker { display: none; }
.stube-raum:hover { text-decoration: none; background: var(--flaeche-2); }
.stube-raum.aktiv { background: var(--akzent); color: var(--akzent-text); }
.stube-raum .icon { width: 1.1rem; height: 1.1rem; }
.stube-rechts { display: flex; align-items: center; gap: .75rem; flex: none; }
.stube-neu { flex: none; position: relative; }
.stube-neu[open] .stube-neu-form {
  position: absolute; z-index: 20; top: calc(100% + .4rem); right: 0; width: min(20rem, 80vw);
  background: var(--flaeche); border-radius: var(--r-mittel); box-shadow: var(--schatten-2); padding: 1rem;
  display: grid; gap: .6rem;
}
.stube-neu-form { display: none; }
.stube-guthaben { flex: none; color: var(--text-leise); font-size: var(--gr-klein); white-space: nowrap; }
@media (max-width: 40rem) {
  .stube-leiste { flex-direction: column; align-items: stretch; gap: .25rem; }
  .stube-rechts { justify-content: space-between; }
  .stube-neu[open] .stube-neu-form { left: 0; right: auto; width: calc(100vw - 2 * var(--seite)); }
}

/* Die Seite eines Projekts. */
.stube { max-width: var(--spalte); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.stube > * { min-width: 0; }
.stube-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.stube-kopf h1 { margin: 0; font-size: 2rem; }
.stube-unter { color: var(--text-leise); margin: -1rem 0 0; }
.stube-liste h2 { font-size: var(--gr-h3); margin: 0 0 .6rem; }
.stube-liste .stube-unter { margin: -.3rem 0 .8rem; }
.stube-gespraeche { list-style: none; margin: 0 0 .8rem; padding: 0; background: var(--flaeche);
                    border-radius: var(--r-mittel); box-shadow: var(--schatten-1); overflow: hidden; }
.stube-gespraeche li { display: flex; align-items: center; border-top: 1px solid var(--rand); }
.stube-gespraeche li:first-child { border-top: 0; }
.stube-gespraeche li > a:first-child {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; color: var(--text); min-height: var(--ziel);
}
.stube-gespraeche li > a:first-child:hover { text-decoration: none; background: var(--flaeche-2); }
.stube-gespraeche .titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stube-gespraeche .datum { color: var(--text-still); font-size: var(--gr-klein); flex: none; }
.stube-gespraeche .loeschen { color: var(--text-still); padding: .6rem .9rem; display: inline-flex; }
.stube-gespraeche .loeschen .nav-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stube-gespraeche .leer { padding: .9rem 1rem; color: var(--text-leise); }
.stube-gruss { background: var(--akzent-hell); box-shadow: none; display: grid; gap: .8rem; }
.stube-gruss .gruss-text { white-space: pre-line; font-size: 1.125rem; margin: 0; }
.stube-hinweis h2 { font-size: var(--gr-h3); margin-top: 0; }

/* Im Gespräch: Startknöpfe, und die eigene Sprechblase im Blau. */
.vorschlaege { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.vorschlaege .vorschlag { border-radius: var(--r-voll); background: var(--flaeche); box-shadow: var(--schatten-1); }
body.schlicht .msg.assistant .msg-body { box-shadow: var(--schatten-1); border-color: transparent; }
.als-wissen button { font-weight: 600; }

/* Anmeldung unter der eigenen Adresse. */
body.schlicht .anmeldung { box-shadow: var(--schatten-2); border-color: transparent; }
