/* Post · Oberfläche nach dem abgestimmten Entwurf (entwurf/post-entwurf.html, Version 4).
   Drei Spalten (Themen · Mails · Mail) ab 1000 px, darunter eine Spalte mit Zurück. Werte aus intern.css. */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 400 15px/1.45 var(--schrift);
  -webkit-font-smoothing: antialiased; overflow: hidden;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }

.app { height: 100%; display: flex; flex-direction: column; padding-block: 12px; gap: 12px; }

/* Kopf */
.kopf { display: flex; align-items: flex-end; gap: 18px; position: relative; padding-bottom: 10px; border-bottom: 3px solid var(--text); flex: none; }
.kopf::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 96px; height: 9px; background: var(--olive); }
.kopf h1 { margin: 0; font-family: var(--gross); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 34px; line-height: .9; }
.kopf .stand { color: var(--leise); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.kopf .stand b { color: var(--text); font-variant-numeric: tabular-nums; }
.kopf .suche { margin-left: auto; min-width: 0; width: 260px; max-width: 34vw; border: 1px solid var(--linie-stark); background: var(--flaeche);
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; color: var(--text); }
.beispiel { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--warn); background: var(--warn-hauch); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }

/* Drei Spalten */
.spalten { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px minmax(300px, 360px) minmax(0, 1fr); gap: 12px; }
.spalte { min-height: 0; min-width: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Themen */
.themen { display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.gruppe { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--leise); margin: 14px 10px 6px; }
.gruppe:first-child { margin-top: 2px; }
.thema { display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: var(--r-klein); width: 100%; }
.thema:hover { background: var(--flaeche-2); }
.thema.aktiv { background: var(--flaeche); box-shadow: var(--schatten); }
.thema.aktiv .name { font-weight: 650; }
.thema .punkt { width: 4px; align-self: stretch; border-radius: 2px; background: transparent; }
.thema.aktiv .punkt { background: var(--olive); }
.thema .name { flex: 1; min-width: 0; }
.thema .zahl { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--leise); }
.thema .zahl.dich { color: var(--warn); font-weight: 650; }
.thema.gesperrt .name { color: var(--leise); }
.thema .schloss { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--leise); border: 1px solid var(--linie-stark); border-radius: 5px; padding: 1px 5px; }
.postfach { display: flex; justify-content: space-between; gap: 8px; padding: 4px 10px; font-size: 12.5px; color: var(--leise); }
.postfach span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postfach .an { color: var(--ok); }
.postfach .aus { color: var(--blass); }

/* Liste */
.liste { background: var(--flaeche); border-radius: var(--r); box-shadow: var(--schatten); }
.liste-kopf { position: sticky; top: 0; background: var(--flaeche); z-index: 2; padding: 14px 16px 10px; border-bottom: 1px solid var(--linie); border-radius: var(--r) var(--r) 0 0; }
.liste-kopf h2 { margin: 0; font-family: var(--gross); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; line-height: 1; }
.liste-kopf p { margin: 4px 0 0; color: var(--leise); font-size: 13px; }
.zurueck { display: none; border: 0; background: none; color: var(--olive-tief); font-weight: 600; padding: 0 0 6px; }
.mail { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--linie); position: relative; }
.mail:hover { background: var(--flaeche-2); }
.mail.aktiv { background: var(--olive-hauch); }
.mail.aktiv::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--olive); }
.mail .zeile1 { display: flex; gap: 8px; align-items: baseline; }
.mail .von { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .zeit { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; }
.mail .betreff { font-size: 14px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .kurz { font-size: 13px; color: var(--leise); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail .fuss { display: flex; gap: 6px; margin-top: 7px; align-items: center; flex-wrap: wrap; }
.mail.erledigt .von, .mail.erledigt .betreff { color: var(--leise); font-weight: 400; }
.chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.chip.dich { background: var(--warn-hauch); color: var(--warn); }
.chip.entwurf { background: var(--olive-hauch); color: var(--olive-tief); }
.chip.ok { background: var(--ok-hauch); color: var(--ok); }
.chip.info { background: var(--flaeche-2); color: var(--leise); }
.chip.box { background: none; color: var(--blass); font-family: var(--mono); font-weight: 400; font-size: 10.5px; padding: 0; }

/* Lesen */
.lesen { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.karte { background: var(--flaeche); border-radius: var(--r); box-shadow: var(--schatten); padding: 16px 18px; }
.lesen-kopf h3 { margin: 0; font-size: 19px; line-height: 1.25; text-wrap: balance; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px; color: var(--leise); }
.meta b { color: var(--text); font-weight: 600; }
.claude { background: var(--tinte); color: #ECECEE; border-radius: var(--r); padding: 14px 18px; }
.claude .label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--olive-hell); font-weight: 600; }
.claude p { margin: 6px 0 0; }
.claude ul { margin: 6px 0 0; padding-left: 18px; }
.text { white-space: pre-line; font-size: 14.5px; max-width: 68ch; }
.text-zu { max-height: 7.5em; overflow: hidden; position: relative; }
.text-zu::after { content: ""; position: absolute; inset: auto 0 0; height: 3em; background: linear-gradient(transparent, var(--flaeche)); }
.mehr { border: 0; background: none; color: var(--olive-tief); font-weight: 600; padding: 6px 0 0; font-size: 13px; }
.entwurf-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.entwurf-kopf h4 { margin: 0; font-family: var(--gross); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 19px; }
.entwurf-kopf .absender { margin-left: auto; font-size: 12.5px; color: var(--leise); }
.entwurf-kopf select { font: inherit; font-size: 12.5px; color: var(--text); background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 6px; padding: 3px 6px; }
textarea { width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--linie-stark); border-radius: var(--r-klein); padding: 12px 14px; font: inherit; font-size: 14.5px; line-height: 1.5; background: var(--grund); color: var(--text); }
.rueck { margin-top: 10px; font-size: 13px; color: var(--leise); border-left: 3px solid var(--linie-stark); padding-left: 10px; white-space: pre-line; }
.rueck b { color: var(--text); font-weight: 600; }
.ampel { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.knopf { border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: 14px; }
.knopf:hover { background: var(--flaeche-2); }
.knopf.ja { background: var(--ok); border-color: var(--ok); color: var(--auf-ok); }
.knopf.ja:hover { filter: brightness(1.08); }
.knopf.leise { border-color: transparent; color: var(--leise); }
.knopf.diktat { margin-left: auto; }
.hinweis { font-size: 13px; color: var(--leise); margin-top: 10px; }
.hinweis b { color: var(--olive-tief); }
.felder { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; margin: 0; }
.felder dt { color: var(--leise); }
.felder dd { margin: 0; font-variant-numeric: tabular-nums; }
.ziele { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ziel { border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.ziel:hover { border-color: var(--olive); background: var(--olive-hauch); }
.ziel.spam { color: var(--kritisch); }
.leer { padding: 40px 24px; text-align: center; color: var(--leise); }
.leer strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.sperre { border: 1px dashed var(--linie-stark); background: transparent; box-shadow: none; }
.sperre ol { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.sperre li + li { margin-top: 4px; }
.meldung { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--tinte); color: #ECECEE; padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.18); z-index: 20; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .meldung { transition: opacity .2s; } }

/* Kontext je Absender */
.kontext { background: var(--flaeche-2); border-radius: var(--r); padding: 12px 18px; font-size: 13.5px; }
.kontext .label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--leise); font-weight: 600; }
.kontext ul { margin: 6px 0 0; padding-left: 18px; }
.kontext li + li { margin-top: 2px; }
.kontext .quelle { color: var(--blass); font-size: 12px; }
.knopf.akzent { background: var(--olive); border-color: var(--olive); color: var(--flaeche); }
.knopf.akzent:hover { background: var(--olive-tief); }
.kopf .runde-knopf { white-space: nowrap; padding: 7px 16px; font-size: 14px; }

/* Eine Spalte: iPhone, iPad hochkant */
@media (max-width: 999px) {
  .kopf .stand { display: none; }
  .kopf .suche { max-width: 46vw; }
  .spalten { display: block; position: relative; }
  .spalte { height: 100%; }
  .app[data-ebene="themen"] .liste, .app[data-ebene="themen"] .lesen { display: none; }
  .app[data-ebene="liste"] .themen, .app[data-ebene="liste"] .lesen { display: none; }
  .app[data-ebene="mail"] .themen, .app[data-ebene="mail"] .liste { display: none; }
  .zurueck { display: inline-block; }
  .thema { padding: 12px 10px; font-size: 16px; }
  .knopf { padding: 11px 20px; }
}
@media (max-width: 520px) {
  .kopf h1 { font-size: 28px; }
  .kopf .beispiel { display: none; }
  .kopf .suche { width: auto; flex: 1; max-width: none; }
  .knopf.diktat { margin-left: 0; }
}

/* ---------- Ergänzungen für Stufe 1 ---------- */
:root { --auf-ok: #FFFFFF; }
a { color: inherit; }
.kopf h1 a { text-decoration: none; }
.kopfknopf { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; text-decoration: none; font-size: 14px; white-space: nowrap; }
.kopfknopf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kopf .stand a { text-decoration: none; }
.kopf .stand .warn { color: var(--warn); }
@media (max-width: 1180px) { .kopfknopf .lang { display: none; } }
.thema .zahl.alle { color: var(--blass); font-weight: 400; }
.postfach .fehler { color: var(--kritisch); }
.postfach .verbindet { color: var(--warn); }
.postfach a { text-decoration: none; }
.mail .chip.quelle { background: none; color: var(--blass); font-weight: 400; padding: 0; }
.mail .zeile1 .von { display: block; }
.mehr-laden { display: block; width: 100%; padding: 14px; border: 0; background: none; color: var(--olive-tief); font-weight: 600; }
.claude .wartet { color: #A0A0A6; font-style: italic; }
.verlauf { list-style: none; margin: 8px 0 0; padding: 0; }
.verlauf li { padding: 8px 0; border-top: 1px solid var(--linie); font-size: 13.5px; }
.verlauf li:first-child { border-top: 0; }
.verlauf .aus { color: var(--olive-tief); font-weight: 600; }
.verlauf .klein { color: var(--leise); font-size: 12.5px; }
.anhaenge { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.anhang { font-size: 12.5px; color: var(--leise); background: var(--flaeche-2); border-radius: 6px; padding: 3px 8px; }
.nur-lesen { font-size: 12.5px; color: var(--leise); }
.ziel.vorschlag { border-style: dashed; border-color: var(--olive); }
.thema-wahl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--leise); }
select { font: inherit; font-size: 14px; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 8px; padding: 6px 8px; }

/* Seiten: Einstellungen, Zahlen, Feedback */
.app[data-ebene="seite"] .spalten { display: none; }
.seite { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.seite-innen { max-width: 940px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 48px; }
.reiter { display: flex; gap: 6px; flex-wrap: wrap; }
.reiter a { font-size: 13.5px; font-weight: 600; color: var(--leise); padding: 6px 14px; border-radius: 999px; background: var(--flaeche-2); text-decoration: none; }
.reiter a.jetzt { background: var(--tinte); color: #ECECEE; }
.seite h2 { margin: 0; font-family: var(--gross); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1; }
.seite h3 { margin: 0 0 6px; font-size: 16px; }
.seite p.leise, .leise { color: var(--leise); font-size: 13.5px; }
.zeilen { display: flex; flex-direction: column; }
.zeilen > .z { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--linie); align-items: center; }
.zeilen > .z:first-child { border-top: 0; padding-top: 0; }
.z .titel { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.z .unter { grid-column: 1 / -1; font-size: 13px; color: var(--leise); }
.punkt-stand { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--blass); vertical-align: 1px; }
.punkt-stand.verbunden { background: var(--ok); } .punkt-stand.fehler { background: var(--kritisch); } .punkt-stand.verbindet { background: var(--warn); }
.formular { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; align-items: center; margin-top: 12px; }
.formular label { font-size: 13.5px; color: var(--leise); }
.formular input, .formular select, .formular textarea { width: 100%; min-width: 0; border: 1px solid var(--linie-stark); border-radius: var(--r-klein); padding: 8px 11px; font: inherit; font-size: 14.5px; background: var(--grund); color: var(--text); }
.formular textarea { min-height: 70px; }
.formular .paar { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }
.formular .voll { grid-column: 1 / -1; }
.testergebnis { white-space: pre-line; font-size: 13.5px; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-klein); background: var(--flaeche-2); }
.testergebnis.ok { background: var(--ok-hauch); color: var(--ok); }
.testergebnis.nein { background: var(--kritisch-hauch); color: var(--kritisch); }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabelle th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 7px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.status-fehler { color: var(--kritisch); } .status-fertig { color: var(--ok); } .status-wartet, .status-laeuft { color: var(--warn); }
.kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kachel { background: var(--flaeche); border-radius: var(--r); box-shadow: var(--schatten); padding: 12px 14px; }
.kachel span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); font-weight: 600; }
.kachel b { font-family: var(--gross); font-style: italic; font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.kachel:first-child { background: var(--tinte); color: #ECECEE; } .kachel:first-child span { color: #A9ADB1; } .kachel:first-child b { color: var(--olive-hell); }
.balken { display: inline-block; height: 8px; border-radius: 4px; background: var(--olive); vertical-align: middle; }
@media (max-width: 700px) { .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } .formular { grid-template-columns: minmax(0, 1fr); } }

/* Feedback-Fenster */
dialog.feedback { border: 0; border-radius: var(--r); padding: 18px 20px; width: min(460px, calc(100vw - 32px)); background: var(--flaeche); color: var(--text); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog.feedback::backdrop { background: rgba(0,0,0,.3); }
dialog.feedback h2 { margin: 0 0 10px; font-family: var(--gross); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 22px; }
.arten { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.arten input { accent-color: var(--olive); }
dialog.feedback textarea { min-height: 96px; }
.fb-bild { max-width: 100%; border-radius: 8px; border: 1px solid var(--linie); margin-top: 8px; }

/* Anmelden */
body.anmelden { overflow: auto; display: grid; place-items: center; min-height: 100%; padding: 24px 16px; }
body.anmelden .karte { width: min(400px, 100%); display: flex; flex-direction: column; gap: 10px; }
body.anmelden h1 { margin: 0; font-family: var(--gross); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 40px; line-height: .9; }
body.anmelden form { display: flex; flex-direction: column; gap: 8px; }
body.anmelden input { border: 1px solid var(--linie-stark); border-radius: var(--r-klein); padding: 10px 12px; font: inherit; background: var(--grund); color: var(--text); }
body.anmelden label { font-size: 13px; color: var(--leise); }
.fehlermeldung { color: var(--kritisch); font-size: 14px; margin: 0; min-height: 1.2em; }
@media (max-width: 999px) {
  .app[data-ebene="seite"] .spalten { display: none; }
}
a.thema, a.mail, a.postfach, a.ziel { text-decoration: none; color: inherit; }
a.ziel { display: inline-block; }
.mono, .chip.box, .schloss, .gruppe, .label { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.zurueck { text-decoration: none; }
.tabelle td:first-child { min-width: 9em; }
@media (min-width: 1000px) { .tabelle tr[data-aufgabe] td:first-child { width: 26%; } }
body.anmelden form[hidden], body.anmelden [hidden] { display: none; }
