/* CODE Prints – dunkles Thema nach docs/DESIGN.md */
@font-face { font-family: "Inter Tight"; font-weight: 400; font-display: swap; src: url("../fonts/inter-tight-latin-400.08fe63686389.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url("../fonts/inter-tight-latin-600.3fe302c6be52.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-display: swap; src: url("../fonts/inter-tight-latin-700.4e5abb7536ed.woff2") format("woff2"); }

:root {
  --bg: #0e0e0e;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --line: #2a2a2a;
  --text: #f5f5f4;
  --muted: #a3a3a3;
  --accent: #ff5a1f;
  --accent-2: #ff8a3d;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 28px;
  --radius-s: 14px;
  --max: 1200px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.55 "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 .4em; }
h1 { font-size: clamp(44px, 8vw, 104px); }
h2 { font-size: clamp(32px, 4.6vw, 56px); }
h3 { font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.klein { font-size: 14px; }
.label { color: var(--accent); font-weight: 600; font-size: 17px; margin-bottom: .6em; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 50; background: rgba(14,14,14,.82); backdrop-filter: blur(10px); }
.kopf .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.marke { font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
.marke span { color: var(--accent); }
.nav { margin-left: auto; display: none; gap: 26px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a.aktiv { color: var(--text); }
@media (min-width: 900px) { .nav { display: flex; } }
.menue-knopf { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; }
@media (min-width: 900px) { .menue-knopf { display: none; } }
.nav.offen { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
  background: var(--bg); padding: 16px; border-bottom: 1px solid var(--line); }

/* Knöpfe: weiße Pille mit Akzent-Kreis */
.knopf { display: inline-flex; align-items: center; gap: 12px; background: var(--text); color: #111;
  border: 0; border-radius: 999px; padding: 6px 6px 6px 20px; font: 600 15px/1 "Inter Tight", sans-serif;
  text-decoration: none; cursor: pointer; white-space: nowrap; }
.knopf::after { content: "→"; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 16px; }
.knopf:hover::after { background: var(--accent-2); }
.knopf.akzent { background: var(--accent); color: #fff; }
.knopf.akzent::after { background: #fff; color: var(--accent); }
.knopf[disabled] { opacity: .45; cursor: not-allowed; }
.knopf.schlicht { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 12px 18px; }
.knopf.schlicht::after { display: none; }

/* Hero */
.hero { position: relative; margin: 8px 0 0; border-radius: var(--radius); overflow: hidden; min-height: 560px;
  background: #1b0d06 center/cover no-repeat; display: flex; }
.hero::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,90,31,.88) 0%, rgba(214,58,12,.62) 38%, rgba(20,10,6,.25) 70%, rgba(0,0,0,.55) 100%); }
.hero-inhalt { position: relative; display: grid; gap: 28px; padding: 32px 22px; width: 100%; align-content: space-between; }
@media (min-width: 900px) { .hero { min-height: 640px; } .hero-inhalt { padding: 56px 48px 40px; grid-template-columns: 1.4fr 1fr; } }
.hero h1 { margin: .1em 0 0; }
.hero .vorzeile { font-size: 22px; font-weight: 600; }
.hero .claim { align-self: center; max-width: 340px; }
.hero .claim strong { display: block; font-size: 24px; line-height: 1.2; margin-bottom: 10px; }
.hero .claim p { color: rgba(255,255,255,.8); font-size: 15px; }
.leistungen { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; font-size: 14px; }
@media (min-width: 900px) { .leistungen { grid-template-columns: repeat(4, 1fr); } }
.leistungen b { display: block; font-weight: 600; }
.leistungen b::before { content: "#"; color: var(--accent-2); }
.hero .leistungen b::before { color: #ffd2b8; }

/* Karten und Raster */
.karte { background: var(--surface); border-radius: var(--radius); padding: 28px 22px; }
@media (min-width: 720px) { .karte { padding: 40px; } }
.leiste { margin-top: -28px; padding-top: 52px; display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: center;
  border-radius: 0 0 var(--radius) var(--radius); }
.leiste .titel { font-size: 13px; color: var(--muted); max-width: 140px; }
.leiste span.q { font-weight: 600; font-size: 17px; opacity: .9; }
.abschnitt { padding: 72px 0; }
.zweispaltig { display: grid; gap: 28px; }
@media (min-width: 900px) { .zweispaltig { grid-template-columns: 1fr 1fr; align-items: end; } }
.raster { display: grid; gap: 18px; }
@media (min-width: 720px) { .raster.zwei { grid-template-columns: 1fr 1fr; } .raster.drei { grid-template-columns: repeat(3, 1fr); } }
.produkt { display: flex; flex-direction: column; gap: 14px; min-height: 340px; position: relative; overflow: hidden; }
.produkt .nummer { color: var(--accent); font-weight: 600; }
.produkt .preis { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; margin-top: auto; }
.produkt .preis small { font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.schritt b { display: block; color: var(--accent); font-size: 15px; margin-bottom: 8px; }

/* Formulare */
label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 13px 14px; font: inherit; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=file] { color: var(--muted); font: inherit; font-size: 15px; }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px; }
.feld { margin-bottom: 18px; }
.check label { display: inline; color: var(--text); font-size: 15px; }
.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl label { margin: 0; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text);
  cursor: pointer; font-size: 15px; }
.wahl input:checked + label { background: var(--text); color: #111; border-color: var(--text); }
.wahl input:focus-visible + label { outline: 2px solid var(--accent); }
.fehlerliste, .errorlist { color: var(--err); font-size: 14px; list-style: none; padding: 0; margin: 6px 0 0; }

/* Meldungen */
.meldung { border-radius: var(--radius-s); padding: 14px 18px; margin: 16px 0; background: var(--surface-2); border-left: 4px solid var(--accent); }
.meldung.error { border-color: var(--err); }
.meldung.success { border-color: var(--ok); }
.entwurf { border: 1px dashed var(--warn); color: var(--warn); border-radius: var(--radius-s); padding: 12px 16px; margin-bottom: 22px; font-size: 15px; }

/* Konfigurator */
.konfig { display: grid; gap: 18px; }
@media (min-width: 1000px) { .konfig { grid-template-columns: 380px 1fr; align-items: start; } .konfig .seitenleiste { position: sticky; top: 84px; } }
#karte { height: 380px; border-radius: var(--radius-s); background: #222; }
@media (min-width: 1000px) { #karte { height: 460px; } }
.leaflet-container { font: inherit; }
.karte-dunkel .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.3); }
#modell3d { height: 380px; border-radius: var(--radius-s); background: radial-gradient(ellipse at 50% 30%, #2a2622, #121212); position: relative; overflow: hidden; }
#modell3d canvas { display: block; }
.ueberlagerung { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); font-size: 15px; }
.preisbox { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.preisbox .gross { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; }
.zeile { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); }
.reiter { display: flex; gap: 8px; margin-bottom: 10px; }
.drehen { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: d 0.9s linear infinite; margin: 0 auto 10px; }
@keyframes d { to { transform: rotate(360deg); } }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 400; font-size: 14px; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-scroll { overflow-x: auto; }

/* Fließtext-Seiten */
.text { max-width: 760px; }
.text h2 { font-size: 30px; margin-top: 1.6em; }
.text h3 { margin-top: 1.4em; }
.text h4 { margin: 1.3em 0 .3em; font-size: 17px; }
.text li { margin-bottom: .4em; }
.text code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; }

/* Status */
.status-schritte { display: grid; gap: 10px; list-style: none; padding: 0; counter-reset: s; }
.status-schritte li { padding: 14px 16px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--muted); }
.status-schritte li.erledigt { color: var(--text); }
.status-schritte li.aktuell { color: var(--text); outline: 1px solid var(--accent); }

/* Fuß */
.fuss { margin-top: 80px; padding: 48px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.fuss .spalten { display: grid; gap: 28px; }
@media (min-width: 720px) { .fuss .spalten { grid-template-columns: 2fr 1fr 1fr; } }
.fuss a { text-decoration: none; display: block; margin-bottom: 6px; }
.fuss a:hover { color: var(--text); }
.quellen { margin-top: 28px; font-size: 12px; line-height: 1.5; }
.hinweisbalken { background: var(--accent); color: #fff; text-align: center; padding: 8px 16px; font-size: 14px; }

/* ---- CODE-Logos und Überseite ---------------------------------------------------------- */
.marke-logo { display: flex; align-items: center; }
.marke-logo img { height: 34px; width: auto; display: block; }
.nav .nav-zurueck { border-left: 1px solid var(--line); padding-left: 22px; }
.code-hero { padding: 72px 0 40px; display: grid; gap: 22px; }
.code-marke { width: min(560px, 90%); container-type: inline-size; }
.code-hero-logo { width: 100%; height: auto; display: block; }
/* Linke Kante von C und D im Logo: 6 / 537,56 und 277,54 / 537,56 der Breite */
.code-auflosung { position: relative; height: 1.5em; margin: 2.2cqi 0 0; font-size: 6.4cqi; font-weight: 400;
  letter-spacing: .01em; color: var(--muted); }
.code-auflosung span { position: absolute; top: 0; white-space: nowrap; }
.code-auflosung .co { left: 1.12%; }
.code-auflosung .de { left: 51.63%; }
.code-auflosung b { color: var(--accent); font-weight: 700; }
.code-claim { font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; line-height: 1.3; max-width: 720px; color: var(--muted); margin-top: 18px; }
.code-claim span { color: var(--text); display: block; font-size: 1.25em; letter-spacing: -0.02em; }
.bereiche { display: grid; gap: 18px; }
@media (min-width: 720px) { .bereiche { grid-template-columns: 1fr 1fr; } }
.bereich-kachel { display: flex; flex-direction: column; gap: 14px; text-decoration: none; min-height: 300px;
  transition: background .2s, transform .2s; }
.bereich-kachel:hover { background: var(--surface-2); transform: translateY(-2px); }
.bereich-logo { height: 64px; width: auto; align-self: flex-start; }
.bereich-kachel .knopf { margin-top: auto; align-self: flex-start; }
.knopf.pfeil::after { display: none; }
.knopf.pfeil { gap: 8px; }
.knopf.pfeil::before { content: "→"; order: 2; color: var(--accent); }

/* Publikationen */
.publikationen { display: grid; gap: 14px; margin-top: 18px; }
.publikation { display: grid; gap: 18px; padding: 24px 22px; }
@media (min-width: 720px) { .publikation { grid-template-columns: 110px 1fr; padding: 28px 32px; } }
.publikation h3 { font-size: 21px; margin-bottom: 8px; }
.publikation h3 a { text-decoration: none; }
.publikation h3 a:hover { color: var(--accent-2); }
.pub-jahr { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; color: var(--accent); }
.pub-status { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--warn); margin-top: 4px; }

/* ---- Prints-Hero: Wege und Flussdiagramm ------------------------------------------------ */
.hero h1 { font-size: clamp(42px, 6.6vw, 92px); max-width: 11ch; }
.hero-wege { display: grid; gap: 10px; margin-top: 18px; }
.hero-weg { display: grid; grid-template-columns: 1fr auto; align-items: center; text-decoration: none;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); border-radius: 18px; padding: 12px 18px;
  backdrop-filter: blur(6px); transition: background .2s, color .2s; }
.hero-weg span { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.hero-weg small { grid-column: 1; color: rgba(255,255,255,.75); font-size: 13px; }
.hero-weg::after { content: "→"; grid-row: 1 / 3; grid-column: 2; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: #fff; color: var(--accent); font-size: 17px; }
.hero-weg:hover { background: #fff; color: #111; }
.hero-weg:hover small { color: #555; }
.hero-weg:hover::after { background: var(--accent); color: #fff; }

.fluss { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; row-gap: 12px; }
.fluss li { display: flex; align-items: center; }
.fluss li:not(:last-child)::after { content: ""; width: clamp(22px, 4vw, 54px); height: 12px; margin: 0 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6h50' stroke='white' stroke-width='1.2' stroke-dasharray='3 3'/%3E%3Cpath d='M46 1.5l5 4.5-5 4.5' fill='none' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.fluss-knoten { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.16); backdrop-filter: blur(6px); }
.fluss-knoten::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ffd2b8; box-shadow: 0 0 0 3px rgba(255,210,184,.25); }
.fluss-ziel { background: #fff; color: #111; border-color: #fff; }
.fluss-ziel::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(255,90,31,.25); }
@media (max-width: 719px) {
  .fluss { flex-direction: column; align-items: flex-start; row-gap: 0; }
  .fluss li { flex-direction: column; align-items: flex-start; }
  .fluss li:not(:last-child)::after { width: 12px; height: 18px; margin: 4px 0 4px 16px; transform: rotate(90deg) scaleX(1.4); }
}
.leiste-link { margin-left: auto; color: var(--accent-2); text-decoration: none; font-size: 15px; font-weight: 600; }
.leiste-link:hover { color: var(--text); }
.materialwahl label small { display: block; color: var(--muted); font-size: 12px; }
.wahl input:checked + label small { color: #555; }
.bereich-titel { font-size: 52px; letter-spacing: -0.04em; margin: 0; line-height: 64px; }
.publikation.mit-bild { grid-template-columns: 1fr; }
@media (min-width: 900px) { .publikation.mit-bild { grid-template-columns: 260px 90px 1fr; align-items: start; } }
.pub-bild { display: block; border-radius: var(--radius-s); overflow: hidden; background: #fff; aspect-ratio: 4 / 3; }
.pub-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pub-bild:hover img { transform: scale(1.04); }
.pub-abstract { margin-top: 12px; }
.pub-abstract summary { cursor: pointer; color: var(--accent-2); font-weight: 600; font-size: 14px; list-style: none; }
.pub-abstract summary::before { content: "+ "; }
.pub-abstract[open] summary::before { content: "− "; }
.pub-abstract p { color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 760px; }

/* Teilungsplaner (Entwurfsmodelle) */
#t-3d { height: 340px; border-radius: var(--radius-s); background: radial-gradient(ellipse at 50% 30%, #2a2622, #121212); position: relative; overflow: hidden; touch-action: none; }
@media (min-width: 1000px) { #t-3d { height: 420px; } }
#t-3d canvas { display: block; }
.t-leiste { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 14px; font-size: 15px; color: var(--muted); }
.t-leiste select { width: auto; padding: 8px 10px; margin-left: 6px; font-size: 15px; }
.t-leiste .check { color: var(--text); }
.t-achse { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.t-kopf { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.t-zaehler { display: inline-flex; align-items: center; gap: 10px; }
.t-zaehler b { min-width: 1.2em; text-align: center; font-variant-numeric: tabular-nums; }
.t-zaehler button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.t-zaehler button:disabled { opacity: .35; cursor: default; }
.t-achse input[type=range] { width: 100%; accent-color: var(--accent); margin: 8px 0 4px; }
#t-teile { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; font-size: 14px; }
#t-teile li { display: flex; gap: 8px; align-items: center; }
#t-teile li span { color: var(--muted); font-variant-numeric: tabular-nums; }
#t-teile i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.t-ok { color: var(--ok); }
.t-fehler, #t-teile li.t-fehler span { color: var(--err); }

/* Konfigurator: Rahmen ziehen/drehen, Kachelung */
.leaflet-interactive.rahmen-ziehen { cursor: move; }
.leaflet-interactive.rahmen-drehen { cursor: grab; }
.leaflet-interactive.rahmen-ecke { cursor: nwse-resize; }
.leaflet-interactive.rahmen-ziehen, .leaflet-interactive.rahmen-drehen, .leaflet-interactive.rahmen-ecke { touch-action: none; }
.leaflet-container.zieht, .leaflet-container.zieht .leaflet-interactive { cursor: grabbing; }
.leaflet-container:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.leaflet-tooltip.rahmen-etikett { background: rgba(14, 14, 14, .82); color: #fff; border: 0; border-radius: 10px; padding: 6px 10px;
  font: 600 14px/1.25 "Inter Tight", system-ui, sans-serif; text-align: center; box-shadow: none; pointer-events: none; white-space: nowrap; }
.leaflet-tooltip.rahmen-etikett span { font-weight: 400; font-size: 12px; color: rgba(255, 255, 255, .72); }
.leaflet-tooltip.rahmen-etikett::before { display: none; }

/* Druckprüfung (Entwurfsmodelle) */
.pruefliste { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: 14px; }
.pruefliste li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: start; }
.pruefliste i { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.pruefliste li.p-ok i { background: var(--ok); }
.pruefliste li.p-warn i { background: var(--warn); }
.pruefliste li.p-fehler i { background: var(--err); }
.pruefliste b { display: block; }
.pruefliste span { color: var(--muted); }
.pruefliste li.p-fehler span { color: var(--err); }
.pruefliste li.p-warn span { color: var(--warn); }
.kachel-liste { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; font-size: 14px; }
.kachel-liste li { display: flex; gap: 10px; }
.kachel-liste span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Portfolio */
.filter { margin-bottom: 26px; }
.filter a { margin: 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 15px; }
.filter a.an { background: var(--text); color: #111; border-color: var(--text); }
.projekte { display: grid; gap: 34px 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.projekt-karte { text-decoration: none; display: block; }
.projekt-bild { aspect-ratio: 4 / 3; border-radius: var(--radius-s); overflow: hidden; background: #f4f2ee; }
.projekt-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.projekt-karte:hover .projekt-bild img { transform: scale(1.04); }
.projekt-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
.projekt-zeile h3 { margin: 0; }
.projekt-karte p { margin: 6px 0 0; }
.projekt-kopf { padding: 36px 0 24px; }
.projekt-kopf h1 { font-size: clamp(36px, 7vw, 88px); margin: 14px 0 6px; overflow-wrap: break-word; hyphens: auto; }
/* Galerie: alle Bilder eines Projekts in einem Fenster */
.galerie { --galerie-grund: #f4f2ee; margin-bottom: 44px; outline: none; min-width: 0; max-width: 100%; }
.galerie-buehne { position: relative; aspect-ratio: 3 / 2; max-height: 80vh; width: 100%; background: var(--galerie-grund);
  border-radius: var(--radius-s); overflow: hidden; touch-action: pan-y; user-select: none; }
@media (max-width: 700px) { .galerie-buehne { aspect-ratio: 4 / 3; } }
.galerie-buehne:fullscreen { max-height: none; border-radius: 0; }
.galerie-bild { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; padding: clamp(10px, 3%, 36px);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.galerie-bild.aktiv { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.galerie-bild img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; object-fit: contain; }
.galerie-pfeil, .galerie-vollbild { position: absolute; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(14, 14, 14, .55); color: #fff; backdrop-filter: blur(6px); transition: background .2s; }
.galerie-pfeil { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; padding-bottom: 4px; }
.galerie-pfeil:hover, .galerie-vollbild:hover { background: var(--accent); }
.galerie-pfeil.zurueck { left: 14px; }
.galerie-pfeil.weiter { right: 14px; }
.galerie-vollbild { top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; }
.galerie-zaehler { position: absolute; left: 16px; bottom: 14px; background: rgba(14, 14, 14, .55); color: #fff; font-size: 13px;
  padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.galerie-unterschrift { min-height: 1.4em; margin: 10px 2px 0; }
.galerie-leiste { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.galerie-leiste button { flex: none; width: 92px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; background: var(--galerie-grund); cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; scroll-snap-align: center; }
.galerie-leiste button:hover { opacity: .85; }
.galerie-leiste button.aktiv { opacity: 1; border-color: var(--accent); }
.galerie-leiste img { width: 100%; height: 100%; object-fit: cover; }
.projekt-beschreibung { display: grid; gap: 10px 48px; padding-bottom: 40px; }
@media (min-width: 900px) { .projekt-beschreibung { grid-template-columns: 240px minmax(0, 1fr); } }
.projekt-beschreibung > * { min-width: 0; }
.projekt-daten { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-content: start; font-size: 15px; }
.projekt-daten dt { color: var(--muted); }
.projekt-daten dd { margin: 0; }
.projekt-text { font-size: 19px; line-height: 1.6; max-width: 720px; }
.video-platz { aspect-ratio: 16 / 9; border-radius: var(--radius-s); background: var(--surface); display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 16px; }
.video-platz.geladen { display: block; padding: 0; overflow: hidden; }
.video-platz iframe { width: 100%; height: 100%; border: 0; }
.projekt-weiter { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 22px 0 60px; }
.projekt-weiter a { text-decoration: none; }

/* Bereichsseiten: Logo statt Schrift */
.bereich-logo-gross { margin: 6px 0 26px; line-height: 0; }
.bereich-logo-gross img { width: min(100%, 520px); height: auto; }

.tipp { background: rgba(255, 90, 31, .1); border-left: 3px solid var(--accent); border-radius: 8px; padding: 8px 12px; color: var(--text); }

/* Sprachumschalter */
.nav a.sprache { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.nav a.sprache:hover { border-color: var(--accent); color: var(--accent); }

/* Musterstück mit Farbwahl (Prints-Start) */
.musterstueck { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .musterstueck { grid-template-columns: 1.2fr 1fr; gap: 48px; } }
.musterstueck-bild { position: relative; margin: 0; border-radius: var(--radius-s); overflow: hidden; background: #f4f4f2; }
.musterstueck-bild img { display: block; width: 100%; height: auto; aspect-ratio: 10 / 9; }
.bildquelle { position: absolute; right: 10px; bottom: 10px; font-size: 12px; line-height: 1; color: #fff;
  background: rgba(0, 0, 0, .55); padding: 5px 8px; border-radius: 6px; }
.bildquelle[hidden] { display: none; }
.luftbild-punkt { background-size: 260%; background-position: 50% 33%; }
.farbwahl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.farbwahl button { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-size: 15px; color: var(--text);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px 9px 10px; cursor: pointer; }
.farbwahl button:hover { border-color: var(--muted); }
.farbwahl button[aria-pressed="true"] { border-color: var(--accent); }
.farbwahl button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.farbpunkt { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }

/* Konfigurator: Zeichenwerkzeuge auf der Karte */
.werkzeuge { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 14px; }
.w-gruppe { display: inline-flex; gap: 6px; align-items: center; }
.w-gruppe > .muted { margin-right: 2px; }
.w-knopf { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px;
  padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; }
.w-knopf:hover { border-color: var(--accent); }
.w-knopf.an { background: var(--accent); border-color: var(--accent); color: #fff; }
.w-knopf.w-weg { padding: 7px 11px; }
.w-knopf.w-fertig { background: var(--text); color: #111; border-color: var(--text); }
.leaflet-container.zeichnet { cursor: crosshair; }
.leaflet-container.zeichnet .leaflet-interactive { pointer-events: none; }

/* Viewer Entwurfsmodelle */
.viewer-leiste { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.viewer-leiste .w-knopf { background: rgba(23, 23, 23, .82); padding: 5px 11px; font-size: 13px; }
#t-3d:fullscreen { height: 100vh; border-radius: 0; }
