@media screen and (prefers-reduced-motion: no-preference) {
  html.zier #go { position: relative; }
  html.zier #go::after {
    content: ""; position: absolute; inset: -6px; pointer-events: none;
    border: 2px solid var(--effekt-aktuell, var(--violet)); border-radius: calc(var(--radius) + 6px);
    opacity: 0; transform: scale(.96);
  }
  html.zier #go.im-bild:not(.still, :disabled)::after { animation: zier-atmen 5.6s ease-in-out 1.2s infinite; }
  html.zier #go:is(:hover, :focus-visible, :active)::after { animation: none; opacity: 0; }

  html.zier .maschine-titel.im-bild::after,
  html.zier .feld-marke.im-bild { animation: zier-blinken 1.1s linear infinite; }

  html.zier .pfeil { display: inline-block; }
  html.zier .pfeil.schubs { animation: zier-schubs .55s ease-out; }

  html.zier .pk-karte { position: relative; }
  html.zier .wabe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
  html.zier .wabe path {
    fill: none; stroke: var(--effekt-aktuell, var(--violet)); stroke-width: 2; stroke-linejoin: round;
    stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .45s ease-in;
  }
  html.zier :is(.pk-karte, .blister):is(:hover, :focus-within) > .wabe.bereit path {
    stroke-dashoffset: 0; transition: stroke-dashoffset .9s cubic-bezier(.45, 0, .2, 1);
  }

  html.zier-pause #go::after,
  html.zier-pause .maschine-titel::after,
  html.zier-pause .feld-marke { animation-play-state: paused; }
}

@media screen and (prefers-reduced-motion: no-preference) {
  .zier-welle { position: fixed; z-index: 40; pointer-events: none; animation: zier-welle .62s cubic-bezier(.2, .7, .3, 1) forwards; }
  .zier-welle svg { display: block; width: 100%; height: 100%; overflow: visible; }

  .modus-knopf svg.finsternis-hell g.ikon-sonne,
  .modus-knopf svg.finsternis-dunkel g.ikon-mond { display: inline; }
  .modus-knopf svg :is(g.ikon-sonne, g.ikon-mond) { transform-box: fill-box; transform-origin: center; }
  .modus-knopf svg.finsternis-hell g.ikon-mond { animation: zier-mond-vor .62s cubic-bezier(.3, .7, .25, 1) both; }
  .modus-knopf svg.finsternis-hell g.ikon-sonne { animation: zier-sonne-weg .62s ease-in both; }
  .modus-knopf svg.finsternis-dunkel g.ikon-mond { animation: zier-mond-zurueck .62s cubic-bezier(.5, 0, .7, .4) both; }
  .modus-knopf svg.finsternis-dunkel g.ikon-sonne { animation: zier-sonne-frei .62s ease-out both; }

  .pass-stempel-zahl { display: inline-block; }
  .pass-pille.pass-stempeln { animation: zier-pass-auf .5s cubic-bezier(.3, 1.6, .5, 1); }
  .pass-pille.pass-stempeln .pass-stempel-zahl { animation: zier-pass-stempel .52s cubic-bezier(.2, .9, .3, 1.25) both; }
  .pass-blitz { position: absolute; right: -9px; top: -9px; width: 20px; height: 20px; pointer-events: none; color: var(--effekt-aktuell, var(--violet)); animation: zier-pass-blitz .5s ease-out .22s both; }
  .pass-blitz svg { display: block; width: 100%; height: 100%; }

  html.zier .mr-kachel { position: relative; }
  .mr-scan { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .mr-scan i { position: absolute; left: 0; right: 0; top: 0; height: 100%; border-top: 1.5px solid var(--effekt, var(--violet)); animation: zier-scan .9s cubic-bezier(.45, 0, .55, 1) forwards; }
}

@media (prefers-reduced-motion: reduce) {
  html.zier #go::after, html.zier .wabe { display: none; }
  html.zier .pfeil, html.zier .maschine-titel::after, html.zier .feld-marke { animation: none; }
  .zier-welle, .mr-scan, .pass-blitz { display: none; }
}

@media print {
  html.zier #go::after, html.zier .wabe, .zier-welle, .mr-scan, .pass-blitz { display: none; }
}

@keyframes zier-atmen {
  0% { opacity: 0; transform: scale(.96); }
  35% { opacity: .8; transform: scale(1.03); }
  70%, 100% { opacity: 0; transform: scale(.96); }
}
@keyframes zier-blinken {
  0%, 49.9% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes zier-schubs {
  0% { transform: translateX(0); }
  30% { transform: translateX(5px); }
  55% { transform: translateX(-1.5px); }
  78% { transform: translateX(.8px); }
  100% { transform: translateX(0); }
}
@keyframes zier-welle {
  from { transform: scale(.14) rotate(-30deg); opacity: .95; }
  60% { opacity: .55; }
  to { transform: scale(1) rotate(0deg); opacity: 0; }
}
@keyframes zier-mond-vor { from { transform: translate(11px, -9px); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes zier-sonne-weg { from { transform: none; opacity: 1; } 55% { opacity: .55; } to { transform: scale(.55) rotate(-45deg); opacity: 0; } }
@keyframes zier-mond-zurueck { from { transform: none; opacity: 1; } 70% { opacity: 1; } to { transform: translate(-11px, 9px); opacity: 0; } }
@keyframes zier-sonne-frei { from { transform: scale(.55) rotate(45deg); opacity: 0; } 35% { opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes zier-pass-auf { 40% { transform: scale(1.14); } }
@keyframes zier-pass-stempel {
  from { transform: scale(2.2) rotate(-14deg); opacity: 0; }
  55% { transform: scale(.88) rotate(3deg); opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes zier-pass-blitz { from { transform: scale(.2) rotate(-20deg); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1.25) rotate(10deg); opacity: 0; } }
@keyframes zier-scan {
  from { transform: translateY(-2px); opacity: 0; }
  12% { opacity: .9; }
  85% { opacity: .9; }
  to { transform: translateY(100%); opacity: 0; }
}

.wabe-fokus { position: fixed; left: 0; top: 0; z-index: 2147482000; pointer-events: none; }
.wabe-fokus[hidden] { display: none; }
.wabe-fokus svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wabe-fokus polygon { fill: none; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wabe-saum { stroke: var(--grund-0); stroke-width: 5.5; }
.wabe-linie { stroke: var(--violet); stroke-width: 2.5; }
.wabe-an .wabe-ziel:focus-visible { outline-color: transparent; }
.wabe-fokus.wabe-neu svg { animation: wabe-neu .18s var(--ease-out, ease-out) both; }
@keyframes wabe-neu { from { transform: scale(1.12); opacity: 0; } to { transform: none; opacity: 1; } }

@media screen and (prefers-reduced-motion: no-preference) {
  .log > div:not(.achievement-zeile):has(> .cursor) > b { font-size: 0; }
  .log > div:not(.achievement-zeile):has(> .cursor) > b::before { content: "> "; font-size: 12.5px; color: var(--violet); }
  .log > div:not(.achievement-zeile):not(:has(> .cursor)):has(> b:not(.warn)) > span::after {
    content: "✓" / ""; display: inline-block; width: 0; white-space: nowrap; color: var(--status-gruen);
    transform: translateX(.7ch); animation: log-haken .32s cubic-bezier(.3, 1.5, .5, 1) both;
  }
  @keyframes log-haken { from { transform: translateX(.7ch) scale(.2); opacity: 0; } to { transform: translateX(.7ch); opacity: 1; } }

  .roehre-filter, .roehre-schirm { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; animation: roehre-an 2s linear both; }
  .roehre-filter { backdrop-filter: grayscale(1) contrast(1.35) brightness(1.08); -webkit-backdrop-filter: grayscale(1) contrast(1.35) brightness(1.08); }
  .roehre-schirm {
    background-color: var(--gruen); mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='2' fill='%23000' fill-opacity='.28'/%3E%3C/svg%3E");
  }
  @keyframes roehre-an { 0% { opacity: 0; } 6% { opacity: 1; } 9% { opacity: .82; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }

  @media (max-width: 1023px) {
    .menue-blatt.auf .menue-titel::before {
      content: ""; display: inline-block; width: 12px; height: 13px; margin-right: 8px; vertical-align: -2px;
      background: var(--effekt-aktuell, var(--violet)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
      animation: wabe-kern .34s cubic-bezier(.3, 1.4, .5, 1) both;
    }
    .menue-blatt.auf .menue-nav > * { transform-origin: 0 0; animation: wabe-faecher .36s var(--ease-out, ease-out) both; animation-delay: .5s; }
    .menue-blatt.auf .menue-nav > :nth-child(1) { animation-delay: .06s; }
    .menue-blatt.auf .menue-nav > :nth-child(2) { animation-delay: .09s; }
    .menue-blatt.auf .menue-nav > :nth-child(3) { animation-delay: .12s; }
    .menue-blatt.auf .menue-nav > :nth-child(4) { animation-delay: .15s; }
    .menue-blatt.auf .menue-nav > :nth-child(5) { animation-delay: .18s; }
    .menue-blatt.auf .menue-nav > :nth-child(6) { animation-delay: .21s; }
    .menue-blatt.auf .menue-nav > :nth-child(7) { animation-delay: .24s; }
    .menue-blatt.auf .menue-nav > :nth-child(8) { animation-delay: .27s; }
    .menue-blatt.auf .menue-nav > :nth-child(9) { animation-delay: .3s; }
    .menue-blatt.auf .menue-nav > :nth-child(10) { animation-delay: .33s; }
    .menue-blatt.auf .menue-nav > :nth-child(11) { animation-delay: .36s; }
    .menue-blatt.auf .menue-nav > :nth-child(12) { animation-delay: .39s; }
    .menue-blatt.auf .menue-nav > :nth-child(13) { animation-delay: .42s; }
    .menue-blatt.auf .menue-nav > :nth-child(14) { animation-delay: .45s; }
    .menue-blatt.auf .menue-nav > :nth-child(15) { animation-delay: .48s; }
  }
  @keyframes wabe-kern { from { transform: scale(0) rotate(-90deg); } to { transform: none; } }
  @keyframes wabe-faecher { from { transform: translate(-14px, -22px) scale(.9) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }

  .ampel.led-an { display: inline-block; animation: led-puls 2.4s ease-in-out infinite; }
  @keyframes led-puls { 0%, 100% { transform: none; opacity: 1; } 50% { transform: scale(1.22); opacity: .55; } }

  .zaehlt-laeuft { position: relative; -webkit-text-fill-color: transparent; }
  .zaehlt-laeuft::after {
    content: attr(data-zaehlt-bild) / ""; position: absolute; left: var(--zaehlt-x); top: var(--zaehlt-y);
    width: var(--zaehlt-b); height: var(--zaehlt-h); line-height: var(--zaehlt-h);
    display: flex; justify-content: flex-end; white-space: pre; pointer-events: none;
    font-variant-numeric: tabular-nums; -webkit-text-fill-color: currentColor;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wabe-fokus.wabe-neu svg { animation: none; }
  .zaehlt-laeuft { -webkit-text-fill-color: currentColor; }
  .zaehlt-laeuft::after { content: none; }
}

@media print {
  .wabe-fokus, .roehre-filter, .roehre-schirm { display: none !important; }
  .zaehlt-laeuft { -webkit-text-fill-color: currentColor; }
  .zaehlt-laeuft::after { content: none; }
}

.lesebalken {
  position: absolute; left: 0; right: 0; top: calc(100% + 1px); height: 4px; z-index: 2; pointer-events: none;
  background: var(--rule);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4'%3E%3Crect width='5' height='4'/%3E%3C/svg%3E") 0 0 / 6px 4px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4'%3E%3Crect width='5' height='4'/%3E%3C/svg%3E") 0 0 / 6px 4px repeat;
}
.lesebalken i { display: block; height: 100%; background: var(--effekt-aktuell, var(--violet)); transform: scaleX(0); transform-origin: 0 50%; }

.ladebalken {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px 0; background: var(--grund-0);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .14em; line-height: 16px; color: var(--ink-70);
}
.ladebahn {
  position: relative; flex: 0 1 216px; min-width: 96px; height: 12px; overflow: hidden;
  background: var(--rule);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='12'%3E%3Crect width='7' height='12'/%3E%3C/svg%3E") 0 0 / 9px 12px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='12'%3E%3Crect width='7' height='12'/%3E%3C/svg%3E") 0 0 / 9px 12px repeat;
}
.ladebahn i { position: absolute; left: 0; top: 0; width: 25%; height: 100%; background: var(--effekt-aktuell, var(--violet)); }
.ladezahl { display: inline-block; min-width: 5ch; font-variant-numeric: tabular-nums; color: var(--ink); }

.roehre { position: relative; isolation: isolate; }
.retro-welt { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.roehre-welt { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2147483001; pointer-events: none; }

.bar:has(.pass-pille.pass-voll) .pass-panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; pointer-events: none;
  background: linear-gradient(90deg, var(--gold), var(--orange), var(--pink), var(--violet), var(--tuerkis));
}
.bar:has(.pass-pille.pass-voll) .pass-belohnung {
  border: 2px solid transparent; padding: 9px;
  background: linear-gradient(var(--paper-2), var(--paper-2)) padding-box, linear-gradient(90deg, var(--gold), var(--orange), var(--pink), var(--violet), var(--tuerkis)) border-box;
}

@media screen and (prefers-reduced-motion: no-preference) {
  .ladebahn i { animation: lade-lauf 1.5s steps(8, end) infinite alternate; }
  .ladezahl.neu { animation: lade-tick .3s cubic-bezier(.3, 1.6, .5, 1); }
  .roehre-welt { animation: roehre-an 2s linear both; }
  .bar:has(.pass-pille.pass-voll) .pass-panel::before { transform-origin: 0 50%; animation: synth-auf .7s cubic-bezier(.2, .8, .3, 1) both; }
  html.zier-pause .ladebahn i { animation-play-state: paused; }
}
@keyframes lade-lauf { from { transform: translateX(0); } to { transform: translateX(300%); } }
@keyframes lade-tick { from { transform: scale(1.25); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes synth-auf { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .roehre-welt { display: none; }
  .ladebahn i { left: 37.5%; }
}

@media print {
  .lesebalken, .ladebalken, .retro-welt, .roehre-welt { display: none !important; }
}

.land > canvas { position: absolute; left: 0; image-rendering: crisp-edges; image-rendering: pixelated; }
.land { opacity: 0; }
.land.bereit { opacity: 1; transition: opacity .6s ease-out; }

@media screen and (prefers-reduced-motion: no-preference) {
  .roehre-weite { position: fixed; left: 0; right: 0; z-index: 2147483002; animation: roehre-an 2s linear both; }
  .abspann { animation: abspann-auf .4s ease-out both; }
  .abspann-titel { animation: abspann-titel .9s steps(6) .3s both; }
  .abspann-zeile { animation: abspann-zeile .5s steps(4) 1.5s both; }
  .abspann-dank { animation-delay: 2.6s; }
}

.abspann { position: fixed; inset: 0; z-index: 2147482500; overflow: hidden; background: var(--a-grund); cursor: pointer; }
.abspann.aus { opacity: 0; transition: opacity .4s ease-in; }
.abspann-land { position: absolute; inset: 0; opacity: 1; }
.abspann-text { position: absolute; left: 0; right: 0; top: 7%; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 16px; }
.abspann-text canvas { display: block; image-rendering: crisp-edges; image-rendering: pixelated; }
.abspann-titel { margin-bottom: 14px; }
@keyframes abspann-auf { from { opacity: 0; } to { opacity: 1; } }
@keyframes abspann-titel { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes abspann-zeile { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.pass-abspann { display: block; min-height: 40px; margin: 12px 0 0; padding: 8px 12px; border: 1.5px solid var(--feld-rand); border-radius: var(--radius); background: none; color: var(--ink); font-size: 12.5px; cursor: pointer; }
.pass-abspann:hover { border-color: var(--effekt-aktuell, var(--violet)); }

@media (prefers-reduced-motion: reduce) {
  .roehre-weite { display: none; }
}

@media print {
  .land, .abspann { display: none !important; }
}
