/* GetriebeForum – Dark Orange Forum Design */
:root {
    --bg: #0d0f12;
    --bg-elevated: #14171c;
    --bg-card: #1a1e24;
    --border: #2d333b;
    --text: #e8ecf0;
    --text-muted: #88909a;
    --accent: #e89520;
    --accent-hover: #f0a830;
    --accent-dim: #c47d1a;
    --accent-soft: rgba(232, 149, 32, 0.18);
    --accent-glow: rgba(232, 149, 32, 0.25);
    --success: #3fb950;
    --error: #f85149;
    --radius: 12px;
    --radius-sm: 8px;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 0 20px var(--accent-glow);
    --transition: 0.2s ease;
}

/* Dark theme (explicit so toggle always has effect) */
html[data-theme="dark"] {
    --bg: #0d0f12;
    --bg-elevated: #14171c;
    --bg-card: #1a1e24;
    --border: #2d333b;
    --text: #e8ecf0;
    --text-muted: #88909a;
    --accent: #e89520;
    --accent-hover: #f0a830;
    --accent-dim: #c47d1a;
    --accent-soft: rgba(232, 149, 32, 0.18);
    --accent-glow: rgba(232, 149, 32, 0.25);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 0 20px var(--accent-glow);
}

/* Light theme */
html[data-theme="light"] {
    --bg: #f0f2f5;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --border: #d8dde4;
    --text: #1c2128;
    --text-muted: #57606a;
    --accent: #c76a0a;
    --accent-hover: #a85808;
    --accent-dim: #9a5a0f;
    --accent-soft: rgba(199, 106, 10, 0.15);
    --accent-glow: rgba(199, 106, 10, 0.2);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-accent: 0 0 20px var(--accent-glow);
}

html[data-theme="light"] .site-header {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .theme-switch-light {
    display: inline;
}
html[data-theme="light"] .theme-switch-dark {
    display: none;
}
.theme-switch-light {
    display: none;
}
.theme-switch-dark {
    display: inline;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-wrap {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.25rem 2rem;
}

/* Header */
.site-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
}

/* RSS, Glocke, Theme, Hamburger – immer sichtbar (nicht nur im aufgeklappten Menü) */
.header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-shrink: 0;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--accent-hover);
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.theme-switch:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--accent-hover);
}

/* Header search */
.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 220px;
    min-width: 0;
    max-width: min(100%, 28rem);
}

.header-search input,
.hero-search--desktop-only .hero-search input,
.hero-search-unified input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.95rem;
    font-size: 0.95rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
}

.header-search input:focus,
.hero-search--desktop-only .hero-search input:focus,
.hero-search-unified input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.header-search .btn-search,
.hero-search--desktop-only .hero-search .btn-search,
.hero-search-unified .btn-search {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.header-search .btn-search:hover,
.hero-search--desktop-only .hero-search .btn-search:hover,
.hero-search-unified .btn-search:hover {
    background: var(--accent-hover);
}

/* Suche nur in der mobilen Kopfzeile; auf Desktop Startseite → Hero (siehe unten) */
@media (min-width: 901px) {
    .header-search--mobile-bar {
        display: none !important;
    }

    .site-header .header-inner {
        flex-wrap: nowrap;
        align-items: center;
    }

    .site-header .logo {
        flex-shrink: 0;
    }

    .site-header .nav-main {
        flex: 1 1 auto;
        min-width: 0;
        margin-left: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 1rem;
    }

    .site-header .header-tools {
        flex-shrink: 0;
    }
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
}

.nav-main a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.nav-main a:hover {
    color: var(--accent);
}

.nav-main .nav-user {
    color: var(--accent);
}

.nav-logout-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.nav-logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.nav-logout-btn:hover {
    color: var(--accent);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 1.25rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-legal {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
}

.footer-legal a {
    color: var(--accent);
    text-decoration: none;
}

.footer-legal a:hover {
    text-decoration: underline;
}

.footer-legal .footer-rss {
    font-weight: 600;
    color: var(--text-muted);
}

.footer-legal .footer-rss:hover {
    color: var(--accent);
}

/* Cookie consent (DSGVO) – Banner + FAB + Einstellungsseite */
.cookie-consent-privacy-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}

.cookie-consent-privacy-link:hover {
    color: var(--accent-hover);
}

.cookie-consent-card {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    left: auto;
    z-index: 2147483647;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.cookie-consent-card-inner {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 1.25rem 1.5rem;
}

.cookie-consent-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.cookie-consent-text {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.cookie-consent-text a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: var(--accent-hover);
}

.cookie-consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .cookie-consent-card {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}

/* Schwebender Button: Cookie-Einstellungen (nach Einwilligung) */
.cookie-consent-fab {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 2147483646;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: background 0.2s, color 0.2s, transform 0.1s;
}

.cookie-consent-fab:hover {
    background: var(--bg-card);
    color: var(--accent);
    border-color: var(--accent-dim);
}

.cookie-consent-fab:active {
    transform: scale(0.98);
}

.cookie-consent-fab--left {
    right: auto;
    left: 1.25rem;
}

.cookie-consent-fab-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.cookie-consent-fab-text {
    white-space: nowrap;
}

@media (max-width: 380px) {
    .cookie-consent-fab-text {
        display: none;
    }
    .cookie-consent-fab {
        padding: 0.65rem;
        border-radius: 50%;
    }
}

/* Seite cookie-einstellungen.php */
.cookie-settings-page .cookie-settings-box {
    max-width: 520px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cookie-settings-intro {
    margin: 0 0 1rem;
    color: var(--text);
    line-height: 1.55;
}

.cookie-settings-status {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

.cookie-settings-legal-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

.cookie-settings-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cookie-settings-actions .btn-block {
    width: 100%;
    justify-content: center;
}

.cookie-settings-revoke {
    border-color: var(--error) !important;
    color: var(--error) !important;
}

.cookie-settings-revoke:hover {
    background: rgba(248, 81, 73, 0.12) !important;
}

.cookie-settings-privacy-link-wrap {
    margin: 1.25rem 0 0;
    text-align: center;
}

.cookie-settings-privacy-link-wrap a {
    color: var(--accent);
    font-weight: 600;
}

.legal-disclaimer {
    margin: 1.5rem auto 0;
    max-width: 520px;
    color: var(--text-muted);
    line-height: 1.45;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

.legal-cookies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.legal-cookies-table th,
.legal-cookies-table td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.legal-cookies-table th {
    background: var(--bg-elevated);
    font-weight: 600;
}

.legal-note-small {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.legal-note-small code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* Legal pages (Impressum, Datenschutz) */
.legal-page .legal-content {
    max-width: 720px;
    margin: 0 auto;
}

.legal-page .legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.legal-block {
    margin-bottom: 1.75rem;
}

.legal-block h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.legal-block h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
    color: var(--text);
}

.legal-block p,
.legal-block ul {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.legal-block ul {
    padding-left: 1.25rem;
}

.legal-block a {
    color: var(--accent);
    text-decoration: none;
}

.legal-block a:hover {
    text-decoration: underline;
}

.legal-footer-links {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
}

.legal-footer-links a {
    color: var(--accent);
    text-decoration: none;
}

.legal-footer-links a:hover {
    text-decoration: underline;
}

/* Page head */
.page-head {
    margin-bottom: 1.5rem;
}

.page-head h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.25rem 0 0.5rem;
    letter-spacing: -0.02em;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-head-hero {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

/* Startseite: Hero – eine Zeile: Feld + Combobox (Modus) + Button (nur Desktop) */
.hero-search-strip.hero-search--desktop-only {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
}

.hero-search-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.hero-search-unified {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

.hero-search-unified input[type="search"] {
    flex: 1 1 180px;
    min-width: 0;
}

.hero-search-mode {
    flex: 0 0 auto;
    min-width: 11.5rem;
    max-width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-sans);
}

.hero-search-mode:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

@media (min-width: 901px) {
    .hero-search-strip.hero-search--desktop-only {
        display: flex;
        max-width: 640px;
    }
}

/* Suchseite: gleiche Combobox + optionale Kategorie */
.search-form-unified {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
}

.search-form-unified input[type="search"] {
    flex: 1 1 200px;
    min-width: 0;
}

.search-form-unified .hero-search-mode {
    min-width: 10rem;
}

.search-cat-wrap {
    display: flex;
    align-items: stretch;
}

.search-cat-wrap[hidden] {
    display: none !important;
}

.search-mode-switch {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

.search-mode-switch a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.search-mode-switch a:hover {
    text-decoration: underline;
}

.user-search-results {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.user-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.user-search-row:last-child {
    border-bottom: none;
}

.user-search-name {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.user-search-name:hover {
    text-decoration: underline;
}

.user-search-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: auto;
}

.welcome {
    color: var(--text-muted);
    margin: 0.35rem 0 0;
}

.guest-notice {
    margin: 0.5rem 0 0;
    padding: 0.6rem 0.9rem;
    background: var(--accent-soft);
    border: 1px solid rgba(232, 149, 32, 0.35);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
}

.guest-notice a {
    color: var(--accent);
    font-weight: 600;
}

.guest-notice.small {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
    display: inline-block;
}

.guest-readonly {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.guest-readonly a {
    color: var(--accent);
    font-weight: 500;
}

.category-desc {
    color: var(--text-muted);
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: #0f1216;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text);
}

.btn-block {
    width: 100%;
}

/* Last posts (index – zwischen Hero und Kategorien) */
.last-posts-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.last-posts-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-muted);
}

.last-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.last-posts-item {
    border-bottom: 1px solid var(--border);
}

.last-posts-item:last-child {
    border-bottom: none;
}

.last-posts-link {
    display: block;
    padding: 0.6rem 0;
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition);
}

.last-posts-link:hover {
    background: var(--bg-elevated);
    margin: 0 -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.last-posts-topic {
    display: block;
    font-weight: 500;
    color: var(--accent);
}

.last-posts-link:hover .last-posts-topic {
    color: var(--accent-hover);
}

.last-posts-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Category list (index) */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Getriebe: Elternkategorie mit Hersteller-Kacheln */
.category-group {
    padding: 1.25rem 1.35rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.category-group-head {
    margin-bottom: 1rem;
}

.category-group-title {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
}

.category-group-title a {
    color: var(--text);
    text-decoration: none;
}

.category-group-title a:hover {
    color: var(--accent);
}

.category-group-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.category-group-meta {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.category-group-meta-hint {
    font-size: 0.8rem;
    opacity: 0.9;
}

.category-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.category-card--child {
    grid-template-columns: 1fr;
    padding: 1rem 1.1rem;
}

.category-card--child .category-stats {
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.category-card-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.category-card-title a {
    color: var(--text);
    text-decoration: none;
}

.category-card-title a:hover {
    color: var(--accent);
}

/* Elternkategorie (nur Unterbereiche): Hersteller-Liste */
.category-subcats {
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.category-subcats-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.category-subcats-hint {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.category-subcats-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-subcats-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
}

.category-subcats-link {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.category-subcats-link:hover {
    text-decoration: underline;
}

.category-subcats-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.category-parent-hint {
    margin-top: 0.5rem;
}

.category-drilldown-hint {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-muted);
    max-width: 42rem;
}

.category-drilldown-hint strong {
    color: var(--text);
}

.category-drilldown-meta {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    opacity: 0.95;
}

.category-flow-hint {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-muted);
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
}

.category-flow-hint--mfr strong {
    color: var(--text);
}

.category-flow-hint--model {
    border-left-color: var(--success);
}

.category-new-model {
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.category-new-model-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.category-new-model-hint {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.category-new-model-form label {
    display: block;
    margin-top: 0.65rem;
    font-size: 0.9rem;
}

.category-new-model-form input[type="text"],
.category-new-model-form textarea {
    width: 100%;
    max-width: 28rem;
    margin-top: 0.25rem;
}

.category-new-model-form .btn {
    margin-top: 0.75rem;
}

.category-actions-row {
    margin: 0.75rem 0 0;
}

.topic-transmission-hint {
    margin: 0.5rem 0 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-muted);
    max-width: 48rem;
}

.topic-transmission-hint strong {
    color: var(--text);
}

.new-topic-flow-hint {
    margin-top: 0.5rem;
}

.category-card--drilldown {
    border-left: 3px solid var(--accent);
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: start;
    transition: border-color var(--transition);
}

.category-card:hover {
    border-color: rgba(232, 149, 32, 0.5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.category-info h2 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.category-info h2 a {
    color: var(--text);
    text-decoration: none;
}

.category-info h2 a:hover {
    color: var(--accent);
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: right;
}

.category-last {
    font-size: 0.8rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.category-last a {
    color: var(--accent);
    text-decoration: none;
}

.category-last a:hover {
    text-decoration: underline;
}

/* Topic list */
.topic-list-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 220px) 80px 140px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 220px) 80px 140px;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    align-items: center;
    transition: background var(--transition);
}

.topic-row:hover {
    background: var(--bg-elevated);
}

.topic-row.pinned {
    background: var(--accent-soft);
}

.topic-row .col-topic {
    min-width: 0;
}

.topic-row .col-topic a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.topic-row .col-topic a:hover {
    color: var(--accent);
}

.col-author {
    min-width: 0;
}

.col-author a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-author a:hover {
    color: var(--accent);
}

.col-posts, .col-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
}

.badge-pin {
    background: var(--accent-soft);
    color: var(--accent);
}

.badge-lock {
    background: rgba(248, 81, 73, 0.2);
    color: var(--error);
}

.badge-op {
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
}

.badge-role {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin-left: 0.35rem;
}

.badge-mod {
    background: rgba(88, 166, 255, 0.2);
    color: #58a6ff;
}

.badge-admin {
    background: rgba(232, 149, 32, 0.35);
    color: var(--accent);
}

.post-actions {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
}

.link-edit {
    color: var(--text-muted);
    text-decoration: none;
}

.link-edit:hover {
    color: var(--accent);
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.empty-state a {
    color: var(--accent);
}

/* Topic view – posts */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.post-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    align-items: start;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card.first-post {
    background: var(--bg-elevated);
}

/* Reddit-ähnlich: Vote-Spalte + Autor + Inhalt */
.post-card--with-votes {
    grid-template-columns: 2.75rem 180px 1fr;
}

.post-vote-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding-top: 0.15rem;
}

.post-vote-form {
    margin: 0;
    padding: 0;
    display: block;
}

.post-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.35rem;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.post-vote-btn:hover:not(:disabled) {
    color: var(--accent);
    background: var(--accent-soft);
}

.post-vote-btn--active.post-vote-btn--up {
    color: var(--accent);
}

.post-vote-btn--active.post-vote-btn--down {
    color: #6b9fd4;
}

.post-vote-btn--disabled {
    cursor: default;
    opacity: 0.35;
}

.post-vote-score {
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    min-height: 1.25rem;
    line-height: 1.25rem;
}

.post-views {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.author-name:hover {
    text-decoration: underline;
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-body {
    min-width: 0;
}

.post-content {
    white-space: pre-wrap;
    word-break: break-word;
}

.post-edited {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-attachments {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.post-attachment-link {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.post-attachment-img {
    display: block;
    max-width: 280px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.reply-box {
    margin-top: 1.5rem;
}

.topic-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

.topic-section-title:first-of-type {
    margin-top: 0;
}

.topic-reply-count {
    font-weight: 400;
    color: var(--text-muted);
}

.topic-first-post {
    margin-bottom: 0.5rem;
}

.topic-replies .post-list {
    border-top: none;
}

.topic-pagination-top,
.topic-pagination-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.topic-pagination-bottom {
    border-bottom: none;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pagination-links {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.empty-replies {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0.75rem 0;
}

.users-online-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0 2rem;
}

.users-online-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-muted);
}

.users-online-list {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.8;
    word-break: break-word;
}

.users-online-item {
    white-space: nowrap;
}

.users-online-more {
    color: var(--text-muted);
    font-size: 0.9em;
}

.login-prompt {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.login-prompt a {
    color: var(--accent);
}

/* Suchseite: Eingabefeld eigene Zeile = volle Breite (vorher eine enge Flex-Zeile mit 4+ Elementen) */
.search-page .search-main-bar {
    width: 100%;
    margin-top: 0.75rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-sizing: border-box;
}

.search-page .search-form-stacked {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: none;
}

.search-page .search-main-field {
    width: 100%;
}

.search-page .search-main-input,
.search-page #search-page-q.search-main-input {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    line-height: 1.4;
    min-height: 3.35rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
}

.search-page .search-main-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-page .search-main-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
}

.search-page .search-main-controls .hero-search-mode {
    flex: 1 1 12rem;
    min-width: min(100%, 10rem);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 3rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
}

.search-page .search-main-controls .search-cat-wrap {
    flex: 1 1 14rem;
    min-width: min(100%, 12rem);
}

.search-page .search-main-controls .search-cat-wrap select {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    box-sizing: border-box;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
}

.search-page .search-main-submit {
    flex: 1 1 auto;
    min-width: 7rem;
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    min-height: 3rem;
    align-self: stretch;
}

@media (min-width: 600px) {
    .search-page .search-main-submit {
        flex: 0 0 auto;
    }
}

.search-hint, .search-meta {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.search-results .topic-list-header {
    grid-template-columns: 1fr 140px 80px 130px;
}

.search-results .topic-row {
    grid-template-columns: 1fr 140px 80px 130px;
}

.search-results .col-category a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.search-results .col-category a:hover {
    color: var(--accent);
}

/* Auth pages */
.auth-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.auth-sub {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.auth-form label {
    display: block;
    margin: 1rem 0 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-form input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-form .btn {
    margin-top: 1.5rem;
}

.auth-footer {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: var(--error);
}

.alert-success {
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: var(--success);
}

/* Forms (new topic, reply) */
.post-form label {
    display: block;
    margin: 1rem 0 0.4rem;
    font-weight: 500;
}

.post-form input,
.post-form textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    resize: vertical;
}

.post-form textarea {
    min-height: 160px;
}

.post-form input:focus,
.post-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* Profile */
.profile-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.profile-avatar .avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 0.4rem;
}

.author-avatar {
    display: block;
    margin-bottom: 0.35rem;
}

.author-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.profile-notify-email {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.profile-notify-email h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.profile-notify-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    line-height: 1.45;
}

.profile-notify-label input {
    margin-top: 0.2rem;
}

.profile-notify-form .btn {
    margin-top: 0.75rem;
}

.profile-upload {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.profile-upload h2 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.avatar-form input[type="file"] {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0.5rem;
}

.profile-info p {
    margin: 0.4rem 0;
}

.profile-activity h2 {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-list a {
    color: var(--accent);
    text-decoration: none;
}

.activity-list a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 700px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .header-search {
        max-width: none;
    }

    .topic-list-header,
    .topic-row {
        grid-template-columns: 1fr 1fr;
    }

    .topic-list-header .col-date,
    .topic-row .col-posts {
        display: none;
    }

    .search-results .topic-list-header,
    .search-results .topic-row {
        grid-template-columns: 1fr 1fr;
    }

    .search-results .col-category,
    .search-results .col-posts {
        display: none;
    }

    .category-card {
        grid-template-columns: 1fr;
    }

    .category-stats {
        text-align: left;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-card--with-votes {
        grid-template-columns: 2.5rem 1fr;
        grid-template-areas:
            "vote author"
            "vote body";
    }

    .post-card--with-votes .post-vote-col {
        grid-area: vote;
        align-self: start;
        padding-top: 0;
    }

    .post-card--with-votes .post-author {
        grid-area: author;
    }

    .post-card--with-votes .post-body {
        grid-area: body;
    }

    .post-author {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 500px) {
    .nav-main {
        gap: 1rem;
    }
}

/* —— Erweiterungen: Mobile-Menü, Benachrichtigungen, Startseite, Zitat, Melden —— */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
}

.nav-notifications {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.25rem;
    padding: 0 0.35rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}

.nav-notifications:hover {
    background: var(--bg-card);
}

.nav-notifications-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.nav-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 1rem;
    height: 1rem;
    padding: 0 3px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    background: var(--error);
    color: #fff;
    border-radius: 999px;
    box-sizing: border-box;
}

.search-form-advanced {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-form-advanced select {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
}

/* Startseite: Bilderleiste, schräge Paneele (/////) */
.home-strip {
    display: flex;
    width: 100%;
    height: clamp(76px, 13vw, 148px);
    margin: 0 0 1.25rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #ffffff;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.home-strip-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    margin: 10px;
    padding: 10px;
    box-sizing: border-box;
    transform: skewX(-14deg);
    border-right: 3px solid rgba(0, 0, 0, 0.12);
    min-width: 0;
    background: #fff !important;
}

[data-theme="light"] .home-strip-panel {
    border-right-color: rgba(0, 0, 0, 0.08);
}

.home-strip-panel:last-child {
    border-right: none;
}

/* Innerhalb des weißen Randes (padding) */
.home-strip-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: skewX(14deg);
    max-width: none;
}

.home-strip-fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        hsl(calc(24 + var(--strip-i, 0) * 16) 42% 20%) 0%,
        hsl(calc(32 + var(--strip-i, 0) * 12) 38% 26%) 45%,
        hsl(calc(18 + var(--strip-i, 0) * 10) 35% 16%) 100%
    );
}

.home-strip-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -32deg,
        transparent,
        transparent 5px,
        rgba(255, 255, 255, 0.07) 5px,
        rgba(255, 255, 255, 0.07) 6px
    );
    pointer-events: none;
}

@media (max-width: 640px) {
    .home-strip-panel {
        margin: 10px;
        padding: 10px;
        transform: skewX(-9deg);
        border-right-width: 2px;
    }

    .home-strip-panel img {
        transform: skewX(9deg);
    }
}

/* Beliebte Themen | Neueste Beiträge (Desktop: 2 Spalten, kompakter) */
.home-spotlight {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 900px) {
    .home-spotlight--two {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 1rem 1.25rem;
    }

    .home-spotlight--one {
        grid-template-columns: minmax(0, 36rem);
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
}

.home-spotlight .home-panel.home-extra-block,
.home-spotlight .home-panel.last-posts-block {
    margin-bottom: 0;
    padding: 0.75rem 0.9rem;
}

.home-spotlight .home-extra-title,
.home-spotlight .last-posts-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text);
    letter-spacing: 0.02em;
}

.home-spotlight .last-posts-title {
    color: var(--text-muted);
}

.home-topic-chips--compact li {
    padding: 0.3rem 0;
    font-size: 0.875rem;
}

.home-topic-chips--compact .home-chip-meta {
    font-size: 0.78rem;
}

.last-posts-list--compact .last-posts-link {
    padding: 0.38rem 0;
}

.last-posts-list--compact .last-posts-topic {
    font-size: 0.88rem;
}

.last-posts-list--compact .last-posts-meta {
    font-size: 0.72rem;
    margin-top: 0.12rem;
}

.home-extra-block {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.home-extra-title {
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
    color: var(--text);
}

.home-extra-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.home-topic-chips {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-topic-chips li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.home-topic-chips li:last-child {
    border-bottom: none;
}

.home-topic-chips a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.home-topic-chips a:hover {
    text-decoration: underline;
}

.home-chip-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.topic-watch-form {
    display: inline-block;
    margin-top: 0.5rem;
}

.post-actions .link-quote,
.post-actions .link-report {
    margin-left: 0.75rem;
    font-size: 0.85rem;
}

.link-quote {
    color: var(--accent);
}

.link-report {
    color: var(--text-muted);
}

.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

.notification-item--unread {
    background: var(--accent-soft);
}

.notification-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.notification-link:hover {
    color: var(--accent);
}

.notification-item-main {
    flex: 1;
    min-width: min(100%, 10rem);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
}

.notification-body {
    font-weight: 500;
}

.notifications-mark-all-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.notification-mark-read-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.notification-mark-read {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.notification-mark-read:hover {
    color: var(--accent);
}

.notification-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pm-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pm-list-item {
    border-bottom: 1px solid var(--border);
}

.pm-list-item--unread {
    background: var(--accent-soft);
}

.pm-list-link {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1rem;
    padding: 0.85rem 1rem;
    color: var(--text);
    text-decoration: none;
}

.pm-list-link:hover {
    color: var(--accent);
}

.pm-list-from {
    font-weight: 600;
    min-width: 8rem;
}

.pm-list-subj {
    flex: 1;
    min-width: 10rem;
}

.pm-list-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.pm-detail-body {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    word-break: break-word;
}

.pm-detail-reply {
    margin-top: 1rem;
}

.profile-pm-actions {
    margin: 1rem 0;
}

.report-form textarea {
    width: 100%;
    min-height: 120px;
    margin: 0.5rem 0 1rem;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
}

.back-to-top {
    position: fixed;
    bottom: 5rem;
    right: 1rem;
    z-index: 9990;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--accent);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--bg-card);
}

/* Cookie-FAB unten rechts: „Nach oben“ etwas höher, damit nichts überlappt */
body.has-cookie-fab .back-to-top {
    bottom: 6.85rem;
}

@media (max-width: 480px) {
    body.has-cookie-fab .back-to-top {
        bottom: 7.35rem;
    }
}

@media (max-width: 900px) {
    .site-header .header-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "logo tools"
            "search search"
            "nav nav";
        align-items: center;
        gap: 0.65rem 0.75rem;
    }

    .site-header .logo {
        grid-area: logo;
        justify-self: start;
    }

    .site-header .header-tools {
        grid-area: tools;
        justify-self: end;
        margin-left: 0;
        gap: 0.5rem;
    }

    .site-header .header-search {
        grid-area: search;
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .site-header .nav-main {
        grid-area: nav;
        justify-self: stretch;
        margin-left: 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-main {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem 1.25rem 1rem;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        z-index: 200;
        justify-content: flex-start;
    }

    .nav-main.nav-main--open {
        display: flex;
    }

    .nav-main a {
        padding: 0.65rem 0;
        border-bottom: 1px solid var(--border);
    }
}

@media (min-width: 901px) {
    .nav-toggle {
        display: none;
    }
}

/* Kategorie: Sortierung & „Zum letzten Beitrag“ */
.category-sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0.75rem 0 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.category-sort-label {
    font-weight: 600;
    color: var(--text);
}

.category-sort-link {
    color: var(--accent);
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
}

.category-sort-link:hover {
    background: var(--accent-soft);
}

.category-sort-link.is-active {
    color: var(--text);
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.topic-last-post-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.topic-last-post-link:hover {
    text-decoration: underline;
}

/* Zitat-Vorschau über Antwortformular */
.quote-preview {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--accent);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.quote-preview cite {
    display: block;
    font-style: normal;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

/* Footer: niemand online */
.users-online-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Melden: Kategorie-Select */
.report-form select#reason_preset {
    width: 100%;
    max-width: 28rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    margin-bottom: 0.75rem;
}

/* Profil: Bio & Lieblings-Getriebe */
.profile-bio-section {
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.profile-bio-text {
    margin: 0 0 0.75rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.profile-bio-text:last-child {
    margin-bottom: 0;
}

.profile-gear {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.profile-gear strong {
    color: var(--text);
}

.profile-bio-edit {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.profile-bio-edit h2 {
    margin-top: 0;
}

.profile-bio-form label {
    display: block;
    margin-top: 0.75rem;
}

.profile-bio-form textarea,
.profile-bio-form input[type="text"] {
    width: 100%;
    max-width: 36rem;
    margin-top: 0.35rem;
}

.profile-bio-form .btn {
    margin-top: 1rem;
}

.profile-bio-badge-new {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}

.profile-bio-empty-hint {
    margin: 0 0 1rem;
    max-width: 36rem;
}

.profile-bio-preview-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.profile-bio-section--preview {
    margin-top: 1rem;
    border-style: dashed;
}
