/* Beyblade X Wiki – Aussehen der Wiki-Seiten (früher direkt in index.html).
   Eigene Datei, weil seiten-erzeugen.py daraus tausende Einzelseiten macht: So lädt der Browser das CSS nur einmal. */
:root {
  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 16px;
  color-scheme: light;
  --bg: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --border: #d9dfea;
  --border-strong: #c2cadb;
  --text: #0f1524;
  --muted: #566076;
  --faint: #646d80;  /* Kontrast mind. 4,5:1 auf Hintergrund und Karten (vorher #8790a4) */
  --accent: #0a66f0;
  --accent-soft: rgba(10, 102, 240, .10);
  --x: #e11d48;
  --atk: #d6322a;
  --def: #138a53;
  --sta: #1768cf;
  --bal: #8237f0;
  --bx: #1768cf;
  --ux: #d96f06;
  --cx: #c42a72;
  --k-lock: #64708a;
  --k-blade: #1768cf;
  --k-over: #0f8b8d;
  --k-assist: #8237f0;
  --k-ratchet: #d96f06;
  --k-bit: #138a53;
  --shadow: 0 1px 2px rgba(15, 21, 36, .06), 0 6px 18px rgba(15, 21, 36, .06);
  --shadow-lg: 0 24px 70px rgba(15, 21, 36, .28);
  --stage-a: #ffffff;
  --stage-b: #e3e8f1;
  --ring: rgba(15, 21, 36, .07);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080b13;
  --surface: #111827;
  --surface-2: #172033;
  --border: #232e45;
  --border-strong: #34425f;
  --text: #e8edf7;
  --muted: #9aa6bf;
  --faint: #7f8aa3;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, .14);
  --x: #ff4d6d;
  --atk: #ff6259;
  --def: #3fd08f;
  --sta: #58a6ff;
  --bal: #b78cff;
  --bx: #58a6ff;
  --ux: #ffab52;
  --cx: #f2679c;
  --k-lock: #9aa6bf;
  --k-blade: #58a6ff;
  --k-over: #3cc9c4;
  --k-assist: #b78cff;
  --k-ratchet: #ffab52;
  --k-bit: #3fd08f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .6);
  --stage-a: #eef2f8;
  --stage-b: #c9d1df;
  --ring: rgba(15, 21, 36, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #080b13;
    --surface: #111827;
    --surface-2: #172033;
    --border: #232e45;
    --border-strong: #34425f;
    --text: #e8edf7;
    --muted: #9aa6bf;
    --faint: #7f8aa3;
    --accent: #58a6ff;
    --accent-soft: rgba(88, 166, 255, .14);
    --x: #ff4d6d;
    --atk: #ff6259;
    --def: #3fd08f;
    --sta: #58a6ff;
    --bal: #b78cff;
    --bx: #58a6ff;
    --ux: #ffab52;
    --cx: #f2679c;
    --k-lock: #9aa6bf;
    --k-blade: #58a6ff;
    --k-over: #3cc9c4;
    --k-assist: #b78cff;
    --k-ratchet: #ffab52;
    --k-bit: #3fd08f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, .6);
    --stage-a: #eef2f8;
    --stage-b: #c9d1df;
    --ring: rgba(15, 21, 36, .08);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lock { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-body);
  min-height: 100vh;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.top-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 12px 20px 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand .logo { margin: 0; flex: none; line-height: 0; }
.brand .logo img { display: block; width: auto; height: 60px; }
.brand p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 0 12px; height: 42px; min-width: 280px;
  box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; font-size: 15px; }
.search input::placeholder { color: var(--faint); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 3px; height: 42px; box-shadow: var(--shadow); }
.seg button {
  border: 0; background: transparent; border-radius: 9px; padding: 0 12px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.seg button[hidden] { display: none; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.icon-btn:hover, .seg button:not([aria-pressed="true"]):hover { color: var(--text); }
.icon-btn[hidden] { display: none; }
.icon-btn svg { width: 19px; height: 19px; }

/* Sprachwahl */
.lang { position: relative; }
/* Platz für Knöpfe freihalten, die erst per JavaScript kommen (sonst springt die Seite, wenn der Kopf umbricht) */
.lang:empty { min-width: 64px; height: 42px; }
.acct:empty { min-width: 100px; height: 42px; }
.lang-btn { width: auto; min-width: 42px; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { color: var(--text); }
.lang-btn svg { width: 18px; height: 18px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: max-content; min-width: 230px; max-width: calc(100vw - 32px);
  max-height: min(72vh, 560px); overflow-y: auto; display: grid; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: grid; gap: 1px; text-align: left; padding: 8px 10px; border: 0; border-radius: 9px; background: none; cursor: pointer; font-size: 14px;
}
.lang-menu button b { font-weight: 600; }
.lang-menu button small { color: var(--muted); font-size: 12px; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--surface-2); }
.lang-menu button[aria-checked="true"] { background: var(--accent-soft); }
.lang-menu button[aria-checked="true"] b { color: var(--accent); }
.i18n-wait .top-inner, .i18n-wait footer { visibility: hidden; }
/* Hinweis auf die Browsersprache (i18n.js): schwebt oben, damit nichts verrutscht */
.lang-hint {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 70; max-width: calc(100vw - 24px);
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600;
}
.lang-hint svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.lang-hint a { color: var(--accent); text-decoration: none; }
.lang-hint a:hover { text-decoration: underline; }
.lang-hint button { width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.lang-hint button:hover { color: var(--text); }

.tabs {
  max-width: 1320px; margin: 0 auto; padding: 8px 20px 0;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs:empty { min-height: 53px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 14px 12px; text-decoration: none; color: var(--muted);
  font: 600 15px/1 var(--font-display); letter-spacing: .02em;
  border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--text); }
.tab[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.tab .n, .tab-menu .n {
  font: 600 11.5px/1 var(--font-body); padding: 3px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.tab[aria-current] .n, .tab-menu a[aria-current] .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab .n.zero, .tab-menu .n.zero { opacity: .45; }
/* Dropdown „Teile“ (Blades, Custom-Line-Teile, Ratchets, Bits) */
.tab-group { background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.tab-group[aria-expanded="true"] { color: var(--text); }
.tab .chev { width: 14px; height: 14px; margin-left: -3px; transition: transform .15s; }
.tab-group[aria-expanded="true"] .chev { transform: rotate(180deg); }
.tab-menu {
  position: absolute; z-index: 45; min-width: 270px; max-width: calc(100vw - 16px); display: grid; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.tab-menu[hidden] { display: none; }
.tab-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--text);
}
.tab-menu a > span { display: grid; gap: 3px; }
.tab-menu b { font: 600 15px/1.1 var(--font-display); letter-spacing: .02em; }
.tab-menu small { color: var(--muted); font-size: 12px; }
.tab-menu a:hover { background: var(--surface-2); }
.tab-menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tab-menu a[aria-current] { background: var(--accent-soft); }
.tab-menu a[aria-current] b { color: var(--accent); }

/* ---------- Main / filters ---------- */
/* Inhalt für Suchmaschinen und Browser ohne JavaScript (seiten-erzeugen.py). Mit JavaScript (Klasse js aus i18n.js)
   baut app.js die Seite, dieser Inhalt bleibt unsichtbar. */
.js .vorab { display: none; }
/* Bis app.js die Seite zum ersten Mal gebaut hat, eine Bildschirmhöhe freihalten: sonst steht die Fußzeile
   anfangs oben und rutscht dann sichtbar nach unten (Layout-Verschiebung, CLS) */
.js:not(.gebaut) #view { min-height: 100vh; }
.vorab nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; font-weight: 600; }
.vorab a { color: var(--accent); }
.vorab h1 { margin: 8px 0 10px; font: 700 30px/1.15 var(--font-display); }
.vorab dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.vorab dt { color: var(--muted); }
.vorab dd { margin: 0; }
main { max-width: 1320px; margin: 0 auto; padding: 20px 20px 60px; }
.intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 4px 0 14px; }
.intro h1, .intro h2 { margin: 0; font: 700 26px/1.15 var(--font-display); }
.intro p { margin: 0; color: var(--muted); max-width: 760px; }
.filters {
  display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.fgroup { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fgroup > span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.2;
}
.chip:hover { border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); display: inline-block; }
.chip[aria-pressed="true"].tc { background: var(--c); border-color: var(--c); color: #fff; }
.chip[aria-pressed="true"].tc i { background: #fff; }
.results {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin: 16px 2px 14px;
}
.results strong { font: 600 15px var(--font-display); }
.results .spacer { flex: 1; }
.results select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 10px; font-size: 13.5px; cursor: pointer;
}
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 13.5px; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow), 0 14px 30px rgba(0, 0, 0, .10); }
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.stage {
  position: relative; aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 52%, var(--ring) 52.5% 53.5%, transparent 54% 66%, var(--ring) 66.5% 67.3%, transparent 67.8%),
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--tc, var(--faint)) 22%, var(--stage-a)) 0%, var(--stage-b) 72%);
  display: grid; place-items: center;
}
.stage img { width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; }
.stage .code {
  position: absolute; left: 8px; top: 8px;
  font: 700 11.5px/1 var(--font-display); letter-spacing: .04em;
  padding: 4px 7px; border-radius: 7px; background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.stage .abbr {
  position: absolute; right: 8px; top: 8px; min-width: 30px; text-align: center;
  font: 700 16px/1 var(--font-display); padding: 6px 7px; border-radius: 9px;
  background: var(--text); color: var(--bg);
}
.stage .spinl {
  position: absolute; right: 8px; bottom: 8px; font-size: 11.5px; font-weight: 700;
  padding: 3px 7px; border-radius: 7px; background: var(--x); color: #fff;
}
.body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.name { font: 600 15.5px/1.2 var(--font-display); letter-spacing: .01em; overflow-wrap: anywhere; }
.alt { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sub { font-size: 12.5px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 7px; }
.tb {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  padding: 3px 8px 3px 7px; border-radius: 999px; line-height: 1.2;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.tb i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.atk { --c: var(--atk); --tc: var(--atk); }
.def { --c: var(--def); --tc: var(--def); }
.sta { --c: var(--sta); --tc: var(--sta); }
.bal { --c: var(--bal); --tc: var(--bal); }
.lc {
  font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; line-height: 1.2;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); color: var(--c);
}
.lc.bx { --c: var(--bx); } .lc.ux { --c: var(--ux); } .lc.cx { --c: var(--cx); }
.flag { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; line-height: 1.2; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.flag.soon { background: var(--x); color: #fff; border-color: var(--x); }
.kchip { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; line-height: 1.2; color: var(--kc); background: color-mix(in srgb, var(--kc) 12%, transparent); }
.k-lock { --kc: var(--k-lock); } .k-blade { --kc: var(--k-blade); } .k-over { --kc: var(--k-over); }
.k-assist { --kc: var(--k-assist); } .k-ratchet { --kc: var(--k-ratchet); } .k-bit { --kc: var(--k-bit); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.backdrop { position: absolute; inset: 0; background: rgba(5, 8, 15, .62); backdrop-filter: blur(3px); }
.dialog {
  position: relative; width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg);
}
.dlg-nav { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end; gap: 6px; padding: 10px 10px 0; height: 0; }
.dlg-nav button {
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.dlg-nav button:hover { border-color: var(--border-strong); }
.dlg-nav button:disabled { opacity: .35; cursor: default; }
.dlg-nav svg { width: 18px; height: 18px; }
.detail { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.d-media {
  position: relative; padding: 28px; min-height: 420px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 46%, transparent 0 40%, var(--ring) 40.4% 41%, transparent 41.4% 56%, var(--ring) 56.4% 57%, transparent 57.4%),
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc, var(--faint)) 26%, var(--stage-a)) 0%, var(--stage-b) 75%);
}
.d-media img { width: 100%; max-width: 420px; aspect-ratio: 1 / 1; object-fit: contain; mix-blend-mode: multiply; }
.d-media .cap { color: #4a5368; }
.d-media .cap { font-size: 12px; color: var(--muted); }
.d-info { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.d-head .kind { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-right: 130px; }
.d-head h1, .d-head h2 { margin: 6px 0 2px; font: 700 32px/1.1 var(--font-display); overflow-wrap: anywhere; }
.d-head .alt { font-size: 14px; }
.d-head .meta { margin-top: 10px; padding-top: 0; }
.sec h3 {
  margin: 0 0 8px; font: 700 12px/1 var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--faint);
}
.sec p { margin: 0; }
.lead { font-size: 16px; line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin: 0; }
.facts div { background: var(--surface); padding: 9px 12px; min-width: 0; }
.facts dt { font-size: 11.5px; color: var(--muted); margin: 0 0 2px; }
.facts dd { margin: 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.info-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.info-box b { color: var(--text); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; }
.bar .track { height: 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; background: var(--c, var(--accent)); }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--faint); margin-top: 6px; }
.quote { border-left: 3px solid var(--border-strong); padding: 2px 0 2px 12px; color: var(--muted); font-style: italic; font-size: 14px; }
.decode { display: flex; flex-wrap: wrap; gap: 6px; }
.dc {
  text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-width: 64px;
  padding: 8px 12px 9px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--kc) 55%, transparent);
  background: color-mix(in srgb, var(--kc) 9%, var(--surface));
}
.dc:hover { background: color-mix(in srgb, var(--kc) 17%, var(--surface)); }
.dc b { font: 700 20px/1 var(--font-display); color: var(--kc); }
.dc small { font-size: 11.5px; color: var(--muted); }
.plist { display: grid; gap: 8px; }
.prow {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; text-decoration: none;
  padding: 8px 12px 8px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.prow:hover { border-color: var(--border-strong); background: var(--surface-2); }
.prow .pi { width: 62px; height: 62px; border-radius: 11px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, var(--stage-a), var(--stage-b)); }
.prow .pi img { width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.prow .pt { min-width: 0; }
.prow .pt .top-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prow .pt strong { font: 600 15px/1.2 var(--font-display); }
.prow .pt p { margin: 3px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow .chev { color: var(--faint); }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.mini {
  text-decoration: none; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface);
  display: flex; flex-direction: column;
}
.mini:hover { border-color: var(--border-strong); }
.mini .mi { aspect-ratio: 1 / 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, var(--stage-a), var(--stage-b)); }
.mini .mi img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.mini span { font-size: 12px; font-weight: 600; padding: 6px 8px 7px; line-height: 1.25; overflow-wrap: anywhere; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--accent); }
details.more ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); columns: 2; column-gap: 24px; }
details.more li { break-inside: avoid; margin-bottom: 3px; }
.ext { font-size: 13px; color: var(--muted); }
.ext a { color: var(--accent); }

/* ---------- Grundlagen ---------- */
.basics { display: grid; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 4px; font: 700 21px/1.2 var(--font-display); }
.panel > p.lede { margin: 0 0 16px; color: var(--muted); }
.panel p { margin: 0 0 10px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.explode { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.explode .ex {
  flex: 1 1 120px; max-width: 170px; text-decoration: none; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.explode .ex .exi { width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, var(--stage-a), var(--stage-b)); border: 1px solid var(--border); }
.explode .ex img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.nw { white-space: nowrap; }
.explode .ex b { font: 600 14px var(--font-display); }
.explode .ex small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.explode .op { font: 700 26px var(--font-display); color: var(--faint); }
.type-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.type-card { border-radius: 16px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.type-card h4 { margin: 0 0 2px; font: 700 18px var(--font-display); color: var(--c); }
.type-card .en { font-size: 12px; color: var(--muted); font-weight: 600; }
.type-card p { margin: 8px 0 0; font-size: 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.t th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
table.t td b { font-family: var(--font-display); }
.pts { font: 700 22px var(--font-display); color: var(--accent); white-space: nowrap; }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; }
.gloss div { padding: 8px 0; border-bottom: 1px solid var(--border); }
.gloss dt { font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.gloss dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rec { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); text-decoration: none; display: block; }
a.rec:hover { border-color: var(--border-strong); }
.rec small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.rec b { display: block; font: 700 22px/1.2 var(--font-display); margin-top: 4px; }
.rec span { font-size: 13px; color: var(--muted); }
.lines3 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.linecard { border-radius: 16px; padding: 14px 16px; border-top: 5px solid var(--c); background: var(--surface-2); }
.linecard h4 { margin: 0; font: 700 17px var(--font-display); }
.linecard .en { font-size: 12px; font-weight: 700; color: var(--c); }
.linecard p { margin: 8px 0 0; font-size: 14px; }
.combo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.combo a { text-decoration: none; }
.kbd { font: 600 12px var(--font-display); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }

footer { max-width: 1320px; margin: 0 auto; padding: 24px 20px 40px; color: var(--faint); font-size: 12.5px; border-top: 1px solid var(--border); }
footer a { color: var(--muted); }
footer p { margin: 0 0 8px; }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 12px; font-size: 13.5px; font-weight: 600; }
.legal-links .linkbtn { color: var(--muted); text-decoration: underline; font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .type-cards, .lines3, .combo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; }
  .d-media { border-right: 0; border-bottom: 1px solid var(--border); min-height: 0; padding: 48px 20px 20px; }
  .d-media img { max-width: 300px; }
}
@media (max-width: 720px) {
  .top-inner { padding: 10px 16px 0; }
  .brand .logo img { height: 48px; }
  .brand p { display: none; }
  .tools { width: 100%; }
  .search { min-width: 0; flex: 1 1 100%; order: -1; }
  .tabs { padding: 6px 16px 0; }
  .tabs:empty { min-height: 49px; }
  .tab { padding: 9px 10px 11px; font-size: 14px; }
  main { padding: 16px 16px 48px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
  .filters { padding: 12px; gap: 12px; }
  .two, .gloss { grid-template-columns: 1fr; }
  .type-cards, .lines3, .combo { grid-template-columns: 1fr; }
  .modal { padding: 0; }
  .dialog { max-height: 100vh; height: 100%; border-radius: 0; }
  .d-info { padding: 20px 16px 28px; }
  .d-head h1, .d-head h2 { font-size: 26px; }
  .d-head .kind { padding-right: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  details.more ul { columns: 1; }
  .panel { padding: 18px 16px; }
  footer { padding: 20px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
