@font-face {
  font-family: 'Fredoka';
  src: url('/assets/fonts/fredoka.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #f6ecd8;
  --flaeche: #ffffff;
  --flaeche-2: #f4e8d0;
  --text: #1d2733;
  --leise: #5a6574;
  --linie: #e6d8bd;
  --blau: #0a6cbd;
  --blau-dunkel: #07508d;
  --blau-text: #ffffff;
  --sonne: #ffc233;
  --orange: #f07d00;
  --blatt: #2fa862;
  --stamm: #8a5a2b;
  --sand-dunkel: #e2c48f;
  --rot: #c62828;
  --himmel-1: #0a6cbd;
  --himmel-2: #4fb0f0;
  --himmel-3: #bfe6ff;
  --schatten: 0 1px 2px rgb(60 40 0 / .06), 0 6px 18px rgb(60 40 0 / .07);
  --radius: 16px;
  --schrift: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --titel: 'Fredoka', var(--schrift);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1720;
    --flaeche: #17212d;
    --flaeche-2: #1e2a38;
    --text: #e7edf4;
    --leise: #9eabba;
    --linie: #2a394b;
    --blau: #5cb3ff;
    --blau-dunkel: #8ccaff;
    --blau-text: #0b1520;
    --sonne: #ffc94a;
    --orange: #ffa040;
    --blatt: #4fd38a;
    --stamm: #c28a52;
    --sand-dunkel: #6b5a3a;
    --rot: #ff7a7a;
    --himmel-1: #0b2a47;
    --himmel-2: #12436e;
    --himmel-3: #17212d;
    --schatten: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1720; --flaeche: #17212d; --flaeche-2: #1e2a38; --text: #e7edf4; --leise: #9eabba; --linie: #2a394b;
  --blau: #5cb3ff; --blau-dunkel: #8ccaff; --blau-text: #0b1520; --sonne: #ffc94a; --orange: #ffa040; --blatt: #4fd38a;
  --stamm: #c28a52; --sand-dunkel: #6b5a3a; --rot: #ff7a7a; --himmel-1: #0b2a47; --himmel-2: #12436e; --himmel-3: #17212d;
  --schatten: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--schrift);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.gesperrt { overflow: hidden; }
main { flex: 1; }
a { color: var(--blau); text-underline-offset: 3px; }
a:hover { color: var(--blau-dunkel); }
h1, h2, h3 { font-family: var(--titel); font-weight: 600; line-height: 1.2; letter-spacing: .005em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: .2em 0 .3em; }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.6rem); margin: 0 0 .7em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--flaeche); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Kopf */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.kopf__innen { max-width: 1080px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-family: var(--titel); font-size: 1.45rem; font-weight: 600; }
.logo b { color: var(--orange); font-weight: 600; }
.logo:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav__suche, .menue-knopf { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 999px; font: inherit; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover, .nav__suche:hover, .menue-knopf:hover { background: var(--flaeche-2); color: var(--text); }
.nav a[aria-current="page"], .nav__suche[aria-current="page"] { background: var(--flaeche-2); color: var(--blau); }
.kopf__werkzeuge { display: flex; align-items: center; gap: 4px; }
.menue-knopf { display: none; border: 0; background: none; cursor: pointer; }
@media (max-width: 1100px) { .nav__zufall { display: none !important; } }

/* Schmale Bildschirme: Bereiche hinter dem Menü-Knopf */
@media (max-width: 880px) {
  .kopf__innen { position: relative; }
  .menue-knopf { display: inline-flex; }
  .nav__suche span { display: none; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 12px 14px; background: var(--flaeche); border-bottom: 1px solid var(--linie); box-shadow: 0 12px 24px rgb(60 40 0 / .12); }
  .nav.nav--offen { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; font-size: 1.05rem; }
  .nav__zufall { display: flex !important; }
}
@media (max-width: 400px) {
  .kopf__innen { padding-inline: 10px; gap: 6px; }
  .menue-knopf span { display: none; }
}

/* Startseite */
.held { background: linear-gradient(180deg, var(--himmel-1) 0%, var(--himmel-2) 55%, var(--himmel-3) 100%); color: #fff; padding: 48px 16px 64px; text-align: center; }
.held__innen { max-width: 720px; margin: 0 auto; }
.held__vorzeile { margin: 0; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; opacity: .9; }
.held__titel { font-size: clamp(3rem, 12vw, 5.2rem); margin: .1em 0 .15em; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 3px 0 rgb(0 0 0 / .12); }
.held__titel span { background: linear-gradient(180deg, #ffe066 10%, #ffb703 50%, #fb5607 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.held__text { font-size: 1.15rem; margin: 0 auto 24px; max-width: 34em; }

.suchfeld { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.suchfeld input { flex: 1; min-width: 0; font: inherit; padding: 12px 16px; border-radius: 999px; border: 2px solid var(--linie); background: var(--flaeche); color: var(--text); }
.held .suchfeld input { border-color: transparent; box-shadow: var(--schatten); }
.suchfeld--kompakt { margin: 0; flex: 1; max-width: 460px; }

/* Knöpfe */
.knopf { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border-radius: 999px; border: 0; background: var(--blau); color: var(--blau-text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.knopf:hover { background: var(--blau-dunkel); color: var(--blau-text); }
.knopf--sonne { background: var(--sonne); color: #3a2a00; }
.knopf--sonne:hover { background: #ffb000; color: #3a2a00; }
.knopf--leise { background: var(--flaeche-2); color: var(--text); }
.knopf--leise:hover { background: var(--linie); color: var(--text); }
.knopf--gross { font-size: 1.15rem; padding: 14px 28px; }

/* Abschnitte */
.bereich, .seite { max-width: 1080px; margin: 0 auto; padding: 32px 16px; }
.seite--schmal { max-width: 760px; }
.bereich__kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bereich__text, .einleitung { color: var(--leise); margin-top: 0; }
.einleitung { font-size: 1.1rem; }
.zentriert { text-align: center; }
.riesig { font-size: 4rem; margin: 0; }
.werkzeuge { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 24px; }
.gruppe { margin-top: 32px; }
.brotkrumen { font-size: .9rem; color: var(--leise); }
.brotkrumen a { color: var(--leise); }
.marke { display: inline-block; vertical-align: middle; font-size: .9rem; font-family: var(--schrift); font-weight: 700; background: var(--rot); color: #fff; border-radius: 999px; padding: 2px 10px; }
.hinweis { background: var(--flaeche-2); border-left: 4px solid var(--sonne); padding: 10px 14px; border-radius: 8px; }
.text h2 { margin-top: 1.4em; font-size: 1.25rem; }

/* Kacheln */
.kacheln { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.kacheln--klein { grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.kachel { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--schatten); transition: transform .12s ease, border-color .12s ease; }
a.kachel:hover { transform: translateY(-2px); border-color: var(--sonne); color: var(--text); }
.kachel__titel { font-family: var(--titel); font-weight: 600; font-size: 1.15rem; }
.kachel__zahl { color: var(--leise); font-size: .9rem; }
.kachel__zahl b { color: var(--rot); }
.kachel__icon { font-size: 1.6rem; line-height: 1; margin-bottom: 4px; }
.kachel--bald { box-shadow: none; background: transparent; border-style: dashed; }
.kachel--ab18 { border-color: color-mix(in srgb, var(--rot) 40%, var(--linie)); }

/* Witze */
.witze { display: grid; gap: 14px; }
.witz { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 20px 10px; box-shadow: var(--schatten); scroll-margin-top: 80px; }
.witz:target { border-color: var(--sonne); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sonne) 45%, transparent), var(--schatten); }
.witz__titel { font-size: 1.2rem; margin: 0 0 .5em; }
.witz__text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.witz__text mark { background: color-mix(in srgb, var(--sonne) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.witz__aktionen { display: flex; align-items: center; gap: 4px; margin-top: 10px; border-top: 1px solid var(--linie); padding-top: 6px; flex-wrap: wrap; }
.witz__kategorie { margin-right: auto; font-size: .9rem; font-weight: 600; text-decoration: none; }
.aktion { font: inherit; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--leise); padding: 6px 10px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.aktion svg { fill: currentColor; }
.aktion:hover { background: var(--flaeche-2); color: var(--text); }
.aktion--link { margin-left: auto; font-weight: 700; }
.witz__kategorie + .aktion { margin-left: 0; }
.teilen { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 6px; animation: einblenden .15s ease; }
@keyframes einblenden { from { opacity: 0; translate: 0 -4px; } }
.teilen__ziel { font: inherit; font-size: .92rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; color: #fff; background: var(--leise); }
.teilen__ziel:hover { color: #fff; filter: brightness(1.08); }
.teilen__ziel small { font-weight: 400; opacity: .85; }
.teilen__ziel--wa { background: #1fa855; }
.teilen__ziel--fb { background: #1877f2; }
.teilen__ziel--ig { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); }
.witz--gross { padding: 24px 26px 12px; }
/* Rätsel */
.raetsel__inhalt { white-space: normal; }
.raetsel__inhalt p { margin: 0 0 .8em; }
.raetsel__inhalt img { max-width: 100%; height: auto; display: block; margin: 8px auto; }
.raetsel__inhalt table { border-collapse: collapse; margin: 8px 0; max-width: 100%; }
.raetsel__inhalt td { vertical-align: top; padding: 6px 10px; }
.raetsel__inhalt ul, .raetsel__inhalt ol { padding-left: 1.3em; }
@media (max-width: 560px) { .raetsel__inhalt td { display: block; padding: 4px 0; } }
.raetsel__loesung { margin: 18px 0 6px; border: 2px dashed var(--sonne); border-radius: 14px; padding: 4px 14px; background: color-mix(in srgb, var(--sonne) 8%, var(--flaeche)); }
.raetsel__loesung summary { cursor: pointer; font-family: var(--titel); font-weight: 600; font-size: 1.1rem; padding: 10px 0; list-style: none; }
.raetsel__loesung summary::-webkit-details-marker { display: none; }
.raetsel__loesung[open] summary { color: var(--leise); }
.raetsel__auf, .raetsel__loesung[open] .raetsel__zu { display: none; }
.raetsel__loesung[open] .raetsel__auf { display: inline; }
.witz__text--pre { white-space: pre; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; overflow-x: auto; }
.sprungmarken { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.sprungmarken a { padding: 6px 14px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); text-decoration: none; font-weight: 600; font-size: .92rem; }
.sprungmarken a:hover { border-color: var(--sonne); }

/* Funtexte */
.witz--text { padding: 26px clamp(18px, 5vw, 40px) 14px; }
.witz--text .witz__titel { font-size: clamp(1.7rem, 5vw, 2.3rem); margin: 0 0 .2em; }
.witz__meta { color: var(--leise); font-size: .92rem; margin: 0 0 1.2em; }
.witz--text .witz__text { font-size: 1.08rem; line-height: 1.75; }
.textliste { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.textliste li { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.textliste__titel { font-family: var(--titel); font-weight: 600; font-size: 1.12rem; text-decoration: none; }
.suche__abschnitt { font-size: 1.2rem; margin: 22px 0 10px; }
.witze .textliste { margin-bottom: 8px; }
.textliste__info { color: var(--leise); font-size: .85rem; white-space: nowrap; }
.textliste__anriss { grid-column: 1 / -1; margin: 0; color: var(--leise); font-size: .93rem; line-height: 1.45; }
.textliste li:hover { border-color: var(--sonne); }
.blaettern--text { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.blaettern__link { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); text-decoration: none; color: var(--text); }
.blaettern__link small { color: var(--leise); }
.blaettern__link span { font-weight: 600; }
.blaettern__link:hover { border-color: var(--sonne); color: var(--text); }
.blaettern__link--weiter { text-align: right; }
.witz--gross .witz__text { font-size: 1.2rem; line-height: 1.55; }

.tageswitz { background: linear-gradient(135deg, color-mix(in srgb, var(--sonne) 30%, var(--flaeche)) 0%, var(--flaeche) 60%); border-radius: calc(var(--radius) + 6px); padding: 20px; margin-top: -56px; position: relative; box-shadow: var(--schatten); }
.tageswitz__titel { margin-bottom: .6em; }
.tageswitz .witz { box-shadow: none; }

/* Blättern */
.blaettern { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 8px; flex-wrap: wrap; }
.blaettern__zahlen { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; justify-content: center; }
.blaettern__zahlen a, .blaettern__zahlen span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.blaettern__zahlen a:hover { background: var(--flaeche-2); }
.blaettern__zahlen span[aria-current] { background: var(--blau); color: var(--blau-text); }
@media (max-width: 520px) { .blaettern__zahlen { order: 3; width: 100%; } }

.suche__info { color: var(--leise); min-height: 1.6em; }

/* Ab-18-Abfrage */
.altersabfrage { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgb(10 15 25 / .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.altersabfrage[hidden] { display: none; }
.altersabfrage__box { background: var(--flaeche); border-radius: 20px; padding: 28px; max-width: 420px; text-align: center; box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.altersabfrage__marke { margin: 0 auto 8px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--rot); color: #fff; font: 700 1.4rem var(--titel); }
.altersabfrage__knoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* Meldung */
.meldung { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 30; }
.meldung.sichtbar { opacity: 1; transform: translate(-50%, 0); }

/* Fuß */
.fuss { border-top: 1px solid var(--linie); background: var(--flaeche); margin-top: 40px; }
.fuss__innen { max-width: 1080px; margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.fuss p { margin: 0; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.fuss__klein { width: 100%; color: var(--leise); font-size: .85rem; }

/* Spiele: allgemein */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kacheln--spiele { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.kachel--spiel { gap: 4px; }
.kachel--spiel .kachel__icon { font-size: 2.2rem; }
.kachel--spiel .kachel__zahl { flex: 1; }
.kachel__los { margin-top: 8px; font-weight: 700; color: var(--blau); }
.fuss-hinweis { font-size: .9rem; margin-top: 20px; }
.knopf--klein { padding: 6px 14px; font-size: .9rem; }
.knopf:disabled { opacity: .55; cursor: default; }
.spiel { margin-top: 8px; }
.spiel__leiste { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center; margin-bottom: 16px; }
.spiel__leiste select { font: inherit; padding: 6px 12px; margin-left: 4px; border-radius: 999px; border: 2px solid var(--linie); background: var(--flaeche); color: var(--text); }
.spiel__meldung { text-align: center; margin: 20px auto 0; padding: 18px; background: var(--flaeche-2); border-radius: var(--radius); max-width: 480px; display: grid; gap: 4px; }
.spiel__meldung strong { font-family: var(--titel); font-size: 1.35rem; font-weight: 600; }

/* Memory */
.memory { --spalten: 4; display: grid; grid-template-columns: repeat(var(--spalten), 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
.memory--gross { --spalten: 6; max-width: 680px; }
@media (max-width: 560px) { .memory--gross { --spalten: 4; } }
.karte { aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; perspective: 700px; font-size: clamp(1.7rem, 8vw, 2.8rem); color: inherit; }
.memory--gross .karte { font-size: clamp(1.5rem, 6vw, 2.2rem); }
.karte__innen { position: relative; display: block; width: 100%; height: 100%; transition: transform .35s ease; transform-style: preserve-3d; }
.karte.offen .karte__innen { transform: rotateY(180deg); }
.karte__rueck, .karte__front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.karte__rueck { background: radial-gradient(circle at 70% 25%, var(--sonne) 0 12%, transparent 13%), linear-gradient(160deg, var(--himmel-1), var(--himmel-2)); box-shadow: var(--schatten); }
.karte__front { background: var(--flaeche); border: 2px solid var(--linie); transform: rotateY(180deg); line-height: 1; }
.karte.gefunden .karte__front { border-color: var(--blatt); background: color-mix(in srgb, var(--blatt) 14%, var(--flaeche)); }
.karte:not(.offen):hover .karte__innen { transform: translateY(-2px); }

/* Snake */
.snake { position: relative; max-width: 440px; margin: 0 auto; }
.snake__feld { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius); touch-action: none; box-shadow: var(--schatten); }
.snake__hinweis { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; padding: 20px; border-radius: var(--radius); background: color-mix(in srgb, var(--flaeche) 86%, transparent); }
.snake__hinweis[hidden] { display: none; }
.snake__hinweis strong { font-family: var(--titel); font-size: 1.6rem; font-weight: 600; }
.snake__hinweis .knopf { justify-self: center; }
.steuerkreuz { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 8px; justify-content: center; margin: 18px auto 0; }
.steuerkreuz button { font-size: 1.3rem; border: 0; border-radius: 14px; background: var(--flaeche-2); color: var(--text); cursor: pointer; touch-action: manipulation; }
.steuerkreuz button:active { background: var(--sonne); color: #3a2a00; }
.steuerkreuz__hoch { grid-column: 2; grid-row: 1; }
.steuerkreuz__links { grid-column: 1; grid-row: 2; }
.steuerkreuz__runter { grid-column: 2; grid-row: 2; }
.steuerkreuz__rechts { grid-column: 3; grid-row: 2; }
@media (hover: hover) and (pointer: fine) { .steuerkreuz { display: none; } }

/* Würfelpoker */
.wuerfelreihe { display: flex; gap: 10px; justify-content: center; margin: 4px 0 16px; flex-wrap: wrap; }
.wuerfel { width: 58px; height: 58px; padding: 9px; border-radius: 14px; border: 3px solid transparent; background: var(--flaeche); box-shadow: var(--schatten); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center; cursor: pointer; }
.wuerfel span { width: 9px; height: 9px; border-radius: 50%; }
.wuerfel span.an { background: var(--text); }
.wuerfel.leer { background: var(--flaeche-2); box-shadow: none; }
.wuerfel.gehalten { border-color: var(--orange); background: color-mix(in srgb, var(--sonne) 25%, var(--flaeche)); transform: translateY(4px); }
.wuerfel:disabled { cursor: default; }
.wuerfel.rollt { animation: rollen .45s ease; }
@keyframes rollen { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(-18deg) scale(.88); } 70% { transform: rotate(12deg) scale(1.06); } 100% { transform: rotate(0) scale(1); } }
.wuerfel__tipp { text-align: center; color: var(--leise); min-height: 1.6em; margin: 4px 0 18px; }
.block { width: 100%; max-width: 520px; margin: 0 auto; border-collapse: collapse; background: var(--flaeche); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); }
.block th, .block td { padding: 6px 12px; border-bottom: 1px solid var(--linie); text-align: left; font-weight: 400; }
.block th small { color: var(--leise); font-size: .8rem; display: block; line-height: 1.2; }
.block td { text-align: right; width: 96px; font-variant-numeric: tabular-nums; }
.block__feld { font: inherit; font-weight: 700; min-width: 64px; padding: 6px 10px; border-radius: 10px; border: 2px dashed var(--linie); background: none; color: var(--blau); cursor: pointer; }
.block__feld:not(:disabled):hover { background: var(--flaeche-2); border-style: solid; }
.block__feld:disabled { cursor: default; }
.block__feld:disabled:empty { border-color: transparent; }
.block__feld.fest { border: 0; color: var(--text); }
.block__summe th, .block__summe td { background: var(--flaeche-2); font-weight: 600; }
.block__gesamt th, .block__gesamt td { font-family: var(--titel); font-size: 1.25rem; font-weight: 600; border-bottom: 0; }

.block--mehr td { width: 72px; text-align: center; }
.block--mehr .block__feld { min-width: 52px; padding: 6px 4px; }
.block__name { text-align: center !important; font-weight: 700 !important; font-size: .9rem; padding: 8px 4px !important; overflow-wrap: anywhere; }
.block td.aktiv, .block th.aktiv { background: color-mix(in srgb, var(--sonne) 22%, transparent); }
.block__feld.pc-wahl { background: var(--sonne); color: #3a2a00; border-style: solid; }
.wp__namen { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin: -6px 0 14px; }
.wp__namen input { font: inherit; width: 9.5em; padding: 6px 12px; margin-left: 4px; border-radius: 999px; border: 2px solid var(--linie); background: var(--flaeche); color: var(--text); }
.wp__dran { text-align: center; font-family: var(--titel); font-size: 1.3rem; font-weight: 600; margin: 0 0 10px; }
.wp__dran--pc { color: var(--leise); }
.vier[data-dran="gelb"]:not(.vier--wartet) .vier__loch:hover { box-shadow: inset 0 3px 6px rgb(0 0 0 / .25), 0 0 0 3px #f9b800; }
.vier[data-dran="rot"]:not(.vier--wartet) .vier__loch:hover { box-shadow: inset 0 3px 6px rgb(0 0 0 / .25), 0 0 0 3px #ff8a80; }

/* Quiz */
.quiz__karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; box-shadow: var(--schatten); }
.quiz__karte[hidden] { display: none; }
.quiz__frage { font-size: 1.35rem; margin-bottom: 16px; }
.quiz__antworten { display: grid; gap: 10px; }
.quiz__antwort { font: inherit; text-align: left; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--linie); background: var(--flaeche); color: var(--text); cursor: pointer; }
.quiz__antwort:not(:disabled):hover { border-color: var(--blau); }
.quiz__antwort:disabled { cursor: default; }
.quiz__antwort.richtig { border-color: var(--blatt); background: color-mix(in srgb, var(--blatt) 16%, var(--flaeche)); font-weight: 600; }
.quiz__antwort.falsch { border-color: var(--rot); background: color-mix(in srgb, var(--rot) 12%, var(--flaeche)); }
.quiz__info { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--flaeche-2); display: grid; gap: 4px; }

.spiel__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.wackelt { animation: wackeln .35s ease; }
@keyframes wackeln { 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }

/* Minesweeper */
.ms { --spalten: 12; display: grid; grid-template-columns: repeat(var(--spalten), 1fr); gap: 2px; width: min(100%, calc(var(--spalten) * 38px)); margin: 0 auto; padding: 6px; background: var(--linie); border-radius: 12px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ms__zelle { aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px; background: linear-gradient(145deg, #ffffff, #e9dcc3); box-shadow: inset 0 -2px 0 rgb(0 0 0 / .12); font: 700 clamp(.7rem, 3.4vw, 1.05rem)/1 var(--schrift); color: var(--text); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.ms__zelle:hover:not(.offen) { background: #fff6e2; }
.ms__zelle.offen { background: var(--flaeche-2); box-shadow: none; cursor: default; }
.ms__zelle.flagge { font-size: clamp(.8rem, 3.6vw, 1.1rem); }
.ms__zelle.knall { background: var(--rot); }
.ms__zelle.falsch { background: #ffd9d9; }
.ms__zelle[data-n="1"] { color: #1565c0; }
.ms__zelle[data-n="2"] { color: #2e7d32; }
.ms__zelle[data-n="3"] { color: #c62828; }
.ms__zelle[data-n="4"] { color: #283593; }
.ms__zelle[data-n="5"] { color: #8d1c1c; }
.ms__zelle[data-n="6"] { color: #00838f; }
.ms__zelle[data-n="7"] { color: #212121; }
.ms__zelle[data-n="8"] { color: #616161; }
.ms--vorbei .ms__zelle { cursor: default; }

/* Vier in einer Reihe */
.vier__status { text-align: center; font-weight: 600; min-height: 1.6em; margin: 0 0 12px; }
.vier { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 460px; margin: 0 auto; padding: 10px; background: var(--blau); border-radius: 18px; box-shadow: var(--schatten); }
.vier__loch { aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; background: var(--bg); box-shadow: inset 0 3px 6px rgb(0 0 0 / .25); cursor: pointer; position: relative; overflow: visible; }
.vier__loch::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; opacity: 0; }
.vier__loch.du::after { opacity: 1; background: radial-gradient(circle at 35% 30%, #ff8a80, #d32f2f 65%); }
.vier__loch.pc::after { opacity: 1; background: radial-gradient(circle at 35% 30%, #fff3b0, #f9b800 65%); }
.vier__loch.neu::after { animation: fallen .35s cubic-bezier(.5, 0, .75, 0) both; }
@keyframes fallen { from { transform: translateY(calc(var(--fall, 1) * -115%)); } to { transform: none; } }
.vier__loch.sieg::after { box-shadow: 0 0 0 4px #fff, 0 0 14px 4px var(--sonne); }
.vier:not(.vier--wartet) .vier__loch:hover { box-shadow: inset 0 3px 6px rgb(0 0 0 / .25), 0 0 0 3px color-mix(in srgb, #fff 60%, transparent); }
.vier--wartet .vier__loch { cursor: default; }

/* Solitär */
.sol { --kw: 60px; max-width: 760px; margin: 0 auto; padding: 12px; background: radial-gradient(circle at 50% 0%, #2f8a57, #1f6b41); border-radius: 18px; box-shadow: var(--schatten); user-select: none; -webkit-user-select: none; }
.sol__reihe { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(4px, 1.5vw, 10px); }
.sol__reihe--spalten { margin-top: clamp(10px, 3vw, 18px); }
.sol__stapel { position: relative; aspect-ratio: 5 / 7; border-radius: 8px; }
.sol__talon, .sol__fundament, .sol__spalte.leer { outline: 2px dashed rgb(255 255 255 / .35); outline-offset: -2px; display: grid; place-items: center; color: rgb(255 255 255 / .55); font-size: calc(var(--kw) * .45); }
.sol__talon { cursor: pointer; }
.sol__spalte { aspect-ratio: auto; }
.sk { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 5 / 7; border-radius: calc(var(--kw) * .1); border: 1px solid #d8d2c4; background: #fff; padding: 0; box-shadow: 0 1px 2px rgb(0 0 0 / .25); font-family: var(--schrift); cursor: pointer; transition: top .15s ease, left .15s ease; }
.sk.rot { color: #c62828; }
.sk.schwarz { color: #1d2733; }
.sk.verdeckt { background: repeating-linear-gradient(45deg, #1565c0 0 4px, #1e88e5 4px 8px); border: 2px solid #fff; cursor: default; }
.sk:disabled { cursor: default; }
.sk__ecke { position: absolute; left: 6%; top: 3%; font-size: calc(var(--kw) * .27); font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.sk__mitte { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-size: calc(var(--kw) * .5); line-height: 1; }
.sol__ablage .sk + .sk { box-shadow: -2px 0 4px rgb(0 0 0 / .2); }

/* Mahjong */
.mj { position: relative; max-width: 760px; margin: 0 auto; }
.mj__stein { position: absolute; padding: 0; border: 1px solid #c9b48c; border-radius: 6px; background: linear-gradient(160deg, #fffdf6 0%, #f3e6c9 100%); box-shadow: var(--tiefe) var(--tiefe) 0 #c8a96e, calc(var(--tiefe) + 1px) calc(var(--tiefe) + 1px) 3px rgb(0 0 0 / .3); display: grid; place-items: center; line-height: 1; cursor: pointer; filter: brightness(.86) saturate(.8); transition: transform .1s ease, filter .1s ease; }
.mj__stein.frei { filter: none; }
.mj__stein.frei:hover { transform: translateY(-2px); }
.mj__stein.gewaehlt { background: linear-gradient(160deg, #fff6c8, #ffd54f); border-color: var(--orange); transform: translateY(-3px); }
.mj__stein.tipp { animation: tipp .9s ease 2; }
@keyframes tipp { 50% { background: #c8f7d4; transform: translateY(-4px); } }

/* ---------- DDR-Special ---------- */
.kopfbild { margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); }
.kopfbild img { display: block; width: 100%; height: clamp(110px, 22vw, 220px); object-fit: cover; }
.kacheln--bilder { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.kachel--bild { padding: 0 0 14px; overflow: hidden; gap: 4px; }
.kachel--bild .kachel__titel, .kachel--bild .kachel__zahl { padding: 0 14px; }
.kachel__bild { display: block; aspect-ratio: 4 / 3; background: var(--flaeche-2); margin-bottom: 8px; overflow: hidden; border-bottom: 1px solid var(--linie); }
.kachel__bild img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .25s ease; }
.kachel--bild:hover .kachel__bild img { transform: scale(1.04); }
.inhalt-text { white-space: normal; }
.inhalt-text p { margin: 0 0 .7em; }
.abschnitt { margin-top: 26px; }
.abschnitt:first-child { margin-top: 0; }
.abschnitt h2 { font-size: 1.3rem; margin: 0 0 6px; }
.abschnitt > p { margin: 0 0 12px; color: var(--leise); }
.fotos { display: grid; gap: 16px; }
.fotos--galerie { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); align-items: start; }
.foto { margin: 0; text-align: center; }
.foto a { display: inline-block; max-width: 100%; vertical-align: top; border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.foto img { display: block; max-width: 100%; height: auto; }
.fotos--galerie .foto a, .fotos--galerie .foto img { width: 100%; }
.foto figcaption { margin-top: 6px; font-size: .9rem; color: var(--leise); line-height: 1.4; }
.ddr__zitat { margin: 18px 0 0; padding: 14px 18px; border-left: 4px solid var(--rot); border-radius: 10px; background: var(--flaeche-2); font-style: italic; }
.ddr__zitat p { margin: 0; }
.ddr__zitat .ddr__zitat-titel { margin-bottom: 4px; font-family: var(--titel); font-style: normal; font-weight: 600; }
.ddr__liste { margin: 0; padding-left: 1.5em; }
.ddr__liste li { margin-bottom: 6px; }
.fotos--kacheln { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.fotos--kacheln .foto a { width: 100%; }
.fotos--kacheln .foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.fotos--kacheln .foto a:hover img { transform: scale(1.05); }
.fotos--buecher { grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 220px)); }
.abschnitt h3 { margin: 0 0 8px; font-size: 1.1rem; }
.funtext__original { margin: 22px auto 6px; max-width: 420px; }
.crazy__schluss { margin: 22px 0 6px; text-align: center; color: var(--leise); }
.crazy__schluss strong { display: block; margin-top: 4px; font-family: var(--titel); font-size: clamp(2rem, 8vw, 3rem); letter-spacing: .04em; color: var(--rot); }
.fotos__tipp { margin: 18px 0 0; text-align: center; font-size: .9rem; color: var(--leise); }

/* ---------- Bilderwitze ---------- */
.bildkarten { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); }
.bildkarten a { display: block; border-radius: 14px; overflow: hidden; box-shadow: var(--schatten); transition: transform .15s ease; }
.bildkarten a:hover { transform: translateY(-3px) rotate(-.6deg); }
.bildkarten img { display: block; width: 100%; height: auto; }
.bildwitz { text-align: center; }
.bildwitz__titel { font-size: clamp(1.25rem, 4vw, 1.6rem); margin: .3em 0 .7em; }
.bildwitz__bild { max-width: 560px; margin: 0 auto; }
.bildwitz__bild img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: var(--schatten); }
.bildwitz__knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 10px; }
.bildwitz__quelle { color: var(--leise); font-size: .95rem; }

/* ---------- Formulare: Kontakt, Gästebuch, Witz einsenden ---------- */
.formular { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 20px clamp(16px, 4vw, 28px); box-shadow: var(--schatten); }
.formular__felder { display: grid; gap: 14px; }
.formular label { display: block; font-weight: 600; }
.formular label > input:not([type="checkbox"]), .formular label > textarea, .formular label > select { display: block; margin-top: 6px; }
.formular label small { font-weight: 400; color: var(--leise); }
.formular input:not([type="checkbox"]), .formular textarea, .formular select { font: inherit; font-weight: 400; width: 100%; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--linie); background: var(--bg); color: var(--text); }
.formular textarea { resize: vertical; min-height: 7em; line-height: 1.5; }
.formular input:focus, .formular textarea:focus, .formular select:focus { border-color: var(--blau); outline: none; }
.formular .formular__haken { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.formular__haken input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--blau); }
.formular__zeile { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.formular__hinweis { margin: 0; color: var(--leise); font-size: .9rem; }
.formular__falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.formular__meldung { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.formular__meldung--ok { background: color-mix(in srgb, var(--blatt) 18%, var(--flaeche)); }
.formular__meldung--fehler { background: color-mix(in srgb, var(--rot) 14%, var(--flaeche)); }
.formular button[type="submit"] { justify-self: start; }
.eintraege { display: grid; gap: 12px; margin-top: 12px; }
.eintrag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 14px 18px; }
.eintrag__kopf { margin: 0 0 6px; color: var(--leise); font-size: .92rem; }
.eintrag__kopf strong { color: var(--text); }
.eintrag__text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.eintraege__leer { color: var(--leise); }

/* ---------- Grußkarten ---------- */
.karten-editor { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(260px, 400px); align-items: start; }
.karten-editor__schritt { font-size: 1.15rem; margin: 18px 0 10px; }
.karten-editor__schritt:first-child { margin-top: 0; }
.motive { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.motiv { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--text); background: var(--flaeche); border: 2px solid var(--linie); border-radius: 14px; cursor: pointer; }
.motiv:hover { border-color: var(--sonne); }
.motiv[aria-pressed="true"] { border-color: var(--blau); background: color-mix(in srgb, var(--blau) 10%, var(--flaeche)); }
.motiv__emoji { font-size: 1.8rem; line-height: 1.2; }
.formular--leicht { box-shadow: none; }
.karten-editor__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.karten-editor__vorschau { position: sticky; top: 80px; margin: 0; text-align: center; color: var(--leise); font-size: .9rem; }
.grusskarte { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: var(--schatten); background: var(--flaeche-2); }
.grusskarte--gross { max-width: 520px; margin: 0 auto; opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .5s ease, transform .5s ease; }
.grusskarte--gross.grusskarte--da { opacity: 1; transform: none; }
.karten-ansicht { text-align: center; }
.karten-ansicht h1 { font-size: clamp(1.4rem, 5vw, 2rem); }
.karten-ansicht__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0; }
@media (max-width: 760px) {
  .karten-editor { grid-template-columns: 1fr; }
  .karten-editor__vorschau { position: static; order: -1; max-width: 340px; margin: 0 auto; }
}

/* Bildbetrachter (Bild antippen = groß) */
.bildbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(15 12 8 / .94); color: #fff; }
.bildbox[open] { display: grid; place-items: center; }
.bildbox::backdrop { background: rgb(0 0 0 / .5); }
.bildbox__bild { display: grid; justify-items: center; gap: 10px; max-width: 100%; margin: 0; padding: 60px 64px 18px; }
.bildbox__bild img { max-width: min(100%, 1100px); max-height: calc(100dvh - 140px); width: auto; height: auto; border-radius: 6px; background: #fff; }
.bildbox__bild figcaption { max-width: 60ch; text-align: center; font-size: .95rem; opacity: .9; }
.bildbox__knopf { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .15); color: #fff; font: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.bildbox__knopf:hover, .bildbox__knopf:focus-visible { background: rgb(255 255 255 / .3); }
.bildbox__zu { top: 10px; right: 10px; font-size: 1.2rem; }
.bildbox__vor { left: 10px; top: 50%; translate: 0 -50%; }
.bildbox__weiter { right: 10px; top: 50%; translate: 0 -50%; }
.bildbox--einzeln .bildbox__vor, .bildbox--einzeln .bildbox__weiter { display: none; }
@media (max-width: 560px) {
  .bildbox__bild { padding: 60px 10px 76px; }
  .bildbox__vor, .bildbox__weiter { top: auto; bottom: 12px; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .wuerfel.rollt, .vier__loch.neu::after, .wackelt, .mj__stein.tipp { animation: none; }
}
