:root {
  color-scheme: light;
  --paper: #f4e8d3;
  --ink: #211914;
  --soft: #665449;
  --line: #c7b49e;
  --focus: #a7381d;
  --smoke: #e0ddcd;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #211912;
  color: var(--ink);
  font: 500 15px/1.5 Inter, system-ui, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
:is(a, button):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.comic {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  --gutter: clamp(16px, 2.65vmin, 44px);
  --left-edge: max(var(--gutter), env(safe-area-inset-left));
  --right-edge: max(var(--gutter), env(safe-area-inset-right));
  --top-edge: max(var(--gutter), env(safe-area-inset-top));
  --bottom-edge: max(var(--gutter), env(safe-area-inset-bottom));
  --bildanker: .42;
}
/* Alle beweglichen Bildebenen behalten das Koordinatensystem der Zeichnung. */
.panel {
  position: absolute;
  right: 0;
  top: calc(100% * var(--bildanker));
  transform: translateY(calc(-100% * var(--bildanker)));
  width: 100%;
  /* Von Hochformat über Quadrat bis Querformat bleibt die Leuchte am linken Rand sichtbar. */
  width: max(100%, min(110vw, 110dvh));
  aspect-ratio: 3 / 2;
  isolation: isolate;
  --spark-x: 22.85%;
  --spark-y: 54%;
  /* Deckt Rundungskanten beim Verkleinern und bei gebrochenen Bildschirmkoordinaten ab. */
  --anschluss: 1.5px;
}
.scene-art { display: block; width: 100%; height: auto; }
.gaze { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Die Lasur multipliziert die vorhandenen Druckfarben einschließlich der beweglichen Augen. */
.drebin-licht {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  mix-blend-mode: multiply;
  pointer-events: none;
}
@media (aspect-ratio < 3/2), (aspect-ratio > 11/5) {
  .panel::before, .panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
  }
}
/* Auf schmalen Bildschirmen erreicht die Werkstatt mit Decke und Boden den Fensterrand. */
@media (aspect-ratio < 3/2) {
  .comic { --bildanker: .48; }
  .panel::before, .panel::after { left: 0; width: 100%; }
  .panel::before {
    bottom: calc(100% - var(--anschluss));
    height: max(78.90625%, calc((100dvh - 100%) * var(--bildanker) + 2px));
    background-image: url("garage-decke.webp");
  }
  .panel::after {
    top: calc(100% - var(--anschluss));
    height: max(78.90625%, calc((100dvh - 100%) * (1 - var(--bildanker)) + 2px));
    background-image: url("garage-boden.webp");
  }
}
@media (orientation: portrait) {
  /* Bis zur Schuhsohle haben die ersten 540 Bildzeilen denselben Maßstab wie Frank.
     Der freie Boden darunter gleicht die restliche Fensterhöhe aus. */
  .panel::after {
    background-image: none;
    border-style: solid;
    border-width: 0;
    border-image: url("garage-boden.webp") 540 0 0 fill / 38.671875vw 0 0 stretch;
  }
}
/* Im flachen Querformat liegt die Birne unterhalb des oberen Schriftzugs. */
@media (min-aspect-ratio: 2/1) {
  .comic { --bildanker: .22; }
}
/* Auf Panoramamonitoren begrenzen die Seitenwände den vertikalen Beschnitt. */
@media (aspect-ratio > 11/5) {
  .panel {
    width: 220vh;
    width: 220dvh;
    right: 50%;
    transform: translate(50%, calc(-100% * var(--bildanker)));
  }
  .panel::before, .panel::after {
    top: 0;
    height: 100%;
    width: max(52.60417%, calc(50vw - 50% + 2px));
  }
  .panel::before {
    right: calc(100% - var(--anschluss));
    background-image: url("garage-links.webp");
  }
  .panel::after {
    left: calc(100% - var(--anschluss));
    background-image: url("garage-rechts.webp");
  }
}
.quote {
  margin: 0;
  color: #fff1cf;
  font: italic 900 clamp(1.5rem, min(3.9vw, 8vh), 5.5rem)/1.06 "Arial Black", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.045em;
  -webkit-text-stroke: .085em #211812;
  paint-order: stroke fill;
  text-shadow: .045em .064em 0 #211812, 0 .045em .18em #211812;
}
.quote span {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.quote span:first-child { left: var(--left-edge); top: var(--top-edge); }
.quote span:last-child { right: var(--right-edge); bottom: var(--bottom-edge); }
.controls {
  position: absolute;
  z-index: 2;
  display: flex;
  left: var(--left-edge);
  bottom: var(--bottom-edge);
  border-radius: 24px;
  background: rgb(25 21 17 / 74%);
  color: #fff1d6;
  box-shadow: inset 0 0 0 1px rgb(239 222 194 / 27%);
}
.controls :is(button, a) {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.controls svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.controls :is(button, a):focus-visible { outline-color: #fff2d7; outline-offset: -3px; }
.controls :is(button, a)[aria-pressed="true"] { background: rgb(255 237 200 / 20%); }
@media (hover: hover) {
  .controls :is(button, a):hover { background: rgb(255 237 200 / 14%); }
}
.play-icon, .motion[aria-pressed="true"] .pause-icon { display: none; }
.motion[aria-pressed="true"] .play-icon { display: block; }
@media (max-width: 430px) {
  .controls { bottom: calc(var(--bottom-edge) + 2.6rem); }
}
.effects { position: absolute; inset: 0; pointer-events: none; }
.geraeteeffekte { display: block; width: 100%; height: 100%; pointer-events: none; }
.status-leds > * { animation: lesezugriff 4.1s linear infinite; }
.status-leds > :nth-child(2) { animation-duration: 7.3s; animation-delay: -3s; }
.status-leds > :nth-child(3) { animation-duration: 5.9s; animation-delay: -1.9s; }
.status-leds > :nth-child(4) { animation-duration: 8.7s; animation-delay: -6s; }
.status-leds > :nth-child(5) { animation-duration: 3.2s; animation-delay: -2.2s; }
.status-leds > :nth-child(6) { animation-duration: 4.8s; animation-delay: -1.2s; }
@keyframes lesezugriff {
  0%, 64%, 77%, 89%, 100% { opacity: .06; }
  69%, 73% { opacity: .77; }
  83% { opacity: .62; }
}
.luftblase { animation: luftaufstieg 6.1s linear infinite; }
.luftblasen > :nth-child(2) .luftblase { animation-duration: 7.2s; animation-delay: -2.3s; }
.luftblasen > :nth-child(3) .luftblase { animation-duration: 5.6s; animation-delay: -3.8s; }
.luftblasen > :nth-child(4) .luftblase { animation-duration: 6.7s; animation-delay: -5.4s; }
@keyframes luftaufstieg {
  0% { opacity: 0; transform: translate(0, 0) scale(.65); }
  10% { opacity: .64; transform: translate(1px, -11px) scale(.8); }
  45% { opacity: .72; transform: translate(-2px, -53px) scale(.94); }
  78% { opacity: .77; transform: translate(2px, -93px) scale(1.04); }
  95% { opacity: .6; transform: translate(-1px, -117px) scale(1.09); }
  100% { opacity: 0; transform: translate(0, -123px) scale(1.12); }
}
.lamp-flicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 31.25%; /* 480 von 1536 Bildpunkten */
  height: auto;
  opacity: 0;
  mix-blend-mode: multiply;
}
.puff, .spark { position: absolute; left: var(--spark-x); top: var(--spark-y); opacity: 0; }
.puff {
  width: 4.1%;
  aspect-ratio: 1.1;
  background: radial-gradient(ellipse, var(--smoke) 0%, transparent 70%);
  border-radius: 50%;
  transform-origin: 50% 80%;
  animation: drift 5.4s linear infinite;
}
.puff:nth-child(2) { animation-delay: -1.35s; }
.puff:nth-child(3) { animation-delay: -2.7s; }
.puff:nth-child(4) { animation-delay: -4.05s; }
.spark {
  width: 5%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff7cf 0%, #ffc28657 20%, transparent 60%);
  animation: flare 8s ease-in-out infinite;
}
@keyframes drift {
  0% { opacity: 0; transform: translate(-50%, -70%) scale(.34); }
  18% { opacity: .51; }
  65% { opacity: .3; }
  100% { opacity: 0; transform: translate(70%, -540%) scale(2.4); }
}
@keyframes flare { 0%, 74%, 85%, 100% { opacity: 0; } 79% { opacity: .7; } }
:root[data-motion="paused"] .effects { display: none; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="running"]) .effects { display: none; }
}

.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: max(var(--w), 44px);
  height: max(var(--h), 44px);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  -webkit-tap-highlight-color: #f4e8d340;
}
/* Koordinaten liegen in der Bildfläche. x und y sind jeweils die Mitte des Gegenstands. */
.hotspot-switch { --x: 30.8%; --y: 38.5%; --w: 16%; --h: 6.5%; }
.hotspot-pv { --x: 89%; --y: 22.4%; --w: 15%; --h: 6.6%; }
.hotspot-aquarium { --x: 90.6%; --y: 47%; --w: 18%; --h: 20.5%; }
.hotspot-draussen {
  --x: 65.65%;
  --y: 40.7%;
  --w: 9.8%;
  --h: 6%;
  cursor: help;
}
/* Eine zweifarbige Kontur markiert die anklickbaren Gegenstände. */
.hotspot:focus-visible, .show-labels .hotspot {
  outline: 2px solid #291e16;
  outline-offset: -3px;
  border-color: #fff2d7;
  box-shadow: 0 0 0 1px #291e16;
}
@media (hover: hover) {
  .hotspot:hover { border-color: #fff2d7; box-shadow: 0 0 0 1px #291e16; }
}

dialog {
  width: min(460px, calc(100% - 30px));
  max-height: calc(100% - 40px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 70px #0005;
}
dialog::backdrop { background: #0909139c; }
dialog form { margin: 0; }
.close {
  position: absolute;
  right: 14px;
  top: 13px;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  font-size: 21px;
}
.preview-label { color: var(--soft); font-size: .74rem; letter-spacing: .12em; margin: 0; }
dialog h2 { margin: .25em 0 .65em; font-size: 1.8rem; letter-spacing: -.055em; }
dialog h3 { font-size: 1rem; margin: .5em 0; }
dialog section button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: none; }
.destinations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; gap: 7px; }
.destinations li { list-style: none; border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; }
.destinations small { display: block; color: var(--soft); }

@media (max-width: 350px) {
  .destinations { grid-template-columns: 1fr; }
}

.fischbahn { --west:-13px; --ost:11px; --zeit:12.6s; --versatz:-2s; --schlag:1.09s; animation: fischbahn var(--zeit) linear var(--versatz) infinite; }
.fisch-gold { --west:-10px; --ost:15px; --zeit:15.2s; --versatz:-10.3s; --schlag:.98s; }
.fisch-blau { --west:-15px; --ost:13px; --zeit:11.7s; --versatz:-5.7s; --schlag:.84s; }
.fischwendung { animation: fischwendung var(--zeit) linear var(--versatz) infinite; }
.fisch-frontal { animation: fischfront var(--zeit) linear var(--versatz) infinite; }
@keyframes fischfront {
  0%,43%,49%,93%,99%,100% {opacity:0}
  45.5%,46.8%,95.3%,96.6% {opacity:1}
}
.flossenschlag { animation: flossenschlag var(--schlag) ease-in-out infinite; }
@keyframes fischbahn {
  0%,100% {transform:translate(var(--ost),-1.4px)}
  18% {transform:translate(2px,.5px)}
  36% {transform:translate(calc(var(--west) + 3px),1.5px)}
  43% {transform:translate(var(--west),2px)}
  50% {transform:translate(var(--west),.8px)}
  70% {transform:translate(0,-2px)}
  86% {transform:translate(calc(var(--ost) - 2px),-2.6px)}
  93% {transform:translate(var(--ost),-2.2px)}
}
@keyframes fischwendung {
  0%,38%,100% {transform:scaleX(1) rotate(-1deg)}
  43% {transform:scaleX(.76) rotate(-2deg)}
  50%,88% {transform:scaleX(-1) rotate(1deg)}
  93% {transform:scaleX(-.69) rotate(-2deg)}
}
@keyframes flossenschlag {
  0%,100% {transform:scaleX(.76) rotate(-4deg)}
  50% {transform:scaleX(1.04) rotate(4deg)}
}
.rohr { --flussdauer:3.1s; --beginn:-1.5s; }
.rohr-1 { --flussdauer:3.8s; --beginn:-.4s; }
.rohr-2 { --flussdauer:3.45s; --beginn:-2.3s; }
.rohr path { animation: kuehlfluss var(--flussdauer) linear var(--beginn) infinite; }
@keyframes kuehlfluss { from {stroke-dashoffset:0} to {stroke-dashoffset:-84} }

.pv-quickinfo {
  position: absolute;
  right: 0;
  bottom: calc(100% + .38rem);
  padding: .36rem .66rem;
  border: 1px solid rgb(255 231 192 / 26%);
  border-radius: .5rem;
  color: #fff5e2;
  background: rgb(34 27 20 / 62%);
  backdrop-filter: blur(3px);
  font: 600 .84rem/1.24 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px #201814;
  white-space: nowrap;
  pointer-events: none;
}
.pv-quickinfo[hidden] { display: none; }
.draussen-quickinfo { right: auto; left: 50%; transform: translateX(-50%); }
