/* =====================================================================
   Projektseite-Vorlage (Ursprung: Atelierhaus Nill) – gleich für alle Häuser
   Prinzip: Das Modell ist die Bühne. UI nur an den Rändern, in zwei Glasflächen gebündelt
   (oben: Ansicht · unten: Sonnenstand). Renderings kommen als eigenes Blatt von unten.
   ===================================================================== */
:root {
  /* Raster */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: clamp(16px, 2.4vw, 32px);
  --safe-b: calc(max(var(--gutter), env(safe-area-inset-bottom)) + var(--vv-b, 0px));
  --safe-t: max(var(--gutter), env(safe-area-inset-top));

  /* Schrift */
  --sans: "Geist", -apple-system, "SF Pro Text", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Farbe */
  --ink: #f6f4ef;
  --ink-2: rgba(246, 244, 239, 0.68);
  --ink-3: rgba(246, 244, 239, 0.44);
  --ink-4: rgba(246, 244, 239, 0.16);
  --paper: #0e0f11;
  --paper-2: #16171a;
  --line: rgba(255, 255, 255, 0.08);

  /* Glas */
  --glass-bg: rgba(16, 18, 22, 0.30);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-blur: blur(24px) saturate(1.7);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 40px -12px rgba(0, 0, 0, 0.45), 0 2px 8px -2px rgba(0, 0, 0, 0.18);
  --legible: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 0, 0, 0.22);

  /* Form & Bewegung */
  --r-card: 14px;
  --r-sheet: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --t: 0.32s;
  --dock-h: 64px;
}

* { box-sizing: border-box; }
html { background: var(--paper); }   /* kein scroll-behavior: smooth – bremst das Mitscrollen am Finger aus */
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 14px/1.4 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { overflow: visible; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; border-radius: 8px; }

/* ---------- Bühne ---------- */
/* Laden (Jakob 16.10.): Himmel sofort – vorab aufgenommenes Himmelsbild (himmel.jpg, Bau-Schritt) liegt hinter der Leinwand,
   Ladebalken davor; die 3D-Leinwand blendet erst ein, wenn das erste Bild mit Haus steht (body[data-ready]). */
html.mit-himmel { background: #0e0f11 url(himmel.jpg) center / cover no-repeat fixed; }
html.mit-himmel body { background: transparent; }
html.mit-himmel #c { opacity: 0; transition: opacity 0.7s var(--ease); }
html.mit-himmel body[data-ready="1"] #c { opacity: 1; }
#c { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100lvh;   /* lvh: fest, egal ob Adressleiste sichtbar */
  display: block; outline: none; z-index: 0;
  transform-origin: 50% 40%; }
#dim { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: #050608; opacity: 0; }
.glass { background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); }

/* UI der Bühne blendet aus, sobald das Blatt hochkommt */
#top, #dock, #hint, #cue { transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
body.sheet-on #dock, body.sheet-on #hint, body.sheet-on #cue { opacity: 0; transform: translate(var(--tx, 0), 16px); pointer-events: none; }
body.sheet-on #top { opacity: 0; transform: translateY(-12px); pointer-events: none; }

/* ---------- Kopf ---------- */
#top { position: fixed; z-index: 20; top: var(--safe-t); left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); pointer-events: none; }
#top > * { pointer-events: auto; }
.brand { display: flex; align-items: flex-start; gap: 10px; text-shadow: var(--legible); }
.brand-title { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; line-height: 1; }
/* Rückweg zur Startseite (Jakob 16.10.): Pfeil links neben dem Haustitel */
.zurueck { display: grid; place-items: center; width: 32px; height: 32px; margin: -7px 0 0 -8px; border-radius: 50%; color: var(--ink); flex: none;
  transition: background var(--t) var(--ease); }
.zurueck svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.3)); transition: transform var(--t) var(--ease); }
.zurueck:hover { background: rgba(255,255,255,.08); }
.zurueck:hover svg { transform: translateX(-3px); }
.zurueck.ohne-ziel { display: none; }
.haus { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
#masse:empty { display: none; }
#masse { text-transform: none; letter-spacing: 0.02em; }   /* Einheiten m / m² nicht in Versalien */
/* Rundgang ist Beta (Jakob 16.10.) */
.beta { font: 500 8.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); padding: 3px 5px 2px;
  border-radius: 999px; background: rgba(16,18,22,.55); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.walkbtn { position: relative; }
.walkbtn .beta { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); pointer-events: none; }
.walk-beta { align-self: center; font-size: 10px; padding: 6px 9px 5px; }
.walk-card .beta-hinweis { margin: 0; font-size: 12px; color: var(--ink-2); text-align: center; }
.brand-title .brand-sub { font-weight: 400; color: var(--ink-2); }   /* nur Geist + Geist Mono, keine Kursive (Jakob 14.10.) */
.brand-meta { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; }

.views { position: relative; display: flex; align-items: center; height: 44px; padding: 4px; border-radius: 999px; }
.views button { position: relative; z-index: 1; height: 34px; min-width: 42px; padding: 0 10px; border-radius: 999px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; color: var(--ink-2); transition: color var(--t) var(--ease); }
.views button:hover { color: var(--ink); }
.views button[aria-pressed="true"] { color: #111; }
.views button svg { width: 16px; height: 16px; display: block; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.5; }
.views-ind, .seg-ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); transition: transform 0.45s var(--ease), width 0.45s var(--ease); }
.views-sep { width: 1px; height: 18px; margin: 0 6px 0 4px; background: var(--ink-4); }
.compass { display: grid; place-items: center; width: 34px; height: 34px; }
#north { width: 20px; height: 20px; will-change: transform; }
#north .n { fill: var(--ink); }
#north .s { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-linejoin: round; }

/* ---------- Dock: Sonnenstand ---------- */
#dock { --tx: -50%; position: fixed; z-index: 20; left: 50%; bottom: var(--safe-b); transform: translateX(-50%);
  width: min(880px, calc(100vw - 2 * var(--gutter))); height: var(--dock-h); padding: 0 10px 0 10px; border-radius: 999px;
  display: grid; grid-template-columns: 44px auto 1fr auto auto; align-items: center; column-gap: var(--s4); }
.dock-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #111;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); transition: transform 0.2s var(--ease); }
.dock-btn:hover { transform: scale(1.05); }
.dock-btn:active { transform: scale(0.95); }
.dock-btn svg { width: 20px; height: 20px; fill: currentColor; }
.clock { display: flex; flex-direction: column; gap: 3px; min-width: 76px; }
#clock { font-size: 22px; font-weight: 500; line-height: 1; letter-spacing: -0.01em; }
.sunline { display: flex; gap: 8px; font-size: 10px; color: var(--ink-3); }
#rise::before { content: "↑ "; } #set::before { content: "↓ "; }

#track { position: relative; height: 40px; min-width: 0; }
#rail { position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 4px; background: var(--ink-4); }
#rail::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12); }
#time { -webkit-appearance: none; appearance: none; position: absolute; left: -11px; right: -11px; top: 4px; width: calc(100% + 22px); height: 22px;
  margin: 0; background: transparent; cursor: grab; touch-action: pan-y; }
#time:active { cursor: grabbing; }
#time::-webkit-slider-runnable-track { height: 22px; background: transparent; }
#time::-moz-range-track { height: 22px; background: transparent; }
#time::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18), 0 3px 10px rgba(0, 0, 0, 0.35); transition: box-shadow 0.2s; }
#time::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18), 0 3px 10px rgba(0, 0, 0, 0.35); }
#time:hover::-webkit-slider-thumb, #time:active::-webkit-slider-thumb { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.2), 0 3px 10px rgba(0, 0, 0, 0.35); }
#time:focus-visible { outline: none; }
#time:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6); }
.hours { position: absolute; left: 0; right: 0; top: 24px; display: flex; justify-content: space-between; font-size: 9.5px; color: var(--ink-3); pointer-events: none; }
.hours span { width: 0; display: flex; justify-content: center; }

.dock-sep { width: 1px; height: 28px; background: var(--ink-4); }
.dock-tail { display: flex; align-items: center; gap: var(--s2); }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background var(--t) var(--ease); }
.chip:hover { background: rgba(255, 255, 255, 0.16); }
#datectl { position: relative; }
#dateinput { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.seg { position: relative; display: flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.seg button { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 30px; border-radius: 999px; color: var(--ink-2);
  transition: color var(--t) var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { color: #111; }
.seg button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#clouds .seg-ind { box-shadow: none; }

/* ---------- Hinweis + Weiter-Hinweis ---------- */
#hint, #cue { position: fixed; z-index: 15; bottom: calc(var(--safe-b) + (var(--dock-h) - 20px) / 2); display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 12px; color: var(--ink-2); text-shadow: var(--legible); }
#hint { left: var(--gutter); pointer-events: none; }
#hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.6s var(--ease-io) 1.2s 3; will-change: transform; }
@keyframes nudge { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
body.touched #hint { opacity: 0; }
#cue { right: var(--gutter); }
#cue:hover { color: var(--ink); }
#cue svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: bob 1.6s var(--ease-io) 1.2s 3; will-change: transform; }
@keyframes bob { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(2px); } }
#cuecount { color: var(--ink-3); }

/* ---------- Seite: Bühne + Blatt ---------- */
main { position: relative; z-index: 10; pointer-events: none; }   /* Bühne: Maus/Finger gehen ans Modell */
.sheet { pointer-events: auto; }
.stage { height: 100vh; height: 100lvh; pointer-events: none; }   /* lvh: Blatt-Kante nie unter Safaris durchsichtiger Adressleiste sichtbar (Jakob 14.10.) */
.sheet { position: relative; background: var(--paper); border-radius: var(--r-sheet) var(--r-sheet) 0 0; min-height: 100vh;
  padding: var(--s5) var(--gutter) var(--s7); box-shadow: 0 -40px 120px -20px rgba(0, 0, 0, 0.5); }
.sheet-grip { width: 40px; height: 4px; margin: 0 auto var(--s7); border-radius: 4px; background: var(--ink-4); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin: 0 0 var(--s6); }
.sheet-head h2 { margin: 0; font: 500 clamp(40px, 5.5vw, 76px)/0.95 var(--sans); letter-spacing: -0.04em; }
.seg button[hidden] { display: none; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s7) var(--s4); }
.card { grid-column: span 6; margin: 0; }
.card.wide { grid-column: 1 / -1; }
.card.wide .card-img { aspect-ratio: 16 / 9; max-height: 82vh; }
.card.wide .card-img img { object-position: 50% 62%; }
.card-img { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border-radius: var(--r-card); background: var(--paper-2); cursor: zoom-in; aspect-ratio: 3 / 2; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity 0.6s var(--ease); }
.card-img:hover img { transform: scale(1.025); }
.card figcaption { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s3) 2px 0; font-size: 14px; }   /* = Großansicht */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); margin-top: var(--s9); padding-top: var(--s5);
  border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.sheet-foot .mono { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Großansicht ---------- */
#lb { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8, 9, 11, 0.94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity 0.35s var(--ease); touch-action: pan-y; }
#lb[hidden] { display: none; }
#lb.on { opacity: 1; }
.lb-fig { margin: 0; display: flex; flex-direction: column; gap: var(--s3); max-width: min(92vw, calc((100svh - 160px) * 1.5)); width: 100%;
  transform: scale(0.98); transition: transform 0.5s var(--ease); }
#lb.on .lb-fig { transform: none; }
.lb-fig img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-card); background: var(--paper-2); transition: opacity 0.25s var(--ease); }
.lb-fig figcaption { display: flex; align-items: baseline; gap: var(--s3); font-size: 14px; }
.lb-title { font-weight: 500; }
.lb-sub { color: var(--ink-2); }
.lb-count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.lb-btn { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--ink); transition: transform 0.2s var(--ease); }
.lb-btn:hover { transform: scale(1.06); }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lb-prev { left: var(--gutter); top: 50%; margin-top: -24px; }
.lb-next { right: var(--gutter); top: 50%; margin-top: -24px; }
.lb-close { right: var(--gutter); top: var(--safe-t); }

/* ---------- Laden / Meldung ---------- */
#loader { position: fixed; left: 50%; top: 50%; width: 160px; height: 2px; transform: translate(-50%, -50%); background: var(--ink-4); border-radius: 2px; overflow: hidden; z-index: 30; }
#loadbar { height: 100%; width: 0; background: var(--ink); transition: width 0.2s; }
#loader.indet #loadbar { width: 30%; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
#msg { position: fixed; left: var(--s4); right: var(--s4); top: 45%; text-align: center; font-size: 16px; text-shadow: var(--legible); z-index: 30; }
#fps { position: fixed; left: var(--s4); top: 50%; margin: 0; z-index: 30; font: 11px/1.3 var(--mono); text-shadow: var(--legible); }
body.noui #top, body.noui #dock, body.noui #hint, body.noui #cue, body.noui main { display: none; }

/* ---------- Handy / Hochformat ---------- */
@media (max-width: 760px) {
  :root { --dock-h: 112px; }
  .brand-title { font-size: 16px; }
  .brand-meta { font-size: 10px; line-height: 1.5; }
  .zurueck { width: 28px; height: 28px; margin: -6px 0 0 -6px; }
  .zurueck svg { width: 17px; height: 17px; }
  /* Ansichten: nur aktive Ansicht + Kompass; Tippen schaltet weiter */
  .views button:not([aria-pressed="true"]) { display: none; }
  .views button[aria-pressed="true"] { color: var(--ink); min-width: 46px; }
  .views-ind { display: none; }
  .views-sep { display: none; }   /* Handy: Ansicht + Nordpfeil = ein Symbol, kein Strich (Jakob 14.10.) */
  .views button[aria-pressed="true"] { padding: 0 2px 0 12px; min-width: 0; }
  .views .compass { width: 30px; margin-right: 2px; }
  #dock { border-radius: 26px; height: auto; padding: 12px 12px 10px; row-gap: 6px; column-gap: var(--s3);
    grid-template-columns: 44px 1fr auto; grid-template-areas: "play clock tail" "track track track"; }
  #play { grid-area: play; } .clock { grid-area: clock; } #track { grid-area: track; margin: 0 4px; } .dock-tail { grid-area: tail; }
  .dock-sep { display: none; }
  .chip { padding: 0 12px; font-size: 12px; }
  .seg button { width: 30px; }
  #hint, #cue { --tx: -50%; left: 50%; right: auto; transform: translateX(var(--tx)); bottom: calc(var(--safe-b) + var(--dock-h) + 14px); }
  #cue { opacity: 0; pointer-events: none; }
  body.touched #cue { opacity: 1; pointer-events: auto; }
  body.sheet-on #cue { opacity: 0; }
  .sheet-grip { margin-bottom: var(--s6); }
  .grid { grid-template-columns: 1fr; gap: var(--s6); }
  .card, .card.wide { grid-column: 1 / -1; }
  .card.wide .card-img { aspect-ratio: 3 / 2; }
.card.wide .card-img { aspect-ratio: 16 / 9; max-height: 82vh; }
.card.wide .card-img img { object-position: 50% 62%; }
  .lb-prev, .lb-next { top: auto; bottom: var(--safe-b); margin: 0; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
  .lb-fig { max-width: 100vw; padding: 0 var(--s2); }
  .lb-fig img { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01s !important; }
  html { scroll-behavior: auto; }
}

/* Größe (Zoom): Lupe klein · Regler · Lupe groß, unter der Ansicht-Leiste. Touch-Geräte: Zwei-Finger-Zoom statt Regler */
.top-r { display: flex; align-items: center; gap: 8px; }   /* Desktop: Zoom als eigene Leiste rechts neben der Ansicht-Leiste (Jakob 14.10.) */
.zoom { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px; border-radius: 999px; }
.zoom-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink-2); transition: color var(--t) var(--ease); }
.zoom-btn:hover { color: var(--ink); }
.zoom-btn { flex: none; }
.zoom-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
#zoom { -webkit-appearance: none; appearance: none; flex: none; width: 120px; height: 22px; margin: 0; background: transparent; cursor: pointer; }
#zoom::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: var(--ink-4); }
#zoom::-moz-range-track { height: 3px; border-radius: 3px; background: var(--ink-4); }
#zoom::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border-radius: 50%; background: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 2px 8px rgba(0, 0, 0, 0.35); }
#zoom::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 2px 8px rgba(0, 0, 0, 0.35); }
#zoom:focus-visible { outline: none; }
#zoom:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6); }
@media (pointer: coarse) { .zoom { display: none; } }

/* Großansicht: Zwei-Finger-Zoom (Bild über allem, Bedienelemente kurz ausgeblendet) */
#lb { touch-action: none; }
.lb-fig .lb-cur { position: relative; z-index: 2; transform-origin: 50% 50%; will-change: transform; }
.lb-btn, .lb-fig figcaption { transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
#lb.zooming .lb-btn, #lb.zooming .lb-fig figcaption { opacity: 0; pointer-events: none; }

/* Großansicht als Karussell: Streifen mit Vor-/Nachbild, Track schneidet ab (beim Zoomen nicht) */
.lb-track { position: relative; overflow: hidden; border-radius: var(--r-card); }
.lb-strip { position: relative; will-change: transform; }
.lb-fig .lb-side { position: absolute; top: 0; left: calc(100% + 16px); }
.lb-fig .lb-side.lb-p { left: calc(-100% - 16px); }
.lb-fig .lb-side[src=""], .lb-fig .lb-side:not([src]) { visibility: hidden; }
#lb.zooming .lb-track { overflow: visible; }
@media (max-width: 760px) { .lb-track { border-radius: 10px; } }

/* Seite nicht zoombar (Jakob 14.10.: Doppeltipp-Zoom blieb hängen) – Modell/Großansicht haben eigene Gesten */
html, body { touch-action: manipulation; }

/* Datumswähler: Glasfeld über dem Dock, Drehräder Tag · Monat (wie iOS) */
#datepick { position: fixed; z-index: 25; padding: 12px 12px 10px; border-radius: 26px; opacity: 0; transform: translateY(10px) scale(0.98);
  transform-origin: 50% 100%; transition: opacity 0.22s var(--ease), transform 0.25s var(--ease); }
#datepick.on { opacity: 1; transform: none; }
#datepick[hidden] { display: none; }
.dp-wheels { position: relative; display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; height: 180px; }
.dp-hl { position: absolute; left: 0; right: 0; top: 72px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); pointer-events: none; }
.dp-col { position: relative; height: 180px; overflow: hidden; touch-action: none; cursor: grab;
  scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); outline: none; }
.dp-col::-webkit-scrollbar { display: none; }
.dp-list { will-change: transform; }
.dp-item { height: 36px; display: grid; place-items: center; font-size: 17px; color: var(--ink-3); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: color 0.15s; user-select: none; -webkit-user-select: none; }
.dp-item.on { color: var(--ink); font-weight: 500; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.dp-done { background: var(--ink); color: #111; }
.dp-done:hover { background: var(--ink); }

/* Datumsrad: eigene Rad-Physik (viewer.js) – Rasten je Eintrag, Auswahlbalken bleibt ruhig (Jakob 14.10.) */
.dp-item { transition: color 0.12s; will-change: transform; }

/* Großansicht senkrecht wegwischen: Knöpfe/Beschriftung treten zurück, solange das Bild am Finger hängt */
#lb.vdrag .lb-btn, #lb.vdrag figcaption { opacity: 0; transition: opacity 0.15s; }

/* Rundgang-Knopf: eigene runde Glas-Fläche links neben der Ansicht-Leiste */
.walkbtn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); flex: none; }
.walkbtn[hidden] { display: none; }
.walkbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ============ Rundgang (Ich-Perspektive) ============ */
html.walk-lock, html.walk-lock body { overflow: hidden; overscroll-behavior: none; }
body.walking main, body.walking #cue, body.walking #hint, body.walking .top-r { opacity: 0; pointer-events: none; }
body.walking main { visibility: hidden; }
#walkui[hidden] { display: none; }
.walk-top { position: fixed; z-index: 30; top: var(--safe-t); right: var(--gutter); display: flex; gap: 8px; }
.walk-exit, .walk-help, .walk-sound { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); font-size: 18px; font-weight: 500; }
.walk-exit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
/* Lautsprecher wie die übrigen Leisten-Symbole: Linie 1,6; stumm = gedämpfte Farbe + Kreuz */
.walk-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.walk-sound { transition: color .2s var(--ease-io); }
.walk-sound[aria-pressed="false"] { color: var(--ink-2); }
.walk-sound[aria-pressed="true"] svg .off, .walk-sound[aria-pressed="false"] svg .on { display: none; }
/* Desktop: Steuerung dauerhaft über dem Dock, Tasten wie auf der Tastatur (nur leicht gerundet) */
.walk-keys { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + var(--dock-h, 72px) + 12px);
  display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-radius: 18px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.walk-keys .kgrp { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.walk-keys .krow { display: flex; gap: 4px; }
.walk-keys kbd { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 6px; font: 500 12px/1 var(--mono);
  color: var(--ink); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.08s, transform 0.08s; }
.walk-keys kbd.wide { min-width: 38px; }
.walk-keys kbd.on { background: rgba(255, 255, 255, 0.32); transform: translateY(1px); box-shadow: none; }
.walk-keys .kitem { display: flex; align-items: center; gap: 8px; }
.walk-keys .kitem svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.walk-keys .ksep { width: 1px; height: 34px; background: var(--ink-4); }
/* Handy: Dock weg (Platz für die Daumen), Stick erscheint unter dem linken Daumen */
@media (pointer: coarse) { body.walking #dock { opacity: 0; pointer-events: none; } }
.walk-stick { position: fixed; z-index: 25; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.walk-stick[hidden] { display: none; }
.walk-knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.walk-intro { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: var(--gutter); background: rgba(8, 9, 11, 0.45); }
.walk-intro[hidden] { display: none; }
.walk-card { display: grid; gap: 18px; justify-items: center; padding: 22px 20px 16px; border-radius: 26px; max-width: 340px; width: 100%; }
.walk-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.walk-thumbs figure { margin: 0; display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 14px; color: var(--ink-2); }
.walk-thumbs svg { width: 72px; height: 72px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.walk-thumbs svg .f { fill: var(--ink); stroke: none; }
.walk-go { min-width: 120px; }

/* ---------- Referenzseite (VORLAGE/referenzseite): nur Galerie, keine Bühne (Jakob 16.10.) ---------- */
body.nur-galerie main { pointer-events: auto; }
body.nur-galerie .sheet { border-radius: 0; box-shadow: none; padding-top: max(var(--gutter), env(safe-area-inset-top)); }
.ref-kopf { display: flex; align-items: center; gap: 12px; }
.ref-kopf .zurueck { margin: 0 0 0 -8px; width: 44px; height: 44px; }
.ref-kopf .zurueck svg { width: 24px; height: 24px; filter: none; }
