/* ===========================================================================
   NORDWERK — Designsystem

   Bildsprache eines Möbelherstellers: kühles Weiß, Ware auf hellgrauen
   Flächen, zentrierte Überschriften in Inter Light, fette Kacheltitel,
   Versalien mit Sperrung für alles Funktionale, Koralle als einziger Akzent.

   Regeln:
   · Kein Radius, keine Schlagschatten in der Fläche.
   · Überschriften sind leicht (300), Kacheltitel sind fett (700).
   · Buttons und Etiketten stehen in gesperrten Versalien.
   · Produktbilder liegen auf --panel und werden von nichts überlagert.
   =========================================================================== */

@import url("fonts.css");

:root {
  --paper:        #FFFFFF;
  --panel:        #F5F6FA;   /* Fläche hinter Produktbildern */
  --panel-2:      #F5F6FA;   /* abgesetzter Abschnitt */
  --tile:         #F5F6FA;
  --ink:          #101012;
  --ink-2:        #5D5D5D;
  --ink-3:        #8B8B92;
  --line:         #E3E5EC;
  --line-2:       #C9CCD6;

  --accent:       #DB5A4B;   /* Koralle — Handlung und Auszeichnung */
  --accent-2:     #C44A3C;
  --accent-soft:  #FBEDEB;
  --mint:         #88C6BC;
  --sky:          #AFC8D8;

  --wrap:         1280px;
  --gutter:       clamp(1.25rem, 5vw, 5rem);
  --r:            0px;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --pop: 0 24px 60px rgba(16, 16, 18, .18);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="dark"] {
  --paper:        #121316;
  --panel:        #1A1C21;
  --panel-2:      #17181C;
  --tile:         #F5F6FA;   /* Renderings bleiben auf heller Fläche */
  --ink:          #F4F4F6;
  --ink-2:        #B6B7BC;
  --ink-3:        #85868C;
  --line:         #2A2C32;
  --line-2:       #3C3F47;
  --accent:       #F0796A;
  --accent-2:     #FF8E7F;
  --accent-soft:  #241A18;
  --pop: 0 24px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

h1, h2 { margin: 0; color: var(--ink); font-weight: 300; line-height: 1.16; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.25rem); }
h3, h4 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -.005em; }
h3 { font-size: 1.22rem; }
h4 { font-size: .95rem; }

/* Gesperrte Versalien — Navigation, Etiketten, Schaltflächen */
.label, .eyebrow, .product-brand, .prop-label, .filter-group h4,
table.data th, .stage-meta, .stage-state, .index-num {
  font-family: var(--sans); font-size: .69rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.num, .price, .qty input, .filter-count, .summary-row span:last-child,
.summary-line .amount, .toolbar .count { font-variant-numeric: tabular-nums; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.muted { color: var(--ink-3); }
.lead { font-size: 1.02rem; line-height: 1.75; color: var(--ink-2); max-width: 52ch; }
.sub { color: var(--ink-2); margin-top: .6rem; max-width: 68ch; }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-alt { background: var(--panel-2); }
.skiplink { position: absolute; left: -9999px; }
.skiplink:focus { left: 1rem; top: 1rem; z-index: 200; background: var(--paper); padding: .7rem 1.1rem; }

/* Zentrierter Abschnittskopf, Schaltfläche darunter */
.section-head {
  display: grid; justify-items: center; text-align: center; gap: .6rem;
  margin-bottom: clamp(2.2rem, 4vw, 3.4rem);
}
.section-head > div { display: contents; }
.section-head p { color: var(--ink-2); max-width: 74ch; }
.section-head-link {
  margin-top: 1.4rem; display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 1.4rem; border: 1px solid var(--accent); color: var(--accent);
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.section-head-link:hover { background: var(--accent); color: #fff; }

/* Zentrierte Schaltfläche unter einem Raster */
.section-cta { display: flex; justify-content: center; margin-top: clamp(2rem, 4vw, 3rem); }

/* ----------------------------------------------------------------- Schalter */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: var(--h); padding: 0 1.5rem; border-radius: var(--r);
  font-family: var(--sans); font-size: .74rem; font-weight: 600; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; text-align: center;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--ink);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-coral { border-color: var(--accent); color: var(--accent); background: none; }
.btn-coral:hover { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #17100E; }
.btn-outline { border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet {
  min-height: 40px; padding: 0; letter-spacing: .1em; font-size: .74rem; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}
.btn-quiet:hover { color: var(--accent); border-bottom-color: var(--accent); }
.btn-sm { --h: 38px; padding: 0 1.05rem; font-size: .7rem; }
.btn-lg { --h: 54px; padding: 0 2rem; font-size: .78rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: 0; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--accent);
  border-bottom: 1px solid currentColor; padding-bottom: .25rem;
}
.arrow-link:hover { color: var(--accent-2); }

/* Korallen-Etikett, wie es über Bildflächen sitzt */
.chip-label {
  display: inline-flex; align-items: center; background: var(--accent); color: #fff;
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: .55rem 1.1rem;
}

/* --------------------------------------------------------------- Demoleiste */
.demobar { background: var(--ink); color: #E9E9EC; font-size: .76rem; padding: .55rem 0; }
[data-theme="dark"] .demobar { background: #0B0B0D; }
.demobar .wrap { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.demobar strong { color: #fff; font-weight: 600; }
.demobar .spacer { margin-left: auto; }
.demobar a, .demobar button.linky {
  color: #F2A99F; text-decoration: none; font: inherit; background: none; border: 0;
  cursor: pointer; padding: 0; border-bottom: 1px solid transparent;
}
.demobar a:hover, .demobar button.linky:hover { border-bottom-color: currentColor; }
.status {
  display: inline-flex; align-items: center; gap: .45rem; padding: .1rem .6rem;
  border: 1px solid rgba(255, 255, 255, .2); font-size: .72rem;
}
.dot { width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; display: inline-block; }
.dot-live { background: #7BC79B; }
.dot-offline { background: #E0A85C; }
@media (max-width: 1180px) { .demobar .hide-s { display: none; } }

/* ------------------------------------------------------------------ Kopfteil */
.site-header {
  position: sticky; top: 0; z-index: 60; background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
/* Auf Seiten mit Aufmacher liegt der Kopf zunächst über dem Bild */
.has-hero .site-header { background: transparent; border-bottom-color: transparent; }
.has-hero .site-header.is-solid { background: var(--paper); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 80px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.logo-box {
  display: inline-flex; align-items: center; gap: .55rem; background: var(--ink); color: #fff;
  padding: .55rem .95rem;
}
[data-theme="dark"] .logo-box { background: #fff; color: #101012; }
.logo-word { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.logo-sub { font-size: .5rem; letter-spacing: .16em; text-transform: uppercase; opacity: .85; line-height: 1.15; align-self: center; }
.site-nav { display: flex; gap: 2.1rem; margin-inline: auto; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; padding: .45rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: .2rem; flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border: 1px solid transparent; background: none; color: var(--ink); cursor: pointer;
  position: relative; padding: 0;
}
.icon-btn:hover { color: var(--accent); }
.cart-count {
  position: absolute; top: 3px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700;
  display: grid; place-items: center; border-radius: 100px;
}
.nav-toggle { display: none; }
@media (max-width: 940px) {
  .site-nav {
    position: absolute; inset: 80px 0 auto; flex-direction: column; gap: 0; display: none;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .25rem var(--gutter) 1.2rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .header-inner { gap: .5rem; }
}

/* ---------------------------------------------------------------------- Hero */
.hero { padding: 0; }
.has-hero .hero { margin-top: -80px; }

.hero-stage {
  position: relative; background: var(--tile); overflow: hidden;
  height: min(88vh, 780px); min-height: 480px;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center; opacity: 0; pointer-events: none;
  /* Oben Platz für den transparent aufliegenden Kopfbereich */
  padding: calc(80px + clamp(1rem, 3vw, 2.5rem)) clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 7vw, 5.5rem);
  transition: opacity .9s var(--ease);
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  width: auto; height: auto; max-width: min(100%, 820px); max-height: 100%;
  mix-blend-mode: multiply; position: relative; z-index: 1;
}
.hero-slide iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  /* Ueber dem Standbild (z-index 1) und wieder anklickbar: die Bahn selbst
     steht auf pointer-events: none, damit die Diaschau nichts abfaengt. */
  z-index: 2; pointer-events: auto;
}

.hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 0 0 clamp(1.5rem, 4vw, 3rem) 0;
  display: grid; gap: .5rem; justify-items: start;
}
.hero-overlay .wrap-inner {
  display: grid; gap: 1.1rem; justify-items: start;
  padding-inline: clamp(1.5rem, 4vw, 3rem);
}
.hero-meta { display: grid; gap: .1rem; background: var(--paper); padding: 1rem 1.4rem 1.1rem; }
.hero-model { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.hero-variant { font-size: .95rem; color: var(--ink-2); }
.hero-variant::before { content: "Ausführung "; color: var(--ink-3); }
.hero-price { font-size: 1.3rem; font-weight: 700; color: var(--ink); margin-top: .35rem; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }
.chip-label {
  display: inline-flex; align-items: center; background: var(--accent); color: #fff;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  padding: .7rem 1.3rem; border: 0; font-family: var(--sans);
}
button.chip-label { cursor: pointer; transition: background-color .2s var(--ease); }
button.chip-label:hover { background: var(--accent-2); }
.chip-quiet { background: var(--ink); }

.chip-play::before {
  content: ""; border-left: 9px solid currentColor; border-block: 6px solid transparent;
  margin-right: .7rem;
}

.hero-dots { display: flex; justify-content: center; gap: .5rem; padding: 1.6rem 0 .4rem; }
.hero-dots button {
  width: 60px; height: 3px; border: 0; padding: 0; cursor: pointer; background: var(--line);
  transition: background-color .25s var(--ease);
}
.hero-dots button[aria-current="true"] { background: var(--accent); }
.hero-caption { text-align: center; font-size: .85rem; color: var(--ink-3); padding-bottom: .5rem; }

/* ===========================================================================
   RAUMFOTOGRAFIE

   Aufmacher, Warengruppen, Referenzen und die beiden Bänder tragen die Serie
   aus assets/img/scene/web/ (Begründung und Motivliste: docs/bildbriefing.md).
   Sie ist der Unterschied zwischen einem Katalog aus Renderings und dem
   Auftritt eines Einrichters.

   Zwei Regeln halten Bild und Ware auseinander:
   · Raumbilder liegen randlos (object-fit: cover), ohne mix-blend-mode und
     ohne Aufstandsschatten. Beides gilt nur für freigestellte Renderings.
   · Text über Bild steht auf einem Verlauf, nie in einem Kasten.
   =========================================================================== */

/* Bildfläche, die ihren Rahmen vollständig füllt. */
.scene { position: relative; overflow: hidden; background: var(--panel); }
.scene picture { display: block; width: 100%; height: 100%; }
.scene img {
  width: 100%; height: 100%; max-width: none; max-height: 100%;
  object-fit: cover; mix-blend-mode: normal;
}

/* --------------------------------------------------- Aufmacher mit Raumbild */
.hero-photo { position: relative; overflow: hidden; background: var(--ink); }
.hero-photo .scene { height: min(90vh, 840px); min-height: 30rem; background: none; }

/* Der Verlauf sammelt sich unten links, wo Aussage und Schalter stehen; die
   rechte Bildhälfte bleibt offen. Ein Kasten würde das Bild zerschneiden. */
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    /* schmaler Grund für den aufliegenden Kopfbereich */
    linear-gradient(to bottom, rgba(12, 12, 14, .55) 0%, rgba(12, 12, 14, .14) 13%, rgba(12, 12, 14, 0) 24%),
    linear-gradient(to top, rgba(12, 12, 14, .86) 0%, rgba(12, 12, 14, .36) 26%, rgba(12, 12, 14, 0) 58%),
    linear-gradient(to right, rgba(12, 12, 14, .44) 0%, rgba(12, 12, 14, 0) 62%);
}

/* Solange der Kopfbereich auf dem Bild liegt, steht er hell darauf. Sobald er
   beim Scrollen weiß wird (.is-solid), gilt wieder die normale Farbe. */
.has-hero .site-header:not(.is-solid) .site-nav:not(.open) a,
.has-hero .site-header:not(.is-solid) .icon-btn { color: #fff; }
.has-hero .site-header:not(.is-solid) .site-nav:not(.open) a:hover,
.has-hero .site-header:not(.is-solid) .icon-btn:hover { color: var(--accent); }
.has-hero .site-header:not(.is-solid) .logo-box { background: #fff; color: #101012; }

.hero-photo-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
/* Unten links liegt der Schalter des Integrationspanels auf der Seite. */
@media (max-width: 720px) { .hero-photo-text { padding-bottom: 4.5rem; } }
.hero-photo-text .wrap { display: grid; justify-items: start; gap: 1.15rem; }
.hero-photo-text .eyebrow {
  display: inline-flex; align-items: center; gap: .85rem; color: #fff;
}
.hero-photo-text .eyebrow::before {
  content: ""; width: 2.6rem; height: 1px; background: var(--accent);
}
.hero-photo-text h1 {
  color: #fff; max-width: 18ch; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4.4rem); line-height: 1.04; letter-spacing: -.015em;
}
.hero-photo-text .hero-lead {
  color: rgba(255, 255, 255, .82); max-width: 48ch; font-size: 1rem; line-height: 1.7;
}
.hero-photo-text .btn-row { margin-top: .6rem; }

/* Schalter auf dunklem Bild */
.btn-light { background: #fff; border-color: #fff; color: #101012; }
.btn-light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-onphoto { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-onphoto:hover { border-color: #fff; background: rgba(255, 255, 255, .14); color: #fff; }

/* Bildnachweis am unteren Bildrand rechts — hält den Demoshop ehrlich. */
.hero-photo-note {
  position: absolute; right: var(--gutter); bottom: 1rem; z-index: 2;
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
@media (max-width: 860px) { .hero-photo-note { display: none; } }

/* ------------------------------------------- Konfigurator als Abschnitt 01
   Die Bühne war früher der Aufmacher und lag unter dem transparenten
   Kopfbereich. Als eigener Abschnitt braucht sie dessen Freiraum nicht mehr —
   verschwinden darf sie nicht, sie ist der Zweck der Seite. */
.hero-stage-inline { height: min(70vh, 640px); min-height: 25rem; border: 1px solid var(--line); }
.hero-stage-inline .hero-slide {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.5rem) clamp(4rem, 8vw, 6rem);
}

/* ------------------------------------------------- Warengruppe mit Raumbild */
.cat-media-photo { padding: 0; }
.cat-media-photo::after { content: none; }
.cat-media-photo picture { display: block; width: 100%; height: 100%; }
.cat-media-photo img {
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: cover; mix-blend-mode: normal;
}

/* ------------------------------------------------------- Bild neben Aussage */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); }
  .split-flip .split-media { order: 2; }
}
.split-media { aspect-ratio: 4 / 5; }
@media (max-width: 899px) { .split-media { aspect-ratio: 4 / 3; } }
.split-body { display: grid; justify-items: start; gap: 1.1rem; }
.split-body h2 { max-width: 18ch; }
.split-body p { color: var(--ink-2); max-width: 54ch; }
.split-body .ticks { margin-top: .4rem; }

/* ----------------------------------------------------- Band über volle Breite
   Vollbreites Bild links, Aussage rechts auf ruhigem Grund. Ein Verlauf über
   dem Bild war der erste Versuch — bei einem Raumbild mit Möbeln im
   Mittelgrund bleibt darunter zu viel Struktur stehen, der Text wurde
   unleserlich. Eine eigene Fläche ist ehrlicher und liest sich besser. */
.band { position: relative; background: var(--panel); }
.band-media { aspect-ratio: 16 / 9; }
.band-body {
  display: grid; justify-items: start; align-content: center; gap: 1.15rem;
  background: var(--paper);
  padding: clamp(2.2rem, 6vw, 3.5rem) var(--gutter);
}
.band-body h2 { max-width: 20ch; }
.band-body p { color: var(--ink-2); max-width: 46ch; }

@media (min-width: 900px) {
  .band { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
  .band-media { aspect-ratio: auto; min-height: clamp(24rem, 38vw, 32rem); }
  .band-body { padding: clamp(2.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 4.5rem); }
}

/* --------------------------------------------------------------- Referenzen */
.ref-grid {
  display: grid; gap: clamp(1.6rem, 3vw, 2.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}
.ref-media { aspect-ratio: 4 / 3; }
.ref-card h3 { margin-top: 1.1rem; font-size: 1.15rem; }
.ref-card p { margin-top: .5rem; font-size: .88rem; color: var(--ink-2); line-height: 1.65; }

/* --------------------------------------------------------- Kopfband je Seite */
.page-head { position: relative; overflow: hidden; background: var(--ink); }
.page-head .scene { height: clamp(12rem, 24vw, 19rem); background: none; }
.page-head::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(12, 12, 14, .68) 0%, rgba(12, 12, 14, .12) 58%, rgba(12, 12, 14, 0) 100%),
    linear-gradient(to right, rgba(12, 12, 14, .26) 0%, rgba(12, 12, 14, 0) 62%);
}
.page-head-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding-bottom: clamp(1.4rem, 3vw, 2.4rem);
}
.page-head-text .wrap { display: grid; justify-items: start; gap: .55rem; }
.page-head-text .eyebrow { color: rgba(255, 255, 255, .68); }
.page-head-text h1 { color: #fff; font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); }
.page-head-text p { color: rgba(255, 255, 255, .78); max-width: 60ch; font-size: .95rem; }

/* ------------------------------------------------------------ Materialband */
.material-band {
  display: grid; gap: clamp(1rem, 2vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.material-tile { margin: 0; }
.material-tile .scene { aspect-ratio: 1; }
.material-tile figcaption {
  margin-top: .75rem; font-size: .7rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
}

.hero-facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  text-align: center;
}
.hero-facts li { display: grid; gap: .35rem; justify-items: center; }
.hero-facts b { color: var(--ink); font-size: .95rem; font-weight: 700; }
.hero-facts span { font-size: .87rem; color: var(--ink-2); max-width: 30ch; }

/* ------------------------------------------------------------- 3D-Fläche */
.stage { position: relative; background: var(--tile); }
.stage-body { position: relative; aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.stage-body > img {
  width: auto; height: auto; max-width: 86%; max-height: 86%;
  margin: auto; mix-blend-mode: multiply; position: relative; z-index: 1;
}
.stage-body > iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  /* Muss ueber dem Produktbild liegen (z-index 1), sonst faengt das Bild
     Drehen und Zoomen ab und die 3D-Ansicht fuehlt sich wie ein Bild an. */
  z-index: 2;
}
.stage-foot {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .85rem 0 0;
  min-height: 40px;
}
@media (min-width: 1000px) { .hero-bleed .stage-foot { padding-right: var(--gutter); } }
@media (max-width: 999px) { .hero-bleed .stage-foot { padding-inline: 0; } }
.stage-meta { margin-right: auto; }
/* Der Renderdienst hat kein Bild zur aktuellen Ausfuehrung geliefert: die Buehne
   zeigt noch die vorige. Sichtbar machen, statt Panel und Bild widersprechen zu
   lassen — siehe setStageStale() in assets/js/pages/produkt.js. */
.stage.is-stale .stage-body > img { opacity: .5; }
.stage.is-stale .stage-state { color: var(--warn, #B4571F); }
.stage-start {
  position: absolute; inset: 0; z-index: 2; display: grid; align-content: end; justify-items: start;
  gap: 0; padding: clamp(1.25rem, 3vw, 2rem); cursor: pointer; border: 0; text-align: left;
  font-family: var(--sans); background: none;
}
.stage-start:hover .stage-label { background: var(--accent-2); }
.stage-play {
  width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; margin-bottom: .9rem;
  transition: transform .25s var(--ease);
}
.stage-start:hover .stage-play { transform: scale(1.06); }
.stage-play::after { content: ""; border-left: 13px solid currentColor; border-block: 8px solid transparent; margin-left: 4px; }
.stage-label {
  display: inline-flex; align-items: center; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: .6rem 1.15rem; transition: background-color .2s var(--ease);
}
.stage-note { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: .6rem; }
.stage-square .stage-body { aspect-ratio: 1; }
@media (min-width: 760px) { .stage-square .stage-body { aspect-ratio: 4 / 3; } }

/* Der Auftritt auf der Startseite füllt den sichtbaren Bereich wie ein
   Katalogaufmacher; das Modell steht dabei möglichst groß. */
@media (min-width: 1000px) {
  .hero .stage-body { aspect-ratio: auto; height: min(68vh, 620px); }
  .hero .stage-body > img { padding: 2% 2% 5%; }
}

/* Weicher Aufstandsschatten unter der Ware. Die Renderings kommen ohne
   Bodenkontakt; ohne diesen Schatten schwebt jedes Möbel in der Fläche. */
.product-media::after, .cat-media:not(.cat-media-photo)::after,
.hero-slide::after, .stage-body::after {
  content: ""; position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  width: 62%; height: 7%; border-radius: 50%; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(16, 16, 18, .17), rgba(16, 16, 18, 0) 70%);
  pointer-events: none;
}
.hero-slide::after { width: 46%; height: 6%; bottom: 12%; }
.stage-body::after { width: 52%; height: 6%; bottom: 10%; }
.cart-item-media { position: relative; }

/* -------------------------------------------------------------------- Raster */
.grid { display: grid; gap: clamp(2rem, 3.5vw, 3rem) clamp(1.2rem, 2.2vw, 2rem); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: clamp(1.8rem, 3.5vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { display: grid; gap: clamp(1.8rem, 3.5vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-teaser { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* Produktkachel: Bild auf Fläche, fetter Titel darunter */
.product-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.product-media {
  position: relative; aspect-ratio: 4 / 3; background: var(--tile);
  display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center; padding: 6%; overflow: hidden;
}
.product-media img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  mix-blend-mode: multiply; position: relative; z-index: 1;
  transition: transform .6s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.045); }
.product-body { padding: 1.1rem 0 0; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-name { font-size: 1.1rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.product-tagline { font-size: .88rem; color: var(--ink-2); flex: 1; line-height: 1.6; }
.product-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: .4rem .8rem;
  flex-wrap: wrap; margin-top: 1rem;
}
.price { font-size: 1.05rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.price-note { font-size: .78rem; color: var(--ink-3); }
.price-quote { font-size: .72rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.card-cta { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.flag {
  position: absolute; top: 0; left: 0; z-index: 2; background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: .35rem .7rem;
}
.flag-3d { left: auto; right: 0; background: rgba(16, 16, 18, .72); }

/* Kategorie */
.cat-card { display: block; text-decoration: none; color: inherit; }
.cat-media { position: relative; aspect-ratio: 3 / 2; background: var(--tile); display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; }
/* Freigestellte Ware braucht Luft zum Rand, ein Raumbild füllt ihn aus. */
.cat-media:not(.cat-media-photo) { padding: 3%; }
.cat-media:not(.cat-media-photo) img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  mix-blend-mode: multiply; position: relative; z-index: 1;
}
.cat-media img { transition: transform .6s var(--ease); }
.cat-card:hover .cat-media img { transform: scale(1.045); }
.cat-card h3 { margin-top: 1.1rem; font-size: 1.3rem; }
.cat-card p { font-size: .88rem; color: var(--ink-2); margin-top: .5rem; line-height: 1.65; }
.cat-card .more { display: inline-block; margin-top: .8rem; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* Nummerierte Schritte */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); text-align: center; }
.steps li { display: grid; justify-items: center; }
.steps .index-num { color: var(--accent); margin-bottom: 1rem; font-size: .72rem; }
.steps h3 { font-size: 1.2rem; margin-bottom: .7rem; }
.steps p { font-size: .9rem; color: var(--ink-2); max-width: 34ch; }

/* Flächen */
.panel { background: var(--panel); padding: clamp(1.5rem, 3vw, 2.4rem); }
.panel-accent { border: 1px solid var(--accent); background: var(--paper); }
.panel h3 { margin-bottom: .7rem; }
.note {
  display: flex; gap: .8rem; padding: 1.05rem 1.2rem; background: var(--accent-soft);
  border-left: 2px solid var(--accent); font-size: .88rem; color: var(--ink-2);
}
.note svg { flex: none; color: var(--accent); margin-top: .2rem; }
.note-plain { background: var(--panel); border-left-color: var(--line-2); }
.tag {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .66rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  border: 1px solid var(--line-2); padding: .3rem .7rem;
}
.tag-accent { color: #fff; background: var(--accent); border-color: var(--accent); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; justify-content: center; }
.chips li { padding: .4rem .9rem; background: var(--panel); font-size: .8rem; color: var(--ink-2); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.4rem; font-size: .9rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .58em; width: .45rem; height: .24rem;
  border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg);
}
.ticks-inline { grid-auto-flow: column; grid-auto-columns: max-content; gap: 1.8rem; }
@media (max-width: 640px) { .ticks-inline { grid-auto-flow: row; gap: .55rem; } }

/* -------------------------------------------------------------- Produktseite */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 1.4rem 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span::after { content: "/"; margin-left: .5rem; color: var(--line-2); }

.pdp { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
@media (min-width: 1020px) { .pdp { grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); } }
.pdp-side { position: sticky; top: 104px; }
.pdp-title { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); font-weight: 300; line-height: 1.14; margin-top: .6rem; color: var(--ink); }
.pdp-tagline { color: var(--ink-2); margin-top: .7rem; font-size: .97rem; }
.pdp-price { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin-top: 1.6rem; }
.pdp-price .price { font-size: 1.9rem; font-weight: 700; }
.pdp-artnr { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); margin-top: .55rem; }
.pdp-artnr b { color: var(--ink); font-weight: 600; }

.gallery-thumbs { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.gallery-thumbs button { width: 76px; height: 76px; padding: 8px; background: var(--tile); border: 1px solid transparent; cursor: pointer; }
.gallery-thumbs button:hover { border-color: var(--line-2); }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

.configurator { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.configurator.is-busy { opacity: .45; pointer-events: none; }
.prop + .prop { margin-top: 1.5rem; }
.prop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .65rem; }
.prop-value { font-size: .88rem; color: var(--ink); font-weight: 600; text-align: right; }
.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.swatch {
  width: 44px; height: 44px; padding: 0; cursor: pointer; position: relative; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel) center / cover no-repeat;
  transition: box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.swatch:hover { border-color: var(--ink-3); }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 1px var(--accent); }
.swatch-text {
  width: auto; min-width: 44px; height: 42px; padding: 0 1rem; background: var(--paper);
  font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.swatch[disabled] { opacity: .3; cursor: not-allowed; }
.prop-select {
  width: 100%; height: 46px; padding: 0 .9rem; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: .92rem;
}
.prop-fixed { font-size: .85rem; color: var(--ink-3); }

.pdp-actions { margin-top: 2rem; display: grid; gap: .65rem; }
.pdp-meta { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: grid; gap: .7rem; }
.pdp-meta .label { display: block; margin-bottom: .3rem; }
.pdp-meta div { display: flex; gap: .65rem; align-items: flex-start; font-size: .87rem; }
.pdp-meta svg { flex: none; margin-top: .3rem; color: var(--accent); }

.tabs { display: flex; gap: 2.4rem; border-bottom: 1px solid var(--line); margin-top: clamp(3rem, 6vw, 5rem); overflow-x: auto; }
.tabs button {
  padding: 0 0 1rem; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabpanel { padding: 2.2rem 0 0; max-width: 76ch; }
.tabpanel h3 { margin-top: 2.2rem; margin-bottom: .6rem; font-size: 1.05rem; }
.tabpanel pre { white-space: pre-wrap; font-family: inherit; margin: .5rem 0 0; color: var(--ink-2); }

.speclist { display: grid; margin: 0; }
.speclist div { display: grid; grid-template-columns: minmax(150px, 32%) 1fr; gap: 1.5rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.speclist dt { color: var(--ink-3); font-size: .85rem; }
.speclist dd { margin: 0; color: var(--ink); font-size: .92rem; }

/* --------------------------------------------------------- Sortiment/Filter */
.shop-layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 960px) { .shop-layout { grid-template-columns: 200px 1fr; } }
.filters { position: sticky; top: 104px; display: grid; gap: 2rem; }
.filter-group h4 { margin-bottom: .8rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.filter-group label { display: flex; gap: .6rem; align-items: center; padding: .32rem 0; font-size: .88rem; cursor: pointer; color: var(--ink-2); }
.filter-group label:hover { color: var(--ink); }
.filter-group input { accent-color: var(--accent); width: .95rem; height: .95rem; flex: none; }
.filter-count { margin-left: auto; font-size: .76rem; color: var(--ink-3); }

.toolbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.toolbar .count { color: var(--ink-3); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-right: auto; }
.field { display: inline-flex; align-items: center; gap: .6rem; height: 44px; padding: 0 .9rem; background: var(--paper); border: 1px solid var(--line-2); }
.field:focus-within { border-color: var(--accent); }
.field svg { color: var(--ink-3); flex: none; }
.field input, .field select { border: 0; background: none; outline: none; min-width: 0; color: var(--ink); font-family: var(--sans); font-size: .88rem; }
.field input { width: 100%; }
.field .field-label { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.empty { text-align: center; padding: 5rem 1rem; color: var(--ink-3); }

/* ----------------------------------------------------------------- Warenkorb */
.cart-grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 960px) { .cart-grid { grid-template-columns: 1fr 340px; } }
.cart-item { display: grid; grid-template-columns: 104px 1fr; gap: 1.4rem; padding: 1.7rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 660px) { .cart-item { grid-template-columns: 132px 1fr auto; gap: 1.8rem; } }
.cart-item:first-child { border-top: 1px solid var(--line); }
.cart-item-media { background: var(--tile); padding: 8px; align-self: start; }
.cart-item-media img { width: 100%; height: auto; mix-blend-mode: multiply; }
.cart-item-name { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-top: .3rem; }
.cart-config { font-size: .84rem; color: var(--ink-2); margin-top: .55rem; display: grid; gap: .05rem; }
.cart-line-actions { display: flex; gap: 1.2rem; margin-top: 1rem; }
.cart-line-actions button {
  background: none; border: 0; padding: 0 0 .2rem; cursor: pointer; color: var(--ink-3);
  font-family: var(--sans); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-2);
}
.cart-line-actions button:hover { color: var(--accent); border-bottom-color: var(--accent); }
.cart-line-right { display: grid; gap: 1.1rem; justify-items: end; align-content: start; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); }
.qty button { width: 36px; height: 38px; border: 0; background: none; cursor: pointer; color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1; }
.qty button:hover { color: var(--accent); }
.qty input {
  width: 44px; height: 38px; border: 0; border-inline: 1px solid var(--line); text-align: center;
  background: none; color: var(--ink); font-family: var(--sans); font-size: .9rem; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.summary { background: var(--panel); padding: 1.8rem; position: sticky; top: 104px; }
.summary h3 { padding-bottom: 1rem; border-bottom: 1px solid var(--line-2); font-size: 1.15rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .88rem; }
.summary-row span:last-child { color: var(--ink); }
.summary-total { border-top: 1px solid var(--line-2); margin-top: .8rem; padding-top: 1rem; align-items: baseline; }
.summary-total span:first-child { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.summary-total span:last-child { font-size: 1.5rem; font-weight: 700; }
.summary-lines { display: grid; gap: 1rem; margin: 1.2rem 0; }
.summary-line { display: flex; gap: .8rem; font-size: .86rem; align-items: baseline; }
.summary-line .qty-badge { color: var(--ink-3); }
.summary-line .name { flex: 1; color: var(--ink); }
.summary-line .amount { white-space: nowrap; }

/* ------------------------------------------------------------------ Formular */
.form-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.form-field { display: grid; gap: .45rem; }
.form-field label { font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.form-field input, .form-field textarea, .form-field select {
  height: 46px; padding: 0 .95rem; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: .92rem; width: 100%;
}
.form-field textarea { height: auto; min-height: 118px; padding: .8rem .95rem; resize: vertical; line-height: 1.6; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--accent); }
.form-field.wide { grid-column: 1 / -1; }
.form-consent { display: flex; gap: .65rem; align-items: flex-start; font-size: .87rem; }
.form-consent input { width: auto; height: auto; margin-top: .35rem; accent-color: var(--accent); }
.radio-cards { display: grid; gap: .75rem; }
.radio-card { display: flex; gap: .9rem; padding: 1.2rem 1.3rem; border: 1px solid var(--line-2); cursor: pointer; background: var(--paper); align-items: flex-start; transition: border-color .2s var(--ease); }
.radio-card:hover { border-color: var(--ink-3); }
.radio-card:has(input:checked) { border-color: var(--accent); }
.radio-card input { accent-color: var(--accent); margin-top: .35rem; flex: none; }
.radio-card b { color: var(--ink); display: block; font-weight: 700; font-size: .95rem; }
.radio-card small { color: var(--ink-2); font-size: .85rem; line-height: 1.55; display: block; margin-top: .2rem; }

/* ------------------------------------------------------------------- Tabelle */
table.data { width: 100%; border-collapse: collapse; font-size: .87rem; }
table.data th, table.data td { text-align: left; padding: .75rem 1rem .75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { border-bottom-color: var(--ink); }
table.data td { color: var(--ink-2); }
table.data td.mono, .mono { font-family: var(--mono); font-size: .79rem; word-break: break-word; }
.table-scroll { overflow-x: auto; }

pre.code {
  background: var(--ink); color: #DCE0DE; padding: 1.2rem 1.35rem; overflow-x: auto;
  font-family: var(--mono); font-size: .78rem; line-height: 1.72; margin: 0;
}
[data-theme="dark"] pre.code { background: #0B0B0D; }
pre.code .c { color: #8A9C93; }
pre.code .s { color: #E3B9B2; }
pre.code .k { color: #9CC4DE; }
code { font-family: var(--mono); font-size: .87em; }

/* ------------------------------------------------------------------ Devpanel */
.dev-toggle {
  position: fixed; left: 1.3rem; bottom: 1.3rem; z-index: 70; display: inline-flex;
  align-items: center; gap: .55rem; height: 40px; padding: 0 1.1rem; background: var(--ink);
  color: #fff; border: 0; cursor: pointer; font-family: var(--sans); font-size: .68rem;
  font-weight: 600; letter-spacing: .14em; text-transform: uppercase; box-shadow: var(--pop);
}
[data-theme="dark"] .dev-toggle { background: #fff; color: #101012; }
.dev-toggle .n { background: var(--accent); color: #fff; padding: 0 .4rem; font-size: .66rem; }
.devpanel {
  position: fixed; inset: 0 0 0 auto; width: min(450px, 100%); z-index: 80; background: var(--paper);
  border-left: 1px solid var(--line); box-shadow: var(--pop); transform: translateX(101%);
  transition: transform .34s var(--ease); display: flex; flex-direction: column;
}
.devpanel.open { transform: none; }
.devpanel-head { display: flex; align-items: center; gap: .6rem; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.devpanel-head h3 { flex: 1; font-size: 1.05rem; }
.devpanel-tabs { display: flex; gap: 1.6rem; padding: 1rem 1.4rem 0; border-bottom: 1px solid var(--line); }
.devpanel-tabs button {
  padding: 0 0 .8rem; border: 0; background: none; cursor: pointer; font-family: var(--sans);
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.devpanel-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.devpanel-body { flex: 1; overflow: auto; padding: 1.3rem 1.4rem 2.5rem; font-size: .86rem; }
.devpanel-body p + p, .devpanel-body pre + p, .devpanel-body p + pre, .devpanel-body ol + pre { margin-top: 1rem; }
.ev { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.ev-head { display: flex; gap: .6rem; align-items: baseline; }
.ev-type { font-family: var(--mono); font-size: .76rem; font-weight: 600; color: var(--accent); }
.ev-dir { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.ev-time { margin-left: auto; font-size: .7rem; color: var(--ink-3); font-family: var(--mono); }
.ev pre { margin: .45rem 0 0; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); white-space: pre-wrap; word-break: break-word; max-height: 170px; overflow: auto; }

/* -------------------------------------------------------------------- Toasts */
.toasts { position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 90; display: grid; gap: .5rem; width: min(440px, calc(100% - 2rem)); }
.toast { display: flex; gap: .7rem; background: var(--ink); color: #F1F1F3; padding: .95rem 1.2rem; box-shadow: var(--pop); font-size: .88rem; animation: rise .28s var(--ease); }
[data-theme="dark"] .toast { background: #0B0B0D; }
.toast b { color: #fff; }
.toast a { color: #F2A99F; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* --------------------------------------------------------------------- Modal */
.modal { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: clamp(.75rem, 2vw, 1.6rem); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 16, 18, .6); border: 0; }
.modal-card { position: relative; background: var(--paper); box-shadow: var(--pop); width: min(1140px, 100%); max-height: min(92vh, 940px); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; gap: .8rem; padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { flex: 1; font-size: 1.15rem; }
.modal-body { flex: 1; overflow: auto; padding: 1.6rem; }
.modal-body.flush { padding: 0; }
.modal-body iframe { width: 100%; height: min(70vh, 700px); border: 0; display: block; }
.modal-foot { display: flex; gap: .8rem; justify-content: flex-end; align-items: center; padding: 1.1rem 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .hint { margin-right: auto; font-size: .84rem; color: var(--ink-3); }

/* -------------------------------------------------------------------- Footer */
.site-footer { background: var(--panel); color: var(--ink-2); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; margin-top: clamp(3.5rem, 7vw, 6rem); }
[data-theme="dark"] .site-footer { background: var(--panel-2); }
.site-footer h4 { color: var(--ink); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.footer-word { display: inline-flex; background: var(--ink); color: #fff; padding: .5rem .9rem; font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 1.1rem; }
[data-theme="dark"] .footer-word { background: #fff; color: #101012; }
.site-footer a { color: var(--ink-2); text-decoration: none; display: block; padding: .22rem 0; font-size: .87rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer p { font-size: .87rem; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: center; font-size: .78rem;
}
.footer-bottom .spacer { margin-left: auto; }
.powered { display: inline-flex; align-items: center; gap: .45rem; }
.powered a { display: inline; color: var(--accent); }

/* ------------------------------------------------------------------ Zustände */
.skeleton { position: relative; overflow: hidden; background: var(--panel); color: transparent !important; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: shimmer 1.5s infinite;
}
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.is-busy { opacity: .45; pointer-events: none; }
