/* TidenHub – gemeinsame Grundlage für App (Wattgeflüster) und Desktop (Verwaltung)
   Farben nur aus dem CD der Schutzstation Wattenmeer, gleiche Status-Farben und Spinner in beiden Varianten.
   Schriftgrößen: gleiche Stufen, die App (Handy) eine Stufe größer als der Desktop:
     Stufe      klein   Nebentext   Text   Überschrift   Seitentitel
     App        13      15          18     20            24
     Desktop    12      13          15     18            22 */
:root {
  /* Kern-, Signal- und Zusatzfarben */
  --dblau: #002A52; --blau: #07568E; --gelb: #FBB900; --orange: #F08400; --gruen: #94AD20; --lila: #73418C; --rot: #BB170D;
  /* Aufhellungen laut Farbtabelle (Stufe 1–5) */
  --dblau-1: #3F5F7D; --dblau-5: #E5E9ED; --blau-3: #8AACCA; --blau-5: #C8DAEC; --gelb-2: #FCD872; --gelb-4: #FEF1CC; --gelb-5: #FEF8E5;
  --gruen-2: #C4D184; --gruen-4: #E9EED2; --rot-5: #F8E7E6; --grau-3: #CCD0D3; --grau-4: #E2E4E6; --grau-5: #F0F1F2;
  /* Grün als Schriftfarbe (abgedunkelt, damit es auf Weiß lesbar ist) */
  --gruen-text: #6E8318;
  /* Rollen */
  --bg: var(--grau-5); --card: #FFFFFF; --line: var(--grau-3); --text: var(--dblau); --muted: var(--dblau-1); --danger: var(--rot);
  --radius: 16px; --radius-btn: 12px; --shadow: 0 1px 3px rgba(0,42,82,.10);
}

/* Status einer Meldung – überall dieselben Farben wie die Spalten der Kanban-Tafel */
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-weight: 600; white-space: nowrap; }
.st-queued, .st-unvollständig { background: var(--grau-4); color: var(--muted); }    /* Wird hochgeladen / Entwurf */
.st-new { background: var(--gelb-4); color: var(--dblau); }                         /* Eingereicht */
.st-sending { background: var(--blau-5); color: var(--dblau); }                     /* In Arbeit */
.st-sent { background: var(--gruen-4); color: var(--dblau); }                       /* Veröffentlicht */
.st-muted, .st-error { background: var(--rot-5); color: var(--rot); }               /* Nicht verwendet / Fehler */

/* Ladeanzeige */
.spin { width: 16px; height: 16px; border: 2px solid var(--grau-3); border-top-color: var(--lila); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex: 0 0 auto; }
.spin.sm { width: 11px; height: 11px; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Testsystem: Streifen oben (siehe shared/firebase.js) */
.testband { position: sticky; top: 0; z-index: 9999; background: var(--orange); color: var(--dblau); text-align: center; font-weight: 700; font-size: 13px; padding: 3px 8px; letter-spacing: .02em; }

/* ---------- Community-Beitrag (App: Timeline, Zentrale: Vorschau) – Darstellung in shared/community-post.js ---------- */
.cmpost { --cmh: min(calc(100vw - 32px), 528px); text-align: left; color: var(--text); background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,42,82,.10); margin-bottom: 16px; overflow: hidden; }
.cmpost.pinned { box-shadow: 0 0 0 2px var(--gelb), 0 2px 8px rgba(0,42,82,.12); }
.cmhead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.cmav { width: 40px; height: 40px; border-radius: 50%; background: var(--dblau); display: grid; place-items: center; flex: none; }
.cmav img { width: 26px; height: 26px; }
.cmtt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cmtt b { font-size: 17px; line-height: 1.25; }
.cmtt span { font-size: 15px; color: var(--muted); line-height: 1.3; }
.cmpin { flex: none; align-self: flex-start; background: var(--gelb-4); color: var(--dblau); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.cmmedia { position: relative; background: var(--grau-4); }
.cmslides { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.cmslides::-webkit-scrollbar { display: none; }
.cmslides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; display: block; }
.cmcount { position: absolute; top: 10px; right: 10px; background: rgba(0,42,82,.7); color: #fff; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.cmdots { display: flex; justify-content: center; gap: 5px; padding: 8px 0 0; }
.cmdots span { width: 6px; height: 6px; border-radius: 50%; background: var(--grau-3); }
.cmdots span.on { background: var(--blau); }
.cmcap { margin: 6px 14px 0; font-size: 14px; color: var(--muted); font-style: italic; }
.cmbody { padding: 10px 14px 14px; }
.cmtext { font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.cmtext a, .cmcap a { color: var(--blau); }
.cmtext.cmshort:not(.open) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* Bildtext: angeteasert */
.cmtext.cmlong:not(.open) { max-height: var(--cmh); overflow: hidden; position: relative; }   /* reiner Text: so hoch wie ein Bildbeitrag */
.cmtext.cmlong.cut::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(rgba(255,255,255,0), var(--card)); }
.cmmore { background: none; border: 0; font: inherit; cursor: pointer; padding: 4px 0; color: var(--muted); font-weight: 600; font-size: 15px; }
.cmdate { display: block; padding: 10px 14px 0; font-size: 13px; color: var(--muted); }
.cmdate + .cmhead { padding-top: 6px; }
.cmshare { margin: 0 14px; padding: 10px 0 12px; border-top: 1px solid var(--grau-4); font-size: 13px; color: var(--muted); }
.cmok { margin-top: 14px; width: 100%; min-height: 56px; border: 0; border-radius: var(--radius-btn); background: var(--gelb); color: var(--dblau);
        font: inherit; font-weight: 600; font-size: 18px; cursor: pointer; }
.cmok:disabled { opacity: .6; }
.cmdone { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--gruen-text); }
