/* ==========================================================================
   mybyte.at – Die Dunkelkammer
   Hier wird entwickelt. Keine externen Ressourcen, keine Cookies.
   ========================================================================== */

:root {
  --f-ui: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-display: Futura, "Century Gothic", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --f-hand: "Marker Felt", "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", cursive;

  /* Rotlicht (Standard) */
  --room-0: #0b0404;
  --room-1: #1c0706;
  --room-2: #040101;
  --glow: rgba(255, 70, 40, .50);
  --red: #ff4a36;
  --red-hot: #ffb9a8;
  --red-deep: #8a1a12;
  --text: #f3d3c8;
  --text-dim: rgba(243, 211, 200, .64);
  --text-faint: rgba(243, 211, 200, .32);
  --paper: #efc0ae;
  --paper-2: #d59e8b;
  --ink: #180a0a;
  --bench: #2a110d;
  --bench-2: #130706;
  --bench-edge: #46201a;
  --tray: #1b0908;
  --tray-rim: #3e1a16;
  --tray-in: #0c0303;
  --liquid: rgba(255, 90, 60, .10);
  --liquid-hi: rgba(255, 170, 140, .28);
  --tape: #e6bba7;
  --tape-ink: #3a1410;
  --cord: #2a0f0c;
  --peg: #b07d64;
  --peg-2: #6e4433;
  --shade: #3b1613;
  --shade-2: #1a0806;
  --glass: radial-gradient(circle at 50% 0, #ffd9cf, #ff5a44 40%, #b1200f 90%);
  --glass-glow: 0 10px 44px 16px rgba(255, 70, 40, .55), 0 2px 10px 2px rgba(255, 120, 90, .6);
  --sheet-shadow: 0 10px 24px rgba(0, 0, 0, .65);
  --tile: rgba(255, 180, 160, .035);
}

html[data-light="room"] {
  --room-0: #2a2622;
  --room-1: #3b352f;
  --room-2: #15120f;
  --glow: rgba(255, 236, 205, .36);
  --red: #ff3b2a;
  --red-hot: #ffd9d0;
  --text: #f4efe6;
  --text-dim: rgba(244, 239, 230, .7);
  --text-faint: rgba(244, 239, 230, .36);
  --paper: #f3eee4;
  --paper-2: #d6cdbd;
  --ink: #171311;
  --bench: #5c4738;
  --bench-2: #3a2b21;
  --bench-edge: #7d6452;
  --tray: #2d2825;
  --tray-rim: #4f4741;
  --tray-in: #1b1715;
  --liquid: rgba(255, 255, 255, .07);
  --liquid-hi: rgba(255, 255, 255, .32);
  --tape: #f1e3c4;
  --tape-ink: #3a2a18;
  --cord: #4a423d;
  --peg: #c9a287;
  --peg-2: #8a6a55;
  --shade: #5b4b45;
  --shade-2: #2c2320;
  --glass: linear-gradient(#5a2a26, #3a1a17);
  --glass-glow: 0 2px 6px rgba(0, 0, 0, .4);
  --sheet-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  --tile: rgba(255, 255, 255, .05);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--room-0);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--room-0);
  font-family: var(--f-ui);
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg, canvas { display: block; }
:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Der Raum
   ========================================================================== */

.room {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: 54px;
  background:
    radial-gradient(60% 46% at 50% 14%, var(--glow), transparent 72%),
    radial-gradient(120% 70% at 50% 112%, var(--room-2), transparent 60%),
    linear-gradient(var(--room-1), var(--room-0) 62%);
}
.room::before { /* Kacheln an der Wand */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    repeating-linear-gradient(0deg, var(--tile) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, var(--tile) 0 1px, transparent 1px 108px);
  -webkit-mask-image: radial-gradient(75% 70% at 50% 30%, #000, transparent);
          mask-image: radial-gradient(75% 70% at 50% 30%, #000, transparent);
}
.room::after { /* Vignette */
  content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background: radial-gradient(95% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .6));
}

.site-head {
  position: absolute; z-index: 40; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 3vw, 40px);
  font-family: var(--f-ui); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 12px;
}
.site-head a, .site-head button { text-decoration: none; opacity: .8; transition: opacity .2s; }
.site-head a:hover, .site-head button:hover { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 10px 3px rgba(255, 70, 40, .6);
  animation: breathe 3.2s ease-in-out infinite;
}
.head-actions { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.light {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0;
  padding: 6px 0; cursor: pointer; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600;
}
.light svg { width: 18px; height: 18px; }
.light[aria-pressed="true"] svg { filter: drop-shadow(0 0 6px rgba(255, 240, 200, .9)); }

.cue {
  position: absolute; z-index: 40; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; opacity: .7; display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
}
.cue:hover { opacity: 1; }
.cue span:last-child { animation: nudge 2.4s ease-in-out infinite; }

@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: .78; } 94% { opacity: 1; } 97% { opacity: .9; } 98% { opacity: 1; } }
@keyframes sway { 0%, 100% { transform: translateY(var(--sag)) rotate(calc(var(--tilt) - .6deg)); } 50% { transform: translateY(var(--sag)) rotate(calc(var(--tilt) + .6deg)); } }
@keyframes sheen { 0% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@keyframes drip { 0%, 60% { transform: translateY(0) scaleY(.4); opacity: 0; } 70% { opacity: .8; } 100% { transform: translateY(22px) scaleY(1); opacity: 0; } }

/* ==========================================================================
   Die Szene (Grid)
   ========================================================================== */

.scene {
  position: relative; z-index: 1;
  width: min(100% - 2 * clamp(14px, 3vw, 40px), 1120px);
  margin: 0 auto;
  padding-top: 64px;
  display: grid;
  gap: 0 24px;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "sign  lamp  timer"
    "line  line  line"
    "bench bench bench"
    "ctrl  ctrl  ctrl";
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Türschild ------------------------------------------------------------- */
.sign { grid-area: sign; align-self: end; padding: 8px 0 14px; }
.eyebrow {
  margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; color: var(--text-dim);
}
.sign h1 {
  margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 6vw, 76px); line-height: .95; letter-spacing: -.01em;
  color: var(--text);
}
.sign h1 span { color: var(--red); font-weight: 500; }
.sign__box {
  display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 9px 14px 9px 12px; border-radius: 4px;
  font-family: var(--f-display); font-weight: 700; font-size: 12px; line-height: 1; letter-spacing: .3em; text-transform: uppercase; color: #fff1ec;
  background: linear-gradient(#b32a1e, #6d130c);
  box-shadow: 0 0 24px rgba(255, 60, 40, .5), 0 0 0 1px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(0, 0, 0, .4);
  text-shadow: 0 0 8px rgba(255, 130, 110, .9);
}
.sign__dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd6cc; box-shadow: 0 0 10px 2px rgba(255, 190, 170, .9); animation: blink 1.6s ease-in-out infinite; }

/* Rotlichtlampe --------------------------------------------------------- */
.lamp { grid-area: lamp; position: relative; justify-self: center; width: 160px; height: 176px; margin-top: -64px; animation: flicker 7s linear infinite; }
.lamp__cord { position: absolute; left: 50%; top: 0; width: 3px; height: 96px; margin-left: -1.5px; background: linear-gradient(#000, var(--cord)); }
.lamp__shade {
  position: absolute; left: 50%; top: 92px; width: 160px; height: 54px; margin-left: -80px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(170deg, #6b2a24 0%, var(--shade) 45%, var(--shade-2) 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 200, 180, .18), inset 0 -2px 0 rgba(0, 0, 0, .6);
}
.lamp__shade::before { /* Lüftungsschlitze */
  content: ""; position: absolute; left: 22px; right: 22px; top: 12px; height: 10px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .55) 0 3px, transparent 3px 9px);
}
.lamp__shade::after { /* Schraube */
  content: ""; position: absolute; left: 50%; top: 28px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8a4a40, #2a0f0c);
}
.lamp__glass {
  position: absolute; left: 50%; top: 144px; width: 136px; height: 14px; margin-left: -68px;
  border-radius: 0 0 10px 10px;
  background: var(--glass);
  box-shadow: var(--glass-glow);
}

/* Kurzzeitmesser -------------------------------------------------------- */
.timer { grid-area: timer; justify-self: end; align-self: end; width: 116px; padding-bottom: 14px; text-align: center; }
.timer svg { width: 116px; height: 116px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.timer__face { fill: #0d0606; stroke: #3a1f1b; stroke-width: 3; }
html[data-light="room"] .timer__face { fill: #1c1816; stroke: #5a4e48; }
.timer__zone { fill: none; stroke: var(--red); stroke-width: 6; opacity: .55; }
.timer__ticks line { stroke: var(--text-dim); stroke-width: 1.2; }
.timer__ticks line.maj { stroke: var(--text); stroke-width: 2; }
.timer__hand { stroke: var(--red-hot); stroke-width: 2; stroke-linecap: round; transform-origin: 50px 50px; }
.timer__cap { fill: var(--red-hot); }
.timer__read { display: block; margin-top: 6px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-dim); }

/* Die Leine -------------------------------------------------------------- */
.line {
  grid-area: line; position: relative; height: 170px;
  display: flex; justify-content: space-evenly; align-items: flex-start; padding: 18px 0 0;
}
.line__cord { position: absolute; left: -2%; right: -2%; top: 10px; width: 104%; height: 40px; }
.line__cord path { fill: none; stroke: var(--cord); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
html[data-light="room"] .line__cord path { stroke: #2a2320; }

.print {
  --sag: 0px; --tilt: 0deg;
  position: relative; width: 136px; padding: 6px 6px 7px; text-decoration: none;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .25);
  transform: translateY(var(--sag)) rotate(var(--tilt));
  transform-origin: 50% -14px;
  transition: transform .35s ease, box-shadow .35s ease, background .3s;
  animation: sway 6s ease-in-out infinite;
}
.print:nth-child(2) { --sag: 10px; --tilt: -1.5deg; animation-delay: -1s; }
.print:nth-child(3) { --sag: 20px; --tilt: 1deg; animation-delay: -2.5s; }
.print:nth-child(4) { --sag: 20px; --tilt: -.8deg; animation-delay: -4s; }
.print:nth-child(5) { --sag: 10px; --tilt: 1.6deg; animation-delay: -5.2s; }
a.print:hover, a.print:focus-visible { animation-play-state: paused; transform: translateY(calc(var(--sag) - 6px)) rotate(0deg); box-shadow: 0 18px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .25); }
.print__img {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .2)); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.print__img svg { width: 62%; height: auto; opacity: .85; }
.print b, .print small { display: block; text-align: center; font-family: var(--f-hand); }
.print b { margin-top: 6px; font-size: 14px; font-weight: 400; line-height: 1.1; }
.print small { font-size: 11px; opacity: .7; line-height: 1.1; margin-top: 1px; }
.peg {
  position: absolute; left: 50%; top: -14px; width: 11px; height: 26px; margin-left: -5.5px; border-radius: 3px 3px 2px 2px; z-index: 2;
  background: linear-gradient(90deg, var(--peg-2), var(--peg) 45%, var(--peg-2));
  box-shadow: 0 2px 3px rgba(0, 0, 0, .5);
}
.peg::after { content: ""; position: absolute; left: -2px; right: -2px; top: 9px; height: 3px; background: #777; border-radius: 2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.print--slot { background: transparent; box-shadow: none; animation: none; }
.print--slot .print__img { background: none; box-shadow: none; outline: 1.5px dashed var(--text-faint); outline-offset: -1px; }
.print--slot em { font-family: var(--f-hand); font-style: normal; font-size: 13px; color: var(--text-faint); }
.print--slot.is-filled .print__img { outline: none; }
.print--slot.is-filled em { opacity: 0; }

/* Die Werkbank ---------------------------------------------------------- */
.bench {
  grid-area: bench; position: relative; margin-top: 8px;
  display: grid; grid-template-columns: 124px 1.5fr 1fr 1fr; gap: 20px; align-items: end;
  padding: 30px 26px 28px; border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 30%),
    linear-gradient(180deg, var(--bench), var(--bench-2));
  box-shadow: 0 40px 70px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 230, 220, .1);
}
.bench::after { /* Tischkante */
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; border-radius: 0 0 6px 6px;
  background: linear-gradient(var(--bench-edge), var(--bench-2));
  box-shadow: 0 6px 14px rgba(0, 0, 0, .6);
}
.pile {
  position: relative; height: 62px; border-radius: 3px;
  background: linear-gradient(170deg, #1b1210, #050303);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(0, 0, 0, .8);
}
.pile::after { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: rgba(255, 255, 255, .07); }
.pile span {
  position: absolute; left: 10px; right: 10px; bottom: 7px; padding: 3px 4px; border-radius: 1px;
  background: var(--tape); color: var(--tape-ink); font: 9.5px/1.15 var(--f-hand); text-align: center;
  transform: rotate(-1.5deg);
}
.tray {
  position: relative; height: 190px; border-radius: 7px; cursor: pointer;
  background: var(--tray);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .9),
    inset 0 0 0 7px var(--tray-rim),
    inset 0 0 0 8px rgba(0, 0, 0, .8),
    inset 0 12px 30px 8px var(--tray-in),
    0 2px 0 rgba(255, 255, 255, .06), 0 10px 20px rgba(0, 0, 0, .5);
}
.liquid {
  position: absolute; inset: 12px; border-radius: 3px; overflow: hidden;
  background:
    radial-gradient(70% 60% at 40% 30%, var(--liquid-hi), transparent 60%),
    linear-gradient(180deg, var(--liquid), transparent 70%);
  opacity: .8;
}
.liquid::after {
  content: ""; position: absolute; inset: -30% -40%;
  background: linear-gradient(115deg, transparent 42%, var(--liquid-hi) 50%, transparent 58%);
  opacity: .5; animation: sheen 7s ease-in-out infinite alternate;
}
.tray--stop .liquid::after { animation-duration: 9s; animation-delay: -3s; }
.tray--fix .liquid::after { animation-duration: 11s; animation-delay: -6s; }
.tape {
  position: absolute; left: 16px; top: -12px; padding: 5px 12px; z-index: 2;
  background: var(--tape); color: var(--tape-ink);
  font: 15px/1 var(--f-hand); letter-spacing: .02em; text-transform: uppercase;
  transform: rotate(-1.8deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4px, #000 calc(100% - 4px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4px, #000 calc(100% - 4px), transparent);
}
.tray--stop .tape { transform: rotate(1.4deg); left: auto; right: 14px; }
.tray--fix .tape { transform: rotate(-1deg); }
.tray.is-next { box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .9), inset 0 0 0 7px var(--tray-rim), inset 0 0 0 8px rgba(0, 0, 0, .8),
    inset 0 12px 30px 8px var(--tray-in), 0 2px 0 rgba(255, 255, 255, .06), 0 10px 20px rgba(0, 0, 0, .5),
    0 0 0 2px var(--red-hot), 0 0 24px rgba(255, 120, 100, .35); }

/* Steuerung -------------------------------------------------------------- */
.ctrl { grid-area: ctrl; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 4px 8px; }
.note {
  position: relative; margin: 0; flex: 1 1 auto; max-width: 640px; padding: 12px 18px 12px 20px;
  background: var(--paper); color: var(--ink);
  font-family: var(--f-hand); font-size: 19px; line-height: 1.25;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .55);
  transform: rotate(-.4deg);
  min-height: 56px; display: flex; align-items: center;
}
.note::before { /* Klebestreifen */
  content: ""; position: absolute; left: 14px; top: -9px; width: 54px; height: 16px;
  background: rgba(255, 255, 255, .28); transform: rotate(-4deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.btn-act {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 16px 26px; border: 0; border-radius: 4px;
  background: linear-gradient(#b52a1e, #7a150d); color: #fff2ee;
  font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  box-shadow: 0 0 22px rgba(255, 60, 40, .35), 0 6px 14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
  text-shadow: 0 0 6px rgba(255, 130, 110, .8);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-act:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-act:active { transform: translateY(1px); }
.btn-act:disabled { cursor: default; filter: saturate(.5) brightness(.8); box-shadow: 0 6px 14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .7); }

/* Das Blatt --------------------------------------------------------------- */
.sheet {
  --w: 200px; --x: 0px; --y: 0px; --r: 0deg;
  position: absolute; left: 0; top: 0; z-index: 5;
  width: var(--w); height: calc(var(--w) * .75);
  background: var(--paper); cursor: pointer;
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transition: transform .85s cubic-bezier(.2, .75, .25, 1), width .85s cubic-bezier(.2, .75, .25, 1), height .85s cubic-bezier(.2, .75, .25, 1), opacity .35s, background .3s;
  box-shadow: var(--sheet-shadow);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 97.5% 76.5%, 94.8% 75%, 93.6% 79.5%, 90.4% 81.5%, 89.6% 86%, 86.2% 88%, 85.8% 92.5%, 82.4% 94.5%, 81.5% 100%, 0 100%);
  will-change: transform, width;
}
.sheet.no-trans { transition: none; }
.sheet.is-out { opacity: 0; }
.sheet canvas { position: absolute; left: 3.2%; top: 4.2%; width: 93.6%; height: 91.6%; }
.sheet__wet {
  position: absolute; inset: 0; opacity: 0; overflow: hidden; transition: opacity .4s;
  background: linear-gradient(180deg, var(--liquid), transparent 60%);
}
.sheet__wet::after {
  content: ""; position: absolute; inset: -20% -60%;
  background: linear-gradient(115deg, transparent 44%, var(--liquid-hi) 50%, transparent 56%);
  animation: sheen 3.2s ease-in-out infinite alternate;
}
.sheet.is-wet .sheet__wet { opacity: 1; }
.sheet.is-wet { filter: brightness(.94); }
.sheet.is-hung::before { /* Klammer */
  content: ""; position: absolute; left: 50%; top: -14px; width: 11px; height: 26px; margin-left: -5.5px; border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, var(--peg-2), var(--peg) 45%, var(--peg-2)); box-shadow: 0 2px 3px rgba(0, 0, 0, .5);
}
.sheet.is-hung::after { /* Tropfen */
  content: ""; position: absolute; left: 18%; bottom: -4px; width: 4px; height: 8px; border-radius: 50% 50% 60% 60%;
  background: var(--liquid-hi); animation: drip 4s ease-in 2 forwards;
}

/* Ziehen, Wackeln, Großansicht --------------------------------------------- */
.sheet { touch-action: manipulation; }
.sheet.is-nudge { cursor: grab; touch-action: none; animation: nudge 3.2s ease-in-out infinite; }
.sheet.is-nudge:hover { animation-play-state: paused; }
.sheet.is-drag {
  cursor: grabbing; z-index: 40; touch-action: none; animation: none;
  transition: opacity .35s, background .3s; --sheet-shadow: 0 26px 40px rgba(0, 0, 0, .7);
}
.sheet.is-hung { cursor: zoom-in; }
@keyframes nudge {
  0%, 46%, 100% { translate: 0 0; rotate: 0deg; }
  54% { translate: 0 -7px; rotate: 1.8deg; }
  62% { translate: 0 -2px; rotate: -1.6deg; }
  70% { translate: 0 -6px; rotate: 1.2deg; }
  78% { translate: 0 0; rotate: 0deg; }
}
.tray.is-next { animation: tray-pulse 2.2s ease-in-out infinite; }
@keyframes tray-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.28); }
}
.tray.is-next::before {
  content: "↓ hierher ziehen"; position: absolute; left: 50%; top: 50%; z-index: 1; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-2deg); white-space: nowrap;
  font: 19px/1 var(--f-hand); color: var(--red-hot); opacity: .88; text-shadow: 0 0 12px rgba(255, 80, 50, .8);
  animation: cue-bob 1.6s ease-in-out infinite;
}
@keyframes cue-bob { 0%, 100% { margin-top: 0; } 50% { margin-top: 6px; } }
.tray.is-over { outline: 3px solid var(--red-hot); outline-offset: 4px; filter: brightness(1.35); animation: none; }
.tray.is-over::before { opacity: 0; }

.ctrl__btns { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.btn-ghost {
  display: inline-flex; align-items: center; cursor: pointer; padding: 15px 22px; border-radius: 4px;
  background: transparent; color: var(--red-hot); border: 1px solid var(--red-hot);
  font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  transition: background .2s, color .2s, transform .15s;
}
.btn-ghost[hidden] { display: none; }
.btn-ghost:hover { background: rgba(255, 150, 130, .14); transform: translateY(-1px); }

.viewer {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  background: transparent; color: var(--text); overflow: auto;
}
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: rgba(4, 1, 1, .88); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.viewer__in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 34px 20px 24px; max-width: 100%; }
.viewer__x {
  position: fixed; right: 14px; top: 10px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; z-index: 2;
  font-size: 34px; line-height: 1; color: var(--text-dim);
}
.viewer__x:hover { color: var(--red-hot); }
.viewer__frame { position: relative; transform: rotate(-.8deg); filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .75)); }
.viewer__frame::before { /* Klammer */
  content: ""; position: absolute; left: 50%; top: -17px; width: 13px; height: 30px; margin-left: -6.5px; border-radius: 3px 3px 2px 2px; z-index: 1;
  background: linear-gradient(90deg, var(--peg-2), var(--peg) 45%, var(--peg-2)); box-shadow: 0 2px 3px rgba(0, 0, 0, .5);
}
.viewer__paper {
  position: relative; background: var(--paper);
  width: min(88vw, 840px, calc((100vh - 230px) * 1.3333)); aspect-ratio: 4 / 3;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 97.5% 76.5%, 94.8% 75%, 93.6% 79.5%, 90.4% 81.5%, 89.6% 86%, 86.2% 88%, 85.8% 92.5%, 82.4% 94.5%, 81.5% 100%, 0 100%);
}
.viewer__paper canvas { position: absolute; left: 3.2%; top: 4.2%; width: 93.6%; height: 91.6%; }
.viewer__cap { margin: 0; text-align: center; font-family: var(--f-hand); display: grid; gap: 4px; }
.viewer__cap b { font-weight: 400; font-size: 24px; color: var(--red-hot); }
.viewer__cap span { font-size: 15px; color: var(--text-dim); }
.viewer__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

@media (max-width: 820px) {
  .ctrl__btns { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .btn-ghost { justify-content: center; padding: 15px 20px; }
  .viewer__btns { width: 100%; flex-direction: column-reverse; }
  .viewer__btns > * { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet.is-nudge, .tray.is-next, .tray.is-next::before { animation: none !important; }
}

/* ohne JS ----------------------------------------------------------------- */
.nojs-note { display: none; margin: 10px auto 0; max-width: 720px; padding: 0 20px; text-align: center; font-size: 15px; color: var(--text-dim); }
.no-js .nojs-note { display: block; }
.no-js .sheet, .no-js .ctrl, .no-js .timer, .no-js .light, .no-js .print--slot { display: none; }
.no-js .scene { grid-template-areas: "sign lamp ." "line line line" "bench bench bench"; }

/* Pausen (unsichtbar, inaktiv, reduzierte Bewegung) ------------------------- */
.room.is-away *, .room.is-idle .print, .room.is-idle .liquid::after, .room.is-idle .lamp, .room.is-idle .brand i, .room.is-idle .sign__dot { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .brand i, .cue span, .sign__dot, .lamp, .print, .liquid::after, .sheet__wet::after, .sheet.is-hung::after { animation: none !important; }
  .print { transform: translateY(var(--sag)) rotate(var(--tilt)); }
  .sheet { transition: opacity .2s; }
  .btn-act, .print, .site-head a, .site-head button { transition: none; }
}

/* ==========================================================================
   Laborbuch (helle Seite)
   ========================================================================== */

.lab {
  position: relative; padding: clamp(60px, 8vw, 110px) clamp(12px, 3vw, 40px) clamp(70px, 8vw, 120px);
  background: linear-gradient(var(--room-0), #060202 40%, #0b0404);
}
html[data-light="room"] .lab { background: linear-gradient(var(--room-0), #1a1714 40%, #2a2622); }
.page {
  position: relative; max-width: 980px; margin: 0 auto;
  padding: clamp(30px, 5vw, 70px) clamp(22px, 6vw, 86px) clamp(34px, 5vw, 70px);
  color: #1e1a16; border-radius: 3px;
  background-color: #f6f2e9;
  background-image:
    linear-gradient(rgba(70, 150, 170, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 150, 170, .13) 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .55), inset 0 1px 0 #fff;
}
.page::before { /* rote Randlinie wie im Laborheft */
  content: ""; position: absolute; left: clamp(12px, 3.4vw, 50px); top: 0; bottom: 0; width: 2px; background: rgba(200, 55, 45, .35);
}
.page::after { /* Lochung */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px;
  background: radial-gradient(circle at 7px 50%, rgba(0, 0, 0, .35) 3px, rgba(0, 0, 0, .12) 3.5px, transparent 4.5px) 0 0 / 14px 56px repeat-y;
}
.page > * { position: relative; }

.lab .eyebrow { text-align: center; color: #a62a20; font-family: var(--f-mono); letter-spacing: .32em; font-weight: 600; }
.lab h2 {
  margin: 10px 0 0; text-align: center; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(34px, 5.4vw, 60px); line-height: 1; letter-spacing: .01em; text-transform: uppercase;
}
.lede { max-width: 680px; margin: 22px auto 0; text-align: center; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.5; color: #3b332c; }

.steps { list-style: none; margin: clamp(40px, 6vw, 70px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { padding-top: 14px; border-top: 2px solid #1e1a16; }
.steps__no { display: block; font-family: var(--f-mono); font-size: 13px; letter-spacing: .2em; color: #a62a20; }
.steps h3 { margin: 6px 0 8px; font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; }
.steps p { margin: 0; font-size: 16px; color: #3b332c; }

.rules { margin-top: clamp(40px, 6vw, 70px); }
.rules h3, .houses h3, .about h3 { margin: 0 0 14px; font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; }
.rules ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.rules li { position: relative; padding-left: 22px; font-size: 16px; color: #3b332c; }
.rules li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; background: #c0231a; transform: rotate(45deg); }
.rules b { color: #1e1a16; }
.rules code { font-family: var(--f-mono); font-size: .9em; background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 3px; }

.houses { margin-top: clamp(40px, 6vw, 70px); }
.houses ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.houses li {
  display: flex; flex-direction: column; padding: 20px 20px 22px;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .14); border-radius: 3px;
  box-shadow: 0 1px 0 #fff inset;
}
.houses h4 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.1; }
.houses p { margin: 0 0 18px; flex: 1; font-size: 15.5px; color: #3b332c; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 10px 14px; border-radius: 3px; text-decoration: none;
  background: #1e1a16; color: #f6f2e9;
  font-family: var(--f-display); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  transition: background .2s, transform .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #c0231a; transform: translateY(-1px); }

.about { margin-top: clamp(40px, 6vw, 70px); display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: start; }
.about p { margin: 0 0 14px; font-size: 16.5px; color: #3b332c; }
.about em { font-style: italic; color: #1e1a16; }
.facts { margin: 0; padding: 18px 20px; list-style: none; font-size: 14px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .14); border-radius: 3px; }
.facts li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px dashed rgba(0, 0, 0, .18); }
.facts li:last-child { border-bottom: 0; }
.facts span:first-child { font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; color: #a62a20; padding-top: 3px; }

.signoff { margin: clamp(40px, 6vw, 64px) 0 0; text-align: center; font-family: var(--f-hand); font-size: clamp(22px, 3vw, 30px); color: #2a231d; }
.signoff small { display: block; margin-top: 6px; font: 600 11px var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: #a62a20; }

/* Fuß --------------------------------------------------------------------- */
.foot {
  padding: 34px clamp(16px, 3vw, 40px) 40px; text-align: center;
  background: #060202; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--text-dim);
}
html[data-light="room"] .foot { background: #1a1714; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; text-transform: uppercase; }
.foot nav a { text-decoration: none; opacity: .85; }
.foot nav a:hover { opacity: 1; color: var(--red-hot); }
.foot p { margin: 18px 0 0; letter-spacing: .04em; font-weight: 400; line-height: 1.7; }
.foot p a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--text-faint); }

/* Rechtliches ----------------------------------------------------------- */
.legal-wrap { padding: clamp(70px, 10vw, 120px) clamp(12px, 3vw, 40px) 60px; background: linear-gradient(var(--room-1), var(--room-0) 40%); min-height: 100vh; }
.legal-wrap .page { max-width: 780px; }
.legal-wrap .eyebrow { text-align: center; color: #a62a20; font-family: var(--f-mono); letter-spacing: .3em; font-weight: 600; }
.legal-wrap h1 { margin: 6px 0 0; font-family: var(--f-display); font-size: clamp(34px, 6vw, 56px); line-height: 1; text-transform: uppercase; text-align: center; }
.legal-wrap h2 { font-family: var(--f-display); font-size: clamp(20px, 2.6vw, 25px); margin: 34px 0 6px; line-height: 1.15; }
.legal-wrap p, .legal-wrap li { font-size: 17px; color: #2e2720; }
.legal-wrap a { color: #a62a20; }
.legal-back {
  position: absolute; top: 16px; left: clamp(16px, 3vw, 40px); z-index: 2;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--text); opacity: .85;
}
.legal-back:hover { opacity: 1; }

/* ==========================================================================
   Responsiv
   ========================================================================== */

@media (max-width: 1000px) {
  .bench { grid-template-columns: 110px 1.4fr 1fr 1fr; gap: 16px; }
  .tray { height: 170px; }
  .print { width: 118px; }
  .line { height: 150px; }
}

@media (max-width: 820px) {
  .room { padding-bottom: 56px; }
  .scene {
    padding-top: 58px; gap: 0 12px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "lamp lamp"
      "sign sign"
      "line line"
      "bench bench"
      "ctrl ctrl";
  }
  .no-js .scene { grid-template-areas: "lamp lamp" "sign sign" "line line" "bench bench"; }
  .lamp { width: 112px; height: 124px; margin-top: -58px; }
  .lamp__cord { height: 64px; }
  .lamp__shade { top: 60px; width: 112px; height: 42px; margin-left: -56px; }
  .lamp__shade::before { left: 14px; right: 14px; top: 9px; height: 8px; }
  .lamp__shade::after { top: 21px; width: 8px; height: 8px; margin-left: -4px; }
  .lamp__glass { top: 100px; width: 94px; height: 11px; margin-left: -47px; }
  .sign { align-self: start; text-align: center; padding: 14px 0 10px; }
  .sign h1 { font-size: clamp(40px, 12vw, 56px); }
  .sign__box { margin-top: 12px; font-size: 10.5px; padding: 8px 12px 8px 10px; letter-spacing: .24em; }
  .timer { position: absolute; right: 0; top: 54px; width: 70px; padding: 0; }
  .timer svg { width: 70px; height: 70px; }
  .timer__read { font-size: 10px; margin-top: 3px; }
  .line { height: 128px; padding-top: 16px; }
  .line__cord { top: 8px; height: 30px; }
  .print { width: 74px; padding: 4px 4px 5px; }
  .print b { font-size: 9px; margin-top: 4px; }
  .print small { display: none; }
  .print--slot em { font-size: 10px; }
  .peg { top: -10px; width: 8px; height: 19px; margin-left: -4px; }
  .peg::after { top: 7px; height: 2px; }
  .print:nth-child(2) { --sag: 6px; } .print:nth-child(3), .print:nth-child(4) { --sag: 13px; } .print:nth-child(5) { --sag: 6px; }
  .bench {
    margin-top: 6px; padding: 20px 14px 20px; gap: 14px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "pile  pile"
      "dev   dev"
      "stop  fix";
    align-items: stretch;
  }
  .pile { grid-area: pile; width: 118px; height: 50px; margin-bottom: 6px; }
  .pile span { font-size: 8.5px; bottom: 5px; }
  .tray--dev { grid-area: dev; height: 150px; }
  .tray--stop { grid-area: stop; height: 104px; }
  .tray--fix { grid-area: fix; height: 104px; }
  .tape { font-size: 13px; padding: 4px 10px; left: 12px; top: -10px; }
  .tray--stop .tape { left: 12px; right: auto; }
  .ctrl { flex-direction: column; align-items: stretch; gap: 16px; padding: 26px 0 6px; }
  .note { max-width: none; font-size: 17px; padding: 12px 16px; transform: none; }
  .btn-act { justify-content: center; width: 100%; padding: 16px 20px; }
  .sheet.is-hung::before { top: -10px; width: 8px; height: 19px; margin-left: -4px; }

  .steps { grid-template-columns: 1fr; gap: 24px; }
  .rules ul { grid-template-columns: 1fr; }
  .houses ul { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .facts li { grid-template-columns: 96px 1fr; }
  .page::after { display: none; }
  .page::before { left: 10px; }
}

@media (max-width: 400px) {
  .site-head { padding: 14px 16px; font-size: 11px; }
  .head-actions { gap: 14px; }
  .light span { display: none; }
  .print { width: 68px; }
}

@media (max-height: 700px) and (min-width: 821px) {
  .scene { padding-top: 56px; }
  .line { height: 132px; }
  .print { width: 112px; }
  .tray { height: 150px; }
  .ctrl { padding-top: 24px; }
}
