/* Velora Wiki – ruhiger Stil der Website (schwarz, violett), ohne Animationen und ohne Unschärfe-Filter */
:root {
  --grund: #0b0912;
  --flaeche: #141021;
  --flaeche2: #1c1630;
  --rand: rgba(139, 92, 246, 0.22);
  --rand-stark: rgba(139, 92, 246, 0.45);
  --text: #ece9f5;
  --gedimmt: #a59cc4;
  --violett: #8b5cf6;
  --violett-hell: #c4b5fd;
  --gruen: #4ade80;
  --rot: #f87171;
  --gelb: #facc15;
  --schrift: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --breite: 1240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text); font: 16px/1.6 var(--schrift);
  background-image: radial-gradient(1200px 500px at 10% -10%, rgba(139, 92, 246, .14), transparent 70%);
  background-repeat: no-repeat; overflow-x: hidden;
}
a { color: var(--violett-hell); text-decoration: none; }
a:hover, a:focus-visible { color: #fff; text-decoration: underline; }
:focus-visible { outline: 2px solid var(--violett); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; margin: 1.4em 0 .5em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-top: 0; letter-spacing: .01em; }
h2 { font-size: 1.35rem; padding-bottom: .3em; border-bottom: 1px solid var(--rand); }
h3 { font-size: 1.1rem; color: var(--violett-hell); }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: .2em 0; }
code, kbd { font-family: Consolas, "Cascadia Mono", monospace; }
kbd {
  display: inline-block; min-width: 1.9em; padding: .05em .45em; text-align: center; font-size: .9em; font-weight: 600;
  background: var(--flaeche2); border: 1px solid var(--rand-stark); border-bottom-width: 3px; border-radius: 6px; color: #fff; white-space: nowrap;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf ---------- */
.kopf { position: sticky; top: 0; z-index: 20; background: rgba(11, 9, 18, .96); border-bottom: 1px solid var(--rand); }
.kopf__innen { max-width: var(--breite); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.kopf__logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; flex: 0 0 auto; }
.kopf__logo:hover { text-decoration: none; color: #fff; }
.kopf__logo img { width: 120px; height: auto; display: block; }
.kopf__logo span { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--violett-hell); border-left: 1px solid var(--rand-stark); padding-left: 10px; }
.kopf__links { display: flex; gap: 14px; margin-left: auto; font-size: .92rem; flex: 0 0 auto; }
.suche { position: relative; flex: 1 1 320px; max-width: 460px; }
.suche input {
  width: 100%; padding: 9px 12px 9px 36px; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--rand-stark); border-radius: 10px;
}
.suche input::placeholder { color: var(--gedimmt); }
.suche svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--gedimmt); pointer-events: none; }
.treffer {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(70vh, 520px); overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--flaeche); border: 1px solid var(--rand-stark); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.treffer li { margin: 0; }
.treffer a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--text); }
.treffer a:hover, .treffer a[aria-selected="true"] { background: var(--flaeche2); text-decoration: none; }
.treffer b { display: block; font-weight: 600; }
.treffer small { color: var(--gedimmt); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treffer .art { float: right; font-size: .75rem; color: var(--violett-hell); margin-left: 8px; }
.treffer .leer { padding: 10px; color: var(--gedimmt); }

/* ---------- Gerüst ---------- */
.geruest { max-width: var(--breite); margin: 0 auto; padding: 24px 16px 40px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; }
.seitenleiste { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow-y: auto; font-size: .95rem; }
.seitenleiste summary { display: none; }
.seitenleiste ul { list-style: none; padding: 0; margin: 0; }
.seitenleiste li { margin: 0; }
.seitenleiste a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--gedimmt); }
.seitenleiste a:hover { background: var(--flaeche); color: #fff; text-decoration: none; }
.seitenleiste a[aria-current="page"] { background: var(--flaeche2); color: #fff; box-shadow: inset 3px 0 0 var(--violett); }
main { min-width: 0; }
.pfad { font-size: .85rem; color: var(--gedimmt); margin-bottom: 10px; }
.pfad a { color: var(--gedimmt); }
.einleitung { color: var(--gedimmt); font-size: 1.05rem; max-width: 70ch; }

/* ---------- Bausteine ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.kachel { display: block; padding: 16px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; color: var(--text); }
.kachel:hover { border-color: var(--rand-stark); background: var(--flaeche2); text-decoration: none; color: #fff; }
.kachel b { display: block; font-size: 1.05rem; margin-bottom: 4px; color: #fff; }
.kachel span { color: var(--gedimmt); font-size: .92rem; }
.kachel .zahl { float: right; color: var(--violett-hell); font-weight: 700; }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; }
.karte > h3:first-child, .karte > h2:first-child { margin-top: 0; }
.fakten { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 6px 18px; margin: 0 0 1em; }
.fakten dt { color: var(--gedimmt); }
.fakten dd { margin: 0; overflow-wrap: anywhere; }
.marke { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--rand-stark); color: var(--violett-hell); white-space: nowrap; vertical-align: middle; }
.marke--rot { color: var(--rot); border-color: rgba(248, 113, 113, .5); }
.marke--gruen { color: var(--gruen); border-color: rgba(74, 222, 128, .45); }
.marke--gelb { color: var(--gelb); border-color: rgba(250, 204, 21, .45); }
.schritte { counter-reset: s; list-style: none; padding: 0; }
.schritte > li { counter-increment: s; position: relative; padding: 0 0 0 44px; margin: 0 0 16px; }
.schritte > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--flaeche2); border: 1px solid var(--rand-stark); font-weight: 700; color: var(--violett-hell);
}
.hinweis { color: var(--gedimmt); font-size: .92rem; }
.spalten2 { columns: 2 260px; column-gap: 28px; }
.spalten2 > * { break-inside: avoid; }

/* ---------- Tabellen ---------- */
.tabelle { width: 100%; overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(139, 92, 246, .12); }
th { color: var(--violett-hell); font-weight: 600; background: var(--flaeche2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.zahl, th.zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: rgba(139, 92, 246, .06); }
tr:target td { background: rgba(139, 92, 246, .18); }

/* ---------- Gegenstände ---------- */
.gegenstaende { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 0 0 1.4em; }
.gegenstand { display: flex; gap: 12px; padding: 12px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; scroll-margin-top: 90px; }
.gegenstand:target { border-color: var(--violett); background: var(--flaeche2); }
.gegenstand__bild { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; background: var(--flaeche2); display: grid; place-items: center; overflow: hidden; }
.gegenstand__bild img { width: 56px; height: 56px; object-fit: contain; }
.gegenstand__bild i { font-style: normal; font-size: 1.3rem; color: var(--gedimmt); }
.gegenstand b { display: block; color: #fff; }
.gegenstand p { margin: 2px 0 4px; font-size: .9rem; color: var(--gedimmt); }
.gegenstand small { display: block; font-size: .82rem; color: var(--gedimmt); }
.gegenstand small + small { margin-top: 2px; }

/* ---------- Filter ---------- */
.filter { width: 100%; max-width: 360px; padding: 8px 12px; font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--rand-stark); border-radius: 10px; margin: 0 0 14px; }
.inhalt-liste { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.inhalt-liste a { display: inline-block; padding: 4px 10px; border: 1px solid var(--rand); border-radius: 999px; font-size: .88rem; }
[id] { scroll-margin-top: 84px; }

/* ---------- Regeln ---------- */
.regeltext h2 { margin-top: 1.6em; }
.regeltext p { max-width: 80ch; }

/* ---------- Fuß ---------- */
.fuss { border-top: 1px solid var(--rand); color: var(--gedimmt); font-size: .88rem; }
.fuss__innen { max-width: var(--breite); margin: 0 auto; padding: 22px 16px 30px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.fuss__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fuss p { margin: 0; flex: 1 1 100%; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .geruest { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 14px; }
  .seitenleiste { position: static; max-height: none; margin: 0 0 18px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; }
  .seitenleiste summary { display: block; padding: 10px 14px; cursor: pointer; font-weight: 600; list-style: none; }
  .seitenleiste summary::-webkit-details-marker { display: none; }
  .seitenleiste summary::after { content: "▾"; float: right; color: var(--gedimmt); }
  .seitenleiste[open] summary::after { content: "▴"; }
  .seitenleiste ul { padding: 0 6px 8px; }
}
@media (max-width: 640px) {
  .kopf__innen { flex-wrap: wrap; gap: 10px; }
  .kopf__links { margin-left: auto; gap: 12px; font-size: .88rem; }
  .suche { flex: 1 1 100%; max-width: none; order: 3; }
  [id], .gegenstand { scroll-margin-top: 130px; }
  .kopf__logo img { width: 100px; }
  .fakten { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fakten dt { margin-top: 8px; }
  .gegenstaende { grid-template-columns: minmax(0, 1fr); }
  th, td { padding: 7px 9px; }
  /* Breite Tabellen werden auf dem Handy zu Karten */
  .stapel thead { display: none; }
  .stapel, .stapel tbody, .stapel tr, .stapel td { display: block; width: 100%; }
  .stapel tr { padding: 8px 0; border-bottom: 1px solid rgba(139, 92, 246, .16); }
  .stapel tr:last-child { border-bottom: 0; }
  .stapel td { border: 0; padding: 2px 12px; text-align: left !important; white-space: normal !important; }
  .stapel td[data-k]::before { content: attr(data-k) ": "; color: var(--gedimmt); }
  .stapel td:first-child { font-weight: 600; color: #fff; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .kopf, .seitenleiste, .fuss { display: none; } body { background: #fff; color: #000; } .geruest { display: block; } }
