/* ==========================================================================
   GemeinsamKI – forum.css (nur auf Seiten unter /forum geladen)
   ========================================================================== */

/* ---- Kopf ------------------------------------------------------------------ */
.forum-hero { padding-top: calc(var(--header-h) + clamp(36px, 6vw, 72px)) !important; padding-bottom: calc(clamp(40px, 6vw, 72px) + var(--stack-overlap)) !important; isolation: isolate; }
.forum-hero-inner { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.forum-hero-copy { max-width: 760px; }
.forum-title { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.02; letter-spacing: -.045em; margin-bottom: 14px; word-break: break-word; }
.forum-title em { color: var(--brand-400); }
.forum-hero .lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); }
.forum-userbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.forum-me { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: var(--on-dark); transition: border-color .3s; }
.forum-me:hover { border-color: rgba(255, 255, 255, .3); }
.forum-me strong { display: block; font-size: .92rem; line-height: 1.2; }
.forum-me small { display: block; font-size: .74rem; color: var(--on-dark-3); }
.forum-me .identicon { width: 34px; height: 34px; padding: 4px; border-radius: 999px; }
.forum-search-mini { display: flex; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.forum-search-mini input { width: 200px; padding: 9px 4px 9px 16px; border: 0; background: transparent; color: #fff; outline: none; }
.forum-search-mini input::placeholder { color: var(--on-dark-3); }
.forum-search-mini button { display: grid; place-items: center; width: 38px; height: 38px; color: var(--brand-300); }
.forum-admin-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 181, 71, .14); color: var(--amber); font-weight: 650; font-size: .88rem; }
.forum-admin-note { margin-bottom: 20px; background: #FFF8EB; color: #7A4B00; }
.forum-admin-note a { color: inherit; text-decoration: underline; }

/* ---- Grundlayout ----------------------------------------------------------- */
.forum-main { padding-top: calc(clamp(36px, 5vw, 64px) + var(--stack-overlap) * .5) !important; }
.forum-container { max-width: calc(1080px + var(--gutter) * 2); }
.forum-main > .container > .form-notice { margin-bottom: 22px; }
.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 3vw, 40px); align-items: start; }
.forum-content { display: grid; gap: 22px; min-width: 0; }
.forum-aside { display: grid; gap: 16px; }
.forum-card { padding: clamp(20px, 2.6vw, 30px); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.forum-card-soft { background: var(--soft); border-color: transparent; }
.forum-section-title { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -.02em; }
.forum-aside-title { font-size: 1.05rem; letter-spacing: -.01em; margin-bottom: 14px; }
.forum-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.forum-empty { display: flex; align-items: center; gap: 10px; padding: 26px; border-radius: var(--radius); background: var(--soft); color: var(--text-2); }
.forum-empty .icon { color: var(--brand); }
.link-back .icon { rotate: 180deg; }

/* ---- Kategorien ------------------------------------------------------------ */
.forum-cats { display: grid; gap: 10px; }
.forum-cat { display: grid; grid-template-columns: auto minmax(0, 1fr) 90px minmax(0, 220px); gap: 16px; align-items: center; padding: 16px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.forum-cat:hover { border-color: var(--brand-100); box-shadow: var(--shadow-soft); }
.forum-cat.is-hidden { opacity: .6; }
.forum-cat-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-50); color: var(--brand); }
.forum-cat-icon .icon { width: 21px; height: 21px; }
.forum-cat-text strong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.05rem; color: var(--text); }
.forum-cat-text small { display: block; margin-top: 2px; color: var(--text-3); font-size: .9rem; }
a.forum-cat-text:hover strong { color: var(--brand); }
.forum-cat-stats { text-align: center; }
.forum-cat-stats strong { display: block; font-size: 1.2rem; }
.forum-cat-stats small, .forum-cat-last small { display: block; font-size: .78rem; color: var(--text-3); }
.forum-cat-last { min-width: 0; font-size: .9rem; }
.forum-cat-last a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.forum-cat-last a:hover { color: var(--brand); }
.forum-cats-teaser .forum-cat { grid-template-columns: auto minmax(0, 1fr) 90px; }

/* ---- Themenlisten ---------------------------------------------------------- */
.forum-threads { display: grid; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: #fff; }
.forum-thread { display: grid; grid-template-columns: auto minmax(0, 1fr) 80px 130px; gap: 14px; align-items: center; padding: 14px 18px; }
.forum-thread + .forum-thread { border-top: 1px solid var(--line); }
.forum-thread.is-pinned { background: var(--brand-50); }
.forum-thread.is-hidden { opacity: .55; }
.forum-thread-title { display: block; font-weight: 650; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }
.forum-thread-title:hover { color: var(--brand); }
.forum-thread-main small, .forum-thread-last small { display: block; font-size: .8rem; color: var(--text-3); }
.forum-thread-count { text-align: center; }
.forum-thread-count strong { display: block; }
.forum-thread-count small { font-size: .75rem; color: var(--text-3); }
.forum-thread-last { text-align: right; }
.forum-flag { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--brand-100); color: var(--brand-text); vertical-align: 2px; }
.forum-flag .icon { width: 12px; height: 12px; }
.forum-flag-warn { background: #FFF1E0; color: #8A4B00; }
.forum-badge { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; background: var(--soft); color: var(--text-2); vertical-align: 2px; }
.forum-badge-team { background: var(--brand); color: #fff; }
.forum-badge-moderator { background: var(--ink); color: #fff; }
.forum-badge-internal { align-items: center; gap: 4px; background: var(--ink); color: #fff; }
.forum-badge-internal .icon, .forum-cat-last small .icon { display: inline-block; width: 11px; height: 11px; vertical-align: -1px; }
.forum-flag-internal { background: var(--soft); color: var(--text-2); }
.forum-public-note { margin-bottom: 4px; background: var(--brand-50); color: var(--brand-text); }
.forum-internal-note { margin-bottom: 4px; background: var(--soft); color: var(--text-2); }
.forum-cat.is-locked .forum-cat-icon { background: var(--soft); color: var(--text-3); }
.forum-join { display: grid; gap: 12px; background: var(--brand-50); border-color: transparent; }
.forum-join .forum-aside-title { margin-bottom: 0; }
.forum-join p { color: var(--text-2); font-size: .94rem; }
.forum-join .btn { justify-content: center; }
.forum-guest-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; background: var(--soft); border-color: transparent; }
.forum-guest-cta > div:first-child { flex: 1 1 320px; }
.forum-guest-cta p { color: var(--text-2); }
.forum-guest-cta .btn-row { margin-top: 0; }
.forum-avatar.identicon { background: #0E1512; }
.forum-thread .identicon { width: 38px; height: 38px; padding: 5px; gap: 1.5px; border-radius: 11px; }

.forum-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0; }
.forum-pagination a, .forum-pagination-gap { min-width: 40px; padding: 8px 12px; border-radius: 12px; text-align: center; font-weight: 650; color: var(--text-2); background: var(--soft); }
.forum-pagination a:hover { color: var(--brand); }
.forum-pagination a.is-current { background: var(--ink); color: #fff; }
.forum-pagination-gap { background: transparent; }

/* ---- Thema & Beiträge ------------------------------------------------------ */
.forum-thread-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.forum-thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.forum-thread-meta > small { color: var(--text-3); }
.forum-cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-text); font-weight: 650; font-size: .88rem; }
.forum-cat-chip .icon { width: 15px; height: 15px; }
.forum-modbar { position: relative; }
.forum-modbar summary { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 650; font-size: .88rem; cursor: pointer; list-style: none; }
.forum-modbar summary::-webkit-details-marker { display: none; }
.forum-modbar-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 14px; border-radius: 18px; background: var(--soft); }
.forum-modbar-form select, .forum-inline-field select { padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }

.forum-posts { display: grid; gap: 14px; margin: 16px 0; }
.forum-post { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); overflow: hidden; scroll-margin-top: calc(var(--header-h) + 20px); }
.forum-post:target { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(104, 94, 255, .14); }
.forum-post.is-first { border-color: var(--brand-100); }
.forum-post.is-hidden { background: repeating-linear-gradient(-45deg, #fff, #fff 12px, #FAFAFC 12px, #FAFAFC 24px); }
.forum-post-author { display: grid; justify-items: start; align-content: start; gap: 10px; padding: 20px; background: var(--soft); font-size: .9rem; }
.forum-post-author a strong, .forum-post-author > div > strong { display: block; color: var(--text); overflow-wrap: anywhere; }
.forum-post-author a:hover strong { color: var(--brand); }
.forum-post-author small { display: block; margin-top: 4px; font-size: .76rem; color: var(--text-3); }
.forum-post-body { display: grid; align-content: start; gap: 12px; padding: 20px 24px; min-width: 0; }
.forum-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .82rem; color: var(--text-3); }
.forum-post-time { color: var(--text-3); }
.forum-post-time:hover { color: var(--brand); }
.forum-post-removed { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-style: italic; }
.forum-post-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.forum-post-actions form { display: contents; }
.forum-action { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; font-size: .84rem; font-weight: 600; color: var(--text-2); transition: background-color .3s, color .3s; }
.forum-action:hover { background: var(--soft); color: var(--brand); }
.forum-action .icon { width: 15px; height: 15px; }
.forum-action-warn:hover { color: #B8262B; }

.forum-prose { color: var(--text); line-height: 1.7; overflow-wrap: anywhere; }
.forum-prose > * + * { margin-top: .85em; }
.forum-prose a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.forum-prose code { padding: .1em .4em; border-radius: 6px; background: var(--soft); font-size: .9em; }
.forum-prose blockquote { padding: 10px 16px; border-left: 3px solid var(--brand-200); border-radius: 0 12px 12px 0; background: var(--brand-50); color: var(--text-2); }
.forum-prose ul { padding-left: 1.3em; list-style: disc; }
.forum-prose li + li { margin-top: .3em; }
.forum-code { position: relative; padding: 16px 18px; border-radius: 14px; background: var(--ink); color: #E8E8F0; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.forum-code code { padding: 0; background: none; white-space: pre; }
.forum-code code[data-lang]::before { content: attr(data-lang); position: absolute; top: 6px; right: 10px; font-size: .7rem; color: var(--on-dark-3); text-transform: uppercase; letter-spacing: .08em; }

.forum-prose em { font-style: italic; }
.forum-prose ol { padding-left: 1.5em; list-style: decimal; }
.forum-prose ol li::marker { color: var(--text-3); font-weight: 650; }

/* ---- Bilder: Galerie im Beitrag, Lightbox -------------------------------- */
.forum-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.forum-gallery[data-images="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.forum-gallery[data-images="1"] { grid-template-columns: minmax(0, 1fr); }
.forum-prose .forum-image, .forum-image { position: relative; display: block; overflow: hidden; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); text-decoration: none; cursor: zoom-in; }
.forum-image img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: scale .6s var(--ease-out); }
.forum-image:hover img { scale: 1.035; }
.forum-gallery[data-images="1"] .forum-image { justify-self: start; max-width: 100%; }
.forum-gallery[data-images="1"] .forum-image img { width: auto; max-width: 100%; height: auto; max-height: 480px; aspect-ratio: auto; object-fit: contain; }

.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 10, 12, .96); color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(10, 10, 12, .7); }
.lightbox[open] { animation: lightboxIn .25s var(--ease-out); }
@keyframes lightboxIn { from { opacity: 0; } }
.lightbox-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.lightbox-track::-webkit-scrollbar { display: none; }
.lightbox-slide { flex: 0 0 100%; display: grid; place-items: center; height: 100%; margin: 0; padding: 64px clamp(12px, 6vw, 88px); scroll-snap-align: center; scroll-snap-stop: always; }
.lightbox-slide img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.lightbox button { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background-color .2s, opacity .2s; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lightbox button:disabled { opacity: 0; pointer-events: none; }
.lightbox button .icon { width: 22px; height: 22px; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-nav { top: 50%; translate: 0 -50%; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-count { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: .85rem; font-variant-numeric: tabular-nums; }
.lightbox.is-single .lightbox-nav, .lightbox.is-single .lightbox-count { display: none; }
@media (hover: none) {
    .lightbox-nav { display: none; } /* auf Touch-Geräten wird gewischt */
}
@media (max-width: 480px) {
    .forum-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.forum-reply { display: grid; gap: 16px; margin-top: 10px; }

/* ---- Editor (WYSIWYG): Werkzeugleiste, Schreibfläche, Link, Hilfe ---------- */
.forum-main { overflow: clip; } /* statt hidden, damit die Werkzeugleiste beim Scrollen mitlaufen kann */
.compose { position: relative; min-width: 0; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; transition: border-color .3s, box-shadow .3s; }
.compose:hover { border-color: var(--brand-200); }
.compose:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(104, 94, 255, .14); }
.compose-bar {
    position: sticky; top: calc(var(--header-h) + 8px); z-index: 4; display: flex; align-items: center; padding: 6px;
    border-bottom: 1px solid var(--line); border-radius: 17px 17px 0 0; background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.compose-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.compose-group { display: flex; gap: 2px; }
.compose-group + .compose-group { margin-left: 4px; padding-left: 6px; border-left: 1px solid var(--line); }
.compose-tool { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--text-2); transition: background-color .2s, color .2s, opacity .2s, scale .3s var(--ease-spring); }
.compose-tool .icon { width: 18px; height: 18px; }
.compose-tool:hover { background: var(--brand-50); color: var(--brand); }
.compose-tool:active { scale: .9; }
.compose-tool[aria-pressed="true"] { background: var(--brand-100); color: var(--brand-text); }
.compose-tool:disabled { opacity: .3; pointer-events: none; }
@media (hover: hover) {
    .compose-tool::after {
        content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; z-index: 6; padding: 5px 9px; border-radius: 8px;
        background: var(--ink); color: #fff; font-size: .74rem; font-weight: 600; white-space: nowrap; pointer-events: none;
        opacity: 0; translate: -50% -3px; transition: opacity .15s, translate .15s;
    }
    .compose-tool:hover::after, .compose-tool:focus-visible::after { opacity: 1; translate: -50% 0; transition-delay: .3s; }
}

/* Schreibfläche: sieht aus wie der fertige Beitrag (Grundregeln aus prosemirror-view/style/prosemirror.css) */
.compose-surface { min-height: 150px; padding: 16px 18px; outline: none; cursor: text; }
.compose-surface:focus-visible { outline: none; }
.compose .ProseMirror { position: relative; word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; font-variant-ligatures: none; font-feature-settings: "liga" 0; }
.compose .ProseMirror pre, .compose .ProseMirror .forum-code code { white-space: pre-wrap; }
.compose .ProseMirror li { position: relative; }
.compose .ProseMirror a { cursor: text; }
.compose .ProseMirror .forum-code { caret-color: #fff; }
.compose .ProseMirror-hideselection *::selection { background: transparent; }
.compose .ProseMirror-hideselection { caret-color: transparent; }
.compose .ProseMirror-selectednode { outline: 2px solid var(--brand-200); }
.compose img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; }
.compose-surface p.is-empty:first-child::before { content: attr(data-placeholder); float: left; height: 0; color: var(--text-3); pointer-events: none; }

/* Bilder im Editor und laufende Uploads */
.compose.is-dragover { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(104, 94, 255, .2); background: var(--brand-50); }
.compose .ProseMirror > .compose-image { margin-top: 8px; }
.compose-image { position: relative; display: inline-block; vertical-align: top; max-width: 100%; margin: 8px 8px 0 0; }
.compose-image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 220px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); }
.compose-image.is-selected img { outline: 3px solid var(--brand); outline-offset: 2px; }
.compose-image-remove { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(17, 17, 17, .75); color: #fff; font-size: 1.15rem; line-height: 1; opacity: 0; transition: opacity .2s, background-color .2s; }
.compose-image-remove:hover { background: #B8262B; }
.compose-image:hover .compose-image-remove, .compose-image.is-selected .compose-image-remove, .compose-image-remove:focus-visible { opacity: 1; }
.compose-uploading {
    display: inline-flex; align-items: center; gap: 8px; margin: 8px 8px 0 0; padding: 10px 14px; border-radius: 12px; color: var(--text-3); font-size: .85rem;
    background: linear-gradient(90deg, var(--soft) 30%, var(--brand-50) 50%, var(--soft) 70%) 0 0 / 300% 100%; animation: composeShimmer 1.3s linear infinite;
}
.compose-uploading::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand-200); border-top-color: var(--brand); animation: composeSpin .8s linear infinite; }
@keyframes composeShimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes composeSpin { to { rotate: 360deg; } }
@media (hover: none) {
    .compose-image-remove { opacity: 1; }
}

/* Textfeld: ohne JavaScript sichtbar, solange der Editor lädt unsichtbar (Platz bleibt) */
.form .compose textarea { display: block; min-height: 150px; padding: 16px 18px; border: 0; border-radius: 18px; background: transparent; box-shadow: none; font-family: var(--font); line-height: 1.65; }
.form .compose textarea:hover, .form .compose textarea:focus { border: 0; box-shadow: none; }
.forum-editor.is-loading .compose > textarea { visibility: hidden; }

/* Link einfügen */
.compose-link {
    position: absolute; z-index: 12; display: flex; align-items: center; gap: 6px; width: min(400px, calc(100% - 16px)); padding: 6px;
    border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(17, 17, 17, .05), var(--shadow-soft);
    animation: composePop .18s var(--ease-out);
}
.compose-link input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font-size: .92rem; outline: none; transition: border-color .2s; }
.compose-link input:focus { border-color: var(--brand); }
.compose-link.is-invalid input { border-color: #E5484D; background: #FFF8F8; }
.compose-link button { padding: 8px 12px; border-radius: 10px; font-size: .86rem; font-weight: 650; white-space: nowrap; transition: background-color .2s, color .2s; }
.compose-link-apply { background: var(--ink); color: #fff; }
.compose-link-apply:hover { background: var(--brand); }
.compose-link-remove { color: #B8262B; }
.compose-link-remove:hover { background: #FFF1F1; }
.compose-error { padding: 0 14px 12px; }

/* Fußzeile mit Hilfe, Zeichenzahl, Kürzel */
.compose-foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 12px 6px 6px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--text-3); }
.compose-help { margin-right: auto; }
.compose-help summary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font-weight: 650; cursor: pointer; list-style: none; transition: background-color .2s, color .2s; }
.compose-help summary::-webkit-details-marker { display: none; }
.compose-help summary:hover, .compose-help[open] summary { background: var(--soft); color: var(--brand-text); }
.compose-help summary .icon { width: 15px; height: 15px; }
.compose-help-panel {
    position: absolute; left: 6px; bottom: calc(100% + 8px); z-index: 10; width: min(420px, calc(100% - 12px)); padding: 16px;
    border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(17, 17, 17, .05), var(--shadow-soft);
    color: var(--text-2); font-size: .86rem; animation: composePop .22s var(--ease-out);
}
@keyframes composePop { from { opacity: 0; translate: 0 6px; } }
.compose-help-title { margin: 0 0 10px 8px; font-weight: 750; color: var(--text); }
.compose-help-list { display: grid; gap: 2px; }
.compose-help-list > div { display: grid; grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1.4fr); align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.compose-help-list > div:nth-child(even) { background: var(--soft); }
.compose-help-list dt { color: var(--text); font-weight: 600; }
.compose-help-list dd { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; font-size: .82rem; }
.compose-help-list .compose-help-head { padding-block: 0 2px; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.compose-help-list .compose-help-head dt { color: inherit; font-weight: inherit; }
.compose-help-list .compose-help-head dd { font-size: inherit; }
.compose-help-list code { padding: .1em .45em; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: .78rem; color: var(--text); white-space: nowrap; }
.compose-help-note { margin: 12px 8px 0; font-size: .8rem; color: var(--text-3); }
.forum-editor kbd { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: #fff; font: 650 .7rem/1 var(--font); color: var(--text-2); }
.compose-count { font-variant-numeric: tabular-nums; }
.compose-count.is-full { color: #B8262B; font-weight: 650; }
.compose-send { display: inline-flex; align-items: center; gap: 3px; }
.compose-send kbd:last-of-type { margin-right: 3px; }
@media (hover: none) {
    .compose-send { display: none !important; }
}
@media (pointer: coarse) {
    .compose-tool { width: 38px; height: 38px; }
}
@media (max-width: 560px) {
    /* Werkzeuge gleichmäßig auf eine Zeile verteilt (ohne Trennstriche); sehr schmal: wischbar */
    .compose-tools { flex: 1 1 100%; flex-wrap: nowrap; justify-content: space-between; gap: 0; overflow-x: auto; scrollbar-width: none; }
    .compose-tools::-webkit-scrollbar { display: none; }
    .compose-group { display: contents; }
    .compose-tool { flex: 1 1 0; width: auto; min-width: 30px; max-width: 44px; }
    .compose-help-list > div { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.5fr); gap: 8px; }
}
.forum-form { display: grid; gap: 18px; }
.forum-fieldset { display: grid; gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.forum-fieldset legend { margin-bottom: 4px; padding: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.forum-register .forum-fieldset + .forum-fieldset { padding-top: 20px; border-top: 1px solid var(--line); }
/* Beta-Hinweis (Opt-in) über dem Pflicht-Häkchen der Registrierung */
.forum-beta { padding: 16px 18px; border-radius: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--text-2); font-size: .95rem; line-height: 1.6; }
.forum-beta p { margin: 0; }
.forum-beta strong { color: var(--text); }
.forum-beta + .check { margin-top: -6px; }
.forum-counter.is-short { color: #B8262B; }
.forum-counter.is-ok { color: var(--mint-600); }
.forum-radio-list { display: grid; gap: 10px; }
.forum-report-quote { padding: 14px 18px; border-radius: 14px; background: var(--soft); color: var(--text-2); }

/* ---- Konto, Gast, Profil --------------------------------------------------- */
.forum-auth { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(20px, 3vw, 36px); align-items: start; max-width: 920px; }
.forum-auth .forum-card { display: grid; gap: 16px; }
.forum-auth-aside { padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-lg); background: var(--ink); color: var(--on-dark-2); }
.forum-auth-aside h2 { font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.forum-auth-aside p { margin-bottom: 18px; }
.forum-gate { display: grid; justify-items: start; gap: 14px; max-width: 680px; }
.forum-gate h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.forum-gate p { color: var(--text-2); }
.forum-gate-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.forum-gate-icon .icon { width: 26px; height: 26px; }
.forum-message p { color: var(--text-2); font-size: 1.05rem; }
.forum-message .btn-row { margin-top: 20px; }

.forum-landing { display: grid; gap: 26px; }
.forum-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.forum-step { padding: 26px 24px; border-radius: var(--radius-lg); background: var(--soft); }
.forum-step h2 { margin: 14px 0 6px; font-size: 1.15rem; letter-spacing: -.02em; }
.forum-step p { color: var(--text-2); }
.forum-step-num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 800; }
.forum-landing-cta { margin-top: 0; }

.forum-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.forum-stats div { text-align: center; padding: 10px 4px; border-radius: 14px; background: var(--soft); }
.forum-stats dt { font-size: .74rem; color: var(--text-3); }
.forum-stats dd { font-size: 1.3rem; font-weight: 800; }
.forum-members { display: grid; gap: 8px; }
.forum-members a { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.forum-members a:hover { color: var(--brand); }
.forum-members .identicon { width: 32px; height: 32px; padding: 4px; gap: 1px; border-radius: 10px; }
.forum-rules { display: grid; gap: 6px; margin-bottom: 14px; padding-left: 1.1em; list-style: disc; color: var(--text-2); font-size: .92rem; }
.forum-link-list { display: grid; gap: 10px; }
.forum-link-list a { display: block; font-weight: 600; color: var(--text); }
.forum-link-list a:hover { color: var(--brand); }
.forum-link-list small { font-size: .78rem; color: var(--text-3); }

.forum-profile { display: grid; gap: 18px; max-width: 900px; }
.forum-profile .forum-card { display: grid; gap: 16px; }
.forum-profile-head { display: flex !important; flex-wrap: wrap; align-items: center; gap: 18px; }
.forum-profile-head > div { flex: 1 1 260px; }
.forum-profile-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.forum-profile-head .identicon { width: 64px; height: 64px; padding: 8px; gap: 3px; border-radius: 18px; }
.forum-danger { border-color: #F5C2C4; }

.forum-search { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.forum-search .faq-search { flex: 1 1 320px; }
.forum-results { display: grid; gap: 12px; }
.forum-results li { padding: 18px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.forum-results a strong { color: var(--text); }
.forum-results a:hover strong { color: var(--brand); }
.forum-results small { display: block; margin: 2px 0 8px; font-size: .8rem; color: var(--text-3); }
.forum-results p { color: var(--text-2); }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 1080px) {
    .forum-layout, .forum-auth { grid-template-columns: minmax(0, 1fr); }
    .forum-cat { grid-template-columns: auto minmax(0, 1fr) 70px; }
    .forum-cat-last { display: none; }
}
@media (max-width: 760px) {
    .forum-hero-inner { align-items: flex-start; }
    .forum-search-mini input { width: 140px; }
    .forum-steps { grid-template-columns: minmax(0, 1fr); }
    .forum-thread { grid-template-columns: auto minmax(0, 1fr) 64px; }
    .forum-thread-last { display: none; }
    .forum-post { grid-template-columns: minmax(0, 1fr); }
    .forum-post-author { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 14px 16px; }
    .forum-post-author .identicon { width: 38px; height: 38px; padding: 5px; gap: 1.5px; }
    .forum-post-body { padding: 16px; }
    .forum-cats-teaser .forum-cat, .forum-cat { grid-template-columns: auto minmax(0, 1fr); }
    .forum-cat-stats { display: none; }
}

/* ---- Sichtbarkeit (öffentlich / nur für Mitglieder) ------------------------- */
.forum-visibility .form-hint { display: block; margin-top: 10px; }
.forum-reply .forum-visibility { margin-top: 2px; }
