/* chn chan - Dark als Standard, heller Modus per Schalter */

:root {
  --hg:            #1b1c1e;
  --hg-erhoben:    #232529;
  --hg-beitrag:    #24262b;
  --hg-op:         #282b31;
  --hg-eingabe:    #1a1b1e;
  --rand:          #34373d;
  --rand-stark:    #43474f;
  --text:          #c9cbcf;
  --text-schwach:  #8b8f97;
  --akzent:        #d08b5b;
  --akzent-hell:   #e5a874;
  --link:          #7ea6d8;
  --link-hover:    #a6c4e8;
  --gruen:         #7fa87f;
  --rot:           #cf6b6b;
  --name:          #8fae8f;
  --radius:        3px;
}

/* Matrix: alles bleibt wie im Dunkelmodus, nur die Akzentfarbe wird grün. */
html[data-thema="matrix"] {
  --akzent:      #2fe06a;
  --akzent-hell: #6cf79e;
}

/* Vice: dieselbe Grundlage, Akzent in Neonpink. */
html[data-thema="vice"] {
  --akzent:      #ff2e88;
  --akzent-hell: #ff6fae;
}

/* Mystic: Akzent in Neon-Cyanblau. */
html[data-thema="mystic"] {
  --akzent:      #00e5ff;
  --akzent-hell: #5cefff;
}

html[data-thema="hell"] {
  --hg:            #eef0f4;
  --hg-erhoben:    #ffffff;
  --hg-beitrag:    #f6f7f9;
  --hg-op:         #eaedf2;
  --hg-eingabe:    #ffffff;
  --rand:          #ccd1d9;
  --rand-stark:    #aab1bb;
  --text:          #24262b;
  --text-schwach:  #656b75;
  --akzent:        #a85f2c;
  --akzent-hell:   #8a4d22;
  --link:          #2d5f9e;
  --link-hover:    #17416f;
  --gruen:         #3f7a3f;
  --rot:           #b03636;
  --name:          #2f6b3f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--hg);
  color: var(--text);
  font: 13px/1.45 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

code {
  background: var(--hg-eingabe);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 0 4px;
  font-family: Consolas, "Courier New", monospace;
}

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

.kopf {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--hg-erhoben);
  border-bottom: 1px solid var(--rand);
  position: sticky; top: 0; z-index: 30;
}

.marke {
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--akzent); text-decoration: none;
}
.marke span { color: var(--text); }
.marke:hover { text-decoration: none; }
.marke.gross { font-size: 30px; display: block; margin-bottom: 6px; }

.boardleiste { display: flex; gap: 3px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.boardleiste a {
  padding: 2px 7px; border-radius: var(--radius);
  color: var(--text-schwach); font-size: 12.5px;
}
.boardleiste a:hover { background: var(--hg-beitrag); color: var(--link-hover); text-decoration: none; }
.boardleiste a.aktiv { background: var(--akzent); color: #17181a; font-weight: 600; }

/* flex: 0 0 auto ist hier entscheidend - ohne das greift die allgemeine
   Formularregel weiter unten mit flex:1, und das Auswahlfeld wird von der
   Boardleiste auf wenige Pixel zusammengedrückt. */
.kopf-rechts { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
#thema-wahl {
  flex: 0 0 auto;
  width: auto;
  min-width: 88px;
  background: var(--hg-eingabe); border: 1px solid var(--rand); color: var(--text-schwach);
  border-radius: var(--radius); cursor: pointer; padding: 3px 6px; font: inherit; font-size: 12px;
}
#thema-wahl:hover { border-color: var(--rand-stark); color: var(--text); }

.banner {
  margin: 10px auto; max-width: 1100px; padding: 8px 12px;
  background: var(--hg-op); border: 1px solid var(--akzent);
  border-radius: var(--radius); color: var(--akzent-hell);
}

main { max-width: 1100px; margin: 0 auto; padding: 12px 14px 40px; }

/* ---------- Zugangsschleuse und Meldungen ---------- */

.schleuse-seite {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.schleuse { width: 100%; max-width: 380px; text-align: center; }
.schleuse-text { color: var(--text-schwach); margin: 0 0 18px; }
.schleuse form { display: flex; flex-direction: column; gap: 8px; }
.schleuse input, .schleuse button { padding: 9px 11px; font-size: 14px; }
.schleuse-fuss { margin-top: 22px; font-size: 12px; color: var(--text-schwach); }
.schleuse-fuss a { color: var(--text-schwach); }

.fehler {
  background: color-mix(in srgb, var(--rot) 15%, transparent);
  border: 1px solid var(--rot); color: var(--rot);
  border-radius: var(--radius); padding: 8px 11px; margin-bottom: 14px;
}
.fehler.gross-text { font-size: 14px; text-align: left; }

.hinweis {
  color: var(--text-schwach); padding: 10px 12px;
  background: var(--hg-beitrag); border: 1px solid var(--rand);
  border-radius: var(--radius); margin: 12px 0;
}
.hinweis.warnung { border-color: var(--rot); color: var(--rot); }

/* ---------- Übersicht ---------- */

.uebersicht h1 { font-size: 20px; margin: 6px 0 16px; color: var(--akzent); }
.board-kacheln {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.board-kachel {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; background: var(--hg-beitrag);
  border: 1px solid var(--rand); border-radius: var(--radius);
  color: var(--text);
}
.board-kachel:hover { border-color: var(--akzent); text-decoration: none; }
.board-kachel .kuerzel { font-size: 16px; font-weight: 700; color: var(--akzent); }
.board-kachel .name { font-weight: 600; }
.board-kachel .beschreibung, .board-kachel .zahl { font-size: 12px; color: var(--text-schwach); }

/* ---------- Startseite: Threadlisten ---------- */

.start-liste { margin-top: 26px; }
.start-kopf {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.start-kopf h2 { font-size: 15px; margin: 0; color: var(--akzent); }
.start-schalter { display: flex; gap: 4px; margin-left: auto; }
.start-schalter button {
  background: var(--hg-beitrag); color: var(--text-schwach);
  border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 3px 10px; font-size: 12px; font-weight: 400;
}
.start-schalter button:hover { border-color: var(--rand-stark); color: var(--text); background: var(--hg-beitrag); }
.start-schalter button.aktiv {
  background: var(--akzent); color: #17181a; border-color: var(--akzent); font-weight: 600;
}

.start-kacheln {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
/* Muss sein: das hidden-Attribut wirkt nur über display:none aus dem
   Browser-Standardblatt, und die Regel darüber schlägt es. Ohne diese Zeile
   stehen beide Listen zugleich da und jeder Thread erscheint doppelt. */
.start-kacheln[hidden] { display: none; }
.start-kachel {
  display: flex; gap: 8px; padding: 7px;
  background: var(--hg-beitrag); border: 1px solid var(--rand);
  border-radius: var(--radius); color: var(--text); overflow: hidden;
}
.start-kachel:hover { border-color: var(--akzent); text-decoration: none; }

.start-bild {
  position: relative; flex: 0 0 68px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  background: var(--hg-eingabe); border-radius: var(--radius); overflow: hidden;
}
.start-bild img { max-width: 100%; max-height: 100%; object-fit: cover; }
.start-board {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: 10px; text-align: center; padding: 1px 0;
}
.start-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.start-betreff {
  color: var(--akzent); font-weight: 700; font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.start-anriss {
  font-size: 11.5px; color: var(--text-schwach); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.start-zahlen { font-size: 11px; color: var(--text-schwach); margin-top: auto; }
.frisch { color: var(--akzent); }

/* Herkunftszeile der Antwortkacheln: sagt, ob es eine Antwort oder ein neuer
   Thread ist, und in welchem Faden. */
.start-herkunft {
  font-size: 11px; color: var(--text-schwach);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.start-herkunft em { color: var(--akzent); font-style: normal; font-weight: 600; }
.start-anriss.leer { font-style: italic; opacity: .7; }

.regeln { margin-top: 26px; padding: 14px 16px; background: var(--hg-beitrag);
          border: 1px solid var(--rand); border-radius: var(--radius); }
.regeln h2 { font-size: 14px; margin: 0 0 8px; color: var(--akzent); }
.regeln ul { margin: 0; padding-left: 18px; color: var(--text-schwach); }
.regeln li { margin-bottom: 4px; }

/* ---------- Board- und Threadkopf ---------- */

.board-kopf { margin-bottom: 12px; }
.board-kopf h1 { font-size: 19px; margin: 4px 0; color: var(--akzent); }
.board-beschreibung { margin: 0; color: var(--text-schwach); font-size: 12.5px; }

.trenner { border: 0; border-top: 1px solid var(--rand); margin: 14px 0; }

/* ---------- Formular ---------- */

.beitrag-form {
  background: var(--hg-erhoben); border: 1px solid var(--rand);
  border-radius: var(--radius); margin-bottom: 14px;
}
.form-titel {
  padding: 7px 12px; border-bottom: 1px solid var(--rand);
  font-weight: 600; color: var(--akzent);
  display: flex; justify-content: space-between; align-items: center;
}
.form-schliessen {
  background: none; border: 0; color: var(--text-schwach);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.form-schliessen:hover { color: var(--rot); }

.form-zeilen {
  display: grid; gap: 8px; padding: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.form-zeilen label { display: flex; align-items: center; gap: 8px; }
.form-zeilen label.voll { grid-column: 1 / -1; align-items: flex-start; }
.form-zeilen label > span {
  min-width: 74px; color: var(--text-schwach); font-size: 12px; padding-top: 5px;
}

input[type="text"], input[type="password"], textarea, select {
  flex: 1; width: 100%;
  background: var(--hg-eingabe); color: var(--text);
  border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 5px 7px; font: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--akzent); }
textarea { resize: vertical; min-height: 70px; font-family: inherit; }
input[type="file"] { color: var(--text-schwach); font-size: 12px; flex: 1; }

button, .knopf {
  background: var(--akzent); color: #17181a; border: 0;
  border-radius: var(--radius); padding: 6px 14px;
  font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { background: var(--akzent-hell); }
button:disabled { opacity: .5; cursor: not-allowed; }

.form-fuss {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 12px 12px;
}
.form-hinweis { color: var(--text-schwach); font-size: 11.5px; }

.honigtopf { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Schnellantwort: schwebendes Fenster */
.beitrag-form.schwebend {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: min(460px, calc(100vw - 36px));
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  max-height: 80vh; overflow-y: auto;
}
.beitrag-form.schwebend .form-zeilen { grid-template-columns: 1fr; }

/* ---------- Beiträge ---------- */

.thread-block {
  margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--rand);
}

.beitrag {
  background: var(--hg-beitrag); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 8px 10px; margin-bottom: 6px;
}
.beitrag.op { background: var(--hg-op); border-color: var(--rand-stark); }
.beitrag.antwort { margin-left: 18px; }
.beitrag:target { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.beitrag.neu { animation: aufblitzen 2s ease-out; }
@keyframes aufblitzen {
  from { border-color: var(--akzent); background: var(--hg-op); }
  to   { border-color: var(--rand); }
}

.beitrag-kopf {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-schwach); margin-bottom: 5px;
}
.betreff { color: var(--akzent); font-weight: 700; font-size: 13px; }
.poster { color: var(--name); font-weight: 600; }
.tripcode { color: var(--name); opacity: .75; font-family: Consolas, monospace; font-size: 11px; }
.poster-id {
  font-family: Consolas, monospace; font-size: 11px;
  background: var(--hg-eingabe); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 0 4px;
}
/* Die Nummer ist zweigeteilt: "Nr." verweist auf den Beitrag, die Zahl oeffnet
   das Antwortfenster.

   Drei Dinge muessen gleichzeitig stimmen, und sie widersprechen sich:
   - die Zahl braucht eine Klickflaeche, die man mit dem Finger trifft
   - die Kopfzeile darf dadurch nicht hoeher werden
   - zwischen "Nr." und der Zahl muss ein sichtbarer Abstand bleiben

   Geloest ueber Innenabstaende, die vertikal durch negative Aussenabstaende
   ausgeglichen werden. Waagrecht wird NICHT ausgeglichen, wo die beiden
   aneinanderstossen: dort ist der Innenabstand der Zahl zugleich der sichtbare
   Wortabstand. Ein frueherer Versuch mit gap plus beidseitig negativem Abstand
   hob sich exakt auf - gemessen 0 Pixel Luecke, es las sich als "Nr.1234567",
   und Firefox brach an der Stelle sogar um. */
.nummer {
  color: var(--text-schwach);
  display: inline-flex; align-items: center;
  white-space: nowrap;
}
.nummer a { color: inherit; text-decoration: none; padding: 6px 0; margin: -6px 0; }
.nummer a:hover { color: var(--akzent); text-decoration: underline; }

/* Links kein negativer Abstand: dieser Innenabstand IST die Luecke nach "Nr.".
   Der Selektor nennt beide Klassen, weil ".nummer a" darueber sonst gewinnt -
   dessen Spezifitaet ist hoeher als die einer einzelnen Klasse, und damit setzte
   sich "padding: 6px 0" durch. Gemessene Folge: die Klickflaeche blieb 6 statt
   16 Pixel breit und die Luecke nach "Nr." verschwand ganz. */
.nummer a.nummer-antwort {
  cursor: pointer;
  padding-left: 5px; padding-right: 5px; margin-right: -5px;
}
.antworten-link {
  color: var(--text-schwach); font-weight: 700; cursor: pointer;
  padding: 6px 4px; margin: -6px -4px;
}
.loeschen-link { color: var(--text-schwach); font-size: 11px; opacity: .7; }
.loeschen-link:hover { color: var(--rot); opacity: 1; }
.markierung {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px;
  border-radius: var(--radius); padding: 1px 5px;
}
.markierung.angepinnt { background: var(--akzent); color: #17181a; }
.markierung.gesperrt  { background: var(--rot); color: #fff; }

.rueckverweise { display: flex; gap: 6px; flex-wrap: wrap; }
.rueckverweise a { font-size: 11px; color: var(--text-schwach); }

.datei { margin: 4px 0 6px; }
.datei-info { font-size: 11.5px; color: var(--text-schwach); margin-bottom: 3px; }
.bild-link img {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--rand); border-radius: var(--radius);
}
.bild-link.gross img { max-width: 100%; width: auto; }

.inhalt { white-space: normal; }
.greentext { color: var(--gruen); }
.verweis { color: var(--link); }
.verweis-tot { color: var(--text-schwach); text-decoration: line-through; }

/* Verweise nach draußen bekommen ein Zeichen, damit man vorher weiß,
   dass ein Klick das Board verlässt. */
.aussen::after { content: " ↗"; font-size: .85em; opacity: .7; }

/* ---------- Spoiler ---------- */

.spoiler {
  background: var(--text); color: transparent;
  border-radius: 2px; cursor: pointer;
  /* Bewusst OHNE Übergang: Schrift- und Hintergrundfarbe müssen im selben
     Augenblick umschalten. Animiert man nur eine von beiden - oder läuft die
     Animation gar nicht erst an, etwa in einem Tab ohne Bildaufbau - stehen
     kurzzeitig oder dauerhaft beide auf demselben Ton und der Text ist
     unlesbar. Ein Spoiler soll auf Klick sofort aufgehen. */
}
.spoiler:hover { background: var(--rand-stark); }
.spoiler.offen, .spoiler:focus {
  background: var(--hg-eingabe); color: var(--text); outline: none;
}

.bild-link.verschleiert img,
.start-bild img.verschleiert {
  filter: blur(22px) saturate(.35) brightness(.7);
  transform: scale(1.06);   /* verhindert helle Ränder durch die Unschärfe */
}
.bild-link.verschleiert { position: relative; display: inline-block; }
.bild-link.verschleiert::after {
  content: "Spoiler";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  text-shadow: 0 1px 4px rgba(0,0,0,.9); pointer-events: none;
}
.bild-link.aufgedeckt img { filter: none; transform: none; }
.bild-link.aufgedeckt::after { content: none; }
.spoiler-hinweis {
  background: var(--rot); color: #fff; border-radius: var(--radius);
  padding: 0 5px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px;
}

/* ---------- Video ---------- */

.video-halter { position: relative; display: inline-block; max-width: 100%; }
.video-halter video {
  display: block; max-width: 100%; max-height: 70vh;
  border: 1px solid var(--rand); border-radius: var(--radius);
  background: #000;
}
.video-halter.verschleiert video { filter: blur(24px) saturate(.3) brightness(.6); }
.video-halter.verschleiert::after {
  content: "Spoiler";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  text-shadow: 0 1px 4px rgba(0,0,0,.9); cursor: pointer;
}
.video-halter.aufgedeckt video { filter: none; }
.video-halter.aufgedeckt::after { content: none; }

/* Marke auf Vorschaukacheln: sagt, dass dahinter ein Video steckt, und wie lang */
.video-marke {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: 10px; font-family: Consolas, monospace;
  border-radius: var(--radius); padding: 1px 4px;
}
.video-marke::before { content: "▶ "; }

.datei-hinweis { font-size: 11.5px; color: var(--text-schwach); padding: 2px 0; }
.datei-hinweis.gut { color: var(--gruen); }
.datei-hinweis.warnung { color: var(--akzent); }

.wurf {
  font-family: Consolas, monospace; font-size: 11.5px;
  color: var(--akzent); background: var(--hg-eingabe);
  border: 1px solid var(--rand); border-radius: var(--radius); padding: 0 5px;
}

/* ---------- Hilfe am Formular ---------- */

.hilfe { position: relative; flex: 0 0 auto; }
.hilfe > summary {
  list-style: none; cursor: pointer; user-select: none;
  width: 19px; height: 19px; line-height: 17px; text-align: center;
  border: 1px solid var(--rand); border-radius: 50%;
  color: var(--text-schwach); font-size: 12px; font-weight: 700;
}
.hilfe > summary::-webkit-details-marker { display: none; }
.hilfe > summary:hover { border-color: var(--akzent); color: var(--akzent); }
.hilfe[open] > summary { border-color: var(--akzent); color: var(--akzent); }

.hilfe-inhalt {
  position: absolute; z-index: 60; top: 26px; right: 0;
  width: min(420px, 88vw); max-height: 70vh; overflow-y: auto;
  padding: 12px 14px;
  background: var(--hg-erhoben); border: 1px solid var(--akzent);
  border-radius: var(--radius); box-shadow: 0 8px 26px rgba(0,0,0,.5);
  font-size: 12px; line-height: 1.45; text-align: left;
}
.hilfe-inhalt h4 {
  margin: 12px 0 4px; font-size: 12px; color: var(--akzent);
  border-bottom: 1px solid var(--rand); padding-bottom: 2px;
}
.hilfe-inhalt h4:first-child { margin-top: 0; }
.hilfe-inhalt dl { margin: 0; }
.hilfe-inhalt dt { margin-top: 5px; }
.hilfe-inhalt dd { margin: 0 0 0 14px; color: var(--text-schwach); }
.hilfe-inhalt p { margin: 4px 0 0 0; color: var(--text-schwach); }
.hilfe-inhalt code { font-size: 11.5px; }

.thread-fuss {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  font-size: 12px; color: var(--text-schwach); margin: 4px 0 8px;
}
.thread-fuss .oeffnen { font-weight: 600; }
.versteckt { font-style: italic; }

/* ---------- Blättern und Status ---------- */

.blaettern { display: flex; gap: 5px; justify-content: center; margin: 20px 0; }
.blaettern a, .blaettern span {
  padding: 4px 10px; border: 1px solid var(--rand);
  border-radius: var(--radius); color: var(--text-schwach);
}
.blaettern .aktiv { background: var(--akzent); color: #17181a; border-color: var(--akzent); font-weight: 600; }

.thread-status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding: 8px 12px;
  background: var(--hg-erhoben); border: 1px solid var(--rand);
  border-radius: var(--radius); font-size: 12px; color: var(--text-schwach);
}
.auto-schalter { display: flex; align-items: center; gap: 6px; cursor: pointer; }
#jetzt-aktualisieren { padding: 3px 10px; font-size: 12px; }

.fuss {
  max-width: 1100px; margin: 0 auto; padding: 14px;
  border-top: 1px solid var(--rand);
  display: flex; gap: 8px; justify-content: center;
  font-size: 12px; color: var(--text-schwach);
}

/* ---------- Katalog ---------- */

.katalog-leiste {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 12px;
  background: var(--hg-erhoben); border: 1px solid var(--rand);
  border-radius: var(--radius); font-size: 12px;
}
.katalog-leiste label { display: flex; align-items: center; gap: 6px; }
.katalog-leiste span { color: var(--text-schwach); }
.katalog-leiste select, .katalog-leiste input { width: auto; }
.katalog-suche input { min-width: 180px; }
#katalog-anzahl { margin-left: auto; color: var(--text-schwach); }

.katalog {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  align-items: start;
}

.kachel {
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px; color: var(--text);
  background: var(--hg-beitrag); border: 1px solid var(--rand);
  border-radius: var(--radius);
  max-height: 320px; overflow: hidden;
}
.kachel:hover { border-color: var(--akzent); text-decoration: none; }
.kachel.angepinnt-kachel { border-color: var(--akzent); }

.kachel-bild {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 90px; background: var(--hg-eingabe); border-radius: var(--radius);
  overflow: hidden;
}
.kachel-bild img { max-width: 100%; height: auto; display: block; }
.kachel-bild img.verschleiert { filter: blur(16px) saturate(.35) brightness(.7); transform: scale(1.06); }
.kein-bild { color: var(--text-schwach); font-size: 11px; padding: 24px 0; }

.kachel-markierung {
  position: absolute; top: 3px; left: 3px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .3px;
  border-radius: var(--radius); padding: 1px 4px;
}
.kachel-markierung.angepinnt { background: var(--akzent); color: #17181a; }
.kachel-markierung.gesperrt  { background: var(--rot); color: #fff; right: 3px; left: auto; }

.kachel-zahlen {
  display: flex; gap: 8px; font-size: 11px; color: var(--text-schwach);
}
.kachel-betreff {
  color: var(--akzent); font-weight: 700; font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kachel-text { font-size: 11.5px; color: var(--text-schwach); line-height: 1.35; }

/* ---------- Bildansicht ---------- */

.lupe {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 20px;
}
.lupe img { max-width: 100%; max-height: 100%; object-fit: contain; }

@media (max-width: 640px) {
  .beitrag.antwort { margin-left: 8px; }
  .form-zeilen { grid-template-columns: 1fr; }
  .form-zeilen label > span { min-width: 64px; }
  .beitrag-form.schwebend { right: 8px; bottom: 8px; }
  main { padding: 10px 8px 30px; }
}
