/* Eine Schrift für die ganze Seite (Robert 26.11.: „überall die Schrift aus dem Header photostockbooth“): Heebo,
   selbst gehostet (assets/schrift, SIL OFL), auf PC, Android und iPhone gleich, kein Abruf bei Google. */
@font-face { font-family: "Heebo"; src: url("schrift/Heebo-Thin.ttf") format("truetype"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "Heebo"; src: url("schrift/Heebo-ExtraLight.ttf") format("truetype"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Heebo"; src: url("schrift/Heebo-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Heebo"; src: url("schrift/Heebo-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Heebo"; src: url("schrift/Heebo-Medium.ttf") format("truetype"); font-weight: 500 900; font-style: normal; font-display: swap; }

:root {
	--weiss: #ffffff;
	--nebel: #f4f7fb;
	--text: #2b3440;
	--leise: #5b6573;
	--glas: rgba(255, 255, 255, 0.55);
	--glas-rand: rgba(255, 255, 255, 0.9);
	--schatten: 0 20px 60px rgba(40, 60, 90, 0.12);
	--schrift: "Heebo", "Segoe UI", Roboto, "Helvetica Neue", system-ui, -apple-system, sans-serif;
	--text-schrift: "Heebo", "Segoe UI", Roboto, "Helvetica Neue", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	height: 100%;
	background: linear-gradient(180deg, #eaf1fa 0%, #ffffff 55%, #ffffff 100%);
	color: var(--text);
	font-family: var(--schrift);
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-optical-sizing: auto;
}

body.drei { overflow: hidden; overscroll-behavior: none; touch-action: none; }

#raum { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }


#marke {
	position: fixed; top: max(22px, env(safe-area-inset-top)); left: 28px; z-index: 5;
}
#marke a {
	color: var(--text); text-decoration: none;
	font-weight: 400; font-family: var(--text-schrift); font-size: 15px; letter-spacing: 0.42em; text-transform: lowercase;
}

/* Zentrierung ohne transform: Schrift bleibt auf ganzen Pixeln und damit gestochen scharf */
#raumtitel {
	position: fixed; left: 0; right: 0; top: 14vh; margin: 0 auto;
	text-align: center; pointer-events: none; z-index: 4;
	opacity: 0; transition: opacity 1.4s ease;
	width: min(90vw, 900px);
}
#raumtitel.an { opacity: 1; }
#raumtitel h1 {
	margin: 0; font-weight: 300; font-size: clamp(30px, 5.2vw, 68px);
	letter-spacing: 0.18em; color: var(--text);
}
#raumtitel p {
	margin: 12px 0 0; font-weight: 400; font-family: var(--text-schrift); font-size: clamp(12px, 1.2vw, 15px);
	letter-spacing: 0.32em; text-transform: lowercase; color: var(--leise);
}

/* Raumleiste: nur Schrift, kein Hintergrund, keine Flaeche (Robert) */
#raeume {
	position: fixed; left: 0; right: 0; bottom: max(26px, env(safe-area-inset-bottom));
	display: flex; justify-content: safe center; gap: 8px; z-index: 5;
	pointer-events: none;
	overflow-x: auto; scrollbar-width: none; padding: 0 16px; white-space: nowrap; /* sieben Raeume: bei Bedarf seitlich wischen */
}
#raeume::-webkit-scrollbar { display: none; }
#raeume button { flex: none; }
#raeume button {
	pointer-events: auto;
	border: 0; border-bottom: 1px solid transparent; background: none; color: #4f5966; cursor: pointer;
	font: 400 14px var(--text-schrift); letter-spacing: 0.2em; text-transform: lowercase;
	padding: 12px 14px 6px; margin: 0 4px; border-radius: 0; transition: color .4s, border-color .4s;
}
#raeume button:hover { color: #1f2833; }
#raeume button[aria-current="true"] { color: #1f2833; border-bottom-color: #1f2833; }

#hinweis {
	position: fixed; left: 0; right: 0; bottom: calc(max(26px, env(safe-area-inset-bottom)) + 64px);
	margin: 0; text-align: center; font-size: 12px; letter-spacing: 0.18em; color: #55606d; font-family: var(--text-schrift);
	pointer-events: none; z-index: 4; transition: opacity 1.2s ease;
}
#hinweis.weg { opacity: 0; }

#laden {
	position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
	background: #ffffff; transition: opacity 1.6s ease;
}
#laden span { font-weight: 300; letter-spacing: 0.5em; color: var(--leise); animation: atmen 2.4s ease-in-out infinite; }
#laden.fertig { opacity: 0; pointer-events: none; }
@keyframes atmen { 50% { opacity: 0.35; } }

#nah {
	position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
	background: rgba(250, 252, 255, 0.72);
	backdrop-filter: blur(26px) saturate(1.1); -webkit-backdrop-filter: blur(26px) saturate(1.1);
	animation: auf .6s ease;
}
#nah[hidden] { display: none; }
#nah:focus { outline: none; }
#nah { perspective: 2200px; grid-template-rows: 1fr auto; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); }

/* Bildkarte: vorne das Foto, hinten die Infos; dreht sich wie eine Glasplatte */
#karte {
	position: relative; align-self: center; justify-self: center;
	transform-style: preserve-3d;
	transition: transform 1.1s cubic-bezier(0.22, 0.75, 0.2, 1);
}
#karte.gedreht { transform: rotateY(180deg); }
#karte .seite { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
#karte .vorne { position: relative; }

/* Umgeschlagene Hochglanz-Ecke (Robert: „nur glänzend, als wendet so ein ganz Hochglanz-Kunststoff“).
   Faltlinie ist die Diagonale: oben links die umgeschlagene, spiegelglatte Flaeche, unten rechts der freigelegte Grund.
   Keine Schatten, keine Rundung, nur Licht. */
#karte .ecke { position: absolute; right: 0; bottom: 0; width: 110px; height: 110px; z-index: 3; cursor: pointer; }
#karte .ecke::before, #karte .ecke::after {
	content: ""; position: absolute; right: 0; bottom: 0; width: 0; height: 0;
	transition: width .9s cubic-bezier(0.22, 0.75, 0.2, 1), height .9s cubic-bezier(0.22, 0.75, 0.2, 1);
}
#karte.bereit .ecke::before, #karte.bereit .ecke::after { width: 26px; height: 26px; }
#karte .ecke::after { background: #f4f7fb; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
#karte .ecke::before {
	clip-path: polygon(0 0, 100% 0, 0 100%);
	background:
		linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,0.95) 49%, transparent 52%),
		linear-gradient(315deg, #ffffff 0%, #eef2f7 18%, #ffffff 34%, #ffffff 40%, #dbe3ec 56%, #f7f9fc 70%, #ffffff 84%, #e8edf4 100%);
	background-size: 260% 260%, 100% 100%;
	background-position: 120% 120%, 0 0;
	animation: eckenGlanz 7s ease-in-out infinite;
}
#karte.bereit .ecke:hover::before, #karte.bereit .ecke:hover::after { width: 74px; height: 74px; }
#karte .ecke:hover::before { animation: eckenGlanz 1.6s ease-in-out infinite; }
@keyframes eckenGlanz { 0%, 70% { background-position: 120% 120%, 0 0; } 100% { background-position: -20% -20%, 0 0; } }
@media (hover: none) { #karte.bereit .ecke::before, #karte.bereit .ecke::after { width: 34px; height: 34px; } }
/* Robert: Schrift unter dem Bild wieder sichtbar, Eselsohr statt Pfeil; keine Glasecke am Bild */
#karte .ecke { display: none; }
@media (prefers-reduced-motion: reduce) { #karte .ecke::before { animation: none; } }
/* Schatten leichter, transparenter und weiter auslaufend, setzt erst unterhalb der Oberkante an (Robert, 25.11.) */
#nah img {
	display: block;
	max-width: min(94vw, 2560px); max-height: calc(100vh - 150px); width: auto; height: auto;
	box-shadow: 0 46px 110px -34px rgba(30, 45, 70, 0.13);
	transform-origin: center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none;
}
/* Bild gross ansehen: zwei Finger, Doppeltippen, Mausrad, Doppelklick, Ziehen */
#nah { overflow: hidden; }
#nah-vorne { touch-action: none; cursor: zoom-in; }
#nah.gezoomt #nah-vorne { cursor: grab; }
#nah.gezoomt #nah-vorne:active { cursor: grabbing; }
#nah.gezoomt img { box-shadow: none; }
#nah-zu, #nah-drehen { position: relative; z-index: 4; }
#nah-zu { position: absolute; }
/* Nach dem Umdrehen liegt die Rueckseite flach: Schrift scharf, Glaseffekte bleiben (Chrome am Handy) */
#karte.ruhe { transform: none; transition: none; }
#karte.ruhe .hinten { transform: none; }
#karte.ruhe .vorne { visibility: hidden; }
#karte .hinten.lang { overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; touch-action: pan-y; }
#karte .vorne { display: flex; align-items: center; justify-content: center; }
/* Rueckseite = dieselbe Glasscheibe von hinten: Foto schimmert seitenverkehrt und gefrostet durch,
   an den Raendern bricht das Glas das Bild klarer und farbiger (Linsenkante wie Liquid Glass),
   heller Lichtrand, und ein leiser Lichtschein folgt Maus oder Finger. */
#karte .hinten {
	position: absolute; inset: 0; transform: rotateY(180deg);
	display: flex; flex-direction: column; justify-content: safe center; gap: 14px;
	padding: clamp(22px, 5vw, 64px); overflow: hidden; isolation: isolate;
	background: #f4f7fb; border: 0;
	box-shadow: 0 46px 110px -34px rgba(30, 45, 70, 0.11);
	color: #1f2833;
}
#karte .hinten::before {
	content: ""; position: absolute; inset: -60px; z-index: -3;
	background: var(--bild) center / cover no-repeat; transform: scaleX(-1);
	filter: blur(30px) saturate(1.35) brightness(1.12); opacity: 0.6;
}
#karte .hinten .rand {
	position: absolute; inset: 0; z-index: -2; padding: 12px; pointer-events: none;
	background: var(--bild) center / cover no-repeat; transform: scaleX(-1) scale(1.08);
	filter: blur(5px) saturate(1.7) brightness(1.08); opacity: 0.75;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
#karte .hinten::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(520px circle at var(--mx, 28%) var(--my, 18%), rgba(255,255,255,0.6), rgba(255,255,255,0) 46%),
		linear-gradient(160deg, rgba(255,255,255,0.8), rgba(247,250,253,0.72) 55%, rgba(238,243,250,0.68));
	box-shadow: inset 0 1px 0 #fff, inset 1px 0 0 rgba(255,255,255,0.85), inset -1px 0 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(255,255,255,0.7);
}
#karte .hinten .raum { margin: 0; font-size: 12px; letter-spacing: 0.32em; text-transform: lowercase; color: var(--leise); }
#karte .hinten h2 { margin: 0; font-weight: 300; font-size: clamp(22px, 3.2vw, 40px); letter-spacing: 0.06em; }
#karte .hinten #nah-beschreibung { margin: 0; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.65; font-weight: 400; font-family: var(--text-schrift); max-width: 62ch; }
#karte .hinten dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 14px; }
#karte .hinten dt { color: var(--leise); }
#karte .hinten dd { margin: 0; }
#karte .hinten .urheber { margin: 8px 0 0; font-size: 12px; letter-spacing: 0.1em; color: var(--leise); line-height: 1.7; }

/* schwebender Knopf unter dem Bild */
/* Knopf unter dem Bild: nur feine, scharfe Schrift mit Haarlinie, kein Rahmen, kein Hintergrund */
#nah-drehen {
	justify-self: center; margin-top: 18px;
	border: 0; border-bottom: 1px solid rgba(31,40,51,0.55); border-radius: 0;
	background: none; color: #1f2833; box-shadow: none;
	font: 300 13px var(--text-schrift); letter-spacing: 0.22em;
	padding: 12px 2px 7px; min-height: 44px; cursor: pointer;
	transition: border-color .4s;
}
#nah-drehen:hover { border-bottom-color: #1f2833; }
#nah-drehen { display: inline-flex; align-items: center; gap: 12px; }
/* Drehsymbol: haarfeine Vektorlinien, eckige Enden, dreht sich beim Umdrehen selbst mit */
.dreh-symbol {
	flex: none; overflow: visible;
	fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: butt; stroke-linejoin: miter;
	shape-rendering: geometricPrecision;
	transition: transform 1.1s cubic-bezier(0.22, 0.75, 0.2, 1);
}
.dreh-symbol .knick { transform-origin: 17px 6px; transition: transform .5s cubic-bezier(0.22, 0.75, 0.2, 1); }
#nah-drehen:hover .dreh-symbol .knick { transform: scale(1.25); }
#nah-drehen[aria-pressed="true"] .dreh-symbol { transform: scaleX(-1); }
/* Tastaturfokus ohne Kasten: kraeftigere Linie darunter */
#nah-drehen:focus-visible, #raeume button:focus-visible { outline: none; border-bottom: 2px solid #1f2833; }
#nah-zu:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 6px; }
@keyframes schweben { 50% { transform: translateY(-4px); } }

/* Seitenkarten (about me, Rechtliches) */
#seite {
	position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px;
	background: rgba(250, 252, 255, 0.66);
	backdrop-filter: blur(26px) saturate(1.1); -webkit-backdrop-filter: blur(26px) saturate(1.1);
	animation: auf .6s ease;
}
#seite[hidden] { display: none; }
#seite-zu {
	position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px;
	width: 46px; height: 46px; border-radius: 0; border: 0; background: none;
	color: #1f2833; font-size: 30px; font-weight: 200; cursor: pointer;
}
/* Ganze Seite: dieselbe weisse Glasplatte, dieselbe feine Schrift wie im Raum */
.seitenkarte {
	width: min(760px, 100%); max-height: calc(100vh - 110px); overflow: auto;
	padding: clamp(28px, 7vw, 80px) clamp(24px, 7vw, 88px);
	background: linear-gradient(170deg, #ffffff 0%, #f6f9fd 60%, #eef3f9 100%);
	border: 0; border-radius: 0;
	box-shadow: 0 50px 120px rgba(30, 45, 70, 0.16), inset 0 1px 0 #fff;
	animation: auf .9s ease;
}
.seitenkarte .raum { margin: 0 0 14px; font: 300 12px var(--text-schrift); letter-spacing: 0.34em; text-transform: lowercase; color: #55606d; }
.seitenkarte h2 { margin: 0 0 30px; font-weight: 200; font-size: clamp(34px, 5vw, 58px); letter-spacing: 0.06em; color: #1f2833; }
.seitenkarte p { font: 300 clamp(15px, 1.4vw, 17px)/1.8 var(--text-schrift); color: #1f2833; margin: 0 0 18px; }
.glasknopf {
	display: inline-block; margin-top: 14px; padding: 10px 0 6px;
	border: 0; border-bottom: 1px solid #1f2833; border-radius: 0; background: none;
	color: #1f2833; text-decoration: none; font: 400 13px var(--text-schrift); letter-spacing: 0.18em;
}

/* Monumentale Glasplatten im Raum: echtes HTML, perspektivisch aufgelegt */
#platten { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.platte {
	box-sizing: border-box; padding: 110px 96px 90px; pointer-events: none;
	display: flex; flex-direction: column; color: #1f2833;
	font-family: var(--text-schrift); -webkit-font-smoothing: antialiased;
}
.platte .unter { margin: 0 0 18px; font-weight: 300; font-size: 22px; letter-spacing: 0.36em; text-transform: lowercase; color: #55606d; text-align: center; }
.platte h2 { margin: 0 0 56px; font-family: var(--schrift); font-weight: 200; font-size: 100px; letter-spacing: 0.04em; text-align: center; line-height: 1.05; }
.platte { overflow: hidden; }
.platte .text { flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.platte .text p { margin: 0 0 22px; font-weight: 300; font-size: 32px; line-height: 1.66; }
.platte .text p.beispiel { margin-top: 30px; font-size: 20px; letter-spacing: 0.08em; color: #5b6573; }
.platte .mehr {
	pointer-events: none; align-self: center;
	border: 0; border-bottom: 1px solid #1f2833; background: none; border-radius: 0;
	color: #1f2833; font: 400 22px var(--text-schrift); letter-spacing: 0.22em; padding: 14px 0 8px;
}
.platte.kurz { padding: 90px 70px 70px; }
.platte.kurz h2 { font-size: 120px; margin-bottom: 44px; }
.platte.kurz .text p { font-size: 46px; line-height: 1.55; }
.platte.kurz .mehr { font-size: 38px; }
.glasknopf:focus-visible, #seite-zu:focus-visible { outline: 2px solid #3d6fb6; outline-offset: 3px; }
#nah-zu {
	position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px;
	width: 46px; height: 46px; border-radius: 0; border: 0;
	background: none; color: #1f2833; font-size: 30px; font-weight: 200; cursor: pointer;
}
@keyframes auf { from { opacity: 0; } }

#recht {
	position: fixed; right: 24px; top: max(22px, env(safe-area-inset-top)); z-index: 5;
	display: flex; gap: 18px; font-size: 11px; letter-spacing: 0.14em;
}
#recht a, #recht span { color: var(--leise); text-decoration: none; }
#recht a:hover { color: var(--text); }

/* Bildliste: sichtbar ohne 3D, sonst nur fuer Screenreader und Suchmaschinen */
#liste { max-width: 1400px; margin: 0 auto; padding: 110px 16px 140px; }
#liste section { margin-bottom: 80px; }
#liste h2 { font-weight: 300; letter-spacing: 0.2em; font-size: 30px; margin: 0 0 6px; text-align: center; }
#liste .unter { text-align: center; color: var(--leise); letter-spacing: 0.28em; font-size: 12px; text-transform: lowercase; margin: 0 0 40px; }
#liste .raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 28px; }
#liste figure {
	margin: 0; padding: 14px; background: var(--glas); border: 1px solid var(--glas-rand);
	border-radius: 0; box-shadow: var(--schatten);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
#liste img { display: block; width: 100%; height: auto; }
#liste figcaption { margin-top: 10px; font-size: 13px; color: var(--leise); letter-spacing: 0.06em; }

body.drei #liste {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; padding: 0;
}
body:not(.drei) #raeume, body:not(.drei) #hinweis, body:not(.drei) #raumtitel { display: none; }
body:not(.drei) #recht { position: static; justify-content: center; padding: 0 16px 40px; }
body:not(.drei) #marke { position: absolute; }

@media (max-width: 640px) {
	#marke { left: 16px; }
	#marke a { font-size: 13px; letter-spacing: 0.3em; }
	#recht { right: 16px; gap: 12px; font-size: 10px; top: calc(max(22px, env(safe-area-inset-top)) + 30px); }
	#recht span, #recht .nur-gross { display: none; }
	#raeume button { padding: 12px 8px 6px; margin: 0 2px; font-size: 13px; letter-spacing: 0.14em; }
	#raumtitel { top: 11vh; }
	#karte .hinten { gap: 10px; padding: 22px 22px 20px; }
	#karte .hinten #nah-beschreibung { line-height: 1.55; }
}

@media (prefers-reduced-motion: reduce) {
	#laden span { animation: none; }
	#raumtitel, #laden, #hinweis, #karte { transition-duration: .01s; }
	#nah-drehen { animation: none; }
}

/* WordPress-Umgebung: eigene Grundwerte, damit Theme- und Plugin-Reste nichts verschieben */
body.psb-galerie { margin: 0; padding: 0; }
body.psb-galerie #liste a { color: #1f2833; }

/* Notsicherung (24.11.2026): Ladeblende verschwindet spaetestens nach 5 s von selbst,
   auch wenn ein Optimierer (10Web "JS verzoegern") das Galerie-Skript zurueckhaelt.
   Dann bleibt die normale Fotoliste sichtbar statt eines pulsierenden Schriftzugs. */
#laden { animation: ladenWeg 0.8s ease 5s forwards; }
@keyframes ladenWeg { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* 25.11.2026: Ladeblende nur, wenn 3D moeglich ist (Inline-Pruefung im Kopf setzt html.js-drei).
   Geraete ohne 3D sehen sofort die Bildliste. Mit 3D bleibt die Liste bis zum Start verborgen;
   faellt das Skript aus, erscheint sie nach 6 s trotzdem. */
#laden { display: none; }
html.js-drei #laden { display: grid; }
html.js-drei body:not(.drei) #liste { visibility: hidden; animation: listeZeigen 0s linear 6s forwards; }
@keyframes listeZeigen { to { visibility: visible; } }

/* Alles in Kleinschrift und in derselben Schrift, Kopf bis Fuß, auch Cookie-Banner (Robert 26.11.).
   Nur die Darstellung ist klein: im Seitentext bleibt die richtige Schreibweise für Vorlesegeräte und Suchmaschinen. */
body, body *:not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class^="fa "]):not(.dashicons):not([class*="dashicons-"]), body input::placeholder, body textarea::placeholder {
	text-transform: lowercase !important; font-family: var(--text-schrift) !important;
}

/* Leiste unter dem Foto in der 3D-Leuchtbox: Umdrehen, Seite dieses Fotos, Dieses Foto nutzen (Robert 26.11.) */
#nah-leiste { justify-self: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 28px; margin-top: 18px; position: relative; z-index: 4; }
#nah-leiste #nah-drehen { margin-top: 0; }
.nah-link {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px;
	color: #1f2833; text-decoration: none; border-bottom: 1px solid rgba(31,40,51,0.55);
	font: 300 13px var(--text-schrift); letter-spacing: 0.22em;
}
.nah-link:hover { border-bottom-color: #1f2833; }
.nah-link:focus-visible { outline: none; border-bottom: 2px solid #1f2833; }
.nah-link[hidden] { display: none; }
.nah-nutzen { padding: 0 16px; border: 1px solid rgba(31,40,51,0.55); background: rgba(255,255,255,0.7); }
.nah-nutzen:hover { background: #fff; border-color: #1f2833; }
@media (max-width: 640px) { #nah-leiste { gap: 6px 18px; } .nah-link { font-size: 12px; letter-spacing: 0.16em; } }

/* Steuerung unten rechts wie bei Panorama-Rundgaengen (Robert 26.11.): eckige Glasflaeche, feine Linien, 44-px-Felder */
#steuerung { display: none; }
.js-drei #steuerung {
	position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); z-index: 6;
	display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 44px);
	grid-template-areas: ". vor ." "links mitte rechts" ". zurueck .";
	padding: 6px; gap: 2px;
	background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(31, 40, 51, 0.14);
	-webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 18px 40px -22px rgba(30, 45, 70, 0.45);
}
.st {
	display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0;
	border: 0; border-radius: 0; background: transparent; color: #1f2833; cursor: pointer;
	transition: background .25s ease, transform .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.st svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: butt; stroke-linejoin: miter; }
.st:hover { background: rgba(255, 255, 255, 0.95); }
.st:active { transform: scale(0.94); }
.st:focus-visible { outline: 2px solid #1f2833; outline-offset: -2px; }
.st-vor { grid-area: vor; } .st-links { grid-area: links; } .st-mitte { grid-area: mitte; } .st-rechts { grid-area: rechts; } .st-zurueck { grid-area: zurueck; }
.st-mitte { border: 1px solid rgba(31, 40, 51, 0.14); }
.st-mitte svg { width: 18px; height: 18px; }
/* schmalere Fenster: ueber die Raumleiste, damit sie nichts verdeckt */
@media (max-width: 1500px) { .js-drei #steuerung { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 104px); } }
@media (max-width: 640px) {
	.js-drei #steuerung { right: 12px; bottom: calc(max(26px, env(safe-area-inset-bottom)) + 108px); grid-template-columns: repeat(3, 40px); grid-template-rows: repeat(3, 40px); padding: 4px; }
	.st { width: 40px; height: 40px; }
}
@media (prefers-reduced-transparency: reduce) { .js-drei #steuerung { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (forced-colors: active) { .js-drei #steuerung { border: 1px solid CanvasText; } .st svg { stroke: CanvasText; } }

/* Steuerung futuristisch im Sucher-Stil (Robert 26.11.: „ein wenig futuristischer“), eckig wie die ganze Seite:
   Ecken-Klammern wie im Kamerasucher, haarfeine Pfeile mit Lichtsaum, Fokusfeld mit Kompassnadel. */
.js-drei #steuerung {
	background:
		linear-gradient(#1f2833, #1f2833) left top / 12px 1px no-repeat,
		linear-gradient(#1f2833, #1f2833) left top / 1px 12px no-repeat,
		linear-gradient(#1f2833, #1f2833) right top / 12px 1px no-repeat,
		linear-gradient(#1f2833, #1f2833) right top / 1px 12px no-repeat,
		linear-gradient(#1f2833, #1f2833) left bottom / 12px 1px no-repeat,
		linear-gradient(#1f2833, #1f2833) left bottom / 1px 12px no-repeat,
		linear-gradient(#1f2833, #1f2833) right bottom / 12px 1px no-repeat,
		linear-gradient(#1f2833, #1f2833) right bottom / 1px 12px no-repeat,
		linear-gradient(150deg, rgba(255,255,255,0.78), rgba(236,243,251,0.42));
	border: 1px solid rgba(255, 255, 255, 0.85);
	outline: 1px solid rgba(31, 40, 51, 0.08); outline-offset: 0;
	box-shadow: inset 0 1px 0 #fff, inset 0 -18px 30px -24px rgba(120, 160, 210, 0.35), 0 22px 48px -26px rgba(30, 45, 70, 0.55);
}
.st { position: relative; }
.st svg { stroke-width: 1.1; transition: filter .3s ease, transform .3s ease; }
.st:hover { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.55) 70%, transparent 100%); }
.st:hover svg { filter: drop-shadow(0 0 3px rgba(110, 170, 235, 0.9)); }
.st-vor:hover svg { transform: translateY(-2px); } .st-zurueck:hover svg { transform: translateY(2px); }
.st-links:hover svg { transform: translateX(-2px); } .st-rechts:hover svg { transform: translateX(2px); }
.st-mitte { border: 0; }
.st-mitte svg { width: 26px; height: 26px; }
.st-mitte .af { stroke-width: 1; }
.st-mitte .nadel { transform-origin: 12px 12px; transform-box: view-box; transition: transform .25s linear; }
.st-mitte .nadel path { stroke: #1f2833; stroke-width: 1.3; }
.st-mitte .nadel circle { fill: #1f2833; stroke: none; }
.st-mitte:hover .nadel path { stroke: #3b82c4; }
@media (prefers-reduced-motion: reduce) { .st svg, .st-mitte .nadel { transition: none; } .st:hover svg { transform: none; } }
@media (forced-colors: active) { .js-drei #steuerung { background: Canvas; } .st-mitte .nadel circle { fill: CanvasText; } }

/* Dunkelkammer golden hour (Robert 26.11.): helle Schrift und dunkle Glas-Steuerung, weich überblendet */
#marke a, #recht a, #recht span, #raumtitel h1, #raumtitel p, #raeume button, #hinweis { transition: color .9s ease, border-color .9s ease; }
body.dunkel #marke a, body.dunkel #raumtitel h1 { color: #eef2f7; }
body.dunkel #raumtitel p, body.dunkel #hinweis, body.dunkel #recht a, body.dunkel #recht span, body.dunkel #raeume button { color: #aeb8c4; }
body.dunkel #recht a:hover, body.dunkel #raeume button:hover { color: #ffffff; }
body.dunkel #raeume button[aria-current="true"] { color: #ffffff; border-bottom-color: #ffffff; }
body.dunkel #raeume button:focus-visible { border-bottom-color: #ffffff; }
body.dunkel #steuerung {
	background:
		linear-gradient(#e6ebf2, #e6ebf2) left top / 12px 1px no-repeat, linear-gradient(#e6ebf2, #e6ebf2) left top / 1px 12px no-repeat,
		linear-gradient(#e6ebf2, #e6ebf2) right top / 12px 1px no-repeat, linear-gradient(#e6ebf2, #e6ebf2) right top / 1px 12px no-repeat,
		linear-gradient(#e6ebf2, #e6ebf2) left bottom / 12px 1px no-repeat, linear-gradient(#e6ebf2, #e6ebf2) left bottom / 1px 12px no-repeat,
		linear-gradient(#e6ebf2, #e6ebf2) right bottom / 12px 1px no-repeat, linear-gradient(#e6ebf2, #e6ebf2) right bottom / 1px 12px no-repeat,
		linear-gradient(150deg, rgba(40,46,56,0.62), rgba(12,14,18,0.5));
	border-color: rgba(255, 255, 255, 0.16); outline-color: rgba(255, 255, 255, 0.06);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 22px 48px -26px rgba(0, 0, 0, 0.8);
}
body.dunkel .st { color: #e6ebf2; }
body.dunkel .st:hover { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.05) 70%, transparent 100%); }
body.dunkel .st-mitte .nadel path { stroke: #e6ebf2; }
body.dunkel .st-mitte .nadel circle { fill: #e6ebf2; }
body.dunkel .st:focus-visible { outline-color: #ffffff; }

/* Lichtschalter und Hilfe unten rechts (Robert 26.11.): klein, Milchglas, eckig wie die ganze Seite */
#ecke { display: none; }
.js-drei #ecke {
	position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); z-index: 6;
	display: flex; flex-direction: column; gap: 8px;
}
.eckknopf {
	display: grid; place-items: center; width: 40px; height: 40px; padding: 0; margin: 0; cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 0; color: #1f2833;
	background: linear-gradient(150deg, rgba(255,255,255,0.72), rgba(236,243,251,0.4));
	-webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
	box-shadow: inset 0 1px 0 #fff, 0 14px 30px -18px rgba(30, 45, 70, 0.5);
	transition: background .4s ease, color .4s ease, border-color .4s ease, transform .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.eckknopf svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: butt; stroke-linejoin: miter; }
.eckknopf circle { fill: currentColor; stroke: none; }
.eckknopf .sonne circle { fill: none; stroke: currentColor; }
.eckknopf:hover svg { filter: drop-shadow(0 0 3px rgba(110, 170, 235, 0.9)); }
.eckknopf:active { transform: scale(0.94); }
.eckknopf:focus-visible { outline: 2px solid #1f2833; outline-offset: 2px; }
#licht .sonne { display: none; }
#licht[aria-pressed="true"] .sonne { display: block; }
#licht[aria-pressed="true"] .mond { display: none; }
@media (max-width: 1500px) { .js-drei #ecke { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 104px); } }
@media (max-width: 640px) { .js-drei #ecke { right: 12px; bottom: calc(max(26px, env(safe-area-inset-bottom)) + 108px); } }
body.dunkel .eckknopf { color: #e6ebf2; border-color: rgba(255,255,255,0.18); background: linear-gradient(150deg, rgba(40,46,56,0.62), rgba(12,14,18,0.5)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 14px 30px -18px rgba(0,0,0,0.8); }
body.dunkel .eckknopf:focus-visible { outline-color: #ffffff; }

/* Hilfe-Fenster aus Milchglas */
#hilfe {
	width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 30px 32px 26px; margin: auto;
	border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 0; color: #1f2833;
	background: linear-gradient(155deg, rgba(255,255,255,0.8), rgba(238,244,251,0.62));
	-webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
	box-shadow: inset 0 1px 0 #fff, 0 40px 90px -40px rgba(20, 30, 50, 0.55);
	font: 300 15px/1.6 var(--text-schrift);
}
#hilfe::backdrop { background: rgba(245, 248, 252, 0.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#hilfe[open] { animation: hilfeAuf .45s ease; }
@keyframes hilfeAuf { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#hilfe h2 { margin: 0 0 4px; font: 200 28px/1.2 var(--schrift); letter-spacing: 0.02em; }
#hilfe .hilfe-einleitung { margin: 0 0 18px; color: var(--leise); }
#hilfe .hilfe-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
#hilfe h3 { margin: 0 0 6px; font: 400 12px/1.4 var(--text-schrift); letter-spacing: 0.28em; color: var(--leise); }
#hilfe section p { margin: 0 0 8px; }
#hilfe .hilfe-schluss { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid rgba(31,40,51,0.12); }
#hilfe .hilfe-schluss span { display: inline-block; margin-top: 6px; letter-spacing: 0.2em; }
#hilfe .hilfe-zu { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; background: none; color: #1f2833; font-size: 26px; font-weight: 200; cursor: pointer; }
#hilfe .hilfe-zu:focus { outline: none; }
#hilfe .hilfe-zu:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 6px; } /* kein Kasten um das × (Robert 26.11.) */
#hilfe h2:focus { outline: none; }
@media (max-width: 560px) { #hilfe { padding: 26px 20px 20px; } #hilfe .hilfe-spalten { grid-template-columns: 1fr; } #hilfe h2 { font-size: 24px; } }
body.dunkel #hilfe { color: #eef2f7; border-color: rgba(255,255,255,0.16); background: linear-gradient(155deg, rgba(36,42,52,0.82), rgba(10,12,16,0.72)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 40px 90px -40px rgba(0,0,0,0.9); }
body.dunkel #hilfe .hilfe-einleitung, body.dunkel #hilfe h3 { color: #aeb8c4; }
body.dunkel #hilfe .hilfe-schluss { border-top-color: rgba(255,255,255,0.14); }
body.dunkel #hilfe .hilfe-zu { color: #eef2f7; }
body.dunkel #hilfe::backdrop { background: rgba(0, 0, 0, 0.35); }
@media (prefers-reduced-motion: reduce) { #hilfe[open] { animation: none; } .eckknopf { transition: none; } }
@media (prefers-reduced-transparency: reduce) { .eckknopf, #hilfe { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; } body.dunkel .eckknopf, body.dunkel #hilfe { background: #14171c; } }
@media (forced-colors: active) { .eckknopf, #hilfe { border: 1px solid CanvasText; } }

/* Mond und Fragezeichen rund und dezent (Robert 26.11.: „rund, ohne viel Rand, dezent, auf Dunkel noch erkennbar“).
   Bewusste Ausnahme von der eckigen Linie: nur diese zwei kleinen Knöpfe. */
.eckknopf {
	width: 38px; height: 38px; border: 0 !important; border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.34); box-shadow: none;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	color: rgba(31, 40, 51, 0.78);
}
.eckknopf:hover { background: rgba(255, 255, 255, 0.62); color: #1f2833; }
.eckknopf:hover svg { filter: none; }
.eckknopf svg { width: 19px; height: 19px; stroke-width: 1.25; }
.eckknopf:focus-visible { outline: 1.5px solid currentColor; outline-offset: 3px; }
body.dunkel .eckknopf { background: rgba(255, 255, 255, 0.07); box-shadow: none; color: rgba(238, 242, 247, 0.82); }
body.dunkel .eckknopf:hover { background: rgba(255, 255, 255, 0.16); color: #ffffff; }
#ecke { gap: 10px; }

/* Nebel statt Knopf (Robert 26.11.: „kein harter Button, wie so ein Nebel dahinter, von innen nach außen auslaufend“) */
.eckknopf {
	width: 46px; height: 46px;
	-webkit-backdrop-filter: none !important; backdrop-filter: none !important;
	background: radial-gradient(circle closest-side, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.5) 38%, rgba(255,255,255,0.16) 70%, rgba(255,255,255,0) 100%);
	transition: background .4s ease, color .4s ease;
}
.eckknopf:hover { background: radial-gradient(circle closest-side, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 42%, rgba(255,255,255,0.24) 74%, rgba(255,255,255,0) 100%); }
body.dunkel .eckknopf { background: radial-gradient(circle closest-side, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.08) 42%, rgba(255,255,255,0.02) 72%, rgba(255,255,255,0) 100%); }
body.dunkel .eckknopf:hover { background: radial-gradient(circle closest-side, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0.13) 45%, rgba(255,255,255,0.03) 76%, rgba(255,255,255,0) 100%); }
#ecke { gap: 2px; }
@media (prefers-reduced-transparency: reduce) { .eckknopf { background: radial-gradient(circle closest-side, #fff 0%, #fff 60%, rgba(255,255,255,0) 100%); } body.dunkel .eckknopf { background: radial-gradient(circle closest-side, #2a2f37 0%, #2a2f37 60%, rgba(0,0,0,0) 100%); } }
/* auf hellem Grund: zarter blaugrauer Nebel, damit er sichtbar bleibt (Weiß auf Weiß verschwand) */
body:not(.dunkel) .eckknopf { background: radial-gradient(circle closest-side, rgba(150,170,196,0.30) 0%, rgba(165,184,208,0.18) 42%, rgba(180,196,216,0.06) 72%, rgba(180,196,216,0) 100%); }
body:not(.dunkel) .eckknopf:hover { background: radial-gradient(circle closest-side, rgba(140,162,190,0.42) 0%, rgba(160,180,205,0.26) 45%, rgba(180,196,216,0.08) 76%, rgba(180,196,216,0) 100%); }

/* Großansicht im dunklen Raum (Robert 27.11.: „auf einmal so ein grauer Hintergrund, das irritiert total“):
   bleibt schwarz wie der Raum, Rückseite als dunkles Glas, Schrift hell. */
body.dunkel #nah { background: rgba(4, 5, 7, 0.9); }
body.dunkel #nah img { box-shadow: 0 46px 110px -34px rgba(0, 0, 0, 0.9); }
body.dunkel #nah-zu { color: #eef2f7; }
body.dunkel #nah-drehen, body.dunkel .nah-link { color: #eef2f7; border-bottom-color: rgba(238, 242, 247, 0.55); }
body.dunkel #nah-drehen:hover, body.dunkel .nah-link:hover, body.dunkel #nah-drehen:focus-visible, body.dunkel .nah-link:focus-visible { border-bottom-color: #ffffff; }
body.dunkel #karte .hinten { background: #14171c; color: #eef2f7; box-shadow: 0 46px 110px -34px rgba(0, 0, 0, 0.9); }
body.dunkel #karte .hinten::before { filter: blur(30px) saturate(1.2) brightness(0.55); opacity: 0.55; }
body.dunkel #karte .hinten .rand { filter: blur(5px) saturate(1.5) brightness(0.8); }
body.dunkel #karte .hinten::after {
	background:
		radial-gradient(520px circle at var(--mx, 28%) var(--my, 18%), rgba(255,255,255,0.1), rgba(255,255,255,0) 46%),
		linear-gradient(160deg, rgba(24,28,34,0.82), rgba(16,19,24,0.8) 55%, rgba(10,12,16,0.82));
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 1px 0 0 rgba(255,255,255,0.12), inset -1px 0 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(255,255,255,0.1);
}
body.dunkel #karte .hinten .raum, body.dunkel #karte .hinten dt, body.dunkel #karte .hinten .urheber { color: #aeb8c4; }
body.dunkel #karte .ecke::after { background: #14171c; }

/* Handy quer und schmale Fenster (Robert 27.11.: Schrift überlagert sich): Links unter den Schriftzug wie am Handy hochkant */
@media (min-width: 641px) and (max-width: 1100px) {
	#recht { top: calc(max(22px, env(safe-area-inset-top)) + 32px); right: max(20px, env(safe-area-inset-right)); gap: 14px; font-size: 10px; }
	#marke { left: max(20px, env(safe-area-inset-left)); }
	#marke a { font-size: 14px; letter-spacing: 0.34em; }
	#recht span, #recht .nur-gross { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
	#raumtitel { top: calc(max(22px, env(safe-area-inset-top)) + 58px); }
	#raumtitel h1 { font-size: clamp(24px, 4vw, 38px); }
	#raumtitel p { margin-top: 8px; }
}

/* Logo rb-Ligatur vor dem Schriftzug der Galerie (Robert 27.11., nur mit html.psb-logo) */
html.psb-logo #marke a { display: inline-flex; align-items: center; }
html.psb-logo #marke a::before { content: ""; flex: 0 0 auto; width: 1.45em; height: 1.45em; margin-right: 0.8em; background: currentColor; -webkit-mask: url("../assets/logo/zeichen.svg") center / contain no-repeat; mask: url("../assets/logo/zeichen.svg") center / contain no-repeat; }

/* Vollbild-Knopf (Robert 27.11.): gleiche Form wie Mond und Hilfe, darüber in einer Reihe */
#vollbild[hidden] { display: none; }
#vollbild .zu { display: none; }
#vollbild[aria-pressed="true"] .auf { display: none; }
#vollbild[aria-pressed="true"] .zu { display: block; }

/* Feine helle Linie rechts und unten im dunklen Raum (Robert 27.11., am OLED-Handy grün/lila): heller Seitenhintergrund schien durch die 1-px-Rundung der 3D-Fläche. Im Dunkeln schwarz. */
html:has(body.dunkel), body.dunkel { background: #000 !important; }
