/* Witze und Witze – Stylesheet (mobile first) */

:root {
  --bg: #fffaf0;
  --bg-2: #fff3d6;
  --surface: #ffffff;
  --ink: #1f1b3a;
  --muted: #625e7c;
  --border: #ece4cf;
  --brand: #4f46e5;
  --brand-2: #6d5cf6;
  --brand-ink: #ffffff;
  --brand-soft: #eeedff;
  --accent: #65a30d;
  --sun: #ffd43b;
  --ok: #15803d;
  --ok-soft: #e7f8ec;
  --err: #b91c1c;
  --err-soft: #fdecec;
  --shadow: 0 1px 2px rgba(31, 27, 58, .06), 0 6px 20px rgba(31, 27, 58, .06);
  --radius: 18px;
  --radius-sm: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14121f;
    --bg-2: #1c1930;
    --surface: #1f1c31;
    --ink: #f2f0ff;
    --muted: #aaa5c8;
    --border: #312c4b;
    --brand: #8f88ff;
    --brand-2: #a59fff;
    --brand-ink: #14121f;
    --brand-soft: #2a2650;
    --accent: #a3e635;
    --ok: #4ade80;
    --ok-soft: #133222;
    --err: #f87171;
    --err-soft: #3a1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  overflow-x: hidden;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem); margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px;
}
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.icon { flex: none; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 10px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.logo-icon { width: 40px; height: 40px; flex: none; transition: transform .3s; }
.logo:hover .logo-icon { transform: rotate(-12deg) scale(1.05); }
.logo-text { font: 800 clamp(1.05rem, .8rem + 1.4vw, 1.25rem)/1 var(--font-head); white-space: nowrap; letter-spacing: -.02em; }
.logo-text em { font-style: normal; color: var(--accent); }
.header-search { display: none; }
.header-search, .drawer-search, .hero-search { position: relative; }
.header-search input, .drawer-search input, .hero-search input {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--border); border-radius: 999px;
  padding: 10px 48px 10px 18px; transition: border-color .2s, box-shadow .2s;
}
.header-search input:focus, .drawer-search input:focus, .hero-search input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
.header-search button, .drawer-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; cursor: pointer;
}
.header-search .icon, .drawer-search .icon { width: 18px; height: 18px; }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.merk-count {
  position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: #ef4444; color: #fff; font: 700 .7rem/19px var(--font); text-align: center;
}
.main-nav { border-top: 1px solid var(--border); }
/* Mobil: Menüpunkte umbrechen statt seitlich abgeschnitten zu werden */
.main-nav .wrap {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; padding-top: 6px; padding-bottom: 6px;
}
.main-nav a {
  flex: none; padding: 5px 11px; border-radius: 999px; text-decoration: none; color: var(--muted);
  font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-2); }
.main-nav a[aria-current] { background: var(--ink); color: var(--bg); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 20px; padding-bottom: 48px; }
.sidebar { display: none; }
.content { min-width: 0; }

.breadcrumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 4px; opacity: .6; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  color: #fff; border-radius: calc(var(--radius) + 6px); padding: 28px 22px;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "😂"; position: absolute; right: -20px; bottom: -40px; font-size: 180px; opacity: .14; transform: rotate(-15deg);
  pointer-events: none;
}
.hero h1 { font-size: clamp(1.55rem, 1.1rem + 2vw, 2.3rem); margin-bottom: .75rem; }
.hero .hl { color: var(--sun); }
.hero p { margin: 0 0 1.2rem; max-width: 62ch; opacity: .95; }
.hero-search { display: flex; gap: 8px; max-width: 560px; position: relative; z-index: 1; }
.hero-search input { border-color: transparent; }
.hero .btn { background: var(--sun); color: #2b2100; }
.hero .btn:hover { background: #ffe066; color: #2b2100; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem/1 var(--font); padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  background: var(--brand); color: var(--brand-ink); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s, background .2s, box-shadow .2s;
}
.btn:hover { background: var(--brand-2); color: var(--brand-ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn-danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn-danger:hover { background: var(--err-soft); color: var(--err); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row.center { justify-content: center; }

/* ---------- Abschnitte ---------- */
.block { margin-top: 36px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.section-title { margin: 0 0 14px; font-size: 1.35rem; }
.block-head .section-title { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.more .icon { width: 18px; height: 18px; }
.page-intro { margin-bottom: 18px; }
.page-intro h1 small { font-size: .55em; color: var(--muted); font-weight: 600; }
.page-intro.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.h-icon { display: inline-block; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; margin: 0 0 .75rem; }
.meta-line { color: var(--muted); font-size: .92rem; margin: 0; }
.big-emoji { font-size: 4rem; margin: 0; line-height: 1.1; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.seo-text { background: var(--bg-2); border-radius: var(--radius); padding: 22px; }
.seo-text h2 { margin-top: 0; }
.seo-text h3 { font-size: 1.1rem; margin: 1.2rem 0 .3rem; }
.seo-text p { margin: 0; color: var(--muted); }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.inline-img { vertical-align: middle; border-radius: 3px; background: #fff; }

/* ---------- Kategorien ---------- */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-grid a {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); transition: transform .15s, border-color .2s, box-shadow .2s; height: 100%;
}
.cat-grid a:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.cat-grid .ci { grid-row: span 2; font-size: 1.7rem; line-height: 1; }
.cat-grid .cn { font-weight: 700; font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.cat-grid .cc { font-size: .8rem; color: var(--muted); }
.cat-details h2 { font-size: 1.1rem; margin: 1.4rem 0 .2rem; }
.cat-details h2 a { text-decoration: none; }
.cat-details h2 small { color: var(--muted); font-weight: 500; }
.cat-details p { margin: 0; color: var(--muted); }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Sortierung & Seiten ---------- */
.sort-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; font-size: .92rem; }
.sort-tabs span { color: var(--muted); margin-right: 4px; }
.sort-tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; }
.sort-tabs a:hover { border-color: var(--brand); color: var(--brand); }
.sort-tabs a[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pagination ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination a, .pagination span {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pagination .gap { display: grid; place-items: center; color: var(--muted); padding: 0 4px; }

/* ---------- Witz-Karte ---------- */
.joke-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.joke {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 14px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.joke-list .joke { margin-bottom: 0; }
.joke-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 8px; }
.joke-title { margin: 0; font-size: .95rem; font-weight: 700; color: var(--muted); font-family: var(--font); letter-spacing: 0; }
.joke-title a { color: inherit; text-decoration: none; }
.joke-title a:hover { color: var(--brand); text-decoration: underline; }
.rank {
  display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 12px;
  background: var(--sun); color: #2b2100; font: 800 1rem/1 var(--font-head);
}
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: .82rem; font-weight: 700; text-decoration: none; margin-left: auto;
}
.tag:hover { background: var(--brand); color: var(--brand-ink); }
.joke-text { font-size: 1.12rem; line-height: 1.7; overflow-wrap: anywhere; }
.joke-text p { margin: 0 0 .7em; }
.joke-text p:last-child { margin-bottom: 0; }
.joke-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); display: grid; gap: 12px; }

.score { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }
.score-bar { position: relative; width: 96px; height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; flex: none; }
.score-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #f59e0b, #84cc16); border-radius: inherit; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.score .q { color: var(--ink); font-size: 1rem; }

.rate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.rate-q { font-size: .9rem; font-weight: 600; }
.rate-btns { display: flex; gap: 4px; max-width: 100%; }
.rate-btns button {
  display: grid; justify-items: center; align-content: center; gap: 1px;
  flex: 1 1 0; width: auto; max-width: 48px; min-width: 0; min-height: 48px; padding: 4px 0; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--ink); cursor: pointer; font: inherit;
  transition: transform .15s, border-color .15s, background .15s;
}
.rate-btns .em { font-size: 1.35rem; line-height: 1; }
.rate-btns .pt { font-size: .72rem; font-weight: 700; color: var(--muted); }
.rate-btns button:hover:not(:disabled), .rate-btns button:focus-visible { transform: translateY(-3px) scale(1.06); border-color: var(--brand); background: var(--brand-soft); }
.rate-btns button:disabled { cursor: default; opacity: .45; }
.rate-btns button.chosen { opacity: 1; border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px var(--brand) inset; }
.rate-msg { flex-basis: 100%; margin: 0; font-size: .88rem; font-weight: 600; color: var(--ok); min-height: 0; }
.rate-msg:empty { display: none; }
.rate-msg.warn { color: var(--muted); }
.rate.done .rate-q::after { content: " ✓"; color: var(--ok); }

.rate-lg { display: block; background: var(--bg-2); border-radius: var(--radius-sm); padding: 14px; }
.rate-lg .rate-q { display: block; margin-bottom: 10px; font-size: 1rem; }
.rate-lg .rate-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rate-lg .rate-btns button { width: auto; min-height: 76px; padding: 8px 4px; background: var(--surface); }
.rate-lg .em { font-size: 1.8rem; }
.rate-lg .lb { font-size: .74rem; color: var(--muted); line-height: 1.2; text-align: center; }
.rate-lg .rate-msg { margin-top: 10px; }

.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.act {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--muted); font: 600 .88rem/1 var(--font);
  cursor: pointer; text-decoration: none;
}
.act .icon { width: 18px; height: 18px; }
.act:hover { color: var(--brand); border-color: var(--brand); }
.fav-btn[aria-pressed="true"] { color: #e11d48; border-color: #fda4af; background: color-mix(in srgb, #e11d48 8%, transparent); }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }

/* Einzelseite */
.joke-single { padding: 22px 20px 18px; }
.joke-single .joke-title { font-size: 1.05rem; color: var(--ink); font-family: var(--font-head); }
.joke-single .joke-title .nr { color: var(--muted); font-weight: 600; }
.joke-single .joke-text { font-size: 1.25rem; }
.prev-next { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 8px 0 20px; }
.prev-next > span:empty { display: none; }
.pn {
  display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; color: var(--ink); font-size: .9rem; line-height: 1.35;
  min-width: 0; overflow-wrap: anywhere;
}
.pn small { color: var(--brand); font-weight: 700; }
.pn:hover { border-color: var(--brand); color: var(--ink); }
.pn-next { text-align: right; }

/* ---------- Formulare ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.form .field { margin-bottom: 16px; }
.form label { display: block; font-weight: 700; margin-bottom: 6px; }
.form input:not([type=hidden]), .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 14px;
}
.form textarea { resize: vertical; min-height: 160px; line-height: 1.55; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; padding: 14px 18px; }
.inline-form label { margin: 0; }
.inline-form input { width: 120px !important; }
.admin-joke { margin-bottom: 18px; }
.admin-meta { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.notice { padding: 14px 18px; border-radius: var(--radius-sm); margin: 0 0 18px; background: var(--bg-2); }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.notice-err { background: var(--err-soft); color: var(--err); }

/* ---------- Werbung ---------- */
.ad { margin: 20px 0; min-height: 280px; text-align: center; }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.ad-side { min-height: 600px; position: sticky; top: 140px; }

/* ---------- Sidebar ---------- */
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 10px 10px; }
.side-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 10px 8px; font-family: var(--font); }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
}
.cat-list a:hover { background: var(--bg-2); color: var(--ink); }
.cat-list a[aria-current] { background: var(--brand-soft); color: var(--brand); }
.cat-list .ci { width: 1.5em; text-align: center; }
.cat-list .cnt { margin-left: auto; font-size: .78rem; color: var(--muted); font-weight: 600; background: var(--bg-2); border-radius: 999px; padding: 1px 8px; }

/* ---------- Drawer (Mobil-Menü) ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(15, 12, 30, .45); }
.drawer[hidden] { display: none; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); overflow-y: auto;
  background: var(--bg); padding: 12px 14px 32px; box-shadow: -10px 0 30px rgba(0,0,0,.2);
  animation: slide-in .22s ease-out;
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding-left: 6px; }
.drawer-search { margin-bottom: 14px; }
.drawer-nav { list-style: none; margin: 0 0 18px; padding: 0; }
.drawer-nav a { display: block; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.drawer-nav a:hover { background: var(--bg-2); }
body.no-scroll { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--bg); padding: 36px 0 20px; }
@media (prefers-color-scheme: dark) { .site-footer { background: #0d0b16; color: var(--ink); } }
.site-footer a { color: inherit; opacity: .85; text-decoration: none; }
.site-footer a:hover { opacity: 1; text-decoration: underline; color: inherit; }
.footer-grid { display: grid; gap: 24px; }
.footer-grid p { margin: 0 0 8px; opacity: .8; max-width: 52ch; }
.footer-logo { display: flex; align-items: center; gap: 10px; opacity: 1 !important; font-size: 1.15rem; }
.footer-logo .logo-icon { width: 32px; height: 32px; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin: 0 0 10px; font-family: var(--font); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.copy { margin: 28px 0 0; font-size: .85rem; opacity: .6; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); text-align: center;
  animation: toast-in .25s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Animationen ---------- */
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1); } }
.pop { animation: pop .45s ease-out; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 560px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rate-lg .rate-btns { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .joke { padding: 22px 24px 16px; }
  .hero { padding: 40px 36px; }
  .footer-grid { grid-template-columns: 2fr 1fr; }
}
@media (min-width: 560px) {
  .prev-next { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .prev-next > span:empty { display: block; }
}
@media (min-width: 760px) {
  html { scroll-padding-top: 130px; }
  .site-header { position: sticky; top: 0; }
  .main-nav .wrap { flex-wrap: nowrap; justify-content: flex-start; gap: 4px; }
  .main-nav a { padding: 6px 14px; font-size: .95rem; }
  .header-search { display: block; flex: 0 1 340px; }
  .joke-foot { grid-template-columns: auto 1fr; align-items: center; }
  .joke-foot .score { grid-column: 1; }
  .joke-foot .rate { grid-column: 2; justify-self: end; }
  .joke-foot .rate-lg { grid-column: 1 / -1; justify-self: stretch; }
  .joke-foot .actions { grid-column: 1 / -1; }
}
@media (min-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .sidebar { display: block; }
  .menu-btn { display: none; }
  .header-search { flex-basis: 380px; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .side-box { position: relative; }
}
@media print {
  .site-header, .sidebar, .site-footer, .rate, .actions, .ad, .prev-next, .btn-row { display: none !important; }
  .joke { box-shadow: none; border: 0; }
}
