
/* ===== THEMA ANSICHT ===== */
.thema-header {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.thema-header h1 {
    /* Gleiche Markenschrift + Farbe wie .post-erweiterte-ueberschrift-text
       (thema/inhalt.php), @font-face siehe system/header.php. */
    font-family: 'RotweissSans', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red-primary, #a70909);
    margin-bottom: 0.5rem;
}

.thema-header .thema-meta {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.thema-header .thema-meta a {
    color: #a70909;
    text-decoration: none;
}

/* ===== KOPF-LOGOS ===== */
.thema-kopf-logos { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; margin-right: 4px; }
.thema-kopf-logos img { height: 24px; width: auto; max-width: 34px; object-fit: contain; }

/* ===== VERKNÜPFTES SPIEL (3. Liga) ===== */
.thema-spiel-box {
    display: block; margin-top: 1rem; padding: 0.75rem 1rem;
    background: #f7f8fa; border: 1px solid #e6e6e6; border-radius: 10px;
    text-decoration: none; color: #1a1a1a; transition: border-color 0.15s, background 0.15s;
}
.thema-spiel-box:hover { border-color: #a70909; background: #fff; }
.thema-spiel-box.ist-live { border-color: #a70909; background: #fff5f5; }
.tsb-spieltag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #888; text-align: center; margin-bottom: 0.5rem; }
.tsb-paarung { display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.tsb-team { flex: 1; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; min-width: 0; }
.tsb-team.rechts { justify-content: flex-end; text-align: right; }
.tsb-team img { height: 26px; width: auto; max-width: 30px; object-fit: contain; flex-shrink: 0; }
.tsb-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsb-mitte { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 74px; }
.tsb-score { font-size: 1.25rem; font-weight: 800; color: #a70909; line-height: 1; }
.tsb-zeit { font-size: 0.85rem; font-weight: 700; color: #555; line-height: 1.2; text-align: center; }
.tsb-status { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: #888; min-height: 0.9em; }
.tsb-live-badge {
    background: #a70909; color: #fff; padding: 1px 7px; border-radius: 20px;
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em;
    animation: tsb-blink 1.4s ease-in-out infinite;
}
@keyframes tsb-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Live=Gruen, Halbzeit=Gelb, Unterbrochen=Dunkelrot (Umbau 2026-07-24) */
.spiel-live-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 1px 7px; border-radius: 20px; color: #fff; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; }
.spiel-live-badge.live { background: #1a8a3c; animation: tsb-blink 1.4s ease-in-out infinite; }
.spiel-live-badge.halbzeit { background: #b8860b; }
.spiel-live-badge.unterbrochen { background: #8b0000; }
.spiel-live-badge .slb-punkt { width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: 0.85; }
/* Kompakte Tore/Karten-Zeile unter der Paarung - leer (kein Element), solange
   noch nichts passiert ist, siehe spielToreKartenKompaktRendern(). */
.tsb-ereignisse { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 10px; margin-top: 0.6rem; padding-top: 0.55rem; border-top: 1px solid #e6e6e6; }
.tsb-ereignis { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; color: #4a3a3a; }
.tsb-ereignis-icon.tor { color: #1a8a3c; }
.tsb-ereignis-icon.gelb { color: #e0b400; }
.tsb-ereignis-icon.gelbrot, .tsb-ereignis-icon.rot { color: #c81414; }
@media (max-width: 600px) {
    .tsb-team { font-size: 0.82rem; }
    .tsb-team img { height: 22px; }
    .tsb-mitte { min-width: 64px; }
    .tsb-score { font-size: 1.1rem; }
    .tsb-ereignis { font-size: 0.7rem; }
}

/* ===== MODERNISIERTE SPIELBOX (2026-10): Logos gross ueber vollen Teamnamen ===== */
.thema-spiel-box { border-radius: 18px; padding: 14px 14px 12px; background: linear-gradient(180deg, #fbf8f8, #fff); border: 1.5px solid #ece4e4; box-shadow: 0 1px 2px rgba(60,20,20,.05), 0 6px 18px rgba(60,20,20,.06); }
.thema-spiel-box:hover { border-color: #993234; background: #fff; }
.thema-spiel-box.ist-live { border-color: #1a8a3c; background: linear-gradient(180deg, #f1faf4, #fff); }
.tsb-spieltag { display: inline-flex; align-self: center; margin: 0 auto 12px; padding: 4px 12px; border-radius: 999px; background: #f3eded; color: #6f6262; font-size: .68rem; letter-spacing: .05em; }
.thema-spiel-box { text-align: center; }
.tsb-paarung { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: start; gap: 8px; }
.tsb-team, .tsb-team.rechts { flex-direction: column; justify-content: flex-start; text-align: center; gap: 8px; font-size: .9rem; line-height: 1.2; }
.tsb-team.rechts { flex-direction: column-reverse; }
.tsb-team img { height: 44px; width: auto; max-width: 52px; }
.tsb-team span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.tsb-mitte { min-width: 78px; padding-top: 6px; }
.tsb-score { font-size: 1.7rem; letter-spacing: .02em; padding: 4px 12px; border-radius: 12px; background: #993234; color: #fff; }
.tsb-zeit { font-size: .95rem; padding: 5px 10px; border-radius: 10px; background: #f3eded; color: #4a3a3a; }
.tsb-countdown { font-size: .68rem; font-weight: 800; color: #993234; margin-top: 2px; }
.tsb-status { font-size: .7rem; margin-top: 2px; }
.tsb-ereignisse { gap: 6px; margin-top: 12px; padding-top: 12px; }
.tsb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: #fff; border: 1px solid #ece4e4; font-size: .74rem; color: #4a3a3a; max-width: 100%; }
.tsb-chip[data-href] { cursor: pointer; }
.tsb-chip[data-href]:hover { border-color: #993234; }
.tsb-chip-foto { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tsb-chip:not(:has(.tsb-chip-foto)) { padding-left: 10px; }
.tsb-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsb-chip-stand { padding: 1px 7px; border-radius: 999px; background: #1a8a3c; color: #fff; font-size: .68rem; font-weight: 800; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tsb-chip-logo { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; margin-left: 2px; }
.tsb-chip.tor { border-color: #bfe3cb; background: #f4fbf6; }
.tsb-chip.gelb { border-color: #f1e2a0; background: #fffaea; }
.tsb-chip.gelbrot, .tsb-chip.rot { border-color: #efc0c0; background: #fdf3f3; }
@media (max-width: 600px) {
    .tsb-team img { height: 40px; }
    .tsb-team { font-size: .84rem; }
    .tsb-mitte { min-width: 68px; }
    .tsb-score { font-size: 1.5rem; }
    /* Mobil: Ereignisse zweispaltig (Heim links / Gast rechts, wie beim Spielstand)
       als schlanke Zeilen statt breiter Pillen - Foto/Vereinslogo entfallen,
       Minute, Name, Tor-/Kartensymbol und Zwischenstand bleiben. */
    .tsb-ereignisse { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 4px 12px; justify-content: stretch; }
    .tsb-chip { background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0; gap: 5px; font-size: .72rem; min-width: 0; }
    .tsb-chip.seite-heim { grid-column: 1; justify-self: start; }
    .tsb-chip.seite-gast { grid-column: 2; justify-self: end; flex-direction: row-reverse; text-align: right; }
    .tsb-chip-foto, .tsb-chip-logo { display: none; }
    .tsb-chip-stand { padding: 0 5px; font-size: .64rem; }
    .tsb-ereignis-icon { font-size: .7rem; }
}

/* .glocke-abo-btn ist jetzt global in system/header.php definiert (wird auch
   auf den Vereins-/Liga-/Spieler-Seiten unter /spieler/ gebraucht). */

.thema-header .thema-meta a:hover {
    text-decoration: underline;
}

/* ===== PAGINIERUNG ===== */
.pagination-top,
.pagination-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    padding: 0.5rem 0.8rem;
    background: #f8f9fc;
    border-radius: 10px;
}

.pagination-top {
    margin-bottom: 0.6rem;
    margin-top: 0;
}

.pagination-bottom {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.pagination-links {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-links a,
.pagination-links span {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    color: #a70909;
    background: white;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    touch-action: manipulation;
    min-width: 32px;
    text-align: center;
    transition: all 0.2s ease;
}

.pagination-links a:hover {
    background: #a70909;
    color: white;
    border-color: #a70909;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(167, 9, 9, 0.2);
}

.pagination-links a:active {
    transform: scale(0.95);
}

.pagination-links .current-page {
    background: #a70909;
    color: white;
    border-color: #a70909;
    font-weight: 700;
}

.pagination-links .dots {
    background: transparent;
    border: none;
    color: #718096;
    padding: 0.3rem 0.2rem;
    min-width: 20px;
}

/* ===== UNGELESEN ===== */
.beitrag-ungelesen {
    position: relative;
}

.ungelesen-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 0.3rem;
    background: #a70909;
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.55rem;
    font-weight: 600;
}



/* ===== SPIELER-CHIPS (erkannte Spieler in den RWE-Spieltags-Threads) ===== */
.post-spieler-fuss { margin: 0 0 12px; padding: 10px 14px 0; border-top: 1px solid #e8dede; }
.post-spieler-fuss .post-spieler-chips { display: flex; }
.post-spieler-chips { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Erkannte Spieler/Trainer/Vereine: nur Bilder (Spielerfoto + Vereinswappen), der Name steht im Tooltip */
.spieler-chip { position: relative; display: inline-flex; align-items: center; text-decoration: none; color: #3a2f2f; padding: 0; background: none; border-radius: 50%; }
button.spieler-chip { border: 0; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.spieler-chip.sc-offen .sc-foto { box-shadow: 0 0 0 2px #993234; }
.sc-popover { position: absolute; z-index: 100000; min-width: 190px; max-width: calc(100vw - 16px); background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.22); padding: 6px; border: 1px solid #eadede; }
.sc-popover .sc-pop-kopf { padding: 6px 10px 5px; font-size: .72rem; font-weight: 800; color: #8a7a7a; border-bottom: 1px solid #f0e6e6; margin-bottom: 3px; }
.sc-popover a { display: flex; align-items: center; gap: 8px; padding: 10px 10px; border-radius: 8px; color: #3a2f2f; text-decoration: none; font-size: .9rem; font-weight: 600; }
.sc-popover a i { width: 18px; text-align: center; color: #993234; }
.sc-popover a:hover, .sc-popover a:active { background: #f7eded; }
.spieler-chip:hover { transform: translateY(-1px); }
.spieler-chip .sc-foto { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #e9dede; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); flex: none; display: block; }
.spieler-chip .sc-init { display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; color: #993234; font-style: normal; }
.spieler-chip .sc-wappen { position: absolute; right: -5px; bottom: -4px; width: 19px; height: 19px; object-fit: contain; background: #fff; border-radius: 50%; padding: 1px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.spieler-chip.verein-chip .sc-foto { border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; }
.spieler-chip .sc-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spieler-vorschau { display: none; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0; font-size: .72rem; color: #8a7a7a; }
.spieler-vorschau.an { display: flex; }

/* ===== SPIEL-VERKNUEPFUNG: Klick auf die Erweiterte Antwort -> alle Beitraege zum Spiel ===== */
.post-subtitle-row.spiel-verknuepft { cursor: pointer; }
.post-subtitle-row.spiel-verknuepft:hover .post-subtitle-text { text-decoration: underline; }
.spiel-stand { display: inline; font-size: 0.8rem; font-weight: 800; font-style: normal; background: none; padding: 0; border-radius: 0; color: inherit; white-space: nowrap; }
/* Laeuft das Spiel: Ergebnis (und Titel der Erweiterten Antwort) pulsiert gruen, abgeschlossene Spiele bleiben normal */
.spiel-stand-live { color: #1c9a4a; animation: spielLiveText 1.2s ease-in-out infinite; }
.post-subtitle-row:has(.spiel-stand-live) .post-subtitle-text { color: #1c9a4a; animation: spielLiveText 1.2s ease-in-out infinite; }
@keyframes spielLiveText { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .spiel-stand-live, .post-subtitle-row:has(.spiel-stand-live) .post-subtitle-text { animation: none; } }
.sb-overlay { position: fixed; inset: 0; z-index: 10050; background: rgba(20,10,10,.55); display: none; align-items: center; justify-content: center; padding: 16px; }
.sb-overlay.offen { display: flex; }
.sb-box { background: #fff; width: 100%; max-width: 560px; max-height: 86vh; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.sb-zu { align-self: flex-end; margin: 8px 10px 0; border: 0; background: none; font-size: 1.1rem; color: #777; cursor: pointer; }
.sb-inhalt { overflow-y: auto; padding: 0 16px 16px; }
.sb-kopf { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: 1px solid #eee; }
.sb-logos { display: inline-flex; gap: 6px; } .sb-logos img { width: 38px; height: 38px; object-fit: contain; }
.sb-titel { font-weight: 800; font-size: 1.05rem; color: #3a2f2f; }
.sb-stand { font-size: .82rem; font-weight: 700; color: #6b5555; } .sb-stand.sb-live { color: #1c9a4a; }
.sb-anzahl { font-size: .75rem; color: #8a7a7a; margin: 10px 0 6px; }
.sb-eintrag { display: block; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.sb-eintrag:hover { background: #f8ecec; }
.sb-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .78rem; } .sb-meta b { color: #993234; } .sb-meta span { color: #9a8a8a; }
.sb-text { font-size: .88rem; color: #3a2f2f; margin-top: 2px; word-break: break-word; }
.sb-leer { padding: 28px 0; text-align: center; color: #8a7a7a; }

/* ===== HIGHLIGHT ===== */
.highlight-post {
    animation: highlight 0.5s ease;
}

/* ===== PILLE "N NEUE BEITRÄGE" (liest/tippt der Nutzer, wird nicht gesprungen) ===== */
.neue-beitraege-pille {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 900;
    display: none; align-items: center; gap: 8px;
    background: #a70909; color: #fff; border: 0; border-radius: 999px;
    padding: 9px 16px; font-weight: 700; font-size: 14px; line-height: 1.2;
    box-shadow: 0 6px 18px rgba(167,9,9,.4); cursor: pointer;
}
@media (min-width: 769px) { .neue-beitraege-pille { bottom: 28px; } }

/* ===== ADMIN: WER HAT DIESEN BEITRAG GESEHEN? (Auge in jedem Beitrag) ===== */
.post-gesehen-btn { color: #a70909; }
.post-gesehen-btn-mobile { color: #a70909; }
.bg-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 10050; display: none; align-items: center; justify-content: center; padding: 12px; }
.bg-overlay.offen { display: flex; }
.bg-box { background: #fff; width: 100%; max-width: 560px; max-height: 88vh; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden; }
.bg-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #a70909; color: #fff; font-weight: 700; }
.bg-kopf button { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.bg-inhalt { padding: 14px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.bg-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bg-kpi { background: #f6eeee; border-radius: 10px; padding: 8px 10px; }
.bg-kpi b { display: block; font-size: 1.35rem; color: #a70909; line-height: 1.1; }
.bg-kpi span { font-size: .72rem; color: #666; }
.bg-kpi-gelb { background: #fff6dc; }
.bg-meta { margin: 10px 0 6px; font-size: .8rem; color: #666; }
.bg-tabs { display: flex; gap: 6px; margin: 8px 0; }
.bg-tabs button { flex: 1; border: 1px solid #e3caca; background: #fff; color: #7a2a2c; border-radius: 9px; padding: 7px 8px; font-weight: 700; font-size: .8rem; cursor: pointer; }
.bg-tabs button.aktiv { background: #a70909; color: #fff; border-color: #a70909; }
.bg-liste { display: flex; flex-direction: column; }
.bg-zeile { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid #f0e4e4; text-decoration: none; color: #222; }
.bg-av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #a70909; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.bg-av img { width: 100%; height: 100%; object-fit: cover; }
.bg-name { flex: 1; min-width: 0; font-weight: 700; font-size: .9rem; display: flex; flex-direction: column; }
.bg-name small, .bg-zeit small { font-weight: 400; color: #888; font-size: .7rem; }
.bg-zeit { text-align: right; font-size: .78rem; color: #555; display: flex; flex-direction: column; flex-shrink: 0; }
.bg-leer { padding: 18px 6px; color: #888; text-align: center; font-size: .9rem; }
.bg-fuss { margin-top: 10px; font-size: .68rem; color: #999; line-height: 1.4; }

/* ===== NEUE BEITRÄGE BANNER ===== */
.neue-beitraege-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #a70909;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(167, 9, 9, 0.25);
    transition: all 0.2s ease;
    animation: neueBeitraegeEinblenden 0.3s ease;
}

.neue-beitraege-banner:hover {
    background: #8a0707;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(167, 9, 9, 0.35);
}

@keyframes neueBeitraegeEinblenden {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes highlight {
    0% { background: #fff8e1; }
    100% { background: white; }
}

/* ===== SCHNELLANTWORT ===== */
.schnellantwort-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.schnellantwort-container h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

.schnellantwort-container textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s;
    background: #f7fafc;
}

.schnellantwort-container textarea:focus {
    outline: none;
    border-color: #a70909;
    background: white;
    box-shadow: 0 0 0 3px rgba(167, 9, 9, 0.1);
}

.schnellantwort-container .btn {
    background: #a70909;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.schnellantwort-container .btn:hover {
    background: #8a0707;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(167, 9, 9, 0.3);
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .thema-header {
        padding: 1rem;
    }
    .thema-header h1 {
        font-size: 1.2rem;
    }
    
    .pagination-top,
    .pagination-bottom {
        padding: 0.5rem 0.6rem;
    }
    
    .pagination-links a,
    .pagination-links span {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .schnellantwort-container {
        padding: 1rem;
    }
    .schnellantwort-container textarea {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .thema-header {
        padding: 0.8rem;
    }
    .thema-header h1 {
        font-size: 1rem;
    }
    .thema-header .thema-meta {
        font-size: 0.7rem;
        gap: 0.5rem;
    }
    
    .pagination-top,
    .pagination-bottom {
        padding: 0.4rem 0.4rem;
        border-radius: 8px;
    }
    
    .pagination-links {
        gap: 0.2rem;
    }
    
    .pagination-links a,
    .pagination-links span {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        min-width: 32px;
        min-height: 32px;
        border-radius: 4px;
    }
    
    .schnellantwort-container {
        padding: 0.8rem;
    }
    .schnellantwort-container h3 {
        font-size: 0.95rem;
    }
    .schnellantwort-container textarea {
        min-height: 60px;
        font-size: 16px !important;
        padding: 0.6rem;
    }
    .schnellantwort-container .btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem;
        font-size: 0.85rem;
    }
}

/* ===== IOS FONT FIX ===== */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* ===== LESER-LOG (Admin-only "Wer hat gelesen?") ===== */
.leser-log-zeile {
    display: flex;
    justify-content: center;
    margin: 0.6rem 0;
}

.leser-log-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #262626;
    border: 1px solid #333;
    color: #999;
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: 30px;
    cursor: pointer;
}

.leser-log-btn i { color: #a70909; }
.leser-log-btn:hover { color: #ddd; border-color: #a70909; }

.leser-log-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.leser-log-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.leser-log-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    max-width: 560px;
    width: 92%;
    max-height: 80vh;
    margin: 6vh auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.leser-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #333;
}

.leser-log-header h3 {
    font-size: 1rem;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leser-log-header h3 i { color: #a70909; }

.leser-log-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
}

.leser-log-close:hover { color: #fff; }

.leser-log-body {
    padding: 0.5rem 1.2rem 1rem;
    overflow-y: auto;
}

.leser-log-laedt,
.leser-log-leer {
    color: #777;
    font-size: 0.85rem;
    font-style: italic;
    padding: 1rem 0;
    text-align: center;
}

.leser-log-eintrag {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #262626;
}

.leser-log-eintrag:last-child { border-bottom: none; }

.leser-log-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    flex-shrink: 0;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.leser-log-info { flex: 1; min-width: 0; }

.leser-log-name {
    color: #ddd;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.leser-log-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-weight: 500;
}

.leser-log-badge.gast { background: #333; color: #aaa; }
.leser-log-badge.bot { background: #4a3300; color: #ffb84d; }
.leser-log-badge.ki { background: #3a1a4a; color: #d29bff; }
.leser-log-badge.quelle { background: #1a2e3a; color: #7dc4e0; }
.leser-log-badge.quelle i { margin-right: 2px; }

.leser-log-meta {
    color: #777;
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

/* ============================================================ */
/* ===== THEMEN-TABS (Thema/Fotos/Videos/Social Media/Links) ==== */
/* ============================================================ */
.thema-tabs-wrap {
    display: flex; align-items: stretch; gap: 0.5rem;
    background: #fff; border-radius: 16px 16px 0 0; overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.07); border: 1px solid #efe6e6; border-bottom: 0;
    margin-bottom: 0; /* sitzt direkt am ersten Beitrag */
}
/* erster Beitrag schliesst buendig unter den Reitern an */
#beitraege-container > .post-row:first-child { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.thema-tabs {
    display: flex; overflow-x: auto; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: 1;
}
.thema-tabs::-webkit-scrollbar { display: none; }
.thema-tab {
    flex: 0 0 auto; scroll-snap-align: start; text-align: center;
    padding: 15px 16px 13px; font-size: 0.85rem; font-weight: 700; color: #6b6b6b !important;
    text-decoration: none !important; position: relative; white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.thema-tab i { margin-right: 5px; }
.thema-tab:hover { background: #faf3f3; color: #a70909 !important; }
.thema-tab .thema-tab-cnt { color: #b0a0a0; margin-left: 3px; }
.thema-tab.aktiv { color: #a70909 !important; }
.thema-tab.aktiv .thema-tab-cnt { color: #a70909; }
.thema-tab.aktiv::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 0;
    height: 4px; border-radius: 4px 4px 0 0; background: #a70909;
}
.thema-tabs-suche-btn {
    flex: 0 0 auto; width: 52px; border: none; border-left: 1px solid #efe6e6;
    background: #fff; color: #a70909; font-size: 1rem; cursor: pointer;
}
.thema-tabs-suche-btn:hover { background: #faf3f3; }
@media (min-width: 1024px) {
    .thema-tabs { overflow-x: visible; }
    .thema-tab { flex: 1 1 0; }
    .thema-tab.aktiv::after { left: 50%; right: auto; transform: translateX(-50%); width: 60%; max-width: 70px; }
}

/* --- Overlay-Panel (Fotos/Videos/Social Media/Links + Suche) --- */
.thema-media-overlay {
    display: none; position: fixed; inset: 0; background-color: rgba(20,20,20,0.75);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 9999; align-items: center; justify-content: center; padding: 1rem;
}
.thema-media-overlay.sichtbar { display: flex; }
.thema-media-panel {
    background: #fff; border-radius: 14px; width: 100%; max-width: 760px;
    max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
}
.thema-media-panel-kopf {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.1rem; border-bottom: 1px solid #f0e8e8; font-weight: 700; color: #1c1c1c;
}
.thema-media-panel-close {
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: #f4eded; color: #a70909; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.thema-media-panel-close:hover { background: #f1d3d3; }
.thema-media-panel-body { padding: 1.1rem; overflow-y: auto; }
.thema-media-leer { text-align: center; color: #999; padding: 1.5rem; font-size: 0.85rem; }

.thema-media-pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.thema-media-pagination a { padding: 0.45rem 0.9rem; border-radius: 999px; background: #f4eded; color: #a70909; font-weight: 600; text-decoration: none; font-size: 0.8rem; }
.thema-media-pagination a:hover { background: #ecdcdc; }
.thema-media-pagination a.aktiv { background: #a70909; color: #fff; }

/* --- Fotos/Videos: Kachel-Grid + Vollbild-Item-Overlay (Look wie im Profil) --- */
.thema-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.7rem; }
.thema-media-tile-wrap { position: relative; }
.thema-media-tile {
    position: relative; aspect-ratio: 4 / 3; width: 100%; display: block;
    border: none; padding: 0; border-radius: 12px; overflow: hidden;
    cursor: pointer; background: #2a2a2a; box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.thema-media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thema-media-tile.thema-media-audio {
    background: linear-gradient(155deg, #a70909 0%, #5c0303 100%);
    display: flex; align-items: center; justify-content: center;
}
.thema-media-tile.thema-media-audio i.thema-media-noten { font-size: 2.1rem; color: rgba(255,255,255,0.85); }
.thema-media-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.16); transition: background 0.15s ease;
}
.thema-media-tile:hover .thema-media-play { background: rgba(0,0,0,0.32); }
.thema-media-play i {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.94); color: #a70909;
    display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.thema-media-badge {
    position: absolute; left: 7px; bottom: 7px; background: rgba(0,0,0,0.62); color: #fff;
    font-size: 0.62rem; font-weight: 600; padding: 3px 8px 3px 7px; border-radius: 999px;
    display: flex; align-items: center; gap: 4px; letter-spacing: 0.02em;
}
.thema-media-bookmark-btn {
    position: absolute; top: 7px; right: 7px; z-index: 3;
    width: 28px; height: 28px; border: none; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.thema-media-bookmark-btn:hover { background: rgba(167,9,9,0.9); }
.thema-media-bookmark-btn.is-bookmarked { background: rgba(167,9,9,0.9); }

.thema-media-item-overlay {
    display: none; position: fixed; inset: 0;
    background-color: rgba(20,20,20,0.82);
    background-image: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.6)), var(--thema-media-overlay-bild, none);
    background-size: cover; background-position: center; background-repeat: no-repeat;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 10050; align-items: center; justify-content: center; padding: 1rem;
}
.thema-media-item-overlay.sichtbar { display: flex; }
.thema-media-item-frame { position: relative; max-width: 600px; width: 100%; max-height: 90vh; }
.thema-media-item-box { background: #fff; border-radius: 14px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 1rem; }
.thema-media-item-close {
    position: absolute; top: -20px; right: -20px; width: 44px; height: 44px; border-radius: 50%;
    background: #a70909; color: #fff; border: 4px solid #fff; font-size: 1.15rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
    box-shadow: 0 3px 12px rgba(0,0,0,0.45);
}
.thema-media-item-close:hover { background: #8a0707; }
.thema-media-item-meta { margin-top: 0.7rem; font-size: 0.78rem; color: #999; display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; }
.thema-media-item-kontext { color: #a70909 !important; text-decoration: none; font-weight: 600; }
.thema-media-item-kontext:hover { text-decoration: underline; }

/* --- Social Media: Grid wie Fotos/Videos (Embed selbst braucht mehr Breite
   als eine Foto-Kachel, daher groesserer Mindest-Spaltenwert) --- */
.thema-social-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.9rem; align-items: start; }
.thema-link-liste { display: flex; flex-direction: column; gap: 0.9rem; }
.thema-social-card { border: 1px solid #f0e8e8; border-radius: 12px; padding: 0.8rem; overflow: hidden; }
.thema-social-card-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: center; font-size: 0.76rem; color: #999; margin-bottom: 0.6rem; }
.thema-social-card-author { color: #555; font-weight: 600; }
.thema-social-card-link { color: #a70909 !important; text-decoration: none; font-weight: 600; margin-left: auto; }
.thema-social-card-link:hover { text-decoration: underline; }

.thema-link-card {
    display: block; border: 1px solid #f0e8e8; border-radius: 12px; padding: 0.8rem 0.9rem;
    text-decoration: none !important; color: inherit; transition: background 0.15s ease, border-color 0.15s ease;
}
.thema-link-card:hover { background: #faf7f7; border-color: #f1d3d3; }
.thema-link-card-domain { color: #a70909; font-weight: 700; font-size: 0.85rem; }
.thema-link-card-domain i { margin-right: 5px; }
.thema-link-card-url { color: #666; font-size: 0.78rem; margin-top: 3px; word-break: break-all; }
.thema-link-card-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: center; font-size: 0.72rem; color: #999; margin-top: 0.5rem; }
.thema-link-card-kontext { color: #a70909; font-weight: 600; cursor: pointer; }
.thema-link-card-kontext:hover { text-decoration: underline; }

/* --- Umfragen: eine Karte pro Umfrage, Karte selbst kommt fertig gestylt
   aus __bbUmfrageEmbed() (system/bbcode.php) - hier nur der Meta-Header --- */
.thema-umfragen-liste { display: flex; flex-direction: column; gap: 0.9rem; }
.thema-umfrage-card { border: 1px solid #f0e8e8; border-radius: 12px; padding: 0.8rem; }
.thema-umfrage-card-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: center; font-size: 0.76rem; color: #999; margin-bottom: 0.6rem; }
.thema-umfrage-card-meta a { color: #a70909 !important; text-decoration: none; font-weight: 600; margin-left: auto; }
.thema-umfrage-card-meta a:hover { text-decoration: underline; }

/* --- In-Thema-Suche --- */
.thema-suche-eingabe { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.thema-suche-eingabe input {
    flex: 1; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1.5px solid #eadfdf;
    font-size: 0.9rem; font-family: inherit;
}
.thema-suche-eingabe input:focus { outline: none; border-color: #a70909; }
.thema-suche-eingabe button {
    width: 46px; border-radius: 10px; border: none; background: #a70909; color: #fff;
    font-size: 1rem; cursor: pointer; flex-shrink: 0;
}
.thema-suche-eingabe button:hover { background: #8a0707; }
.thema-suche-treffer-anzahl { font-size: 0.8rem; color: #999; margin-bottom: 0.8rem; }
.thema-suche-liste { display: flex; flex-direction: column; gap: 0.7rem; }
.thema-suche-treffer {
    display: block; border: 1px solid #f0e8e8; border-radius: 12px; padding: 0.8rem 0.9rem;
    text-decoration: none !important; color: inherit; transition: background 0.15s ease, border-color 0.15s ease;
}
.thema-suche-treffer:hover { background: #faf7f7; border-color: #f1d3d3; }
.thema-suche-treffer-meta { display: flex; gap: 0.9rem; font-size: 0.74rem; color: #999; margin-bottom: 0.4rem; }
.thema-suche-treffer-meta span:first-child { color: #555; font-weight: 600; }
.thema-suche-treffer-text { font-size: 0.85rem; color: #333; line-height: 1.5; }
.thema-suche-treffer-text mark { background: #ffe8b0; color: #1c1c1c; padding: 0 2px; border-radius: 3px; }

@media (max-width: 768px) {
    .thema-tab { padding: 12px 12px 11px; font-size: 0.8rem; }
    .thema-media-panel { max-height: 92vh; }
    .thema-media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
    .thema-social-liste { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .thema-media-item-close { top: -16px; right: -8px; width: 38px; height: 38px; font-size: 1rem; }
    .thema-tabs-suche-btn { width: 46px; }
}
