/* Juice (A.0.203.0, ui/juice.js): Gehen im selben Raum, fliegendes Geld, Pager-Puls, Stempel am Tagesbericht (Kommen/Gehen ohne Gang seit A.0.208.0).
   Die Effektebene liegt über allem (auch über den Tafeln) und nimmt keine Klicks. */
.effekte { position: absolute; inset: 0; pointer-events: none; z-index: 12; overflow: hidden; }

/* Gehen: das Bild wippt im Schritt (eigene Eigenschaft `translate`, so bleibt der Spiegel in `transform` unberührt) */
.stueck.geht img { animation: juice-wippen .3s ease-in-out infinite alternate; }
@keyframes juice-wippen { from { translate: 0 0; rotate: -1.2deg; } to { translate: 0 -1.8%; rotate: 1.2deg; } }

/* Der Betrag der Rechnung auf dem Weg zum Pager */
.geldflug { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-weight: 800; font-size: max(13px, 1.5cqw);
  color: #fff; background: #1f9a5e; border: .15cqw solid #fff; border-radius: 99em; padding: .15em .6em; box-shadow: 0 .2cqw .5cqw rgba(0, 0, 0, .35); }

/* Der Pager pulsiert, wenn Geld ankommt (grün) oder geht (rot) */
.pager.puls-plus { animation: juice-plus .55s ease-out; }
.pager.puls-minus { animation: juice-minus .45s ease-out; }
@keyframes juice-plus { 0% { transform: scale(1); } 35% { transform: scale(1.12); filter: drop-shadow(0 0 .8cqw #3fd68a); } 100% { transform: scale(1); } }
@keyframes juice-minus { 0%, 100% { transform: none; } 20% { transform: translateX(-.3cqw); filter: drop-shadow(0 0 .6cqw #ff5a6e); } 40% { transform: translateX(.3cqw); }
  60% { transform: translateX(-.2cqw); } 80% { transform: translateX(.1cqw); } }

/* Der Stempel: Tinte auf dem Papier */
.stempel { position: absolute; transform: translate(-50%, -50%); font-family: 'Nunito', system-ui, sans-serif; font-weight: 900; text-transform: uppercase;
  letter-spacing: .12em; font-size: max(16px, 2.4cqw); color: #c8233f; border: .3cqw double #c8233f; border-radius: .35em; padding: .15em .55em;
  background: rgba(255, 255, 255, .55); mix-blend-mode: multiply; white-space: nowrap; opacity: .9; }

/* ── Paket 2 (A.0.204.0) ── */
/* kleine Beträge am Pager: Mitternacht (Miete, Löhne, Zinsen) und was ohne sichtbaren Kranken gebucht wird */
.pagerchip { position: absolute; white-space: nowrap; font-weight: 800; font-size: max(12px, 1.25cqw); border-radius: 99em; padding: .12em .55em;
  border: .12cqw solid #fff; box-shadow: 0 .15cqw .4cqw rgba(0, 0, 0, .35); color: #fff; }
.pagerchip.minus { background: #c8233f; }
.pagerchip.plus { background: #1f9a5e; }
/* über den Köpfen: Herz (Meinung steigt), Ärger (fällt), Häkchen (Schritt fertig) */
.kopfzeichen { position: absolute; width: max(22px, 2.4cqw); aspect-ratio: 1; }
.kopfzeichen svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 .1cqw .2cqw rgba(0, 0, 0, .35)); }
.kopfzeichen.herz svg { fill: #e8466a; stroke: #fff; stroke-width: 3; }
.kopfzeichen.aerger svg { fill: none; stroke: #d6283e; }
.kopfzeichen.haken svg circle { fill: #1f9a5e; stroke: #fff; stroke-width: 3; }
.kopfzeichen.haken svg path { stroke: #fff; }
/* der grüne Stempel (Im Plus) */
.stempel.gruen { color: #157a52; border-color: #157a52; }
/* eine geschlossene Tafel auf dem Rückweg in ihr Ding */
.tafel-geht { position: absolute; inset: 0; pointer-events: none; }
/* Knöpfe geben nach; Dinge im Raum heben sich beim Überfahren ein wenig */
.knopf, .hud-knopf { transition: transform .08s ease-out; }
.knopf:active:not(:disabled), .hud-knopf:active:not(:disabled) { transform: translateY(.06em) scale(.94); }
.stueck img { transition: translate .15s ease-out; }
.stueck.glanz img { translate: 0 -.6%; }

/* ── Paket 3 (A.0.205.0) ── */
/* Staub auf der Baustelle: drei (im Rohbau fünf) Wölkchen, die aufsteigen und vergehen */
.staub { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.staub i { position: absolute; bottom: 12%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(225, 225, 220, .85), rgba(225, 225, 220, 0) 70%);
  animation: juice-staub 2.6s ease-out infinite; opacity: 0; }
.staub i:nth-child(1) { left: 12%; } .staub i:nth-child(2) { left: 42%; animation-delay: .9s; } .staub i:nth-child(3) { left: 68%; animation-delay: 1.7s; }
.staub i:nth-child(4) { left: 25%; animation-delay: 1.3s; } .staub i:nth-child(5) { left: 80%; animation-delay: .4s; }
.raum-staub i { width: 12%; bottom: 6%; }
@keyframes juice-staub { 0% { opacity: 0; transform: translateY(0) scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-120%) scale(1.5); } }
/* Sonderausgabe des Stadtkuriers (Stil wie die Zeitung, css/tafel.css zb-…) */
.titelseite { position: absolute; left: 50%; top: 45%; width: min(46%, 34em); padding: .6em 1.2em .9em; color: #1b1915; font-size: max(11px, 1.15cqw);
  background: linear-gradient(100deg, rgba(0, 0, 0, .035), transparent 12%, transparent 88%, rgba(0, 0, 0, .05)), #e9e8e3;
  box-shadow: 0 .6em 2.2em rgba(0, 0, 0, .7); transform: translate(-50%, -50%) rotate(-3deg); }
.titelseite .zb-titel { font-size: 3em; }
.titelseite .zb-aufmacher { border-bottom: 0; margin: 0; padding: 0; }
.titelseite .zb-aufmacher h2 { font-size: 2.1em; text-align: center; }
.titelseite .zb-aufmacher p { text-align: center; font-style: italic; max-width: none; }

/* ── Paket 4 (A.0.206.0) ── */
/* Wartende atmen, Ungeduldige tippen, Kochende zittern (am Bild: `scale`/`translate`, unabhängig vom Spiegel in `transform`) */
.stueck.atmet:not(.geht) img { transform-origin: 50% 100%; animation: juice-atmen 5s ease-in-out infinite; }
/* A.0.248.0 (deine Ansage 27.10.: „das pulsieren der wartenden Patienten in der Aufnahme stark abschwächen. da wird einem ja schwindelig“):
   Atmen 1,4 % → 0,4 % in 5 s statt 3,4; Ungeduldige tippen sanft (0,15 % alle 1,4 s statt 0,5 % alle 0,55 s) */
.stueck.ungeduldig:not(.geht) img { animation: juice-atmen 5s ease-in-out infinite, juice-tippen 1.4s steps(2, jump-none) infinite; }
.stueck.kocht:not(.geht) img { animation: juice-atmen 1.6s ease-in-out infinite, juice-tippen .3s steps(2, jump-none) infinite; }
@keyframes juice-atmen { 50% { scale: 1 1.004; } }
@keyframes juice-tippen { 50% { translate: 0 -.15%; } }
.szenen-effekte { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
/* Dampf aus den Ohren */
.zeichen-dampf { position: absolute; width: max(46px, 4.6cqw); height: max(26px, 2.6cqw); transform: translate(-50%, -50%); }
.zeichen-dampf i { position: absolute; top: 30%; width: 44%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff 45%, rgba(255, 255, 255, .6) 62%, rgba(255, 255, 255, 0) 72%);
  filter: drop-shadow(0 0 .1cqw rgba(30, 40, 50, .95)) drop-shadow(0 0 .25cqw rgba(30, 40, 50, .5));
  animation: juice-dampf 1.1s ease-out infinite; opacity: 0; }
.zeichen-dampf i:nth-child(1) { left: -22%; } .zeichen-dampf i:nth-child(2) { left: -22%; animation-delay: .55s; }
.zeichen-dampf i:nth-child(3) { right: -22%; animation-delay: .25s; } .zeichen-dampf i:nth-child(4) { right: -22%; animation-delay: .8s; }
.zeichen-dampf i { --seite: -1; } .zeichen-dampf i:nth-child(n+3) { --seite: 1; }
@keyframes juice-dampf { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 30% { opacity: .95; } 100% { opacity: 0; transform: translate(calc(var(--seite) * 90%), -150%) scale(1.3); } }
/* Rauch über einem Ding, das bald kaputt ist — mit einem Funken */
.zeichen-rauch { position: absolute; width: max(34px, 3.6cqw); aspect-ratio: 1; transform: translate(-50%, -100%); }
.zeichen-rauch i { position: absolute; bottom: 0; left: 30%; width: 45%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(90, 96, 104, .75), rgba(90, 96, 104, 0) 70%);
  animation: juice-rauch 2.4s ease-out infinite; opacity: 0; }
.zeichen-rauch i:nth-child(2) { left: 10%; animation-delay: .8s; } .zeichen-rauch i:nth-child(3) { left: 45%; animation-delay: 1.6s; }
.zeichen-rauch b { position: absolute; bottom: 5%; left: 48%; width: 8%; aspect-ratio: 1; border-radius: 50%; background: #ffd75e; box-shadow: 0 0 .5cqw #ffb21e;
  animation: juice-funke 2.7s steps(1) infinite; opacity: 0; }
@keyframes juice-rauch { 0% { opacity: 0; transform: translateY(0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(18%, -170%) scale(1.6); } }
@keyframes juice-funke { 0%, 88% { opacity: 0; } 90%, 94% { opacity: 1; } 96% { opacity: 0; } }
/* die Herzlinie über einem Kranken in Lebensgefahr */
.zeichen-ekg { position: absolute; width: max(84px, 8cqw); aspect-ratio: 3; transform: translate(-50%, -100%); background: rgba(10, 20, 26, .78); border-radius: .4cqw; padding: .2cqw; box-shadow: 0 0 .6cqw rgba(255, 60, 80, .6); }
.zeichen-ekg svg { width: 100%; height: 100%; display: block; overflow: visible; }
.zeichen-ekg path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.zeichen-ekg .spur { stroke: rgba(255, 75, 95, .3); stroke-width: 1.6; }
.zeichen-ekg .puls { stroke: #ff4b5f; stroke-width: 2.6; stroke-dasharray: 34 70; animation: juice-ekg 1.1s linear infinite; filter: drop-shadow(0 0 2px #ff4b5f); }
@keyframes juice-ekg { from { stroke-dashoffset: 100; } to { stroke-dashoffset: -2; } }
/* der Rand: Blaulicht (Unfall angekündigt) oder rotes Pochen (Lebensgefahr in diesem Raum) */
.rand-licht { position: absolute; inset: 0; pointer-events: none; z-index: 9; opacity: 0; }   /* unter den Tafeln (10), Audit K6 */
.rand-licht.blaulicht { animation: juice-blaulicht .9s steps(1) infinite; }
.rand-licht.kritisch { animation: juice-pochen 1.3s ease-in-out infinite; }
@keyframes juice-blaulicht { 0% { opacity: .9; box-shadow: inset 0 0 3cqw 1cqw rgba(40, 110, 255, .75); } 50% { opacity: .9; box-shadow: inset 0 0 3cqw 1cqw rgba(255, 40, 60, .6); } }
@keyframes juice-pochen { 0%, 100% { opacity: .25; box-shadow: inset 0 0 4cqw 1cqw rgba(220, 30, 50, .6); } 15% { opacity: .9; box-shadow: inset 0 0 4cqw 1cqw rgba(220, 30, 50, .6); } 30% { opacity: .35; box-shadow: inset 0 0 4cqw 1cqw rgba(220, 30, 50, .6); } 45% { opacity: .8; box-shadow: inset 0 0 4cqw 1cqw rgba(220, 30, 50, .6); } }
/* der Rettungswagen fährt durchs Bild */
.rtw-fahrt { position: absolute; left: 0; bottom: 1.5%; height: 15%; width: auto; filter: drop-shadow(0 .4cqw .4cqw rgba(0, 0, 0, .45)); }

@media (prefers-reduced-motion: reduce) {
  .stueck.atmet img, .stueck.ungeduldig img, .stueck.kocht img { animation: none !important; }
  /* still, aber sichtbar: sie sagen etwas (Audit K7) */
  .zeichen-dampf i, .zeichen-rauch i { animation: none; opacity: .85; }
  .zeichen-ekg .puls { animation: none; stroke-dasharray: none; }
  .rand-licht.blaulicht { animation: none; opacity: .8; box-shadow: inset 0 0 3cqw 1cqw rgba(40, 110, 255, .75); }
  .rand-licht.kritisch { animation: none; opacity: .6; box-shadow: inset 0 0 4cqw 1cqw rgba(220, 30, 50, .6); }
  .staub i { animation: none; }
  .stueck.geht img, .pager.puls-plus, .pager.puls-minus { animation: none; }
  .knopf:active:not(:disabled), .hud-knopf:active:not(:disabled) { transform: none; }
  .stueck.glanz img { translate: none; }
}

/* Leben auf der Karte (A.0.249.0, ui/karte-leben.js): über den Räumen der Karte, Klicks gehen durch */
.karte-leben { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.leben { position: absolute; transform: translate(-50%, -50%); }
.leben img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(.08cqw .14cqw .1cqw rgba(0, 0, 0, .35)); }
/* 28.10.: Standbilder statt Bewegung (ui/karte-leben.js) — Schritt-Wiegen und Sprechblasen der Karte sind weg */
/* A.0.619.0 (plan/39 C2) der Rettungswagen bringt Verletzte: das Bild blitzt Blau/Rot (Farben setzt ui/juice.js blaulichtBlitz) */
.blaulicht-blitz { position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen; }
