/* SMILEY1 / SMILEY2 (Timo, 19 and 20 Nov 2026): a small glossy yellow ball that lives on the page. Drawn here, no emoji
   set, no library. Only transform and opacity move.
   SMILEY3 3: three fixed layers. The black page at the back, the cards in the middle, all text and every button in
   front (z-index 3 below). The layer sits before main in the paint order: at z-index 2 he is on the cards and still under
   every word; at z-index 0 ("hinten") a card really covers him. Nothing about him fades or blurs for depth any more.
   He takes a click anywhere (joy and a somersault); the layer itself never. */
#sm-ebene { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 2; overflow-x: clip; overflow-y: visible; pointer-events: none; }
#sm-ebene.hinten { z-index: 0; }
#sm-ebene.vorn { z-index: 4; } /* SMILEY4 B: in front of an example card, only over its picture */
#smiley, #sm-schatten, .sm-requisit, .sm-flieg { position: absolute; left: 0; top: 0; pointer-events: none; }
#smiley { width: 112px; height: 112px; transform-origin: 56px 112px; will-change: transform; opacity: 0; transition: opacity 260ms ease;
  cursor: pointer; -webkit-tap-highlight-color: transparent; }
#smiley.da { opacity: 1; }
#smiley.da .sm-koerper { pointer-events: auto; border-radius: 50%; }
.sm-koerper { position: absolute; left: 6px; top: 10px; width: 100px; height: 100px; transform-origin: 50px 100px; }
.sm-koerper svg { display: block; position: absolute; left: -6px; top: -10px; width: 112px; height: 112px; overflow: visible; }
/* the contact shadow on the ledge: dark in the middle, a faint warm light from the yellow ball around it (it shows on black) */
#sm-schatten { width: 96px; height: 18px; margin: -9px 0 0 -48px; border-radius: 50%; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(0,0,0,.9), rgba(0,0,0,.5) 55%, rgba(255,196,40,.12) 80%, transparent); }
.sm-lid, .sm-pup, .sm-kopf, .sm-balken { transform-box: fill-box; transform-origin: center; }
.sm-kopf { transform-origin: 50% 100%; }
.sm-froh, .sm-zu, .sm-zwinker, .sm-braue, .sm-o, .sm-dunkel, .sm-rot, .sm-hell { opacity: 0; }
.sm-wange { opacity: .2; }

/* the props: drawn here, no brand marks */
.sm-requisit { opacity: 0; transform-origin: 50% 100%; will-change: transform, opacity; }
.sm-requisit svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sm-krone { transform-box: fill-box; transform-origin: center; }
.sm-balken { transform-origin: 50px 22px; transform-box: view-box; }
.sm-waage-wippt .sm-balken { animation: sm-wippe 2.4s ease-in-out infinite alternate; }
.sm-waage-wippt .sm-schale-l { animation: sm-schale-l 2.4s ease-in-out infinite alternate; }
.sm-waage-wippt .sm-schale-r { animation: sm-schale-r 2.4s ease-in-out infinite alternate; }
@keyframes sm-wippe { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes sm-schale-l { from { transform: translateY(4.4px); } to { transform: translateY(-4.4px); } }
@keyframes sm-schale-r { from { transform: translateY(-4.4px); } to { transform: translateY(4.4px); } }
/* SMILEY4 H: the laptop's screen fills knock by knock (smiley.js shows each piece) */
.sm-z, .sm-s, .sm-ok { opacity: 0; transform-box: fill-box; transform-origin: 0 50%; }
.sm-ok { transform-origin: center; }
.sm-schirm-code { transition: opacity 300ms ease; }

/* what flies: drops, sparks of joy, a heart */
.sm-flieg svg { display: block; width: 100%; height: 100%; }
.sm-tropfen { width: 14px; height: 20px; margin: -10px 0 0 -7px; }
.sm-funke { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.sm-herz { width: 22px; height: 20px; margin: -10px 0 0 -11px; }
.sm-blaeschen { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
/* a letter he nudges straight: its own box for a moment, turned about its foot; its width stays, nothing moves */
.sm-schief { display: inline-block; transform-origin: 50% 85%; }

/* the place next to the form's button: reserved in the layout from the first paint, so nothing moves (CLS 0).
   Large screens: outside the card to the left, twice the button's height. A phone: left of the button inside the card;
   the button keeps its height and its words, it starts 56 px further right, its words on one line. */
/* SMILEY4 E: a third bigger (was 108 and 52 px) */
.sm-platz { position: absolute; left: -200px; width: 144px; height: 144px; margin-top: -36px; pointer-events: none; }
@media (max-width: 699px) {
  .sm-platz { left: -4px; width: 66px; height: 66px; margin-top: -4px; }
  html.js .entwurf .entwurf-senden { margin-left: 66px; width: calc(100% - 66px); padding: 0 10px; white-space: nowrap; }
}

/* SMILEY3 1: no section sits back any more. Every piece of a section (an example card, a price card, a number card,
   a step, a question, a box) is built at a slightly smaller size, and the moment that piece alone is finished it springs
   to full size with the soft spring of SMILEY2's cards, without waiting for its neighbours or its section. The separate
   CSS "scale" is used, so the tilt that the cards get later (their transform) never fights it. leben.js measures each
   piece's own scale while it builds inside it. */
html.bau [data-bau] [data-b="karte"]:not(.karten [data-b="karte"]), html.bau .karten > li { scale: .9; }
html.bau [data-bau] [data-b="karte"].voll:not(.karten [data-b="karte"]), html.bau .karten > li:has(> a.karte.voll) { scale: 1; animation: sm3-feder 950ms cubic-bezier(.3,1.5,.45,1); }
@keyframes sm3-feder { from { scale: .9; } to { scale: 1; } }
@media (max-width: 599px) {
  html.bau [data-bau] [data-b="karte"]:not(.karten [data-b="karte"]), html.bau .karten > li { scale: .93; }
  html.bau [data-bau] [data-b="karte"].voll:not(.karten [data-b="karte"]), html.bau .karten > li:has(> a.karte.voll) { scale: 1; animation-name: sm3-feder-handy; }
  @keyframes sm3-feder-handy { from { scale: .93; } to { scale: 1; } }
}
/* a second after its spring the piece simply stands ("steht", set by leben.js): WebKit otherwise kept the last frame of a
   finished spring on some pieces (seen at .94 on the questions, with a transition and with an animation alike) */
html.bau [data-bau] [data-b="karte"].steht:not(.karten [data-b="karte"]), html.bau .karten > li:has(> a.karte.steht) { scale: none; animation: none; }
/* the cards float on the black: a very soft shadow and a faint light under them */
.k, .karten > li, .karte-b, .garantie { box-shadow: 0 30px 60px -34px rgba(90,150,255,.20), 0 14px 30px -18px rgba(0,0,0,.9); }

@media (prefers-reduced-motion: reduce) {
  #smiley { transition: none; }
  html.bau [data-bau] [data-b="karte"], html.bau [data-bau] [data-b="karte"].voll, html.bau .karten > li, html.bau .karten > li:has(> a.karte.voll) { scale: none; animation: none; }
  .sm-waage-wippt .sm-balken, .sm-waage-wippt .sm-schale-l, .sm-waage-wippt .sm-schale-r { animation: none; }
}

/* SMILEY2: an example card, once finished, lies a little deeper on the black (a stronger shadow that fades in). */
.karten > li::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 46px 80px -36px rgba(90,150,255,.26), 0 24px 44px -22px rgba(0,0,0,.95); transition: opacity 900ms ease 120ms; }
html:not(.bau) .karten > li::after, .karten > li:has(> a.karte.voll)::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .karten > li::after { transition: none; } }

/* SMILEY3 3: the front layer. A finished section is no longer its own closed layer (isolation), so its words and buttons
   can stand in front of him while its cards stay behind him. Every word and every control is lifted to z-index 3, the
   smiley's layer is 2, the cards keep their place in the flow. An example card and a chat bubble hold their words inside
   their own layer (the card's mask, the bubble's pop), so the whole card or bubble stands in front: he lands on its top
   edge or hides behind it, and he is never painted over its words. position: relative without offsets moves nothing. */
html.sm3 .teil[data-bau].gebaut { isolation: auto; }
/* a section still being built stays one closed layer (its cursor and guides need it); as a whole it stands in front of
   him, so no word in it is ever under him, even while he waits on one of its finished pieces */
html.sm3 .teil[data-bau]:not(.gebaut) { z-index: 3; }
/* the phone stage at the top is one layer of its own (will-change: translate) and keeps its words inside: as a whole it
   stands in front of him, he can sit on its edge or hide behind it */
html.sm3 .spalte-buehne { position: relative; z-index: 3; }
/* a piece during its spring (the separate "scale" makes it its own layer and would hold its words under him): the
   whole piece stands in front until it simply stands (.steht) */
html.sm3.bau [data-bau] [data-b="karte"]:not(.steht):not(.karten [data-b="karte"]) { position: relative; z-index: 3; }
html.sm3 #mehr [data-b="t"]:not(.anfragen), html.sm3 #mehr [data-b="knopf"]:not(.anfragen), html.sm3 .angebote .k > *,
html.sm3 .weg-punkt, html.sm3 .entwurf-k :is(.feld label, .paket-wahl label > span, input:not([type="radio"]), textarea, button, .entwurf-fehler, .entwurf-danke),
html.sm3 .karten > li, html.sm3 #erst .bubble, html.sm3 footer,
html.sm3 .weiter a, html.sm3 #mehr-knopf, html.sm3 .antwort > p, html.sm3 .paket-wahl legend > span,
html.sm3 .entwurf-hinweis > span { position: relative; z-index: 3; }
/* a letter of "Leben" the smiley is teasing: its eyes go half shut, a little annoyed */
.tier.genervt > .augen b { height: .095em; border-radius: .01em .01em .09em .09em; }
.tier.genervt > .augen b::after { margin-top: .012em; }
