/* ==========================================================================
   Stammtisch – Stylesheet
   Schriften: Bricolage Grotesque (Überschriften), Atkinson Hyperlegible (Text)
   Lokal eingebunden, keine externen Anfragen (DSGVO-freundlich).
   ========================================================================== */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --brand-base: #0F6A73;
  --brand: var(--brand-base);
  --brand-strong: color-mix(in oklab, var(--brand) 78%, black);
  --brand-soft: color-mix(in oklab, var(--brand) 9%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 30%, var(--surface));
  --on-brand: #fff;

  --paper: #EEF1F5;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --surface-3: #EDF0F4;
  --ink: #172033;
  --ink-2: #485368;
  --ink-3: #737E93;
  --line: #DCE1E8;
  --line-2: #E9ECF1;

  --amber: #C98100;
  --amber-ink: #8A5800;
  --amber-soft: #FFF3D6;
  --danger: #B93424;
  --danger-soft: #FCE9E6;
  --success: #23774A;
  --success-soft: #E3F4EA;
  --admin: #B93424;
  --mod: #2457C5;

  --code-bg: #111A27;
  --code-ink: #DDE5F0;

  --font-display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Atkinson", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --shadow: 0 1px 2px rgba(23, 32, 51, .05), 0 0 0 1px rgba(23, 32, 51, .02);
  --shadow-pop: 0 12px 32px -8px rgba(23, 32, 51, .22), 0 2px 6px rgba(23, 32, 51, .08);
  --wrap: 1200px;
  --gutter: clamp(16px, 3vw, 28px);
  --header-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: color-mix(in oklab, var(--brand-base) 62%, white);
    --brand-strong: color-mix(in oklab, var(--brand-base) 48%, white);
    --brand-soft: color-mix(in oklab, var(--brand-base) 20%, var(--surface));
    --brand-line: color-mix(in oklab, var(--brand-base) 45%, var(--surface));
    --on-brand: #08121A;
    --paper: #0B1119; --surface: #121A26; --surface-2: #161F2C; --surface-3: #1C2636;
    --ink: #E4E9F1; --ink-2: #A9B3C4; --ink-3: #7A869B; --line: #253045; --line-2: #1D2737;
    --amber: #F0AE33; --amber-ink: #F6C66B; --amber-soft: rgba(240, 174, 51, .13);
    --danger: #F07565; --danger-soft: rgba(240, 117, 101, .13); --success: #5FCB8E; --success-soft: rgba(95, 203, 142, .12);
    --admin: #F07565; --mod: #79A2F2;
    --code-bg: #0A0F17;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-pop: 0 16px 40px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .05);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: color-mix(in oklab, var(--brand-base) 62%, white);
  --brand-strong: color-mix(in oklab, var(--brand-base) 48%, white);
  --brand-soft: color-mix(in oklab, var(--brand-base) 20%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand-base) 45%, var(--surface));
  --on-brand: #08121A;
  --paper: #0B1119; --surface: #121A26; --surface-2: #161F2C; --surface-3: #1C2636;
  --ink: #E4E9F1; --ink-2: #A9B3C4; --ink-3: #7A869B; --line: #253045; --line-2: #1D2737;
  --amber: #F0AE33; --amber-ink: #F6C66B; --amber-soft: rgba(240, 174, 51, .13);
  --danger: #F07565; --danger-soft: rgba(240, 117, 101, .13); --success: #5FCB8E; --success-soft: rgba(95, 203, 142, .12);
  --admin: #F07565; --mod: #79A2F2;
  --code-bg: #0A0F17;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-pop: 0 16px 40px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .05);
  color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 720; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in oklab, var(--brand) 28%, transparent); }
mark { background: var(--amber-soft); color: inherit; padding: 0 .1em; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--amber); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.count { font: 600 .8em var(--font-body); color: var(--ink-3); background: var(--surface-3); padding: .1em .55em; border-radius: 99px; vertical-align: middle; margin-left: .3em; letter-spacing: 0; }
.sep { color: var(--ink-3); margin: 0 .35em; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon--xs { width: 14px; height: 14px; }
.icon--sm { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-base); color: #fff; font: 800 1.15rem/1 var(--font-display);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
  transform: rotate(-4deg);
}
.brand__name { font: 760 1.2rem/1 var(--font-display); letter-spacing: -.025em; }

.main-nav { display: flex; gap: 2px; }
.main-nav__link {
  display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .94rem;
}
.main-nav__link .icon { width: 17px; height: 17px; opacity: .8; }
.main-nav__link:hover { background: var(--surface-3); color: var(--ink); }
.main-nav__link.is-active { color: var(--brand); background: var(--brand-soft); }

.header-search { position: relative; flex: 1; max-width: 340px; margin-left: auto; }
.header-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.header-search input[type="search"] {
  width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.header-search input[type="search"]:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }

.header-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  color: var(--ink-2); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn .icon { width: 20px; height: 20px; }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--amber); color: #1b1300; font: 700 .7rem/18px var(--font-body); text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.theme-toggle .icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon--sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon--sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon--moon { display: none; }
}
.nav-toggle { display: none; }

.user-menu { position: relative; margin-left: 4px; }
.user-menu summary {
  list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--ink-3); }
.user-menu__name { font-weight: 700; font-size: .92rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__panel, .dropdown__panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop);
  padding: 6px; animation: pop .14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.user-menu__head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.user-menu__head strong { display: block; font-family: var(--font-display); }
.user-menu__head span { font-size: .82rem; color: var(--ink-3); }
.user-menu__panel a, .user-menu__panel button, .dropdown__panel button:not(.btn) {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font-size: .94rem; text-align: left;
}
.user-menu__panel a:hover, .user-menu__panel button:hover, .dropdown__panel button:not(.btn):hover { background: var(--surface-3); }
.user-menu__panel .icon, .dropdown__panel .icon { color: var(--ink-3); }
.dropdown__panel button.is-danger { color: var(--danger); }
.dropdown__panel button.is-danger .icon { color: var(--danger); }

.dropdown { position: relative; }
.dropdown summary { list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown__form { padding: 8px 10px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 4px 0; }
.dropdown__form label { font-size: .82rem; color: var(--ink-3); display: block; margin-bottom: 4px; }
.dropdown__panel--form { width: 280px; padding: 14px; }
.dropdown__panel--form form + form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.inline-field { display: flex; gap: 6px; }
.inline-field select { flex: 1; min-width: 0; height: 34px; }

/* ---------- Layout ---------- */
.site-main { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) 64px; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 22px var(--gutter); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.site-footer strong { font-family: var(--font-display); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-title { font-size: 1.05rem; margin: 0 0 12px; color: var(--ink-2); }

/* Brotkrümel */
.crumbs { margin-bottom: 16px; font-size: .9rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li { display: flex; align-items: center; gap: 4px; color: var(--ink-3); }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); margin: 0 6px 0 2px; opacity: .6; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 700 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, transform .06s;
  background: var(--surface-3); color: var(--ink);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14); }
.btn--primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface-2); }
.btn--ghost.is-on { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 30%, transparent); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--sm { height: 36px; padding: 0 13px; font-size: .88rem; gap: 6px; }
.btn--sm .icon { width: 16px; height: 16px; }
.btn--block { width: 100%; }

/* ---------- Flash ---------- */
.flashes { display: grid; gap: 8px; margin-bottom: 20px; }
.flash {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--success-soft); color: var(--ink); border: 1px solid color-mix(in oklab, var(--success) 30%, transparent);
  animation: pop .2s ease-out;
}
.flash > .icon { color: var(--success); }
.flash--error { background: var(--danger-soft); border-color: color-mix(in oklab, var(--danger) 30%, transparent); }
.flash--error > .icon { color: var(--danger); }
.flash--info { background: var(--brand-soft); border-color: var(--brand-line); }
.flash--info > .icon { color: var(--brand); }
.flash span { flex: 1; }
.flash__close { background: none; border: 0; cursor: pointer; color: var(--ink-3); padding: 4px; border-radius: 6px; display: grid; }
.flash__close:hover { color: var(--ink); background: rgba(0, 0, 0, .05); }

/* ---------- Avatare ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-3); }
.avatar--xs { width: 22px; height: 22px; font-size: .58rem; }
.avatar--sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar--md { width: 40px; height: 40px; font-size: .9rem; }
.avatar--lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar--xl { width: 112px; height: 112px; font-size: 2.3rem; }
.avatar--initials {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  background: hsl(var(--hue) 52% 88%); color: hsl(var(--hue) 50% 26%);
}
:root[data-theme="dark"] .avatar--initials { background: hsl(var(--hue) 30% 24%); color: hsl(var(--hue) 60% 82%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar--initials { background: hsl(var(--hue) 30% 24%); color: hsl(var(--hue) 60% 82%); } }

.user-link { font-weight: 700; color: var(--ink); text-decoration: none; }
.user-link:hover { color: var(--brand); text-decoration: underline; }
.role-admin { color: var(--admin) !important; }
.role-moderator { color: var(--mod) !important; }
.user-link--gone { color: var(--ink-3); font-style: italic; }
.role-badge { display: inline-block; font: 700 .7rem/1 var(--font-body); padding: 4px 7px; border-radius: 5px; letter-spacing: .01em; }
.role-badge--admin { background: color-mix(in oklab, var(--admin) 13%, transparent); color: var(--admin); }
.role-badge--moderator { background: color-mix(in oklab, var(--mod) 14%, transparent); color: var(--mod); }
.role-badge--banned { background: var(--ink); color: var(--surface); }

/* ---------- Monogramme (Foren-Tischkarten) ---------- */
.monogram {
  position: relative; width: 48px; height: 48px; border-radius: 12px; flex: none;
  display: grid; place-items: center; text-decoration: none;
  background: var(--forum, var(--brand)); color: #fff;
  font: 720 1.2rem/1 var(--font-display); letter-spacing: -.04em;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.monogram:hover { color: #fff; }
.monogram--sm { width: 32px; height: 32px; border-radius: 8px; font-size: .85rem; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.monogram--lg { width: 68px; height: 68px; border-radius: 16px; font-size: 1.75rem; transform: rotate(-3deg); }
.monogram__dot {
  position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 3px var(--surface);
}

.tag { display: inline-flex; align-items: center; gap: 4px; font: 700 .72rem/1 var(--font-body); color: var(--ink-2); background: var(--surface-3); padding: 4px 7px; border-radius: 5px; vertical-align: middle; }
.forum-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink-2); text-decoration: none;
  white-space: nowrap;
}
.forum-chip::before { content: ""; width: 8px; height: 8px; border-radius: 2.5px; background: var(--forum, var(--ink-3)); transform: rotate(45deg); }
.forum-chip--strong { color: var(--forum); font-size: .9rem; }
.forum-chip--strong:hover { color: var(--forum); text-decoration: underline; }

/* ---------- Startseite ---------- */
.page-head--board { align-items: flex-end; margin-bottom: 26px; }
.board-title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); font-weight: 780; letter-spacing: -.035em; line-height: 1; }
.board-tagline { margin-top: 8px; color: var(--ink-2); font-size: 1.08rem; max-width: 60ch; }

.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 20px 22px; margin-bottom: 28px; border-radius: var(--radius);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.welcome__text { max-width: 70ch; }
.welcome__actions { display: flex; gap: 8px; }

.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.category { margin-bottom: 30px; }
.category__title {
  font-size: 1.02rem; font-weight: 700; color: var(--ink-2); margin: 0 0 10px 4px;
  display: flex; align-items: center; gap: 12px;
}
.category__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.forum-list { overflow: hidden; }
.forum-list__empty { padding: 20px; }
.forum-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 150px 250px; gap: 18px; align-items: center;
  padding: 18px 20px; position: relative;
}
.forum-row + .forum-row { border-top: 1px solid var(--line-2); }
.forum-row:hover { background: var(--surface-2); }
.forum-row__title { font-size: 1.12rem; font-weight: 680; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.forum-row__title a { color: var(--ink); text-decoration: none; }
.forum-row__title a:hover { color: var(--forum); }
.forum-row__title a::after { content: ""; position: absolute; inset: 0; }
.forum-row__desc { color: var(--ink-2); font-size: .93rem; margin-top: 4px; line-height: 1.5; }
.forum-row.is-unread .forum-row__title { font-weight: 780; }
.forum-row:not(.is-unread) .monogram { filter: saturate(.75); }
.forum-row__stats, .thread-row__stats { display: flex; gap: 18px; margin: 0; }
.forum-row__stats div, .thread-row__stats div { min-width: 56px; }
.forum-row__stats dt, .thread-row__stats dt { font-size: .76rem; color: var(--ink-3); order: 2; }
.forum-row__stats dd, .thread-row__stats dd { margin: 0; font: 650 1.05rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.forum-row__stats div, .thread-row__stats div { display: flex; flex-direction: column-reverse; }
.forum-row__last { display: flex; align-items: center; gap: 10px; min-width: 0; position: relative; z-index: 1; }
.last-post { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.last-post__title { font-weight: 700; font-size: .9rem; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-post__title:hover { color: var(--brand); text-decoration: underline; }
.last-post__meta { font-size: .82rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last-post__meta .user-link { font-weight: 700; color: var(--ink-2); }

.board-side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.side-box__title { font-size: .98rem; margin-bottom: 12px; display: flex; align-items: center; }
.side-box__more { display: inline-block; margin-top: 12px; font-size: .88rem; font-weight: 700; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.activity__item { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--forum); }
.activity__item.is-unread .activity__title { font-weight: 700; }
.activity__item.is-unread .activity__title::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-left: 6px; vertical-align: .15em; }
.activity__title { color: var(--ink); text-decoration: none; font-size: .93rem; line-height: 1.35; }
.activity__title:hover { color: var(--brand); text-decoration: underline; }
.activity__meta { font-size: .8rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.activity__meta .forum-chip { font-size: .76rem; }
.online-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.online-list__item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: .85rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.online-list__item:hover { border-color: var(--brand-line); color: var(--brand); }
.stat-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.stat-list div { display: flex; flex-direction: column-reverse; }
.stat-list dt { font-size: .76rem; color: var(--ink-3); }
.stat-list dd { margin: 0; font: 680 1.35rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }

/* ---------- Forum-/Themenkopf ---------- */
.forum-head, .thread-head {
  display: flex; gap: 18px; align-items: center; margin-bottom: 22px; flex-wrap: wrap;
}
.forum-head__text { flex: 1; min-width: 240px; }
.forum-head__text p { color: var(--ink-2); margin-top: 6px; max-width: 70ch; }
.forum-head__actions, .thread-head__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.thread-head { align-items: flex-end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.thread-head__text { flex: 1; min-width: 260px; }
.thread-head h1 { margin: 8px 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; text-wrap: balance; }
.thread-head__meta { color: var(--ink-3); font-size: .9rem; }

.list-head, .list-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; color: var(--ink-3); font-size: .9rem; min-height: 36px; }
.list-foot { margin: 14px 0 0; justify-content: flex-end; }
.list-head--end { justify-content: flex-end; margin-top: 16px; }

/* ---------- Themenliste ---------- */
.thread-list { overflow: hidden; }
.thread-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px 170px; gap: 16px; align-items: center;
  padding: 14px 20px; position: relative;
}
.thread-row + .thread-row { border-top: 1px solid var(--line-2); }
.thread-row:hover { background: var(--surface-2); }
.thread-row.is-pinned { background: color-mix(in oklab, var(--amber-soft) 55%, var(--surface)); }
.thread-row.is-unread::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--amber); }
.thread-list--with-forum .thread-row::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: var(--forum); opacity: .7; }
.thread-row__title { font: 650 1.02rem/1.35 var(--font-body); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.thread-row__title > a:not(.new-pill) { color: var(--ink); text-decoration: none; }
.thread-row__title > a:not(.new-pill):hover { color: var(--brand); text-decoration: underline; }
.thread-row.is-unread .thread-row__title > a:not(.new-pill) { font-weight: 700; }
.thread-row:not(.is-unread) .thread-row__title > a:not(.new-pill) { font-weight: 400; color: var(--ink-2); }
.thread-row__meta { font-size: .84rem; color: var(--ink-3); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.thread-row__meta .user-link { color: var(--ink-2); }
.thread-row__stats dd { font-size: .98rem; }
.thread-row__stats .is-hot dd { color: var(--amber-ink); }
.thread-row__last-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-3); font-size: .82rem; line-height: 1.3; }
.thread-row__last-link strong { display: block; color: var(--ink-2); font-size: .86rem; }
.thread-row__last-link:hover strong { color: var(--brand); }
.thread-list__divider { display: flex; align-items: center; gap: 10px; padding: 8px 20px; font-size: .78rem; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.thread-list__divider + .thread-row { border-top: 0; }
.flag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
.flag--pin { background: var(--amber-soft); color: var(--amber-ink); }
.flag--lock { background: var(--surface-3); color: var(--ink-2); }
.thread-head .flag { width: 30px; height: 30px; border-radius: 8px; }
.new-pill { display: inline-block; font: 700 .7rem/1 var(--font-body); color: #1b1300; background: var(--amber); padding: 4px 7px 4px; border-radius: 99px; text-decoration: none; letter-spacing: .02em; }
.new-pill:hover { color: #1b1300; filter: brightness(1.05); }
.mini-pages { display: inline-flex; gap: 3px; }
.mini-pages a { font-size: .74rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); text-decoration: none; }
.mini-pages a:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- Pagination & Segmente ---------- */
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination__page, .pagination__step {
  min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 8px;
  color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9rem; background: var(--surface); border: 1px solid var(--line);
}
.pagination__page:hover, .pagination__step:hover { border-color: var(--brand); color: var(--brand); }
.pagination__page.is-current { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pagination__gap { color: var(--ink-3); padding: 0 4px; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 11px; flex-wrap: wrap; }
.segmented a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .88rem; }
.segmented a:hover { color: var(--ink); }
.segmented a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* ---------- Beiträge ---------- */
.posts { display: grid; gap: 14px; margin-top: 20px; }
.post {
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; scroll-margin-top: calc(var(--header-h) + 16px);
}
.post:target { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.post.is-new .post__author { box-shadow: inset 4px 0 0 var(--amber); }
.post__author {
  padding: 18px 14px; background: var(--surface-2); border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
}
.post__avatar { position: relative; display: block; border-radius: 50%; }
.post__avatar.is-online::after, .member__avatar.is-online::after, .profile-hero__avatar.is-online::after {
  content: ""; position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px var(--surface-2);
}
.post__who { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.post__name { font: 700 1.02rem/1.2 var(--font-display); color: var(--ink); text-decoration: none; word-break: break-word; }
.post__name:hover { color: var(--brand); }
.post__rank { font-size: .82rem; color: var(--ink-3); }
.post__stats { width: 100%; margin: 4px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); display: grid; gap: 3px; font-size: .8rem; }
.post__stats div { display: flex; justify-content: space-between; gap: 8px; }
.post__stats dt { color: var(--ink-3); }
.post__stats dd { margin: 0; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.post__content { padding: 16px 24px 14px; display: flex; flex-direction: column; min-width: 0; }
.post__meta { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--ink-3); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.post__permalink { margin-left: auto; color: var(--ink-3); text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.post__permalink:hover { color: var(--brand); }
.op-tag { font-size: .72rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 3px 7px; border-radius: 5px; }
.post__body { flex: 1; }
.post__edited { margin-top: 14px; font-size: .8rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; font-style: italic; }
.post__signature { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: .86rem; color: var(--ink-3); max-height: 120px; overflow: hidden; }
.post__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.post__likes { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink-3); min-height: 20px; }
.post__likes a { color: var(--ink-2); font-weight: 700; text-decoration: none; }
.post__likes a:hover { color: var(--brand); text-decoration: underline; }
.icon--heart { color: #E0475B; }
.post__actions { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.post__actions form { display: contents; }
.action {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px;
  background: none; border: 0; color: var(--ink-3); font: 700 .84rem/1 var(--font-body); cursor: pointer; text-decoration: none;
}
.action .icon { width: 17px; height: 17px; }
.action:hover { background: var(--surface-3); color: var(--ink); }
.action--danger:hover { background: var(--danger-soft); color: var(--danger); }
.action.is-static { cursor: default; }
.action.is-static:hover { background: none; color: var(--ink-3); }
.action__count:empty { display: none; }
.action .icon--heart-filled { display: none; color: #E0475B; }
.action.is-liked { color: #D23B51; }
.action.is-liked .icon--heart-outline { display: none; }
.action.is-liked .icon--heart-filled { display: block; animation: beat .35s ease-out; }
@keyframes beat { 40% { transform: scale(1.3); } }
.new-divider { display: flex; align-items: center; gap: 12px; color: var(--amber-ink); font-weight: 700; font-size: .85rem; margin: 4px 0 -2px; }
.new-divider::before, .new-divider::after { content: ""; flex: 1; height: 2px; background: var(--amber); opacity: .5; border-radius: 2px; }

.attach-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.attach-gallery__item { display: block; width: 140px; height: 105px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.attach-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.attach-gallery__item:hover img { transform: scale(1.04); }
.attach-files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; max-width: 520px; }
.attach-files a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); background: var(--surface-2); }
.attach-files a:hover { border-color: var(--brand); }
.attach-files .icon { color: var(--brand); }
.attach-files__name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-files__size { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }

/* ---------- Fließtext (BBCode) ---------- */
.prose { overflow-wrap: anywhere; line-height: 1.68; font-size: 1.02rem; }
.prose > * + * { margin-top: .8em; }
.prose a { word-break: break-word; }
.prose .bb-u { text-decoration: underline; }
.prose .bb-center { text-align: center; }
.prose .bb-size-1 { font-size: .75em; } .prose .bb-size-2 { font-size: .875em; } .prose .bb-size-3 { font-size: 1em; }
.prose .bb-size-4 { font-size: 1.2em; } .prose .bb-size-5 { font-size: 1.45em; } .prose .bb-size-6 { font-size: 1.75em; } .prose .bb-size-7 { font-size: 2.1em; }
.prose .bb-img { display: block; max-height: 520px; border-radius: var(--radius-sm); margin: .6em 0; }
.prose .bb-list { margin: .6em 0; padding-left: 1.4em; }
.prose .bb-list li + li { margin-top: .25em; }
.bb-quote {
  margin: .8em 0; padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2); border-left: 3px solid var(--brand-line); font-size: .97em; color: var(--ink-2);
}
.bb-quote .bb-quote { background: var(--surface-3); }
.bb-quote__cite { display: block; font-style: normal; font-weight: 700; font-size: .84rem; color: var(--ink); margin-bottom: 6px; }
.bb-quote__cite a { color: inherit; text-decoration: none; }
.bb-quote__cite a::after { content: " ↑"; color: var(--brand); }
.bb-quote__cite a:hover { color: var(--brand); }
.bb-code {
  margin: .8em 0; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto;
  background: var(--code-bg); color: var(--code-ink); font: .87rem/1.6 var(--font-mono); tab-size: 4; position: relative;
}
.bb-code[data-lang]::before { content: attr(data-lang); position: absolute; top: 6px; right: 10px; font: 700 .7rem/1 var(--font-body); color: #7D8BA3; }
.bb-icode { font: .9em var(--font-mono); background: var(--surface-3); padding: .1em .35em; border-radius: 4px; }
.bb-spoiler { margin: .8em 0; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.bb-spoiler summary { cursor: pointer; padding: 9px 14px; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.bb-spoiler > div { padding: 0 14px 12px; }
.mention { font-weight: 700; background: var(--brand-soft); padding: .05em .3em; border-radius: 4px; text-decoration: none; }

/* ---------- Antwortbox & Editor ---------- */
.reply-box { margin-top: 26px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.reply-box__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.reply-box__head h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reply-box__guest { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.reply-box__guest div { display: flex; gap: 8px; }
.reply-box__closed { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }

.editor { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.editor__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); flex-wrap: wrap; }
.editor__tabs { display: flex; gap: 2px; }
.editor__tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 700; font-size: .86rem; color: var(--ink-3); cursor: pointer; }
.editor__tabs button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.editor__tools { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; }
.editor__tool { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 7px; color: var(--ink-2); cursor: pointer; }
.editor__tool:hover { background: var(--surface-3); color: var(--ink); }
.editor__tool .icon { width: 17px; height: 17px; }
.editor__sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.editor textarea { display: block; width: 100%; border: 0; padding: 14px 16px; resize: vertical; min-height: 140px; background: transparent; line-height: 1.6; }
.editor textarea:focus { outline: none; }
.editor__preview { padding: 14px 16px; min-height: 140px; }
.editor__foot { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-top: 1px solid var(--line-2); background: var(--surface-2); flex-wrap: wrap; }
.editor__hint { font-size: .8rem; color: var(--ink-3); }
.file-pick { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 7px; border: 1px dashed var(--line); font-size: .86rem; font-weight: 700; color: var(--ink-2); cursor: pointer; background: var(--surface); }
.file-pick:hover { border-color: var(--brand); color: var(--brand); }
.file-pick:focus-within { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-pick.has-files { border-style: solid; border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand); }

/* ---------- Formulare ---------- */
.stack { display: grid; gap: 18px; }
.stack.narrow { max-width: 420px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field__label { font-weight: 700; font-size: .92rem; }
.field label:has(input, select) { display: grid; gap: 6px; }
.field__hint { font-size: .82rem; color: var(--ink-3); font-weight: 400; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field-row--4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field-row--center { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px 24px; }
.field--narrow { max-width: 240px; }
.field--tiny input { width: 80px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea {
  width: 100%; height: 44px; padding: 0 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 11px 13px; line-height: 1.55; resize: vertical; }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737E93' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 16px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .85; }
input[type="file"] { font-size: .9rem; }
input[type="file"]::file-selector-button { font: 700 .86rem var(--font-body); padding: 8px 12px; margin-right: 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .95rem; line-height: 1.4; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
fieldset.checks { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px 14px; display: grid; gap: 10px; margin: 0; }
fieldset.checks legend { font-weight: 700; font-size: .88rem; padding: 0 6px; color: var(--ink-2); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.reply-form .form-actions { margin-top: 12px; }
.form-errors { display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--radius-sm); background: var(--danger-soft); border: 1px solid color-mix(in oklab, var(--danger) 30%, transparent); }
.form-errors > .icon { color: var(--danger); margin-top: 2px; }
.form-errors ul { margin: 6px 0 0; padding-left: 1.1em; }
.hp { position: absolute; left: -9999px; }

.form-page { max-width: 760px; margin: 0 auto; }
.form-page--wide { max-width: 900px; }
.form-page__head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.form-page__head p { margin-top: 4px; }

.auth-card { max-width: 440px; margin: 24px auto; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.auth-card h1 { margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 24px; }
.auth-card__alt { text-align: center; margin-top: 20px; font-size: .92rem; color: var(--ink-2); }
.rules-box { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rules-box summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: .92rem; }
.rules-box .prose { padding: 0 14px 14px; max-height: 260px; overflow: auto; font-size: .92rem; }
.rules-page { padding: 24px 28px; }

/* ---------- Leere Zustände & Fehler ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty h2 { margin-bottom: 8px; font-size: 1.25rem; }
.empty p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 18px; }
.error-page { text-align: center; padding: 60px 20px; max-width: 520px; margin: 0 auto; }
.error-page__code { font: 800 clamp(5rem, 14vw, 8rem)/1 var(--font-display); letter-spacing: -.06em; color: var(--brand); opacity: .9; }
.error-page h1 { margin: 12px 0 10px; }
.error-page p { color: var(--ink-2); margin-bottom: 24px; }

/* ---------- Suche ---------- */
.search-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 14px; align-items: end; padding: 18px; margin-bottom: 22px; }
.search-form .btn { height: 44px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.result { padding: 14px 18px; border-left: 4px solid var(--forum); }
.result__head { display: flex; gap: 10px; align-items: flex-start; }
.result__title { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; }
.result__title:hover { color: var(--brand); text-decoration: underline; }
.result__meta { font-size: .82rem; color: var(--ink-3); margin-top: 2px; display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.result__snippet { margin-top: 8px; color: var(--ink-2); font-size: .94rem; line-height: 1.55; }

/* ---------- Mitglieder ---------- */
.inline-search { display: flex; gap: 6px; }
.inline-search input { height: 36px; width: 200px; }
.member-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.member { padding: 20px 14px 14px; text-align: center; display: flex; flex-direction: column; }
.member__link { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); }
.member__link:hover .member__name { color: var(--brand); }
.member__avatar { position: relative; margin-bottom: 8px; border-radius: 50%; }
.member__avatar.is-online::after { box-shadow: 0 0 0 3px var(--surface); }
.member__name { font: 700 1.05rem var(--font-display); }
.member__title { font-size: .82rem; color: var(--ink-3); }
.member__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line-2); }
.member__stats div { display: flex; flex-direction: column-reverse; }
.member__stats dt { font-size: .72rem; color: var(--ink-3); }
.member__stats dd { margin: 0; font: 650 .98rem var(--font-display); font-variant-numeric: tabular-nums; }

/* ---------- Profil ---------- */
.profile-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 26px; }
.profile-hero__band {
  height: 120px; background-color: hsl(var(--hue) 42% 46%);
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .22) 1.2px, transparent 0);
  background-size: 16px 16px;
}
.profile-hero__body { display: flex; gap: 22px; padding: 0 26px 20px; align-items: flex-end; flex-wrap: wrap; }
.profile-hero__avatar { position: relative; margin-top: -56px; border-radius: 50%; box-shadow: 0 0 0 5px var(--surface); }
.profile-hero__avatar.is-online::after { width: 20px; height: 20px; right: 6px; bottom: 6px; box-shadow: 0 0 0 4px var(--surface); }
.profile-hero__text { flex: 1; min-width: 220px; padding-top: 14px; }
.profile-hero__text h1 { font-size: 2rem; letter-spacing: -.03em; }
.profile-hero__sub { color: var(--ink-2); margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.profile-hero__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .88rem; color: var(--ink-3); }
.profile-hero__facts span { display: inline-flex; align-items: center; gap: 6px; }
.profile-hero__actions { padding-bottom: 4px; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line-2); }
.profile-stats div { padding: 14px 26px; display: flex; flex-direction: column-reverse; }
.profile-stats div + div { border-left: 1px solid var(--line-2); }
.profile-stats dt { font-size: .8rem; color: var(--ink-3); }
.profile-stats dd { margin: 0; font: 680 1.3rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.profile-layout .results { margin-bottom: 14px; }
.side-panel { padding: 16px 18px; margin-bottom: 18px; }

/* ---------- Einstellungen ---------- */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-nav { display: grid; gap: 2px; position: sticky; top: calc(var(--header-h) + 20px); }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-weight: 700; }
.side-nav a:hover { background: var(--surface-3); color: var(--ink); }
.side-nav a.is-active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); border: 1px solid var(--line); }
.settings-panel { padding: 24px; }
.avatar-edit { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.avatar-edit > form:last-child { grid-column: 2; }
.avatar-edit__preview img, .avatar-edit__preview .avatar { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }

/* ---------- Nachrichten ---------- */
.conv-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.conv + .conv { border-top: 1px solid var(--line-2); }
.conv__link { display: flex; gap: 14px; align-items: center; padding: 14px 20px; text-decoration: none; color: var(--ink); position: relative; }
.conv__link:hover { background: var(--surface-2); }
.conv__avatars { display: flex; }
.conv__avatars .avatar + .avatar { margin-left: -14px; box-shadow: 0 0 0 2px var(--surface); }
.conv__main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.conv__top { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--ink-3); }
.conv__people { font-weight: 700; color: var(--ink-2); }
.conv__subject { font-weight: 700; }
.conv.is-unread .conv__subject { font-weight: 800; }
.conv:not(.is-unread) .conv__subject { font-weight: 400; }
.conv__preview { font-size: .9rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); flex: none; }

.conv-view { max-width: 860px; margin: 0 auto; }
.conv-view__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.conv-view__people { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .84rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.person-chip.has-left { opacity: .5; text-decoration: line-through; }
.chat { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.chat__msg { display: flex; gap: 12px; align-items: flex-start; max-width: 82%; }
.chat__msg.is-mine { margin-left: auto; flex-direction: row-reverse; }
.chat__bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 10px 16px 12px; box-shadow: var(--shadow); min-width: 0; }
.chat__msg.is-mine .chat__bubble { background: var(--brand-soft); border-color: var(--brand-line); border-radius: 16px 4px 16px 16px; }
.chat__msg.is-new .chat__bubble { box-shadow: inset 3px 0 0 var(--amber), var(--shadow); }
.chat__meta { font-size: .8rem; color: var(--ink-3); margin-bottom: 4px; display: flex; gap: 8px; }
.chat__msg.is-mine .chat__meta { justify-content: flex-end; }
.chat .prose { font-size: .98rem; }

/* ---------- Benachrichtigungen ---------- */
.notif-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.notif + .notif { border-top: 1px solid var(--line-2); }
.notif__link { display: flex; gap: 14px; align-items: center; padding: 14px 20px; color: var(--ink-2); text-decoration: none; }
.notif__link:hover { background: var(--surface-2); }
.notif.is-unread .notif__link { background: color-mix(in oklab, var(--brand-soft) 60%, var(--surface)); color: var(--ink); }
.notif__avatar { position: relative; flex: none; }
.notif__type { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 2px var(--surface); }
.notif--like .notif__type { background: #E0475B; color: #fff; }
.notif--mention .notif__type, .notif--quote .notif__type { background: var(--amber); color: #1b1300; }
.notif__text { flex: 1; line-height: 1.45; }
.notif__text strong { color: var(--ink); }
.notif time { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }

/* ---------- Admin ---------- */
.page-head--admin h1 { font-size: 1.7rem; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.kpis > div { padding: 18px 22px; display: flex; flex-direction: column; }
.kpis > div + div { border-left: 1px solid var(--line-2); }
.kpis dt { font-size: .84rem; color: var(--ink-3); order: 2; }
.kpis dd { margin: 0; font: 720 2rem/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; order: 1; }
.kpis__sub { order: 3; font-size: .78rem; color: var(--success); font-weight: 700; margin-top: 2px; }
.admin-card { padding: 18px 20px; }
.admin-card__title { font-size: 1rem; margin-bottom: 14px; }
.spark { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; height: 170px; align-items: end; }
.spark__col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.spark__bar { width: 100%; max-width: 26px; background: var(--brand); border-radius: 4px 4px 2px 2px; opacity: .85; }
.spark__col:hover .spark__bar { opacity: 1; }
.spark__val { font-size: .7rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.spark__day { font-size: .7rem; color: var(--ink-3); }
.mini-users { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-users li { display: flex; gap: 10px; align-items: center; }
.mini-users li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sys-list { margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.sys-list div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line-2); padding-bottom: 8px; }
.sys-list dt { color: var(--ink-3); }
.sys-list dd { margin: 0; font-weight: 700; text-align: right; }

.admin-forums { display: grid; gap: 18px; }
.admin-cat { padding: 6px; }
.admin-cat__head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px 12px; flex-wrap: wrap; }
.admin-cat__form { display: flex; gap: 8px; align-items: center; flex: 1; flex-wrap: wrap; }
.admin-cat__title { font: 700 1.1rem var(--font-display) !important; max-width: 360px; }
.admin-cat__form .field--tiny input { height: 36px; }
.admin-cat--new { padding: 16px 18px; }
.admin-cat--new label { font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.admin-cat--new input { max-width: 340px; height: 38px; }
.admin-forum { border-radius: var(--radius-sm); border: 1px solid var(--line-2); margin: 0 4px 6px; background: var(--surface); }
.admin-forum summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; list-style: none; }
.admin-forum summary::-webkit-details-marker { display: none; }
.admin-forum summary:hover { background: var(--surface-2); }
.admin-forum__name { font-weight: 700; flex: 1; display: flex; align-items: center; gap: 6px; }
.admin-forum__chev { transition: transform .15s; color: var(--ink-3); }
.admin-forum[open] .admin-forum__chev { transform: rotate(180deg); }
.admin-forum[open] { border-color: var(--line); box-shadow: var(--shadow); }
.admin-forum__body { padding: 14px 16px 16px; border-top: 1px solid var(--line-2); display: grid; gap: 18px; }
.admin-forum--new summary { color: var(--brand); font-weight: 700; }
.admin-forum--new { border-style: dashed; }
.forum-edit { display: grid; gap: 14px; }
.swatches { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.swatches legend { font-weight: 700; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.swatch { position: relative; width: 30px; height: 30px; border-radius: 8px; background: var(--c); cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.swatch input[type="radio"] { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.swatch:has(input:checked) { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.swatch:has(input:focus-visible) { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.swatch--custom { background: conic-gradient(#e44, #ea4, #4c4, #4ae, #84e, #e44); overflow: hidden; }
.swatch--custom input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
.danger-zone { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px; border-radius: var(--radius-sm); background: var(--danger-soft); font-size: .86rem; }
.danger-zone label { display: grid; gap: 6px; flex: 1; min-width: 220px; }
.danger-zone input { height: 36px; }

.admin-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__user { display: flex; gap: 10px; align-items: center; }
.table__user > div { display: flex; flex-direction: column; line-height: 1.3; }
.table__actions { text-align: right; }
.table tr.is-banned td { background: color-mix(in oklab, var(--danger-soft) 50%, transparent); }

.settings-sections { display: grid; gap: 16px; max-width: 900px; }
.settings-section { padding: 22px 24px; display: grid; gap: 16px; }
.settings-section h2 { font-size: 1.1rem; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] { width: 54px; height: 44px; padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.form-actions--sticky { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(to top, var(--paper) 70%, transparent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .board-layout { grid-template-columns: 1fr; }
  .board-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .forum-row { grid-template-columns: 48px minmax(0, 1fr) 210px; }
  .forum-row__stats { display: none; }
  .profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; padding: 10px var(--gutter) 14px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-pop); }
  .main-nav.is-open { display: flex; }
  .main-nav__link { padding: 12px; }
  .nav-toggle { display: grid; }
  .header-search { max-width: none; }
  .user-menu__name { display: none; }
  .thread-row { grid-template-columns: 40px minmax(0, 1fr) 150px; }
  .thread-row__stats { display: none; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .search-form__q { grid-column: 1 / -1; }
  .settings-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow-x: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis > div:nth-child(3) { border-left: 0; }
  .kpis > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .site-header__inner { gap: 8px; }
  .brand__name { display: none; }
  .header-search input[type="search"] { height: 38px; }
  .site-main { padding-top: 20px; }
  .forum-row { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 16px; }
  .forum-row .monogram { width: 44px; height: 44px; grid-row: span 2; align-self: start; }
  .forum-row__last { grid-column: 2; margin-top: 8px; }
  .forum-row__last .avatar { display: none; }
  .thread-row { grid-template-columns: 36px minmax(0, 1fr); padding: 12px 14px; gap: 12px; }
  .thread-row__avatar .avatar { width: 36px; height: 36px; }
  .thread-row__last { display: none; }
  .post { grid-template-columns: 1fr; }
  .post__author { flex-direction: row; text-align: left; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line-2); gap: 12px; }
  .post__author .avatar--lg { width: 44px; height: 44px; font-size: 1rem; }
  .post__avatar.is-online::after { width: 10px; height: 10px; right: 0; bottom: 0; box-shadow: 0 0 0 2px var(--surface-2); }
  .post__who { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 2px 8px; }
  .post__name { width: 100%; }
  .post__stats { display: none; }
  .post__content { padding: 14px 16px 10px; }
  .action__label { display: none; }
  .search-form { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-stats div:nth-child(3) { border-left: 0; }
  .profile-stats div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .profile-stats div { padding: 12px 18px; }
  .profile-hero__body { padding: 0 18px 18px; }
  .avatar-edit { grid-template-columns: 1fr; }
  .avatar-edit > form:last-child { grid-column: auto; }
  .chat__msg { max-width: 100%; }
  .hide-xs { display: none !important; }
  .table th:nth-child(4), .table td:nth-child(4), .table th:nth-child(5), .table td:nth-child(5) { display: none; }
  .auth-card { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media print {
  .site-header, .site-footer, .reply-box, .post__actions, .board-side { display: none; }
  body { background: #fff; }
}

/* ---------- Zusätzliche Schriften (Stil-Editor) ---------- */
@font-face { font-family: "Source Serif"; src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("../fonts/source-serif-4-latin-wght-italic.woff2") format("woff2-variations"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("../fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2-variations"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 200 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-wght-italic.woff2") format("woff2-variations"); font-weight: 200 1000; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-ext-wght-normal.woff2") format("woff2-variations"); font-weight: 200 1000; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================================
   Version 2: Stile, Banner, ACP, Moderation, Downloads
   ========================================================================== */

/* Kopfleiste im Stil */
.site-header { background: color-mix(in oklab, var(--header-bg, var(--surface)) 90%, transparent); }
.has-compact .brand, .main-nav__link, .header-actions .icon-btn { color: var(--header-ink, var(--ink)); }
.main-nav__link { color: color-mix(in oklab, var(--header-ink, var(--ink)) 78%, transparent); }
.main-nav__link:hover { background: color-mix(in oklab, var(--header-ink, var(--ink)) 8%, transparent); color: var(--header-ink, var(--ink)); }
.icon-btn { color: color-mix(in oklab, var(--header-ink, var(--ink)) 78%, transparent); }
.brand__logo { height: var(--logo-h, 40px); width: auto; max-width: 260px; object-fit: contain; display: block; }
.header-spacer { flex: 1; }
.badge--danger { background: var(--danger); color: #fff; }

/* Banner */
.site-banner {
  position: relative; min-height: var(--banner-h, 180px); display: flex; align-items: center;
  background-color: var(--banner-bg); background-size: cover; background-position: center; color: var(--banner-ink);
}
.site-banner::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--banner-overlay, .35)); }
.site-banner:not([style*="background-image"])::before { display: none; }
.site-banner__inner { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 26px var(--gutter); display: flex; flex-direction: column; gap: 8px; }
.banner--center .site-banner__inner { align-items: center; text-align: center; }
.brand--banner { color: var(--banner-ink); gap: 14px; }
.brand--banner:hover { color: var(--banner-ink); }
.brand--banner .brand__name { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); font-weight: 780; letter-spacing: -.035em; text-shadow: 0 1px 12px rgba(0, 0, 0, .18); }
.brand--banner .brand__mark { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 14px; background: color-mix(in oklab, var(--banner-ink) 18%, transparent); color: var(--banner-ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.brand--banner .brand__logo { height: calc(var(--logo-h, 40px) * 1.6); }
.site-banner__tagline { font-size: 1.1rem; opacity: .92; max-width: 60ch; }
.has-banner .brand--bar { display: none; }
.has-banner .page-head--board > div:first-child { display: none; }
.has-banner .page-head--board { justify-content: flex-end; margin-bottom: 16px; }

/* Ankündigung */
.announcement { background: var(--brand-soft); border-bottom: 1px solid var(--brand-line); }
.announcement--warning { background: var(--amber-soft); border-color: color-mix(in oklab, var(--amber) 40%, transparent); }
.announcement--success { background: var(--success-soft); border-color: color-mix(in oklab, var(--success) 35%, transparent); }
.announcement__inner { max-width: var(--wrap); margin: 0 auto; padding: 11px var(--gutter); display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.announcement__inner > .icon { margin-top: 3px; color: var(--brand); }
.announcement--warning .announcement__inner > .icon { color: var(--amber-ink); }
.announcement--success .announcement__inner > .icon { color: var(--success); }
.announcement .prose { font-size: .95rem; }

.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.site-footer__links a { color: var(--ink-2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.maint-icon { width: 96px; height: 96px; stroke-width: 1.2; }
.nowrap { white-space: nowrap; }

/* Unterforen */
.subforum-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; position: relative; z-index: 1; }
.subforum-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--ink-2); text-decoration: none; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); }
.subforum-chip::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--forum); }
.subforum-chip:hover { border-color: var(--forum); color: var(--ink); }
.subforum-chip.is-unread::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.subforums { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 22px; }
.subforum { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.subforum:hover { border-color: var(--forum); }
.subforum > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.subforum.is-unread strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-left: 6px; vertical-align: .15em; }

/* Beiträge: Melden, gesperrte Anhänge */
.attach-locked { margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--ink-3); padding: 8px 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.report-quote { margin-bottom: 20px; }

/* Sperren */
.ban-box { display: grid; gap: 14px; }
.ban-status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); border: 1px solid color-mix(in oklab, var(--danger) 30%, transparent); flex-wrap: wrap; }
.ban-status > .icon { color: var(--danger); }
.ban-status > div { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.ban-box__hint { margin-top: -6px; }
.ban-modes { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ban-modes legend { font-weight: 700; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.ban-mode { position: relative; cursor: pointer; }
.ban-mode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ban-mode span { display: inline-block; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.ban-mode input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.ban-mode input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.ban-duration input { width: 110px; flex: none; height: 44px; }
.ban-duration select { height: 44px; flex: 1; max-width: 240px; }
.ban-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: 700 .8rem var(--font-body); padding: 5px 10px; border-radius: 99px; cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
[data-ban-preview] { margin-top: 8px; min-height: 1.2em; }
.ban-panel input[type="datetime-local"] { max-width: 280px; }

/* Moderation */
.report-list { display: grid; gap: 12px; }
.report { padding: 16px 18px; display: grid; gap: 12px; border-left: 4px solid var(--danger); }
.report__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.report__reason { display: flex; gap: 10px; align-items: flex-start; }
.report__reason > .icon { color: var(--danger); margin-top: 3px; }
.report__post { display: flex; gap: 10px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.report__body { color: var(--ink-2); font-size: .93rem; margin-top: 4px; }
.report__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report__done { display: flex; gap: 6px; flex: 1; min-width: 260px; }
.report__done input { height: 36px; }

/* ACP-Rahmen */
.acp { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.acp__side { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
.acp__menu > summary { display: none; }
.acp__group { font-size: .78rem; font-weight: 700; color: var(--ink-3); margin: 16px 12px 4px; }
.acp__group:first-of-type { margin-top: 0; }
.acp__link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .93rem; }
.acp__link .icon { width: 17px; height: 17px; opacity: .75; }
.acp__link:hover { background: var(--surface-3); color: var(--ink); }
.acp__link.is-active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 7px 11px; }
.acp__link.is-active .icon { opacity: 1; }
.acp__badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .72rem; display: grid; place-items: center; padding: 0 6px; }
.acp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.acp-head h1 { font-size: 1.7rem; }
.acp-head__actions { display: flex; gap: 8px; }
.acp-intro { color: var(--ink-2); max-width: 75ch; margin: -6px 0 20px; font-size: .95rem; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--ink-3); margin-bottom: 4px; }
.back-link:hover { color: var(--brand); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 700; font-size: .92rem; color: var(--ink-3); text-decoration: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--brand); border-color: var(--brand); }
.settings-section--flat { padding: 0; }
.mail-test { margin-top: 16px; max-width: 900px; }
.mail-test .inline-field input { max-width: 320px; height: 42px; }
.todo { display: grid; gap: 8px; margin-bottom: 16px; }
.todo__item { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--ink); text-decoration: none; font-weight: 700; }
.todo__item--warn { background: var(--amber-soft); border-color: color-mix(in oklab, var(--amber) 40%, transparent); }
.todo__item:hover { color: var(--brand); }
.kpis__sub--muted { color: var(--ink-3); }
.mini-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.mini-log time { display: block; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-grid a { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; }
.quick-grid a:hover { border-color: var(--brand); color: var(--brand); }
.admin-card--wide { grid-column: 1 / -1; }
.filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; padding: 14px; align-items: end; margin-bottom: 14px; }
.filter-bar .btn { height: 44px; }
.table tr.is-link { cursor: pointer; }
.table tr.is-link:hover td { background: var(--surface-2); }
.table tr.is-muted td { opacity: .6; }
.table tr.is-selected td { background: var(--brand-soft); }
.status-ok { color: var(--success); font-weight: 700; font-size: .85rem; }
.status-bad { color: var(--danger); font-weight: 700; font-size: .85rem; }
.acp-user-head { display: flex; gap: 16px; align-items: center; }
.user-edit-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.user-edit-side { display: grid; gap: 16px; }
.group-checks { display: grid; gap: 8px; }
.group-check span { display: flex; flex-direction: column; }
.ip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ip-list li { display: flex; justify-content: space-between; gap: 10px; }
.danger-section { border-color: color-mix(in oklab, var(--danger) 35%, var(--line)); }
.danger-section h2 { color: var(--danger); }
.danger-inline { margin-top: 16px; }
.admin-forum--child { margin-left: 36px; }
.admin-forum summary .btn { margin-left: auto; }
.admin-forum summary .btn + .admin-forum__chev { margin-left: 0; }
.perm-table td { padding: 8px 10px; }
.perm-table th[scope="row"] { font-weight: 700; color: var(--ink); background: transparent; font-size: .92rem; border-bottom: 1px solid var(--line-2); }
.tri { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tri__opt { position: relative; cursor: pointer; }
.tri__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tri__opt span { display: block; padding: 5px 9px; font-size: .78rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.tri__opt + .tri__opt span { border-left: 1px solid var(--line); }
.tri__opt small { font-weight: 400; }
.tri__opt small.yes { color: var(--success); } .tri__opt small.no { color: var(--danger); }
.tri__opt input:checked + span { background: var(--surface-3); color: var(--ink); }
.tri__opt--yes input:checked + span { background: var(--success-soft); color: var(--success); }
.tri__opt--no input:checked + span { background: var(--danger-soft); color: var(--danger); }
.tri__opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.form-actions--sticky .check { margin-right: auto; }
.group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.group-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-decoration: none; color: var(--ink); border-top: 4px solid var(--gc); }
.group-card:hover { border-color: var(--brand); border-top-color: var(--gc); }
.group-card__name { font: 700 1.1rem var(--font-display); color: var(--gc); display: flex; gap: 8px; align-items: center; }
.group-card__meta { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--ink-3); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.perm-head { display: flex; justify-content: space-between; align-items: center; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 20px; }
.perm--danger span { color: var(--danger); font-weight: 700; }
.pages-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.dir-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dir-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line-2); padding-bottom: 8px; }
.sys-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sys-action { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; color: var(--ink); }
.sys-action > .icon { color: var(--brand); margin-top: 2px; }
.sys-action > span { display: flex; flex-direction: column; gap: 3px; }
.sys-action:hover { border-color: var(--brand); }
.code-input { font: .86rem/1.55 var(--font-mono); }

/* Stile */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.style-card { overflow: hidden; display: flex; flex-direction: column; }
.style-card.is-default { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.style-card__info { padding: 12px 16px 4px; }
.style-card__info h2 { font-size: 1.05rem; display: flex; gap: 8px; align-items: center; }
.style-card__actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 16px; margin-top: auto; }
.style-thumb { position: relative; display: flex; flex-direction: column; height: 150px; background: var(--t-bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.style-thumb__banner { height: 40px; background: var(--t-banner); background-size: cover; background-position: center; }
.style-thumb__bar { height: 16px; background: var(--t-header); border-bottom: 1px solid rgba(0, 0, 0, .08); position: relative; }
.style-thumb__bar::after { content: ""; position: absolute; left: 12px; top: 5px; width: 30px; height: 6px; border-radius: 3px; background: var(--t-accent); }
.style-thumb__body { padding: 10px 12px; display: grid; gap: 6px; }
.style-thumb__panel { display: flex; gap: 8px; align-items: center; background: var(--t-surface); border-radius: var(--t-radius); padding: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.style-thumb__panel i { width: 16px; height: 16px; border-radius: calc(var(--t-radius) / 2 + 2px); background: var(--t-accent); }
.style-thumb__panel b { flex: 1; height: 6px; border-radius: 3px; background: color-mix(in oklab, var(--t-ink) 35%, transparent); }
.style-thumb__dark { position: absolute; right: 8px; bottom: 8px; font-size: .7rem; font-weight: 700; background: #0B1119; color: #E4E9F1; padding: 3px 7px; border-radius: 5px; }
.style-editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.style-editor__controls { max-width: none; }
.style-preview-sticky { position: sticky; top: calc(var(--header-h) + 20px); }
.color-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 6px 0; }
.color-row input[type="color"] { width: 48px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.color-row label { display: flex; flex-direction: column; line-height: 1.3; cursor: pointer; font-size: .93rem; }
.color-row__hex { font: .8rem var(--font-mono); color: var(--ink-3); }
.image-field { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.image-field__preview { height: 72px; border-radius: var(--radius-sm); border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px; }
.image-field__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-field__preview.is-small { width: 72px; }
input[type="range"] { width: 100%; accent-color: var(--brand); height: 28px; }
.range-out { font-size: .82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.style-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.style-option { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.style-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.style-option > span:last-child { display: flex; flex-direction: column; }
.style-option__swatch { width: 56px; height: 38px; border-radius: 7px; border: 1px solid var(--line); position: relative; overflow: hidden; flex: none; }
.style-option__swatch i { position: absolute; inset: 0 0 auto; height: 12px; }
.style-option__swatch b { position: absolute; left: 8px; bottom: 8px; width: 22px; height: 8px; border-radius: 3px; }

/* Live-Vorschau im Stil-Editor */
.sp { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-family: var(--sp-font-b); color: var(--sp-ink); background: var(--sp-bg); }
.sp__banner { position: relative; height: var(--sp-banner-h); background-color: var(--sp-banner); background-size: cover; background-position: center; color: var(--sp-banner-ink); padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.sp__banner::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--sp-overlay)); }
.sp__banner:not([style*="background-image"])::before { display: none; }
.sp__banner > * { position: relative; }
.sp[data-mode="compact"] .sp__banner { display: none; }
.sp[data-mode="banner"] .sp__brand--bar { display: none; }
.sp[data-align="center"] .sp__banner { align-items: center; text-align: center; }
.sp__brand { display: flex; align-items: center; gap: 8px; }
.sp__banner .sp__name { font: 780 1.3rem/1 var(--sp-font-d); letter-spacing: -.03em; }
.sp__tagline { font-size: .75rem; opacity: .9; }
.sp__mark { width: 24px; height: 24px; border-radius: 7px; background: var(--sp-accent); color: #fff; display: grid; place-items: center; font: 800 .8rem var(--sp-font-d); }
.sp__banner .sp__mark { background: rgba(255, 255, 255, .2); width: 30px; height: 30px; }
.sp__logo { height: var(--sp-logo-h); width: auto; max-width: 150px; }
.sp[data-name="0"] .sp__name { display: none; }
.sp__bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--sp-header); color: var(--sp-header-ink); border-bottom: 1px solid rgba(0, 0, 0, .08); font-size: .75rem; }
.sp__bar .sp__name { font: 760 .9rem var(--sp-font-d); }
.sp__nav { display: flex; gap: 8px; }
.sp__nav b { color: var(--sp-accent); }
.sp__page { padding: 14px; background-size: cover; background-position: center; }
.sp__cat { font: 700 .75rem var(--sp-font-d); opacity: .7; margin-bottom: 6px; }
.sp__panel { background: var(--sp-surface); border-radius: var(--sp-radius); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); margin-bottom: 12px; overflow: hidden; }
.sp__row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.sp__row + .sp__row { border-top: 1px solid color-mix(in oklab, var(--sp-ink) 8%, transparent); }
.sp__row > span:last-child { display: flex; flex-direction: column; }
.sp__mono { width: 30px; height: 30px; border-radius: calc(var(--sp-radius) * .6); color: #fff; display: grid; place-items: center; font: 720 .8rem var(--sp-font-d); flex: none; }
.sp__title { font: 680 .9rem var(--sp-font-d); }
.sp__desc { font-size: .72rem; opacity: .7; }
.sp__btn { display: inline-block; background: var(--sp-accent); color: #fff; font-weight: 700; font-size: .75rem; padding: 7px 12px; border-radius: calc(var(--sp-radius) * .65); }
.sp__link { color: var(--sp-accent); font-size: .78rem; text-decoration: underline; margin-left: 8px; }

/* Downloads */
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dl-cat { display: flex; gap: 14px; padding: 16px; text-decoration: none; color: var(--ink); align-items: flex-start; }
.dl-cat:hover { border-color: var(--forum); }
.dl-cat__text { display: flex; flex-direction: column; gap: 3px; }
.dl-cat__title { font: 680 1.08rem var(--font-display); }
.dl-cat__desc { font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.dl-cat__count { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.dl-list { overflow: hidden; }
.dl-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 170px; gap: 16px; align-items: center; padding: 14px 18px; }
.dl-row + .dl-row, .dl-queue-row + .dl-queue-row { border-top: 1px solid var(--line-2); }
.dl-row:hover { background: var(--surface-2); }
.dl-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; display: grid; place-items: center; background: var(--forum, var(--brand)); flex: none; text-decoration: none; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dl-thumb__ext { color: #fff; font: 760 .95rem var(--font-display); letter-spacing: .02em; }
.dl-thumb--lg { width: 88px; height: 88px; border-radius: var(--radius); }
.dl-thumb--lg .dl-thumb__ext { font-size: 1.25rem; }
.dl-row__title { font: 680 1.02rem/1.3 var(--font-body); }
.dl-row__title a { color: var(--ink); text-decoration: none; }
.dl-row__title a:hover { color: var(--brand); text-decoration: underline; }
.dl-row__summary { color: var(--ink-2); font-size: .9rem; margin-top: 2px; }
.dl-row__meta { font-size: .82rem; color: var(--ink-3); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.dl-row__stats { display: flex; gap: 18px; margin: 0; }
.dl-row__stats div { display: flex; flex-direction: column-reverse; }
.dl-row__stats dt { font-size: .76rem; color: var(--ink-3); }
.dl-row__stats dd { margin: 0; font: 650 1rem var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-queue-row { display: flex; align-items: center; gap: 12px; padding-right: 18px; }
.dl-queue-row .dl-row { flex: 1; }
.dl-queue-row .dl-row + .dl-row { border: 0; }
.rank-list { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.rank-list li { padding-left: 4px; }
.rank-list li::marker { font: 700 .85rem var(--font-display); color: var(--ink-3); }
.rank-list a { color: var(--ink); text-decoration: none; font-size: .92rem; display: block; }
.rank-list a:hover { color: var(--brand); text-decoration: underline; }
.tag--lg { font-size: .8rem; padding: 5px 9px; }
.dl-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.dl-head { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.dl-head h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dl-head__summary { color: var(--ink-2); margin-top: 6px; font-size: 1.05rem; }
.dl-preview { display: block; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.dl-preview img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.dl-section { padding: 20px 24px; margin-bottom: 16px; }
.dl-section__title { font-size: 1rem; margin-bottom: 10px; }
.dl-side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.dl-card { padding: 18px; display: grid; gap: 16px; }
.btn--lg { height: 52px; font-size: 1.02rem; }
.dl-facts { margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.dl-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line-2); padding-bottom: 8px; }
.dl-facts dt { color: var(--ink-3); }
.dl-facts dd { margin: 0; font-weight: 700; text-align: right; }
.dl-facts__file { word-break: break-all; font-weight: 400 !important; font-size: .85rem; }
.dl-author { display: flex; gap: 10px; align-items: center; }
.dl-author > div { display: flex; flex-direction: column; line-height: 1.3; }
.dl-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dl-comments { margin-top: 26px; }
.comment { display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 10px; scroll-margin-top: calc(var(--header-h) + 16px); }
.comment:target { border-color: var(--brand); }
.comment__body { flex: 1; min-width: 0; }
.comment__meta { display: flex; gap: 8px; align-items: center; font-size: .85rem; margin-bottom: 4px; }
.comment__del { margin-left: auto; }
.dl-source { gap: 14px; }

@media (max-width: 1080px) {
  .style-editor { grid-template-columns: 1fr; }
  .style-preview-sticky { position: static; }
  .dl-detail { grid-template-columns: 1fr; }
  .dl-side { position: static; }
  .user-edit-grid, .pages-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .acp { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .acp__main { min-width: 0; }
  .acp__side { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .acp__menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .acp__menu > summary { display: flex; gap: 8px; align-items: center; padding: 12px 14px; font-weight: 700; cursor: pointer; list-style: none; }
  .acp__menu > summary::-webkit-details-marker { display: none; }
  .acp__menu nav { padding: 0 8px 10px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .field:first-child { grid-column: 1 / -1; }
  .site-banner__inner { padding: 20px var(--gutter); }
  .has-banner .brand--bar { display: flex; }
  .has-banner .brand--bar .brand__name { display: none; }
}
@media (max-width: 700px) {
  .dl-row { grid-template-columns: 52px minmax(0, 1fr); padding: 12px 14px; }
  .dl-thumb { width: 52px; height: 52px; }
  .dl-row__stats { display: none; }
  .admin-forum--child { margin-left: 16px; }
  .image-field { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .tri__opt span { padding: 5px 6px; }
}

/* Feinschliff */
.field label.check { display: inline-flex; font-weight: 400; }
.header-search { flex: 1 1 200px; min-width: 170px; }
.main-nav { min-width: 0; }
.main-nav__link { padding: 8px 10px; }
@media (min-width: 901px) { .main-nav > .main-nav__link .icon { display: none; } }
@media (max-width: 900px) { .main-nav .main-nav__link .icon { display: inline-block; width: 20px; height: 20px; opacity: .85; flex: none; } .main-nav .main-nav__link { gap: 12px; } }
.rank-list li { display: list-item; }
.rank-list li > a { display: inline; }
.rank-list li > span { float: right; margin-left: 8px; }
.confirm-label { display: grid; gap: 6px; font-weight: 400 !important; }
.search-mobile { display: none; }
.tri__dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 5px; vertical-align: .1em; }
.tri__dot.yes { background: var(--success); } .tri__dot.no { background: var(--danger); }
.perm-table th, .perm-table td { padding-left: 8px; padding-right: 8px; }
@media (max-width: 600px) {
  .header-search { display: none; }
  .search-mobile { display: grid; }
  .header-actions { gap: 0; margin-left: auto; }
  .icon-btn { width: 36px; height: 36px; }
  .user-menu summary { padding: 3px 6px 3px 3px; }
}
.perm-table td { padding: 6px 5px; }
.perm-table .tri__opt span { padding: 5px 7px; font-size: .76rem; }

/* ==========================================================================
   Version 3: Präfixe, Umfragen, Ränge, Verwarnungen, Backups, Import
   ========================================================================== */
.text-warn { color: var(--danger) !important; font-weight: 700; }
.prefix { display: inline-flex; align-items: center; font: 700 .74rem/1 var(--font-body); padding: 4px 8px; border-radius: 6px; color: var(--px); background: color-mix(in oklab, var(--px) 13%, transparent); border: 1px solid color-mix(in oklab, var(--px) 30%, transparent); white-space: nowrap; vertical-align: middle; margin-right: 2px; }
.thread-head h1 .prefix { font-size: .9rem; padding: 6px 10px; }
.activity__item .prefix { font-size: .68rem; padding: 2px 6px; margin-right: 4px; }
.prefix--none { --px: var(--ink-3); }
.prefix-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 18px; }
.prefix-filter a { --px: var(--ink-2); font-size: .84rem; font-weight: 700; text-decoration: none; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--px); }
.prefix-filter a:hover { border-color: var(--px); }
.prefix-filter a.is-active { background: color-mix(in oklab, var(--px) 14%, var(--surface)); border-color: var(--px); }
.prefix-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prefix-pick legend { margin-bottom: 8px; padding: 0; }
.prefix-opt { position: relative; cursor: pointer; }
.prefix-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.prefix-opt .prefix { font-size: .84rem; padding: 7px 12px; opacity: .55; }
.prefix-opt input:checked + .prefix { opacity: 1; box-shadow: 0 0 0 2px var(--px); }
.prefix-opt input:focus-visible + .prefix { outline: 2.5px solid var(--brand); outline-offset: 3px; }
.forum-picks { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.forum-picks legend { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; padding: 0; }
.forum-picks__cat { display: grid; gap: 4px; align-content: start; }
.check--indent { margin-left: 22px; }
.check--danger span { color: var(--danger); }

/* Umfrage */
.poll { padding: 18px 22px; margin-top: 20px; border-left: 4px solid var(--brand); }
.poll__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.poll__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.poll__head h2 { font-size: 1.15rem; }
.poll__form { display: grid; gap: 8px; max-width: 640px; }
.poll__choice { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.poll__choice:hover { border-color: var(--brand-line); }
.poll__choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.poll__choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.poll__choice input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.poll__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.poll__results { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; max-width: 720px; }
.poll__label { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; margin-bottom: 5px; }
.poll__num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poll__bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.poll__bar span { display: block; height: 100%; border-radius: 99px; background: color-mix(in oklab, var(--brand) 55%, var(--surface)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.poll__result.is-top .poll__bar span { background: var(--brand); }
.poll__result.is-mine .poll__label > span:first-child { font-weight: 700; }
.poll__voters { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.poll__voters a { color: var(--ink-2); }
.poll-form { padding: 0; overflow: hidden; }
.poll-form > summary { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; font-weight: 700; list-style: none; }
.poll-form > summary::-webkit-details-marker { display: none; }
.poll-form > summary .icon { color: var(--brand); }
.poll-form > summary .muted { margin-left: auto; font-weight: 400; }
.poll-form[open] > summary { border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.poll-form__body { padding: 16px; }
.poll-opts { margin: 0 0 8px; padding-left: 1.4em; display: grid; gap: 6px; }
.poll-opts li { padding-left: 4px; }
.poll-opts li::marker { color: var(--ink-3); font-weight: 700; font-size: .85rem; }
.poll-opts li { display: list-item; }
.poll-opts input[name="poll_options[]"] { height: 40px; max-width: 520px; }
.poll-opts .muted { margin-left: 8px; }
.checks-inline { display: flex; flex-wrap: wrap; gap: 10px 22px; }

/* Ränge */
.rank { --rank: var(--amber); display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: color-mix(in oklab, var(--rank) 80%, var(--ink)); }
.rank__pips { display: inline-flex; gap: 2px; }
.rank__pips i { width: 8px; height: 8px; background: var(--rank); clip-path: polygon(50% 0, 63% 35%, 100% 38%, 71% 61%, 80% 100%, 50% 78%, 20% 100%, 29% 61%, 0 38%, 37% 35%); }
.post__author .rank { flex-direction: column; gap: 3px; }
.profile-hero__rank { margin-top: 6px; }
.rank-ladder { padding: 6px 0; }
.rank-step { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 18px; flex-wrap: wrap; }
.rank-step + .rank-step { border-top: 1px solid var(--line-2); }
.rank-step__preview { display: flex; flex-direction: column; gap: 4px; }
.rank-step__edit > summary { list-style: none; }
.rank-step__edit > summary::-webkit-details-marker { display: none; }
.rank-step__edit[open] { flex-basis: 100%; }
.rank-step__edit[open] > summary { display: none; }
.rank-step__edit form + form { margin-top: 8px; }
.rank-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.rank-form .field { min-width: 140px; }
.rank-form input[type="color"] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.inline-toggle .check { font-weight: 700; }

/* Verwarnungen */
.warn-scale { margin-bottom: 20px; }
.warn-scale__bar { position: relative; height: 12px; border-radius: 99px; background: var(--surface-3); margin: 10px 0 10px; }
.warn-scale__bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--amber), var(--danger)); }
.warn-scale__bar i { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); transform: translateX(-1px); }
.warn-scale__legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .84rem; color: var(--ink-3); }
.warn-scale__legend li.is-reached { color: var(--danger); }
.warn-post { margin-bottom: 16px; }
.warn-reasons { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.warn-reasons legend { margin-bottom: 8px; padding: 0; }
.warn-reason { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.warn-reason:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.warn-reason input { margin-top: 3px; accent-color: var(--danger); }
.warn-reason > span { display: flex; flex-direction: column; }
.w-status { font-size: .76rem; font-weight: 700; padding: 3px 7px; border-radius: 5px; }
.w-status--active { background: var(--danger-soft); color: var(--danger); }
.w-status--expired, .w-status--revoked { background: var(--surface-3); color: var(--ink-3); }
.mini-table { display: grid; gap: 4px; margin-bottom: 10px; }
.mini-row > summary { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; list-style: none; }
.mini-row > summary::-webkit-details-marker { display: none; }
.mini-row > summary:hover { background: var(--surface-2); }
.mini-row > summary .muted { margin-left: auto; }
.mini-row[open] { background: var(--surface-2); border-radius: 8px; padding-bottom: 10px; }
.mini-row form { padding: 0 10px; }
.mini-row form + form { margin-top: 6px; }
.mini-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mini-form input:not([type="checkbox"]), .mini-form select { height: 36px; width: auto; flex: 1 1 70px; min-width: 60px; }
.mini-form input[type="number"] { flex: 0 1 76px; }
.mini-form input[name="title"] { flex: 3 1 160px; }
.mini-form--new { padding-top: 10px; border-top: 1px dashed var(--line); }
.threshold-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.threshold-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.threshold-list li form { margin-left: auto; }
.threshold-list__pts { font: 700 .9rem var(--font-display); min-width: 46px; padding: 3px 8px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); text-align: center; }

/* Backups */
.backup-choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.backup-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.backup-choice.is-disabled { opacity: .55; cursor: not-allowed; }
.backup-choice input { margin-top: 3px; accent-color: var(--brand); }
.backup-choice > span { display: flex; flex-direction: column; }
.backup-list { overflow: visible; }
.backup { display: flex; align-items: center; gap: 14px; padding: 14px 18px; flex-wrap: wrap; }
.backup + .backup { border-top: 1px solid var(--line-2); }
.backup__icon { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font: 760 .78rem var(--font-display); color: #fff; background: #3D5A6C; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); flex: none; }
.backup__icon.is-zip { background: var(--brand-base); }
.backup__main { flex: 1; min-width: 220px; display: flex; flex-direction: column; line-height: 1.35; }
.backup__name { font-size: .74rem; color: var(--ink-3); }
.backup__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cron-hint { margin-top: 4px; }
.cron-hint summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.cron-hint .bb-code { font-size: .78rem; white-space: pre-wrap; word-break: break-all; }
.upload-row input[type="file"] { flex: 1; height: auto; padding: 6px; }

/* Import */
.import-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: st; }
.import-steps li { counter-increment: st; display: flex; flex-direction: column; padding: 12px 14px 12px 50px; position: relative; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
.import-steps li::before { content: counter(st); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 .85rem var(--font-display); background: var(--surface-3); color: var(--ink-2); }
.import-steps li strong { color: var(--ink); font-size: .95rem; }
.import-steps li.is-current { border-color: var(--brand); }
.import-steps li.is-current::before { background: var(--brand); color: var(--on-brand); }
.import-steps li.is-done::before { content: "✓"; background: var(--success); color: #fff; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.import-more summary { cursor: pointer; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
.import-more[open] { display: grid; gap: 12px; }
.import-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 0; }
.import-counts div { display: flex; flex-direction: column-reverse; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.import-counts dt { font-size: .78rem; color: var(--ink-3); }
.import-counts dd { margin: 0; font: 700 1.25rem var(--font-display); font-variant-numeric: tabular-nums; }
.import-progress__steps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.import-progress__steps li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-3); }
.import-progress__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.import-progress__steps li.is-current { color: var(--ink); font-weight: 700; }
.import-progress__steps li.is-current .import-progress__dot { border-color: var(--brand); border-top-color: transparent; animation: spin .8s linear infinite; }
.import-progress__steps li.is-done { color: var(--ink-2); }
.import-progress__steps li.is-done .import-progress__dot { background: var(--success); border-color: var(--success); }
@keyframes spin { to { transform: rotate(360deg); } }
.import-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.import-log .icon { color: var(--success); margin-right: 6px; }
.howto { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--ink-2); font-size: .94rem; }

@media (max-width: 1080px) { .import-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .import-steps { grid-template-columns: 1fr; } .poll { padding: 16px; } }
[hidden] { display: none !important; }
.field--tiny input { max-width: 110px; }
.field label.file-pick { display: inline-flex; font-weight: 700; }
.field > .chip-btn, .poll-form .chip-btn { justify-self: start; width: auto; }

/* Updates */
.update-hero { display: flex; gap: 40px; padding: 20px 24px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.update-hero__version { font: 760 2.4rem/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.update-hero__version.is-new { color: var(--brand); }
.update-hero__new { padding-left: 40px; border-left: 1px solid var(--line); display: grid; gap: 6px; justify-items: start; }
.update-ready { border-color: var(--brand); margin-bottom: 16px; }
.update-plan { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: .92rem; color: var(--ink-2); }
.update-changelog { padding: 12px 16px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .94rem; }
.update-done { border-color: var(--success); margin-bottom: 16px; }
.update-done h2 { display: flex; gap: 8px; align-items: center; color: var(--success); }
.release-help summary { cursor: pointer; }
.form-errors pre { margin: 6px 0; }

/* Mail-Einstellungen */
.mail-block { display: grid; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.mail-block[hidden], .field__hint[hidden] { display: none; }
.mail-block__title { font-size: .95rem; margin: 0; }

/* Externe Bilder (Zwei-Klick) */
.bb-extimg { display: block; margin: 8px 0; }
.bb-extimg__btn { display: grid; gap: 4px; width: 100%; max-width: 420px; padding: 18px 20px; text-align: left; font: inherit; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; cursor: pointer; }
.bb-extimg__btn:hover { border-color: var(--brand); color: var(--ink); }
.bb-extimg__btn strong { color: var(--brand); }
.bb-extimg__btn span { font-size: .85rem; }

/* Datenschutz & Konto */
.settings-h { font-size: 1.05rem; margin: 0; }
.settings-sep { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.account-delete .settings-h { color: var(--danger); }

/* ===================== Galerie ===================== */
.icon--xl { width: 34px; height: 34px; stroke-width: 1.5; }
.page-head__sub { margin: 4px 0 0; color: var(--ink-3); font-size: .92rem; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }
.section-row .section-title { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: .86rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.empty > .icon { color: var(--ink-3); margin-bottom: 8px; }
.form-panel { padding: 24px; }
.narrow-lg { max-width: 720px; }
.field-legend { font-weight: 700; margin-bottom: 4px; }
.gal-head { margin-bottom: 8px; }

.gal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gal-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-3); box-shadow: var(--shadow); }
.gal-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gal-tile:hover img, .gal-tile:focus-visible img { transform: scale(1.04); }
.gal-tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.gal-tile__ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-3); }
.gal-tile__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 14, 22, .55); color: #fff; backdrop-filter: blur(4px); transition: background .2s; }
.gal-tile__play .icon { width: 24px; height: 24px; margin-left: 3px; }
.gal-tile:hover .gal-tile__play { background: var(--brand); }
.gal-tile__dur { position: absolute; right: 8px; top: 8px; padding: 2px 7px; border-radius: 6px; font: 700 .75rem/1.4 var(--font-body); color: #fff; background: rgba(10, 14, 22, .65); }
.gal-tile__info { position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 26px 10px 9px; color: #fff; font-size: .82rem; background: linear-gradient(transparent, rgba(8, 12, 20, .72)); opacity: 0; transition: opacity .2s; }
.gal-tile:hover .gal-tile__info, .gal-tile:focus-visible .gal-tile__info { opacity: 1; }
.gal-tile__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-tile__meta { display: flex; gap: 8px; flex: none; }
.gal-tile__meta span { display: inline-flex; align-items: center; gap: 3px; }
@media (hover: none) { .gal-tile__info { opacity: 1; background: linear-gradient(transparent, rgba(8, 12, 20, .55)); } .gal-tile__info:not(:has(.gal-tile__title:not(:empty))):not(:has(.gal-tile__meta span)) { display: none; } }

.album-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.album-card { display: block; text-decoration: none; color: inherit; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.album-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.album-card__cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-3); }
.album-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-card__cover::after { content: ""; position: absolute; inset: 6px 6px auto auto; width: 0; }
.album-card__vis { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font: 700 .72rem/1.4 var(--font-body); color: #fff; background: rgba(10, 14, 22, .65); }
.album-card__body { display: grid; gap: 2px; padding: 11px 14px 13px; }
.album-card__title { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-card__meta { font-size: .82rem; color: var(--ink-3); }

.album-head { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 18px; }
.album-head h1 { margin: 0 0 6px; }
.album-head__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--ink-3); font-size: .9rem; margin: 0; }
.album-head__desc { margin-top: 10px; }
.album-head__actions { display: flex; gap: 8px; }

/* Detailansicht */
.gal-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.gal-stage { position: relative; display: grid; place-items: center; min-height: 260px; background: #0c1018; border-radius: var(--radius); overflow: hidden; }
.gal-stage__imglink { display: block; cursor: zoom-in; }
.gal-stage__img { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; }
.gal-stage__video { display: block; width: 100%; max-height: 78vh; background: #000; }
.gal-nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(10, 14, 22, .5); backdrop-filter: blur(4px); text-decoration: none; }
.gal-nav:hover { background: var(--brand); color: #fff; }
.gal-nav--prev { left: 10px; } .gal-nav--next { right: 10px; }
.gal-stage--video .gal-nav { top: 40%; }
.gal-info { padding: 18px 20px; display: grid; gap: 14px; }
.gal-info__title { font-size: 1.3rem; margin: 0; overflow-wrap: anywhere; }
.gal-info__by { display: flex; gap: 10px; align-items: center; margin: 0; line-height: 1.3; }
.gal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gal-facts { display: grid; gap: 6px; margin: 0; font-size: .88rem; }
.gal-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line-2); padding-bottom: 6px; }
.gal-facts dt { color: var(--ink-3); } .gal-facts dd { margin: 0; text-align: right; }
.gal-edit summary { cursor: pointer; font-weight: 700; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.gal-edit[open] summary { margin-bottom: 12px; }
.gal-edit form + form { margin-top: 12px; }
.gal-comments { margin-top: 26px; }

/* Hochladen */
.dropzone { position: relative; display: grid; justify-items: center; gap: 6px; padding: 34px 20px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.is-over, .dropzone:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__icon { color: var(--brand); }
.dropzone__title { font-weight: 700; font-size: 1.05rem; }
.dropzone__hint { font-size: .84rem; color: var(--ink-3); max-width: 460px; }
.upload-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.upload-item { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius-sm); background: var(--surface-2); }
.upload-item__thumb { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 8px; overflow: hidden; background: var(--surface-3); color: var(--ink-3); font-size: 1.2rem; }
.upload-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-item__meta { display: grid; min-width: 0; font-size: .86rem; }
.upload-item__meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item__meta span { color: var(--ink-3); }
.upload-progress__bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.upload-progress__bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

/* Videos in Beiträgen */
.media-player { margin: 12px 0; max-width: 720px; }
.media-player video { display: block; width: 100%; max-height: 70vh; border-radius: var(--radius-sm); background: #000; }
.media-player figcaption { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: .82rem; color: var(--ink-3); }

/* Lightbox */
.has-lightbox, .has-lightbox body { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; background: rgba(6, 9, 15, .94); color: #fff; }
.lightbox.is-open { display: block; }
.lightbox__stage { position: absolute; inset: 56px 64px 64px; display: grid; place-items: center; }
.lightbox__media { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
video.lightbox__media { width: 100%; height: 100%; background: #000; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer; }
.lightbox__btn:hover, .lightbox__btn:focus-visible { background: var(--brand); outline: none; }
.lightbox__btn .icon { width: 24px; height: 24px; }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { top: 8px; right: 10px; }
.lightbox__prev { left: 10px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 10px; top: 50%; translate: 0 -50%; }
.lightbox__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 14px; align-items: center; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); font-size: .9rem; }
.lightbox__cap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lightbox__count { color: rgba(255, 255, 255, .65); }
.lightbox__more { color: #fff; font-weight: 700; white-space: nowrap; }
.lightbox__more[hidden] { display: none; }
.attach-gallery__item { cursor: zoom-in; }

@media (max-width: 900px) {
  .gal-detail { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .gal-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .gal-tile { border-radius: 4px; box-shadow: none; }
  .gal-tile__info { display: none; }
  .gal-tile__play { width: 38px; height: 38px; } .gal-tile__play .icon { width: 18px; height: 18px; }
  .gal-tile__dur { right: 4px; top: 4px; font-size: .68rem; }
  .album-row { grid-auto-flow: column; grid-auto-columns: 62%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .album-row > * { scroll-snap-align: start; }
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .album-card__body { padding: 9px 11px 11px; }
  .gal-stage { margin: 0 -16px; border-radius: 0; }
  .gal-stage__img, .gal-stage__video { max-height: 70vh; }
  .gal-nav { width: 38px; height: 38px; }
  .form-panel { padding: 18px 16px; }
  .lightbox__stage { inset: 56px 0 58px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 6px; translate: none; width: 44px; height: 44px; }
  .lightbox__prev { left: auto; right: 62px; }
  .lightbox__next { right: 10px; }
  .lightbox__bar { padding-right: 120px; flex-wrap: wrap; row-gap: 2px; }
  .lightbox__cap { flex-basis: 100%; }
  .media-player { margin-left: -4px; margin-right: -4px; }
  .page-head__actions .btn span { display: none; }
}

/* Video-Umwandlung */
.gal-processing { position: relative; display: grid; justify-items: center; align-content: center; gap: 8px; width: 100%; min-height: 320px; padding: 30px 20px; text-align: center; color: #fff; background: #0c1018 center / cover no-repeat; border-radius: inherit; isolation: isolate; }
.gal-processing::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(8, 12, 20, .72); backdrop-filter: blur(6px); border-radius: inherit; }
.gal-processing span:last-child { max-width: 360px; font-size: .88rem; opacity: .8; }
.gal-processing--sm { min-height: 180px; border-radius: var(--radius-sm); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.gal-warn { position: absolute; top: 0; left: 0; right: 0; z-index: 2; margin: 0; padding: 8px 12px; font-size: .84rem; color: #fff; background: rgba(160, 50, 30, .85); }
.export-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.account-delete fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 600px) { .album-row { scroll-padding-inline: 16px; } }
.prose .bb-h { margin: 1.4em 0 .45em; line-height: 1.25; }
.prose h2.bb-h { font-size: 1.3rem; }
.prose h3.bb-h { font-size: 1.08rem; }
.prose > .bb-h:first-child { margin-top: 0; }

/* ===================== Tiere & Terrarien ===================== */
:root { --warn: #B7791F; --warn-soft: #FCF1DC; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --warn: #E7B45A; --warn-soft: rgba(231, 180, 90, .13); } }
:root[data-theme="dark"] { --warn: #E7B45A; --warn-soft: rgba(231, 180, 90, .13); }

.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.an-card { display: flex; gap: 14px; padding: 12px; text-decoration: none; color: inherit; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.an-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.an-card.is-past { opacity: .7; }
.an-card__photo { position: relative; flex: none; width: 92px; height: 92px; display: grid; place-items: center; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); color: var(--ink-3); }
.an-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.an-card__badge { position: absolute; inset: auto 4px 4px 4px; text-align: center; font: 700 .68rem/1.6 var(--font-body); color: #fff; background: rgba(10, 14, 22, .7); border-radius: 5px; }
.an-card__body { display: grid; align-content: start; gap: 3px; min-width: 0; }
.an-card__name { font-weight: 800; font-size: 1.05rem; }
.an-card__species { font-size: .84rem; color: var(--ink-3); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-card__chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.an-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: .76rem; font-weight: 700; color: var(--ink-2); background: var(--surface-3); }
.an-chip--ok, .an-chip--good { color: var(--success); background: var(--success-soft); }
.an-chip--due, .an-chip--warn { color: var(--warn); background: var(--warn-soft); }
.an-chip--overdue, .an-chip--bad { color: var(--danger); background: var(--danger-soft); }
.an-sex { font-weight: 700; color: var(--ink-3); font-size: .9em; }
.an-sex--f { color: #C2477F; } .an-sex--m { color: #2F6FD3; }
.an-past { margin-top: 22px; } .an-past summary { cursor: pointer; font-weight: 700; color: var(--ink-2); margin-bottom: 12px; }
.empty__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.due-box { padding: 16px 18px; margin-bottom: 18px; border-left: 4px solid var(--warn); }
.due-box__title { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; margin: 0 0 10px; }
.due-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.due-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px dashed var(--line-2); }
.due-list li:first-child { border-top: 0; padding-top: 0; }
.due-list a { text-decoration: none; color: inherit; }

.an-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 16px; }
.an-hero__photo { flex: none; width: 110px; height: 110px; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }
.an-hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.an-hero__photo a { display: block; width: 100%; height: 100%; }
.an-hero__text { flex: 1; min-width: 220px; }
.an-hero__text h1 { margin: 0 0 4px; }
.an-hero__species { margin: 0 0 8px; color: var(--ink-2); }
.an-hero__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: .88rem; color: var(--ink-3); align-items: center; }
.an-hero__meta a { display: inline-flex; gap: 4px; align-items: center; }
.an-hero__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.an-dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.an-box { padding: 16px 18px; }
.an-box__title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 10px; flex-wrap: wrap; }
.an-box__sub { font-size: .88rem; margin: 14px 0 4px; color: var(--ink-2); }
.an-status { display: inline-block; margin: 0 0 10px; padding: 6px 12px; border-radius: 8px; font-weight: 800; background: var(--surface-3); color: var(--ink-2); }
.an-status--ok { background: var(--success-soft); color: var(--success); }
.an-status--due { background: var(--warn-soft); color: var(--warn); }
.an-status--overdue { background: var(--danger-soft); color: var(--danger); }
.an-status--info { background: var(--brand-soft); color: var(--brand); }
.an-kv { display: grid; gap: 0; margin: 0; }
.an-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: .92rem; }
.an-kv div:last-child { border-bottom: 0; }
.an-kv dt { color: var(--ink-3); } .an-kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.an-spark { grid-template-columns: repeat(12, 1fr); height: 150px; }
.spark__label { font-size: .68rem; color: var(--ink-3); }
.an-notes { padding: 14px 18px; margin-bottom: 18px; }
.an-album { margin-bottom: 18px; }
.ter-animals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ter-animals a { text-decoration: none; color: inherit; }

.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gauge { margin: 0; text-align: center; }
.gauge > svg { width: 100%; max-width: 220px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.gauge__track { fill: none; stroke: var(--surface-3); stroke-width: 16; }
.gauge__z { fill: none; stroke-width: 16; }
.gauge__z--good { stroke: var(--success); } .gauge__z--warn { stroke: var(--warn); } .gauge__z--bad { stroke: var(--danger); }
.gauge__needle { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.gauge__hub { fill: var(--ink); }
.gauge figcaption { display: grid; gap: 1px; margin-top: -4px; }
.gauge__label { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: .8rem; color: var(--ink-3); }
.gauge__value { font-size: 1.5rem; font-variant-numeric: tabular-nums; } .gauge__value small { font-size: .8rem; color: var(--ink-3); }
.gauge__eval { font-weight: 800; font-size: .88rem; }
.gauge--good .gauge__eval { color: var(--success); } .gauge--warn .gauge__eval { color: var(--warn); } .gauge--bad .gauge__eval { color: var(--danger); }
.gauge__ideal { font-size: .75rem; color: var(--ink-3); }

.an-log .tabs { margin-bottom: 14px; }
.log-form { padding: 16px 18px; margin-bottom: 14px; display: grid; gap: 12px; }
.log-form__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.log-form__note { grid-column: span 2; }
.log-form .form-actions { margin: 0; }
.log-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.log-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.log-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.log-table tr:last-child td { border-bottom: 0; }
.log-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-table tr.is-refused td { color: var(--ink-3); }
.log-act { width: 1%; }
.log-del { margin: 0; }
.acc { font-weight: 700; } .acc--yes { color: var(--success); } .acc--no { color: var(--danger); } .acc--partial { color: var(--warn); }

.an-form { display: grid; gap: 16px; }
.an-form__photo { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); }
.clim-grid { display: grid; grid-template-columns: 70px repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; font-size: .84rem; }
.clim-grid strong { font-size: .76rem; color: var(--ink-3); }
.clim-grid span { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; }

@media (max-width: 900px) { .an-dash { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .an-grid { grid-template-columns: 1fr; gap: 10px; }
  .an-card__photo { width: 76px; height: 76px; }
  .an-hero { padding: 14px; gap: 14px; }
  .an-hero__photo { width: 84px; height: 84px; }
  .an-hero__text { min-width: 0; flex-basis: calc(100% - 100px); }
  .an-hero__actions { width: 100%; } .an-hero__actions form, .an-hero__actions form .btn { flex: 1; } .an-hero__actions .btn { justify-content: center; }
  .an-hero__actions .btn span { display: inline; }
  .gauge__value { font-size: 1.25rem; }
  .log-form__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .log-form__note { grid-column: 1 / -1; }
  .log-form .form-actions .btn { width: 100%; justify-content: center; }
  /* Tabellen als Karten */
  .log-table thead { display: none; }
  .log-table, .log-table tbody, .log-table tr, .log-table td { display: block; width: 100%; }
  .log-table tr { position: relative; padding: 10px 44px 10px 14px; border-bottom: 1px solid var(--line-2); }
  .log-table tr:last-child { border-bottom: 0; }
  .log-table td { padding: 1px 0; border: 0; text-align: left !important; }
  .log-table td:empty { display: none; }
  .log-table td::before { content: attr(data-l) ": "; color: var(--ink-3); font-size: .8rem; }
  .log-table td:first-child { font-weight: 800; } .log-table td:first-child::before { content: none; }
  .log-act { position: absolute; top: 8px; right: 8px; width: auto !important; }
  .clim-grid { grid-template-columns: 52px repeat(4, minmax(0, 1fr)); gap: 6px; font-size: .78rem; }
  .clim-grid input { padding-left: 6px; padding-right: 6px; }
}

input[type="date"], input[type="time"], input[type="datetime-local"] { min-width: 0; color-scheme: light dark; }
.main-nav__link { white-space: nowrap; }
.log-act::before { content: none !important; }
.log-more { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--line-2); }

/* ---------- Freischaltungen / Konto ---------- */
.approval-list { display: grid; gap: 14px; margin-bottom: 24px; }
.approval { padding: 18px 20px; display: grid; gap: 12px; }
.approval__name { font-size: 1.15rem; margin: 0 0 2px; }
.approval__label { font: 700 .78rem/1 var(--font-body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.approval__reason blockquote { margin: 0; padding: 12px 14px; background: var(--surface-2); border-left: 3px solid var(--brand); border-radius: 6px; white-space: normal; overflow-wrap: anywhere; }
.approval__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.approval__reject { flex: 1 1 260px; }
.approval__reject > summary { list-style: none; display: inline-flex; }
.approval__reject > summary::-webkit-details-marker { display: none; }
.approval__reject[open] > summary { margin-bottom: 10px; }
.auth-card--center { text-align: center; }
.auth-card__icon { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.auth-card__icon .icon { width: 28px; height: 28px; }
.otp-input { font: 600 1.4rem/1 ui-monospace, monospace; letter-spacing: .25em; text-align: center; }
.mt-1 { margin-top: 8px; }
.container-narrow { max-width: 860px; margin: 0 auto; }
.qr-box { display: inline-block; padding: 12px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.qr-box svg, .qr-box img { display: block; width: 200px; height: 200px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font: 600 1rem/1.4 ui-monospace, monospace; padding: 14px 18px; background: var(--surface-2); border-radius: 8px; max-width: 360px; }

/* ---------- Als Mitglied ansehen ---------- */
.imp-bar { background: #b45309; color: #fff; position: sticky; top: 0; z-index: 60; }
.imp-bar__inner { max-width: var(--container, 1200px); margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .92rem; }
.imp-bar__inner > span { flex: 1 1 220px; }
.imp-bar__btn { background: #fff; color: #7c2d12; border-color: #fff; }
.imp-bar__btn:hover { background: #ffedd5; color: #7c2d12; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { color: var(--brand); margin-top: 3px; flex: none; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.imp-list { display: grid; gap: 8px; }
.imp-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.imp-item__who { display: grid; flex: 1 1 160px; min-width: 0; }
.imp-item__who span { overflow: hidden; text-overflow: ellipsis; }
.imp-item__form { display: flex; gap: 8px; flex: 1 1 280px; }
.imp-item__form input { flex: 1; min-width: 0; height: 36px; }
.imp-rules { margin-bottom: 16px; }

/* ---------- Avatar-Zuschnitt ---------- */
.cropper { display: grid; gap: 10px; max-width: 320px; }
.cropper[hidden] { display: none; }
.cropper__stage { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px; touch-action: none; }
.cropper__stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.cropper__stage canvas:active { cursor: grabbing; }
.cropper__stage canvas:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.cropper__ring { position: absolute; inset: 0; pointer-events: none; border-radius: 12px; 
  background: radial-gradient(circle closest-side, transparent 0 calc(100% - 2px), rgba(255,255,255,.9) calc(100% - 2px) 100%, rgba(0,0,0,.45) 100%); }
.cropper__tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cropper__zoom { display: flex; align-items: center; gap: 8px; flex: 1 1 140px; color: var(--ink-3); }
.cropper__zoom input { flex: 1; accent-color: var(--brand); }
.cropper__btns { display: flex; gap: 6px; }
.icon--flip { transform: scaleX(-1); }
.avatar-edit__preview canvas.avatar { border-radius: 50%; }

/* ---------- Benachrichtigungs-Matrix ---------- */
.notify-matrix { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.notify-matrix__head, .notify-matrix__row { display: grid; grid-template-columns: 1fr 92px 92px; align-items: center; gap: 8px; padding: 10px 14px; }
.notify-matrix__head { background: var(--surface-2); font: 700 .8rem/1.2 var(--font-body); color: var(--ink-3); }
.notify-matrix__head span:not(:first-child) { text-align: center; display: inline-flex; gap: 4px; justify-content: center; align-items: center; }
.notify-matrix__row { border-top: 1px solid var(--line); }
.notify-matrix__grp { margin: 0; padding: 8px 14px 4px; border-top: 1px solid var(--line); font: 700 .74rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.notify-matrix__cell { display: grid; place-items: center; min-height: 32px; cursor: pointer; }
.notify-matrix__cell input { width: 20px; height: 20px; accent-color: var(--brand); }
.notify-matrix [data-mail-dep].is-off { opacity: .35; pointer-events: none; }
.radio-row { border: 0; padding: 0; margin: 0 0 0 30px; display: grid; gap: 6px; }
.radio-row.is-off { opacity: .45; pointer-events: none; }
@media (max-width: 560px) {
  .notify-matrix__head, .notify-matrix__row { grid-template-columns: 1fr 58px 58px; padding: 10px; font-size: .92rem; }
  .notify-matrix__head span:not(:first-child) { flex-direction: column; font-size: .72rem; }
}

/* ---------- Zwei-Faktor ---------- */
.twofa__steps { margin: 0; padding-left: 1.3em; display: grid; gap: 14px; }
.twofa__steps .qr-box { margin: 10px 0 6px; }
.twofa__secret { font-size: .95rem; letter-spacing: .05em; word-break: break-all; }
.twofa__confirm { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.twofa__confirm .otp-input { width: 11ch; }
.twofa__actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* nur beim Drucken der Wiederherstellungscodes (Klasse setzt der Drucken-Knopf), nicht bei jeder Seite */
@media print { body.print-codes * { visibility: hidden; } body.print-codes .recovery-codes, body.print-codes .recovery-codes * { visibility: visible; } body.print-codes .recovery-codes { position: absolute; top: 20px; left: 20px; } }

/* ---------- Tiere 3.5: Pfleger, Prognose, Sensor, Schnellerfassung ---------- */
.dropdown__item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .93rem; white-space: nowrap; }
.dropdown__item:hover { background: var(--surface-3); color: var(--ink); }
.dropdown__item .icon { width: 18px; height: 18px; color: var(--ink-3); }
.an-dash--extra { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 16px; }
.carers__list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.carers__list li { display: flex; align-items: center; gap: 8px; }
.carers__list li > a { flex: 1; font-weight: 600; }
.carers__add { display: flex; gap: 8px; }
.carers__add input { flex: 1; min-width: 0; height: 36px; }
.family__kids { margin: 4px 0 0; padding-left: 1.1em; columns: 2; font-size: .92rem; }
.an-forecast { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); color: var(--ink); font-size: .92rem; line-height: 1.4; }
.an-forecast .icon { color: var(--brand); vertical-align: -2px; }
.an-forecast--now { background: var(--warn-soft); }
.an-forecast--now .icon { color: var(--warn); }
.an-forecast--pre { background: var(--warn-soft); }
.an-forecast--late { background: var(--surface-3); }
.an-premolt { margin-top: 10px; }
.reminder-toggle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; font-size: .9rem; color: var(--ink-2); }
.reminder-toggle .icon { color: var(--brand); vertical-align: -2px; }
.transfer-box { border-color: var(--brand-line); }
.sensor-chart-box { margin-top: 16px; }
.sensor-chart { margin: 0; }
.sensor-chart svg { width: 100%; height: auto; display: block; }
.sc-grid { stroke: var(--line); stroke-width: 1; }
.sc-band { fill: color-mix(in oklab, var(--success) 14%, transparent); }
.sc-ax { font: 12px var(--font-body); fill: var(--ink-3); }
.sc-ax--t { fill: #c2410c; } .sc-ax--h { fill: #1d4ed8; }
.sc-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.sc-line--t { stroke: #ea580c; } .sc-line--h { stroke: #2563eb; stroke-dasharray: 5 3; }
.sc-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--ink-2); margin-top: 6px; }
.sc-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sc-item strong { color: var(--ink); }
.sc-key { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.sc-key--t { background: #ea580c; } .sc-key--h { background: #2563eb; } .sc-key--band { height: 10px; background: color-mix(in oklab, var(--success) 25%, transparent); }
.sensor-setup pre { white-space: pre; overflow-x: auto; font-size: .8rem; }
.sensor-key { font-size: .9rem; word-break: break-all; user-select: all; }
.quick { max-width: 480px; margin: 0 auto; display: grid; gap: 14px; }
.quick__head { display: flex; gap: 14px; align-items: center; }
.quick__head h1 { font-size: 1.6rem; margin: 0; }
.quick__photo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.quick__facts { display: grid; gap: 6px; margin: 0; }
.quick__facts div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.quick__facts dt { color: var(--ink-3); }
.quick__facts dd { margin: 0; font-weight: 600; text-align: right; }
.quick__actions { display: grid; gap: 10px; }
.quick__big { min-height: 64px; font-size: 1.15rem; flex-direction: column; gap: 2px; }
.quick__big small { font-weight: 500; font-size: .8rem; opacity: .85; }
.quick__climate { display: flex; gap: 8px; align-items: flex-end; }
.quick__climate label { display: grid; gap: 2px; flex: 1; font-size: .8rem; color: var(--ink-3); }
.quick__climate input { width: 100%; height: 44px; font-size: 1.1rem; }
.quick__animals { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quick__animals li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.quick__animals li > a { flex: 1; display: grid; gap: 4px; color: var(--ink); }
.quick__more { text-align: center; }
body.bare { background: #fff; color: #111; padding: 16px; }
.labels-bar { max-width: 760px; margin: 0 auto 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .92rem; }
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; max-width: 760px; margin: 0 auto; }
.label { display: flex; gap: 12px; align-items: center; border: 1.5px dashed #999; border-radius: 10px; padding: 10px 12px; break-inside: avoid; page-break-inside: avoid; color: #111; background: #fff; }
.label__qr { width: 96px; height: 96px; flex: none; }
.label__qr svg { width: 100%; height: 100%; display: block; }
.label__text { display: grid; gap: 1px; font-size: 12px; line-height: 1.3; min-width: 0; }
.label__name { font-size: 17px; line-height: 1.2; }
.label__text small { color: #666; margin-top: 3px; }
.offline { min-height: 90vh; display: grid; place-items: center; }
@media print { .no-print { display: none !important; } body.bare { padding: 0; } .label { border-color: #bbb; } }
@media (max-width: 560px) { .family__kids { columns: 1; } }
.narrow-panel { max-width: 640px; margin: 0 auto; }
.field-more > summary { cursor: pointer; color: var(--brand); margin-bottom: 8px; }
.timeline { list-style: none; margin: 0 0 16px; padding: 16px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: tl; }
.timeline li { position: relative; padding-left: 30px; display: grid; gap: 2px; font-size: .92rem; }
.timeline li::before { counter-increment: tl; content: counter(tl); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--ink-3); font: 700 .75rem/22px var(--font-body); text-align: center; }
.timeline li.is-done::before { content: '✓'; background: var(--success); color: #fff; }
.timeline span { color: var(--ink-3); }
@media (max-width: 640px) { .timeline { grid-template-columns: 1fr; } }
.editor__animal, .editor__select { position: relative; overflow: hidden; }
.editor__animal select, .editor__select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.bb-animal { display: inline-flex; gap: 12px; align-items: center; max-width: 100%; padding: 8px 14px 8px 8px; margin: 4px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink); text-decoration: none; vertical-align: middle; }
.bb-animal:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--ink); }
.bb-animal__ph { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }
.bb-animal__ph img { width: 100%; height: 100%; object-fit: cover; }
.bb-animal__txt { display: grid; gap: 1px; min-width: 0; font-size: .88rem; line-height: 1.35; }
.bb-animal__txt strong { font-size: 1rem; }
.bb-animal__txt em, .bb-animal__txt span { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.bb-animal--hidden { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--ink-3); font-size: .85rem; }
.bb-species { font-style: italic; }
.species-search { max-width: 340px; flex: 1 1 260px; }
.species-group { margin-bottom: 20px; }
.species-list { display: grid; }
.species-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.species-row:first-child { border-top: 0; }
.species-row:hover { background: var(--surface-2); color: var(--ink); }
.species-row__meta { display: flex; gap: 6px; flex: none; }
.tag--brand { background: var(--brand-soft); color: var(--brand); }
.species-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.species-body { padding: 22px 26px; }
.species-body__foot { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 10px; }
.species-side { display: grid; gap: 16px; }
@media (max-width: 860px) { .species-layout { grid-template-columns: 1fr; } .species-body { padding: 18px; } }
/* ---------- Termine ---------- */
.event-list { display: grid; gap: 10px; }
.event-month { margin: 14px 0 2px; }
.event-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.event-row:hover { border-color: var(--brand-line); color: var(--ink); }
.event-row__main { display: grid; gap: 3px; min-width: 0; }
.event-row__main strong { font-size: 1.05rem; }
.event-row__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.event-date { width: 54px; flex: none; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; padding: 6px 0; line-height: 1; }
.event-date__d { font: 800 1.45rem/1 var(--font-head, var(--font-body)); }
.event-date__m { font: 700 .72rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .04em; }
.event-date--lg { width: 72px; padding: 10px 0; }
.event-date--lg .event-date__d { font-size: 2rem; }
.event-hero { display: flex; gap: 18px; padding: 18px 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.event-hero__text { flex: 1 1 280px; display: grid; gap: 4px; }
.event-hero__text h1 { margin: 4px 0; font-size: 1.6rem; }
.event-hero__text p { margin: 0; }
.event-hero__text .icon { color: var(--brand); vertical-align: -2px; }
.event-hero__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rsvp { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.side-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-events li a { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; }
.side-events li a:hover strong { text-decoration: underline; }
.side-events .event-date { width: 42px; padding: 4px 0; }
.side-events .event-date__d { font-size: 1.1rem; }
/* ---------- Börse ---------- */
.market-filter { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; margin-bottom: 16px; }
.market-filter select, .market-filter input { flex: 1 1 150px; min-width: 0; height: 40px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.an-card__badge.market-badge { inset: 8px auto auto 8px; padding: 0 8px; }
.an-card__badge.market-badge--state { inset: 8px 8px auto auto; padding: 0 8px; }
.market-badge--offer { background: var(--success); color: #fff; }
.market-badge--search { background: #2563eb; color: #fff; }
.market-badge--state { background: rgba(0,0,0,.65); color: #fff; }
.tag.market-badge--offer, .tag.market-badge--search { color: #fff; }
.market-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.market-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.market-photos--edit label { display: grid; gap: 4px; font-size: .85rem; }
.market-kv { margin: 14px 0; }
.market-seller { display: grid; gap: 6px; margin: 0 0 12px; }
.market-manage, .market-manage form { display: flex; gap: 6px; flex-wrap: wrap; }

.aom__card { display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.aom__card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin-bottom: 6px; }
.aom__card em { color: var(--ink-2); font-size: .9rem; }
.aom .side-box__title .icon { color: #f59e0b; }

/* Hauptmenü „Mehr“ */
.main-nav__more { position: relative; flex: none; }
.main-nav__more[hidden] { display: none; }
.main-nav__more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.main-nav__more > summary::-webkit-details-marker { display: none; }
.main-nav__menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); z-index: 80; }
.main-nav__menu .main-nav__link { color: var(--ink); }
.main-nav__menu .main-nav__link .icon { display: inline-block; }
@media (max-width: 900px) { .main-nav__more { display: none !important; } }
@media (min-width: 901px) {
  .main-nav { flex: 1 1 auto; }
  .header-search { flex: 0 1 230px; min-width: 170px; }
}

/* Handy-Kopfzeile: Name des Forums sichtbar, Suche und Hell/Dunkel wandern ins Menü */
.main-nav__mobile-extras { display: none; }
.brand__name--mobile { display: none; }
@media (max-width: 700px) {
  .site-header .brand { flex: 0 1 auto; min-width: 0; gap: 8px; }
  .has-compact .site-header .brand .brand__name { display: block; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  /* Banner-Kopf: Der Name steht groß im Banner (die schmale Leiste darunter zeigt nur das Zeichen) */
  .brand--banner .brand__name, .brand--banner .brand__name--mobile { display: block; font-size: clamp(1.5rem, 7vw, 2rem); line-height: 1.1; overflow-wrap: anywhere; }
  .brand--banner { flex-wrap: wrap; }
  .site-header .brand__mark { width: 32px; height: 32px; font-size: 1.05rem; flex: none; }
  .site-header .brand__logo { max-width: 124px; max-height: 34px; height: auto; width: auto; flex: none; }
  .site-header__inner { gap: 6px; }
  .header-actions { flex: none; }
  .header-actions .search-mobile, .header-actions .theme-toggle { display: none; }
  .user-menu summary > .icon { display: none; }
  .main-nav__mobile-extras { display: grid; gap: 2px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
  .main-nav__mobile-extras button.main-nav__link { background: none; border: 0; font: inherit; font-weight: 700; text-align: left; cursor: pointer; width: 100%; }
}
@media (max-width: 430px) {
  .header-actions .icon-btn { width: 32px; }
  .header-actions .user-menu summary { padding: 2px; }
  .site-header__inner { padding-left: 14px; padding-right: 10px; }
}
@media (max-width: 360px) {
  .has-compact .site-header .brand .brand__name { font-size: .95rem; }
}

/* Lightbox: Bild immer vollständig sichtbar – auch in Safari (iPhone/iPad) */
.lightbox__stage { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lightbox__media { display: block; width: auto; height: auto; flex: none;
  max-width: min(100%, calc(100vw - 128px)); max-height: min(100%, calc(100vh - 120px)); }
@supports (height: 100dvh) { .lightbox__media { max-height: min(100%, calc(100dvh - 120px)); } }
video.lightbox__media { width: min(100%, calc(100vw - 128px)); height: auto; max-height: min(100%, calc(100vh - 120px)); }
@media (max-width: 700px) {
  .lightbox__media { max-width: 100vw; max-height: calc(100vh - 114px); }
  @supports (height: 100dvh) { .lightbox__media { max-height: calc(100dvh - 114px); } }
  video.lightbox__media { width: 100vw; }
}

/* Profilbild mit Ausschnitt (Tiere) */
.crop-field { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
.crop-field__current { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.crop-field__current img, .crop-field__current canvas { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.crop-field__empty { color: var(--ink-3); }
@media (max-width: 560px) { .crop-field { grid-template-columns: 1fr; } }

/* Teilen */
.share-wa .icon { color: #1fa855; }
.an-hero__share { grid-column: 1 / -1; }

/* Einladungslinks */
.invite-list { display: grid; gap: 12px; margin-top: 18px; }
.invite { padding: 16px 18px; display: grid; gap: 8px; }
.invite.is-off { opacity: .65; }
.invite__head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.invite__url { margin: 0; overflow-wrap: anywhere; }
.invite__url code { font-size: .9rem; }
.invite__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag--ok { background: var(--success-soft, #e3f4ea); color: var(--success); }

/* 3.7: Futter, Urlaub, Gesundheit, Wachstum */
.feeder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.feeder { padding: 16px 18px; display: grid; gap: 8px; align-content: start; }
.feeder.is-low { border-color: color-mix(in oklab, var(--danger) 45%, var(--line)); }
.feeder__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.feeder__head h2 { font-size: 1.1rem; margin: 0; }
.feeder__stock strong { font-size: 1.5rem; font-family: var(--font-display); }
.feeder.is-low .feeder__stock strong { color: var(--danger); }
.feeder__quick { display: flex; flex-wrap: wrap; gap: 6px; }
.feeder__edit summary { cursor: pointer; color: var(--ink-3); }
.feeder__edit[open] { display: grid; gap: 10px; }
.away-box { padding: 12px 16px; margin-bottom: 12px; }
.away-box summary { cursor: pointer; display: flex; gap: 6px; align-items: center; font-weight: 700; }
.away-box[open] summary { margin-bottom: 10px; }
.away-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.away-form .field { min-width: 150px; }
.health-list { display: grid; gap: 10px; margin-top: 12px; }
.health { padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.health.is-resolved { opacity: .72; }
.health__photo img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.health__title { font-size: 1rem; margin: 4px 0; }
.health__act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .health { grid-template-columns: auto minmax(0, 1fr); } .health__act { grid-column: 1 / -1; justify-content: flex-start; } }
.growth-molt { stroke: color-mix(in oklab, var(--success) 55%, transparent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.growth-dot--t { fill: #ea580c; } .growth-dot--h { fill: #2563eb; }
.growth-key { width: 2px !important; height: 14px; background: color-mix(in oklab, var(--success) 55%, transparent); }
.mention-list { margin: 0 0 10px; padding-left: 1.1em; display: grid; gap: 4px; }
.ask-list { padding: 8px; display: grid; gap: 2px; }
.ask-list__cat { margin: 10px 10px 4px; font: 700 .75rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ask-list__item { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.ask-list__item:hover { background: var(--surface-2); }

/* Tierärzte */
.vet-filter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; margin-bottom: 16px; padding: 12px; align-items: center; }
@media (max-width: 600px) { .vet-filter { grid-template-columns: 1fr; } }
.vet-list { display: grid; gap: 10px; }
.vet-card { display: flex; justify-content: space-between; gap: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none; flex-wrap: wrap; }
.vet-card:hover { border-color: var(--brand-line); }
.vet-card p { margin: 2px 0 0; }
.vet-card__rating { display: grid; justify-items: end; align-content: start; }
.stars { color: #f59e0b; letter-spacing: 1px; }
.stars--lg { font-size: 1.3rem; }
.star-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 1.8rem; color: var(--line); cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f59e0b; }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Fotowettbewerb */
.contest-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contest-steps li { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 2px; font-size: .9rem; }
.contest-steps li span { color: var(--ink-3); font-size: .82rem; }
.contest-steps li.is-now { border-color: var(--brand); background: var(--brand-soft); }
.contest-steps li.is-done { opacity: .6; }
@media (max-width: 600px) { .contest-steps { grid-template-columns: 1fr; } }
.contest-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.contest-pick__item { position: relative; cursor: pointer; }
.contest-pick__item input { position: absolute; opacity: 0; }
.contest-pick__item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 3px solid transparent; display: block; }
.contest-pick__item input:checked + img { border-color: var(--brand); }
.contest-pick__item input:focus-visible + img { outline: 2px solid var(--brand); }
.contest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.contest-entry { margin: 0; overflow: hidden; display: grid; }
.contest-entry img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.contest-entry figcaption { padding: 10px 12px; display: grid; gap: 4px; justify-items: start; }
.contest-entry.is-winner { border-color: #f59e0b; box-shadow: 0 0 0 2px #f59e0b55; }
.contest-entry.is-voted { border-color: var(--brand); }
.contest-past { display: flex; gap: 12px; flex-wrap: wrap; }
.contest-past__item { display: grid; gap: 6px; width: 140px; color: var(--ink); text-decoration: none; }
.contest-past__item img { width: 140px; height: 105px; object-fit: cover; border-radius: 10px; }

/* ---- Push ---- */
.notify-matrix--3 .notify-matrix__head, .notify-matrix--3 .notify-matrix__row { grid-template-columns: 1fr 84px 84px 84px; }
@media (max-width: 560px) { .notify-matrix--3 .notify-matrix__head, .notify-matrix--3 .notify-matrix__row { grid-template-columns: 1fr 50px 50px 50px; } .notify-matrix--3 .notify-matrix__head { font-size: .72rem; } }
.push-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); display: grid; gap: 10px; }
.push-box p { margin: 0; }
.push-box__state:empty { display: none; }
.push-box__state.is-on { color: var(--ok, #2f7d46); font-weight: 700; }
.push-ios { background: var(--surface); border-left: 3px solid var(--brand); padding: 8px 10px; border-radius: 4px; }
.push-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* ---------- Persönlicher Kalender ---------- */
.cal-item--blue, .cal-pill--blue, .cal-dot--blue, .cal-cat--blue { --c: #2f6fd6; }
.cal-item--red, .cal-pill--red, .cal-dot--red, .cal-cat--red { --c: #d24c3f; }
.cal-item--green, .cal-pill--green, .cal-dot--green, .cal-cat--green { --c: #2f8f4e; }
.cal-item--amber, .cal-pill--amber, .cal-dot--amber, .cal-cat--amber { --c: #c98a0b; }
.cal-item--purple, .cal-pill--purple, .cal-dot--purple, .cal-cat--purple { --c: #8a4fc4; }
.cal-item--teal, .cal-pill--teal, .cal-dot--teal, .cal-cat--teal { --c: #138a8a; }
.cal-item--gray, .cal-pill--gray, .cal-dot--gray, .cal-cat--gray { --c: #7a8088; }
.cal-item--brand, .cal-pill--brand, .cal-dot--brand { --c: var(--brand); }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cal-side { display: grid; gap: 16px; }
.cal-month { padding: 14px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head__title { margin: 0; font-size: 1.35rem; min-width: 9.5em; text-align: center; }
.cal-head__today { margin-left: auto; }
.cal-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cal-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cal-chip span { display: inline-flex; gap: 5px; align-items: center; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--ink-3); user-select: none; }
.cal-chip input:checked + span { background: var(--brand-soft); border-color: var(--brand-line, var(--brand)); color: var(--brand); }
.cal-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--line); gap: 1px; }
.cal-grid__wd { background: var(--surface-2); text-align: center; font: 700 .78rem/1 var(--font-body); padding: 8px 0; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.cal-grid__wd.is-weekend { color: var(--brand); }
.cal-day { background: var(--surface); min-height: 108px; padding: 5px 6px 6px; display: flex; flex-direction: column; gap: 3px; color: var(--ink); text-decoration: none; min-width: 0; position: relative; }
.cal-day:hover { background: color-mix(in oklab, var(--brand) 5%, var(--surface)); color: var(--ink); }
.cal-day.is-weekend { background: color-mix(in oklab, var(--surface-2) 55%, var(--surface)); }
.cal-day.is-out { background: var(--surface-2); }
.cal-day.is-out .cal-day__n { color: var(--ink-3); opacity: .6; }
.cal-day__n { font: 700 .88rem/1 var(--font-body); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-day__n { background: var(--brand); color: #fff; }
.cal-day.is-sel { box-shadow: inset 0 0 0 2px var(--brand); z-index: 1; }
.cal-day__items { display: grid; gap: 2px; min-width: 0; }
.cal-pill { display: block; font-size: .74rem; line-height: 1.25; padding: 2px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in oklab, var(--c) 15%, var(--surface)); color: color-mix(in oklab, var(--c) 70%, var(--ink)); border-left: 3px solid var(--c); }
.cal-pill.is-cont { opacity: .7; }
.cal-more { font-size: .72rem; color: var(--ink-3); padding-left: 4px; }
.cal-day__dots { display: none; gap: 3px; justify-content: center; flex-wrap: wrap; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); display: block; }
.cal-dayview, .cal-agenda { padding: 16px; }
.cal-dayview__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-dayview h2, .cal-agenda h2 { margin: 0; font-size: 1.1rem; }
.cal-agenda h2 { margin-bottom: 8px; }
.cal-agenda__day h3 { margin: 12px 0 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.cal-list { display: grid; gap: 6px; }
.cal-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink);
  background: color-mix(in oklab, var(--c) 9%, var(--surface)); border-left: 4px solid var(--c); }
.cal-item:hover { background: color-mix(in oklab, var(--c) 16%, var(--surface)); color: var(--ink); }
.cal-item__icon { color: var(--c); padding-top: 2px; }
.cal-item__main { display: grid; gap: 2px; min-width: 0; }
.cal-item__title { font-weight: 700; overflow-wrap: anywhere; }
.cal-item__bell { color: var(--ink-3); vertical-align: -1px; }
.cal-item__meta { font-size: .82rem; color: var(--ink-3); }
.cal-abo { padding: 14px 16px; }
.cal-abo summary { cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.cal-abo[open] summary { margin-bottom: 12px; }
.cal-abo__how { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.copy-row { display: flex; gap: 6px; } .copy-row input { flex: 1; min-width: 0; font-size: .8rem; }
.cal-hidden-mine [data-cal-type="mine"], .cal-hidden-rsvp [data-cal-type="rsvp"], .cal-hidden-event [data-cal-type="event"], .cal-hidden-animal [data-cal-type="animal"] { display: none !important; }
.cal-cats { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cal-cats legend { margin-bottom: 6px; }
.cal-cat input { position: absolute; opacity: 0; }
.cal-cat span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 2px solid color-mix(in oklab, var(--c) 40%, var(--line)); font-size: .88rem; font-weight: 600; cursor: pointer; color: color-mix(in oklab, var(--c) 75%, var(--ink)); }
.cal-cat input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.cal-cat input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.cal-form [data-cal-time][hidden] { display: none; }
.cal-delete { margin-top: 12px; display: flex; justify-content: flex-end; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } .cal-side { grid-template-columns: 1fr 1fr; } .cal-abo { grid-column: 1 / -1; } }
@media (max-width: 700px) {
  .cal-side { grid-template-columns: 1fr; }
  .cal-month { padding: 10px 6px; }
  .cal-head__title { font-size: 1.1rem; min-width: 0; flex: 1; }
  .cal-day { min-height: 54px; padding: 4px 2px; align-items: center; }
  .cal-day__items { display: none; }
  .cal-day__dots { display: flex; }
  .cal-grid__wd { font-size: .7rem; }
  .page-head__actions .btn span { display: inline; }
}
.cal-form .field-row { align-items: start; } .cal-form [hidden] { display: none !important; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Eigene Foren-Icons ---------- */
.monogram--img { overflow: hidden; padding: 0; }
.monogram__img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.monogram--img .monogram__dot { z-index: 1; }
.monogram__emoji { font-size: 1.55em; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.monogram--emoji { overflow: visible; }
.monogram--sm .monogram__emoji { font-size: 1.25rem; }
.monogram--lg .monogram__emoji { font-size: 2.4rem; }
.forum-row:not(.is-unread) .monogram--img { filter: none; }
.forum-icon-pick { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px 12px; margin: 0; display: grid; gap: 10px; }
.forum-icon-pick legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }
.forum-icon-pick__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.forum-icon-opt { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .9rem; font-weight: 600; }
.forum-icon-opt input { position: absolute; opacity: 0; }
.forum-icon-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand) 25%, transparent); }
.forum-icon-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.forum-icon-pick__emoji { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.forum-icon-pick__emoji input { width: 90px; font-size: 1.3rem; text-align: center; }
.forum-icon-pick__quick { display: flex; flex-wrap: wrap; gap: 2px; }
.forum-icon-pick__quick button { border: 0; background: none; font-size: 1.35rem; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
.forum-icon-pick__quick button:hover { background: var(--surface-2); }
.forum-icon-pick__img { display: grid; gap: 4px; }
.forum-icon-pick [hidden] { display: none !important; }

/* ---------- Foren-Symbole ---------- */
.monogram__sym { width: 62%; height: 62%; color: #fff; fill: currentColor; filter: drop-shadow(0 1px 0 rgba(0,0,0,.18)); }
.monogram--sm .monogram__sym { width: 68%; height: 68%; }
.forum-icon-pick__sym { display: grid; gap: 8px; }
.forum-icon-pick__search { max-width: 360px; }
.sym-grid { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--surface); }
.sym-grid h4 { margin: 8px 2px 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.sym-grid h4:first-child { margin-top: 0; }
.sym-grid__row { display: flex; flex-wrap: wrap; gap: 4px; }
.sym-btn { width: 44px; height: 44px; border-radius: 10px; border: 2px solid transparent; background: var(--forum, var(--brand)); display: grid; place-items: center; cursor: pointer; padding: 0; }
.sym-btn svg { width: 28px; height: 28px; fill: #fff; color: #fff; }
.sym-btn:hover { filter: brightness(1.12); }
.sym-btn.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.sym-grid__empty { color: var(--ink-3); font-size: .9rem; padding: 6px; }
.site-footer__credit { font-size: .78rem; }
.site-footer__credit a { color: inherit; }
.acp-credits { margin-top: 14px; }

/* ---------- Kurzbefehle & NFC ---------- */
.sc-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sc-box { padding: 18px 20px; display: grid; gap: 12px; }
.sc-box--wide { grid-column: 1 / -1; }
.sc-box h2 { margin: 0; font-size: 1.15rem; display: flex; gap: 8px; align-items: center; }
.sc-box h2 .icon { color: var(--brand); }
.sc-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .94rem; }
.sc-code { font-size: .82rem; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.sc-pre { background: var(--surface-2); padding: 10px 12px; border-radius: 8px; font-size: .8rem; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-more summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.sc-animals { display: grid; gap: 6px; }
.sc-animal { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sc-animal__name { display: grid; }
.btn--xs { padding: 3px 8px; font-size: .78rem; min-height: 0; }
@media (max-width: 860px) { .sc-layout { grid-template-columns: 1fr; } .sc-animal { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Offline-Einträge ---------- */
.offline-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: .3s; z-index: 1000; max-width: min(92vw, 460px);
  background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-pop); text-align: center; }
.offline-toast.is-ok { background: var(--brand); color: #fff; }
.offline-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.offline-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 999; border: 0; cursor: pointer; background: var(--amber, #c98a0b); color: #1b1300;
  padding: 9px 14px; border-radius: 999px; font: 700 .85rem/1.2 var(--font-body); box-shadow: var(--shadow-pop); max-width: 92vw; }
.offline-feed { margin-top: 16px; text-align: left; }
.offline-feed h2 { margin: 0 0 6px; font-size: 1.15rem; }
.offline-feed__list { display: grid; gap: 8px; margin-top: 10px; }
.offline-feed__item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }

/* ---------- Technik-Wartung & Klima-Abgleich ---------- */
.maint-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.maint { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--line); }
.maint--overdue { border-left-color: var(--danger, #d24c3f); background: color-mix(in oklab, var(--danger, #d24c3f) 7%, var(--surface)); }
.maint--due { border-left-color: var(--amber, #c98a0b); background: color-mix(in oklab, var(--amber, #c98a0b) 9%, var(--surface)); }
.maint--soon { border-left-color: var(--amber, #c98a0b); }
.maint--ok { border-left-color: var(--brand); }
.maint__main { display: grid; gap: 2px; min-width: 0; }
.maint__state { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.maint--overdue .maint__state { color: var(--danger, #d24c3f); }
.maint__actions { display: flex; gap: 6px; align-items: flex-start; }
.maint__edit, .maint-add { position: relative; }
.maint__edit > summary, .maint-add > summary { list-style: none; }
.maint__edit > summary::-webkit-details-marker, .maint-add > summary::-webkit-details-marker { display: none; }
.maint__edit[open] { grid-column: 1 / -1; }
.maint__edit[open] .maint-form { margin-top: 10px; }
.maint:has(.maint__edit[open]) { grid-template-columns: 1fr; }
.maint-add[open] > .maint-form { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.maint-ters { margin-top: 12px; }
.an-dash--ter2 { align-items: start; }
.climate-check .cc { border-left: 4px solid var(--line); padding: 6px 0 6px 12px; margin-bottom: 10px; }
.cc--ok { border-left-color: var(--brand) !important; }
.cc--warn { border-left-color: var(--amber, #c98a0b) !important; }
.cc--bad { border-left-color: var(--danger, #d24c3f) !important; }
.cc__head { margin: 0 0 2px; font-weight: 700; }
.cc p { margin: 0 0 4px; }
.cc__notes { margin: 4px 0 0; padding-left: 18px; font-size: .92rem; }
.cc--bad .cc__notes { color: color-mix(in oklab, var(--danger, #d24c3f) 80%, var(--ink)); }
@media (max-width: 600px) { .maint { grid-template-columns: 1fr auto; } .maint__state { grid-column: 1; } .maint__actions { grid-row: 1 / span 2; grid-column: 2; } }

/* ---------- Community-Werte ---------- */
.cs-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cs-table th { text-align: left; font-weight: 700; padding: 4px 8px 4px 0; white-space: nowrap; }
.cs-table td { padding: 4px 6px; }
.cs-table tr + tr { border-top: 1px solid var(--line); }
.cs-bar { position: relative; height: 10px; border-radius: 99px; background: var(--surface-2); margin: 8px 0 10px; }
.cs-bar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--brand); }
.cs-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); }

/* ---------- Abzeichen ---------- */
.badge-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge-chip { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .82rem; border: 1px solid color-mix(in oklab, var(--brand) 25%, transparent); }
.badge-chip span { font-size: 1.05rem; }
.badge-chip.is-private { background: var(--surface-2); color: var(--ink-3); border-style: dashed; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 18px; }
.badge-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; opacity: .6; }
.badge-card.is-earned { opacity: 1; border-color: color-mix(in oklab, var(--brand) 40%, var(--line)); }
.badge-card__icon { font-size: 2rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); filter: grayscale(1); flex: none; }
.badge-card.is-earned .badge-card__icon { filter: none; background: var(--brand-soft); }
.badge-card__text { display: grid; gap: 2px; }

/* ---------- Fahrgemeinschaften ---------- */
.ride-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ride { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ride__who { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.ride-add { margin-top: 10px; }
.ride-add > summary { list-style: none; } .ride-add > summary::-webkit-details-marker { display: none; }
.ride-form { margin: 10px 0; border-top: 1px solid var(--line); padding-top: 10px; }
.ride-kind { display: grid; gap: 4px; }
@media (max-width: 600px) { .ride { grid-template-columns: 1fr auto; } .ride__what { grid-column: 1 / -1; } }

/* ---------- Bestimmungshilfe ---------- */
.id-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip.is-active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line, var(--brand)); }
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.id-card { display: grid; overflow: hidden; padding: 0; color: var(--ink); text-decoration: none; }
.id-card:hover { border-color: var(--brand-line, var(--brand)); color: var(--ink); }
.id-card__img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); display: block; }
.id-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-card__badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font: 700 .75rem/1.3 var(--font-body); background: var(--amber, #c98a0b); color: #1b1300; }
.id-card__badge--solved { background: var(--brand); color: #fff; }
.id-card__img .id-card__badge { position: absolute; top: 8px; left: 8px; }
.id-card__body { display: grid; gap: 3px; padding: 10px 12px 12px; }
.id-head h1 { margin: 8px 0 4px; font-size: 1.6rem; }
.id-photos { display: grid; gap: 8px; margin: 14px 0; }
.id-photos--2, .id-photos--4 { grid-template-columns: 1fr 1fr; }
.id-photos--3 { grid-template-columns: 2fr 1fr; }
.id-photos--3 a:first-child { grid-row: span 2; }
.id-photos img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; border-radius: 10px; display: block; }
.id-photos--1 img { object-fit: contain; background: var(--surface-2); }
.id-sugg { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.id-sugg__item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.id-sugg__item.is-solved { border-color: var(--brand); background: var(--brand-soft); }
.id-sugg__item p { margin: 0; }
.id-sugg__head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.id-sugg__name { font-weight: 700; }
.id-vote { min-width: 56px; }
.id-vote-count { font-weight: 700; font-size: .9rem; color: var(--ink-3); }
.inline-form { display: inline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }
.id-photo-edit { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.id-photo-edit__item { display: grid; gap: 4px; width: 110px; }
.id-photo-edit__item img { width: 110px; height: 82px; object-fit: cover; border-radius: 8px; }

/* ---------- Dokumente ---------- */
.doc-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.doc { display: flex; gap: 8px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.doc__main { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; min-width: 0; }
.doc__main > span:last-child { display: grid; min-width: 0; }
.doc__icon { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: #c0392b; color: #fff; font: 800 .7rem/1 var(--font-body); flex: none; }
.doc__icon .icon { color: #fff; }
.doc-add > summary { list-style: none; } .doc-add > summary::-webkit-details-marker { display: none; }
.doc-form { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }

/* ---------- Stammbaum ---------- */
.tree { overflow-x: auto; padding-bottom: 6px; }
.tree-root { display: flex; justify-content: center; margin-bottom: 14px; }
.tree-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; padding-top: 14px; border-top: 2px solid var(--line); min-width: 0; }
.tree-branch { display: grid; gap: 10px; align-content: start; justify-items: center; min-width: 0; }
.tree-node { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 6px 6px; background: var(--surface); color: var(--ink); text-decoration: none; min-width: 120px; max-width: 220px; }
.tree-node:hover { border-color: var(--brand); color: var(--ink); }
.tree-node img, .tree-node__ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.tree-node > span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.tree-node strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-node--empty, .tree-node--hidden { justify-content: center; text-align: center; border-style: dashed; padding: 8px 10px; background: transparent; }
.tree-kids { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.tree-kids .tree-kids { margin-top: 4px; }
@media (max-width: 700px) { .tree-node { min-width: 0; max-width: none; width: 100%; } .tree-node img, .tree-node__ph { width: 32px; height: 32px; } }

/* ---------- Lightbox: Zoom ---------- */
.lightbox.is-image .lightbox__stage { touch-action: none; }
.lightbox__media { transform-origin: 50% 50%; will-change: transform; user-select: none; -webkit-user-drag: none; }
.lightbox.is-image .lightbox__media { cursor: zoom-in; }
.lightbox.is-zoomed .lightbox__media { cursor: grab; box-shadow: none; border-radius: 0; }
.lightbox.is-zoomed .lightbox__media:active { cursor: grabbing; }
.lightbox__zoom { position: absolute; top: 12px; left: 50%; translate: -50% 0; display: none; gap: 2px; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 3px; z-index: 2; }
.lightbox.is-image .lightbox__zoom { display: flex; }
.lightbox__zbtn { min-width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 700 1.3rem/1 var(--font-body); cursor: pointer; padding: 0 10px; }
.lightbox__zbtn:hover, .lightbox__zbtn:focus-visible { background: var(--brand); outline: none; }
.lightbox__zval { font-size: .85rem; min-width: 64px; }
.lightbox.is-zoomed .lightbox__prev, .lightbox.is-zoomed .lightbox__next, .lightbox.is-zoomed .lightbox__bar { opacity: .25; }
@media (max-width: 700px) { .lightbox__zoom { top: 10px; left: 12px; translate: none; } }

/* ---------- Richtwerte je Art ---------- */
.sp-climate__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sp-climate__v { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.sp-climate__k { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; }
.sp-climate__v strong { font-size: 1.02rem; }
.sp-climate__note { background: var(--brand-soft); padding: 8px 10px; border-radius: 8px; }
.sp-climate__danger { background: color-mix(in oklab, var(--danger, #d24c3f) 10%, var(--surface)); color: color-mix(in oklab, var(--danger, #d24c3f) 80%, var(--ink)); padding: 8px 10px; border-radius: 8px; font-weight: 700; }
.sp-climate p { margin: 6px 0 0; }
.clim-from { margin-bottom: 6px; }
.clim-from select { flex: 1 1 260px; min-width: 0; }

/* ---------- Häutungs-Fotostrecke ---------- */
.molt-strip-box { padding: 14px; margin-bottom: 14px; }
.molt-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.molt-strip__item { flex: 0 0 120px; scroll-snap-align: start; display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.molt-strip__item img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; display: block; }
.molt-strip__item span { display: flex; justify-content: space-between; font-size: .8rem; }
.molt-compare { margin-top: 14px; display: grid; gap: 8px; }
.molt-compare__pick label { display: flex; gap: 6px; align-items: center; font-size: .85rem; font-weight: 700; }
.molt-compare__stage { position: relative; max-width: 560px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); user-select: none; }
.molt-compare__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.molt-compare__top { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.molt-compare__top::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 0; }
.molt-compare__stage input[type=range] { position: absolute; inset: auto 10px 10px; width: calc(100% - 20px); accent-color: var(--brand); z-index: 2; }
.molt-compare__lbl { position: absolute; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font: 700 .75rem/1.4 var(--font-body); }
.molt-compare__lbl--a { left: 8px; } .molt-compare__lbl--b { right: 8px; }

/* ---------- Notfallblatt ---------- */
.emergency { max-width: 900px; margin: 16px auto; background: #fff; color: #111; padding: 24px; border: 3px solid #c0392b; border-radius: 10px; }
.emergency__head { background: #c0392b; color: #fff; margin: -24px -24px 18px; padding: 16px 24px; border-radius: 6px 6px 0 0; }
.emergency__head h1 { margin: 0 0 4px; font-size: 1.9rem; color: #fff; }
.emergency__head p { margin: 0; font-size: 1.05rem; }
.emergency__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 22px; }
.emergency h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 4px; color: #c0392b; }
.emergency h2:first-child { margin-top: 0; }
.emergency p { margin: 0 0 6px; }
.emergency__big { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.emergency__info { white-space: normal; font-size: 1.05rem; }
.emergency__table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.emergency__table th, .emergency__table td { border-bottom: 1px solid #ddd; padding: 5px 6px; text-align: left; vertical-align: top; }
.emergency__table tr.is-danger td { background: #fdecea; font-weight: 600; }
.emergency__foot { display: flex; gap: 14px; align-items: center; margin-top: 18px; border-top: 1px solid #ddd; padding-top: 12px; font-size: .85rem; }
.emergency__qr { width: 96px; height: 96px; flex: none; }
.emergency__qr svg { width: 100%; height: 100%; }
@media (max-width: 700px) { .emergency__grid { grid-template-columns: 1fr; } .emergency { margin: 0; border-radius: 0; } }
@media print { .emergency { border-width: 4px; margin: 0; } .no-print { display: none !important; } }

/* ---------- In der Nähe ---------- */
.nearby-filter { margin-bottom: 14px; }
.nearby-filter label { display: flex; gap: 6px; align-items: center; font-weight: 700; }
.nearby-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nearby-card { padding: 14px; display: grid; gap: 8px; align-content: start; }
.nearby-card p { margin: 0; }
.nearby-card__who { display: flex; gap: 10px; align-items: center; }
.nearby-card__who > div { display: grid; }
.nearby-card__title { margin: 0; font-size: 1.1rem; }
.feeder__offer { display: grid; gap: 6px; }
.feeder__offer details { display: grid; gap: 6px; }
.feeder__offer details[open] input { margin: 6px 0; width: 100%; }

/* ---------- Ratgeber & Einsteiger ---------- */
.guide-filter { margin-bottom: 10px; } .guide-filter input[type=search] { flex: 1 1 240px; min-width: 0; }
.guide-list { display: grid; gap: 10px; }
.guide-list .section-title { margin: 14px 0 0; }
.guide-card { display: grid; gap: 3px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.guide-card:hover { border-color: var(--brand-line, var(--brand)); color: var(--ink); }
.guide-card.is-pinned { border-color: color-mix(in oklab, var(--brand) 40%, var(--line)); background: var(--brand-soft); }
.guide-body .lead { font-size: 1.08rem; color: var(--ink-2); }
.beginner-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 16px; }
.beginner-pick select { flex: 1 1 280px; min-width: 0; }
.beginner-title { margin: 2px 0 10px; }
.checklist { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--ink-3); }
@media print { .site-header, .site-footer, .main-nav, .no-print, .species-side .an-box:last-child { display: none !important; } }

/* ---------- Jahresrückblick ---------- */
.review { max-width: 900px; margin: 0 auto; display: grid; gap: 16px; }
.review__head { background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #000)); color: #fff; border-radius: 18px; padding: 26px 24px; position: relative; }
.review__head h1 { margin: 4px 0 0; font-size: clamp(1.8rem, 5vw, 2.8rem); color: #fff; }
.review__kicker { margin: 0; opacity: .8; font-weight: 700; }
.review__year { position: absolute; top: 18px; right: 18px; }
.review__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.review__tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 2px; }
.review__tile strong { font-size: 2rem; line-height: 1.1; }
.review__tile span:last-child { color: var(--ink-3); font-size: .9rem; }
.review__ic { font-size: 1.5rem; }
.review__line { margin: 0; }
.review__photo { margin: 0; }
.review__photo img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 14px; display: block; }
.review__photo figcaption { color: var(--ink-3); font-size: .9rem; margin-top: 6px; }
.review__share { padding: 14px 16px; display: grid; gap: 8px; }
.review__share p { margin: 0; }
.review__cta { text-align: center; }

/* ---------- Anleitung ---------- */
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.help-toc { padding: 12px; position: sticky; top: 80px; display: grid; gap: 4px; }
.help-search { width: 100%; margin-bottom: 8px; }
.help-toc__cat { margin: 0; } .help-toc__cat a { display: block; padding: 6px 8px; border-radius: 8px; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.help-toc__cat a:hover { background: var(--surface-2); color: var(--brand); }
.help-cat { margin-bottom: 18px; scroll-margin-top: 80px; }
.help-cat .section-title { margin-top: 0; }
.help-item { padding: 0; margin-bottom: 8px; scroll-margin-top: 80px; }
.help-item summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: '+'; color: var(--brand); font-size: 1.2rem; line-height: 1; }
.help-item[open] summary::after { content: '−'; }
.help-item__text { padding: 0 14px 12px; }
.help-item__text p { margin: 0 0 8px; }
.help-item__text code { font-size: .85em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 860px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; grid-template-columns: 1fr 1fr; } .help-search { grid-column: 1 / -1; } }

/* ---------- Module (Administration) ---------- */
.module-list { display: grid; gap: 14px; margin-bottom: 16px; }
.module-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start; padding: 18px 20px; }
.module-card__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }
.module-card__icon .icon { width: 26px; height: 26px; }
.module-card.is-on .module-card__icon { background: var(--brand-soft, var(--surface-3)); color: var(--brand); }
.module-card h2 { font-size: 1.15rem; margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.module-card p { margin: 0 0 6px; }
.tag--ok { background: var(--ok-soft, #dcfce7); color: var(--ok, #166534); }
@media (max-width: 640px) {
  .module-card { grid-template-columns: auto 1fr; }
  .module-card__action { grid-column: 1 / -1; }
  .module-card__action .btn { width: 100%; justify-content: center; }
}

/* ---------- Code-Blöcke: Kopieren ---------- */
.bb-code.has-copy { padding-top: 34px; }
.bb-code[data-lang].has-copy::before { right: auto; left: 12px; top: 10px; }
.bb-code__copy { position: absolute; top: 6px; right: 6px; font: 600 .75rem/1 var(--font-body); padding: 6px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #D5DCE8; cursor: pointer; }
.bb-code__copy:hover { background: rgba(255,255,255,.16); }
.bb-code__copy.is-done { color: #86EFAC; border-color: #86EFAC; }

/* Knopfreihe (z. B. Teilen, Kopieren, Bild speichern) */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row > form { display: contents; }

/* Lizenz */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.license-list { display: grid; gap: 14px; }
.license-card { padding: 18px 20px; display: grid; gap: 14px; border-left: 4px solid var(--line); }
.license-card.is-ok { border-left-color: var(--ok, #16A34A); }
.license-card.is-soft { border-left-color: #F59E0B; }
.license-card.is-bad { border-left-color: var(--danger); }
.license-card__head { display: flex; gap: 14px; align-items: center; }
.license-card__head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.license-card__head p { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.license-card__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft, var(--surface-3)); color: var(--brand); flex-shrink: 0; }
.license-card .sys-list { margin: 0; }
.license-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.license-input { font: 600 1rem/1.2 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; flex: 1 1 320px; min-width: 0; }
.license-offline-link { flex-basis: 100%; text-align: left; }
.license-code { width: 100%; font: .82rem/1.45 var(--font-mono); word-break: break-all; }
.license-grace { background: color-mix(in oklab, #F59E0B 14%, transparent); border-color: color-mix(in oklab, #F59E0B 40%, transparent); }
.steps-list { margin: 0 0 14px; padding-left: 1.3em; display: grid; gap: 6px; }
.module-card__license { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.module-card__license .license-input { flex: 1 1 260px; font-size: .9rem; }
.module-import { display: grid; gap: 14px; margin-top: 18px; }
.module-import form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.module-update { color: var(--brand); font-weight: 700; }
@media (max-width: 640px) {
  .module-card { grid-template-columns: auto 1fr; }
  .module-card__action { grid-column: 1 / -1; }
}

/* Tier-Seite: Messung direkt in der Klima-Karte eintragen */
.an-climate-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.an-climate-add label { display: grid; gap: 2px; flex: 1 1 120px; font-size: .8rem; color: var(--ink-3); }
.an-climate-add input { width: 100%; height: 44px; font-size: 1.05rem; }
.an-climate-add .btn { height: 44px; flex: 1 1 100%; }
@media (min-width: 640px) { .an-climate-add .btn { flex: 0 0 auto; } }

/* Modul-Einstellungen (Administration) */
.module-cfg{margin:.6rem 0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2)}
.module-cfg>summary{cursor:pointer;padding:.55rem .8rem;font-weight:600;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.module-cfg__form{padding:.2rem .9rem .9rem}
.module-cfg__form fieldset{border:0;margin:.5rem 0 .8rem;padding:0}
.module-cfg__form legend{font-weight:600;margin-bottom:.3rem;padding:0}
.module-cfg__form .check{display:flex;gap:.5rem;align-items:flex-start;margin:.25rem 0}
.tag--warn{background:#fdecc8;border-color:#d9a400;color:#6b4a00}

/* E-Mail-Texte (Admin) */
.mailtpl-list{display:grid;gap:.7rem}
.mailtpl{padding:.8rem 1rem}
.mailtpl>summary{cursor:pointer;line-height:1.35}
.mailtpl__form{margin-top:.9rem}
.mailtpl>form+form{margin-top:.6rem}
.mailtpl__text{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9rem;line-height:1.45;width:100%}
.mailtpl__vars{list-style:none;margin:.2rem 0 1rem;padding:0;display:grid;gap:.25rem;font-size:.88rem}
.mailtpl__vars code{background:var(--surface-2);padding:.05rem .35rem;border-radius:4px}
.presets{margin:0 0 1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2);padding:.2rem .8rem .8rem}
.presets>summary{cursor:pointer;font-weight:600;padding:.55rem 0}
.presets__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:.7rem}
.presets__grid--sig{margin:.2rem 0 1rem}
.preset{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:.7rem .8rem;display:flex;flex-direction:column;gap:.4rem}
.preset h4{margin:0;font-size:1rem}
.preset__subj{margin:0;font-size:.86rem}
.preset__body{margin:0;white-space:pre-wrap;word-break:break-word;font:inherit;font-size:.84rem;line-height:1.45;max-height:15rem;overflow:auto;background:var(--surface-2);border-radius:6px;padding:.5rem .6rem;flex:1}
.preset .btn{align-self:flex-start}
.mailtpl__mine{margin-top:1rem;padding-top:.8rem;border-top:1px dashed var(--line)}
.mailtpl__mine label{display:block;font-weight:600;margin-bottom:.4rem}
.mailtpl__mine input{flex:1 1 14rem;min-width:0}
.mailtpl__as{margin-top:1rem;max-width:26rem}
.acp__warn{margin-bottom:1rem}

/* Systemcheck (Admin) */
.syschk__sum{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem;padding:.8rem 1rem}
.syschk{list-style:none;margin:0;padding:0;display:grid;gap:.6rem}
.syschk__row{display:flex;align-items:center;gap:.9rem;padding:.8rem 1rem;border-left:4px solid var(--line)}
.syschk__row--ok{border-left-color:#2f9e5b}.syschk__row--warn{border-left-color:#d99a00}.syschk__row--bad{border-left-color:var(--danger,#c0392b)}
.syschk__dot{flex:none;width:1.8rem;height:1.8rem;border-radius:50%;display:grid;place-items:center;font-weight:700;color:#fff;background:#2f9e5b}
.syschk__row--warn .syschk__dot{background:#d99a00}.syschk__row--bad .syschk__dot{background:var(--danger,#c0392b)}
.syschk__body{flex:1;min-width:0}.syschk__body p{margin:.15rem 0 0;font-size:.92rem;color:var(--muted,#667085);overflow-wrap:anywhere}
@media(max-width:560px){.syschk__row{flex-wrap:wrap}.syschk__row .btn{margin-left:2.7rem}}

/* Mail-Protokoll (Admin) */
.maillog__bar{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center;padding:.8rem 1rem;margin-bottom:1rem}
.maillog__filter{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center;margin-left:auto}
.maillog__filter input[type=search]{min-width:12rem}
.maillog__wrap{padding:0;overflow-x:auto}
.maillog{width:100%;border-collapse:collapse;font-size:.9rem}
.maillog th,.maillog td{padding:.55rem .8rem;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.maillog__bad{background:color-mix(in oklab,var(--danger,#c0392b) 8%,transparent)}
@media(max-width:640px){.maillog thead{display:none}.maillog tr{display:block;border-bottom:1px solid var(--line);padding:.4rem 0}.maillog td{display:block;border:0;padding:.15rem .8rem}.maillog td::before{content:attr(data-l) ": ";font-weight:600;color:var(--muted,#667085)}}

/* Admin-Menü: einklappbare Bereiche */
.acp__sec{margin:0}
.acp__sec>summary.acp__group{display:flex;align-items:center;gap:.4rem;cursor:pointer;list-style:none;margin:6px 0 2px;padding:7px 12px;border-radius:8px;user-select:none}
.acp__sec>summary.acp__group::-webkit-details-marker{display:none}
.acp__sec>summary.acp__group:hover{background:var(--surface-2,rgba(128,128,128,.1))}
.acp__sec>summary.acp__group>span:first-child{flex:1}
.acp__sec>summary.acp__group::after{content:"";width:.45rem;height:.45rem;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s;margin-right:.2rem}
.acp__sec[open]>summary.acp__group::after{transform:rotate(45deg)}
.acp__sec[open]>summary .acp__badge{display:none}

.maillog__queue{padding:1rem;margin-bottom:1rem}
.maillog__queue h2{margin:0 0 .3rem;font-size:1.05rem}
.maillog__qlist{list-style:none;margin:.6rem 0;padding:0;display:grid;gap:.6rem}
.maillog__qlist li{display:flex;gap:.8rem;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:.6rem}
.maillog__qlist form{display:flex;gap:.4rem;flex-wrap:wrap}

.acp__search{width:100%;box-sizing:border-box;margin:0 0 8px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:inherit;font:inherit;font-size:.9rem}
.acp__link[hidden],.acp__sec[hidden]{display:none!important}

/* Tag/Nacht im Klima */
.sc-night{fill:currentColor;opacity:.08}
.sc-band--h{fill:none;stroke:color-mix(in oklab,var(--accent,#0F6A73) 55%,transparent);stroke-width:1;stroke-dasharray:4 3}
.sc-key--night{background:currentColor;opacity:.25}
.gauge__ideal.is-now{font-weight:700}
.clim-grid--night{grid-template-columns:auto 1fr 1fr;max-width:22rem}

.acp__link--sub { margin-left: 22px; font-size: .88rem; font-weight: 600; padding-top: 6px; padding-bottom: 6px; }
.acp__link--sub .icon { width: 15px; height: 15px; }
/* Branding (Medienbibliothek) */
.br-slot { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 14px; margin: 0; min-width: 0; }
.br-slot legend { font-weight: 700; padding: 0 6px; }
.br-pick { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.br-card { flex: 0 0 132px; display: grid; gap: 4px; align-content: start; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 8px; cursor: pointer; position: relative; background: var(--surface); scroll-snap-align: start; }
.br-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.br-card:has(input:checked) { border-color: var(--brand-base); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-base) 25%, transparent); }
.br-card:has(input:focus-visible) { outline: 2px solid var(--brand-base); outline-offset: 2px; }
.br-card__thumb { height: 76px; border-radius: var(--radius-xs); display: grid; place-items: center; overflow: hidden; background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px; }
.br-card__thumb.is-dark { background: #12151C; }
.br-card__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.br-card__name { font-size: .82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-card__meta { font-size: .72rem; }
.br-card--none .br-card__thumb { background: var(--surface-2); color: var(--ink-3); }
.br-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.br-preview__bar { height: 76px; border-radius: var(--radius-sm); display: flex; align-items: center; padding: 0 16px; border: 1px solid var(--line); }
.br-preview__bar--light { background: #fff; color: #222; }
.br-preview__bar--dark { background: #12151C; color: #ddd; }
.br-preview__bar img { max-height: 52px; max-width: 100%; object-fit: contain; }
.br-save { position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--surface) 40%); }
.br-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.br-file { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; display: grid; gap: 6px; align-content: start; }
.br-file__thumb { height: 100px; border-radius: var(--radius-xs); display: grid; place-items: center; overflow: hidden; background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px; }
.br-file__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.br-file__name { display: grid; gap: 4px; }
.br-used { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 640px) { .br-preview { grid-template-columns: 1fr; } .br-card { flex-basis: 120px; } }
