/* ============================================================
   Bomberbude Wiki – Stylesheet
   Übernimmt die Gestaltung von bomberbude.de: dunkles Navy mit
   zwei Radial-Glows, Glas-Panels, Orange-Verlauf, große Radien.
   Farben und Radien stehen als Variablen ganz oben – ändert sich
   das Design der Hauptseite, ziehst du hier nur die Werte nach.
   Keine externen CDNs, keine Google-Fonts-Einbindung.
   ============================================================ */

:root {
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;

  --primaer: #ff7a18;
  --primaer-2: #ffb347;
  --erfolg: #4ade80;
  --gefahr: #fb7185;
  --info: #6ea8ff;

  /* Seitenbreite: Kopfzeile, Inhalt und Fußzeile teilen sich diese Werte,
     damit alles auf derselben Kante steht (wie .container auf bomberbude.de). */
  --kopf-hoehe: 78px;
  --breite-seite: 1180px;   /* identisch zu --container auf bomberbude.de */
  --rand-seite: max(16px, calc((100% - var(--breite-seite)) / 2));

  --radius-xl: 28px;
  --radius-gross: 20px;
  --radius: 14px;
  --tempo: .18s ease;
}

/* ---------------------------------------------------------- Dunkel (Standard, wie bomberbude.de) */

html[data-schema="dunkel"] {
  --grund: #0b1020;
  --grund-verlauf:
    radial-gradient(circle at top left, rgba(255, 122, 24, .22), transparent 30%),
    radial-gradient(circle at top right, rgba(83, 145, 255, .18), transparent 26%),
    linear-gradient(180deg, #060913 0%, #0b1020 45%, #090d19 100%);
  --flaeche: rgba(18, 27, 52, .78);
  --flaeche-hoch: rgba(255, 255, 255, .06);
  --flaeche-still: rgba(255, 255, 255, .05);
  --kante: rgba(255, 255, 255, .1);
  --kante-leise: rgba(255, 255, 255, .08);
  --schrift: #eef3ff;
  --schrift-leise: #9aa7c7;
  --akzent: var(--primaer);
  --akzent-hell: #ffc690;
  --akzent-schrift: #08101f;
  --code-schrift: #ffd7b6;
  --kopf-grund: rgba(7, 10, 20, .7);
  --schatten: 0 20px 60px rgba(0, 0, 0, .35);
  --schatten-knopf: 0 14px 34px rgba(255, 122, 24, .3);
}

/* ---------------------------------------------------------- Hell */

html[data-schema="hell"] {
  --grund: #f5f7fc;
  --grund-verlauf:
    radial-gradient(circle at top left, rgba(255, 122, 24, .12), transparent 30%),
    radial-gradient(circle at top right, rgba(83, 145, 255, .1), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fc 45%, #eef1f8 100%);
  --flaeche: rgba(255, 255, 255, .86);
  --flaeche-hoch: rgba(11, 16, 32, .05);
  --flaeche-still: rgba(11, 16, 32, .04);
  --kante: rgba(11, 16, 32, .12);
  --kante-leise: rgba(11, 16, 32, .09);
  --schrift: #101733;
  --schrift-leise: #5c6785;
  --akzent: #d35f0c;
  --akzent-hell: #a2520d;
  --akzent-schrift: #fff8f1;
  --code-schrift: #b4550c;
  --kopf-grund: rgba(255, 255, 255, .78);
  --schatten: 0 18px 44px rgba(16, 23, 51, .1);
  --schatten-knopf: 0 12px 28px rgba(255, 122, 24, .25);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--grund-verlauf), var(--grund);
  background-attachment: fixed;
  color: var(--schrift);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; }

button, input, select, textarea { font: inherit; }

:focus-visible { outline: 2px solid var(--primaer-2); outline-offset: 2px; border-radius: 6px; }

.ueberspringen {
  position: absolute; left: -999px; top: 0; z-index: 100;
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0;
  background: linear-gradient(135deg, var(--primaer), var(--primaer-2)); color: var(--akzent-schrift);
}
.ueberspringen:focus { left: 0; }

/* ---------------------------------------------------------- Kopfzeile */

.kopf {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  min-height: 78px;
  padding: .7rem var(--rand-seite);
  background: var(--kopf-grund);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--kante);
}

.marke { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; color: inherit; }
.marke:hover { text-decoration: none; }

.marke__zeichen {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 16px;
  font: 800 15px/1 var(--sans); letter-spacing: .04em;
  color: var(--akzent-schrift);
  background: linear-gradient(135deg, var(--primaer), var(--primaer-2));
  box-shadow: var(--schatten-knopf);
}

.marke__bild {
  width: 48px; height: 48px; border-radius: 18px; object-fit: cover;
  background: var(--flaeche-hoch); border: 1px solid var(--kante-leise);
  box-shadow: var(--schatten);
}

.kopf__netz { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kopf__netz a {
  padding: 10px 14px; border-radius: 999px;
  color: var(--schrift-leise); font-size: .92rem;
  transition: background var(--tempo), color var(--tempo);
}
.kopf__netz a:hover { color: var(--schrift); background: var(--flaeche-hoch); text-decoration: none; }

.marke__text { display: flex; flex-direction: column; }
.marke__text strong { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.marke__text small { color: var(--schrift-leise); font-size: .9rem; }

/* Suche: zusammengeklappt nur ein Lupensymbol, beim Anklicken fährt das Feld auf. */
.suchfeld {
  position: relative; display: flex; align-items: center; justify-content: flex-end;
  flex: 0 0 auto; margin-left: auto;
  width: 44px;
  transition: width .22s ease;
}
.suchfeld.ist-offen { width: min(340px, 42vw); flex: 1 1 auto; }

.suchfeld__knopf {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--kante-leise); border-radius: var(--radius);
  background: var(--flaeche-hoch); color: var(--schrift-leise);
  cursor: pointer; z-index: 2;
  transition: color var(--tempo), background var(--tempo), border-color var(--tempo);
}
.suchfeld__knopf:hover { color: var(--schrift); border-color: rgba(255, 179, 71, .4); }
.suchfeld.ist-offen .suchfeld__knopf {
  border-color: transparent; background: transparent; pointer-events: none;
}

.suchfeld input[type="search"] {
  width: 100%; height: 44px;
  /* Platz links für die Lupe, rechts für das Tastenkürzel.
     Wichtig: höhere Gewichtung als die allgemeine Formularregel weiter unten,
     sonst schiebt sich der Text unter das Symbol. */
  padding: 0 40px 0 46px;
  background: var(--flaeche-hoch); color: var(--schrift);
  border: 1px solid var(--kante-leise); border-radius: var(--radius);
  outline: none; font-size: .95rem;
  opacity: 0; pointer-events: none;
  transition: border-color var(--tempo), opacity .18s ease;
}
.suchfeld.ist-offen input[type="search"] { opacity: 1; pointer-events: auto; }
.suchfeld input[type="search"]::placeholder { color: var(--schrift-leise); }
.suchfeld input[type="search"]:focus { border-color: rgba(255, 179, 71, .5); }
.suchfeld input[type="search"]::-webkit-search-cancel-button { filter: invert(.6); }

.suchfeld kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  padding: 2px 8px; border-radius: 999px;
  font: 600 .74rem var(--mono); color: var(--schrift-leise);
  border: 1px solid var(--kante-leise); background: var(--flaeche-still);
  pointer-events: none; opacity: 0; transition: opacity .18s ease;
}
.suchfeld.ist-offen kbd { opacity: 1; }
.suchfeld.ist-offen input:focus ~ kbd { opacity: 0; }

.kopf__rechts { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* Sprachwahl: zwei Pillen wie auf bomberbude.de, aktive Sprache angeleuchtet. */
.sprachwahl { display: inline-flex; align-items: center; gap: 8px; }
.sprachwahl a {
  display: inline-grid; place-items: center;
  min-width: 44px; height: 44px; padding: 0 14px;
  border-radius: 999px;
  font-size: .88rem; font-weight: 600; letter-spacing: .04em;
  color: var(--schrift); background: var(--flaeche-hoch);
  border: 1px solid var(--kante-leise);
  transition: transform var(--tempo), background var(--tempo), border-color var(--tempo);
}
.sprachwahl a:hover { transform: translateY(-1px); text-decoration: none; border-color: rgba(255, 179, 71, .4); }
.sprachwahl a.ist-aktiv {
  background: linear-gradient(135deg, rgba(255, 122, 24, .24), rgba(255, 179, 71, .18));
  border-color: rgba(255, 179, 71, .5);
}
.kopf__menue { display: none; }

/* Konto */
.konto { position: relative; }
.konto summary {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px; cursor: pointer; list-style: none;
  background: var(--flaeche-hoch); border: 1px solid var(--kante-leise);
  transition: transform var(--tempo);
}
.konto summary:hover { transform: translateY(-1px); }
.konto summary::-webkit-details-marker { display: none; }
.konto__kuerzel {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primaer), var(--primaer-2));
  color: var(--akzent-schrift); font: 700 .76rem var(--sans);
}
.konto__name { font-size: .92rem; }
.konto__klappe {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px; z-index: 60;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--flaeche); backdrop-filter: blur(18px);
  border: 1px solid var(--kante); border-radius: var(--radius-gross); box-shadow: var(--schatten);
}
.konto__klappe a, .konto__klappe button {
  display: block; width: 100%;
  padding: 11px 16px; text-align: left; background: none; border: 0;
  font: inherit; color: var(--schrift); cursor: pointer;
}
/* "Abmelden" steckt in einem Formular – ohne das hier wäre der Knopf nur so
   breit wie sein Text und die Hervorhebung endete mitten im Menü. */
.konto__klappe form { display: block; margin: 0; }
.konto__klappe a:hover, .konto__klappe button:hover { background: var(--flaeche-hoch); text-decoration: none; }
.konto__klappe a + a, .konto__klappe form { border-top: 1px solid var(--kante-leise); }
.konto__rolle {
  padding: 10px 16px; font: 700 .72rem var(--sans); text-transform: uppercase;
  letter-spacing: .12em; color: var(--akzent-hell); border-bottom: 1px solid var(--kante);
}

/* ---------------------------------------------------------- Knöpfe */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius); border: 1px solid var(--kante-leise);
  background: var(--flaeche-hoch); color: var(--schrift);
  font-weight: 600; font-size: .93rem; cursor: pointer;
  transition: transform var(--tempo), box-shadow var(--tempo), border-color var(--tempo), background var(--tempo);
}
.knopf:hover { transform: translateY(-1px); text-decoration: none; border-color: rgba(255, 179, 71, .4); }
.knopf--haupt {
  background: linear-gradient(135deg, var(--primaer), var(--primaer-2));
  border-color: transparent; color: var(--akzent-schrift);
  box-shadow: var(--schatten-knopf);
}
.knopf--still { background: transparent; border-color: var(--kante-leise); color: var(--schrift-leise); }
.knopf--still:hover { color: var(--schrift); background: var(--flaeche-hoch); }
.knopf--gefahr { color: #ffb3c1; background: rgba(251, 113, 133, .12); border-color: rgba(251, 113, 133, .3); }
.knopf--gefahr:hover { background: rgba(251, 113, 133, .2); }
.knopf--klein { padding: 8px 14px; font-size: .84rem; border-radius: 999px; }

/* ---------------------------------------------------------- Raster */

.rahmen {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  width: min(calc(100% - 32px), var(--breite-seite));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.inhalt { min-width: 0; animation: auftauchen .3s ease-out; }

@keyframes auftauchen { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- Navigation */

.navigation {
  position: sticky; top: 96px; align-self: start;
  max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 6px 16px 12px;
  background: var(--flaeche); backdrop-filter: blur(18px);
  border: 1px solid var(--kante); border-radius: var(--radius-xl);
  box-shadow: var(--schatten);
  font-size: .93rem;
  scrollbar-width: thin;
}
.navigation ul { list-style: none; margin: 0; padding: 0; }
.navigation a {
  display: block; padding: 9px 14px; border-radius: 999px;
  color: var(--schrift-leise); transition: background var(--tempo), color var(--tempo);
}
.navigation a:hover { color: var(--schrift); background: var(--flaeche-hoch); text-decoration: none; }
.navigation a.ist-aktiv {
  color: var(--schrift); font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 122, 24, .24), rgba(255, 179, 71, .18));
  border: 1px solid rgba(255, 179, 71, .5);
  padding: 8px 13px;
}
.navigation__schnell { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--kante); }
.navigation__gruppe { margin-bottom: 18px; }
.navigation__titel {
  font: 700 .72rem/1.6 var(--sans) !important;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--akzent-hell) !important;
  padding: 4px 14px !important;
}
.navigation__gruppe ul a { padding-left: 22px; font-size: .9rem; }
.navigation__leer { padding: 4px 22px; color: var(--schrift-leise); font-size: .84rem; opacity: .7; }
.navigation__netz { display: none; }
.navigation__anlegen { margin-top: 8px; color: var(--akzent) !important; font-weight: 600; }
.stift { color: var(--primaer-2); }
.navigation__schatten { display: none; }

/* Scrollleisten dezent */
/* Scrollleisten bleiben unsichtbar, bis man den Bereich anfasst – sonst
   zerschneidet der helle Balken die abgerundete Kante der Panels.
   Der Greifer ist über background-clip nach innen gesetzt, damit er schmal
   wirkt und den Rand nicht berührt. */
.navigation, .artikel-spalte, .editor__seite {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.navigation:hover, .navigation:focus-within,
.artikel-spalte:hover, .artikel-spalte:focus-within,
.editor__seite:hover, .editor__seite:focus-within {
  scrollbar-color: color-mix(in srgb, var(--schrift-leise) 45%, transparent) transparent;
}

.navigation::-webkit-scrollbar, .artikel-spalte::-webkit-scrollbar,
.editor__seite::-webkit-scrollbar, .tabellenrahmen::-webkit-scrollbar,
.tabelle-rahmen::-webkit-scrollbar, pre.code::-webkit-scrollbar { width: 10px; height: 10px; }

.navigation::-webkit-scrollbar-track, .artikel-spalte::-webkit-scrollbar-track,
.editor__seite::-webkit-scrollbar-track, .tabellenrahmen::-webkit-scrollbar-track,
.tabelle-rahmen::-webkit-scrollbar-track, pre.code::-webkit-scrollbar-track { background: transparent; }

.navigation::-webkit-scrollbar-thumb, .artikel-spalte::-webkit-scrollbar-thumb,
.editor__seite::-webkit-scrollbar-thumb {
  background: transparent;
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
  transition: background var(--tempo);
}
.navigation:hover::-webkit-scrollbar-thumb, .navigation:focus-within::-webkit-scrollbar-thumb,
.artikel-spalte:hover::-webkit-scrollbar-thumb, .artikel-spalte:focus-within::-webkit-scrollbar-thumb,
.editor__seite:hover::-webkit-scrollbar-thumb, .editor__seite:focus-within::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--schrift-leise) 40%, transparent);
  background-clip: content-box;
}

.tabellenrahmen::-webkit-scrollbar-thumb,
.tabelle-rahmen::-webkit-scrollbar-thumb, pre.code::-webkit-scrollbar-thumb {
  background: var(--kante); border-radius: 999px;
}

/* ---------------------------------------------------------- Panels */

.bau, .kasten, .karte, .liste, .steckbrief, .tabellenrahmen, .kachel, .vorschau,
.editor__seite, .diff, .bilderraster figure {
  background: var(--flaeche);
  border: 1px solid var(--kante);
  box-shadow: var(--schatten);
  backdrop-filter: blur(18px);
}

/* ---------------------------------------------------------- Meldungen */

.meldung {
  margin-bottom: 1.4rem; padding: 14px 18px;
  border-radius: var(--radius); border: 1px solid var(--kante-leise);
  background: var(--flaeche-still); color: var(--schrift-leise);
}
.meldung--erfolg { color: #a7f3c8; border-color: rgba(74, 222, 128, .28); background: rgba(74, 222, 128, .1); }
.meldung--fehler { color: #ffc0cb; border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .1); }
.meldung--hinweis { color: #ffd69b; border-color: rgba(255, 179, 71, .28); background: rgba(255, 179, 71, .1); }

/* ---------------------------------------------------------- Seitenkopf */

.seitenkopf { margin-bottom: 1.8rem; }
.krume { font-size: .9rem; color: var(--schrift-leise); margin-bottom: .6rem; }
.krume a { color: var(--schrift-leise); }
.krume a:hover { color: var(--schrift); }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.08; margin: 0 0 .5rem; font-weight: 800; }
.seitenkopf__unterzeile { color: var(--schrift-leise); font-size: 1.02rem; line-height: 1.7; max-width: 70ch; margin: 0; }
.seitenkopf__leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 1.1rem; }

/* Badges */
.etikett {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  font-size: .84rem; font-weight: 600;
  border: 1px solid var(--kante-leise);
  background: var(--flaeche-still); color: var(--schrift-leise);
}
.etikett--funktion { background: rgba(110, 168, 255, .14); color: #bad6ff; }
.etikett--tutorial { background: rgba(255, 179, 71, .14); color: #ffd69b; }
.etikett--entwurf  { background: rgba(251, 113, 133, .14); color: #ffb3c1; }
.etikett--intern   { background: rgba(251, 113, 133, .14); color: #ffb3c1; }

/* Pack-Marken – Farbe kommt je Pack über --pack */
.packs { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.pack {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: 999px;
  font: 700 .76rem/1.4 var(--sans); letter-spacing: .06em;
  color: var(--pack, var(--primaer-2));
  background: color-mix(in srgb, var(--pack, var(--primaer-2)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--pack, var(--primaer-2)) 38%, transparent);
}

/* ---------------------------------------------------------- Steckbrief */

.steckbrief { border-radius: var(--radius-xl); overflow: hidden; margin: 0 0 2rem; }
.steckbrief__befehl {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--kante);
  background: var(--flaeche-still);
  font: 700 clamp(1.05rem, 2.4vw, 1.5rem)/1.4 var(--mono);
  color: var(--code-schrift);
  word-break: break-all;
}
.steckbrief__zeilen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.steckbrief__zelle { padding: 18px 24px; }
.steckbrief__zelle + .steckbrief__zelle { border-left: 1px solid var(--kante); }
.steckbrief__marke {
  display: block; margin-bottom: 6px;
  font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .12em;
  color: var(--schrift-leise);
}
.steckbrief__wert { font-size: 1.02rem; font-weight: 600; }

/* ---------------------------------------------------------- Artikel */

.artikel { font-size: 1.02rem; line-height: 1.75; }
.artikel > *:first-child { margin-top: 0; }
.artikel p { margin: 0 0 1.15rem; }
.artikel h2 {
  font-size: 1.55rem; font-weight: 700; line-height: 1.25;
  margin: 2.6rem 0 .9rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--kante);
}
.artikel h3 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .6rem; }
.artikel h4 { font-size: 1.02rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--akzent-hell); }
.artikel ul, .artikel ol { margin: 0 0 1.15rem; padding-left: 1.5rem; color: var(--schrift-leise); }
.artikel li { margin-bottom: .45rem; line-height: 1.7; }
.artikel li::marker { color: var(--primaer-2); }
.artikel blockquote {
  margin: 1.4rem 0; padding: 16px 20px;
  border-radius: var(--radius); border: 1px solid var(--kante-leise);
  background: var(--flaeche-still); color: var(--schrift-leise);
}
.artikel hr { margin: 2.2rem 0; border: 0; border-top: 1px solid var(--kante); }
.artikel img { border-radius: var(--radius-gross); border: 1px solid var(--kante); }
.artikel figure { margin: 1.6rem 0; }
.artikel figcaption { margin-top: .6rem; font-size: .88rem; color: var(--schrift-leise); }
.artikel mark { background: rgba(255, 179, 71, .22); color: var(--schrift); padding: 0 .25em; border-radius: 4px; }

.artikel .anker { margin-left: .5rem; opacity: 0; font-size: .65em; color: var(--akzent); transition: opacity var(--tempo); }
.artikel h2:hover .anker, .artikel h3:hover .anker { opacity: .7; }

.artikel code {
  padding: 3px 8px; border-radius: 8px;
  font: .87em var(--mono); font-weight: 600;
  color: var(--code-schrift);
  background: var(--flaeche-hoch); border: 1px solid var(--kante-leise);
}
.artikel code.befehl { color: var(--primaer-2); }
.artikel pre.code {
  position: relative; margin: 1.4rem 0; padding: 18px 20px; overflow-x: auto;
  border-radius: var(--radius-gross); border: 1px solid var(--kante-leise);
  background: var(--flaeche-still);
}
.artikel pre.code code {
  padding: 0; background: none; border: 0; font-weight: 400;
  font-size: .9rem; line-height: 1.6; color: var(--schrift);
}
.kopieren {
  position: absolute; top: 10px; right: 10px;
  padding: 6px 12px; border-radius: 999px;
  font: 600 .76rem var(--sans); cursor: pointer;
  color: var(--schrift-leise); background: var(--flaeche-hoch);
  border: 1px solid var(--kante-leise); opacity: 0;
  transition: opacity var(--tempo);
}
pre.code:hover .kopieren, .kopieren:focus { opacity: 1; }

.wiki-link--fehlt { color: #ffb3c1; text-decoration: underline dotted; }

.tabelle-rahmen {
  overflow-x: auto; margin: 1.6rem 0;
  border: 1px solid var(--kante); border-radius: var(--radius-gross);
  background: var(--flaeche-still);
}
.artikel table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.artikel th, .artikel td { padding: 12px 16px; text-align: left; vertical-align: top; }
.artikel th {
  font: 700 .78rem var(--sans); text-transform: uppercase; letter-spacing: .1em;
  color: var(--schrift-leise); border-bottom: 1px solid var(--kante);
}
.artikel td { border-bottom: 1px solid var(--kante-leise); color: var(--schrift-leise); }
.artikel tbody tr:last-child td { border-bottom: 0; }

.aufgabe { list-style: none; margin-left: -1.2rem; }
.aufgabe--fertig { color: var(--schrift-leise); text-decoration: line-through; opacity: .7; }

/* Hinweiskästen */
.box {
  margin: 1.6rem 0; padding: 20px 22px;
  border-radius: var(--radius-gross);
  border: 1px solid rgba(255, 179, 71, .22);
  background: rgba(255, 122, 24, .08);
  font-size: .98rem;
}
.box > *:last-child { margin-bottom: 0; }
.box p { color: var(--schrift-leise); }
.box__titel {
  font: 700 .8rem var(--sans) !important; text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: .6rem !important; color: #ffd69b !important;
}
.box--hinweis { background: rgba(110, 168, 255, .09); border-color: rgba(110, 168, 255, .22); }
.box--hinweis .box__titel { color: #bad6ff !important; }
.box--warnung { background: rgba(251, 113, 133, .09); border-color: rgba(251, 113, 133, .25); }
.box--warnung .box__titel { color: #ffb3c1 !important; }
.box--regel { background: var(--flaeche-still); border-color: var(--kante); }
.box--regel .box__titel { color: var(--schrift) !important; }
.box--befehl { font-family: var(--mono); background: var(--flaeche-still); border-color: var(--kante); }

/* Sprungziele: die klebende Kopfzeile verdeckt sonst genau die Überschrift,
   auf die man gerade geklickt hat. */
.artikel [id], .artikel h2, .artikel h3, .artikel h4 {
  scroll-margin-top: calc(var(--kopf-hoehe) + 1.2rem);
}

/* Kurz aufleuchten, damit klar ist, wo man gelandet ist. */
.artikel :target {
  animation: zielMarkieren 1.6s ease-out;
}
@keyframes zielMarkieren {
  0%   { background: color-mix(in srgb, var(--primaer) 22%, transparent); }
  100% { background: transparent; }
}

/* Inhaltsverzeichnis */
.artikel-raster { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 2rem; align-items: start; }
.artikel-spalte {
  position: sticky; top: 100px; align-self: start;
  display: flex; flex-direction: column; gap: 1.2rem;
  max-height: calc(100vh - 130px); overflow-y: auto;
  scrollbar-width: thin;
}

.verzeichnis {
  padding: 18px; border-radius: var(--radius-gross);
  background: var(--flaeche-still); border: 1px solid var(--kante-leise);
  font-size: .88rem;
}
.verzeichnis strong {
  display: block; margin-bottom: .6rem;
  font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .12em;
  color: var(--akzent-hell);
}
.verzeichnis a { display: block; padding: 5px 0; color: var(--schrift-leise); }
.verzeichnis a:hover, .verzeichnis a.ist-aktiv { color: var(--akzent); text-decoration: none; }
.verzeichnis .stufe-3 { padding-left: 14px; font-size: .84rem; }
.verzeichnis--nachbarn { border-color: var(--kante); }

.artikel-fuss {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding: 20px 22px;
  border-radius: var(--radius-gross); border: 1px solid var(--kante-leise);
  background: var(--flaeche-still);
  font-size: .9rem; color: var(--schrift-leise);
}
.artikel-fuss__aktionen { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------- Karten & Listen */

.karten { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.karte {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border-radius: var(--radius-xl);
  color: var(--schrift);
  transition: transform var(--tempo), border-color var(--tempo);
}
.karte:hover { transform: translateY(-2px); border-color: rgba(255, 179, 71, .4); text-decoration: none; }
.karte__titel { font-size: 1.2rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.karte__text { color: var(--schrift-leise); font-size: .94rem; line-height: 1.65; }
.karte__fuss { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 12px; }
.karte__befehl {
  align-self: flex-start; max-width: 100%; overflow-wrap: anywhere;
  padding: 6px 12px; border-radius: 999px;
  font: 700 .82rem var(--mono); color: var(--code-schrift);
  background: var(--flaeche-hoch); border: 1px solid var(--kante-leise);
}

.abschnitt { margin: 2.6rem 0; }
.abschnitt__kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.abschnitt h2 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.abschnitt__kopf a { font-size: .92rem; color: var(--schrift-leise); }
.abschnitt__kopf a:hover { color: var(--akzent); }

/* Startseite */
.bau {
  position: relative; overflow: hidden;
  padding: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 2rem;
  border-radius: var(--radius-xl);
}
.bau::after {
  content: ""; position: absolute; inset: auto -20% -35% auto;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 24, .18), transparent 70%);
  pointer-events: none;
}
.augenbraue {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; margin-bottom: 1.1rem; border-radius: 999px;
  font-size: .9rem; color: var(--akzent-hell);
  background: var(--flaeche-hoch); border: 1px solid rgba(255, 198, 144, .16);
}
.bau h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.03; margin-bottom: .9rem; }
.bau__aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.8rem; }
.bau p { max-width: 62ch; color: var(--schrift-leise); font-size: 1.05rem; line-height: 1.7; margin: 0 0 1.6rem; }
.bau__zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.bau__zahl {
  padding: 18px; border-radius: 18px;
  background: var(--flaeche-still); border: 1px solid var(--kante-leise);
}
.bau__zahl strong { display: block; font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; }
.bau__zahl span { color: var(--schrift-leise); font-size: .92rem; }

.serverleiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; margin-top: 1.6rem; }
.serverleiste__eintrag {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;                     /* sonst sprengt langer Text die Kachel */
  padding: 14px 16px; border-radius: 18px;
  text-align: left; font: inherit; color: var(--schrift);
  background: color-mix(in srgb, var(--pack, var(--primaer)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--pack, var(--primaer)) 30%, transparent);
  transition: transform var(--tempo), border-color var(--tempo), background var(--tempo);
}
/* Kacheln mit Adresse sind Knöpfe: ein Klick kopiert sie. */
button.serverleiste__eintrag { cursor: pointer; }
button.serverleiste__eintrag:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--pack, var(--primaer)) 60%, transparent);
  background: color-mix(in srgb, var(--pack, var(--primaer)) 16%, transparent);
}
.serverleiste__hinweis {
  font: 600 .7rem var(--sans) !important; letter-spacing: .04em;
  color: var(--schrift-leise) !important; opacity: 0;
  transition: opacity var(--tempo);
}
button.serverleiste__eintrag:hover .serverleiste__hinweis,
button.serverleiste__eintrag:focus-visible .serverleiste__hinweis { opacity: .8; }
.serverleiste__eintrag.ist-kopiert {
  border-color: color-mix(in srgb, var(--erfolg) 60%, transparent);
  background: color-mix(in srgb, var(--erfolg) 14%, transparent);
}
.serverleiste__eintrag.ist-kopiert .serverleiste__hinweis { opacity: 1; color: #a7f3c8 !important; }
.serverleiste__eintrag strong { font-size: .96rem; font-weight: 700; overflow-wrap: anywhere; }
.serverleiste__eintrag span {
  /* Adressen wie allthemons.bomberbude.de sind länger als die Kachel breit ist –
     Monospace bricht von allein nirgends um, deshalb ausdrücklich erlauben. */
  font: 700 .74rem var(--mono); letter-spacing: .03em; line-height: 1.4;
  overflow-wrap: anywhere; word-break: break-word; min-width: 0;
  color: color-mix(in srgb, var(--pack, var(--primaer-2)) 75%, var(--schrift));
}

.liste { border-radius: var(--radius-xl); overflow: hidden; }
.liste__zeile {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 16px 22px; color: var(--schrift);
  border-bottom: 1px solid var(--kante-leise);
  transition: background var(--tempo);
}
.liste__zeile:last-child { border-bottom: 0; }
.liste__zeile:hover { background: var(--flaeche-hoch); text-decoration: none; }
.liste__haupt { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.liste__titel { font-weight: 700; overflow-wrap: anywhere; }
.liste__neben { font-size: .88rem; color: var(--schrift-leise); }

/* ---------------------------------------------------------- Formulare */

.formular { display: grid; gap: 18px; max-width: 620px; }
.formular--breit { max-width: none; }
.feld { display: grid; gap: 8px; }
.feld > label { color: var(--schrift-leise); font-size: .95rem; }
.feld__hilfe { display: block; font-size: .84rem; color: var(--schrift-leise); opacity: .8; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="url"], select, textarea {
  width: 100%; padding: 13px 14px;
  background: var(--flaeche-hoch); color: var(--schrift);
  border: 1px solid var(--kante-leise); border-radius: var(--radius);
  outline: none;
  transition: border-color var(--tempo);
}
input:focus, select:focus, textarea:focus { border-color: rgba(255, 179, 71, .5); }
input::placeholder, textarea::placeholder { color: var(--schrift-leise); opacity: .75; }
input:disabled { opacity: .6; }
textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
select { cursor: pointer; }
select option { background: #0f1730; color: #eef3ff; }
html[data-schema="hell"] select option { background: #fff; color: #101733; }

.feld--schalter { display: flex; align-items: flex-start; gap: 12px; }
.feld--schalter input { width: auto; margin-top: 4px; accent-color: var(--primaer); }
.feld--schalter label, .feld--schalter > span { font-size: .95rem; }
.feldreihe { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.formular__aktionen { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.kasten { padding: 24px; border-radius: var(--radius-xl); }
.kasten--schmal { max-width: 460px; margin: 3rem auto; }
.kasten h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 1.2rem; }
.kasten summary { font-weight: 600; cursor: pointer; }

.hinweis-text { font-size: .92rem; color: var(--schrift-leise); line-height: 1.7; }

/* ---------------------------------------------------------- Editor */

.editor { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.editor__haupt { display: grid; gap: 16px; }
.editor__seite {
  position: sticky; top: 100px;
  display: grid; gap: 16px; padding: 22px; border-radius: var(--radius-xl);
  max-height: calc(100vh - 130px); overflow-y: auto;
  scrollbar-width: thin;
}
.werkzeuge {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--flaeche-still); border: 1px solid var(--kante-leise); border-bottom: 0;
}
.werkzeuge button {
  padding: 7px 12px; border-radius: 999px;
  font-size: .82rem; font-weight: 600;
  background: transparent; border: 1px solid transparent; color: var(--schrift-leise); cursor: pointer;
  transition: background var(--tempo), color var(--tempo);
}
.werkzeuge button:hover { background: var(--flaeche-hoch); color: var(--schrift); border-color: var(--kante-leise); }
.werkzeuge__trenner { width: 1px; margin: 4px 6px; background: var(--kante); }
.werkzeuge__modus { display: inline-flex; gap: 4px; padding: 2px; border-radius: 999px; background: var(--flaeche-still); }
.werkzeuge__modus button { padding: 6px 14px; }
.werkzeuge__modus button.ist-aktiv {
  color: var(--schrift);
  background: linear-gradient(135deg, rgba(255, 122, 24, .28), rgba(255, 179, 71, .2));
  border-color: rgba(255, 179, 71, .5);
}

/* Visueller Editor: sieht aus wie der fertige Artikel, ist aber beschreibbar */
.visuell {
  min-height: 480px; padding: 22px 24px;
  border: 1px solid var(--kante-leise); border-radius: 0 0 var(--radius) var(--radius);
  background: var(--flaeche-hoch);
  outline: none;
}
.visuell:focus { border-color: rgba(255, 179, 71, .5); }
.visuell > *:first-child { margin-top: 0; }
.visuell [contenteditable="false"] { opacity: .8; }
.visuell .anker { display: none; }
.visuell table { min-width: 320px; }
.visuell td, .visuell th { min-width: 60px; }
.visuell:empty::before {
  content: 'Hier schreiben – Formatierung über die Leiste oben.';
  color: var(--schrift-leise);
}

.editor__block { display: block; }
.editor__block + .editor__block { margin-top: .6rem; }
.editor__block [data-quelle] { border-radius: 0 0 var(--radius) var(--radius); }
.sprachkasten .werkzeuge { border-radius: var(--radius) var(--radius) 0 0; }
.sprachkasten [data-quelle] { min-height: 320px; font: .93rem/1.65 var(--mono); }
.sprachkasten .visuell { min-height: 320px; }

#inhalt-feld {
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 480px; font: .93rem/1.65 var(--mono);
}
.vorschau { padding: 24px; border-radius: var(--radius-xl); }
.editor__ablegen { border-color: var(--primaer-2) !important; }
.editor__zustand { min-height: 20px; font-size: .86rem; color: var(--akzent-hell); margin: 0; }

/* ---------------------------------------------------------- Verlauf */

.diff { border-radius: var(--radius-gross); overflow: hidden; font: .86rem/1.6 var(--mono); }
.diff div { padding: 3px 18px; white-space: pre-wrap; word-break: break-word; color: var(--schrift-leise); }
.diff .neu { background: rgba(74, 222, 128, .12); color: #a7f3c8; }
.diff .weg { background: rgba(251, 113, 133, .12); color: #ffc0cb; text-decoration: line-through; }

/* ---------------------------------------------------------- Verwaltung */

.adminleiste {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 1.8rem; padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--kante);
}
.adminleiste a {
  padding: 10px 16px; border-radius: 999px;
  color: var(--schrift-leise); font-size: .9rem;
  background: var(--flaeche-still); border: 1px solid transparent;
  transition: .2s ease;
}
.adminleiste a:hover { color: var(--schrift); background: var(--flaeche-hoch); text-decoration: none; }
.adminleiste a.ist-aktiv {
  color: var(--schrift); font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 122, 24, .24), rgba(255, 179, 71, .18));
  border-color: rgba(255, 179, 71, .5);
}

.tabellenrahmen { overflow-x: auto; border-radius: var(--radius-gross); }
.datentabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.datentabelle th, .datentabelle td { padding: 14px 16px; text-align: left; vertical-align: middle; }
.datentabelle th {
  font: 700 .74rem var(--sans); text-transform: uppercase; letter-spacing: .1em;
  color: var(--schrift-leise); border-bottom: 1px solid var(--kante);
}
.datentabelle td { border-bottom: 1px solid var(--kante-leise); }
.datentabelle tr:last-child td { border-bottom: 0; }
.datentabelle tr:hover td { background: var(--flaeche-hoch); }
.datentabelle input, .datentabelle select { padding: 8px 10px; font-size: .86rem; border-radius: 10px; }

.kacheln { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 2.2rem; }
.kachel { padding: 20px; border-radius: 20px; }
.kachel strong { display: block; font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.kachel span { color: var(--schrift-leise); font-size: .9rem; }
.kachel--warnt { border-color: rgba(255, 179, 71, .35); background: rgba(255, 122, 24, .1); }
.kachel--warnt strong { color: var(--primaer-2); }

.bilderraster { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.bilderraster figure { margin: 0; border-radius: var(--radius-gross); overflow: hidden; }
.bilderraster img { display: block; width: 100%; height: 120px; object-fit: cover; }
.bilderraster figcaption { padding: 12px; font-size: .76rem; color: var(--schrift-leise); word-break: break-all; }

/* ---------------------------------------------------------- Fußzeile */

.fuss {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  width: min(calc(100% - 32px), var(--breite-seite)); margin: 0 auto 3rem;
  padding: 22px 26px; border-radius: 24px;
  background: var(--flaeche-still); border: 1px solid var(--kante-leise);
  font-size: .9rem; color: var(--schrift-leise);
}
.fuss code { font: 700 .9rem var(--mono); color: var(--code-schrift); }
.fuss__links { display: flex; gap: 18px; flex-wrap: wrap; }
.fuss__links a { color: var(--schrift-leise); }
.fuss__links a:hover { color: var(--akzent); }

/* ---------------------------------------------------------- Fehlerseite */

.fehlerseite { text-align: center; padding: 5rem 1rem; }
.fehlerseite strong {
  display: block; font-size: 5rem; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--primaer), var(--primaer-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fehlerseite p { color: var(--schrift-leise); max-width: 52ch; margin: 1.2rem auto 2.2rem; line-height: 1.7; }
.fehlerseite .knopf { margin: 0 6px; }

/* ---------------------------------------------------------- Schmale Fenster */

@media (max-width: 1180px) {
  .artikel-raster { grid-template-columns: minmax(0, 1fr); }
  .artikel-spalte { position: static; max-height: none; overflow: visible; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor__seite { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 1320px) {
  .kopf__netz { display: none; }
  .navigation__netz { display: block; }
}

@media (max-width: 1024px) {
  :root { --kopf-hoehe: 64px; }
  .kopf { flex-wrap: wrap; min-height: auto; }
  .suchfeld.ist-offen { width: min(340px, 60vw); }
  .suchfeld kbd { display: none; }
  .suchfeld input[type="search"] { padding-right: 14px; }
}

@media (max-width: 900px) {
  .kopf__menue {
    display: grid; gap: 4px; place-content: center;
    width: 44px; height: 44px; padding: 0; cursor: pointer;
    background: var(--flaeche-hoch); border: 1px solid var(--kante-leise); border-radius: var(--radius);
  }
  .kopf__menue span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--schrift); }
  .marke__text small { display: none; }
  .sprachwahl a { min-width: 38px; height: 38px; padding: 0 10px; font-size: .82rem; }
  .marke__zeichen { width: 42px; height: 42px; border-radius: 14px; }
  .konto__name { display: none; }

  .rahmen { grid-template-columns: minmax(0, 1fr); padding-top: 1.4rem; }
  .navigation {
    position: fixed; inset: 0 auto 0 0; z-index: 70;
    width: min(320px, 86vw); max-height: none; border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    transform: translateX(-103%); transition: transform .22s ease;
  }
  .navigation.ist-offen { transform: none; }
  .navigation__schatten { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(4, 7, 15, .6); }
  .navigation__schatten[hidden] { display: none; }
  .steckbrief__zelle + .steckbrief__zelle { border-left: 0; border-top: 1px solid var(--kante); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .kopf, .navigation, .fuss, .artikel-fuss__aktionen, .artikel-spalte { display: none !important; }
  .rahmen { display: block; width: auto; padding: 0; }
  body { background: #fff; color: #000; }
}
