/*
 * zoocircle – Gestaltung der Website.
 * Farben, Schriften und Formen stammen aus docs/DESIGN.md. Alle Farben stehen zentral als Variablen in :root –
 * wer eine Farbe ändern will, ändert sie nur dort. Aufbau: Grundlagen → Kopf/Navigation → Buttons → Inhalte →
 * Tierprofile → Forum → Fußzeile → Mobil → Funktionen der einzelnen Versionen (unten, mit Versionsnummer).
 * Achtung: Inline-Styles (style="…") sind durch die Content-Security-Policy verboten – alles gehört in diese Datei.
 */

/* Überschriften-Schrift Fraunces (selbst gehostet, SIL Open Font License – siehe fonts/OFL-Fraunces.txt) */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f4ec;
  --surface: #ffffff;
  --ink: #23302e;
  --muted: #5f6b68;
  --line: #e4dccf;
  --brand: #1f5f5b;
  --brand-dark: #164744;
  --brand-soft: #e3efec;
  --accent: #d9774f;          /* Terrakotta: nur Flächen, Ringe, Punkte – nicht für Text */
  --accent-strong: #a8532f;   /* Terrakotta kräftig: Akzent-Buttons mit weißer Schrift, Akzent-Text (Kontrast 5,3 : 1) */
  --accent-soft: #fbe8de;
  --danger: #b4382f;
  --danger-soft: #fbe4e1;
  --ok-soft: #e2f1e4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 48, 46, .06), 0 6px 20px rgba(35, 48, 46, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(680px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.125rem; color: var(--muted); }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent-strong); margin-bottom: .5em; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; letter-spacing: -.01em; line-height: 1; }
.wm-zoo { color: var(--brand); }
.wm-circle { color: var(--accent-strong); }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a, .main-nav .link-button { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.main-nav a:hover, .main-nav .link-button:hover { background: var(--brand-soft); }
.main-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.main-nav .btn { color: #fff; }
.nav-toggle { display: none; }

/* Buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-small { padding: 6px 14px; font-size: .85rem; }
.btn-large { padding: 14px 26px; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8f2c25; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.inline-form { display: inline; }

/* Main */
.site-main { padding: 32px 0 64px; min-height: 60vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .lead { margin-bottom: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.empty { text-align: center; padding: 40px 24px; }
.badge { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; margin: 0; }
.badge-warn { background: var(--accent-soft); color: #8a4122; }
.notice { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; font-size: .9rem; }
.hint-card { background: var(--brand-soft); border-color: transparent; box-shadow: none; }

/* Flash messages */
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; }
.flash-success { background: var(--ok-soft); }
.flash-info { background: var(--brand-soft); }
.flash-error { background: var(--danger-soft); }

/* Forms */
.form .field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field fieldset, fieldset.field { border: 0; padding: 0; margin: 0 0 18px; }
.req { color: var(--accent-strong); }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fffdfa; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; }
.checkbox label, .radio { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.checkbox input, .radio input { margin-top: 5px; accent-color: var(--brand); }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .875rem; margin: 6px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.danger-zone { border-color: #efc9c4; }

/* Hero */
.hero { background: linear-gradient(160deg, #fbf7f0 0%, #f1e7d6 100%); border-bottom: 1px solid var(--line); margin: -32px 0 40px; padding: 64px 0; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-visual { margin: 0; }
.hero-visual img { display: block; width: 100%; height: auto; }
.hero h1 { line-height: 1.05; }
.hero-sub { display: block; font-size: .5em; color: var(--ink); margin-top: .35em; line-height: 1.2; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.feature { padding: 8px 4px; }
.feature h2 { font-family: var(--serif); font-size: 1.35rem; }
.callout-card, .provider { display: grid; grid-template-columns: 1.4fr auto; gap: 24px; align-items: center; }
.callout-card { background: var(--brand); color: #fff; border: 0; }
.callout-card .eyebrow { color: #f8d3bf; }
.callout-card .btn { background: #fff; color: var(--brand-dark); }
.provider { grid-template-columns: 1fr 1fr; align-items: start; }

/* Pets */
.pet-grid { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.pet-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 16px; margin: 0; }
.pet-card h2, .pet-card h3 { margin-bottom: .2em; }
.pet-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.pet-actions form { margin: 0; }
.pet-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; background: var(--brand-soft); color: var(--brand-dark); flex: none; font-family: var(--serif); }
/* Tierart-Farben für Avatare ohne Foto (DESIGN.md 3.2) */
.pet-g-hunde { background: #e3efec; color: #164744; }
.pet-g-katzen { background: #fbe8de; color: #8a4122; }
.pet-g-klein { background: #f6ebd3; color: #7a5a1e; }
.pet-g-voegel { background: #e8ecf8; color: #33437a; }
.pet-g-wasser { background: #e3f1ee; color: #1f5f5b; }
.pet-g-hof { background: #efe6da; color: #5c4632; }

/* Forum */
.category-list, .article-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 14px; }
.category a, .article-list a { text-decoration: none; color: inherit; }
.category h2, .article-list h2 { color: var(--brand); margin-bottom: .25em; }
.category { margin: 0; }
.category .muted { margin-bottom: .5em; }
.category-meta { margin: 0; }
.thread-list { list-style: none; padding: 0; }
.thread-row { padding: 14px 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.thread-row:last-child { border-bottom: 0; }
.thread-list.card { padding: 0; }
.thread-title { font-weight: 600; text-decoration: none; }
.is-hidden { opacity: .65; }
.posts { list-style: none; padding: 0; margin: 0 0 16px; }
.post-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.post-author { font-weight: 700; text-decoration: none; }
.post-body { overflow-wrap: anywhere; }
.post-actions { display: flex; gap: 16px; justify-content: flex-end; margin-top: 8px; }
.mod-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.pagination { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 16px 0; }
.report blockquote { background: var(--bg); margin: 0 0 12px; padding: 12px 16px; border-radius: 8px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Article text */
.prose h2 { margin-top: 1.6em; font-family: var(--serif); font-size: 1.4rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 6px 16px; flex-wrap: wrap; min-width: 0; }

/* Mobil */
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); border: 0; border-radius: 8px; padding: 8px 14px; font: 600 .95rem var(--font); cursor: pointer; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .main-nav .btn { text-align: center; margin-top: 6px; }
  .hero { padding: 40px 0; }
  .hero-inner, .features, .callout-card, .provider, .field-row { grid-template-columns: 1fr; }
  .card { padding: 18px; }
}

/* Nachrichten & Gassi (Version 2) */
.count-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-strong); color: #fff; font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; }
.plain-link { color: inherit; text-decoration: none; }
.conversation-list { list-style: none; padding: 0; }
.conversation-list.card { padding: 0; }
.conversation-row { border-bottom: 1px solid var(--line); }
.conversation-row:last-child { border-bottom: 0; }
.conversation-row a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 20px; color: inherit; text-decoration: none; }
.conversation-row a:hover { background: var(--bg); }
.conv-name { font-weight: 600; }
.conv-preview { grid-column: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conv-date { grid-column: 2; grid-row: 1; }
.is-unread .conv-name, .is-unread .conv-preview { color: var(--ink); font-weight: 700; }
.chat { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 80%; display: flex; flex-direction: column; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; }
.bubble { padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.mine .bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-bottom-right-radius: 4px; }
.theirs .bubble { border-bottom-left-radius: 4px; }
.chat-meta { margin-top: 3px; }
.partner-card h2 { margin-bottom: 0; }
.mini-pets { list-style: none; padding: 0; margin: 0 0 14px; }
.mini-pets li { padding: 3px 0; }
@media (max-width: 980px) and (min-width: 821px) { .main-nav a, .main-nav .link-button { padding: 8px 8px; font-size: .9rem; } }

/* Tierprofile, Beiträge, Stories (Version 3) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img.pet-avatar { object-fit: cover; display: block; padding: 0; }
.avatar-small { width: 36px; height: 36px; font-size: .95rem; }
.avatar-large { width: 112px; height: 112px; font-size: 2.6rem; }
.has-story { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent); }
.pet-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.pet-hero h1 { margin-bottom: .2em; }
.pet-hero .badge { margin-left: 6px; vertical-align: middle; }
.facts summary { cursor: pointer; }
.fact-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 24px; margin: 16px 0 0; }
.fact-list dt { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fact-list dd { margin: 0; font-weight: 600; }
.composer { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.composer h2 { font-size: 1.05rem; }
.btn-accent { background: var(--accent-strong); }
.btn-accent:hover { background: #8c4325; }
.section-title { margin-top: 8px; font-family: var(--serif); font-size: 1.5rem; }
.story-note a { font-weight: 700; color: var(--accent-strong); text-decoration: none; }
.post-card { padding: 0; overflow: hidden; }
.post-card > * { margin-left: 20px; margin-right: 20px; }
.post-card > .post-image { margin: 0; width: 100%; max-height: 720px; object-fit: contain; background: #f1ece2; display: block; }
.post-card > .post-body { margin-top: 14px; }
.post-card-head { padding-top: 14px; padding-bottom: 12px; }
.post-card .badge { margin-top: 14px; }
.post-card .post-actions { display: flex; align-items: center; gap: 16px; padding: 12px 0 14px; margin-top: 0; }
.post-card .post-actions form { margin: 0; }
.spacer { flex: 1; }
.pet-chip { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.upload-preview { display: block; max-width: 160px; max-height: 160px; border-radius: 10px; margin-top: 10px; object-fit: cover; }
.avatar-current { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.toggles .radio { margin-bottom: 8px; }
.form h2 { margin-top: 8px; font-size: 1.1rem; }
.form h2:not(:first-of-type) { padding-top: 14px; border-top: 1px solid var(--line); }
.account-type { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font-weight: 400; }
.choice.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.choice.is-disabled { opacity: .7; }
.choice input { margin-top: 5px; accent-color: var(--brand); }

.story-bar { display: flex; gap: 16px; overflow-x: auto; padding: 8px 4px 16px; margin-bottom: 8px; scrollbar-width: thin; }
.story-bubble { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); flex: none; width: 72px; }
.story-bubble .pet-avatar { width: 60px; height: 60px; }
.story-bubble.add .plus { position: absolute; top: 42px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--bg); line-height: 1; }
.story-name { font-size: .78rem; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.story-viewer { display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.story-frame { position: relative; width: min(440px, 100%); aspect-ratio: 9 / 16; max-height: 80vh; background: #111; border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.story-image { width: 100%; height: 100%; object-fit: contain; }
.story-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.story-progress span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); }
.story-progress span.done { background: #fff; }
.story-head { position: absolute; top: 20px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; z-index: 2; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.story-head .pet-chip { color: #fff; }
.story-close { color: #fff; text-decoration: none; font-size: 1.3rem; padding: 4px 8px; }
.story-caption { position: absolute; bottom: 18px; left: 16px; right: 16px; margin: 0; padding: 10px 14px; background: rgba(0,0,0,.55); color: #fff; border-radius: 12px; text-align: center; }
.story-nav { position: absolute; top: 0; bottom: 0; width: 35%; display: flex; align-items: center; color: rgba(255,255,255,.85); text-decoration: none; font-size: 2.4rem; padding: 0 10px; z-index: 1; }
.story-nav.prev { left: 0; justify-content: flex-start; }
.story-nav.next { right: 0; justify-content: flex-end; }
.story-actions { display: flex; gap: 18px; margin-top: 12px; }
.story-actions form { margin: 0; }
.report-image { max-width: 260px; max-height: 260px; border-radius: 10px; display: block; margin-bottom: 10px; }

@media (max-width: 820px) {
  .composer { grid-template-columns: 1fr; }
  .pet-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .post-card > * { margin-left: 16px; margin-right: 16px; }
}

/* Versionsanzeige für Admins (Version 3.1) */
.admin-version { font-size: .8rem; background: var(--brand-soft); color: var(--brand-dark); padding: 2px 10px; border-radius: 999px; }

/* ==== Version 3.2: Pfote hoch, Kommentare, Circle, Admin, Cookie-Hinweis ==== */

/* Symbole */
.icon { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.icon-small { width: 18px; height: 18px; }

/* „… hoch“-Reaktion (Symbol passend zur Tierart) */
.post-social { display: flex; align-items: center; gap: 12px; padding-top: 12px; flex-wrap: wrap; }
.react-form { margin: 0; }
.react-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); font: 700 .9rem var(--font); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.react-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.react-btn.is-on { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.react-btn.is-on .react-icon { fill: currentColor; }
.react-btn.rx-huf.is-on .react-icon, .react-btn.rx-fluegel.is-on .react-icon, .react-btn.rx-schlange.is-on .react-icon { fill: none; }
.react-btn.is-bouncing .react-icon { animation: hop .35s ease-out; }
.react-btn.rx-schlange.is-bouncing .react-icon { animation: hiss .5s ease-out; }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-5px) scale(1.15); } 100% { transform: none; } }
@keyframes hiss { 0%, 100% { transform: none; } 20% { transform: translateX(-2px) rotate(-6deg); } 40% { transform: translateX(2px) rotate(6deg); } 60% { transform: translateX(-2px) rotate(-4deg); } 80% { transform: translateX(1px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .react-btn.is-bouncing .react-icon { animation: none; } }
.comment-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.comment-link:hover { color: var(--brand); }

/* Kommentare */
.comments { list-style: none; padding: 12px 0 0; margin-top: 12px; margin-bottom: 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.comment { overflow-wrap: anywhere; }
.comment-author { font-weight: 700; text-decoration: none; margin-right: 6px; }
.comment-meta { display: block; margin-top: 2px; }
.comment-form { display: flex; gap: 8px; padding: 12px 0 0; margin-top: 0; margin-bottom: 0; }
.comment-form input { flex: 1; border-radius: 999px; }
.post-card > .post-actions { border-top: 1px solid var(--line); margin-top: 12px; }

/* Circle (folgen) */
.circle-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pet-hero .circle-row { justify-content: flex-start; }
.circle-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.circle-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }

/* Reiter (Circle-Funk, Admin) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; border-radius: 10px 10px 0 0; text-decoration: none; color: var(--muted); font-weight: 600; margin-bottom: -1px; border: 1px solid transparent; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--brand-dark); border-color: var(--line); border-bottom-color: var(--surface); }

/* Leere Seiten / Fehler */
.empty-illu { display: block; margin: 0 auto 12px; }

/* Häufige Fragen (Startseite) */
.faq { margin-bottom: 40px; }
.faq-item { padding: 16px 20px; margin-bottom: 10px; }
.faq-item summary { cursor: pointer; font-weight: 700; }
.faq-item p { margin: 10px 0 0; }

/* Wissensartikel */
.article-meta .badge { margin-right: 6px; }
.article-list .badge { margin-bottom: 8px; }
.article-list .muted { margin: 0; }
.form-hint { margin: -8px 0 18px; }

/* Cookie-Hinweis – beide Knöpfe gleich groß und gleich auffällig */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 760px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(35, 48, 46, .18); padding: 16px 20px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-banner p { margin: 0; flex: 1 1 300px; font-size: .95rem; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-actions .btn { min-width: 140px; }

/* Admin */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); margin: 0; }
a.kpi:hover { border-color: var(--brand); }
.kpi-value { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand-dark); line-height: 1.1; }
.kpi-label { font-weight: 600; }
.kpi-alert .kpi-value { color: var(--accent-strong); }
.admin-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.admin-links a { text-decoration: none; color: var(--ink); margin: 0; }
.admin-links a:hover { border-color: var(--brand); }
.admin-links h2 { color: var(--brand); }
.stats-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stats-cols-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stats-cols .card h3 + * { margin-top: 0; }
.stats-cols .card h3:not(:first-child) { margin-top: 18px; }
.bar-list, .funnel { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bar-list li, .funnel li { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(60px, 1.4fr) 9.5em; gap: 10px; align-items: center; font-size: .9rem; }
.funnel li { grid-template-columns: minmax(150px, 1fr) minmax(60px, 1.6fr) 15em; }
.bar { width: 100%; height: 12px; display: block; }
.bar rect { fill: var(--brand); }
.funnel .bar rect { fill: var(--accent); }
.bar-value { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.top-list { margin: 0; padding-left: 1.4em; font-size: .9rem; }
.top-list li { padding: 3px 0; }
.top-list li { display: list-item; }
.top-list li > span:first-child { display: inline-block; max-width: calc(100% - 60px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.top-list .num { float: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.delta { font-size: .85rem; font-weight: 700; }
.delta-up { color: #2f7a3b; }
.delta-down { color: var(--danger); }
.delta-flat { color: var(--muted); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar-views { fill: #b9d6d1; }
.chart .bar-visitors { fill: var(--brand); }
.legend { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.key-views { background: #b9d6d1; }
.key-visitors { background: var(--brand); margin-left: 12px; }
.period-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.period-form input[type=date] { width: auto; min-height: 36px; padding: 6px 10px; }
.table-wrap { overflow-x: auto; padding: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr.is-suspended td { background: #fdf3ef; }
.suspend summary { list-style: none; display: inline-block; }
.suspend summary::-webkit-details-marker { display: none; }
.suspend-form { display: grid; gap: 6px; margin-top: 8px; min-width: 220px; }
.suspend-form label { font-weight: 600; font-size: .85rem; }
.search-form .btn { margin-top: 4px; }
.footer-brand { font-family: var(--serif); font-weight: 600; color: var(--brand); }

@media (max-width: 820px) {
  .stats-cols { grid-template-columns: 1fr; }
  .bar-list li, .funnel li { grid-template-columns: 1fr auto; }
  .bar-list .bar, .funnel .bar { grid-column: 1 / -1; grid-row: 2; }
  .hero-visual { display: block; max-width: 420px; margin: 8px auto 0; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
  .react-label { font-size: .85rem; }
}

/* ===== 3.3: Verwaltung mit Menü links, Editor, Redaktionssystem, Abzeichen ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap-wide { width: min(1320px, 100% - 32px); margin-inline: auto; }
.nowrap { white-space: nowrap; }

/* Hinweisbanner (Einstellungen → Website) */
.site-banner { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; font-size: .92rem; padding: 8px 0; text-align: center; border-bottom: 1px solid var(--line); }
.site-banner-warn { background: var(--accent-soft); color: #7a3a1d; }

/* Rahmen der Verwaltung: Menü links, Inhalt rechts */
.site-main-admin { padding-top: 20px; }
.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-sidebar { position: sticky; top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 10px 14px; }
.admin-sidebar > summary { list-style: none; cursor: default; font-weight: 700; padding: 6px 10px 2px; }
.admin-sidebar > summary::-webkit-details-marker { display: none; }
.admin-sidebar > summary .muted { display: none; }
.admin-nav-group { margin: 14px 10px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.admin-sidebar ul { list-style: none; margin: 0; padding: 0; }
.admin-sidebar a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; text-decoration: none; color: var(--ink); font-size: .94rem; }
.admin-sidebar a:hover { background: var(--bg); }
.admin-sidebar a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.admin-main { min-width: 0; }
.admin-main > .admin-page > h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.narrow-page { max-width: 760px; }
.admin-split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.email-list a[aria-current="page"] { font-weight: 700; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.role-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.input-narrow { width: 5em; }
.filter-form { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.field-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0 18px; }
.field-group > summary { cursor: pointer; font-weight: 600; }
.field-group[open] > summary { margin-bottom: 12px; }
.preview-thumb { display: block; max-width: 280px; max-height: 160px; border-radius: 10px; margin: 6px 0; object-fit: cover; }
.faq-edit { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; margin: 0 0 14px; display: grid; gap: 4px; }
.faq-edit input, .faq-edit textarea { width: 100%; }
.revisions { margin-top: 20px; }
.revisions > summary { cursor: pointer; font-weight: 600; }
.mail-preview { white-space: pre-wrap; font: .9rem/1.5 var(--font); background: var(--bg); padding: 12px; border-radius: 10px; margin: 0; }
.status-draft { background: #eee9df; color: var(--muted); }
.status-submitted { background: var(--accent-soft); color: #8a4122; }
.status-published { background: var(--ok-soft); color: #23562b; }
.badge-soft { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 900px) {
  .admin-shell, .admin-split { grid-template-columns: 1fr; gap: 14px; }
  .admin-sidebar { position: static; }
  .admin-sidebar > summary { cursor: pointer; list-style: revert; }
  .admin-sidebar > summary .muted { display: inline; }
  .admin-sidebar:not([open]) { padding-bottom: 10px; }
}

/* Editor */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--bg); }
.editor-toolbar[hidden] { display: none; }
.editor-toolbar:not([hidden]) + .editor-text, .editor-toolbar:not([hidden]) ~ .editor-preview { border-top-left-radius: 0; border-top-right-radius: 0; }
.editor-btn { min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: 600 .85rem/1 var(--font); cursor: pointer; }
.editor-btn:hover { border-color: var(--brand); }
.editor-btn[data-cmd="bold"] { font-weight: 800; }
.editor-btn[data-cmd="italic"] { font-style: italic; }
.editor-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.editor-spacer { flex: 1; }
.editor-text { width: 100%; font: .95rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.editor-preview { border: 1px solid var(--line); border-radius: 0 0 10px 10px; padding: 8px 18px; background: var(--surface); min-height: 200px; max-height: 70vh; overflow: auto; }
.editor-help { margin-top: 8px; }
.editor-help > summary { cursor: pointer; color: var(--brand); }
.editor-help code { white-space: nowrap; }

/* Inhalte aus dem Redaktionssystem */
.prose .notice { margin: 1em 0; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--brand-soft); color: var(--muted); }
.prose h2[id], .prose h3[id] { scroll-margin-top: 16px; }
.placeholder-missing { background: #fff3a8; color: #6b5300; padding: 0 4px; border-radius: 4px; font-size: .9em; }
.page-updated { margin-top: 2.5em; border-top: 1px solid var(--line); padding-top: 12px; }
.article-image { margin: 0 0 1.4em; }
.article-image img { display: block; width: 100%; border-radius: var(--radius); }
.article-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.author-box { display: flex; gap: 16px; align-items: center; margin: 2em 0 1em; }
.author-box p { margin: 0; }
.author-photo { border-radius: 50%; object-fit: cover; width: 72px; height: 72px; flex: none; }
.author-photo-lg { width: 120px; height: 120px; }
.author-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero-photo { border-radius: 28px; aspect-ratio: 14 / 11; object-fit: cover; }
.footer-social { display: flex; gap: 14px; flex-wrap: wrap; }

/* Abzeichen neben Namen (DESIGN.md): Berufe terrakotta, Autor:in petrol – nur vom System gesetzt */
.name-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; margin-left: 4px; }
.badge-pro { background: var(--accent-soft); color: #8a4122; border: 1px solid #f1c7b1; text-decoration: none; font-weight: 700; }
.badge-pro::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: 1px; }
.badge-author { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
a.badge-pro:hover, a.badge-author:hover { text-decoration: underline; }
h1 .name-badges { font-size: 1rem; font-family: var(--font); }
.post-card-head .name-badges { margin: 0 0 0 auto; }

/* Nachweise (Tier-Fachleute) */
.certificate-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 14px; }
.certificate-list li { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.certificate-list img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.check-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 20px; }
.check-columns-compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check-columns p { margin: 8px 0 2px; }
#fachleute h3 { margin-top: 24px; } #fachleute form + h3, #fachleute .btn-small { margin-top: 8px; }

/* ===== 3.4: Teilen & Einladen ===== */
.share-box { display: grid; gap: 10px; margin: 8px 0 14px; }
.share-box .share-native[hidden], .share-box .share-copy[hidden] { display: none; }
.share-native { justify-self: start; }
.share-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.share-link { margin: 0; }
.share-link label { display: flex; gap: 8px; align-items: center; }
.share-url { flex: 1; min-width: 0; font-size: .85rem; }
.share-preview { display: flex; gap: 14px; align-items: center; }
.share-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; }
.share-preview p { margin: 4px 0 0; }
.share-details > summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.share-details[open] > summary { margin-bottom: 10px; }
.share-link-post { display: inline-flex; align-items: center; gap: 4px; }
.public-post .pet-chip { display: inline-flex; align-items: center; gap: 10px; }
.public-post-meta { padding: 0 18px 14px; margin: 0; }
.public-cta { margin-top: 18px; }
.public-cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.invite-landing { padding: 36px 24px; }
.invite-landing img { display: block; margin: 0 auto 12px; }
.invite-text > summary { cursor: pointer; color: var(--brand); margin-top: 8px; }
.footer-inner nav a { white-space: nowrap; }
