/* Kims Pâtisserie: gemeinsame Basis für alle Seiten (Tokens wie im Designguide) */
/* Schriften liegen selbst gehostet in fonts/ (Lizenzen daneben), nur latin und latin-ext. Red Hat Display ist variabel */
@font-face { font-family: 'League Gothic'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/league-gothic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'League Gothic'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/league-gothic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Yellowtail'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/yellowtail-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Yellowtail'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/yellowtail-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Red Hat Display'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/red-hat-display-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Red Hat Display'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/red-hat-display-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --moos: #343C2C; --moos-tief: #2A3124; --leinen: #F7F2E7; --umbra: #3A2E24; --rost: #A4482F;
  --stroh: #E2CF96;
  /* Geliked: gedämpftes Weinrot, passt zu Rost und Umbra (HDNET-Rot war zu knallig) */
  --geliebt: #93302B; --kraft: #C4A174; --polaroid: #FCFBF7;
  --text: #3A2E24; --text-leise: #6F685B; --auf-moos: #F1EBDD; --auf-moos-leise: #B6BBA6; --linie: rgba(95,107,78,.26);
  --marker-hell: rgba(201,150,62,.55); --marker-stroh: rgba(164,72,47,.32); --marker-dunkel: rgba(164,72,47,.8);
  /* Abstände im 8er-System: padding, margin und gap nur aus dieser Liste. 4 ist der halbe Schritt für Feinheiten,
     1–2px nur als optische Korrektur. Das Punkteraster liegt auf 24 (3 Schritte), Textzeilen auf Papier auch */
  --space-4: 4px; --space-8: 8px; --space-16: 16px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-48: 48px;
  --space-56: 56px; --space-64: 64px; --space-80: 80px; --space-96: 96px; --space-128: 128px; --raster: 24px;
  /* Typo-Skala für Plakat-Überschriften. Gleiche Rolle = gleiche Größe, egal welches Tag im HTML steht.
     h1 Seitentitel · h2 Abschnitt · h3 Karte/Dialog · h4 Gruppe in einer Karte · h5 kleine Karte im Katalograster */
  --h1: 96px; --h2: 46px; --h3: 40px; --h4: 30px; --h5: 24px;
  --f-plakat: 'League Gothic', 'Arial Narrow', sans-serif; --f-schwung: 'Yellowtail', cursive; --f-text: 'Red Hat Display', system-ui, sans-serif;
  /* Karteikarte: Kopflinie bei 24, Zeilen alle 32. Punktraster: ein Punkt alle 24 (var(--raster)) */
  --karteikarte: linear-gradient(transparent 22px, var(--rost) 22px 24px, transparent 24px) 0 0 / 100% 100% no-repeat,
                 repeating-linear-gradient(transparent 0 31px, var(--linie) 31px 32px) 0 24px, var(--leinen);
  --punktraster: radial-gradient(circle, rgba(70,58,44,.18) 1px, transparent 1.4px) 12px 12px / 24px 24px, var(--leinen);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--moos); color: var(--auf-moos); font: 16px/1.5 var(--f-text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--stroh); outline-offset: 3px; }

.seite { max-width: 520px; margin: 0 auto; padding: 0 var(--space-16) calc(var(--space-96) + env(safe-area-inset-bottom)); }

/* Material */
.papier { position: relative; isolation: isolate; color: var(--text); padding: var(--space-24) var(--space-24); rotate: var(--dreh, 0deg); filter: drop-shadow(0 12px 14px rgba(0,0,0,.24)); }
.papier::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--grund, var(--leinen)); clip-path: var(--form, none); border-radius: 0; }
.karteikarte { --grund: var(--karteikarte); padding-top: var(--space-40); }
.punkte { --grund: var(--punktraster); }
.zettel { --grund: var(--stroh); padding-top: var(--space-32); }
.kraft { --grund: var(--kraft); color: #2E2416; }
.umbra { --grund: var(--umbra); color: #F3ECDF; }

.plakat { font-family: var(--f-plakat); font-weight: 400; text-transform: uppercase; line-height: .88; }
.schwung { font-family: var(--f-schwung); font-weight: 400; line-height: 1.15; color: var(--rost); }
.umbra .schwung { color: var(--stroh); }
.leise { font-size: 14px; color: var(--text-leise); }
.umbra .leise { color: #CBBBA8; } .kraft .leise { color: #5A4630; } .zettel .leise { color: #5E5236; }

.marker { position: relative; isolation: isolate; display: inline-block; }
.marker::before { content: ''; position: absolute; z-index: -1; left: -.12em; right: -.16em; top: 40%; bottom: 8%;
  background: var(--markerfarbe, var(--marker-hell)); mix-blend-mode: var(--mischen, multiply);
  border-radius: 32% 10% 28% 12% / 42% 62% 30% 58%; rotate: var(--marker-dreh, -1.6deg);
  transform-origin: left center; transition: scale .35s cubic-bezier(.3,.8,.3,1); }
.zettel .marker { --markerfarbe: var(--marker-stroh); }
.umbra .marker, .auf-moos .marker { --markerfarbe: var(--marker-dunkel); --mischen: normal; }
.marker.aus::before { scale: 0 1; }

.tesa { position: absolute; z-index: 3; width: 80px; height: 24px; pointer-events: none;
  background: linear-gradient(rgba(240,236,214,.78), rgba(222,216,190,.66));
  clip-path: polygon(3% 0, 97% 0, 100% 12%, 96% 26%, 100% 42%, 97% 58%, 100% 74%, 96% 88%, 98% 100%, 2% 100%, 4% 86%, 0 70%, 3% 54%, 0 38%, 4% 22%, 0 8%); }
.tesa.lo { top: -8px; left: -16px; rotate: -34deg; } .tesa.ro { top: -8px; right: -16px; rotate: 34deg; }
.tesa.oben { top: -11px; left: 50%; translate: -50% 0; rotate: -3deg; }

.polaroid { position: relative; rotate: var(--foto-dreh, -2deg); }
.polaroid .abzug { background: var(--polaroid); padding: var(--space-8) var(--space-8) 0; border-radius: 0; box-shadow: 0 1px 1px rgba(0,0,0,.18), 0 14px 22px -12px rgba(0,0,0,.55); }
.polaroid img { aspect-ratio: 1 / .96; height: auto; }
.polaroid figcaption { height: 46px; padding: var(--space-8) var(--space-4) 0; font: 400 23px/1.2 var(--f-schwung); color: var(--umbra); }

.btn { min-height: 48px; padding: 0 var(--space-24); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); border-radius: 0; font-weight: 700; font-size: 15px; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; transition: transform .3s cubic-bezier(.3,1.7,.5,1); }
.btn-voll { background: var(--umbra); color: var(--leinen); }
.umbra .btn-voll { background: var(--stroh); color: var(--umbra); }
.auf-moos .btn-voll { background: var(--stroh); color: var(--umbra); }
.btn-linie { box-shadow: inset 0 0 0 1.5px currentColor; min-height: 40px; padding: 0 var(--space-16); }
.btn[aria-pressed="true"] svg { transform: scale(1.18); }
.btn[aria-pressed="true"] svg path, .herz[aria-pressed="true"] svg path { fill: currentColor; }

/* ---------- Kopf ---------- */
/* Bleibt oben stehen, damit das Logo immer zur Startseite führt. Nach dem ersten Scrollen (.klein, basis.js) rutscht der Kopf
   ein Stück nach oben und die Marke wird kleiner. Die Höhe im Fluss bleibt gleich, nichts springt */
.kopf { position: sticky; top: 0; z-index: 9; display: flex; align-items: center; justify-content: space-between; padding: max(var(--space-16), env(safe-area-inset-top)) 0 var(--space-8);
  pointer-events: none; transition: translate .25s ease; }
.kopf > * { pointer-events: auto; }
/* Die grüne Leiste über die ganze Breite. Mobil endet sie kurz vor der Unterkante des Logos, so sitzt das Logo auf der Kante */
.kopf::before { content: ''; position: absolute; z-index: -1; top: 0; bottom: var(--ueberhang, 0px); left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: var(--moos); transition: box-shadow .25s ease; }
.kopf .marke { transform-origin: 50% 100%; transition: scale .25s ease; }
.kopf.klein { translate: 0 calc(var(--space-24) * -1); }
.kopf.klein::before { box-shadow: 0 1px 0 rgba(241,235,221,.06), 0 12px 24px -14px rgba(0,0,0,.6); }
.kopf.klein .marke { scale: .8; }
/* Logo: Kims in Schwungschrift, schräg rechts neben dem Dach vom Â, damit das Dach frei bleibt */
.marke { text-decoration: none; display: grid; justify-items: start; line-height: 1; }
/* Mobil steht oben nur das Logo: mittig */
@media (max-width: 959px) {
  .kopf { justify-content: center; --ueberhang: var(--space-24); }
  /* Das Logo liegt auf einem eigenen dunklen Rechteck, das oben bündig hängt und unten über die Leiste ragt */
  .kopf { padding-top: env(safe-area-inset-top); }
  .kopf::before { background: var(--moos-tief); }   /* gleiches Grün wie die Navi unten */
  .kopf .marke { padding: var(--space-16) var(--space-16) var(--space-8); background: var(--moos-tief); }
  .kopf .marke span, .intro-schirm .marke span { font-size: 30px; }
  .kopf .marke b, .intro-schirm .marke b { font-size: 44px; }
}
.marke span { font: 400 25px/1 var(--f-schwung); color: var(--stroh); rotate: -7deg; margin: 0 0 calc(var(--space-8) * -1) 1.5em; position: relative; z-index: 1; }
.marke b { font: 400 36px/.9 var(--f-plakat); text-transform: uppercase; letter-spacing: .02em; padding-top: .14em; }

/* ---------- Abschnitte ---------- */
section { margin-top: var(--space-40); scroll-margin-top: 16px; }
/* Sprungziele landen unter dem stehenden Kopf */
html { scroll-padding-top: 56px; }
.abschnitt-kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); margin-bottom: var(--space-16); }
.abschnitt-kopf h2 { font: 400 var(--h2)/.9 var(--f-plakat); text-transform: uppercase; }
.abschnitt-kopf a { font-weight: 600; font-size: 14px; color: var(--auf-moos-leise); text-decoration: none; }
/* Weiter-Link mit Pfeil, z. B. „Alle 16 Zettel“ */
.abschnitt-kopf .mehr { display: inline-flex; align-items: center; gap: var(--space-4); white-space: nowrap; }
.abschnitt-kopf .mehr svg { width: 16px; height: 16px; transition: translate .2s ease; }
.abschnitt-kopf .mehr:hover { color: var(--auf-moos); }
.abschnitt-kopf .mehr[hidden] { display: none; }
.abschnitt-kopf .mehr:hover svg { translate: 3px 0; }

.herz { flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--space-8); min-width: 44px; height: 40px; padding: 0 var(--space-16) 0 var(--space-8); border-radius: 0;
  background: var(--umbra); color: var(--leinen); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; transition: background .2s; }
.herz svg { width: 17px; height: 17px; transition: transform .3s cubic-bezier(.3,1.7,.5,1); }
.herz[aria-pressed="true"] { background: var(--geliebt); }
/* Auch „Lecker“ wird nach dem Antippen dunkelrot */
.btn.lecker[aria-pressed="true"] { background: var(--geliebt); color: var(--leinen); }
.herz[aria-pressed="true"] svg { transform: scale(1.15); }
/* Herz pocht beim Anmachen: groß, kurz zurück, dann bleibt es leicht vergrößert (Herz-Knopf) bzw. normal (Lecker) */
.herz { --herz-ende: 1.15; }
.herz.pocht svg, .btn.lecker.pocht svg { animation: herz-pochen .55s cubic-bezier(.3,1.5,.5,1); }
@keyframes herz-pochen { 0% { transform: scale(1); } 30% { transform: scale(1.7) rotate(-10deg); } 60% { transform: scale(.85) rotate(4deg); } 100% { transform: scale(var(--herz-ende, 1)); } }
/* Zahl rollt (zahlRollen in basis.js): alte und neue Zahl liegen übereinander und tauschen nach oben bzw. unten */
.rollt { display: inline-grid; }
.rollt > span { grid-area: 1 / 1; }
.rollt.hoch .raus { animation: roll-hoch-raus .4s cubic-bezier(.4,0,.2,1) forwards; }
.rollt.hoch .rein { animation: roll-hoch-rein .4s cubic-bezier(.2,.9,.3,1.2) both; }
.rollt.runter .raus { animation: roll-runter-raus .4s cubic-bezier(.4,0,.2,1) forwards; }
.rollt.runter .rein { animation: roll-runter-rein .4s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes roll-hoch-raus { to { transform: translateY(-75%); opacity: 0; } }
@keyframes roll-hoch-rein { from { transform: translateY(75%); opacity: 0; } }
@keyframes roll-runter-raus { to { transform: translateY(75%); opacity: 0; } }
@keyframes roll-runter-rein { from { transform: translateY(-75%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pocht svg { animation: none !important; } }

/* ---------- Auftritt (Startseite, einmal pro Besuch, siehe auftritt() in basis.js) ----------
   Bis es losgeht, ist die Seite unsichtbar (die Klasse setzt ein kleines Skript im <head>, damit nichts aufblitzt) */
html.intro .seite { opacity: 0; }
html.intro .navi { transform: translateY(calc(100% + 40px)); }   /* + 40px: der Block ragt nach oben raus */
.intro-schirm { position: fixed; inset: 0; z-index: 50; cursor: pointer; }
.intro-schirm .marke { position: fixed; margin: 0; transform-origin: 0 0; pointer-events: none; }

/* ---------- Gebäck-Karten (Liste und „Noch mehr“) ---------- */
/* Backtagebuch: mobil einspaltig, ab Tablet drei, ab breitem Desktop vier Spalten */
.liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-40); }
.liste[hidden] { display: none; }
@media (min-width: 700px) { .liste { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-32) var(--space-24); } }
@media (min-width: 1100px) { .liste { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Karte: Polaroid, dann mit Luft Art, Name, Zutaten, unten Lecker wie bei den Wünschen */
.gebacken { display: flex; flex-direction: column; gap: var(--space-24); padding: var(--space-32) var(--space-24) var(--space-24); }
.gebacken:nth-child(odd) { --dreh: .8deg; } .gebacken:nth-child(even) { --dreh: -.9deg; }
.gebacken .polaroid { --foto-dreh: 2deg; margin: 0 2px 2px; }
.gebacken:nth-child(even) .polaroid { --foto-dreh: -2deg; }
.gebacken .abzug { container-type: inline-size; }
.gebacken .polaroid figcaption { height: 38px; font-size: min(20px, 12cqi); white-space: nowrap; }
.gebacken .text { display: grid; gap: var(--space-8); }
.gebacken .sorte { font-size: 13px; font-weight: 600; color: var(--text-leise); }
.gebacken h3 { font-size: var(--h4); line-height: .95; hyphens: auto; overflow-wrap: break-word; }
.gebacken .stimmen { padding-top: 0; }
.gebacken .polaroid { transition: rotate .3s cubic-bezier(.3,1.4,.5,1); }
.gebacken:hover .polaroid { --foto-dreh: 0deg; }
/* Die ganze Karte führt zur Detailseite, der Lecker-Knopf bleibt eigener Button */
.zur-seite { color: inherit; text-decoration: none; }
.zur-seite::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.stimmen .lecker { grid-column: 1 / -1; justify-self: stretch; position: relative; z-index: 2; }
.btn-linie.lecker[aria-pressed="true"] { box-shadow: none; }
/* Noch kein Herz: keine Null, nur eine Einladung */
.stimmen.null .marker { display: none; }
.stimmen.null .leise { grid-column: 1 / -1; }
/* Mobil liegt die Karte quer: Polaroid links, Text rechts (halb und halb), darunter Herzen und Knopf über die ganze Breite */
@media (max-width: 699px) {
  .gebacken { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "bild text" "stimmen stimmen"; align-items: start; column-gap: var(--space-16); row-gap: var(--space-24); }
  .gebacken .polaroid { grid-area: bild; margin: 0; }
  .gebacken .text { grid-area: text; }
  .gebacken .stimmen { grid-area: stimmen; }
  .gebacken .polaroid .abzug { padding: var(--space-4) var(--space-4) 0; }
  .gebacken .polaroid figcaption { height: 28px; padding-top: var(--space-4); }
  .gebacken .polaroid .tesa { width: 64px; height: 20px; top: -9px; }
}

/* ---------- Backtagebuch-Filter (Startseite und backtagebuch.html) ---------- */
.filter { display: grid; gap: var(--space-8); margin-bottom: var(--space-24); }
.filter[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-16); }
.chip { min-height: 40px; padding: var(--space-4) 2px; font: 400 22px/1 var(--f-plakat); text-transform: uppercase; letter-spacing: .01em; color: var(--auf-moos-leise); }
.chip[aria-pressed="true"] { color: var(--auf-moos); }
.chip span { position: relative; isolation: isolate; }
.chip[aria-pressed="true"] span::before { content: ''; position: absolute; z-index: -1; left: -4px; right: -6px; top: 38%; bottom: -2px;
  background: var(--marker-dunkel); border-radius: 32% 10% 28% 12% / 42% 62% 30% 58%; rotate: -1.6deg; }
.filter-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-16); }
/* Schalter: die einzige runde Form auf der Seite, damit er sofort als An/Aus gelesen wird */
.passt { display: inline-flex; align-items: center; gap: var(--space-8); min-height: 44px; font-weight: 600; font-size: 14px; color: var(--auf-moos); }
.passt i { width: 40px; height: 24px; border-radius: 12px; background: rgba(241,235,221,.18); position: relative; transition: background .2s; }
.passt i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--auf-moos); transition: translate .2s; }
.passt.ohne { text-decoration: none; color: var(--stroh); }
.passt[aria-pressed="true"] i { background: var(--rost); }
.passt[aria-pressed="true"] i::after { translate: 16px 0; }
.sortieren { display: flex; gap: var(--space-16); }
.sortieren button { min-height: 40px; font-size: 14px; font-weight: 600; color: var(--auf-moos-leise); }
.sortieren button[aria-pressed="true"] { color: var(--auf-moos); }
.sortieren button span { position: relative; isolation: isolate; }
.sortieren button[aria-pressed="true"] span::before { content: ''; position: absolute; z-index: -1; inset: 45% -4px -2px; background: var(--marker-dunkel); border-radius: 32% 10% 28% 12% / 42% 62% 30% 58%; rotate: -1.6deg; }
.treffer { color: var(--auf-moos-leise); font-size: 13px; }
/* Nur Kim: Gebäck ohne Wunsch eintragen */
.kim-zeile { width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-16); margin: calc(var(--space-4) * -1) 0 var(--space-24); padding: var(--space-16); border: 2px dashed rgba(241,235,221,.32); border-radius: 0; font-size: 15px; }
.kim-zeile .marker { font-weight: 700; }
.kim-zeile .marker::before { top: 12%; bottom: -4%; }
.kim-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); }
.kim-zeile .textknopf { color: var(--auf-moos); }

/* Weiter zur ganzen Seite, unter einer gekürzten Liste: über die ganze Breite, mit Pfeil */
.btn-breit { display: flex; width: 100%; margin-top: var(--space-40); color: var(--auf-moos); text-decoration: none; }
.btn-breit[hidden] { display: none; }
.btn-breit:hover svg { transform: translateX(3px); }

/* Platzhalter, wenn Kim noch kein Foto hochgeladen hat */
.foto-folgt { aspect-ratio: 1 / .96; display: grid; place-items: center; background: var(--punktraster); box-shadow: inset 0 0 0 1px rgba(58,46,36,.08); }
.foto-folgt .schwung { font-size: 26px; rotate: -6deg; }

/* ---------- Wunschzettel (Startseite und wuensche.html) ---------- */
.wunsch { display: flex; flex-direction: column; gap: var(--space-8); }
.wunsch:nth-child(3n+1) { --dreh: -1.3deg; } .wunsch:nth-child(3n+2) { --dreh: 1deg; } .wunsch:nth-child(3n) { --dreh: -.6deg; }
/* Angeheftet mit Tesafilm oben, mal etwas schiefer, mal weniger */
.wunsch:nth-child(even) .tesa.oben { rotate: 4deg; }
.wunsch:nth-child(3n) .tesa.oben { rotate: -6deg; }
/* Eigene Wünsche (und der Block, von dem sie kommen) sind gelb, die der anderen gepunktet */
.wunsch { --grund: var(--punktraster); }
.wunsch.eigen, .wunsch.wunsch-leer { --grund: var(--stroh); }
.wunsch h3 { font-size: var(--h3); hyphens: auto; overflow-wrap: break-word; }
.wunsch .body { font-size: 15px; overflow-wrap: anywhere; }
.wunsch .schwung { font-size: 23px; }
/* Stimmen: Zahl und „… möchten das auch“ in einer Zeile, „Ich auch“ darunter über die ganze Breite */
.stimmen { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-16); margin-top: auto; padding-top: var(--space-8); }
.stimmen .zahl { font: 400 60px/.9 var(--f-plakat); }
.stimmen .marker::before { top: 34%; bottom: 0; left: -8px; right: -10px; rotate: -4deg; }
.stimmen .auch { grid-column: 1 / -1; justify-self: stretch; }
/* „Ich auch“ gedrückt: gefüllt mit Haken. Der Textmarker hinter der Zahl zeigt dasselbe: Du bist dabei */
.btn-linie.auch[aria-pressed="true"] { background: var(--umbra); color: var(--leinen); box-shadow: none; }
.btn-linie.auch[aria-pressed="true"]::before { content: '✓'; font-weight: 800; }

/* Abreißblock (WUNSCH_BLOCK in basis.js): obenauf ein leerer Wunschzettel wie die ausgefüllten, aber noch mit gerader Kante
   unter der Leimkante. Darunter zwei Lagen, die 8px nach rechts unten rausschauen (deshalb 8px schmaler).
   Solange der Zettel als Formular unterwegs ist, fehlt er und an der Leimkante hängt ein Fetzen, danach liegt der nächste nach */
.wunsch.wunsch-leer { --dreh: 0deg; width: calc(100% - var(--space-8)); min-height: 192px; padding-top: var(--space-40); text-align: left; cursor: pointer; }
.wunsch-leer .plakat { font-size: var(--h3); line-height: .95; }
.wunsch-leer .lage { position: absolute; inset: 0; z-index: -2; background: var(--stroh); translate: 8px 10px; filter: brightness(.86); }
.wunsch-leer .lage + .lage { translate: 4px 5px; filter: brightness(.93); }
.wunsch-leer::after { content: ''; position: absolute; z-index: 2; top: -5px; left: -2px; right: -10px; height: 16px;
  background: linear-gradient(rgba(255,255,255,.12), rgba(0,0,0,.18)), var(--umbra); box-shadow: 0 1px 1px rgba(0,0,0,.3); }
.wunsch-leer .fetzen { position: absolute; z-index: 1; top: 11px; left: 0; right: 0; height: 10px; background: var(--stroh); opacity: 0;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 92% 90%, 84% 45%, 75% 100%, 66% 50%, 57% 85%, 48% 40%, 39% 95%, 30% 50%, 21% 90%, 12% 45%, 4% 85%, 0 50%); }
.wunsch-leer::before, .wunsch-leer .plakat { transition: opacity .2s; }
.wunsch-leer.abgezogen::before, .wunsch-leer.abgezogen .plakat { opacity: 0; }
.wunsch-leer.abgezogen .fetzen { opacity: 1; }
.wunsch-leer.nachgelegt::before, .wunsch-leer.nachgelegt .plakat { animation: nachlegen .35s cubic-bezier(.3,1.5,.5,1); }
.wunsch-leer:focus-visible { outline: 2px solid var(--stroh); outline-offset: 12px; }
.wunsch-leer:only-child { grid-column: 1 / -1; max-width: 560px; }

/* ---------- Hauptzutaten als Checkliste (Karte, Gebäck-Seite, Kims Formular) ---------- */
.haken-liste { list-style: none; display: grid; gap: 2px; }
.haken-liste li { display: flex; align-items: center; gap: var(--space-8); min-height: 32px; font-size: 16px; font-weight: 600; }
/* Kästchen mit schnellem Stift-Haken, der etwas übers Kästchen hinausgeht */
.kaestchen { flex: 0 0 auto; position: relative; width: 15px; height: 15px; box-shadow: inset 0 0 0 1.5px rgba(58,46,36,.55); }
.kaestchen svg { position: absolute; left: -1px; top: -5px; width: 20px; height: 20px; fill: none; stroke: var(--rost); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; rotate: -6deg; }
/* No-Gos wie auf der No-Go-Seite: mag nicht = durchgestrichen, Allergie = Textmarker */
/* Deine No-Gos: roter Textmarker dahinter (Allergie zusätzlich fett), nichts durchgestrichen */
.haken-liste .marker.nogo { --markerfarbe: rgba(164,72,47,.4); --mischen: multiply; }
.haken-liste .allergie .zutat-name { font-weight: 800; }
.haken-liste.klein { margin: 2px 0 2px; }
.haken-liste.klein li { min-height: 21px; gap: var(--space-8); font-size: 13px; }
.haken-liste.klein .kaestchen { width: 11px; height: 11px; }
.haken-liste.klein .kaestchen svg { width: 15px; height: 15px; top: -4px; }
.haken-liste .raus { margin-left: auto; width: 36px; height: 32px; font-size: 22px; line-height: 1; color: var(--text-leise); }
/* Zutaten im Formular: Suchfeld und Vorschläge zum Antippen, „+ Neu“ in Rost */
.ofen #o-zutat-zahl { font-weight: 500; }
.ofen .zutat-vorschlaege { display: flex; flex-wrap: wrap; gap: 0 var(--space-16); }
.ofen .zutat-vorschlaege .wahl:hover span::before { scale: 1 1; }
.ofen .zutat-vorschlaege .neu { color: var(--rost); }

.textknopf { text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-4); min-height: 40px; font-size: 14px; font-weight: 600; color: var(--text); }
.textknopf svg { width: 16px; height: 16px; }
.textknopf.weg { color: var(--rost); }
.textknopf[hidden] { display: none; }

/* ---------- Leerer Platz: gestrichelter Umriss, wo sonst etwas hängt ---------- */
.leer-platz { position: relative; display: grid; justify-items: start; gap: var(--space-8); padding: var(--space-32) var(--space-24) var(--space-24); rotate: -.6deg;
  border: 2px dashed rgba(241,235,221,.32); border-radius: 0; color: var(--auf-moos); }
.leer-platz .schwung { color: var(--stroh); font-size: 26px; }
.leer-platz h3 { font-size: var(--h3); }
.leer-platz p:not(.schwung) { max-width: 46ch; color: var(--auf-moos-leise); font-size: 15px; }
.leer-platz .knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); margin-top: var(--space-8); }
.leer-platz .btn-voll { background: var(--stroh); color: var(--umbra); text-decoration: none; }
.leer-platz .textknopf { color: var(--auf-moos); }
.leer-platz .tesa.oben { left: 40px; translate: 0 0; }
.liste > .leer-platz, .leer-platz.ganz { grid-column: 1 / -1; }
@media (min-width: 960px) { .leer-platz { padding: var(--space-40) var(--space-32) var(--space-32); } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Pflichtfeld: Sternchen in Rost, statt „(freiwillig)“ an allen anderen Feldern */
.pflicht { color: var(--rost); font-weight: 800; margin-left: 1px; }
.fehler { font-size: 14px; color: var(--rost); font-weight: 600; }

/* ---------- Nur Kim ---------- */
.nur-kim { display: none !important; }
.ist-kim .nur-kim { display: inline-flex !important; }

/* Gebäck-Formular (eintragen, aus Wunsch, bearbeiten) als Dialog */
.ofen-dialog { margin: auto; padding: var(--space-24) var(--space-16); width: min(820px, 100%); max-width: 100%; max-height: 100dvh; background: none; border: 0; overflow: auto; overscroll-behavior: contain; color: var(--text); }
.ofen-dialog::backdrop { background: rgba(24,28,19,.8); }
body:has(.ofen-dialog[open]) { overflow: hidden; }
.ofen { display: grid; gap: var(--space-24); padding: var(--space-40) var(--space-16) var(--space-24); --dreh: -.3deg; }
.ofen-kopf { padding-right: var(--space-48); }
.ofen-kopf h2 { font-size: var(--h3); }
.ofen-kopf .schwung { font-size: 26px; }
.ofen-kopf .leise { margin-top: var(--space-4); }
.ofen .zu { position: absolute; top: 28px; right: 10px; width: 44px; height: 44px; border-radius: 0; display: grid; place-items: center; color: var(--text-leise); }
.ofen .zu svg { width: 20px; height: 20px; }
.ofen-inhalt { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-24); }
.ofen .foto-wahl { display: grid; justify-items: center; gap: var(--space-16); }
.ofen .foto-wahl .polaroid { width: min(250px, 72%); --foto-dreh: -2.5deg; }
.ofen .foto-wahl figcaption { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ofen .foto-wahl .foto-folgt .schwung { font-size: 24px; }
/* Zuschnitt: das Polaroid ist der Ausschnitt. Ziehen verschiebt, der Regler zoomt */
.zuschnitt { position: relative; aspect-ratio: 1 / .96; overflow: hidden; background: var(--leinen); touch-action: none; }
.zuschnitt[tabindex] { cursor: grab; }
.zuschnitt.zieht { cursor: grabbing; }
.zuschnitt:focus-visible { outline: 2px solid var(--rost); outline-offset: 3px; }
.zuschnitt img { position: absolute; max-width: none; aspect-ratio: auto; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.zuschnitt .foto-folgt { height: 100%; cursor: pointer; }
.zieh-zeichen { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; display: grid; place-items: center; background: rgba(52,60,44,.72); color: var(--leinen); pointer-events: none; transition: opacity .2s; }
.zieh-zeichen svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.zuschnitt.zieht .zieh-zeichen { opacity: 0; }
.ofen .zoom { display: flex; align-items: center; gap: var(--space-8); width: min(250px, 72%); color: var(--text-leise); }
.ofen .zoom[hidden] { display: none; }
.ofen .zoom svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* Eckiger Regler: dünne Linie, quadratischer Griff */
.zoom input[type="range"] { flex: 1; min-width: 0; height: 32px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.zoom input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgba(58,46,36,.45); }
.zoom input[type="range"]::-moz-range-track { height: 2px; background: rgba(58,46,36,.45); }
.zoom input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: calc(var(--space-8) * -1); border: 0; border-radius: 0; background: var(--rost); }
.zoom input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 0; background: var(--rost); }
.zoom input[type="range"]:focus-visible { outline: 2px solid var(--rost); outline-offset: 2px; }
.ofen .foto-knopf { cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-8); min-height: 42px; padding: 0 var(--space-16); border-radius: 0; box-shadow: inset 0 0 0 1.5px currentColor; font-weight: 700; font-size: 14px; }
.ofen .foto-knopf svg { width: 18px; height: 18px; }
.ofen .foto-knopf:focus-within { outline: 2px solid var(--rost); outline-offset: 2px; }
.ofen .felder { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
.ofen .feld { display: grid; gap: var(--space-4); min-width: 0; border: 0; }
.ofen .feld > label, .ofen .feld legend { font-size: 13px; font-weight: 600; color: var(--text-leise); padding: 0; }
.ofen input:not([type="radio"]):not([type="file"]):not([type="range"]), .ofen textarea { width: 100%; border: 0; border-radius: 0; padding: var(--space-8) var(--space-16); font-size: 16px; line-height: 1.45;
  background: rgba(255,255,255,.62); box-shadow: inset 0 0 0 1.5px rgba(58,46,36,.18); color: var(--text); resize: vertical; }
.ofen #o-name { font: 400 30px/1.1 var(--f-plakat); text-transform: uppercase; padding: var(--space-8) var(--space-16) var(--space-8); }
.ofen input:not([type="range"]):focus-visible, .ofen textarea:focus-visible { outline: 2px solid var(--rost); outline-offset: 1px; }
.ofen ::placeholder { color: #8C8475; }
/* Hashtag-Vorschläge in Schwungschrift, wie später auf dem Polaroid */
.ofen .vorschlaege { display: flex; flex-wrap: wrap; gap: 0 var(--space-16); }
.ofen .vorschlag { min-height: 38px; font: 400 21px/1 var(--f-schwung); color: var(--rost); }
/* Auswahl per Textmarker: Sorte (Radio) und Enthält (An/Aus) */
.ofen .wahlen { display: flex; flex-wrap: wrap; gap: 2px var(--space-16); }
.ofen .wahl { position: relative; display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; font-size: 15px; color: var(--text); cursor: pointer; }
.ofen .wahl input { position: absolute; opacity: 0; pointer-events: none; }
.ofen .wahl span, .ofen .vorschlag span { position: relative; isolation: isolate; }
.ofen .wahl span::before, .ofen .vorschlag span::before { content: ''; position: absolute; z-index: -1; left: -5px; right: -6px; top: 38%; bottom: -2px; background: var(--marker-hell);
  border-radius: 32% 10% 28% 12% / 42% 62% 30% 58%; rotate: -1.6deg; transform-origin: left center; scale: 0 1; transition: scale .3s cubic-bezier(.3,.8,.3,1); }
.ofen .wahl:has(input:checked) span::before, .ofen .wahl[aria-pressed="true"] span::before, .ofen .vorschlag[aria-pressed="true"] span::before { scale: 1 1; }
.ofen .wahl:has(input:focus-visible) { outline: 2px solid var(--rost); outline-offset: 2px; border-radius: 0; }
.ofen .enthaelt-gruppe { display: grid; gap: 2px; }
.ofen .enthaelt-gruppe small { font-size: 12px; color: var(--text-leise); }
.ofen-unten { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); padding-top: var(--space-4); }
@media (min-width: 700px) {
  .ofen { padding: var(--space-40) var(--space-32) var(--space-32); }
  .ofen-inhalt { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-32); align-items: start; }
  .ofen .foto-wahl { position: sticky; top: 0; }
  .ofen .foto-wahl .polaroid { width: 100%; }
}

/* Hinweis „Hängt schon“ / „Gab's schon“ beim Wunsch-Anheften */
.gibts { margin-top: var(--space-8); padding: var(--space-8) var(--space-16); border-radius: 0; background: rgba(255,255,255,.4); font-size: 14px; display: grid; gap: var(--space-8); }
.gibts[hidden] { display: none; }
.gibts b { font: 400 22px/1 var(--f-plakat); text-transform: uppercase; }
.gibts .btn { margin: 0; justify-self: start; min-height: 38px; }

/* ---------- Wunsch-Zettel als Modal: ein Zettel vom Abreißblock ---------- */
.zettel-dialog { margin: auto; padding: 0; width: min(380px, calc(100% - 32px)); max-height: none; overflow: visible; background: none; border: 0; color: var(--text); }
.zettel-dialog::backdrop { background: rgba(30,36,24,.38); backdrop-filter: blur(8px) saturate(.9); -webkit-backdrop-filter: blur(8px) saturate(.9); animation: weich-rein .35s ease; }
.zettel-dialog.schliesst::backdrop { opacity: 0; transition: opacity .4s ease; }
@keyframes weich-rein { from { opacity: 0; } }
/* Abgerissener Zettel vom Block: gerissene Oberkante wie die Wunschzettel (papier zettel, data-form="riss-oben") */
.abriss { --dreh: -1.2deg; display: grid; gap: var(--space-8); padding: var(--space-32) var(--space-24) var(--space-24); transform-origin: 50% 0; }
/* Beim Zerknüllen: Knickfalten und Schatten zur Mitte hin, damit die Kugel nach Papier aussieht */
.abriss.knuellt { transform-origin: 50% 50%; }
.abriss::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s ease-in;
  background: linear-gradient(115deg, transparent 30%, rgba(94,82,54,.32) 31%, transparent 41%),
    linear-gradient(62deg, transparent 44%, rgba(255,255,255,.4) 45%, transparent 54%),
    linear-gradient(158deg, transparent 54%, rgba(94,82,54,.34) 55%, transparent 66%),
    linear-gradient(22deg, transparent 18%, rgba(94,82,54,.26) 19%, transparent 30%),
    linear-gradient(95deg, transparent 60%, rgba(255,255,255,.3) 61%, transparent 70%),
    radial-gradient(circle at 50% 52%, transparent 18%, rgba(58,46,36,.38) 62%); }
.abriss.knuellt::after { opacity: 1; }
/* Solange der Zettel fliegt, ist er leer */
.abriss.blanko > * { opacity: 0; }
.abriss h2 { font-size: var(--h3); margin-bottom: var(--space-4); padding-right: var(--space-40); }
.abriss label { font-weight: 600; font-size: 13px; color: #5E5236; margin-top: var(--space-8); }
.abriss input, .abriss textarea { background: transparent; border: 0; border-bottom: 1.5px solid rgba(58,46,36,.3); padding: var(--space-4) 0 var(--space-8); width: 100%; resize: none; font-size: 17px; color: var(--text); }
.abriss #m-name { font: 400 34px/1.1 var(--f-plakat); text-transform: uppercase; }
.abriss input:focus, .abriss textarea:focus { outline: none; border-color: var(--umbra); box-shadow: 0 1.5px 0 var(--umbra); }
.abriss ::placeholder { color: #8F8159; }
.abriss .zu { position: absolute; top: 20px; right: 8px; width: 44px; height: 44px; border-radius: 0; display: grid; place-items: center; color: #5E5236; }
.abriss .zu svg { width: 20px; height: 20px; }
.abriss .unten { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); margin-top: var(--space-16); }
/* Solange der Zettel unterwegs ist, fehlt er oben auf dem Block */
.block i:nth-child(3) { transition: opacity .2s; }
.block.abgezogen i:nth-child(3) { opacity: 0; }
.block.nachgelegt i:nth-child(3) { animation: nachlegen .35s cubic-bezier(.3,1.5,.5,1); }
@keyframes nachlegen { from { translate: 0 -8px; opacity: 0; } }

/* ---------- Kims Auswertungen: Markerstriche statt Balken ---------- */
.zeilen { display: grid; gap: var(--space-16); list-style: none; }
.zeilen .noch-nichts { display: block; font-size: 15px; }
.zeilen li { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr); gap: 2px var(--space-16); align-items: center; }
.zeilen b { font: 400 24px/1 var(--f-plakat); text-transform: uppercase; overflow-wrap: anywhere; }
.zeilen b a { text-decoration: none; }
.zeilen small { grid-column: 2; font-size: 13px; color: var(--text-leise); }
.striche { display: flex; height: 22px; gap: var(--space-4); }
.striche i { height: 100%; border-radius: 32% 10% 28% 12% / 42% 62% 30% 58%; rotate: -1.2deg; }
.striche .a { background: var(--marker-dunkel); }
.striche .m { background: var(--marker-hell); }
.legende { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-16); font-size: 13px; color: var(--text-leise); }
.legende span::before { content: ''; display: inline-block; width: 22px; height: 10px; margin-right: var(--space-8); border-radius: 40% 10% 30% 12%; vertical-align: -1px; }
.legende .a::before { background: var(--marker-dunkel); } .legende .m::before { background: var(--marker-hell); }

/* ---------- Cupcake-Kasse (Gips-Cupcake mit Schlitz) ---------- */
.cupcake { position: relative; display: block; }
.cupcake-bild { display: block; width: 100%; height: auto; overflow: visible; }
.cupcake .koerper, .cupcake .muenze { transform-box: fill-box; }
.cupcake .koerper { transform-origin: 50% 100%; }
.cupcake .muenze { transform-origin: 50% 50%; opacity: 0; }
.cupcake .danke { position: absolute; left: 50%; top: -4%; translate: -50% 0; font: 400 26px/1 var(--f-schwung); color: var(--rost); white-space: nowrap; opacity: 0; pointer-events: none; }
.cupcake.einwurf .muenze { animation: muenze .78s cubic-bezier(.45,0,.75,.5) both; }
.cupcake.einwurf .koerper { animation: wackeln .5s .6s ease-out; }
.cupcake.einwurf .danke { animation: danke 1.4s .72s ease-out both; }
/* Fällt, kippt auf die Kante und rutscht durch den Schlitz */
@keyframes muenze {
  0% { opacity: 0; transform: translateY(-34px) scaleX(1); }
  15% { opacity: 1; transform: translateY(-26px) scaleX(1); }
  58% { opacity: 1; transform: translateY(13px) scaleX(.22); }
  100% { opacity: 1; transform: translateY(50px) scaleX(.18); }
}
@keyframes wackeln { 0% { transform: none; } 30% { transform: scale(1.05, .93); } 60% { transform: scale(.98, 1.04); } 100% { transform: none; } }
@keyframes danke { 0% { opacity: 0; translate: -50% 8px; } 25% { opacity: 1; translate: -50% 0; } 75% { opacity: 1; } 100% { opacity: 0; translate: -50% -10px; } }
@media (prefers-reduced-motion: reduce) { .cupcake.einwurf * { animation: none !important; } }

/* Otter freut sich: Münze rein, kurzer Hüpfer, dann Augen zu und Mund auf, erst danach Herz und Striche.
   Alles in einer Animation von 2,8 s, die am Ende von selbst wieder in den Ruhezustand geht */
.otter { cursor: pointer; }
.otter .danke { display: none; }
.otter .augen-zu, .otter .mund-offen, .otter .freude > * { opacity: 0; }
.otter .herz, .otter .strich { transform-box: fill-box; transform-origin: 50% 50%; }
.otter.einwurf .augen-auf circle { animation: otter-augen-auf 2.8s both; }
/* Unter den Augen hat die Zeichnung Aussparungen im Fell: beim Zukneifen wird die Augenform fellfarben statt unsichtbar */
.otter.einwurf .augen-auf path { animation: otter-lid 2.8s both; }
.otter.einwurf .augen-zu, .otter.einwurf .mund-offen { animation: otter-froh 2.8s both; }
.otter.einwurf .herz { animation: otter-herz 2.8s ease-out both; }
.otter.einwurf .strich { animation: otter-strich 2.8s ease-out both; }
.otter.einwurf .strich:nth-child(3) { animation-delay: .08s; } .otter.einwurf .strich:nth-child(4) { animation-delay: .14s; } .otter.einwurf .strich:nth-child(5) { animation-delay: .2s; }
.otter:focus-visible { outline: 2px solid var(--stroh); outline-offset: 4px; }
@keyframes otter-augen-auf { 0%, 24% { opacity: 1; } 27%, 84% { opacity: 0; } 87%, 100% { opacity: 1; } }
@keyframes otter-lid { 0%, 24% { fill: #3c2518; } 27%, 84% { fill: #895a43; } 87%, 100% { fill: #3c2518; } }
@keyframes otter-froh { 0%, 24% { opacity: 0; } 27%, 84% { opacity: 1; } 87%, 100% { opacity: 0; } }
@keyframes otter-herz { 0%, 32% { opacity: 0; transform: translateY(0) scale(0); } 40% { opacity: 1; transform: translateY(0) scale(1.3); }
  46% { transform: translateY(0) scale(1); } 80% { opacity: 1; transform: translateY(-40px) scale(1); } 100% { opacity: 0; transform: translateY(-70px) scale(.9); } }
@keyframes otter-strich { 0%, 34% { opacity: 0; transform: scale(.3); } 42% { opacity: 1; transform: scale(1.15); } 48%, 80% { opacity: 1; transform: scale(1); } 92%, 100% { opacity: 0; transform: scale(1); } }

/* ---------- Rückmeldung unten ---------- */
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(114px + env(safe-area-inset-bottom)); translate: -50% 0; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: var(--space-16); padding: var(--space-8) var(--space-8) var(--space-8) var(--space-16); border-radius: 0; background: var(--leinen); color: var(--text); font-weight: 600; font-size: 15px;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.6); transition: opacity .2s, translate .25s; }
.toast[hidden] { display: flex; opacity: 0; translate: -50% 16px; pointer-events: none; }
.toast button { flex: 0 0 auto; min-height: 36px; padding: 0 var(--space-16); border-radius: 0; background: var(--umbra); color: var(--leinen); font-size: 14px; font-weight: 700; }
.toast button[hidden] { display: none; }

/* ---------- Navigation ---------- */
/* Fest am unteren Rand, über die ganze Breite. Alles ist eckig: keine Rundungen außer bei den Textmarkern. Der Inhalt bleibt auf Handybreite zentriert */
.navi { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; height: calc(72px + env(safe-area-inset-bottom)); padding: 0 max(0px, calc((100% - 520px) / 2)) env(safe-area-inset-bottom);
  background: var(--moos-tief); display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center; text-align: center;
  box-shadow: 0 -1px 0 rgba(241,235,221,.08), 0 -12px 24px -14px rgba(0,0,0,.6); }
.navi a { display: grid; justify-items: center; gap: 2px; color: var(--auf-moos-leise); text-decoration: none; font: 400 16px/1 var(--f-plakat); text-transform: uppercase; letter-spacing: .02em; padding: var(--space-8) 0; }
.navi a svg { width: 22px; height: 22px; }
.navi a[aria-current="page"] { color: var(--auf-moos); }
.navi a[aria-current="page"] span { position: relative; isolation: isolate; }
.navi a[aria-current="page"] span::before { content: ''; position: absolute; z-index: -1; inset: 30% -4px 0; background: var(--marker-dunkel); border-radius: 30% 10% 26% 12% / 40% 60% 30% 56%; rotate: -2deg; }
.block { justify-self: center; position: relative; width: 62px; height: 62px; margin-top: calc(var(--space-32) * -1); rotate: -4deg; transition: rotate .25s ease; }
.block:active { rotate: 2deg; }
/* Abreißblock: Zettel mit Leimkante oben, wie die Wunschzettel an der Pinnwand */
.block i { position: absolute; inset: 0; background: var(--stroh); }
.block i:nth-child(1) { translate: 4px 5px; filter: brightness(.86); }
.block i:nth-child(2) { translate: 2px 2.5px; filter: brightness(.93); }
.block::before { content: ''; position: absolute; z-index: 2; top: -3px; left: -1px; right: -5px; height: 10px; border-radius: 0;
  background: linear-gradient(rgba(255,255,255,.12), rgba(0,0,0,.18)), var(--umbra); box-shadow: 0 1px 1px rgba(0,0,0,.3); }
/* Nach dem Abreißen bleibt ein Fetzen an der Leimkante hängen */
.block::after { content: ''; position: absolute; z-index: 1; top: 6px; left: 0; right: 0; height: 6px; background: var(--stroh); opacity: 0;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 92% 90%, 84% 45%, 75% 100%, 66% 50%, 57% 85%, 48% 40%, 39% 95%, 30% 50%, 21% 90%, 12% 45%, 4% 85%, 0 50%); }
.block.abgezogen::after { opacity: 1; }
.block b { position: absolute; inset: 0; padding-top: var(--space-8); display: grid; place-items: center; font: 400 44px/1 var(--f-plakat); color: var(--umbra); }

/* Kims Weg zum Dashboard: mobil als Zeichen rechts in der Kopfleiste, am Desktop als Wort hinter der Navigation */
.kim-dashboard { position: absolute; right: 0; bottom: calc(var(--ueberhang, 0px) + var(--space-8)); align-items: center; gap: var(--space-4); min-width: 44px; min-height: 44px; justify-content: center;
  color: var(--auf-moos-leise); text-decoration: none; font: 400 20px/1 var(--f-plakat); text-transform: uppercase; letter-spacing: .02em; }
.kim-dashboard svg { width: 22px; height: 22px; }
.kim-dashboard span { position: relative; isolation: isolate; }
.kim-dashboard[aria-current="page"] { color: var(--auf-moos); }
@media (max-width: 959px) { .kim-dashboard span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }

/* ---------- Kopfnavigation, nur Desktop ---------- */
.kopf-navi { display: none; }

/* Desktop: Navigation wandert nach oben */
@media (min-width: 960px) {
  :root { --h1: 110px; --h2: 60px; --h3: 46px; --h4: 34px; --h5: 30px; }
  .seite { max-width: 1180px; padding: 0 var(--space-40) var(--space-64); }
  .navi { display: none; }
  .kopf { padding-top: var(--space-32); gap: var(--space-24); }
  html { scroll-padding-top: 80px; }
  .kopf .marke { transform-origin: 0 50%; }
  .kim-dashboard { position: static; order: 2; font-size: 24px; padding-left: var(--space-24); border-left: 1.5px solid rgba(241,235,221,.16); }
  .kim-dashboard[aria-current="page"] span::before { content: ''; position: absolute; z-index: -1; left: -4px; right: -6px; top: 38%; bottom: -2px; background: var(--marker-dunkel); border-radius: 32% 10% 28% 12% / 42% 62% 30% 58%; rotate: -1.6deg; }
  .kopf.klein .marke { scale: .8; }
  .kopf-navi { display: flex; align-items: center; gap: var(--space-32); margin-left: auto; }
  .kopf-navi a:not(.btn) { font: 400 24px/1 var(--f-plakat); text-transform: uppercase; letter-spacing: .02em; color: var(--auf-moos-leise); text-decoration: none; padding: var(--space-8) 0; }
  .kopf-navi a[aria-current="page"] { color: var(--auf-moos); }
  .kopf-navi a span { position: relative; isolation: isolate; }
  .kopf-navi a[aria-current="page"] span::before { content: ''; position: absolute; z-index: -1; left: -4px; right: -6px; top: 38%; bottom: -2px; background: var(--marker-dunkel); border-radius: 32% 10% 28% 12% / 42% 62% 30% 58%; rotate: -1.6deg; }
  .kopf-navi .btn { background: var(--stroh); color: var(--umbra); }
  .toast { bottom: 32px; }
  section { margin-top: var(--space-64); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before { transition: none !important; } }
