/* Post-Freigabe. Handy zuerst: kompakter Kopf mit Fortschrittsring, Kanäle als Karussell zum Wischen mit Kanal-Tabs,
   drei große Daumen-Tasten unten, Postliste als Einblendung mit Suche. Ab 900px kommt die Liste als feste Spalte dazu
   und die Kanäle stehen nebeneinander. Der Tisch mit den Vorschauen bleibt in beiden Farbschemata hell. */
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
	--bg: #EEF1F5; --flaeche: #FFFFFF; --fg: #16213A; --leise: #5A657A; --linie: #D9DEE6; --schatten: 0 1px 2px rgba(22, 33, 58, .06), 0 4px 16px rgba(22, 33, 58, .06);
	--marke: #7AC943; --marke-text: #16213A; --navy: #16213A; --akzent: #2F7A16;
	--ok: #2A7313; --ok-bg: #E2F3D8; --aendern: #A65607; --aendern-bg: #FBEAD2;
	--nein: #B02A22; --nein-bg: #FAE2E0; --neu: #5A3FB5; --neu-bg: #E9E4FA; --offen: #8C96A8; --offen-bg: #E4E8EE;
	--tisch: #E9EBEE; --tisch-fg: #16213A; --tisch-leise: #5A657A; --tisch-karte: #FFFFFF;
	--ig: #D62976; --fb: #1877F2; --li: #0A66C2; --wa: #1FA855; --story: #8E44AD;
	--display: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
	--text: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
	--spalte: calc(100vw - 40px); --radius: 14px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0B1120; --flaeche: #141D33; --fg: #E9EDF4; --leise: #9BA7BC; --linie: #263352; --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
		--marke: #7AC943; --marke-text: #0B1120; --navy: #16213A; --akzent: #8FD661;
		--ok: #93D968; --ok-bg: #1E3A19; --aendern: #F2A64C; --aendern-bg: #3F2B12;
		--nein: #F28B83; --nein-bg: #43211F; --neu: #B9A7F6; --neu-bg: #2B2452; --offen: #7F8BA3; --offen-bg: #1F2A45;
		color-scheme: dark;
	}
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--text); -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
[hidden] { display: none !important; }
img { max-width: 100%; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
kbd { font: 600 11px/1 var(--text); border: 1px solid currentColor; border-radius: 4px; padding: 2px 5px; opacity: .8; }
.rund { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: var(--fg); }
.rund:hover { background: var(--offen-bg); }
.klein { border: 1px solid var(--linie); background: var(--flaeche); color: var(--fg); border-radius: 8px; min-width: 32px; height: 32px; padding: 0 10px; font-weight: 500; }

#app { height: 100%; height: 100dvh; display: flex; flex-direction: column; min-width: 0; }

/* ---------- Kopf ---------- */
.kopf { background: var(--navy); color: #fff; padding: calc(8px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-right, 0px)) 0 calc(12px + env(safe-area-inset-left, 0px)); flex: none; }
.kopf .rund { color: #fff; }
.kopf .rund:hover { background: rgba(255, 255, 255, .12); }
.kopfzeile { display: flex; align-items: center; gap: 6px; min-height: 48px; }
.marke { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding-left: 4px; }
.kopf h1 { font: 800 17px/1.1 var(--display); margin: 0; letter-spacing: -.01em; white-space: nowrap; }
.unterzeile { font-size: 12px; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ring { position: relative; width: 44px; height: 44px; flex: none; }
.ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; stroke-linecap: butt; }
.ring-hg { stroke: rgba(255, 255, 255, .18); }
.ring-ok { stroke: var(--marke); stroke-dasharray: 0 113.1; transition: stroke-dasharray .4s ease; }
.ring-nein { stroke: #F28B83; stroke-dasharray: 0 113.1; transition: stroke-dasharray .4s ease, stroke-dashoffset .4s ease; }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 11px/1 var(--display); font-variant-numeric: tabular-nums; }
.balken { height: 3px; margin: 4px 2px 0; border-radius: 2px; background: rgba(255, 255, 255, .14); display: flex; overflow: hidden; }
.balken i { display: block; height: 100%; }
.balken .ok { background: var(--marke); } .balken .aendern { background: #F2A64C; } .balken .neu { background: #B9A7F6; } .balken .nein { background: #F28B83; }
.filter { display: flex; gap: 6px; padding: 8px 2px 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filter::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip b { font-weight: 700; margin-left: 4px; opacity: .85; }
.chip[aria-pressed="true"] { background: #fff; color: var(--navy); border-color: #fff; }
.chip[aria-pressed="true"] b { opacity: 1; }
.menue { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 0 4px 12px; font-size: 13px; color: rgba(255, 255, 255, .8); border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 10px; }
.menue form { margin: 0; margin-left: auto; }
.menue .verweis { display: inline-flex; align-items: center; text-decoration: none; }
.menue .klein { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.groesse { display: flex; align-items: center; gap: 6px; }

/* ---------- Mitte ---------- */
.mitte { flex: 1; min-height: 0; display: flex; position: relative; }
.schleier { position: absolute; inset: 0; background: rgba(11, 17, 32, .45); z-index: 4; }
.liste { position: absolute; z-index: 5; top: 0; bottom: 0; left: 0; width: min(320px, 88vw); background: var(--flaeche); display: flex; flex-direction: column;
	box-shadow: 0 0 40px rgba(0, 0, 0, .3); transform: translateX(-105%); transition: transform .22s ease; }
.liste.offen { transform: none; }
.suche { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--linie); color: var(--leise); }
.suche svg { font-size: 18px; }
.suche input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--fg); background: transparent; border: 0; padding: 6px 0; }
.suche input:focus { outline: none; }
#btn-liste-zu { font-size: 18px; width: 36px; height: 36px; }
.eintraege { flex: 1; overflow-y: auto; padding: 8px; }
.eintrag { display: grid; grid-template-columns: 10px 1fr; gap: 1px 10px; align-items: baseline; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; }
.eintrag:hover { background: var(--offen-bg); }
.eintrag[aria-current="true"] { background: var(--navy); color: #fff; }
.eintrag .punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--offen); align-self: center; grid-row: span 2; }
.eintrag .wann { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; }
.eintrag[aria-current="true"] .wann { color: rgba(255, 255, 255, .75); }
.eintrag .name { font-weight: 500; overflow-wrap: anywhere; line-height: 1.3; }
.punkt.ok { background: var(--ok); } .punkt.aendern { background: var(--aendern); } .punkt.neu { background: var(--neu); } .punkt.nein { background: var(--nein); }
.listenleer { color: var(--leise); padding: 14px 10px; }

.buehne { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch; }
#inhalt { display: contents; }
.postkopf { flex: none; padding: 14px 16px 10px; }
.postzeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.datum { font: 700 12px/1.2 var(--display); letter-spacing: .07em; text-transform: uppercase; color: var(--akzent); font-variant-numeric: tabular-nums; }
.pille { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--offen-bg); color: var(--leise); white-space: nowrap; }
.pille.ok { background: var(--ok-bg); color: var(--ok); } .pille.aendern { background: var(--aendern-bg); color: var(--aendern); }
.pille.neu { background: var(--neu-bg); color: var(--neu); } .pille.nein { background: var(--nein-bg); color: var(--nein); }
.blaettern { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; }
.blaettern .rund { width: 34px; height: 34px; font-size: 20px; }
.stelle { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 52px; text-align: center; }
.postkopf h2 { font: 800 22px/1.15 var(--display); margin: 6px 0 2px; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.thema { color: var(--leise); font-size: 13px; }
.hinweise { flex: none; padding: 0 16px 10px; display: flex; flex-direction: column; gap: 8px; }
.hinweise:empty { display: none; }
.hinweis { display: flex; gap: 10px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.hinweis .wer { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 12px/1 var(--display); background: var(--offen-bg); color: var(--leise); white-space: normal; }
.hinweis.claude { border-color: transparent; background: var(--neu-bg); }
.hinweis.claude .wer { background: var(--neu); color: #fff; }
.hinweis.erik .wer { background: var(--navy); color: #fff; }
.hinweis.plan { color: var(--leise); font-size: 13px; padding: 8px 12px; }
.hinweis b { font-weight: 600; }
.verlauf { flex: none; margin: 0 16px 10px; font-size: 13px; color: var(--leise); }
.verlauf summary { cursor: pointer; font-weight: 600; padding: 4px 0; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.verlauf summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 16px; }
.verlauf[open] summary::before { transform: rotate(90deg); }
.verlauf ol { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--linie); }
.verlauf li { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; padding-left: 12px; overflow-wrap: anywhere; }
.verlauf li .zeit { font-variant-numeric: tabular-nums; white-space: nowrap; }
.verlauf li .was { color: var(--fg); }
.verlauf li .was b { font-weight: 600; }

.kanaele { flex: none; position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; padding: 8px 16px; background: var(--bg); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--linie); }
.kanaele::-webkit-scrollbar { display: none; }
.kanal-tab { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--fg); }
.kanal-tab[aria-current="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.badge { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 800 9.5px/1 var(--display); color: #fff; letter-spacing: .02em; flex: none; }
.badge.ig { background: var(--ig); } .badge.fb { background: var(--fb); } .badge.li { background: var(--li); } .badge.wa { background: var(--wa); } .badge.story { background: var(--story); }

.tisch { background: var(--tisch); color: var(--tisch-fg); flex: 1; }
.reihe { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px 28px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.reihe::-webkit-scrollbar { display: none; }
.kanal { width: var(--spalte); flex: none; scroll-snap-align: start; }
.kanal h3 { font: 600 12px/1.2 var(--text); letter-spacing: .05em; text-transform: uppercase; color: var(--tisch-leise); margin: 0 0 8px; padding: 0 4px; display: flex; align-items: center; gap: 8px; }
.kanal h3 span { font-weight: 400; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.rahmen { display: block; width: 100%; border: 0; padding: 0; background: var(--tisch-karte); cursor: zoom-in; border-radius: 12px; overflow: hidden; box-shadow: var(--schatten); }
.rahmen img { display: block; width: 100%; height: 100%; }
.rahmen:not(.da) { background: repeating-linear-gradient(135deg, #E3E6EA 0 10px, #ECEEF1 10px 20px); }
.whatsapp { background: var(--tisch-karte); border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--schatten); font-size: 14px; }
.whatsapp small { display: block; color: var(--tisch-leise); margin-bottom: 6px; }
.leer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 24px; text-align: center; color: var(--leise); }
.leer-bild { width: 72px; height: 72px; border-radius: 50%; background: var(--marke); color: var(--marke-text); display: flex; align-items: center; justify-content: center; font-size: 40px; margin-bottom: 8px; }
.leer-bild.still { background: var(--offen-bg); color: var(--leise); }
.leer strong { font: 800 22px/1.2 var(--display); color: var(--fg); text-wrap: balance; }

/* ---------- Leiste ---------- */
.leiste { flex: none; background: var(--flaeche); border-top: 1px solid var(--linie); padding: 10px calc(12px + env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px)); }
.aktionen { display: flex; gap: 8px; max-width: 760px; margin: 0 auto; }
.ent { flex: 1; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 10px 12px; font: 700 15px/1 var(--display); transition: transform .08s ease; }
.ent:active { transform: scale(.97); }
.ent svg { font-size: 20px; }
.ent kbd { display: none; }
.ent.ok { flex: 1.6; background: var(--marke); color: var(--marke-text); }
.ent.aendern { background: var(--aendern-bg); color: var(--aendern); }
.ent.nein { background: var(--nein-bg); color: var(--nein); }
.ent[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }
#formular { display: flex; flex-direction: column; gap: 8px; max-width: 760px; margin: 0 auto; }
#formular label { font-weight: 600; }
.hakenfeld { display: flex; align-items: center; gap: 10px; font-weight: 500 !important; font-size: 14px; color: var(--leise); }
.hakenfeld input { width: 20px; height: 20px; margin: 0; accent-color: var(--nein); }
#anmerkung { width: 100%; font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; resize: vertical; min-height: 80px; }
.formzeile { display: flex; gap: 8px; align-items: center; }
.formzeile .tipp { display: none; margin-right: auto; color: var(--leise); font-size: 12px; }
.zweit { border: 1px solid var(--linie); background: transparent; border-radius: 12px; padding: 12px 14px; font-weight: 500; }
.erst { flex: 1; border: 0; background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 16px; font: 700 15px/1 var(--display); }

/* ---------- Meldung, Banner, Vergrößerung ---------- */
.meldung { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg);
	border-radius: 12px; padding: 11px 16px; display: flex; gap: 14px; align-items: center; max-width: calc(100% - 32px); box-shadow: 0 8px 28px rgba(0, 0, 0, .3); z-index: 6; font-size: 14px; }
.meldung button { border: 0; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; padding: 0; white-space: nowrap; }
.banner { background: var(--aendern-bg); color: var(--aendern); padding: 8px 16px; font-weight: 500; font-size: 14px; }
.gross { position: fixed; inset: 0; background: rgba(11, 17, 32, .9); overflow: auto; z-index: 10; padding: 12px; cursor: zoom-out; touch-action: pan-x pan-y pinch-zoom; }
.gross img { display: block; margin: 0 auto; width: min(1062px, 100%); border-radius: 8px; }

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100%; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: linear-gradient(160deg, var(--navy) 0 45%, var(--bg) 45.1%); }
.anmeldung form { width: min(380px, 100%); background: var(--flaeche); border-radius: 18px; padding: 30px 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(11, 17, 32, .35); }
.anmeldung img { width: 60px; height: 60px; border-radius: 16px; }
.anmeldung h1 { font: 800 26px/1.1 var(--display); margin: 0; letter-spacing: -.015em; }
.anmeldung p { margin: 0; color: var(--leise); }
.anmeldung label { font-weight: 600; }
.anmeldung input { width: 100%; font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 12px; margin-top: 6px; }
.anmeldung button { border: 0; border-radius: 12px; background: var(--marke); color: var(--marke-text); font: 700 16px/1 var(--display); padding: 15px 16px; }
.anmeldung .fehler { color: var(--nein); font-weight: 500; }
.anmeldung .fehler:empty { display: none; }

/* ---------- Übergänge ---------- */
@media (prefers-reduced-motion: no-preference) {
	.rahmen img { animation: ein .18s ease-out; }
	#inhalt.wechsel .postkopf, #inhalt.wechsel .hinweise, #inhalt.wechsel .tisch { animation: rein .22s ease-out; }
	@keyframes ein { from { opacity: 0; } }
	@keyframes rein { from { opacity: 0; transform: translateY(6px); } }
}

/* ---------- Ab 900px: Liste als Spalte, Kanäle nebeneinander ---------- */
@media (min-width: 900px) {
	:root { --spalte: 400px; }
	.kopf { padding-left: calc(20px + env(safe-area-inset-left, 0px)); padding-right: calc(20px + env(safe-area-inset-right, 0px)); }
	.kopfzeile { min-height: 56px; }
	.kopf h1 { font-size: 19px; }
	#btn-liste, #btn-liste-zu, .schleier { display: none !important; }
	.liste { position: static; transform: none; width: 288px; flex: none; box-shadow: none; border-right: 1px solid var(--linie); }
	.postkopf { padding: 18px 24px 12px; }
	.postkopf h2 { font-size: 26px; }
	.hinweise, .kanaele { padding-left: 24px; padding-right: 24px; }
	.verlauf { margin-left: 24px; margin-right: 24px; }
	.reihe { padding: 16px 24px 32px; scroll-snap-type: x proximity; scroll-padding-inline: 24px; }
	.ent { flex: 0 0 auto; min-width: 150px; padding: 10px 20px; }
	.ent.ok { flex: 0 0 auto; min-width: 210px; }
	.ent kbd { display: inline-block; margin-left: 4px; }
	.aktionen { justify-content: center; }
	.formzeile .tipp { display: inline; }
	.erst { flex: 0 0 auto; }
	.menue { padding-bottom: 12px; }
}
