/* Lotte (mascot.js): Farben nur über --lotte-* aus tokens.css. Animiert werden nur transform und opacity. */
.lotte { position: fixed; z-index: 60; display: flex; align-items: flex-end; gap: var(--a-2); pointer-events: none; }
.lotte.rechts { flex-direction: row-reverse; }
.lotte.kompakt { z-index: 86; } /* Touch: über der Blatt-Oberkante der Peilung (85); voller Text steht im Blatt */
.lotte.kompakt .lotte-bubble { display: flex; align-items: center; gap: var(--a-2); margin-bottom: 8px; padding: var(--a-1) var(--a-2); }
.lotte.kompakt .lotte-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lotte.kompakt .lotte-btns { margin-top: 0; }
.lotte-fig { flex: none; height: 96px; width: 82px; transition: opacity .2s; }
.lotte-fig.wechsel { opacity: .35; transition: none; }
.lotte-fig svg { width: 100%; height: 100%; overflow: visible; }
@media (max-width: 767px) { .lotte-fig { height: 72px; width: 62px; } }
.lotte-bubble { pointer-events: auto; max-width: min(300px, calc(100vw - 100px)); margin-bottom: 36px; padding: var(--a-2) var(--a-3); box-sizing: border-box;
  background: var(--papier-tief); color: var(--tinte); border: 2px solid var(--lotte-akzent); border-radius: var(--r-panel); box-shadow: var(--schwebe); font-size: var(--t-2); line-height: 1.45; }
.lotte-bubble[hidden], .lotte-dots[hidden], .lotte-peil[hidden], .lotte-ziel[hidden] { display: none; }
.lotte-text { margin: 0; }
.lotte-text:empty { display: none; }
.lotte-btns { display: flex; justify-content: flex-end; gap: var(--a-2); margin-top: var(--a-1); }
.lotte-btns button { min-height: 44px; min-width: 44px; }
.lotte-dots { display: flex; gap: 6px; padding: var(--a-1) 0; }
.lotte-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--tinte); opacity: .3; }
.lotte-peil { position: fixed; height: 0; border-top: 2px dashed var(--lotte-akzent); transform-origin: 0 0; pointer-events: none; }
.lotte-ziel { position: fixed; width: 16px; height: 16px; margin: -9px 0 0 -9px; border: 2px solid var(--lotte-akzent); border-radius: 50%; pointer-events: none; }

/* Teile */
.l-svg * { transform-box: fill-box; }
.l-gef, .l-head > circle { fill: var(--lotte-gefieder); stroke: var(--lotte-umriss); stroke-width: 2.5; }
.l-brust { fill: var(--lotte-brust); }
.l-eye circle { fill: var(--lotte-gefieder); } .l-eye .l-glanz { fill: var(--lotte-brust); }
.l-lids ellipse { fill: var(--lotte-brust); stroke: var(--lotte-gefieder); stroke-width: 1; }
.l-lids { transform-origin: 50% 0; transform: scaleY(0); }
.l-beak-up, .l-beak-low { fill: var(--lotte-schnabel); stroke: var(--lotte-umriss); stroke-width: 1.5; }
.l-streif { fill: none; stroke: var(--lotte-brust); stroke-width: 1.4; }
.l-basis { fill: var(--lotte-akzent); }
.l-mal { fill: var(--lotte-gefieder); }
.l-beak-low { transform-origin: 50% 0; }
.l-cap path, .l-cap rect { fill: var(--lotte-muetze); stroke: var(--lotte-umriss); stroke-width: 1.5; }
.l-bommel { fill: var(--lotte-akzent); }
.l-feet ellipse { fill: var(--lotte-schnabel); stroke: var(--lotte-umriss); stroke-width: 1.5; }
.l-stab { stroke: var(--lotte-akzent); stroke-width: 3; stroke-linecap: round; }
.l-rose { fill: var(--lotte-brust); stroke: var(--lotte-akzent); stroke-width: 2; }
.l-stern { fill: var(--lotte-muetze); }
.l-body { transform-origin: 50% 100%; }
.l-head { transform-origin: 50% 90%; transition: transform .3s; }
.l-wingL { transform-origin: 70% 5%; transition: transform .3s; }
.l-wingR { transform-origin: 30% 5%; transition: transform .4s; }
.lotte-fig.flip svg { transform: scaleX(-1); }

/* ruhig: Atmen (endlos, aber dezent; Pause-Knopf), Blinzeln per Klasse */
.lotte[data-anim="normal"] .l-body { animation: lotte-atmen 4s ease-in-out infinite; }
.lotte.blink .l-lids, .lotte[data-state="schlaeft"] .l-lids { transform: scaleY(1); }
/* spricht: Unterschnabel, Anzahl Bewegungen = Lesedauer (höchstens 5 s, --sprech-n aus mascot.js) */
.lotte[data-state="spricht"] .l-beak-low { animation: lotte-schnabel .3s ease-in-out var(--sprech-n, 3); }
/* zeigt: rechter Flügel mit Zeigestab zum Ziel */
.lotte.zeigt .l-wingR { transform: rotate(var(--zeig, 0deg)); }
/* denkt: Kopf geneigt, drei Punkte (3 Durchläufe = 3 s) */
.lotte[data-state="denkt"] .l-head { transform: rotate(-8deg); }
.lotte[data-anim="normal"][data-state="denkt"] .lotte-dots i { animation: lotte-punkt 1s ease-in-out 3; }
.lotte-dots i:nth-child(2) { animation-delay: .15s !important; } .lotte-dots i:nth-child(3) { animation-delay: .3s !important; }
/* freut: ein Hüpfer (2 × 0,6 s = 1,2 s), Flügel hoch */
.lotte[data-anim="normal"][data-state="freut"] .lotte-fig { animation: lotte-hupf .6s ease-out 2; }
.lotte[data-state="freut"] .l-wingL { transform: rotate(35deg); }
.lotte[data-state="freut"]:not(.zeigt) .l-wingR { transform: rotate(-35deg); }
/* hilft: ruhig zugewandt, Kopf leicht schief (keine Bewegung, kein Rot) */
.lotte[data-state="hilft"] .l-head { transform: rotate(7deg); }
/* schläft: Augen zu, Kopf gesenkt */
.lotte[data-state="schlaeft"] .l-head { transform: rotate(5deg) translateY(2px); }

/* Pause (WCAG 2.2.2), Geste im Chart, reduziert: keine Bewegung, Zustände nur überblenden */
.lotte.paused *, .lotte.still * { animation-play-state: paused !important; }
.lotte[data-anim="reduziert"] *, .lotte[data-anim="reduziert"] { animation: none !important; transition-property: opacity !important; }
@media (prefers-reduced-motion: reduce) { .lotte * { animation: none !important; transition-property: opacity !important; } }

@keyframes lotte-atmen { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes lotte-schnabel { 0%, 100% { transform: rotate(0); } 50% { transform: translateY(3px); } }
@keyframes lotte-punkt { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes lotte-hupf { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }

/* in Coach-Marks */
.coach-bubble.mit-lotte { display: grid; grid-template-columns: auto 1fr; column-gap: var(--a-3); }
.coach-bubble.mit-lotte > *:not(.lotte-mini) { grid-column: 2; }
.lotte-mini { position: static; grid-row: 1 / span 4; display: block; width: 62px; height: 72px; }
.lotte-mini svg { width: 100%; height: 100%; }
