/* Noppenradar – Konzept „Vitrine“ (Weiterentwicklung von „Spielzeugkiste“).
   Layout: helle Seite mit schmaler gelber Kopfkante; Inhalte liegen auf weißen Flächen
   (dunkel: dunkle Flächen) wie Steine in einer Vitrine. Farbe ist Akzent, nicht Fläche:
   Gelb = Marke und Hauptaktion, Blau = Links, Serienfarben nur im isometrischen Stein
   und in der 3-px-Oberkante einer Karte. Noppen nur im Logo, in Stein-Icons, in der Startszene
   und als eine Kante über dem Fuß. Keine Bilder, keine externen Schriften. */

:root {
  color-scheme: light;
  --brand: "Arial Rounded MT Bold", "Nunito", "Segoe UI", system-ui, sans-serif;   /* Logo, große Ziffern */
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Flächen und Text */
  --bg: #ffffff;
  --shelf: #f4f5f7;
  --panel: #ffffff;
  --hero: #eef2f7;
  --ink: #1a1d23;
  --muted: #5a606b;
  --line: #e3e6eb;
  --line-strong: #c9ced7;
  --link: #1f55b5;
  --focus: #1f55b5;
  /* Akzente */
  --accent: #ffcd03;
  --accent-deep: #c99a00;
  --accent-ink: #1a1d23;
  --accent-soft: #fff4cc;
  --ok: #0b6b35;
  --ok-soft: #e7f4ec;
  --foot: #1c1f25;
  --foot-ink: #eceef2;
  --foot-muted: #b4bac5;
  --foot-studs-t: #343843; --foot-studs-f: #2a2d35; --foot-studs-s: #1c1f25;
  --zebra: #f7f8fa;
  --shadow: rgba(20, 28, 45, .10);

  /* Steinfarben: --t Oberseite, --f Front, --s Seite (gleich in BRICKS, build.py) */
  --red-t: #ef5a4c;     --red-f: #d42a1e;     --red-s: #a11a12;
  --blue-t: #3d86e6;    --blue-f: #0a5bc4;    --blue-s: #083f8c;
  --green-t: #24a65a;   --green-f: #087a38;   --green-s: #05592a;
  --yellow-t: #ffe15a;  --yellow-f: #ffcd03;  --yellow-s: #d49f00;
  --orange-t: #ffa155;  --orange-f: #ff7b0f;  --orange-s: #c95800;
  --azure-t: #6ccdf2;   --azure-f: #1ba6e0;   --azure-s: #117aa8;
  --lime-t: #c3e35f;    --lime-f: #9bc92a;    --lime-s: #6f960f;
  --purple-t: #8c62cc;  --purple-f: #6a3ba6;  --purple-s: #4b257f;
  --magenta-t: #e5609f; --magenta-f: #c2307c; --magenta-s: #8f1f5a;
  --teal-t: #23a6a3;    --teal-f: #00787a;    --teal-s: #005254;
  --black-t: #4b4e58;   --black-f: #2a2c33;   --black-s: #121317;
  --dred-t: #c63d4f;    --dred-f: #9c1c2e;    --dred-s: #6e1220;
  --tan-t: #ecd9b0;     --tan-f: #d4b77c;     --tan-s: #a88a4f;
  --sand-t: #a9bdd1;    --sand-f: #7590ab;    --sand-s: #56708b;
  --white-t: #ffffff;   --white-f: #f3f2ec;   --white-s: #c9c6bb;
  --plate-t: #e9edf3;   --plate-f: #d3d9e2;   --plate-s: #aeb6c3;
  --iso-filter: saturate(1);
  --media-bg: #f4f5f7;  /* Fläche hinter Setfotos (object-fit: contain) */
  --control: #8a909b;   /* Rahmen von Eingabefeldern und Knöpfen (≥3:1 zum Grund) */

  /* Abstands-Skala: alle Außen- und Innenabstände von Blöcken kommen von hier.
     --section = Abstand zwischen Abschnitten im Fluss, --band-in = Innenabstand farbiger Flächen. */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --section: var(--space-8);
  --band-in: 56px;
  --main-top: var(--space-5);
  --grid-gap: var(--space-5);
  --studs-h: 15px;
}
@media (max-width: 600px) {
  :root { --space-7: 40px; --space-8: 56px; --band-in: 40px; --main-top: var(--space-4); --grid-gap: var(--space-3); }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #13151a; --shelf: #181b21; --panel: #1b1e25; --hero: #181c23;
    --ink: #eceef2; --muted: #a5abb7; --line: #353a45; --line-strong: #3d424d;
    --link: #8fb4f2; --focus: #f0c33c;
    --accent: #f0c33c; --accent-deep: #b58f1c; --accent-ink: #1a1d23; --accent-soft: #2a2516; --ok: #86d9a6; --ok-soft: #18271f;
    --foot: #0e1014; --foot-ink: #eceef2; --foot-muted: #aab0bb;
    --foot-studs-t: #262a32; --foot-studs-f: #1d2027; --foot-studs-s: #0e1014;
    --zebra: #1f232a; --shadow: rgba(0, 0, 0, .45);
    --black-t: #5d616d; --black-f: #3b3e48; --black-s: #23252c;
    --white-t: #e8e8e4; --white-f: #d6d5ce; --white-s: #a9a79e;
    --plate-t: #444a56; --plate-f: #363b45; --plate-s: #272b33;
    --iso-filter: saturate(.85) brightness(.94);
    --media-bg: #2a2e37;
    --control: #6b7280; --warn: #f0a35c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13151a; --shelf: #181b21; --panel: #1b1e25; --hero: #181c23;
  --ink: #eceef2; --muted: #a5abb7; --line: #353a45; --line-strong: #3d424d;
  --link: #8fb4f2; --focus: #f0c33c;
  --accent: #f0c33c; --accent-deep: #b58f1c; --accent-ink: #1a1d23; --accent-soft: #2a2516; --ok: #86d9a6; --ok-soft: #18271f;
  --foot: #0e1014; --foot-ink: #eceef2; --foot-muted: #aab0bb;
  --foot-studs-t: #262a32; --foot-studs-f: #1d2027; --foot-studs-s: #0e1014;
  --zebra: #1f232a; --shadow: rgba(0, 0, 0, .45);
  --black-t: #5d616d; --black-f: #3b3e48; --black-s: #23252c;
  --white-t: #e8e8e4; --white-f: #d6d5ce; --white-s: #a9a79e;
  --plate-t: #444a56; --plate-f: #363b45; --plate-s: #272b33;
  --iso-filter: saturate(.85) brightness(.94);
  --media-bg: #2a2e37;
  --control: #6b7280; --warn: #f0a35c;
}

.k-red     { --t: var(--red-t);     --f: var(--red-f);     --s: var(--red-s); }
.k-blue    { --t: var(--blue-t);    --f: var(--blue-f);    --s: var(--blue-s); }
.k-green   { --t: var(--green-t);   --f: var(--green-f);   --s: var(--green-s); }
.k-yellow  { --t: var(--yellow-t);  --f: var(--yellow-f);  --s: var(--yellow-s); }
.k-orange  { --t: var(--orange-t);  --f: var(--orange-f);  --s: var(--orange-s); }
.k-azure   { --t: var(--azure-t);   --f: var(--azure-f);   --s: var(--azure-s); }
.k-lime    { --t: var(--lime-t);    --f: var(--lime-f);    --s: var(--lime-s); }
.k-purple  { --t: var(--purple-t);  --f: var(--purple-f);  --s: var(--purple-s); }
.k-magenta { --t: var(--magenta-t); --f: var(--magenta-f); --s: var(--magenta-s); }
.k-teal    { --t: var(--teal-t);    --f: var(--teal-f);    --s: var(--teal-s); }
.k-black   { --t: var(--black-t);   --f: var(--black-f);   --s: var(--black-s); }
.k-dred    { --t: var(--dred-t);    --f: var(--dred-f);    --s: var(--dred-s); }
.k-tan     { --t: var(--tan-t);     --f: var(--tan-f);     --s: var(--tan-s); }
.k-sand    { --t: var(--sand-t);    --f: var(--sand-f);    --s: var(--sand-s); }
.k-white   { --t: var(--white-t);   --f: var(--white-f);   --s: var(--white-s); }
.k-plate   { --t: var(--plate-t);   --f: var(--plate-f);   --s: var(--plate-s); }

/* Isometrische Steine (SVG aus build.py) */
.iso { display: block; height: auto; overflow: visible; filter: var(--iso-filter); }
.iso .t  { fill: var(--t); }
.iso .f  { fill: var(--f); }
.iso .s  { fill: var(--s); }
.iso .sd { fill: rgba(0, 0, 0, .2); }
.iso .gl { fill: rgba(255, 255, 255, .65); }
.iso .hl { fill: none; stroke: rgba(255, 255, 255, .4); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.tile-icon, .h2-icon { --ks: rgba(0, 0, 0, .22); }   /* Kontur im <use>-Stein (Symbol liest --ks) */
.tile-icon .t, .tile-icon .f, .tile-icon .s, .band-icon .t, .band-icon .f, .band-icon .s, .h2-icon .t, .h2-icon .f, .h2-icon .s {
  stroke: rgba(0, 0, 0, .22); stroke-width: 1; stroke-linejoin: round;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.65 var(--body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 750; line-height: 1.18; text-wrap: balance; letter-spacing: -.015em; margin: 0; color: var(--ink); }
p { margin: 0; }
.wrap {
  width: 100%; max-width: 1200px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
time, td.r, .num, .set-num, .band-num, .card-stats dd, .band-facts b { font-variant-numeric: tabular-nums; }

/* Noppenreihe (Frontansicht) – nur noch für die Kante über dem Fuß */
.foot-studs::before {
  content: ""; position: absolute; pointer-events: none; height: 15px; left: 0; right: 0; top: -15px;
  background:
    radial-gradient(3.6px 1.8px at 13px 3.6px, rgba(255,255,255,.18) 85%, transparent) 0 0 / 34px 15px space no-repeat,
    radial-gradient(9.5px 4.2px at 17px 4.6px, var(--t) 94%, transparent 100%) 0 0 / 34px 15px space no-repeat,
    linear-gradient(90deg, transparent 7.5px, var(--f) 7.5px, var(--f) 17px, var(--s) 17px, var(--s) 26.5px, transparent 26.5px) 0 4.6px / 34px 6px space no-repeat,
    radial-gradient(9.5px 4.2px at 17px 10.6px, var(--s) 94%, transparent 100%) 0 0 / 34px 15px space no-repeat;
}

/* ---------- Kopf ---------- */
.site-head { background: var(--panel); color: var(--ink); border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-height: 48px; }
.logo-brick { width: 44px; }
.logo-text { display: grid; }
.logo-word { font: 700 26px/1 var(--brand); letter-spacing: -.01em; }
.logo-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-top: 5px; color: var(--muted); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.nb {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font: 600 16px/1.2 var(--body);
}
.nb:hover { background: var(--shelf); }
.nb[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 8px 8px 2px 2px; font-weight: 700; }
.theme-toggle {
  flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; padding: 0;
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
  display: grid; place-items: center;
}
.theme-toggle:hover { background: var(--shelf); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.theme-toggle .t-moon { display: none; }
.theme-toggle[aria-pressed="true"] .t-sun { display: none; }
.theme-toggle[aria-pressed="true"] .t-moon { display: block; }
.nowrap { white-space: nowrap; }
.t-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Seitenrahmen ---------- */
main { padding-block: var(--main-top) var(--section); display: flow-root; }
main > section, main > .related, main > .doc, main > .sources, main > details, main > .shelf, main > .notice { margin-top: var(--section); }
main > :first-child { margin-top: 0; }
main > .band:first-child { margin-top: calc(-1 * var(--main-top)); }
/* Brotkrumen: Links als 44-px-Ziele; danach beginnt der Inhalt ohne zusätzlichen Abschnittsabstand */
.crumbs ol { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-2); font-size: 15px; line-height: 1.35; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "›"; margin-right: var(--space-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs [aria-current] { display: inline-block; min-width: 0; padding-block: var(--space-2); }
.crumbs a { color: var(--muted); }
main > .crumbs + :not(.band) { margin-top: 0; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); max-width: 26ch; }
.updated { margin-top: var(--space-3); font-size: 15px; font-weight: 500; color: var(--muted); display: flex; align-items: baseline; gap: var(--space-2); }
.updated::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; align-self: center; }
.lead { font-size: 20px; line-height: 1.55; margin-top: var(--space-4); max-width: 60ch; color: var(--ink); }

/* volle Breite ohne Querscroll: Farbe per Schatten bis an den Rand, clip-path schneidet oben/unten ab.
   Weiße Seite → Fläche → weiße Seite: auf beiden Seiten der Kante derselbe Abstand (--band-in). */
.band, .shelf { position: relative; }
.shelf { background: var(--shelf); box-shadow: 0 0 0 100vmax var(--shelf); clip-path: inset(0 -100vmax); padding-block: var(--band-in); }
main > section + .shelf { margin-top: var(--band-in); }
main > .shelf + section { margin-top: 0; padding-top: var(--band-in); }
main > .shelf + .shelf { margin-top: 0; padding-top: 0; }
/* letzte Fläche läuft bis an den Fuß, die Noppenkante sitzt auf ihr */
main:has(> .shelf:last-child) { padding-bottom: 0; }
main > .shelf:last-child { padding-bottom: calc(var(--band-in) + var(--studs-h)); }
body:has(main > .shelf:last-child) .site-foot { margin-top: 0; }

/* ---------- Bänder: Startseite, Serie, Set (helle Fläche, Serienfarbe nur als Unterkante) ---------- */
.band {
  background: var(--hero); color: var(--ink);
  box-shadow: 0 0 0 100vmax var(--hero); clip-path: inset(0 -100vmax);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px;
  padding-block: var(--space-7); margin-top: calc(-1 * var(--main-top));
}
.band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--f, var(--line)); box-shadow: 0 0 0 100vmax var(--f, var(--line)); clip-path: inset(0 -100vmax); }
main > .crumbs + .band { margin-top: calc(-1 * var(--space-3)); }
.band-text { min-width: 0; }
.band h1 { font-size: clamp(32px, 4.4vw, 52px); max-width: 20ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font: 600 13px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--f, var(--accent)); }
.band-facts { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.band-facts li { display: grid; max-width: 22ch; }
.band-facts b { font: 600 28px/1 var(--brand); color: var(--ink); }
.band-facts span { font-size: 15px; margin-top: 6px; color: var(--muted); }
.band-icon { width: clamp(120px, 16vw, 190px); filter: var(--iso-filter) drop-shadow(0 12px 10px var(--shadow)); }

.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); padding-block: var(--band-in); }
.hero::after { height: 1px; background: var(--line); box-shadow: 0 0 0 100vmax var(--line); }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); max-width: 19ch; }
.hero .lead { color: var(--muted); max-width: 42ch; }
.hero .eyebrow::before { background: var(--accent); }
.hero .updated { margin-top: 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-cta .btn { min-height: 52px; font-size: 17px; padding-inline: 24px; }
.scene { min-width: 0; justify-self: end; width: 100%; max-width: 560px; }
.scene-svg { width: 100%; filter: var(--iso-filter) drop-shadow(0 18px 16px var(--shadow)); }

/* ---------- Abschnittsköpfe ---------- */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-3) var(--space-5); flex-wrap: wrap; margin-bottom: var(--space-5); }
.sec-head h2, .prose h2 { font-size: clamp(26px, 2.8vw, 34px); }
.sec-head h2 { display: flex; align-items: baseline; gap: var(--space-3); }
.sec-head h2 .tag { align-self: auto; transform: translateY(-.12em); }
/* Mini-Stein vor Abschnittsköpfen: immer Akzentgelb, unabhängig von der Rubrik */
.tag { width: 16px; height: 11px; flex: none; border-radius: 3px; background: var(--accent); box-shadow: 0 3px 0 var(--accent-deep); }
.more { margin-top: var(--space-5); }

/* ---------- Karten: Fläche + 3-px-Oberkante in Serien- bzw. Rubrikfarbe ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--grid-gap); margin-block: var(--space-2); }
/* :where hält die Spezifität klein, damit die Mobil-Regel unten greift */
.card-grid:where(:has(> .card:nth-child(6):last-child), :has(> .card:nth-child(3):last-child), :has(.art-card)) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-top: 3px solid var(--f, var(--line-strong)); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: var(--line-strong); border-top-color: var(--f, var(--line-strong)); box-shadow: 0 10px 24px -12px var(--shadow); transform: translateY(-2px); }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card-title a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-kicker { font: 600 12px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.set-card { padding: 0; overflow: hidden; border-top-width: 1px; }
.set-card .card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.set-card .card-title { font: 650 17px/1.3 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: auto 0 0; padding-top: 4px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Setfotos (data/images.json): feste Seitenverhältnisse gegen CLS, Bild unbearbeitet ---------- */
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--media-bg); overflow: hidden; border-bottom: 3px solid var(--f, var(--line-strong)); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.set-card:hover .card-media img { transform: scale(1.03); }
.card-media.is-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(120% 90% at 50% 35%, color-mix(in srgb, var(--f, var(--line-strong)) 22%, var(--panel)), var(--panel)); }
.card-iso { width: 30%; max-width: 96px; filter: var(--iso-filter) drop-shadow(0 10px 8px var(--shadow)); }
.card-ph-num { font: 600 22px/1 var(--brand); color: var(--muted); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.card-badge { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 2px 8px; border-radius: 999px;
  background: rgba(15, 17, 21, .6); color: #e9ebef; font-size: 11px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-band.has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); align-items: start; gap: 56px; }
.set-band .eyebrow a { color: inherit; text-decoration: none; }
.set-band .eyebrow a:hover { color: var(--ink); text-decoration: underline; }
/* Galerie: grosses Foto, Nennung als Bildleiste unten rechts, Miniaturen schalten das Foto um */
.set-photo { margin: 0; min-width: 0; width: 100%; }
.photo-stage { position: relative; }
.photo-frame { display: block; aspect-ratio: 1024 / 724; background: var(--media-bg); border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 40px -22px var(--shadow); }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .18s ease; }
.photo-frame img.is-swapping { opacity: .35; }
/* Haendlerbilder (quadratische Packungsfotos auf Weiss): ganz zeigen statt beschneiden */
.photo-frame img[data-origin="affiliate"], .thumb-frame img[data-origin="affiliate"] { object-fit: contain; background: #fff; }
/* kleine Haendlerbilder nicht hochskalieren (unscharf): in Originalgroesse mittig auf Weiss */
.photo-frame img[data-origin="affiliate"] { object-fit: scale-down; }
.photo-zoom { display: block; cursor: zoom-in; border-radius: 14px; }
.photo-credit { position: absolute; right: 10px; bottom: 10px; margin: 0; max-width: calc(100% - 20px);
  padding: 4px 10px; border-radius: 999px; background: rgba(15, 17, 21, .62); color: #e9ebef;
  font-size: 11.5px; line-height: 1.4; backdrop-filter: blur(4px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-credit a { color: inherit; text-decoration: underline; text-decoration-color: rgba(233, 235, 239, .45); text-underline-offset: 2px; }
.photo-credit a:hover { text-decoration-color: currentColor; }
.photo-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.photo-pick { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.thumb-frame { display: block; aspect-ratio: 1024 / 724; background: var(--media-bg); border-radius: 10px; overflow: hidden;
  outline: 2px solid transparent; outline-offset: 2px; opacity: .72; transition: opacity .15s ease, outline-color .15s ease; }
.thumb-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-pick:hover .thumb-frame { opacity: 1; }
.photo-pick[aria-pressed="true"] .thumb-frame { opacity: 1; outline-color: var(--accent); }
.credit { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.credit a { color: var(--muted); }
.credit-aff { font-weight: 600; }
/* Set-Kopf links: Kennzahlen als eine Leiste, darunter Sprungmarken */
.set-spec { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  max-width: 520px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.set-spec li { display: grid; gap: 6px; padding: 16px 18px; min-width: 0; }
.set-spec li + li { border-left: 1px solid var(--line); }
.set-spec b { font: 600 26px/1 var(--brand); color: var(--ink); font-variant-numeric: tabular-nums; }
.set-spec b a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.set-spec span { font-size: 13px; color: var(--muted); }
.set-theme { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.jump { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 15px; }
.jump > span { color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.jump a { display: inline-block; padding: 6px 0; color: var(--ink); font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--accent); line-height: 1.2; }
.jump a:hover { color: var(--ink); border-bottom-color: var(--accent-deep); }
section:has(> .sec-head h2[id]) { scroll-margin-top: var(--space-4); }

.art-card { padding: 18px 20px 18px; gap: 10px; }
.art-card .art-cover { margin: -18px -20px 4px; aspect-ratio: 16 / 9; border-bottom: 0; }
.data th.c-thumb, .data td.c-thumb { width: 84px; padding-block: 6px; }
.data td.c-thumb img { display: block; width: 72px; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 4px; background: var(--media-bg); }
.data td.c-thumb + td { font-weight: 600; }
.art-card { overflow: hidden; }
.thumb-credits { margin-top: 6px; }
.card-in { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.art-card .card-title { font: 700 20px/1.3 var(--display); text-wrap: balance; }
.card-text { color: var(--muted); font-size: 16px; line-height: 1.55; }
.card-meta { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--muted); }

/* ---------- Serien-Kacheln: Fläche + Stein-Icon in Serienfarbe ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--grid-gap); margin-block: var(--space-2); }
.tile {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  min-height: 84px; padding: 14px 16px; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.tile:hover { border-color: var(--line-strong); box-shadow: 0 10px 24px -12px var(--shadow); transform: translateY(-2px); }
a.tile:hover .tile-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tile-icon { grid-column: 1; grid-row: 1 / span 2; width: 52px; }
.tile-name { grid-column: 2; grid-row: 1; align-self: end; font: 700 18px/1.2 var(--display); overflow-wrap: anywhere; hyphens: auto; }
.tile-meta { grid-column: 2; grid-row: 2; align-self: start; margin-top: 3px; font-size: 14px; color: var(--muted); }
.tile-off { cursor: default; }

/* ---------- Buttons, Chips, Partner-Box ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 8px 20px; text-decoration: none;
  font: 650 16px/1.2 var(--body); color: var(--accent-ink); background: var(--accent);
  border: 1px solid var(--accent-deep); border-radius: 8px; box-shadow: 0 2px 0 var(--accent-deep);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--accent-deep); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--accent-deep); }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--shelf); box-shadow: none; }
.btn-ghost:active { box-shadow: none; }
.more .btn { margin-top: 0; }
.go-box { margin: var(--space-6) 0; padding: var(--space-4) var(--space-5); background: var(--shelf); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; }
.go-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.prose .btn-go { margin-top: 4px; }
.aff-note, .aff-mark { font-size: 14px; color: var(--muted); }
/* Preisvergleich auf Set-Seiten (Haendler-Feeds) */
.offers { margin: var(--space-6) 0; }
.offer-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "shop price btn" "meta meta btn";
  align-items: center; gap: 2px 16px; padding: 12px 16px; background: var(--shelf); border: 1px solid var(--line); border-radius: 10px; }
.offer-shop { grid-area: shop; font-weight: 600; }
.offer-price { grid-area: price; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer-meta { grid-area: meta; font-size: 13px; color: var(--muted); }
.offer-stock { color: var(--warn, #b45309); }
.offer .btn-go { grid-area: btn; }
/* Variante A (Design 11.11.): Bestpreis-Marke, Chip „−X % unter UVP“, Bezugszeile mit UVP-Quelle */
.offer.has-chip { grid-template-areas: "shop price btn" "meta chip btn"; }
.offer.best { border-color: var(--accent-deep); background: var(--panel); box-shadow: inset 4px 0 0 var(--accent); }
.tag-best { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 4px; font: 700 12px/1.7 var(--body); letter-spacing: .03em;
  vertical-align: 2px; white-space: nowrap; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent-deep); }
.chip-uvp { grid-area: chip; justify-self: end; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px;
  font: 600 13px/1.8 var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--ok-soft); color: var(--ok); border: 1px solid currentColor; }
.chip-uvp.neutral { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.offer-diff { color: var(--ok); font-weight: 600; }
.offer-ref { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.offer-ref b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.set-size { margin: var(--space-6) 0; }
.size-dims { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.size-dims b { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.size-check { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.size-check li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
.size-check li b { font-weight: 650; }
.size-check li.ok { border-color: var(--ok); background: var(--ok-soft); }
.size-check li.ok b { color: var(--ok); }
.size-check li.ok b::before { content: "\2713\00a0"; }
.size-check li.no b::before { content: "\2715\00a0"; color: var(--muted); }
.size-more { font-size: 14px; color: var(--muted); }
.set-instr { margin: var(--space-6) 0; }
.instr-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.instr-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
.instr-list a { font-weight: 650; overflow-wrap: anywhere; }
.instr-list span { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.instr-note { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .offer { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "shop price" "meta meta" "btn btn"; }
  .offer.has-chip { grid-template-areas: "shop price" "meta chip" "btn btn"; }
  .chip-uvp { align-self: start; }
  .offer .btn-go { margin-top: 8px; text-align: center; }
}
.ad-mark { display: inline-block; margin-right: 6px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px;
  font: 700 12px/1.6 var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.go-pending { background: transparent; border-style: dashed; }
/* Takeads „Bei LEGO ansehen*“ auf Set-Seiten ohne Feed-Angebote: kompakt, Knopf + Hinweis in einer Zeile */
.go-lego { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 16px; padding: 12px 16px; }
.go-lego .aff-note { margin: 0; }
.offers .offer-lego { margin: 4px 0 0; }
@media (max-width: 560px) { .go-lego { grid-template-columns: 1fr; } .go-lego .btn-go { display: block; text-align: center; } }
.prose p > .btn-go { margin-right: 8px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-5); }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong);
  text-decoration: none; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums;
}
a.chip:hover { background: var(--shelf); border-color: var(--muted); }
.chip[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.r1-label { font-weight: 600; color: var(--muted); }

/* ---------- Artikel ---------- */
.doc .page-head { margin-bottom: var(--space-7); }
.doc-grid.has-toc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 24px); padding: 4px 0 4px 0; margin-top: 6px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); }
.toc-title { font: 600 12px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 16px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; display: grid; gap: 0; }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 22px 1fr; gap: 4px; min-height: 44px; align-items: center; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; padding: 6px 10px 6px 14px; margin-left: -1px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
.toc a::before { content: counter(t); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--shelf); border-left-color: var(--accent); }

.prose { min-width: 0; max-width: 70ch; }
.doc-grid:not(.has-toc) .prose, .hub-text, .set-text { max-width: 70ch; }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose a { overflow-wrap: anywhere; }
.prose > p:first-child { font-size: 20px; line-height: 1.6; }
.prose h2 { margin-top: 2em; scroll-margin-top: var(--space-5); }
.prose h3 { font-size: 21px; font-weight: 700; margin-top: 1.6em; scroll-margin-top: var(--space-5); }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 650; }
.prose code { font-size: .9em; background: var(--shelf); padding: 1px 6px; border-radius: 5px; }
.prose > .card-grid, .prose > .tile-grid, .prose > .table-wrap { margin-block: var(--space-5); }
.hub-text { margin-top: var(--space-7); }
.note { background: var(--accent-soft); border-left: 3px solid var(--accent-deep); border-radius: 0 8px 8px 0; padding: var(--space-4) var(--space-5); }
.note p + p { margin-top: 10px; }
.plate { height: 1px; background: var(--line); margin-block: var(--space-7); position: relative; }
.plate::before { content: ""; position: absolute; left: 50%; top: -5px; width: 22px; height: 10px; margin-left: -11px; border-radius: 3px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.faq { display: grid; gap: 0; margin-top: var(--space-4); }
.faq-item { border-top: 1px solid var(--line); padding-block: var(--space-5); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0; font-size: 19px; line-height: 1.35; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.faq-item h3::before { content: "?"; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-deep); font: 700 16px/1 var(--body); }
.faq-item > :not(h3) { margin: var(--space-2) 0 0 40px; }
.sources { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.sources h2 { font-size: 19px !important; margin: 0 0 8px !important; }
.sources ul { list-style: none; padding: 0; margin: 0; display: grid; counter-reset: q; }
.sources li { margin: 0 !important; counter-increment: q; }
.sources a { display: grid; grid-template-columns: 28px 1fr; align-items: center; min-height: 44px; padding: 6px 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; text-decoration: none; border-bottom: 1px solid var(--line); }
.sources a::before { content: counter(q); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.sources a:hover { text-decoration: underline; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 10px; margin-block: var(--space-5); -webkit-overflow-scrolling: touch; background: var(--panel); }
table.data { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.5; }
.data th { background: var(--shelf); color: var(--ink); text-align: left; font: 650 13px/1.3 var(--body); letter-spacing: .04em; text-transform: uppercase; padding: 12px 16px; white-space: nowrap; border-bottom: 1px solid var(--line-strong); }
.data td { padding: 9px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.data tbody tr:first-child td { border-top: 0; }
.data tbody tr:nth-child(even) td { background: var(--zebra); }
.data .r, .data th.r { text-align: right; }
.data td.r { font-variant-numeric: tabular-nums; }
.data td:first-child { font-weight: 600; }
.data td.c-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.prose .table-wrap table { min-width: 34em; }
/* Lange Set-Tabellen (Hubs, Jahre, Neuheiten): Rendering ausserhalb des Viewports aufschieben */
.table-wrap.tw-big { content-visibility: auto; contain-intrinsic-size: auto 2000px; }
.data tr.yr th { background: var(--accent-soft); color: var(--ink); font: 700 17px/1.3 var(--display); letter-spacing: 0; text-transform: none; padding: 12px 16px; text-align: left; scroll-margin-top: 16px; border-bottom: 0; }
.data tr.yr th span { font-family: var(--body); font-weight: 500; font-size: 15px; color: var(--muted); }
.data tr.yr + tr td { border-top: 0; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: var(--space-5) 0 0; }
.filter[hidden] { display: none; }
.filter label { font-weight: 600; }
.filter input {
  min-height: 48px; min-width: 0; flex: 1 1 240px; max-width: 420px; padding: 10px 14px; font: inherit;
  color: var(--ink); background: var(--panel); border: 1px solid var(--muted); border-radius: 8px;
}
.filter-count { font-size: 15px; color: var(--muted); }
.older { margin-top: var(--space-6); }
.older summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font: 700 18px/1.3 var(--display); }
.data-note, .empty { font-size: 15px; color: var(--muted); margin-top: var(--space-5); }

/* ---------- Set-Seite, Jahre ---------- */
/* Farbdiagramm der Set-Seite: Rahmen ueber Variablen, damit Weiss/Schwarz in beiden Themen sichtbar bleiben */
.set-colors { margin-top: var(--space-7); }
/* Teile im Ueberblick: kompaktes Vorschaubild links (Klick = volle Groesse), Text und Liste rechts */
.set-parts { margin-top: var(--space-7); display: flow-root; }
.set-parts .sec-head, .set-similar .sec-head { margin-bottom: var(--space-4); }
.set-parts .sec-head h2, .set-similar .sec-head h2 { font-size: clamp(21px, 2vw, 24px); }
.parts-collage { margin: 0; }
.parts-thumb { float: left; width: min(760px, 66%); margin: 0 var(--space-5) var(--space-3) 0; border-radius: 12px; cursor: zoom-in; }
.parts-thumb img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #f6f7f9; }
.parts-thumb:hover img { border-color: var(--line-strong); }
.parts-collage figcaption { font-size: 15px; line-height: 1.5; color: var(--muted); }
.parts-list { margin-top: var(--space-3); }
.parts-list summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 650; }
.parts-list .table-wrap { margin-block: var(--space-2) 0; }
.plist { font-size: 14px; font-variant-numeric: tabular-nums; }
.plist caption { padding: 8px 12px; font-size: 13px; color: var(--muted); text-align: left; caption-side: top; }
.plist th { padding: 8px 10px; font-size: 12px; }
.plist td { padding: 5px 10px; white-space: nowrap; }
.plist td:first-child, .plist td:last-child, .plist th:first-child, .plist th:last-child { text-align: right; }
.plist svg { display: inline-block; border: 1px solid var(--line-strong); border-radius: 3px; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.plist rect { width: 100%; height: 100%; }
.plist svg.t { background: repeating-conic-gradient(var(--line-strong) 0 25%, var(--panel) 0 50%) 0 0 / 6px 6px; }
.plist .t rect { fill-opacity: .6; }
.set-similar { margin-top: var(--space-6); }
.sim-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-2) var(--space-5); }
.sim-list li { line-height: 1.4; }
.sim-list a { font-weight: 600; }
.sim-list span { display: block; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .parts-thumb { float: none; display: block; width: 100%; margin: 0 0 var(--space-3); }
}
.c-sum { margin: 0 0 var(--space-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.cfig { margin: 0; }
.cbar { display: block; width: 100%; height: 28px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--panel); }
.cb-rest { fill: var(--line-strong); }
.clist { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2) var(--space-5); font-variant-numeric: tabular-nums; }
.clist li { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.clist span { color: var(--muted); }
.sw { flex: none; width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 4px; }

.set-text { margin-top: var(--space-7); }
.set-intro { margin-top: var(--space-6); max-width: 70ch; }
.set-more { margin-top: var(--space-7); }
.set-more > .set-text { margin-top: 0; }
.set-text.is-rest > p:first-child { font-size: inherit; line-height: inherit; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-7); }
.pager .btn { max-width: 100%; font-size: 15px; font-weight: 600; }
.hub-h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: clamp(24px, 2.6vw, 30px); }
.hub-h2 a { color: inherit; text-decoration-thickness: 2px; text-decoration-color: var(--line-strong); }
.hub-h2 a:hover { text-decoration-color: currentColor; }
.h2-icon { width: 40px; flex: none; }
.count { font: 500 16px/1 var(--body); color: var(--muted); }
main > .year-group { margin-top: var(--space-8); }

/* ---------- Hinweis-Box (404, Partnerlink) ---------- */
.notice { max-width: 760px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 10px; }
.notice-in { padding: 28px clamp(18px, 4vw, 36px) 32px; display: grid; gap: 16px; }
.notice-icon { width: 110px; }
.notice .page-head h1 { font-size: clamp(28px, 3.6vw, 40px); }

/* ---------- Fuß: eine Noppenkante in Fußfarbe ---------- */
.site-foot { background: var(--foot); color: var(--foot-ink); margin-top: var(--studs-h); }
.foot-studs { position: relative; height: 0; --t: var(--foot-studs-t); --f: var(--foot-studs-f); --s: var(--foot-studs-s); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); gap: var(--space-6); padding-block: var(--space-7) 0; }
.site-foot .logo-brick { width: 40px; }
.site-foot .logo-word { font-size: 22px; }
.foot-brand p { color: var(--foot-muted); font-size: 15px; margin-top: 14px; max-width: 40ch; }
.foot-title { font: 600 13px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--foot-muted); margin-bottom: 6px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; }
.site-foot ul a { color: var(--foot-ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
.site-foot ul a:hover { text-decoration: underline; }
.site-foot a:focus-visible { outline-color: #f0c33c; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--space-6); padding-top: var(--space-5); padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; font-size: 14px; color: var(--foot-muted); }
.foot-legal p { max-width: 90ch; }
.foot-legal a { color: var(--foot-ink); }

/* ---------- Responsiv ---------- */
@media (max-width: 1040px) {
  .doc-grid.has-toc { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .toc { position: static; max-height: none; max-width: 560px; margin: 0 0 32px; background: var(--shelf); border-left: 0; border-radius: 10px; padding: 14px 8px 10px; }
  .toc-title { margin-left: 12px; }
  .toc a { border-left: 0; margin-left: 0; border-radius: 6px; padding-left: 12px; }
  .toc a:hover { background: var(--panel); }
  .head-row { flex-wrap: wrap; row-gap: 4px; }
  .main-nav { order: 3; margin-left: -14px; width: calc(100% + 14px); }
  .theme-toggle { margin-left: auto; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding-block: var(--space-6) var(--space-7); }
  .scene { justify-self: center; max-width: 460px; }
  .band { padding-block: var(--space-6) var(--space-7); gap: var(--space-4); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 17px; line-height: 1.62; }
  .head-row { gap: 4px 12px; padding-block: 10px 6px; }
  .logo-brick { width: 38px; }
  .logo-word { font-size: 22px; }
  .head-row .logo-tag { display: none; }
  .main-nav { margin-left: 0; width: 100%; }
  .main-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-bottom: 4px; }
  .nb { width: 100%; padding-inline: var(--space-3); font-size: 15px; background: var(--shelf); box-shadow: inset 0 0 0 1px var(--line); }
  .nb:hover { background: var(--line); }
  .nb[aria-current] { box-shadow: inset 0 0 0 1px var(--line), inset 0 -3px 0 var(--accent); }
  /* Setkarten zweispaltig; 1 oder 3 Karten einspaltig, damit keine Karte allein in der Zeile steht */
  .card-grid:has(> .set-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid:has(> .set-card:only-child), .card-grid:has(> .set-card:nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); }
  .set-card .card-kicker { font-size: 12px; letter-spacing: .04em; }
  .set-card .card-title { font-size: 15px; }
  .set-card .card-body { padding: 10px 12px 12px; }
  .card-meta { font-size: 13px; }
  .set-band.has-photo { grid-template-columns: minmax(0, 1fr); }
  .credit { font-size: 12.5px; }
  .set-band.has-photo { gap: 24px; }
  .set-band.has-photo .set-photo { order: -1; }
  .set-spec li { padding: 12px 10px; }
  .set-spec b { font-size: 21px; }
  .set-spec span { font-size: 12px; }
  .photo-thumbs { gap: 8px; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .hub-band .band-icon, .set-band .band-icon { grid-row: 1; width: 96px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .band-facts { gap: 14px 28px; }
  .band-facts b { font-size: 24px; }
  .lead, .prose > p:first-child { font-size: 18px; }
  .prose h3 { font-size: 19px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 112px; padding: 12px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; align-items: start; }
  .tile-icon { grid-column: 1; grid-row: 1; width: 38px; margin-bottom: 8px; }
  .tile-name { grid-column: 1; grid-row: 2; font-size: 16px; }
  .tile-meta { grid-column: 1; grid-row: 3; font-size: 13px; }
  /* einzelne Kachel (Set-Seite): volle Breite, Icon links wie auf dem Desktop */
  .tile-grid:has(> .tile:only-child) { grid-template-columns: minmax(0, 1fr); }
  .tile:only-child { min-height: 72px; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: var(--space-3); }
  .tile:only-child .tile-icon { grid-row: 1 / span 2; margin-bottom: 0; }
  .tile:only-child .tile-name { grid-column: 2; grid-row: 1; align-self: end; }
  .tile:only-child .tile-meta { grid-column: 2; grid-row: 2; }
  .filter input { flex-basis: 100%; max-width: none; }
  .data { font-size: 15px; }
  .data th, .data td { padding-inline: 12px; }
  /* Prose-Tabellen als Karten: je Zeile ein Block, Spaltenname aus data-label (Rollen im HTML) */
  .prose .table-wrap table { min-width: 0; }
  .prose .data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose .data tr { display: block; padding: var(--space-2) 0; border-top: 1px solid var(--line); }
  .prose .data tbody tr:first-child { border-top: 0; }
  .prose .data tbody tr:nth-child(even) { background: var(--zebra); }
  .prose .data td { display: block; border: 0; padding: 4px 12px; }
  .prose .data tbody tr td { background: none; }
  .prose .data td:first-child { font-weight: 700; }
  .prose .data td.c-thumb img { width: 96px; }
  .prose .data td.c-thumb:empty { display: none; }
  .prose .data td.c-thumb + td { font-weight: 700; }
  .prose .data td.c-thumb + td::before { display: none; }
  .prose .data td + td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
  .faq-item > :not(h3) { margin-left: 0; }
  .foot-grid { gap: var(--space-5) var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover, a.tile:hover, .btn:hover, .btn:active { transform: none; }
}
@media print {
  .site-head, .foot-studs, .theme-toggle, .filter { display: none; }
  /* Merkliste als Ausdruck: nur Kopf und Tabellen, keine Knöpfe */
  .ml-actions, .ml-rm, .ml-msg, .sticky-lego, .crumbs { display: none !important; }
  .ml-scroll { overflow: visible; }
  .ml-table { min-width: 0; width: 100%; font-size: 11pt; }
  .ml-table th, .ml-table td { min-width: 0; border-color: #000; color: #000; background: #fff; }
  .ml-table tr, .ml-table th, .ml-table td { break-inside: avoid; }
}

/* ---------- Kontaktformular ---------- */
.contact { margin-top: var(--space-6); max-width: 560px; }
.contact p { margin: 0 0 var(--space-5); }
.contact label { display: block; font-weight: 600; margin-bottom: var(--space-2); }
.contact .opt { font-weight: 400; color: var(--muted); }
.contact input, .contact textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--muted); border-radius: 8px;
}
.contact textarea { min-height: 160px; resize: vertical; }
.contact textarea::placeholder { color: var(--muted); opacity: 1; }
.contact input:focus-visible, .contact textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.contact .contact-note { font-size: 15px; color: var(--muted); }
.contact .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Lightbox fuer Teile-Collage und Setfotos (app.js) */
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(10,12,16,0); transition: background .25s ease; cursor: zoom-out; }
.lb.is-open { background: rgba(10,12,16,.82); }
.lb img { position: fixed; left: 0; top: 0; transform-origin: 0 0; border-radius: 12px; background: #f6f7f9;
  box-shadow: 0 20px 60px rgba(0,0,0,.45); transition: transform .3s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.lb-close { position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: #111; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-cap { position: fixed; left: 16px; right: 16px; bottom: 12px; margin: 0 auto; max-width: 70ch; text-align: center;
  font-size: 12px; line-height: 1.45; color: #e6e8ec; opacity: 0; transition: opacity .25s ease; overflow-wrap: anywhere; }
.lb.is-open .lb-cap { opacity: 1; }
.lb-nav { position: fixed; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: #111; font-size: 30px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .25s ease; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
@media (min-width: 641px) { .lb-next { right: auto; } }
.lb-nav:hover { background: #fff; }
.lb-count { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); color: #e6e8ec; font-size: 13px; opacity: 0; transition: opacity .25s ease; }
.lb.is-open .lb-nav, .lb.is-open .lb-count { opacity: 1; }
@media (max-width: 640px) { .lb-nav { top: auto; bottom: 56px; margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { .lb, .lb img, .lb-cap, .lb-nav, .lb-count { transition: none; } }

/* 3D-Ansicht eines Teils (Pilot; viewer3d.js). Knopf nur mit JS sichtbar. */
.plist th.p3d, .plist td.p3d { text-align: center; padding-block: 3px; }
html:not(.js) .plist .p3d { display: none; }
.p3d-btn { min-width: 44px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); color: var(--ink); font: 650 13px/1 var(--body); cursor: pointer; }
.p3d-btn:hover { background: var(--shelf); border-color: var(--muted); }
.p3d-btn[aria-busy="true"] { cursor: progress; opacity: .6; }
.p3d-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent-deep); color: var(--accent-ink); }
.v3d { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(10,12,16,0); transition: background .2s ease; }
.v3d.is-open { background: rgba(10,12,16,.72); }
.v3d-box { position: relative; display: flex; flex-direction: column; width: min(760px, 100%); max-height: 100%; overflow: auto;
  overscroll-behavior: contain; background: var(--panel); color: var(--ink); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.v3d-stage { position: relative; flex: none; height: min(58vh, 480px); min-height: 240px; background: radial-gradient(120% 100% at 50% 40%, #fbfcfd, #e4e7ed);
  border-radius: 14px 14px 0 0; display: flex; align-items: center; justify-content: center; touch-action: none; }
.v3d-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; border-radius: 14px 14px 0 0; }
.v3d-stage canvas:active { cursor: grabbing; }
.v3d-status { margin: 0; padding: 16px 24px; color: var(--muted); font-size: 15px; text-align: center; max-width: 40ch; }
.v3d-stage.is-error .v3d-status { color: var(--ink); }
.v3d-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.v3d-info { padding: 14px 20px 16px; }
.v3d-info h2 { margin: 0 0 2px; font: 700 20px/1.3 var(--display); }
.v3d-meta { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.v3d-stl { margin: 0 0 10px; }
.v3d-size { font-weight: 400; margin-left: .35em; }
.v3d-note { margin: 0 0 6px; font-size: 14px; line-height: 1.45; }
.v3d-attr, .v3d-hint { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.v3d-hint { margin-top: 4px; }
@media (max-width: 600px) {
  .v3d { padding: 8px; }
  .v3d-box { width: 100%; }
  .v3d-stage { height: 52vh; min-height: 220px; }
  .v3d-info { padding: 12px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) { .v3d { transition: none; } }

/* ---------- Teile in 3D (Set-Seite): Collage als Menue, daneben die 3D-Ansicht (app.js, viewer3d.js) ----------
   Desktop: Collage links, Ansicht rechts (klebt beim Scrollen durch die Liste). Telefon: Ansicht ueber der Collage.
   Ohne JS: Collage und Liste wie bisher, Ansicht und Klickzonen ausgeblendet. Collage ist in beiden Themen hell,
   daher feste Farben fuer Auswahl und Fokus auf dem Bild. */
.p3-lead { margin: calc(-1 * var(--space-2)) 0 var(--space-4); max-width: 80ch; color: var(--muted); font-size: 16px; line-height: 1.5; }
html:not(.js) .p3-lead, html:not(.js) .p3-panel, html:not(.js) .p3-zones { display: none; }
.p3 { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: var(--space-5); align-items: start; }
.p3-menu { grid-column: 1; grid-row: 1; min-width: 0; }
.p3-map { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #eef0f4; }
.p3-map img { display: block; width: 100%; height: auto; }
.p3-zones { position: absolute; inset: 0; visibility: hidden; }
.is-live .p3-zones { visibility: visible; }
.p3-zone { position: absolute; padding: 0; margin: 0; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, box-shadow .15s ease; }
/* Zustaende klar getrennt: Hover = duenne blaue Linie, Fokus = blaue Kontur (Tastatur),
   aktiv = gruener 3-px-Rahmen mit Glow und Haken-Plakette (Form, nicht nur Farbe).
   Gruen #00852b (LEGO-Gruen): 4.78:1 auf weisser Kachel, 4.19:1 auf Collage-Grund #eef0f4, 3.82:1 auf dunklem
   Seitengrund; Gelb #ffcd03 kam auf der hellen Collage nur auf 1.5:1 (WCAG 1.4.11 verlangt 3:1). */
.p3-zone:hover { background: rgba(31, 85, 181, .06); box-shadow: inset 0 0 0 2px rgba(31, 85, 181, .5); }
.p3-zone[aria-pressed="true"], .p3-zone[aria-pressed="true"]:hover { background: rgba(0, 133, 43, .07);
  box-shadow: inset 0 0 0 3px #00852b, inset 0 0 0 4px rgba(255, 255, 255, .9), inset 0 0 14px 4px rgba(0, 133, 43, .22),
    0 0 0 1px rgba(0, 133, 43, .35); }
.p3-zone[aria-pressed="true"]::after { content: ""; position: absolute; top: 7px; left: 7px; width: 20px; height: 20px;
  border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  background: #00852b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  animation: p3-pick .32s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes p3-pick { from { transform: scale(.4); opacity: 0; } }
.p3-zone:focus-visible { outline: 3px solid #1f55b5; outline-offset: -3px; border-radius: 7px; }
.p3-zone[aria-pressed="true"]:focus-visible { outline: 2px solid #1f55b5; outline-offset: -8px; }
@media (prefers-reduced-motion: reduce) { .p3-zone[aria-pressed="true"]::after { animation: none; } }
.set-parts.has-3d .parts-collage figcaption { margin-top: var(--space-2); font-size: 14px; }
.p3-panel { grid-column: 2; grid-row: 1; position: sticky; top: var(--space-4); min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 32px -24px var(--shadow); }
.p3-stage { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: radial-gradient(120% 100% at 50% 40%, #fbfcfd, #e4e7ed);
  border-bottom: 1px solid var(--line); }
.p3-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; outline: none; }
.p3-stage canvas:active, .p3-stage.is-dragging canvas, .v3d-stage.is-dragging canvas { cursor: grabbing; }
.p3-stage:not(.is-ready) canvas { visibility: hidden; }
.p3-poster { grid-area: 1 / 1; width: auto; height: 58%; max-width: 70%; border-radius: 10px; background-repeat: no-repeat;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .5); transition: opacity .2s ease; }
.p3-poster[hidden], .p3-stage.is-ready .p3-poster { display: none; }
.p3-status { grid-area: 1 / 1; align-self: end; margin: 0 12px 12px; font-size: 13px; line-height: 1.4; color: var(--muted); text-align: center; }
.p3-stage.is-error .p3-status { color: var(--ink); }
.p3-stage.is-ready .p3-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.p3-info { padding: 14px 18px 16px; }
.p3-head { min-height: 3.4em; }
.p3-title { font: 700 19px/1.3 var(--display); overflow-wrap: anywhere; }
.p3-meta { margin-top: 2px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.p3-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }
.p3-actions .btn { min-height: 44px; padding: 6px 16px; font-size: 15px; }
.p3-actions [hidden] { display: none; }
.p3-size { font-weight: 400; margin-left: .35em; }
.p3-print { margin: 0 0 10px; }
.p3-print[hidden] { display: none; }
.p3-print.is-reserved { min-height: calc(3 * 1.45em + 8px); }
.p3-tips { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.45; }
.p3-tips li { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; }
.p3-tips svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--muted); }
.p3-guide { margin-top: 4px; font-size: 13px; line-height: 1.5; }
.p3-guide[hidden] { display: none; }
.p3-guide a { display: inline-block; padding: 4px 0; }
.p3-note { font-size: 14px; line-height: 1.45; }
.p3-attr { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.p3-attr a { color: inherit; }
.p3-attr[hidden], .no-webgl .p3-hint { display: none; }
.p3-report { margin-top: 2px; font-size: 13px; line-height: 1.5; }
.p3-report a { color: var(--muted); display: inline-block; padding: 4px 0; }
/* Hinweis „Ziehen zum Drehen“ ueber der Szene (viewer3d.js makeHint): erscheint, sobald das Modell sichtbar ist,
   geht nach der ersten Drehung weg. Klicks gehen durch (pointer-events: none). Bogen zeichnet sich zweimal nach. */
.v3-hint { position: absolute; left: 50%; bottom: 10px; z-index: 1; display: flex; align-items: center; gap: 7px;
  padding: 5px 13px 5px 9px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--panel); background: color-mix(in srgb, var(--panel) 84%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 16px -10px var(--shadow);
  color: var(--ink); font: 600 13px/1.25 var(--body); white-space: nowrap; pointer-events: none; user-select: none;
  opacity: 0; transform: translate(-50%, 6px); transition: opacity .45s ease, transform .45s ease; }
.v3-hint.is-on { opacity: 1; transform: translate(-50%, 0); }
.v3-hint.is-off { transition-duration: .3s; }
.v3-hint svg { flex: none; width: 22px; height: 22px; }
.v3-hint .v3-orbit { stroke-dasharray: 1 1; }
.v3-hint.is-on .v3-orbit { animation: v3-orbit 1.5s cubic-bezier(.45, 0, .25, 1) .35s 2 backwards; }
.v3-hint.is-on .v3-tip { animation: v3-tip 1.5s ease .35s 2 backwards; }
@keyframes v3-orbit { 0% { stroke-dashoffset: 1; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes v3-tip { 0%, 55% { opacity: 0; } 75%, 100% { opacity: 1; } }
.v3d-stage .v3-hint { bottom: 16px; }
.v3-pause { position: absolute; top: 10px; left: 10px; z-index: 2; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(15, 17, 21, .55); color: #fff; cursor: pointer; opacity: .75; transition: opacity .15s; }
.v3-pause:hover, .v3-pause:focus-visible { opacity: 1; }
.v3-pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.v3-pause svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) {
  .v3-hint { transition: opacity .3s ease; transform: translate(-50%, 0); }
  .v3-hint.is-on .v3-orbit, .v3-hint.is-on .v3-tip { animation: none; }
}
@media (max-width: 899px) {
  .p3 { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .p3-panel { grid-column: 1; position: static; }
  .p3-menu { grid-row: 2; }
  .p3-stage { aspect-ratio: 16 / 10; }
  .p3-info { padding: 12px 14px 14px; }
  .p3-head { min-height: 0; }
  .p3-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .p3-note, .p3-tips { font-size: 13.5px; }
  .p3-print.is-reserved { min-height: 90px; }   /* 375 px: eine Zeile bricht meist um */
  .p3-zone[aria-pressed="true"], .p3-zone[aria-pressed="true"]:hover { box-shadow: inset 0 0 0 2px #00852b,
    inset 0 0 0 3px rgba(255, 255, 255, .9), inset 0 0 8px 2px rgba(0, 133, 43, .2), 0 0 0 1px rgba(0, 133, 43, .35); }
  .p3-zone[aria-pressed="true"]::after { top: 3px; left: 3px; width: 12px; height: 12px; }
}

/* ---------- Teile in 3D, Anordnung B (build.py P3D_LAYOUT = "B") ----------
   Grosse Szene links, rechts senkrechtes Kachelmenue: jede Kachel ist ein <button class="p3-zone p3-tile">,
   Hintergrund = ihr Rahmen aus der Collage (app.js, CSSOM), also keine zusaetzlichen Bilddateien. „×N“ steht im Bild.
   Raster je Variante (.p3-g4 = 4x6, .p3-g3 = 3x8, .p3-g2 = 2x12): Menuebreite --p3m und Szenen-Seitenverhaeltnis --p3a
   so gewaehlt, dass Menue und Szene+Infos bei 1168 px Inhaltsbreite etwa gleich hoch sind. Alle Groessen stehen
   vor dem Laden fest (aspect-ratio), daher kein Layoutsprung. Telefon/Tablet (< 900 px): Szene, darunter eine
   waagerechte Kachelleiste, dann Infos – Wahl und Ergebnis bleiben zusammen im Bild. Ohne JS: Collage und Liste. */
.p3b { display: block; --p3m: 36%; --p3a: 6 / 5; --p3c: 4; --p3gap: 8px; }
.p3b.p3-g3 { --p3m: 21%; --p3a: 7 / 5; --p3c: 3; --p3gap: 6px; }
.p3b.p3-g2 { --p3m: 9.5%; --p3a: 3 / 2; --p3c: 2; --p3gap: 6px; }
.p3b .p3-panel { display: grid; grid-template-columns: minmax(0, 1fr) var(--p3m); grid-template-rows: auto 1fr;
  grid-template-areas: "stage menu" "info menu"; column-gap: var(--space-5); align-items: start;
  position: static; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.p3b .p3-stage { grid-area: stage; aspect-ratio: var(--p3a); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 32px -24px var(--shadow); }
.p3b .p3-tiles { grid-area: menu; position: relative; display: grid; grid-template-columns: repeat(var(--p3c), minmax(0, 1fr));
  gap: var(--p3gap); align-content: start; }
.p3-tile { position: relative; display: block; width: 100%; aspect-ratio: 138 / 186.67; border-radius: 9px;
  background-color: #eef0f4; background-repeat: no-repeat; }
.p3-tile:not([aria-pressed="true"]) { box-shadow: 0 0 0 1px var(--line); }
.p3-g2 .p3-tile[aria-pressed="true"]::after { top: 3px; left: 3px; width: 12px; height: 12px; }
.p3-g3 .p3-tile[aria-pressed="true"]::after { top: 4px; left: 4px; width: 16px; height: 16px; }
.p3b .p3-info { grid-area: info; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-4);
  align-items: start; padding: 14px 2px 0; }
.p3b .p3-info > * { grid-column: 1 / -1; }
.p3b .p3-head { grid-column: 1; min-height: 0; }
.p3b .p3-actions { grid-column: 2; margin: 0; flex-wrap: nowrap; }
.p3b .p3-print { margin: 10px 0 4px; }
/* Platz fuer drei einzeilige Tipps genau so hoch wie gerendert (14 px, Zeile 1.45 + 2x2 px), sonst rutschen Hinweis
   und Namensnennung beim ersten Fuellen um einige Pixel; Vorschau erst zeigen, wenn viewer3d.js sie bemessen hat */
.p3b .p3-print { font-size: 14px; }
.p3b .p3-print.is-reserved { min-height: calc(3 * (1.45em + 4px)); }
.p3b .p3-poster:not([style]) { display: none; }
.p3b .p3-note { font-size: 13px; line-height: 1.45; color: var(--muted); }
.p3b .p3-attr { margin-top: 2px; font-size: 12px; }
.set-parts .p3b + .parts-collage { margin-top: var(--space-3); }
html.js .p3b + .parts-collage .p3-map { display: none; }
@media (min-width: 900px) and (max-width: 1099px) {
  /* 868–1068 px Inhalt: Infos brechen oefter um, daher flachere Szene; Knoepfe unter den Titel */
  .p3b { --p3m: 37%; --p3a: 4 / 3; --p3gap: 6px; }
  .p3b .p3-panel { column-gap: var(--space-4); }
  .p3b .p3-info { grid-template-columns: minmax(0, 1fr); }
  .p3b .p3-actions { grid-column: 1; margin-top: 10px; }
}
@media (max-width: 899px) {
  .p3b .p3-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "stage" "menu" "info"; }
  .p3b .p3-stage { aspect-ratio: 6 / 5; }
  .p3b .p3-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76px; gap: 8px;
    margin: 10px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0; padding: 3px max(16px, env(safe-area-inset-left, 0px)) 8px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    scroll-padding-inline: max(16px, env(safe-area-inset-left, 0px)); scrollbar-width: thin; }
  .p3b .p3-tile { scroll-snap-align: start; }
  .p3b .p3-info { grid-template-columns: minmax(0, 1fr); padding-top: 8px; }
  .p3b .p3-print.is-reserved { min-height: calc(3 * (1.45em + 4px) + 1.45em); }   /* eine Zeile bricht meist um */
  .p3b .p3-actions { grid-column: 1; margin-top: 10px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .p3b .p3-stage { aspect-ratio: 16 / 10; }
  .p3b .p3-tiles { grid-auto-columns: 96px; }
}

/* ---------- Suche (Kopfzeile, /suche/) – search.js, app.js ----------
   Feld steht fest im HTML (kein Layoutsprung), Modul und Index laden beim ersten Fokus. Ohne JS ausgeblendet.
   Breit: Feld zwischen Navigation und Design-Schalter. <= 1040 px: Feld in Zeile 1 rechts. <= 600 px: Lupe,
   Tipp darauf klappt das Feld als eigene Zeile unter dem Logo auf (vom Nutzer ausgeloest, zaehlt nicht als CLS). */
html:not(.js) .site-search, html:not(.js) .ss-toggle { display: none; }
.site-search { position: relative; flex: 0 1 230px; min-width: 0; display: flex; align-items: center; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); }
.site-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.ss-icon { flex: none; width: 18px; height: 18px; margin-left: 14px; color: var(--muted); }
.site-search input { flex: 1; min-width: 0; height: 100%; padding: 0 4px 0 8px; border: 0; background: transparent;
  color: var(--ink); font: 400 16px/1.2 var(--body); outline: none; }
.site-search input::placeholder { color: var(--muted); opacity: 1; }
.site-search input::-webkit-search-cancel-button { display: none; }
.ss-go { flex: none; width: 36px; height: 36px; margin-right: 3px; border: 0; border-radius: 50%; padding: 0; display: grid;
  place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.ss-go svg { width: 18px; height: 18px; }
.ss-go:hover, .ss-go:focus-visible { background: var(--shelf); color: var(--ink); }
.ss-toggle { flex: none; width: 44px; height: 44px; border-radius: 50%; padding: 0; display: none; place-items: center;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.ss-toggle svg { width: 20px; height: 20px; }
.ss-toggle:hover { background: var(--shelf); }
.ss-pop { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: min(440px, calc(100vw - 32px));
  max-height: min(72vh, 600px); overflow: auto; overscroll-behavior: contain; padding: 6px 0;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 18px 40px -12px var(--shadow), 0 2px 6px var(--shadow); }
.ss-pop[hidden] { display: none; }
.ss-gh { padding: 8px 14px 4px; font: 700 12px/1.3 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ss-grp + .ss-grp { border-top: 1px solid var(--line); margin-top: 4px; }
.ss-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; cursor: pointer; }
.ss-opt[aria-selected="true"] { background: var(--shelf); box-shadow: inset 3px 0 0 var(--link); }
.ss-img { flex: none; width: 40px; height: 40px; border-radius: 6px; background-color: #eef0f4; background-repeat: no-repeat; }
.ss-img.is-set { width: 48px; height: 36px; background-color: #fff; border: 1px solid var(--line); }
.ss-img.has-img { background-size: 1000% 1000%; }
.ss-img.is-hub { background: var(--f); box-shadow: inset 0 -6px 0 var(--s); border: 0; }
.ss-img.is-set:not(.has-img) { background: var(--media-bg); }
.ss-tx { display: grid; min-width: 0; }
.ss-t { font-weight: 600; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-s { font-size: 13px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-foot { padding: 8px 14px 6px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.ss-pop > .ss-foot:only-child { border-top: 0; margin-top: 0; }
@media (max-width: 1040px) {
  .site-search { margin-left: auto; flex: 0 1 320px; }
  .site-search ~ .theme-toggle { margin-left: 0; }
}
@media (max-width: 600px) {
  .site-head:not(.ss-open) .site-search { display: none; }
  .ss-toggle:not([hidden]) { display: grid; margin-left: auto; }
  .site-search { order: 2; flex: 1 0 100%; margin: 4px 0 6px; }
  /* Liste liegt ueber der Navigation, Hoehe so, dass sie mit offener Tastatur sichtbar bleibt */
  .ss-pop { left: -1px; right: -1px; width: auto; top: calc(100% + 6px); max-height: min(56vh, 460px); }
  .ss-open .ss-toggle { background: var(--shelf); }
}
.sp-form { margin: 0 0 var(--space-5); max-width: 640px; }
.sp-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.sp-row { display: flex; gap: 8px; }
.sp-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); color: var(--ink); font: 400 17px/1.2 var(--body); }
.sp-sum { font-weight: 600; margin: 0 0 var(--space-4); }
.sp-hint { color: var(--muted); max-width: 70ch; }
.sp-grp { margin-top: var(--space-5); }
.sp-grp h2 { font: 700 20px/1.3 var(--display); margin: 0 0 var(--space-2); }
.sp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px; }
.sp-hit { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.sp-hit:hover { background: var(--shelf); }
.sp-hit .ss-t { color: var(--link); }

/* ---------- Teilekatalog /teile-3d/ (catalog.js) ----------
   Kachelbild = Ausschnitt eines Sprite-Blatts (10 x 10, 128 px, heller Grund wie die Collage, auch im dunklen Design). */
.cat-intro { max-width: 72ch; }
.cat3d { margin-top: var(--space-7); }
.cat-tools { display: grid; gap: var(--space-3); margin-bottom: var(--space-3); }
html:not(.js) .cat-tools { display: none; }
.cat-search { max-width: 520px; }
.cat-search label { display: block; font-weight: 600; margin-bottom: 6px; }
.cat-search input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); color: var(--ink); font: 400 17px/1.2 var(--body); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { cursor: pointer; font-family: var(--body); }
.cat-chip:hover { background: var(--shelf); }
.cat-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cc-n { font-weight: 400; margin-left: .4em; opacity: .8; }
.cat-count { margin: 0 0 var(--space-3); color: var(--muted); font-size: 15px; }
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pc { min-width: 0; }
.pc > .pc-img, .pc-btn > .pc-img { flex: none; width: 72px; height: 72px; border-radius: 8px; background: #eef0f4 no-repeat; background-size: 1000% 1000%; }
.pc-img.is-empty { background: #eef0f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0aa' stroke-width='1.6'%3E%3Cpath d='M4 9h16v9H4zM7 9V6.5h3V9M14 9V6.5h3V9'/%3E%3C/svg%3E") center / 32px no-repeat; }
.pc, .pc-btn { display: flex; align-items: center; gap: 12px; }
.cat-grid > .pc { padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.cat3d.is-live .cat-grid > .pc { padding: 0; border: 0; background: none; }
.pc-btn { width: 100%; height: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.pc-btn:hover { border-color: var(--line-strong); background: var(--shelf); }
.pc-txt { display: grid; min-width: 0; line-height: 1.3; }
.pc-num { font: 700 15px/1.3 var(--body); font-variant-numeric: tabular-nums; }
.pc-name { font-size: 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-en { display: none; }
.pc-meta { font-size: 12.5px; color: var(--muted); }
.cat-rest { margin-top: var(--space-3); color: var(--muted); font-size: 15px; }
.cat-rest[hidden], .cat-rest:empty { display: none; }
.cat-sentinel { grid-column: 1 / -1; height: 1px; }
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pc > .pc-img, .pc-btn > .pc-img { width: 64px; height: 64px; }
  .cat-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: thin; }
  .cat-chip { flex: none; }
}
/* Fenster eines Teils (viewer3d.js open + catalog.js extend) */
.v3d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.v3d-actions .btn { min-height: 44px; padding: 6px 16px; font-size: 15px; margin: 0; }
.v3d-print { margin: 0 0 10px; }
.v3d-sets { margin: 8px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.v3d-sets h3 { margin: 0 0 2px; font: 700 16px/1.35 var(--display); }
.v3d-sub { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.v3d-setlist { margin: 0; padding: 0; list-style: none; columns: 2 240px; column-gap: 20px; font-size: 14px; line-height: 1.4; }
.v3d-setlist li { break-inside: avoid; padding: 3px 0; }
.v3d-setlist a { display: inline-block; padding: 4px 0; }
.v3d-q { color: var(--muted); font-variant-numeric: tabular-nums; }
.v3d-report { margin: 0 0 6px; font-size: 13px; }
.v3d-report a { color: var(--muted); display: inline-block; padding: 4px 0; }
.v3d-box.is-max { width: 100%; height: 100%; max-height: none; }
.v3d-box.is-max .v3d-stage { height: 72vh; }
.p3-all { margin-top: 6px; font-size: 13px; line-height: 1.5; }
.p3-all a { display: inline-block; padding: 4px 0; font-weight: 600; }
/* 1041-1180 px: Platz fuer das Suchfeld in Zeile 1 (Untertitel des Logos weg, Navigation bricht nicht um) */
@media (min-width: 1041px) and (max-width: 1180px) { .head-row .logo-tag { display: none; } }
@media (min-width: 1041px) { .main-nav { flex: none; } .site-search { min-width: 160px; } }
/* Vorschlaege ohne Bild (Ratgeber, Katalog): Dokument-Symbol statt leerer Flaeche; Serien: Farbe mit Kontur (dunkles Design) */
.ss-img:not(.has-img):not(.is-hub):not(.is-set) { background: var(--shelf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a909b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7z'/%3E%3Cpath d='M14 3v4h4M10 12h5M10 16h5'/%3E%3C/svg%3E") center / 22px no-repeat;
  border: 1px solid var(--line); }
.ss-img.is-hub { outline: 1px solid var(--line-strong); outline-offset: -1px; }
html:not(.js) .pc > .pc-img { display: none; }
.sp-form { margin-top: var(--space-4); }

/* Geschenkfinder, Merkliste, Merken-Knopf (gen/tools.py, gen/static/tools.js) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.merken-row { margin: var(--space-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.merken-row .merken { min-height: 44px; }
.merken-link { font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; }
.merken-msg { font-size: 14px; color: var(--muted); }
.btn[hidden], .ml-actions[hidden], .merken-link[hidden] { display: none !important; }
.gf { margin: 0 0 var(--space-5); display: grid; gap: var(--space-4); max-width: 760px; }
.gf-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.gf-group legend { font-weight: 600; margin-bottom: var(--space-2); padding: 0; }
.gf-opts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gf-opt { position: relative; }
.gf-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.gf-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--panel); color: var(--ink); }
.gf-opt input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-deep); font-weight: 600; }
.gf-opt input:focus-visible + span { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.gf-out { margin-bottom: var(--space-6); }
.gp-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.gp-row > div { display: grid; gap: var(--space-1); }
.gp input[type=number] { min-height: 44px; width: 9rem; padding: 0 var(--space-3); font: inherit; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); color: inherit; }
.gp .btn[type=submit] { justify-self: start; }
.gf-count { font-weight: 600; margin: 0 0 var(--space-3); }
.gf-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gf-card { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: var(--space-4); display: grid; gap: var(--space-2); align-content: start; }
.gf-card h3 { margin: 0; font-size: 1.05rem; }
.gf-card p { margin: 0; }
.gf-meta, .gf-price { color: var(--muted); font-size: 14px; }
.gf-src { padding-left: 1.2em; }
.ml-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--space-4); }
.ml-table { border-collapse: collapse; min-width: 100%; }
.ml-table th, .ml-table td { border: 1px solid var(--line); padding: var(--space-2) var(--space-3); text-align: left; vertical-align: top; min-width: 140px; }
.ml-table tbody th { background: var(--shelf); font-weight: 600; min-width: 90px; }
.ml-rm { min-height: 44px; margin-top: var(--space-2); }
/* Preis beobachten (Set-Seite), Preise im Blick (Merkliste), Hinweisband */
.pw { margin: var(--space-3) 0 0; max-width: 560px; }
.pw[hidden], .pw-line[hidden], .pw-form[hidden], .pw-banner[hidden], [data-pw-off][hidden] { display: none !important; }
.pw-line { margin: 0 0 var(--space-2); font-size: 15px; }
.pw-line.pw-hit { background: var(--accent-soft); border-left: 4px solid var(--accent-deep); padding: var(--space-2) var(--space-3); border-radius: 0 8px 8px 0; font-weight: 600; }
.pw-actions { margin: 0 0 var(--space-2); }
.pw-form { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; }
.pw-lab { display: inline-flex; gap: var(--space-2); align-items: center; font-weight: 600; }
.pw-form input { min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }
.pw-form .btn { min-height: 44px; }
.pw-note { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }
.pw-banner { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); background: var(--accent-soft); border-left: 4px solid var(--accent-deep); border-radius: 0 8px 8px 0; font-size: 15px; }
.pw-x { margin-left: var(--space-3); min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.ml-prices { margin-top: var(--space-5); }
.ml-prices[hidden] { display: none !important; }
.ml-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.ml-msg { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.ml-shared { margin-top: var(--space-6); }
.set-figs { margin: var(--space-6) 0; }
.figs-names { color: var(--muted); font-size: 15px; }

/* Set-Seite: Farben und Platzbedarf als Zweierreihe unter den 3D-Teilen */
.set-duo { margin-top: var(--space-7); }
.set-duo > .set-colors { margin-top: 0; }
@media (min-width: 960px) {
  .set-duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
  .set-duo > section { margin: 0; }
}

/* Fixierte LEGO-Leiste (nur Handy, /set/): hidden bis app.js sie zeigt; fixed => keine Layoutverschiebung */
.sticky-lego { display: none; }
@media (max-width: 640px) {
  .sticky-lego:not([hidden]) { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid var(--line); }
  .sticky-lego .btn-go { flex: 0 0 auto; white-space: nowrap; }
  .sticky-lego .aff-note { margin: 0; font-size: 12px; line-height: 1.3; }
  body.has-sticky-lego { padding-bottom: 72px; }
}

/* Saisonblock Startseite (app.js blendet ihn zwischen data-season-from/-to ein) */
.season[hidden] { display: none; }
.season-links { list-style: none; margin: var(--space-2, 12px) 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.season-links a { display: block; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel, var(--bg)); color: inherit; text-decoration: none; }
.season-links a:hover, .season-links a:focus-visible { border-color: currentColor; }
.season-links b { display: block; margin-bottom: 4px; }
.season-links span { color: var(--muted, inherit); font-size: .95em; }

/* Aktionsleiste (app.js blendet sie per data-season-from/-to ein) */
.aktion-bar[hidden] { display: none; }
.aktion-bar { background: var(--panel, var(--bg)); border-bottom: 1px solid var(--line-strong); font-size: .95em; }
.aktion-bar p { margin: 0; padding: 8px 0; }
.aktion-bar a { font-weight: 600; }
.r-fig { margin: var(--space-5) 0; }
.r-fig img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: 8px; }
.r-fig figcaption { font-size: .9em; color: var(--muted, inherit); margin-top: 6px; }

/* Karte im Ratgeber: zweite Zeile 'Bei LEGO ansehen*' (go_guide) */
.card-go { margin: 8px 0 0; font-size: 13px; }
.card-go .btn-go { font-size: 13px; padding: 4px 10px; min-height: 0; }
.card-go .aff-mark { color: var(--muted); }

/* Sticky-Saisonleiste (Geschenk-Ratgeber, Handy): fixed => kein CLS; ohne Cookie-Banner auf der Seite */
.sticky-season { display: none; }
@media (max-width: 640px) {
  .sticky-season:not([hidden]) { display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; }
  .sticky-season p { margin: 0; flex: 1 1 auto; }
  .sticky-season-x { flex: 0 0 auto; width: 44px; height: 44px; font-size: 22px; background: none; border: 0; color: inherit; cursor: pointer; }
  body.has-sticky-season { padding-bottom: 64px; }
}
@media print { .sticky-season { display: none !important; } }

/* Design-QA 23.11.2026: Rahmen von Bedienelementen ≥3:1, Abstand unter h1 auf Merkliste */
.sp-row input, .site-search, .theme-toggle, .ss-toggle, .btn-ghost, .chip, .p3-btn, .pw-form input, .pw-x { border-color: var(--control); }
.page-head h1 + p { margin-top: var(--space-4); }

/* intl preview */
.intl-preview{margin:.75rem 0 0;padding:.4rem .75rem;border:2px dashed currentColor;border-radius:8px}
