:root {
  --tinte: #2b1055;
  --tinte-weich: #5b3f8c;
  --pink: #ff6ec7;
  --orange: #ff9f45;
  --gelb: #ffe066;
  --gruen: #4ade80;
  --blau: #38bdf8;
  --lila: #a78bfa;
  --rot: #ef4444;
  --karte: #ffffff;
  --schatten: 8px 8px 0 var(--tinte);
  --rund: 28px;
  --schrift: "Nunito", "Fredoka", ui-rounded, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--schrift);
  color: var(--tinte);
  background: linear-gradient(120deg, #ff9ad5, #ffc785, #fff08a, #9af0b8, #8fd8ff, #c9b6ff, #ff9ad5);
  background-size: 400% 400%;
  animation: regenbogen 30s ease infinite;
  overflow-x: hidden;
  line-height: 1.55;
}

@keyframes regenbogen {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.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;
}

[hidden] { display: none !important; }

/* ---------- Hintergrund ---------- */
.hintergrund { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.kleks {
  position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55;
  animation: treiben 22s ease-in-out infinite alternate;
}
.k1 { width: 340px; height: 340px; background: var(--pink); top: -80px; left: -60px; }
.k2 { width: 280px; height: 280px; background: var(--blau); top: 40%; right: -90px; animation-delay: -6s; }
.k3 { width: 300px; height: 300px; background: var(--gelb); bottom: -100px; left: 20%; animation-delay: -12s; }
.k4 { width: 220px; height: 220px; background: var(--lila); top: 15%; left: 55%; animation-delay: -3s; }
@keyframes treiben {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.2); }
}
.schwebe {
  position: absolute; font-size: 28px; opacity: .7;
  animation: schweben 9s ease-in-out infinite;
}
/* Parallax: Deko scrollt unterschiedlich schnell mit (--scroll wird per JS gesetzt) */
.kleks, .schwebe { translate: 0 calc(var(--scroll, 0) * var(--tiefe, .2) * -1px); }
.k1 { --tiefe: .08; } .k2 { --tiefe: .15; } .k3 { --tiefe: .1; } .k4 { --tiefe: .2; }
.s1 { top: 12%; left: 8%; --tiefe: .35; }
.s2 { top: 30%; right: 10%; animation-delay: -2s; --tiefe: .5; }
.s3 { bottom: 18%; left: 6%; animation-delay: -4s; font-size: 34px; --tiefe: .6; }
.s4 { top: 62%; right: 18%; animation-delay: -1s; --tiefe: .45; }
.s5 { top: 6%; right: 30%; animation-delay: -5s; font-size: 40px; --tiefe: .25; }
@keyframes schweben {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-22px) rotate(6deg); }
}

/* ---------- Ton ---------- */
.ton-schalter {
  position: fixed; top: 16px; right: 16px; z-index: 20;
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--tinte); background: #fff; font-size: 24px;
  box-shadow: 4px 4px 0 var(--tinte); cursor: pointer;
  transition: transform .15s;
}
.ton-schalter:hover { transform: rotate(-8deg) scale(1.06); }
.ton-schalter:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinte); }

/* ---------- Kopf ---------- */
.kopf {
  position: relative; z-index: 1;
  text-align: center; padding: 28px 16px 8px;
}
.maskottchen { width: 150px; height: 150px; margin: 0 auto; }
.maskottchen svg { width: 100%; height: 100%; overflow: visible; }
.kopf .maskottchen svg { animation: huepfen 2.6s ease-in-out infinite; }
@keyframes huepfen {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  45% { transform: translateY(-10px) scale(.97, 1.03); }
  55% { transform: translateY(-10px) scale(.97, 1.03); }
  90% { transform: translateY(0) scale(1.04, .96); }
}

.titel {
  margin: 4px 0 0;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  font-weight: 900; letter-spacing: -.02em; line-height: 1;
}
.titel-text span {
  display: inline-block;
  -webkit-text-stroke: 2px var(--tinte);
  text-shadow: 4px 4px 0 var(--tinte);
  animation: buchstabe 3s ease-in-out infinite;
}
@keyframes buchstabe {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-3deg); }
}
.titel-3000 {
  display: inline-block;
  background: var(--tinte); color: var(--gelb);
  padding: .05em .3em; border-radius: 14px;
  transform: rotate(-6deg); font-size: .62em; vertical-align: middle;
  box-shadow: 4px 4px 0 var(--pink);
}
.untertitel { font-size: 1.15rem; font-weight: 700; margin: 14px 0 6px; }
.friedhof {
  display: inline-block; margin: 6px 0 0; padding: 6px 16px;
  background: #fff; border: 3px solid var(--tinte); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--tinte); font-weight: 700;
}
.friedhof strong { color: #c026d3; font-size: 1.1em; }

/* ---------- Karten ---------- */
main {
  position: relative; z-index: 1;
  width: min(760px, 100% - 32px); margin: 24px auto;
  display: grid; gap: 28px;
}
.karte {
  scroll-margin-top: 20px;
  background: var(--karte);
  border: 3px solid var(--tinte);
  border-radius: var(--rund);
  box-shadow: var(--schatten);
  padding: clamp(20px, 4vw, 34px);
  animation: reinploppen .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes reinploppen {
  from { transform: scale(.92) translateY(14px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.karte h2 { margin: 0 0 14px; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.2; }

textarea {
  width: 100%; resize: vertical; min-height: 130px;
  font: inherit; font-size: 1.08rem; color: var(--tinte);
  padding: 16px 18px; border: 3px solid var(--tinte); border-radius: 20px;
  background: #fffaf0; outline: none;
  transition: box-shadow .2s, background .2s;
}
textarea:focus { background: #fff; box-shadow: 0 0 0 5px rgba(255, 110, 199, .45); }

.eingabe-info {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .88rem; color: var(--tinte-weich); margin-top: 8px;
}
.anonym-hinweis.aktiv { color: #15803d; font-weight: 700; }
.zeichen { font-variant-numeric: tabular-nums; }
.vorschau { margin-top: 8px; font-size: .9rem; background: #f0fdf4; border: 2px dashed #22c55e; border-radius: 14px; padding: 8px 12px; }
.vorschau summary { cursor: pointer; font-weight: 700; color: #15803d; }
.vorschau p { margin: 8px 0 2px; white-space: pre-wrap; word-break: break-word; }

/* ---------- Methoden ---------- */
.methoden { border: 0; padding: 0; margin: 22px 0 0; }
.methoden legend { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; padding: 0; }
.methoden-liste { display: flex; flex-wrap: wrap; gap: 10px; }
.methode {
  position: relative;
}
.methode input { position: absolute; opacity: 0; pointer-events: none; }
.methode label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 3px solid var(--tinte); border-radius: 999px;
  background: #fff; font-weight: 700; cursor: pointer; user-select: none;
  box-shadow: 3px 3px 0 var(--tinte);
  transition: transform .12s, background .2s;
}
.methode label:hover { transform: translateY(-2px) rotate(-2deg); }
.methode input:checked + label { background: var(--farbe, var(--gelb)); transform: translateY(-2px); }
.methode input:focus-visible + label { outline: 4px solid var(--blau); outline-offset: 2px; }

/* ---------- Knöpfe ---------- */
.knopf-gross {
  display: block; width: 100%; margin-top: 26px;
  font: inherit; font-size: clamp(1.25rem, 4vw, 1.6rem); font-weight: 900; color: #fff;
  padding: 18px 24px; border: 3px solid var(--tinte); border-radius: 22px; cursor: pointer;
  background: linear-gradient(90deg, #ff3d9a, #ff7a2f, #ffbf00, #ff3d9a);
  background-size: 300% 100%;
  animation: gluehen 4s linear infinite;
  box-shadow: 6px 6px 0 var(--tinte);
  text-shadow: 2px 2px 0 rgba(43, 16, 85, .55);
  transition: transform .12s, box-shadow .12s;
}
@keyframes gluehen { to { background-position: 300% 0; } }
.knopf-gross:hover { transform: translateY(-3px) scale(1.01); }
.knopf-gross:active { transform: translate(5px, 5px); box-shadow: 1px 1px 0 var(--tinte); }
.knopf-gross:disabled { filter: grayscale(.6); cursor: wait; }

.knoepfe { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.knopf {
  flex: 1 1 220px;
  font: inherit; font-weight: 800; font-size: 1.05rem; color: #fff;
  padding: 14px 18px; border: 3px solid var(--tinte); border-radius: 18px; cursor: pointer;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 5px 5px 0 var(--tinte);
  transition: transform .12s, box-shadow .12s;
}
.knopf:hover { transform: translateY(-2px); }
.knopf:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--tinte); }
.knopf-hell { background: var(--gelb); color: var(--tinte); }

/* ---------- Bühne ---------- */
.buehne-status { text-align: center; font-weight: 800; font-size: 1.15rem; margin: 0 0 14px; min-height: 1.6em; }
.buehne {
  position: relative; height: clamp(320px, 55vw, 420px);
  border: 3px solid var(--tinte); border-radius: 22px; overflow: hidden;
  background: radial-gradient(circle at 50% 120%, #fff7c2 0%, #bfe9ff 45%, #9ad0ff 100%);
}
.buehne.weltall { background: radial-gradient(circle at 50% 50%, #3b1a73 0%, #12062b 80%); transition: background 1s; }
.buehne.wackeln { animation: buehnen-wackeln .45s linear; }
@keyframes buehnen-wackeln {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 4px); }
  40% { transform: translate(7px, -5px); }
  60% { transform: translate(-5px, -3px); }
  80% { transform: translate(4px, 5px); }
}
.partikel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; }

.darsteller {
  position: absolute; left: 0; top: 0; z-index: 4;
  will-change: transform, opacity;
  line-height: 1;
}
.emoji { font-size: 84px; }

.klops { width: 170px; text-align: center; z-index: 5; }
.klops svg { width: 150px; height: 112px; display: block; margin: 0 auto; overflow: visible; }
.klops-name {
  display: inline-block; margin-top: 2px; max-width: 200px;
  background: #fff; border: 2px solid var(--tinte); border-radius: 12px;
  padding: 2px 10px; font-weight: 800; font-size: .82rem; line-height: 1.25;
}
.klops-zittern svg { animation: zittern .18s linear infinite; }
@keyframes zittern {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  75% { transform: translate(2px, -1px); }
}

.sprechblase {
  background: #fff; border: 3px solid var(--tinte); border-radius: 18px;
  padding: 8px 14px; font-weight: 900; font-size: 1.4rem; white-space: nowrap;
  box-shadow: 3px 3px 0 var(--tinte);
}
.countdown { font-size: 90px; font-weight: 900; color: #fff; -webkit-text-stroke: 3px var(--tinte); text-shadow: 5px 5px 0 var(--tinte); }

.schwarzes-loch { width: 200px; height: 200px; z-index: 3; }
.loch-innen {
  width: 100%; height: 100%; border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #000 0 45%, transparent 47%),
    conic-gradient(from 0deg, #ff6ec7, #ffb347, #ffe066, #a78bfa, #38bdf8, #ff6ec7);
  box-shadow: 0 0 50px 18px rgba(167, 139, 250, .75);
  animation: drehen 1.2s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.schredder {
  width: 220px; height: 120px; z-index: 6;
  background: linear-gradient(#9ca3af, #6b7280);
  border: 3px solid var(--tinte); border-radius: 16px 16px 8px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  color: #fff; font-weight: 900; font-size: .8rem; letter-spacing: .06em; padding-bottom: 10px;
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .15);
}
.schredder::before {
  content: ""; position: absolute; top: 16px; left: 22px; right: 22px; height: 12px;
  background: #111; border-radius: 6px;
}
.schredder .lampe { width: 12px; height: 12px; border-radius: 50%; background: var(--gruen); margin-bottom: 8px; box-shadow: 0 0 10px var(--gruen); }

.blase {
  width: 230px; height: 230px; border-radius: 50%; z-index: 6;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .95) 0 8%, transparent 14%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(255, 110, 199, .35) 68%, rgba(56, 189, 248, .45) 80%, rgba(255, 224, 102, .55) 100%);
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 25px rgba(255, 255, 255, .6), inset 0 0 30px rgba(167, 139, 250, .5);
}

.stempel-gross {
  z-index: 8; font-size: 52px; font-weight: 900; color: var(--rot);
  border: 7px solid var(--rot); border-radius: 14px; padding: 6px 20px;
  letter-spacing: .04em; background: rgba(255, 255, 255, .55);
  text-transform: uppercase; white-space: nowrap;
}
.formular {
  width: 230px; z-index: 3; background: #fffdf3; border: 3px solid var(--tinte); border-radius: 8px;
  padding: 14px 16px 60px; font-size: .78rem; font-weight: 700; box-shadow: 4px 4px 0 rgba(43, 16, 85, .3);
}
.formular b { display: block; font-size: .95rem; margin-bottom: 6px; }
.formular i { display: block; height: 8px; background: #e5e7eb; border-radius: 4px; margin: 6px 0; }

.waschmaschine {
  width: 210px; height: 240px; z-index: 3;
  background: linear-gradient(#ffffff, #e9eef5);
  border: 3px solid var(--tinte); border-radius: 22px;
}
.waschmaschine .bedien { height: 40px; border-bottom: 3px solid var(--tinte); display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.waschmaschine .bedien span { width: 14px; height: 14px; border-radius: 50%; background: var(--pink); border: 2px solid var(--tinte); }
.waschmaschine .bedien span:nth-child(2) { background: var(--gelb); }
.waschmaschine .bedien span:nth-child(3) { background: var(--blau); margin-left: auto; width: 26px; height: 26px; }
.waschmaschine .tuer {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  width: 150px; height: 150px; border-radius: 50%;
  border: 10px solid #cbd5e1; outline: 3px solid var(--tinte);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .8), rgba(147, 197, 253, .7) 40%, rgba(59, 130, 246, .75));
  overflow: hidden;
}
.waschmaschine.schleudern { animation: zittern .09s linear infinite; }

.endstempel {
  z-index: 12; font-size: clamp(30px, 7vw, 48px); font-weight: 900; text-align: center; line-height: 1.05;
  color: #16a34a; border: 7px solid #16a34a; border-radius: 18px; padding: 10px 22px;
  background: rgba(255, 255, 255, .85); text-transform: uppercase;
}

/* ---------- Ergebnis ---------- */
.ergebnis { text-align: left; }
.hier-ruht { margin: 0; font-weight: 800; color: var(--tinte-weich); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; }
.problemname {
  font-size: clamp(1.6rem, 5vw, 2.3rem) !important;
  background: linear-gradient(90deg, #db2777, #ea580c, #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 4px 0 14px !important;
}
.geschichte { font-size: 1.12rem; margin: 0 0 20px; }
.impulse { display: grid; gap: 14px; }
.impuls { border: 3px solid var(--tinte); border-radius: 20px; padding: 14px 18px; }
.impuls h3 { margin: 0 0 4px; font-size: 1.05rem; }
.impuls p { margin: 0; font-size: 1.05rem; }
.impuls-reframe { background: #e0f2fe; }
.impuls-staerke { background: #fef9c3; }
.impuls-frage { background: #fce7f3; }

.stempel-zeile { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 24px; }
.stempel {
  flex: none; color: #16a34a; border: 5px solid #16a34a; border-radius: 12px;
  padding: 8px 14px; font-weight: 900; font-size: 1.25rem; line-height: 1.1; text-align: center;
  transform: rotate(-8deg);
  animation: stempeln .5s cubic-bezier(.3, 1.6, .5, 1) both .3s;
}
@keyframes stempeln {
  from { transform: rotate(-8deg) scale(2.6); opacity: 0; }
  to { transform: rotate(-8deg) scale(1); opacity: 1; }
}
.abschluss { flex: 1 1 240px; margin: 0; font-weight: 800; font-size: 1.1rem; }
.hinweis-klein { font-size: .85rem; color: var(--tinte-weich); margin: 14px 0 0; }

/* ---------- Krise ---------- */
.krise { background: #fffbeb; }
.hilfe-liste { padding-left: 20px; }
.hilfe-liste li { margin-bottom: 8px; }
.hilfe-liste a { color: #b91c1c; font-weight: 800; }

/* ---------- Fuß ---------- */
.fuss { position: relative; z-index: 1; text-align: center; padding: 10px 16px 40px; }
.spruch {
  display: inline-block; max-width: 640px; margin: 0;
  background: rgba(255, 255, 255, .75); border: 3px solid var(--tinte); border-radius: 18px;
  padding: 12px 18px; font-weight: 800; font-size: 1.05rem;
  transition: opacity .5s;
}
.fuss-links { margin-top: 10px; font-weight: 700; }
.fuss-links a { color: var(--tinte); }

/* ---------- Unterseiten ---------- */
.unterseite main { display: block; }
.unterseite .karte h1 { margin-top: 0; }
.platzhalter { background: #fef3c7; border: 2px dashed #d97706; padding: 2px 6px; border-radius: 6px; }

@media (max-width: 520px) {
  .emoji { font-size: 64px; }
  .ton-schalter { width: 44px; height: 44px; font-size: 20px; top: 10px; right: 10px; }
  .maskottchen { width: 120px; height: 120px; }
  .stempel-gross { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  /* Langsame, ruhige Hintergrundbewegung bleibt erhalten – nur Wackeln, Zittern & Parallax entfallen */
  body, .kleks, .schwebe { animation-duration: 40s !important; animation-iteration-count: infinite !important; }
}

/* ---------- Maskottchen-Details ---------- */
.sf-maul { transform-box: fill-box; transform-origin: 50% 10%; transform: scaleY(.38); transition: transform .22s cubic-bezier(.3,1.5,.5,1); }
.offen .sf-maul { transform: scaleY(1.25); }
.sf-pupillen { transition: transform .12s ease-out; }
.sf-antenne { animation: antenne 1.6s ease-in-out infinite; }
@keyframes antenne { 0%, 100% { fill: #ffe066; } 50% { fill: #4ade80; } }
.kopf .maskottchen { cursor: pointer; }
.buehnen-sf { width: 170px; height: 180px; }
.sf-darsteller { z-index: 6; }
.schnuppert .buehnen-sf svg { animation: schnuppern .5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes schnuppern { from { transform: rotate(-4deg) scale(1, 1); } to { transform: rotate(5deg) scale(1.03, .97); } }
@media (max-width: 520px) { .buehnen-sf { width: 130px; height: 140px; } .klops { width: 140px; } .klops svg { width: 120px; height: 90px; } }
@media (max-width: 520px) { .methoden-liste { gap: 8px; } .methode label { padding: 6px 11px; font-size: .92rem; box-shadow: 2px 2px 0 var(--tinte); } }

/* ---------- Partner-Link ---------- */
.partner {
  display: flex; align-items: center; gap: 18px; margin-top: 26px;
  padding: 14px 18px; border: 3px solid var(--tinte); border-radius: 20px;
  background: linear-gradient(135deg, #f3fbe4, #e3f5c4);
  color: var(--tinte); text-decoration: none;
  box-shadow: 4px 4px 0 var(--tinte);
  transition: transform .15s, box-shadow .15s;
}
.partner:hover { transform: translateY(-3px) rotate(-.5deg); box-shadow: 6px 7px 0 var(--tinte); }
.partner:focus-visible { outline: 4px solid var(--blau); outline-offset: 3px; }
.partner img { flex: none; width: 130px; height: auto; transform: rotate(-4deg); }
.partner-text { font-size: .98rem; line-height: 1.45; }
.partner-text strong { display: block; font-size: 1.08rem; margin-bottom: 2px; }
.partner-link { display: inline-block; margin-top: 6px; font-weight: 800; color: #4d7c0f; }
@media (max-width: 520px) {
  .partner { flex-direction: column; text-align: center; }
  .partner img { width: 120px; }
}

/* ---------- Deko auf dem Handy: klein, an den Rändern, ohne Parallax ---------- */
@media (max-width: 700px) {
  .kleks, .schwebe { translate: none; }
  .schwebe { font-size: 22px !important; opacity: .5; }
  .s1 { top: 3%; left: 6px; }
  .s2 { top: 38%; right: 2px; }
  .s3 { top: auto; bottom: 4%; left: 2px; }
  .s4 { top: 72%; right: 2px; }
  .s5 { top: 26px; right: 74px; }
  .kleks { opacity: .4; }
}
