/* ============================================================
   auskotzen.de — Design System v3
   "Warm Catharsis" — modern, warm, kathartisch
   ============================================================ */

@layer reset, base, components, utilities;

/* ── Reset ──────────────────────────────────────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { min-height: 100vh; }
  img, svg { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: none; }
  a { color: inherit; text-decoration: none; }
  ol, ul { list-style: none; }
}

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* Brand */
  --accent:          #ee4d2d;
  --accent-hover:    #d63e1f;
  --accent-press:    #bf3318;
  --accent-soft:     #fff0ec;
  --accent-ring:     rgba(238, 77, 45, 0.18);

  /* Neutrals (warm) */
  --bg:              #faf8f6;
  --bg-elevated:     #ffffff;
  --bg-soft:         #f4f1ee;
  --bg-sunken:       #efebe7;

  --text:            #1c1a19;
  --text-secondary:  #5c5651;
  --text-muted:      #8b837c;
  --text-faint:      #b4aca5;

  --line:            #ece7e2;
  --line-strong:     #ddd5cd;

  --up:              #ee4d2d;
  --down:            #5b73e8;
  --down-soft:       #eef1fd;

  --success:         #1a8a52;
  --success-soft:    #e9f7ef;
  --danger:          #d6403a;
  --danger-soft:     #fdeceb;

  /* Elevation */
  --shadow-sm:  0 1px 2px rgba(28, 26, 25, 0.04), 0 1px 3px rgba(28, 26, 25, 0.06);
  --shadow-md:  0 2px 4px rgba(28, 26, 25, 0.05), 0 4px 12px rgba(28, 26, 25, 0.08);
  --shadow-lg:  0 8px 24px rgba(28, 26, 25, 0.10), 0 2px 6px rgba(28, 26, 25, 0.06);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --header-h: 60px;
  --maxw: 1040px;

  /* Legacy-Aliase (für inline-Styles in HTML) */
  --color-accent: var(--accent);
  --color-text-muted: var(--text-muted);
  --color-text-dim: var(--text-faint);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #16140f;
    --bg-elevated:   #1f1c17;
    --bg-soft:       #26221c;
    --bg-sunken:     #2c2720;
    --text:          #f2ede7;
    --text-secondary:#bdb4aa;
    --text-muted:    #8f867c;
    --text-faint:    #6a625a;
    --line:          #2e2a23;
    --line-strong:   #3a352d;
    --accent-soft:   #3a201a;
    --down-soft:     #20243a;
    --success-soft:  #16271d;
    --danger-soft:   #2e1917;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 2px 8px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 28px rgba(0,0,0,.5);
  }
}

/* ── Base ───────────────────────────────────────────────── */
@layer base {
  body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  ::selection { background: var(--accent-soft); color: var(--accent-press); }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
  }

  main { flex: 1 0 auto; width: 100%; }

  h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
}

@layer components {
  /* ── Header ───────────────────────────────────────────── */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    height: var(--header-h);
  }
  .logo {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.04em;
    flex-shrink: 0;
  }
  .logo span { color: var(--accent); }

  .search-form {
    position: relative;
    flex: 1;
    max-width: 420px;
  }
  @media (max-width: 600px) { .search-form { display: none; } }
  .search-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
  }
  .search-form input[type=search] {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-full);
    background: var(--bg-elevated);
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
  }
  .search-form input::placeholder { color: var(--text-faint); }
  .search-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
    outline: none;
  }

  .header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
  nav[aria-label="Hauptnavigation"] { margin-left: auto; display: flex; }
  nav[aria-label="Hauptnavigation"] .header-actions { margin-left: 0; }

  /* ── Buttons ──────────────────────────────────────────── */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 18px;
    border-radius: var(--r-full);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s, color .15s, transform .08s, box-shadow .15s;
  }
  .btn:active { transform: translateY(1px) scale(0.99); }

  .btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(191,51,24,.3);
  }
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-primary:active { background: var(--accent-press); }

  .btn-outline {
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
    color: var(--text);
  }
  .btn-outline:hover { background: var(--bg-soft); border-color: var(--text-faint); }

  .btn-mod {
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
    color: var(--text-secondary);
    height: 38px;
    padding: 0 14px;
  }
  .btn-mod:hover { background: var(--bg-soft); }
  @media (max-width: 600px) { .btn-mod { display: none; } }

  .btn-block { width: 100%; }

  .avatar-btn {
    width: 38px; height: 38px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, #ffa45c, var(--accent));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: transform .1s, box-shadow .15s;
  }
  .avatar-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

  /* ── Layout ───────────────────────────────────────────── */
  .page { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 48px; }
  .page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .page-grid > * { min-width: 0; } /* verhindert Content-Overflow (min-width:auto) */
  @media (min-width: 900px) {
    .page-grid { grid-template-columns: minmax(0,1fr) 312px; align-items: start; }
  }

  /* ── Cards ────────────────────────────────────────────── */
  .card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
  }
  .sidebar .card + .card { margin-top: 16px; }

  /* ── Toolbar ──────────────────────────────────────────── */
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
  }
  .toolbar-sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; }
  .toolbar-pill {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 15px;
    border-radius: var(--r-full);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    transition: background .15s, color .15s;
  }
  .toolbar-pill:hover { background: var(--bg-soft); color: var(--text); }
  .toolbar-pill.active-sort { background: var(--text); color: var(--bg-elevated); }
  .toolbar-pill.active-cat  { background: var(--accent-soft); color: var(--accent-press); }

  /* ── Post Card ────────────────────────────────────────── */
  .post-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    padding: 16px 18px;
    transition: border-color .15s, box-shadow .15s;
  }
  .post-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
  }
  .post-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    font-size: 12.5px; color: var(--text-muted); margin-bottom: 7px;
  }
  .cat-pill {
    background: var(--accent-soft);
    color: var(--accent-press);
    padding: 2px 10px;
    border-radius: var(--r-full);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .01em;
  }
  .post-author { font-weight: 600; color: var(--text-secondary); }
  .post-meta .dot { color: var(--text-faint); }

  .post-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
  }
  .post-title a { transition: color .12s; }
  .post-title a:hover { color: var(--accent); }

  .post-body-preview {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .post-footer { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
  .comment-count {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  }

  .post-actions { display: flex; gap: 14px; margin-top: 14px; }
  .action-btn {
    font-size: 12.5px; font-weight: 600; color: var(--text-muted);
    transition: color .12s;
  }
  .action-btn:hover { color: var(--text); }
  .action-btn.danger:hover { color: var(--danger); }

  /* ── Vote ─────────────────────────────────────────────── */
  .vote-col {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    user-select: none; padding-top: 2px;
  }
  .vote-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    color: var(--text-faint);
    transition: background .12s, color .12s, transform .08s;
  }
  .vote-btn:hover { background: var(--bg-soft); color: var(--text); }
  .vote-btn:active { transform: scale(0.88); }
  .vote-btn.active-up { background: var(--accent-soft); color: var(--up); }
  .vote-btn.active-down { background: var(--down-soft); color: var(--down); }
  .vote-score { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
  .vote-score.score-up { color: var(--up); }
  .vote-score.score-down { color: var(--down); }

  /* ── Sidebar ──────────────────────────────────────────── */
  .sidebar { display: none; flex-direction: column; gap: 16px; }
  @media (min-width: 900px) { .sidebar { display: flex; position: sticky; top: calc(var(--header-h) + 24px); } }
  .sidebar h4 {
    font-size: 11px; font-weight: 700; letter-spacing: .09em;
    color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px;
  }
  .sidebar ol { display: flex; flex-direction: column; gap: 8px; counter-reset: rule; }
  .sidebar ol li {
    font-size: 13.5px; color: var(--text-secondary); padding-left: 26px; position: relative;
  }
  .sidebar ol li::before {
    counter-increment: rule; content: counter(rule);
    position: absolute; left: 0; top: 1px;
    width: 18px; height: 18px; border-radius: var(--r-full);
    background: var(--accent-soft); color: var(--accent-press);
    font-size: 10.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .cat-list { display: flex; flex-direction: column; }
  .cat-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line);
  }
  .cat-list li:last-child { border-bottom: none; }
  .cat-list a { font-weight: 500; transition: color .12s; }
  .cat-list a:hover { color: var(--accent); }
  .cat-count {
    font-size: 11.5px; font-weight: 600; color: var(--text-muted);
    background: var(--bg-soft); padding: 1px 9px; border-radius: var(--r-full);
  }

  /* ── Empty State ──────────────────────────────────────── */
  .empty-state {
    background: var(--bg-elevated);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--r-lg);
    padding: 64px 28px;
    text-align: center;
  }
  .empty-state::before {
    content: "🫧";
    display: block;
    font-size: 44px;
    margin-bottom: 14px;
  }
  .empty-state p:first-of-type { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
  .empty-state p:last-of-type { font-size: 14px; color: var(--text-muted); }

  .search-info { font-size: 13.5px; color: var(--text-muted); margin-bottom: 14px; }
  .search-info strong { color: var(--text); }
  .search-info a { color: var(--accent); font-weight: 600; }
  .search-info a:hover { text-decoration: underline; }

  #feed .post-card + .post-card { margin-top: 14px; }

  /* ── Forms ────────────────────────────────────────────── */
  .auth-page {
    width: 100%; max-width: 420px; margin: 0 auto;
    padding: 56px 20px; flex: 1;
    display: flex; flex-direction: column; justify-content: center;
  }
  .auth-page .card { padding: 28px; box-shadow: var(--shadow-md); border-radius: var(--r-xl); }
  .auth-title { font-size: 25px; margin-bottom: 6px; }
  .auth-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
  .auth-sub a { color: var(--accent); font-weight: 600; }
  .auth-sub a:hover { text-decoration: underline; }

  .form-group { margin-bottom: 16px; }
  .form-group label {
    display: block; font-size: 12.5px; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
  }
  input[type=text], input[type=email], input[type=password],
  input[type=search], select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    font-size: 14.5px;
    transition: border-color .15s, box-shadow .15s;
  }
  input::placeholder, textarea::placeholder { color: var(--text-faint); }
  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
  }
  textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
  select { cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b837c' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
  }
  .form-hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

  /* Einwilligungs-Checkbox */
  .checkbox-row {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 13px; color: var(--text-secondary); line-height: 1.5;
    cursor: pointer; margin-bottom: 16px;
  }
  .checkbox-row input[type=checkbox] {
    width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0;
    accent-color: var(--accent); cursor: pointer;
  }
  .checkbox-row a { color: var(--accent); font-weight: 600; }
  .checkbox-row a:hover { text-decoration: underline; }

  /* ── Alerts ───────────────────────────────────────────── */
  .alert { padding: 11px 15px; border-radius: var(--r-md); font-size: 13.5px; margin-bottom: 18px; font-weight: 500; }
  .alert-error   { background: var(--danger-soft);  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
  .alert-success { background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }

  /* ── Post Detail ──────────────────────────────────────── */
  .post-detail { max-width: 760px; margin: 0 auto; padding: 24px 20px 48px; }
  .back-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 16px; transition: color .12s;
  }
  .back-link:hover { color: var(--text); }
  .post-full { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 24px; }
  .post-full h1 { font-size: 25px; line-height: 1.25; margin-bottom: 14px; }
  .post-full .body-text { font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; color: var(--text); }

  .comments-section { margin-top: 18px; padding: 24px; }
  .comments-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 18px; }
  #comment-form { margin-bottom: 24px; }

  .comment-box {
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
  }
  #comments-list .comment-box + .comment-box { margin-top: 10px; }
  .comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 5px; }
  .comment-author { font-weight: 600; color: var(--text-secondary); }
  .comment-body { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }

  /* ── New Post / Admin ─────────────────────────────────── */
  .new-post-page { max-width: 680px; margin: 0 auto; padding: 28px 20px 48px; }
  .new-post-page .card { padding: 28px; border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
  .page-title { font-size: 25px; margin-bottom: 6px; }
  .page-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

  .admin-page { max-width: 760px; margin: 0 auto; padding: 28px 20px 48px; }
  .report-card { margin-bottom: 12px; }
  .report-type {
    background: var(--bg-sunken); color: var(--text-secondary);
    padding: 2px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700;
  }
  .report-snippet { font-size: 14.5px; font-weight: 600; margin: 10px 0 12px; }
  .report-snippet a:hover { color: var(--accent); }
  .report-actions { display: flex; gap: 16px; border-top: 1px solid var(--line); padding-top: 12px; }

  /* ── Footer ───────────────────────────────────────────── */
  footer {
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    padding: 24px 20px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-faint);
  }
  footer a { color: var(--text-muted); transition: color .12s; }
  footer a:hover { color: var(--accent); }

  /* ── Loader ───────────────────────────────────────────── */
  .loader {
    text-align: center; padding: 48px; color: var(--text-muted); font-size: 14px;
  }
  .loader::before {
    content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 14px;
    border: 3px solid var(--line-strong); border-top-color: var(--accent);
    border-radius: 50%; animation: spin .7s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
}

@layer components {
  /* ── Consent-Banner ───────────────────────────────────── */
  .consent {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
    max-width: 760px; margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 18px 20px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  }
  .consent[hidden] { display: none; }
  .consent-text { flex: 1; min-width: 240px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
  .consent-text a { color: var(--accent); font-weight: 600; }
  .consent-text a:hover { text-decoration: underline; }
  .consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .consent .btn { height: 36px; padding: 0 16px; font-size: 13px; }
  .btn-ghost { background: none; border: 1px solid var(--line-strong); color: var(--text-secondary); }
  .btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

  /* ── Werbe-/Affiliate-Slots ───────────────────────────── */
  .ad-slot {
    margin: 0 0 14px;
    text-align: center;
    overflow: hidden;
  }
  .ad-slot.in-feed { margin: 14px 0; }
  .ad-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 4px;
    text-align: left;
  }
  .ad-slot img { border-radius: var(--r-sm); display: inline-block; }
  /* Sidebar-Rectangle als Karte */
  .sidebar .ad-slot {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 12px;
  }
  .sidebar .ad-slot .ad-label { text-align: center; }

  /* ── Legal-Seiten Inhalt ──────────────────────────────── */
  .legal-page { max-width: 760px; margin: 0 auto; padding: 28px 20px 48px; }
  .legal-page h1 { font-size: 25px; margin-bottom: 18px; }
  .legal-card { line-height: 1.7; font-size: 14.5px; }
  .legal-card h2 { font-size: 16px; margin: 22px 0 8px; }
  .legal-card h2:first-child { margin-top: 0; }
  .legal-card p { margin-bottom: 10px; color: var(--text-secondary); }
  .legal-card strong { color: var(--text); }
  .legal-note { font-size: 12.5px; color: var(--text-faint); font-style: italic; margin-top: 18px; }
}

/* ── Utilities ──────────────────────────────────────────── */
@layer utilities {
  .visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  /* Kopierschutz für Rechtsseiten (Best-Effort) */
  body[data-protect] .legal-card {
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
    -webkit-touch-callout: none;
  }
}

/* ============================================================
   Premium Layer — Animationen, Micro-Interactions, Mobile
   ============================================================ */
:root {
  --ease:    cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.4, 0, .2, 1);
}

@layer components {
  html { scroll-behavior: smooth; }

  /* Sanfter, warmer Glow am Seitenkopf (premium, dark-mode-sicher) */
  body {
    background-image:
      radial-gradient(900px 420px at 50% -160px,
        color-mix(in srgb, var(--accent) 8%, transparent), transparent);
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  /* Seiten-Eingang */
  main { animation: ak-fade .45s var(--ease) both; }

  /* Feed-Karten: gestaffeltes Einblenden */
  #feed .post-card { animation: ak-up .5s var(--ease) both; }
  #feed .post-card:nth-child(1) { animation-delay: .03s; }
  #feed .post-card:nth-child(2) { animation-delay: .07s; }
  #feed .post-card:nth-child(3) { animation-delay: .11s; }
  #feed .post-card:nth-child(4) { animation-delay: .15s; }
  #feed .post-card:nth-child(5) { animation-delay: .19s; }
  #feed .post-card:nth-child(6) { animation-delay: .23s; }
  #feed .post-card:nth-child(n+7) { animation-delay: .27s; }

  /* Karten-Hover: anheben */
  .post-card { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
  .post-card:hover { transform: translateY(-3px); }

  .card, .empty-state { animation: ak-fade .45s var(--ease) both; }

  /* Premium-Buttons: Verlauf + Lift */
  .btn-primary {
    background: linear-gradient(135deg, #ff6f45 0%, var(--accent) 55%, var(--accent-press) 100%);
    box-shadow: 0 2px 8px rgba(238,77,45,.32), inset 0 1px 0 rgba(255,255,255,.18);
  }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(238,77,45,.4), inset 0 1px 0 rgba(255,255,255,.2); }
  .btn-primary:active { transform: translateY(0); }
  .btn-outline:hover, .btn-mod:hover, .btn-ghost:hover { transform: translateY(-1px); }

  .avatar-btn:hover { transform: translateY(-1px) rotate(-3deg); }
  .logo { transition: transform .2s var(--ease); }
  .logo:hover { transform: scale(1.03); }
  .logo span { display: inline-block; transition: transform .25s var(--ease); }
  .logo:hover span { transform: scale(1.4) rotate(8deg); }

  /* Vote: Pop beim Aktivieren */
  .vote-btn.active-up   { animation: ak-pop .32s var(--ease); }
  .vote-btn.active-down { animation: ak-pop .32s var(--ease); }
  .vote-score { transition: color .15s, transform .15s var(--ease); }

  /* Toolbar-Pills: weicher */
  .toolbar-pill { transition: background .18s, color .18s, transform .12s var(--ease); }
  .toolbar-pill:active { transform: scale(.95); }

  /* Kategorie-Liste: Hover-Slide */
  .cat-list a { display: inline-block; transition: color .15s, transform .15s var(--ease); }
  .cat-list li:hover a { transform: translateX(3px); }

  /* Consent-Banner: hereingleiten */
  .consent { animation: ak-slideup .55s var(--ease) both; }

  /* Inputs: weicher Fokus */
  input, select, textarea { transition: border-color .18s, box-shadow .25s var(--ease), background .18s; }

  /* Loader: eleganter Doppelring */
  .loader::before { animation: spin .7s var(--ease-io) infinite; }

  /* ── Mobile-Feinschliff ─────────────────────────────────── */
  @media (max-width: 600px) {
    .toolbar {
      flex-wrap: nowrap;
      overflow-x: auto;
      scrollbar-width: none;
      border-radius: var(--r-lg);
      -webkit-overflow-scrolling: touch;
    }
    .toolbar::-webkit-scrollbar { display: none; }
    .toolbar-pill { flex: 0 0 auto; }
    .vote-btn { width: 40px; height: 40px; }           /* größere Touch-Targets */
    .vote-col { gap: 1px; }
    .page { padding: 16px 14px 40px; }
    .post-card { padding: 14px; gap: 10px; grid-template-columns: 40px 1fr; }
    .post-full { padding: 18px; grid-template-columns: 40px 1fr; gap: 12px; }
    .post-full h1 { font-size: 21px; }
    .comments-section { padding: 18px; }
    .consent { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
    .consent-actions { width: 100%; }
    .consent-actions .btn { flex: 1; }
    .header-inner { gap: 10px; padding: 0 14px; }
    .btn { padding: 0 14px; }
  }
}

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes ak-fade   { from { opacity: 0; }                              to { opacity: 1; } }
@keyframes ak-up     { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ak-pop    { 0% { transform: scale(.7); } 55% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes ak-slideup{ from { opacity: 0; transform: translateY(120%); } to { opacity: 1; transform: none; } }

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
