/* schraubklar.de: das Buero in 3D (includes/buero.php, buero.js).
   Ein Puppenhaus aus CSS-Flaechen ohne Rahmen und Hintergrund: Boden, zwei
   Waende, Kisten als Moebel, Pappfiguren, die sich immer zur Kamera drehen.
   Medienabfragen und weniger Bewegung stehen in anpassung.css. */

/* Registriert, damit sie sich animieren lassen und als Winkel vererbt werden */
@property --schwenk { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --dreh    { syntax: '<angle>'; inherits: true; initial-value: 40deg; }
@property --maus-x  { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --maus-y  { syntax: '<number>'; inherits: true; initial-value: 0; }

/* ---------------------------------------------------------------
   Buehne und Raum. Bei Zoom 1 ragt nichts ab, die Buehne ist so hoch
   wie das ganze Buero; erst beim Hineinzoomen schneidet sie ab.
   --------------------------------------------------------------- */
.bu-panel { margin: 0; }
.bu-buehne {
    --bu-massstab: 1; --zoom: 1;
    position: relative; height: calc(680px * var(--bu-massstab));
    perspective: 2400px; perspective-origin: 50% 20%;
    cursor: grab; touch-action: pan-y; user-select: none;
    transition: --maus-x .7s ease-out, --maus-y .7s ease-out;
}
.bu-buehne.ist-zoom { overflow: hidden; touch-action: none; outline: 3px dashed var(--tinte); outline-offset: -3px; }
.bu-buehne.ist-zieht { cursor: grabbing; transition: none; }
.bu-welt {
    position: absolute; left: 50%; top: 50%; width: 640px; height: 460px; margin: calc(-190px - 40px * (1 - var(--bu-massstab))) 0 0 -320px;
    transform-style: preserve-3d;
    scale: calc(var(--bu-massstab) * var(--zoom)); translate: var(--pan-x, 0px) var(--pan-y, 0px);
    transition: scale .45s cubic-bezier(.3, 1.3, .5, 1), translate .45s ease-out;
}
.ist-zieht .bu-welt { transition: none; }
.bu-raum {
    --W: 640px; --D: 460px; --H: 190px;
    --dreh: calc(40deg + var(--schwenk) + var(--maus-x) * 18deg);
    --kipp: calc(57deg + var(--maus-y) * 7deg);
    position: absolute; inset: 0; transform-style: preserve-3d;
    transform: rotateX(var(--kipp)) rotateZ(var(--dreh));
    animation: bu-schwenk 16s ease-in-out infinite alternate;
}
@keyframes bu-schwenk { from { --schwenk: -6deg; } to { --schwenk: 6deg; } }

.bu-boden {
    position: absolute; inset: 0; border: 3px solid var(--tinte); box-shadow: 10px 10px 0 rgba(17, 16, 16, .12);
    background: repeating-linear-gradient(90deg, transparent 0 62px, rgba(17, 16, 16, .13) 62px 64px), #E8E2D2;
}
/* Flaches auf dem Boden liegt einen Pixel hoeher, sonst flimmert es */
.bu-teppich, .bu-sonne, .bu-koerbchen { position: absolute; display: block; transform: translateZ(1px); }
.bu-teppich {
    left: 236px; top: 204px; width: 210px; height: 74px; border: 2.5px solid var(--tinte);
    background: repeating-linear-gradient(90deg, var(--ton-flamme) 0 14px, var(--weiss) 14px 28px);
}
.bu-sonne {
    left: 3px; top: 150px; width: 230px; height: 170px; background: rgba(217, 242, 75, .32);
    clip-path: polygon(0 0, 0 100%, 100% 82%, 72% 6%); animation: bu-sonne 20s ease-in-out infinite alternate;
}
@keyframes bu-sonne { from { translate: 0 -20px; opacity: .7; } to { translate: 0 26px; opacity: 1; } }

/* Waende: hinten an y = 0, links an x = 0, beide schauen in den Raum, unten eine Fussleiste */
.bu-wand {
    position: absolute; height: var(--H); border: 3px solid var(--tinte); backface-visibility: hidden; transform-style: preserve-3d;
    background:
        linear-gradient(to top, #C9C4BA 0 10px, var(--tinte) 10px 12px, transparent 12px),
        radial-gradient(circle, rgba(17, 16, 16, .07) 1px, transparent 1.4px) 0 0 / 10px 10px, var(--weiss);
}
.bu-wand--hinten { left: 0; top: calc(-1 * var(--H)); width: var(--W); transform-origin: 50% 100%; transform: rotateX(-90deg); }
.bu-wand--links  { left: 0; top: calc(var(--D) - var(--H)); width: var(--D); transform-origin: 0 100%; transform: rotateZ(-90deg) rotateX(-90deg); }

.bu-schild {
    position: absolute; left: 236px; top: 30px; width: 196px; padding: 8px 10px; rotate: -3deg;
    background: var(--saeure); border: 3px solid var(--tinte); box-shadow: 4px 4px 0 var(--tinte);
    font-weight: 800; font-size: 17px; line-height: 1.15; text-align: center;
    animation: bu-pendeln 5s ease-in-out infinite alternate; transform-origin: 50% 0;
}
@keyframes bu-pendeln { from { rotate: -4deg; } to { rotate: -1deg; } }
.bu-uhr { position: absolute; left: 470px; top: 30px; width: 58px; }
.bu-uhr line { transform-box: view-box; transform-origin: 30px 30px; }
.bu-uhr-zeiger { animation: bu-dreht 60s steps(60) infinite; }
.bu-uhr-minute { animation: bu-dreht 300s linear infinite; }
@keyframes bu-dreht { to { rotate: 360deg; } }
.bu-kalender { position: absolute; left: 556px; top: 34px; width: 50px; display: grid; border: 2.5px solid var(--tinte); background: var(--weiss); text-align: center; rotate: 3deg; }
.bu-kalender-kopf { background: var(--flamme); border-bottom: 2px solid var(--tinte); font-size: 9px; font-weight: 800; line-height: 1.6; }
.bu-kalender-tag { font-size: 26px; font-weight: 900; line-height: 1.2; }
.bu-pinnwand {
    position: absolute; left: 96px; top: 50px; width: 110px; height: 74px; padding: 6px;
    display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; background: #C9A26B; border: 2.5px solid var(--tinte);
}
.bu-pinnwand i { display: block; width: 22px; height: 28px; background: var(--weiss); border: 1.5px solid var(--tinte); rotate: -5deg; }
.bu-pinnwand i:nth-child(2) { height: 22px; background: var(--saeure); rotate: 4deg; }
.bu-pinnwand i:nth-child(3) { background: var(--ton-blau); rotate: -2deg; }
.bu-pinnwand i:nth-child(4) { width: 30px; height: 18px; background: var(--ton-flamme); rotate: 6deg; animation: bu-flattern 3s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes bu-flattern { 50% { rotate: -3deg; } }
.bu-fenster { position: absolute; left: 150px; top: 34px; width: 156px; }
.bu-wolke { animation: bu-wolke 14s linear infinite; }
@keyframes bu-wolke { from { translate: -60px 0; } to { translate: 80px 0; } }
.bu-vogel { animation: bu-vogel 9s linear infinite; }
@keyframes bu-vogel { 0%, 55% { translate: -40px 10px; opacity: 0; } 58% { opacity: 1; } 95% { opacity: 1; } 100% { translate: 120px -16px; opacity: 0; } }
.bu-tuer-loch, .bu-tuer { position: absolute; left: 310px; top: 64px; width: 70px; height: 126px; border: 3px solid var(--tinte); }
.bu-tuer-loch { background: #2A2832; }
.bu-tuer { background: #C9A26B; transform-origin: 0 50%; transition: transform .9s cubic-bezier(.3, 1.3, .5, 1); }
.bu-tuer-schild { position: absolute; left: 8px; right: 8px; top: 16px; padding: 2px 0; background: var(--weiss); border: 1.5px solid var(--tinte); font-size: 9px; font-weight: 800; text-align: center; }
.bu-tuer-griff { position: absolute; right: 7px; top: 62px; width: 12px; height: 5px; background: var(--tinte); }
.bu-wandbrett { position: absolute; left: 52px; top: 60px; width: 96px; display: flex; gap: 8px; padding: 0 8px; border-bottom: 6px solid var(--tinte); }
.bu-wandbrett i { display: block; width: 14px; height: 16px; border: 2px solid var(--tinte); background: var(--flamme); border-radius: 0 0 3px 3px; }
.bu-wandbrett i:nth-child(2) { background: var(--saeure); }
.bu-wandbrett i:nth-child(3) { background: var(--jeans); }

/* ---------------------------------------------------------------
   Kisten: oben und vier Seiten, Masse ueber --x --y --b --t --h --z
   --------------------------------------------------------------- */
.bu-kiste {
    --oben: #D9B57E; --seite: #C9A26B; --seite2: #B08A55;
    position: absolute; left: var(--x); top: var(--y); width: var(--b); height: var(--t);
    transform-style: preserve-3d; transform: translateZ(var(--z, 0px));
}
.bu-f { position: absolute; display: block; box-sizing: border-box; border: 2px solid var(--tinte); backface-visibility: hidden; background: var(--seite); }
.bu-f--oben   { inset: 0; transform: translateZ(var(--h)); background: var(--oben); }
.bu-f--vorn   { left: 0; width: 100%; top: calc(var(--t) - var(--h)); height: var(--h); transform-origin: 50% 100%; transform: rotateX(-90deg); }
.bu-f--hinten { left: 0; width: 100%; top: 0; height: var(--h); transform-origin: 50% 0; transform: rotateX(90deg); }
.bu-f--rechts { top: 0; height: 100%; left: calc(var(--b) - var(--h)); width: var(--h); transform-origin: 100% 50%; transform: rotateY(90deg); background: var(--seite2); }
.bu-f--links  { top: 0; height: 100%; left: 0; width: var(--h); transform-origin: 0 50%; transform: rotateY(-90deg); background: var(--seite2); }

.bu-server { --x: 18px; --y: 18px; --b: 64px; --t: 54px; --h: 150px; --oben: #3A3842; --seite: #2A2832; --seite2: #232129; }
.bu-server .bu-f--vorn, .bu-server .bu-f--rechts { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px 16px; padding: 12px 10px; }
.bu-led { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--saeure); animation: sz-led 1.6s steps(2, end) infinite; }
.bu-led--rot { background: var(--flamme); animation-delay: -.5s; }
.bu-led:nth-child(3) { animation-delay: -1.1s; }
.bu-led:nth-child(5) { animation-duration: .7s; }
.bu-notiz {
    position: absolute; left: 4px; right: 4px; bottom: 30px; padding: 3px 2px; rotate: -4deg;
    background: var(--saeure); border: 1.5px solid var(--tinte);
    font-weight: 700; font-size: 9px; line-height: 1.15; text-align: center; color: var(--tinte);
}
.bu-regal { --x: 384px; --y: 4px; --b: 74px; --t: 24px; --h: 84px; --oben: #B08A55; --seite: #C9A26B; --seite2: #9C7848; }
.bu-regal .bu-f--vorn, .bu-regal .bu-f--rechts { display: flex; align-items: flex-end; gap: 2px; padding: 0 4px 4px; border-top-width: 8px; }
.bu-ordner { display: block; flex: 1; height: 62%; border: 1.5px solid var(--tinte); background: var(--jeans); }
.bu-ordner:nth-child(2n) { height: 70%; background: var(--flamme); }
.bu-ordner:nth-child(3n) { height: 56%; background: var(--saeure); }

.bu-tisch          { --t: 60px; --h: 44px; }
.bu-tisch--tino    { --x: 200px; --y: 118px; --b: 170px; --t: 70px; }
.bu-tisch--melanie { --x: 120px; --y: 300px; --b: 106px; }
.bu-tisch--janina  { --x: 390px; --y: 300px; --b: 100px; }
.bu-tisch--maja    { --x: 520px; --y: 300px; --b: 100px; }
.bu-lehne   { --x: 250px; --y: 74px; --b: 44px; --t: 10px; --h: 70px; --oben: #3A3842; --seite: #3A3842; --seite2: #2A2832; }
.bu-ablage  { --x: 210px; --y: 128px; --b: 38px; --t: 42px; --h: 5px; --z: 44px; --oben: #2A2832; --seite: #2A2832; --seite2: #2A2832; }
.bu-ablage-stapel { --x: 4px; --y: 4px; --b: 30px; --t: 34px; --h: 10px; --z: 5px; --oben: var(--weiss); --seite: var(--weiss); --seite2: #E8E2D2; opacity: 0; transition: opacity .25s; }
.bu-laptop  { --x: 312px; --y: 122px; --b: 56px; --t: 34px; --h: 4px; --z: 44px; --oben: #3A3842; --seite: #2A2832; --seite2: #2A2832; }
.bu-korb    { --x: 384px; --y: 96px; --b: 18px; --t: 18px; --h: 20px; --oben: #3A3842; --seite: #8A857B; --seite2: #6E695F; }
.bu-korb-knaeuel { position: absolute; left: 3px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--weiss); border: 1.5px solid var(--tinte); }
.bu-tastatur { --t: 12px; --b: 38px; --h: 3px; --z: 44px; --y: 306px; --oben: #3A3842; --seite: #2A2832; --seite2: #2A2832; }
.bu-tastatur--melanie { --x: 154px; }
.bu-tastatur--janina  { --x: 422px; }
.bu-tastatur--maja    { --x: 552px; }
.bu-tasten { position: absolute; inset: 1px; background: repeating-linear-gradient(90deg, #8A857B 0 3px, transparent 3px 5px); opacity: .7; }
.bu-laptop .bu-tasten { inset: 12px 6px 4px; }
.bu-tasse   { --b: 9px; --t: 9px; --h: 11px; --z: 44px; --oben: #5E3B22; --seite: var(--saeure); --seite2: #B9CE3C; }
.bu-tasse--tino    { --x: 254px; --y: 172px; }
.bu-tasse--melanie { --x: 204px; --y: 308px; --seite: var(--flamme); --seite2: #D4401A; }
.bu-tasse--janina  { --x: 470px; --y: 308px; --seite: var(--jeans); --seite2: #7A9CC0; }
.bu-tasse--maja    { --x: 530px; --y: 342px; --seite: var(--weiss); --seite2: #E8E2D2; }
.bu-tasse--kaffee  { --x: 64px; --y: 350px; --z: 52px; --oben: var(--weiss); }
.bu-rechner { --x: 128px; --y: 314px; --b: 16px; --t: 22px; --h: 4px; --z: 44px; --oben: #8A857B; --seite: #6E695F; --seite2: #5E584F; }
.bu-rechner-anzeige { position: absolute; left: 2px; right: 2px; top: 2px; height: 5px; background: var(--saeure); }
.bu-akten   { --x: 594px; --y: 308px; --b: 18px; --t: 30px; --h: 16px; --z: 44px; --oben: var(--weiss); --seite: var(--flamme); --seite2: #D4401A; }
.bu-zettel  { position: absolute; display: block; width: 22px; height: 28px; background: var(--weiss); border: 1.5px solid var(--tinte); transform: translateZ(45px); }
.bu-zettel--melanie { left: 150px; top: 334px; rotate: -12deg; }
.bu-zettel--janina  { left: 398px; top: 326px; rotate: 8deg; }
.bu-zettel--janina2 { left: 402px; top: 330px; rotate: -6deg; background: var(--ton-saeure); }
.bu-schrank { --x: 466px; --y: 26px; --b: 96px; --t: 66px; --h: 44px; --oben: #C9A26B; --seite: #B08A55; --seite2: #9C7848; }
.bu-schrank .bu-f--vorn, .bu-tresen .bu-f--vorn, .bu-tresen .bu-f--rechts { display: flex; justify-content: space-around; align-items: flex-start; padding-top: 8px; }
.bu-griff { display: block; width: 14px; height: 4px; background: var(--tinte); }
.bu-drucker { --x: 476px; --y: 34px; --b: 76px; --t: 52px; --h: 26px; --z: 44px; --oben: var(--jeans); --seite: #7A9CC0; --seite2: #6A8BAE; }
.bu-druckschlitz { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 5px; background: var(--tinte); }
.bu-drucker .bu-f--vorn { display: flex; justify-content: flex-end; align-items: center; padding: 0 8px; }
.bu-led--druck { animation: none; }
.bu-tresen  { --x: 14px; --y: 296px; --b: 62px; --t: 124px; --h: 52px; --oben: #E8E2D2; --seite: #C9C4BA; --seite2: #B5AFA4; }
.bu-kaffee  { --x: 22px; --y: 332px; --b: 40px; --t: 44px; --h: 42px; --z: 52px; --oben: #2A2832; --seite: #C2552E; --seite2: #A8461F; }
.bu-kaffee .bu-f--rechts { display: flex; align-items: center; justify-content: center; }
.bu-kaffee-licht { display: block; width: 8px; height: 8px; border-radius: 50%; background: #5E584F; border: 1.5px solid var(--tinte); transition: background .2s; }
.bu-topf    { --x: 584px; --y: 392px; --b: 32px; --t: 32px; --h: 26px; --oben: #5E3B22; --seite: #C2552E; --seite2: #A8461F; }

/* Stehende Flaechen mit zwei Seiten: Laptopdeckel und Bildschirme */
.bu-schirm {
    position: absolute; transform-style: preserve-3d; transform-origin: 50% 100%;
    transform: translateZ(var(--z)) rotateX(-90deg);
}
.bu-schirm-seite { position: absolute; inset: 0; display: block; box-sizing: border-box; border: 2px solid var(--tinte); backface-visibility: hidden; background: #2A2832; }
.bu-schirm-seite--hinten { transform: rotateY(180deg); display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #1E1D22; }
.bu-deckel  { --z: 48px; left: 312px; top: 118px; width: 56px; height: 38px; }
.bu-deckel .bu-schirm-seite--vorn { display: flex; align-items: center; justify-content: center; }
.bu-signet { width: 16px; }
.bu-monitor { --z: 44px; top: 302px; width: 46px; height: 34px; }
.bu-monitor--melanie { left: 150px; }
.bu-monitor--janina  { left: 418px; }
.bu-monitor--maja    { left: 548px; }
.bu-monitor-fuss { position: absolute; left: 50%; bottom: -2px; width: 12px; height: 6px; translate: -50% 0; background: var(--tinte); }
.bu-code { display: block; height: 3px; width: 70%; background: var(--saeure); animation: bu-code 1.8s steps(4, end) infinite; }
.bu-code:nth-child(2) { width: 50%; background: var(--jeans); animation-delay: -.6s; }
.bu-code:nth-child(4) { width: 40%; background: var(--flamme); animation-delay: -1.2s; }
@keyframes bu-code { 50% { width: 20%; } }

/* Blaetter, die liegen: drei fliegen von der Ablage in den Laptop, der Drucker gibt eins aus */
.bu-blatt { position: absolute; display: block; width: 26px; height: 32px; background: var(--weiss); border: 1.5px solid var(--tinte); opacity: 0; }
.bu-blatt--flug  { left: 216px; top: 134px; transform: translateZ(60px); }
.bu-blatt--druck { left: 497px; top: 66px; width: 34px; height: 40px; transform: translateZ(71px); }
.bu-blatt-haken { position: absolute; left: 7px; top: 9px; width: 18px; height: 18px; border-radius: 50%; background: var(--saeure); border: 1.5px solid var(--tinte); }

/* ---------------------------------------------------------------
   Pappfiguren: Fuesse auf --x / --y, die Figur steht senkrecht und
   dreht sich gegen den Raum, damit sie immer zur Kamera schaut
   --------------------------------------------------------------- */
.bu-wer { --breite: 60px; position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: translate3d(var(--x), var(--y), var(--z, 0px)); }
.bu-schatten { position: absolute; left: -16px; top: -6px; width: 32px; height: 12px; border-radius: 50%; background: var(--tinte); opacity: .2; }
.bu-stand {
    position: absolute; left: calc(var(--breite) / -2); bottom: 0; width: var(--breite);
    transform-origin: 50% 100%;
    transform: rotateZ(calc(-1 * var(--dreh))) rotateX(-90deg) translateY(calc(-1 * var(--hub, 0px)));
}
.bu-figur { display: block; width: 100%; height: auto; overflow: visible; scale: var(--richtung, 1) 1; }

.bu-wer--tino    { --x: 272px; --y: 102px; }
.bu-wer--melanie { --x: 172px; --y: 276px; }
.bu-wer--janina  { --x: 440px; --y: 276px; }
.bu-wer--maja    { --x: 570px; --y: 276px; }
.bu-wer--katze   { --x: 20px; --y: 440px; --breite: 40px; opacity: 0; transition: opacity .4s; }
.bu-wer--katze.ist-da { opacity: 1; }
.bu-wer--katze .bu-schatten { left: -20px; width: 40px; }
.bu-wer--hund { --x: 459px; --y: 412px; --breite: 36px; }
.bu-wer--hund .bu-figur { scale: calc(-1 * var(--richtung, -1)) 1; }
.bu-wer--hund .bu-schatten { left: -14px; width: 28px; }
.bu-koerbchen { left: 432px; top: 396px; width: 54px; height: 32px; border-radius: 50%; border: 3px solid var(--tinte); background: var(--ton-flamme); box-shadow: inset 0 0 0 6px var(--flamme); }
.bu-lampe { --x: 360px; --y: 180px; --z: 44px; --breite: 26px; }
.bu-lampe-licht { opacity: .45; }

/* Gehen: Beine schwingen, die Figur federt (--hub aus buero.js). Am Tisch: tippen. */
.ist-geht .f-bein { transform-box: fill-box; transform-origin: 50% 0; animation: bu-bein .3s ease-in-out infinite alternate; }
.ist-geht .f-bein--r { animation-direction: alternate-reverse; }
@keyframes bu-bein { from { rotate: -22deg; } to { rotate: 22deg; } }
.ist-geht .f-body { animation: none; }
.ist-tippt .f-body { animation: bu-tippen .26s steps(2, end) infinite; }
@keyframes bu-tippen { 50% { translate: 0 1.2px; } }

/* Sprechblase ueber dem Kopf */
.bu-blase {
    position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; z-index: 1;
    width: max-content; max-width: 190px; padding: 6px 10px; font-size: 13px; text-align: center;
    opacity: 0; scale: .6; transition: opacity .2s, scale .25s cubic-bezier(.3, 1.8, .5, 1); pointer-events: none;
}
.bu-blase::after { left: calc(50% - 7px); }
.ist-sagt-1 .bu-blase--1, .ist-sagt-2 .bu-blase--2,
.ist-sagt-3 .bu-blase--3, .ist-sagt-4 .bu-blase--4 { opacity: 1; scale: 1; }

/* Was die Leute in der Hand haben */
.bu-stapel, .bu-haken { opacity: 0; transition: opacity .2s; }
.ist-traegt .bu-stapel, .ist-hakt .bu-haken { opacity: 1; }
.bu-jubel { display: none; }
.ist-jubelt .bu-jubel { display: inline; }
.ist-jubelt .bu-ruhe { display: none; }

/* Der Hund schlaeft, bis er .ist-wach ist */
.bu-hund-auf, .ist-wach .bu-hund-zu, .ist-wach .bu-zzz { display: none; }
.ist-wach .bu-hund-auf { display: inline; }
.bu-wer--hund:not(.ist-wach) .sz-hund-schwanz { animation: none; }
.ist-wach .sz-hund-schwanz { animation-duration: .16s; }
.bu-zzz { font-family: var(--schrift); font-weight: 800; font-size: 10px; }
.bu-zzz text { animation: bu-zzz 2.4s ease-in-out infinite; }
.bu-zzz text:nth-child(2) { animation-delay: .4s; }
.bu-zzz text:nth-child(3) { animation-delay: .8s; }
@keyframes bu-zzz { 0%, 100% { opacity: 0; translate: 0 4px; } 40%, 70% { opacity: 1; translate: 0 0; } }

/* Ueber Tino: Gluehbirne, Fortschritt, Papierkugel */
.bu-birne { --x: 262px; --y: 100px; --z: 112px; --breite: 34px; opacity: 0; scale: .4; transition: opacity .2s, scale .35s cubic-bezier(.3, 1.8, .5, 1); }
.bu-strahlen { animation: bu-strahlen .5s ease-in-out infinite alternate; }
@keyframes bu-strahlen { from { opacity: .3; } to { opacity: 1; } }
.bu-wer--balken { --x: 342px; --y: 150px; --z: 92px; --breite: 64px; opacity: 0; transition: opacity .25s; }
.bu-balken { display: block; height: 12px; padding: 2px; background: var(--weiss); border: 2.5px solid var(--tinte); }
.bu-balken-fuellung { display: block; height: 100%; background: var(--flamme); transform-origin: 0 50%; scale: 0 1; }
.bu-balken-haken {
    position: absolute; right: -14px; top: -9px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--saeure); border: 2.5px solid var(--tinte); scale: 0;
}
.bu-balken-haken::after {
    content: ''; position: absolute; left: 6px; top: 3px; width: 6px; height: 10px;
    border: solid var(--tinte); border-width: 0 3px 3px 0; rotate: 40deg;
}
.bu-wurf { position: absolute; left: 0; top: 0; transform-style: preserve-3d; opacity: 0; }
.bu-knaeuel { --x: 0px; --y: 0px; --breite: 18px; }

/* Pflanze und Dampf stehen wie die Figuren */
.bu-pflanze, .bu-dampf { position: absolute; transform-origin: 50% 100%; }
.bu-pflanze { left: -8px; top: -30px; width: 48px; height: 46px; transform: translateZ(var(--h)) rotateZ(calc(-1 * var(--dreh))) rotateX(-90deg); }
.bu-pflanze svg { display: block; width: 100%; height: auto; transform-origin: 50% 100%; animation: bu-wiegen 4s ease-in-out infinite alternate; }
@keyframes bu-wiegen { from { rotate: -4deg; } to { rotate: 4deg; } }
.bu-dampf {
    left: 30px; top: 294px; width: 24px; height: 60px; display: flex; gap: 3px; align-items: flex-end; opacity: 0; transition: opacity .3s;
    transform: translateZ(94px) rotateZ(calc(-1 * var(--dreh))) rotateX(-90deg);
}
.bu-dampf i { display: block; width: 5px; height: 26px; border-radius: 3px; border: 1.5px solid var(--tinte); border-block: 0; animation: bu-dampf 1.4s ease-in-out infinite; }
.bu-dampf i:nth-child(2) { height: 34px; animation-delay: -.5s; }
.bu-dampf i:nth-child(3) { animation-delay: -.9s; }
@keyframes bu-dampf { 0% { translate: 0 10px; opacity: 0; } 50% { opacity: .8; } 100% { translate: 2px -14px; opacity: 0; } }

/* ---------------------------------------------------------------
   Was der Raum gerade tut (Klassen an .bu-raum, gesetzt von buero.js)
   --------------------------------------------------------------- */
.ist-tuer .bu-tuer { transform: rotateY(-80deg); }
.ist-idee .bu-birne { opacity: 1; scale: 1; }
.ist-wurf .bu-wurf { animation: bu-wurf 1.1s ease-in forwards; }
@keyframes bu-wurf {
    0%   { opacity: 1; transform: translate3d(300px, 112px, 86px); }
    50%  { opacity: 1; transform: translate3d(346px, 102px, 160px); }
    96%  { opacity: 1; transform: translate3d(392px, 104px, 24px); }
    100% { opacity: 0; transform: translate3d(393px, 105px, 20px); }
}
.ist-wurf .bu-korb { animation: bu-wackeln .3s ease-in-out 1s 2; }
@keyframes bu-wackeln { 50% { translate: 2px 0; } }
.ist-ablage .bu-ablage-stapel { opacity: 1; }
.ist-einlesen .bu-blatt--flug { animation: bu-flug 1.1s ease-in-out forwards; }
.ist-einlesen .bu-blatt--2 { animation-delay: .7s; }
.ist-einlesen .bu-blatt--3 { animation-delay: 1.4s; }
@keyframes bu-flug {
    0%   { opacity: 1; transform: translateZ(60px); }
    45%  { opacity: 1; transform: translate3d(54px, 4px, 120px) rotateZ(30deg); }
    100% { opacity: 0; transform: translate3d(108px, 12px, 52px) rotateZ(60deg) scale(.6); }
}
.ist-einlesen .bu-wer--balken, .ist-fertig .bu-wer--balken { opacity: 1; }
.ist-einlesen .bu-balken-fuellung { animation: bu-laden 2.4s .5s ease-in-out forwards; }
.ist-fertig .bu-balken-fuellung { scale: 1 1; }
.ist-fertig .bu-balken-haken { scale: 1; transition: scale .3s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bu-laden { to { scale: 1 1; } }
.ist-druck .bu-blatt--druck { opacity: 1; animation: bu-ausdruck 1.4s ease-out both; }
@keyframes bu-ausdruck { from { transform: translateZ(71px) translateY(-30px); } to { transform: translateZ(71px) translateY(0); } }
.ist-druck .bu-drucker { animation: bu-ruetteln .1s linear 12; }
@keyframes bu-ruetteln { 50% { translate: 1.5px -1px; } }
.ist-druck .bu-led--druck { animation: sz-led .3s steps(2, end) infinite; }
.ist-kaffee .bu-dampf { opacity: 1; }
.ist-kaffee .bu-kaffee-licht { background: var(--saeure); }
.ist-kaffee .bu-kaffee { animation: bu-ruetteln .14s linear 10; }

/* Angehalten: Knopf oder ausser Sicht */
.bu-panel.ist-pause *, .bu-panel.ist-pause { animation-play-state: paused !important; }

/* Unter der Buehne: Tipp und Knoepfe */
.bu-fuss { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 14px 0 0; font-size: 15px; color: var(--blei); }
.bu-knoepfe { display: flex; gap: 10px; margin-left: auto; }
.bu-knoepfe[hidden] { display: none; }
.bu-zoom { min-width: 44px; padding: 0; font-size: 22px; }
.bu-zoom:disabled { opacity: .4; cursor: default; translate: none; box-shadow: 4px 4px 0 var(--tinte); }

/* ---------------------------------------------------------------
   Klickziele (data-bu-ziel, buero.js setzt ist-klick-<ziel> am Panel)
   --------------------------------------------------------------- */
[data-bu-ziel] { cursor: pointer; }
[data-bu-ziel]:focus { outline: none; }
.bu-wer[data-bu-ziel]:focus-visible .bu-stand, .bu-schirm[data-bu-ziel]:focus-visible,
.bu-wand [data-bu-ziel]:focus-visible { outline: 3px solid var(--flamme); outline-offset: 3px; }
.bu-kiste[data-bu-ziel]:focus-visible .bu-f { border-color: var(--flamme); }
.bu-wer[data-bu-ziel]:hover .bu-figur { filter: drop-shadow(0 0 0 var(--tinte)) brightness(1.06); }
.bu-kiste[data-bu-ziel]:hover .bu-f--oben { filter: brightness(1.08); }

/* Die Blase liegt flach ueber der Buehne, nicht im Raum (gestochen scharf) */
.bu-ruf {
    position: absolute; left: var(--ruf-x, 0px); top: var(--ruf-y, 0px); z-index: 2;
    width: max-content; max-width: min(260px, 80%); translate: 0 -100%;
    opacity: 0; scale: .7; transform-origin: 30px 100%; pointer-events: none;
    transition: opacity .15s, scale .25s cubic-bezier(.3, 1.8, .5, 1);
}
.bu-ruf.ist-da { opacity: 1; scale: 1; }

/* Leute und Tiere huepfen */
.ist-klick-tino .bu-wer--tino .bu-figur, .ist-klick-janina .bu-wer--janina .bu-figur,
.ist-klick-maja .bu-wer--maja .bu-figur, .ist-klick-melanie .bu-wer--melanie .bu-figur,
.ist-klick-hund .bu-wer--hund .bu-figur, .ist-klick-katze .bu-wer--katze .bu-figur { animation: bu-huepfen .5s cubic-bezier(.3, 1.6, .5, 1) 2; }
@keyframes bu-huepfen { 50% { translate: 0 -16px; } }
.ist-klick-tino .bu-wer--tino .bu-jubel { display: inline; }
.ist-klick-tino .bu-wer--tino .bu-ruhe { display: none; }
.ist-klick-hund .bu-hund-auf { display: inline; }
.ist-klick-hund .bu-hund-zu, .ist-klick-hund .bu-zzz { display: none; }
.ist-klick-hund .bu-wer--hund .sz-hund-schwanz { animation: sz-wedeln .12s ease-in-out infinite alternate; }

/* Geraete */
.ist-klick-server .bu-server .bu-led { background: var(--flamme); animation-duration: .15s; }
.ist-klick-server .bu-server, .ist-klick-drucker .bu-drucker, .ist-klick-kaffee .bu-kaffee,
.ist-klick-korb .bu-korb { animation: bu-ruetteln .1s linear 12; }
.ist-klick-drucker .bu-led--druck { animation: sz-led .3s steps(2, end) infinite; }
.ist-klick-drucker .bu-blatt--druck { opacity: 1; animation: bu-ausdruck .8s ease-out both; }
.ist-klick-kaffee .bu-dampf { opacity: 1; }
.ist-klick-kaffee .bu-kaffee-licht { background: var(--saeure); }
.ist-klick-laptop .bu-wer--balken { opacity: 1; }
.ist-klick-laptop .bu-balken-fuellung { animation: bu-laden 1.6s ease-in-out forwards; }
.ist-klick-lampe .bu-lampe-licht { opacity: 0; }
.ist-klick-lampe .bu-lampe svg { animation: bu-huepfen .3s ease-out; }

/* Wand und Moebel */
.ist-klick-uhr .bu-uhr-minute, .ist-klick-uhr .bu-uhr-stunde { animation: bu-dreht .9s cubic-bezier(.4, 0, .2, 1) 2; }
.ist-klick-fenster .bu-vogel { animation: bu-vogel-klick 1.6s linear; }
@keyframes bu-vogel-klick { from { translate: -40px 14px; opacity: 1; } to { translate: 130px -20px; opacity: 1; } }
.ist-klick-fenster .bu-wolke { animation-duration: 2s; }
.ist-klick-tuer .bu-tuer { transform: rotateY(-80deg); }
.ist-klick-kalender .bu-kalender-tag { animation: bu-blaettern .7s ease-in-out; transform-origin: 50% 0; }
@keyframes bu-blaettern { 40% { transform: rotateX(80deg); } }
.ist-klick-schild .bu-schild { animation: bu-schaukeln 1.2s ease-in-out; }
@keyframes bu-schaukeln { 20% { rotate: 8deg; } 45% { rotate: -9deg; } 70% { rotate: 4deg; } }
.ist-klick-regal .bu-ordner { animation: bu-huepfen .4s ease-out; }
.ist-klick-regal .bu-ordner:nth-child(2n) { animation-delay: .1s; }
.ist-klick-regal .bu-ordner:nth-child(3n) { animation-delay: .2s; }
.ist-klick-pflanze .bu-pflanze svg { animation: bu-wackeln-stark .45s ease-in-out 3; }
@keyframes bu-wackeln-stark { 25% { rotate: -14deg; } 75% { rotate: 14deg; } }

/* Trefferflaechen: Welt und Raum lassen Klicks durch, nur die Dinge im Raum
   fangen sie. Durchsichtige Schichten (Blaetter, Wurf, Licht, Schatten) nie. */
.bu-welt, .bu-raum { pointer-events: none; }
.bu-raum > * { pointer-events: auto; }
.bu-blatt, .bu-wurf, .bu-birne, .bu-wer--balken, .bu-dampf, .bu-sonne, .bu-schatten,
.bu-wer--katze:not(.ist-da) { pointer-events: none; }
/* Was an der Wand haengt, sitzt einen Pixel davor, sonst gewinnt je nach
   Blickwinkel die Wand den Klick. Die Tuer liegt vor ihrem Loch. */
.bu-wand > * { translate: 0 0 1px; }
.bu-wand > .bu-tuer { translate: 0 0 2px; }
