/* 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;
  --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) */
}
@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: #2a2e37; --line-strong: #3d424d;
    --link: #8fb4f2; --focus: #f0c33c;
    --accent: #f0c33c; --accent-deep: #b58f1c; --accent-ink: #1a1d23; --accent-soft: #2a2516;
    --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;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13151a; --shelf: #181b21; --panel: #1b1e25; --hero: #181c23;
  --ink: #eceef2; --muted: #a5abb7; --line: #2a2e37; --line-strong: #3d424d;
  --link: #8fb4f2; --focus: #f0c33c;
  --accent: #f0c33c; --accent-deep: #b58f1c; --accent-ink: #1a1d23; --accent-soft: #2a2516;
  --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;
}

.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, .facts dd { 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: 28px 80px; display: flow-root; }
main > section, main > .related, main > .doc, main > .sources, main > details, main > .shelf { margin-top: 72px; }
main > :first-child { margin-top: 0; }
main > .band:first-child { margin-top: -28px; }
.crumbs ol { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.crumbs a { color: var(--muted); }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); max-width: 24ch; }
.updated { margin-top: 12px; font-size: 15px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.updated::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.lead { font-size: 20px; line-height: 1.55; margin-top: 16px; max-width: 60ch; color: var(--ink); }

/* volle Breite ohne Querscroll: Farbe per Schatten bis an den Rand, clip-path schneidet oben/unten ab */
.band, .shelf { position: relative; }
.shelf { background: var(--shelf); box-shadow: 0 0 0 100vmax var(--shelf); clip-path: inset(0 -100vmax); padding-block: 56px 64px; }
main > .shelf + section, main > section + .shelf { margin-top: 0; }
main > .shelf + section { padding-top: 72px; }

/* ---------- 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: 40px 48px; margin-top: -28px;
}
.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: -4px; }
.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: 56px 64px; }
.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: 12px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head h2, .prose h2 { font-size: clamp(26px, 2.8vw, 34px); }
.sec-head h2 { display: flex; align-items: center; gap: 12px; }
/* 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: 28px; }

/* ---------- Karten: Fläche + 3-px-Oberkante in Serien- bzw. Rubrikfarbe ---------- */
.card-grid:has(> .card:nth-child(6):last-child), .card-grid:has(> .card:nth-child(3):last-child),
.card-grid:has(.art-card) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; margin-block: 8px; }
.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: 16px 18px 16px; }
.set-num { font: 600 30px/1 var(--brand); letter-spacing: -.01em; margin: 12px 0 6px; }
.set-card .card-title { font: 650 17px/1.35 var(--display); }
.card-stats { margin: auto 0 0; padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; }
.card-stats div { padding: 10px 0 0; border-top: 1px solid var(--line); }
.card-stats div + div { padding-left: 14px; }
.card-stats dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card-stats dd { margin: 2px 0 0; font: 650 17px/1.2 var(--body); }

/* ---------- Setfotos (data/images.json): feste Seitenverhältnisse gegen CLS, Bild unbearbeitet ---------- */
.card-media { margin: -16px -18px 0; aspect-ratio: 4 / 3; background: var(--media-bg); border-radius: 7px 7px 0 0; overflow: hidden; }
.card-media img, .photo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-credit { margin: 6px 0 10px; font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.set-band.has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: start; }
.set-photo { margin: 0; min-width: 0; width: 100%; }
.photo-frame { aspect-ratio: 4 / 3; background: var(--media-bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.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; }

.art-card { padding: 18px 20px 18px; gap: 10px; }
.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: 16px; margin-block: 8px; }
.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: 32px 0; padding: 18px 20px; 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); }
.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; }
.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: 8px; margin-top: 24px; }
.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: 40px; }
.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); overflow: auto; 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 > p:first-child { font-size: 20px; line-height: 1.6; }
.prose h2 { margin-top: 2.6em; scroll-margin-top: 20px; }
.prose h3 { font-size: 21px; font-weight: 700; margin-top: 1.9em; scroll-margin-top: 20px; }
.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 { margin-block: 28px; }
.hub-text { margin-top: 40px; }
.note { background: var(--accent-soft); border-left: 3px solid var(--accent-deep); border-radius: 0 8px 8px 0; padding: 16px 20px; }
.note p + p { margin-top: 10px; }
.plate { height: 1px; background: var(--line); margin-block: 44px; 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: 16px; }
.faq-item { border-top: 1px solid var(--line); padding: 20px 0 22px; }
.faq-item h3 { margin: 0 0 6px; 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: 6px 0 0 40px; }
.faq-item > * + * { margin-top: 10px; }
.sources { margin-top: 56px; padding-top: 24px; 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; border: 1px solid var(--line); border-radius: 10px; margin-block: 20px; -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: 8px 14px; margin: 18px 0 4px; }
.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: 32px; }
.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: 24px; }

/* ---------- Set-Seite, Jahre ---------- */
.set-body { margin-top: 36px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.facts div { padding: 14px 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font: 650 18px/1.35 var(--body); }
.set-text { margin-top: 40px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; }
.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: 56px; }

/* ---------- Hinweis-Box (404, Partnerlink) ---------- */
.notice { max-width: 760px; margin-top: 24px; 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: 15px; }
.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: 32px; padding-block: 48px 8px; }
.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: 32px; padding-block: 22px 36px; 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: 8px; padding-block: 36px 48px; }
  .scene { justify-self: center; max-width: 460px; }
  .band { padding-block: 32px 40px; gap: 16px; }
  .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: 12px; font-size: 15px; background: var(--shelf); }
  .nb:hover { background: var(--line); }
  .card-grid:has(.set-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .set-card { padding: 12px 12px 12px; }
  .set-card .card-kicker { font-size: 12px; letter-spacing: .04em; }
  .set-num { font-size: 24px; margin: 8px 0 4px; }
  .set-card .card-title { font-size: 15px; }
  .card-stats div + div { padding-left: 8px; }
  .card-stats dd { font-size: 15px; }
  .card-stats dt { font-size: 12px; letter-spacing: .04em; }
  .card-media { margin: -12px -12px 0; }
  .card-credit { font-size: 12px; margin-bottom: 6px; }
  .set-band.has-photo { grid-template-columns: minmax(0, 1fr); }
  .credit { font-size: 12.5px; }
  main { padding-top: 20px; }
  .band, main > .band:first-child { margin-top: -20px; }
  .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; }
  main > section, main > .related, main > .doc, main > .sources, main > details { margin-top: 56px; }
  .shelf { padding-block: 44px 52px; }
  main > .shelf + section { padding-top: 56px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .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; }
  .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: 8px 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 + td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
  .faq-item > :not(h3) { margin-left: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div { padding: 12px 14px; }
  .foot-grid { gap: 24px 16px; }
}
@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; }
}
