/* Teddys: Plüsch-Figuren, 404-Bühne „In Entwicklung“, „Bald verfügbar“-Szene, Mini-Szenen, Lade-Intro. Nur transform/opacity werden animiert.
   Fell/Volumen kommen aus teddyDefs() (ein Filter + Verläufe je SVG); die Farben stehen hier. */
.ts,.tm,.ti,.tcs,.tcv{--tb-lawn:#f1f3ea;--tb-leaf:#d3e3c3;--tb-leaf-l:#9dbb88;--tb-trunk:#a88466;--tb-fly:#e7a63c;
  --tb-wood:#e2b98a;--tb-wood-d:#a87547;--tb-board:#f6e6cf;--tb-halo:.3;--tb-bulb:#f3ebde}
:root[data-theme="dark"] :is(.ts,.tm,.ti,.tcs){--tb-lawn:#141913;--tb-leaf:#22301f;--tb-leaf-l:#3d5937;--tb-trunk:#6d5442;--tb-fly:#ffd36e;--tb-glow:.55;
  --tb-wood:#7a5537;--tb-wood-d:#4a301d;--tb-board:#3b2a1c;--tb-halo:.95;--tb-bulb:#5b5046}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) :is(.ts,.tm,.ti,.tcs){--tb-lawn:#141913;--tb-leaf:#22301f;--tb-leaf-l:#3d5937;--tb-trunk:#6d5442;--tb-fly:#ffd36e;--tb-glow:.55;
  --tb-wood:#7a5537;--tb-wood-d:#4a301d;--tb-board:#3b2a1c;--tb-halo:.95;--tb-bulb:#5b5046}}
.ts g,.tm g,.ti g,.tcs g,.tcv g{transform-box:view-box;transform-origin:0 0}

/* Figuren: er (a) karamell mit Fliege, sie (b) honig-creme mit Kupfer-Schleife */
.tb--a{--fur:#bd7e4c;--fur2:#f2d9bc;--furl:#6d3f22;--pad:#ecc9a8}
.tb--b{--fur:#eec39b;--fur2:#fdf0e3;--furl:#a8704a;--pad:#f7d5c6}
.tb-f{fill:var(--fur);stroke:var(--furl);stroke-width:1.2;stroke-linejoin:round}
.tb-l{fill:var(--fur2)}
.tb-sh0{stop-color:#fff;stop-opacity:.34}.tb-sh1{stop-color:#fff;stop-opacity:0}.tb-sh2{stop-color:#4b230c;stop-opacity:.34}
.tb-mz0{stop-color:#fff;stop-opacity:.75}.tb-mz1{stop-color:#fff;stop-opacity:.12}.tb-mz2{stop-color:#6b3a1c;stop-opacity:.22}
.tb-ey0{stop-color:#8d6c58}.tb-ey1{stop-color:#2a170c}.tb-ey2{stop-color:#090403}
.tb-ck0{stop-color:#f2826f;stop-opacity:.95}.tb-ck1{stop-color:#f2826f;stop-opacity:0}
.tb-pad{fill:var(--pad)}
.tb-seam{fill:none;stroke:var(--furl);stroke-width:.8;stroke-dasharray:1.7 1.5;stroke-linecap:round;opacity:.6}
.tb-seam--top{opacity:.32}
.tb-ln{fill:none;stroke:var(--furl);stroke-width:1.1;stroke-linecap:round;opacity:.5}
.tb-ink,.tb-nose{fill:#3a2216}.tb-hi{fill:#fff}.tb-hi2{fill:#fff;opacity:.55}
.tb-stitch{fill:none;stroke:#fff;stroke-width:.5;stroke-linecap:round;opacity:.2}.tb-nhi{fill:#fff;opacity:.4}
.tb-mouth{fill:none;stroke:#3a2216;stroke-width:1.15;stroke-linecap:round;stroke-linejoin:round}
.tb-lash{fill:none;stroke:#2a170c;stroke-width:1;stroke-linecap:round}
.tb-cheek{opacity:.6}
.tb-bow{fill:var(--accent);stroke:#a9561f;stroke-width:.9;stroke-linejoin:round}
.tb-bowf{fill:none;stroke:#a9561f;stroke-width:.8;stroke-linecap:round;opacity:.55}
.tb-tie :is(path,rect){fill:#5f88aa;stroke:#3d607e;stroke-width:.8;stroke-linejoin:round}.tb-tie .tb-dot{fill:#fff;stroke:none;opacity:.85}
.tb-band{fill:var(--accent)}.tb-watch{fill:#fff;stroke:#a9561f;stroke-width:1}.tb-whand{fill:none;stroke:#3a2216;stroke-width:.6;stroke-linecap:round}
.tb-helm-d{fill:#f4c14e;stroke:#c48d1c;stroke-width:1;stroke-linejoin:round}.tb-helm-r{fill:#f9d77e;stroke:#c48d1c;stroke-width:.8}
.tb-helm-b{fill:#eab23c;stroke:#c48d1c;stroke-width:1}.tb-helm-hi{fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;opacity:.55}
.tb-handle{fill:#c9956a;stroke:#8a5d3a;stroke-width:.8}.tb-hhead{fill:#949eaa;stroke:#5c6570;stroke-width:.8}
.tb-box{fill:var(--accent);stroke:#a9561f;stroke-width:1}.tb-lid{fill:#e3955d;stroke:#a9561f;stroke-width:1}
.tb-gband{fill:none;stroke:#fff4e6;stroke-width:3.2}.tb-gbow{fill:#fff4e6;stroke:#dcbc9b;stroke-width:.8}
.tb-stem{fill:none;stroke:#6c9a5a;stroke-width:1.4;stroke-linecap:round}.tb-leaf{fill:#86b06d}
.tb-f1{fill:var(--accent)}.tb-f2{fill:#ea93a2}.tb-f3{fill:#f2c64f}.tb-fm{fill:#fff3da}.tb-f3 .tb-fm{fill:var(--accent)}
.tb-paper{fill:#fff8ef;stroke:#d9b48f;stroke-width:1;stroke-linejoin:round}
.tb-rib{fill:none;stroke:var(--accent);stroke-width:1.4;stroke-linecap:round}
.tb-heart{fill:var(--accent)}
.tb-eye{animation:tbBlink 4.7s infinite}
.tb--b .tb-eye{animation-duration:5.6s;animation-delay:-2.1s}
@keyframes tbBlink{0%,92%,97%,100%{transform:scaleY(1)}94.5%{transform:scaleY(.1)}}

/* Kulisse */
.ts-ground{fill:none;stroke:var(--line-strong);stroke-width:1.2}
.ts-grass{fill:none;stroke:var(--line-strong);stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round}
.ts-sun{fill:var(--accent-soft);stroke:var(--accent-line);stroke-width:1.2}
.ts-cloud{fill:var(--bg);stroke:var(--line-2);stroke-width:1.2}
.ts-c1{animation:tbDrift 14s ease-in-out infinite alternate}.ts-c2{animation:tbDrift 18s ease-in-out -6s infinite alternate-reverse}
@keyframes tbDrift{to{transform:translateX(16px)}}
.ts-bar path{stroke:var(--muted);stroke-width:2.4;stroke-linecap:round}
.ts-bar rect{fill:var(--bg);stroke:var(--muted);stroke-width:1.2}
.ts-stripe{fill:var(--accent);opacity:.85}
.ts-blink{fill:var(--accent);animation:tbWarn 1.8s steps(1) infinite}
@keyframes tbWarn{50%{opacity:.25}}
.ts-cone{fill:var(--accent);stroke:#a9561f;stroke-width:1;stroke-linejoin:round}.ts-conestripe{stroke:#fff;stroke-width:2.6}
.ts-sky0{stop-color:var(--bg-2)}.ts-sky1{stop-color:var(--accent-soft)}
.ts-glow0{stop-color:#ffcf7a;stop-opacity:var(--tb-glow,.35)}.ts-glow1{stop-color:#ffcf7a;stop-opacity:0}
.ts-w0{stop-color:var(--bg-2);stop-opacity:0}.ts-w1{stop-color:var(--bg-2);stop-opacity:1}
.ts-lawn{fill:var(--tb-lawn)}
.ts-trunk{fill:none;stroke:var(--tb-trunk);stroke-width:5;stroke-linecap:round}
.ts-crown-o{fill:none;stroke:var(--tb-leaf-l);stroke-width:2.6}.ts-crown{fill:var(--tb-leaf)}
.ts-post{fill:var(--muted);stroke:var(--muted);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ts-lamp{fill:#fff4d8;stroke:var(--muted);stroke-width:1.4;stroke-linejoin:round}.ts-bulb{fill:#ffc95e}
.ts-glow{animation:tbGlow 3.4s ease-in-out infinite}
@keyframes tbGlow{50%{opacity:.7}}
.ts-bench rect{fill:var(--bg);stroke:var(--muted);stroke-width:1.3}
.ts-bench path{fill:none;stroke:var(--muted);stroke-width:2.6;stroke-linecap:round}
.ts-sunset{fill:var(--accent-line);opacity:.7}
.ts-moon,.ts-star{fill:#f6e7c8}
.ts-night{display:none}
:root[data-theme="dark"] :is(.ts,.tm,.tcs) .ts-night{display:inline}:root[data-theme="dark"] :is(.ts,.tm,.tcs) .ts-day{display:none}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) :is(.ts,.tm,.tcs) .ts-night{display:inline}:root:not([data-theme="light"]) :is(.ts,.tm,.tcs) .ts-day{display:none}}
.ts-tw0{animation:tbTwinkle 3s ease-in-out infinite}.ts-tw1{animation:tbTwinkle 4.2s ease-in-out -1s infinite}.ts-tw2{animation:tbTwinkle 5s ease-in-out -2.5s infinite}
@keyframes tbTwinkle{50%{opacity:.3}}
.ts-flyglow{fill:var(--tb-fly);opacity:.3}.ts-flydot{fill:var(--tb-fly)}
.ts-fly{animation:tbFly 6.5s ease-in-out infinite}
.ts-fly2{animation-duration:7.5s;animation-delay:-2s}.ts-fly3{animation-duration:5.8s;animation-delay:-4s;animation-direction:reverse}
.ts-fly4{animation-duration:8s;animation-delay:-1s}.ts-fly5{animation-duration:6.8s;animation-delay:-3s;animation-direction:reverse}.ts-fly6{animation-duration:7.2s;animation-delay:-5s}
@keyframes tbFly{0%,100%{transform:translate(0,0);opacity:.15}25%{transform:translate(7px,-8px);opacity:1}50%{transform:translate(-3px,-15px);opacity:.35}75%{transform:translate(-8px,-5px);opacity:.95}}
/* Sitz-Loop (Bank, „Bald verfügbar“): Beine baumeln, Atmen, kleines Herz */
:is(.ts-s2,.tm-bank,.tcs-sit) .tb-legl{animation:tbDangle 2.6s ease-in-out infinite}
:is(.ts-s2,.tm-bank,.tcs-sit) .tb-legr{animation:tbDangle 2.6s ease-in-out -1.3s infinite}
:is(.ts-s2,.tm-bank,.tcs-sit) .tb--b .tb-legl{animation-duration:3.1s;animation-delay:-.4s}
:is(.ts-s2,.tm-bank,.tcs-sit) .tb--b .tb-legr{animation-duration:3.1s;animation-delay:-1.95s}
@keyframes tbDangle{0%,100%{transform:rotate(7deg)}50%{transform:rotate(-5deg) scaleY(.9)}}
:is(.ts-s2,.tm-bank,.tcs-sit) .tb-bob{animation:tbBreathe 3.8s ease-in-out infinite}
:is(.ts-s2,.tm-bank,.tcs-sit) .tb--b .tb-bob{animation-delay:-1.2s}
@keyframes tbBreathe{50%{transform:scale(1.014,1.024)}}
.ts-lheart{animation:tbLoveUp 9s ease-out 2s infinite;opacity:0}
@keyframes tbLoveUp{0%,72%{transform:scale(.3);opacity:0}78%{transform:scale(1);opacity:1}96%,100%{transform:translateY(-20px) scale(.8);opacity:0}}

/* Mini-Szenen */
.tm{display:block;width:100%;max-width:160px;height:auto;margin:0 auto 10px}
.tm-bank{max-width:260px;border-radius:16px}
.tm-warten .tb-legr{animation:tmTap 6s ease-in-out infinite}
.tm-warten .tb-armr{animation:tmWatch 6s ease-in-out infinite}
.tm-warten .tb-head{animation:tmHead 6s ease-in-out infinite}
.tm-warten .tb-face{animation:tmLook 6s ease-in-out infinite}
@keyframes tmTap{0%,4%,10%,16%,22%,100%{transform:none}7%,13%,19%{transform:translateY(-3.5px)}}
@keyframes tmWatch{0%,34%,64%,100%{transform:none}41%,57%{transform:rotate(86deg)}}
@keyframes tmHead{0%,34%,64%,100%{transform:none}41%,57%{transform:rotate(9deg) translateY(1.5px)}}
@keyframes tmLook{0%,34%,64%,68%,94%,100%{transform:none}41%,57%{transform:translate(2.5px,3.5px)}72%,78%{transform:translateX(-4.5px)}83%,89%{transform:translateX(4.5px)}}
.tm-winken .tb-armr{animation:tmWave 2.8s ease-in-out infinite}
.tm-winken .tb-head{animation:tmTilt 2.8s ease-in-out infinite}
@keyframes tmWave{0%,56%,100%{transform:none}10%,30%{transform:rotate(-20deg)}20%,40%{transform:rotate(12deg)}}
@keyframes tmTilt{0%,60%,100%{transform:none}15%,40%{transform:rotate(-5deg)}}

/* 404 „In Entwicklung“ */
.teddy-404{padding:40px 0 80px}
.ts-card{position:relative;max-width:620px;margin:0 auto 34px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--bg-2);overflow:hidden}
.ts{display:block;width:100%;height:auto}
.ts-replay{position:absolute;right:10px;top:10px;width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--bg) 80%,transparent);color:var(--muted);cursor:pointer;opacity:0;transition:opacity .3s,color .15s}
.ts-card:hover .ts-replay,.ts-replay:focus-visible,.ts-card.is-done .ts-replay{opacity:1}.ts-replay:hover{color:var(--ink)}
.ts-replay svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.teddy-404 h1{margin-bottom:.35em}
.teddy-404 .lead{margin:0 auto 26px}
.teddy-404 .row{justify-content:center}
.teddy-404__code{margin:26px 0 0;font-size:12px;letter-spacing:.08em;color:var(--faint)}
@media(max-width:640px){.teddy-404{padding:20px 0 48px}.ts-card{margin-bottom:26px;border-radius:20px}}

/* „Bald verfügbar“ (teddyComingSoon): Holzgerüst, Schild, Lichterkette, Leiter, Bank */
.tcs-card{position:relative;width:100%;max-width:520px;margin:0 auto;border:1px solid var(--line);border-radius:var(--radius-lg,24px);background:var(--bg-2);overflow:hidden}
.tcs{display:block;width:100%;height:auto}
.tcs-wood rect,.tcs-crate,.tcs-plank{fill:var(--tb-wood);stroke:var(--tb-wood-d);stroke-width:1.2;stroke-linejoin:round}
.tcs-grain{fill:none;stroke:var(--tb-wood-d);stroke-width:.9;stroke-linecap:round;opacity:.45}
.tcs-board{fill:var(--tb-wood);stroke:var(--tb-wood-d);stroke-width:1.4}
.tcs-board-in{fill:var(--tb-board);stroke:var(--tb-wood-d);stroke-width:.6;stroke-opacity:.5}
.tcs-nail{fill:var(--tb-wood-d)}
.tcs-text{font:italic 400 13px var(--serif,Georgia,serif);fill:var(--accent-ink);letter-spacing:.02em;word-spacing:.14em}
.tcs-rope{fill:none;stroke:#a5835f;stroke-width:1.4;stroke-linecap:round}
.tcs-rope1{opacity:0}
.tcs-hook{fill:none;stroke:#857a6e;stroke-width:1.4;stroke-linecap:round}
.tcs-spark{opacity:0}.tcs-sparkl{fill:none;stroke:var(--accent);stroke-width:1.4;stroke-linecap:round}
.tcs-cord{fill:none;stroke:#7a6a5b;stroke-width:.9}
.tcs-cap{fill:#9b9187}.tcs-bulb{fill:var(--tb-bulb);stroke:#c9bba9;stroke-width:.5}
.tcs-halo{opacity:var(--tb-halo)}
.tcs-glow0{stop-color:#ffd27a;stop-opacity:.95}.tcs-glow1{stop-color:#ffd27a;stop-opacity:0}
.tcs-c0{fill:#ffd36e}.tcs-c1{fill:#f39a62}.tcs-c2{fill:#ffe7a3}.tcs-c3{fill:#f6b25e}
.tcs-rail{fill:none;stroke:#bf8f5f;stroke-width:4;stroke-linecap:round}
.tcs-rung{fill:none;stroke:#bf8f5f;stroke-width:2.6;stroke-linecap:round}
.tcs-cap2{fill:#cfa070;stroke:var(--tb-wood-d);stroke-width:1}
.tcs-box rect:not(.tcs-latch){fill:var(--accent);stroke:#a9561f;stroke-width:1.1}
.tcs-boxl{fill:none;stroke:#a9561f;stroke-width:1}.tcs-latch{fill:#f6e4d2;stroke:#a9561f;stroke-width:.7}
.tcs-handle{fill:none;stroke:var(--muted);stroke-width:2.4;stroke-linecap:round}
.tcs-sb,.tcs-sa{opacity:0}
.tcs .ts-lheart{animation-delay:9s}
.tcs-tw{animation-duration:2.4s}

/* Lade-Intro (wird von teddy-intro.js eingefügt) */
.ti{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--bg);transition:opacity .5s ease;padding-bottom:6vh}
.ti.is-out{opacity:0;pointer-events:none}
.ti svg{display:block;width:min(320px,84vw);height:auto}
.ti p{margin:0;font:italic 400 clamp(20px,5vw,24px)/1.2 var(--serif);color:var(--accent);opacity:0;animation:tiCap .6s ease .9s forwards}
@keyframes tiCap{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  .ts *,.tm *,.tcs *,.ts-replay{animation:none!important}
  .ts .ts-s1,.ts .ts-wipe,.ts-replay,.tcs-sb,.tcs-sa,.tcs-h1{display:none}
  .ts .ts-s2,.ts-lheart{opacity:1}
  .ti{display:none}
}
/* Wechselnde Teddy-Szenen (teddyRotator) */
.teddy-rot--clip{max-width:520px;margin:0 auto;border:1px solid var(--line);border-radius:24px;overflow:hidden;background:#fbf7f2;aspect-ratio:1/1}
.teddy-rot__media{display:block;width:100%;height:100%;object-fit:cover}
.teddy-rot--clip+.ts-replay,.teddy-rot--clip .ts-replay{display:none}

/* Guck-Teddys (lib/teddy.ts teddyPeekSvg, public/js/teddy-peek.js) – ohne Hintergrund, an Panel-Kanten */
.tp g{transform-box:view-box;transform-origin:0 0}
.tp{display:block;width:100%;height:auto;overflow:visible}
.tp-wrap{position:absolute;z-index:5;pointer-events:none;transition:opacity .35s ease,transform .35s ease}
.tp-wrap--left{transform:scaleX(-1)}
.tp-wrap .tp :is(.tp-rise,.tp-lean,.tp-ay,.tp-by,.tp-paws){pointer-events:visiblePainted;cursor:pointer}
.tp-wrap.is-bye{opacity:0;transform:translateY(10px)}.tp-wrap--left.is-bye{transform:scaleX(-1) translateY(10px)}
.tp:not(.tp--play) :is(.tp-rise,.tp-ay,.tp-by){transform:translateY(112px)}
.tp:not(.tp--play) .tp-paws{transform:translateY(20px)}
.tp--side:not(.tp--play) .tp-paws{transform:translateX(-16px)}
.tp:not(.tp--play) .tp-hrt{transform:scale(0)}

/* Teddys auf der Startseite */
.hm-teddy{display:grid;gap:40px;align-items:center}
.hm-teddy .ts-card{margin:0 auto;max-width:520px;width:100%}
.ts-card .teddy-rot--clip{border:0;border-radius:0;max-width:none}
@media(min-width:900px){.hm-teddy{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px}}
.hm-teddy__card .teddy-rot:not(.teddy-rot--clip) .tm{max-width:none;margin:0;border-radius:0}
