/* CS2 Skins - "Armory Night": Graphit, Lime als Akzent, die Seltenheit als Licht hinter
   dem Item, alles eckig. Farben und Schriften als Variablen hier oben. Die Schriften liegen
   in public/fonts (SIL Open Font License, siehe OFL-*.txt) - die Seite laedt nichts von Google. */

@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/hanken-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/hanken-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/chakra-petch-latin-600.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/chakra-petch-latin-ext-600.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/chakra-petch-latin-700.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/chakra-petch-latin-ext-700.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --grund: #0a0c10;
  --grund-2: #0c0e12;
  --tief: #0d1015;
  --flaeche: #111419;
  --flaeche-2: #151920;
  --flaeche-3: #1e232c;
  --linie: #1f2530;
  --linie-2: #2a313c;
  --linie-3: #2d3440;
  --text: #eef1f5;
  --text-2: #b0b8c4;
  --text-3: #8b95a4;
  --akzent: #c8f250;
  --akzent-2: #b5df3c;
  --akzent-text: #0a0c10;
  --ct: #6ea8ff;
  --t: #f0b44c;
  --gefahr: #ff7b7b;
  --stattrak: #ff9d5c;
  --gold: #f5c542;
  --schrift: "Hanken Grotesk", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --schrift-titel: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --schrift-zahl: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --leiste: 68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
input::placeholder { color: var(--text-3); }
img { display: block; max-width: 100%; }
kbd { padding: 1px 7px; border: 1px solid var(--linie-3); font-family: var(--schrift-zahl); font-size: 11px; color: var(--text-3); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

.etikett { margin: 0; font-family: var(--schrift-titel); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.zahl { font-family: var(--schrift-zahl); font-variant-numeric: tabular-nums; }
.leise { margin: 0; font-size: 12px; color: var(--text-3); }
.hinweis { margin: 0; color: var(--text-2); }

/* ------------------------------------------------------------------ Knoepfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--linie-3); background: var(--flaeche-2); color: var(--text);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.knopf:hover:not(:disabled) { background: #232932; border-color: #3c4652; }
.knopf svg { width: 16px; height: 16px; flex: none; }
.knopf .spielen { fill: none; stroke: var(--akzent); stroke-width: 2; stroke-linejoin: round; }
.knopf.haupt-aktion {
  border-color: var(--akzent); background: var(--akzent); color: var(--akzent-text);
  font-family: var(--schrift-titel); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.knopf.haupt-aktion:hover:not(:disabled) { background: var(--akzent-2); border-color: var(--akzent-2); }
.knopf.rand { background: transparent; }
.knopf.klein { min-height: 36px; padding: 0 12px; font-size: 13px; }
.textknopf { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; border: 0; background: none; padding: 0 6px; color: var(--text-2); font-weight: 600; }
.textknopf svg { width: 16px; height: 16px; flex: none; }
.textknopf:hover { color: var(--text); }
.textknopf.gefahr { color: var(--gefahr); }

/* ------------------------------------------------------------------ Kopfzeile */
.leiste {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  height: var(--leiste); padding: 0 28px;
  background: rgba(12, 14, 18, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid #1a1f27;
}
/* 212 + Rand + Abstand = 264, so breit wie die Seitenleiste: das Menue beginnt ueber dem Inhalt. */
.marke { display: flex; align-items: center; gap: 12px; min-width: 212px; color: var(--text); text-decoration: none; }
/* Das Menue oben: die Bereiche der Seite, der offene mit Lime-Strich an der Unterkante. */
.kopfmenue { display: flex; align-self: stretch; gap: 2px; }
.kopfmenue button {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  border: 0; background: none; color: var(--text-2); white-space: nowrap;
  font-family: var(--schrift-titel); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.kopfmenue button:hover { color: var(--text); background: var(--flaeche); }
.kopfmenue button[aria-current="page"] { color: var(--text); }
.kopfmenue button[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--akzent); }
.kopfmenue .zahl {
  min-width: 22px; padding: 1px 6px; background: #1a1f27; color: var(--akzent);
  font-size: 11px; font-weight: 600; letter-spacing: 0; text-align: center;
}
.marke span { font-family: var(--schrift-titel); font-size: 19px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.marke-zeichen { width: 30px; height: 30px; color: var(--akzent); flex: none; }
.suche {
  flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 10px 0 14px; border: 1px solid #232933; background: var(--flaeche); color: var(--text-3);
}
.suche:focus-within { border-color: var(--linie-3); }
.suche svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.suche kbd { flex: none; }
.suche input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; outline: none; font-size: 15px; color: var(--text); }
.leiste-rechts { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.konto { display: flex; align-items: center; gap: 10px; }
.konto img, .konto .avatar { width: 36px; height: 36px; flex: none; }
.konto .avatar {
  display: grid; place-items: center; background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie-3);
  font-family: var(--schrift-titel); font-size: 15px; font-weight: 700; color: var(--akzent);
}
.konto .name { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.symbolknopf { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--text-3); }
.symbolknopf:hover { color: var(--text); }
.symbolknopf svg { width: 18px; height: 18px; }
.konto .kurz { display: none; }

/* ------------------------------------------------------------------ Rahmen */
.rahmen { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - var(--leiste)); }
/* Server und Changelog: ohne Seitenleiste, der Inhalt mittig. */
body[data-ansicht="server"] .rahmen, body[data-ansicht="changelog"] .rahmen, body[data-ansicht="ranking"] .rahmen { grid-template-columns: minmax(0, 1fr); }
body[data-ansicht="server"] .seitenleiste, body[data-ansicht="changelog"] .seitenleiste, body[data-ansicht="ranking"] .seitenleiste { display: none; }
body[data-ansicht="server"] .haupt, body[data-ansicht="changelog"] .haupt, body[data-ansicht="ranking"] .haupt { width: 100%; margin: 0 auto; }
body[data-ansicht="server"] .haupt { max-width: 1240px; }
body[data-ansicht="changelog"] .haupt { max-width: 944px; }
body[data-ansicht="ranking"] .haupt { max-width: 944px; }

.seitenleiste {
  position: sticky; top: var(--leiste); align-self: start;
  height: calc(100vh - var(--leiste)); overflow-y: auto;
  padding: 22px 16px 24px; border-right: 1px solid #1a1f27; background: var(--grund-2);
  display: flex; flex-direction: column; gap: 20px;
}
.seitenleiste > .etikett, .seitenleiste-block > .etikett { padding: 0 12px 6px; font-size: 11px; }
.kategorien { display: flex; flex-direction: column; gap: 2px; }
.kategorie {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; background: none; color: var(--text-2);
  text-align: left; font-weight: 600;
}
.kategorie svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.kategorie-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kategorie small { font-family: var(--schrift-zahl); font-size: 12px; font-weight: 500; color: var(--text-3); }
.kategorie .an { width: 6px; height: 6px; background: var(--akzent); flex: none; }
.kategorie:hover { background: var(--flaeche-2); color: var(--text); }
.kategorie.aktiv { background: #1a1f27; box-shadow: inset 0 0 0 1px #262c36; color: var(--text); font-weight: 700; }
.kategorie.aktiv svg, .kategorie.aktiv small { color: var(--akzent); }

.seitenleiste-block { display: flex; flex-direction: column; gap: 2px; padding-top: 20px; border-top: 1px solid #1a1f27; }
.navpunkt {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 12px; border: 0;
  background: none; color: var(--text-2); font-weight: 600; text-align: left;
}
.navpunkt span { flex: 1; }
.navpunkt svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.navpunkt:hover { background: var(--flaeche-2); color: var(--text); }
.navpunkt.aktiv { background: #1a1f27; box-shadow: inset 0 0 0 1px #262c36; color: var(--text); }
.navpunkt .zahl { min-width: 26px; padding: 2px 8px; background: #1a1f27; color: var(--akzent); font-size: 12px; font-weight: 600; text-align: center; }
.navpunkt.gefahr { color: var(--gefahr); }
/* Die Loadouts: das aktive (getragen) mit vollem Lime-Quadrat, ein Klick schaltet um. */
.block-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 6px 12px; }
.block-kopf .etikett { font-size: 11px; }
.symbolknopf.klein { width: 30px; height: 30px; border: 1px solid var(--linie-2); }
.symbolknopf.klein:hover:not(:disabled) { border-color: var(--linie-3); }
.symbolknopf.klein svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.loadout-liste { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.loadout-liste .leise { padding: 2px 12px 8px; }
.punkt { width: 8px; height: 8px; flex: none; border: 1.5px solid #5f6977; }
.getragen .punkt, .waffe.aktiv .punkt { border-color: var(--akzent); background: var(--akzent); }
.loadout-punkt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loadout-punkt:not(.getragen) .zahl { color: var(--text-3); }
.import { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 8px; }
.import label { font-size: 12px; font-weight: 600; color: var(--text-3); }
.import div { display: flex; gap: 8px; }
.import input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px;
  border: 1px solid #232933; background: var(--flaeche); outline: none;
  font-family: var(--schrift-zahl); font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.import input:focus { border-color: var(--linie-3); }
.import button { height: 44px; padding: 0 14px; border: 1px solid var(--linie-3); background: #1a1f27; font-weight: 700; }

/* ------------------------------------------------------------------ Hauptbereich */
.haupt { padding: 28px 32px 48px; min-width: 0; }
.haupt-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.haupt-kopf > div:first-child { display: flex; flex-direction: column; gap: 8px; }
#oberzeile { color: var(--akzent); letter-spacing: .18em; }
.titel { display: flex; align-items: baseline; gap: 14px; margin: 0; font-family: var(--schrift-titel); font-size: 42px; font-weight: 700; letter-spacing: -.01em; line-height: 1; overflow-wrap: anywhere; }
.titel small { font-family: var(--schrift-zahl); font-size: 16px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }

.umschalter { display: inline-flex; padding: 3px; gap: 4px; border: 1px solid #232933; background: var(--flaeche); }
/* Nichts zu filtern (Musik, Pins, Server): kein leerer Kasten. */
.umschalter:empty { display: none; }
.umschalter button { min-width: 60px; height: 38px; padding: 0 16px; border: 0; background: none; color: var(--text-2); font-weight: 700; font-size: 13px; }
.umschalter button:hover { color: var(--text); }
.umschalter button[aria-pressed="true"] { background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie-3); color: var(--text); }
.umschalter button.ct { color: var(--ct); }
.umschalter button.t { color: var(--t); }

.waffenleiste {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 0 4px; margin-bottom: 22px;
  scrollbar-width: thin; scrollbar-color: var(--linie-3) transparent;
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}
.waffenleiste:empty { display: none; }
.waffe {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 15px; border: 1px solid #232933;
  background: var(--flaeche); color: var(--text-2); font-weight: 600; font-size: 13px;
}
.waffe small { font-family: var(--schrift-zahl); color: var(--text-3); font-size: 11px; }
.waffe:hover { border-color: var(--linie-3); color: var(--text); }
.waffe.aktiv { border-color: var(--akzent); color: var(--text); background: rgba(200, 242, 80, .1); font-weight: 700; }
.waffe.aktiv small { color: var(--akzent); }
/* Im eigenen Loadout zeigt die Leiste die Loadouts, dazu "New loadout". */
.waffe .chip-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waffe.neu { border-style: dashed; background: transparent; }
.waffe.neu svg { width: 16px; height: 16px; }
.loadout-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: -8px 0 20px; }
.loadout-aktionen .luecke { flex: 1; }
.loadout-aktionen .stand { margin-right: 8px; }

/* ------------------------------------------------------------------ Raster */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.karte {
  --r: #b0c3d9;
  position: relative; display: flex; flex-direction: column;
  padding: 0; border: 1px solid var(--linie); background: var(--flaeche); text-align: left; overflow: hidden;
  content-visibility: auto; contain-intrinsic-size: 200px 250px;
  transition: border-color .15s, transform .15s;
}
.karte:hover { border-color: var(--linie-3); transform: translateY(-2px); }
.karte.an { border-color: color-mix(in srgb, var(--akzent) 65%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 12%, transparent); }
.karte-stage {
  position: relative; aspect-ratio: 4 / 3;
  background: radial-gradient(58% 54% at 50% 62%, color-mix(in srgb, var(--r) 28%, transparent), transparent 72%), var(--tief);
}
.karte-stage::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 10%; height: 12px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
}
.karte-stage img { position: absolute; inset: 6% 8% 12%; width: 84%; height: 82%; object-fit: contain; z-index: 1; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.karte-text { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; box-shadow: inset 0 2px 0 color-mix(in srgb, var(--r) 85%, transparent); }
.karte-oben { font-size: 12px; color: var(--text-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte-fuss { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 12px; color: var(--text-2); }
.karte-fuss i { width: 7px; height: 7px; background: var(--r); flex: none; }
.karte-fuss span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte-fuss .karte-float { flex: none; font-family: var(--schrift-zahl); font-size: 11px; color: var(--text-3); }
.marken { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.marke-team {
  padding: 3px 7px; background: rgba(10, 12, 16, .85);
  font-family: var(--schrift-titel); font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.marke-team.ct { color: var(--ct); box-shadow: inset 0 0 0 1px rgba(110, 168, 255, .55); }
.marke-team.t { color: var(--t); box-shadow: inset 0 0 0 1px rgba(240, 180, 76, .55); }
.marke-team.alle { color: var(--akzent); box-shadow: inset 0 0 0 1px rgba(200, 242, 80, .55); }
.marke-st {
  position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 7px; background: rgba(10, 12, 16, .85);
  box-shadow: inset 0 0 0 1px rgba(255, 157, 92, .45);
  font-family: var(--schrift-titel); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--stattrak);
}
.leer { margin: 60px 0; text-align: center; color: var(--text-3); }

/* ------------------------------------------------------------------ Dialoge */
.huelle {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(5, 6, 8, .76); backdrop-filter: blur(4px);
}
.huelle.oben { z-index: 60; }
.dialog {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  border: 1px solid var(--linie-2); background: var(--flaeche);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
}
.dialog.schmal { width: min(480px, 100%); }
.dialog.mittel { width: min(760px, 100%); }
.dialog-kopf {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 28px 20px; border-bottom: 1px solid var(--linie);
}
.dialog-kopf > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dialog-kopf .vortitel { margin: 4px 0 0; font-size: 16px; font-weight: 600; color: var(--text-2); }
.dialog-kopf h2 { margin: 0; font-family: var(--schrift-titel); font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.dialog-kopf .zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.schliessen { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--linie-2); background: var(--flaeche-2); color: var(--text-2); }
.schliessen:hover { color: var(--text); border-color: var(--linie-3); }
.schliessen svg { width: 18px; height: 18px; }
.dialog-inhalt { padding: 22px 28px 26px; }
.pille {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px;
  border: 1px solid var(--linie-2); background: var(--flaeche-2);
  font-family: var(--schrift-titel); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--text-2);
}
.pille i { width: 7px; height: 7px; background: var(--r, var(--text-3)); }
.pille .zahl { font-size: 11px; letter-spacing: 0; color: var(--text); }
.pille.st { border-color: rgba(255, 157, 92, .45); color: var(--stattrak); font-weight: 700; }

/* ------------------------------------------------------------------ Werkstatt */
.werkstatt { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); }
.werkstatt-links { padding: 24px; border-right: 1px solid var(--linie); display: flex; flex-direction: column; gap: 14px; }
.buehne {
  --r: #b0c3d9;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--linie);
  background:
    radial-gradient(55% 50% at 50% 58%, color-mix(in srgb, var(--r) 30%, transparent), transparent 75%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(255, 255, 255, .028) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(255, 255, 255, .028) 31px 32px),
    var(--tief);
  touch-action: none; user-select: none;
}
.buehne-flach, .buehne-3d { position: absolute; inset: 0; }
.buehne-flach::before {
  content: ""; position: absolute; left: 24%; right: 24%; bottom: 12%; height: 26px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .65), transparent);
}
.buehne-bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .5)); }
/* Der 3D-Viewer: unsichtbar, bis er das erste Bild gezeichnet hat - bis dahin liegt das flache Bild darunter. */
.viewer {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  /* Der Viewer ist hell (normal). Weicht das Schema des iframes ab, malt der Browser einen deckenden Grund -
     und normal hiesse hier dark, wegen <meta name="color-scheme" content="dark">. */
  background: transparent; color-scheme: light;
  opacity: 0; pointer-events: none; transition: opacity .6s;
}
.buehne-3d.gezeichnet .viewer { opacity: 1; pointer-events: auto; }
.viewer-laedt {
  position: absolute; right: 40px; top: 18px;
  padding: 3px 8px; border: 1px solid var(--linie-2); background: rgba(10, 12, 16, .8);
  color: var(--text-2); font-size: 12px; font-weight: 600; pointer-events: none;
}
.buehne-3d.gezeichnet:not(.laedt) .viewer-laedt { display: none; }
/* Sucher-Ecken und "3D VIEW" - liegen ueber dem Viewer, fangen aber keine Klicks ab. */
.ecke { position: absolute; width: 20px; height: 20px; border: 0 solid var(--akzent); opacity: .75; pointer-events: none; }
.ecke.lo { left: 12px; top: 12px; border-width: 2px 0 0 2px; }
.ecke.ro { right: 12px; top: 12px; border-width: 2px 2px 0 0; }
.ecke.lu { left: 12px; bottom: 12px; border-width: 0 0 2px 2px; }
.ecke.ru { right: 12px; bottom: 12px; border-width: 0 2px 2px 0; }
.buehne-tag {
  position: absolute; left: 40px; top: 18px; padding: 3px 8px; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--akzent) 55%, transparent); background: rgba(10, 12, 16, .75);
  font-family: var(--schrift-titel); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--akzent);
}
.buehne-wear {
  position: absolute; left: 40px; bottom: 18px; z-index: 2; display: flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 12px; border: 1px solid var(--linie-2); background: rgba(10, 12, 16, .78);
  font-size: 13px; font-weight: 600; pointer-events: none;
}
.buehne-wear .zahl { font-size: 12px; color: var(--text-2); }
.buehne-sticker {
  --dx: 0; --dy: 0; --dreh: 0; --abnutzung: 0;
  position: absolute; width: 14%; aspect-ratio: 4 / 3; object-fit: contain;
  transform: translate(-50%, -50%) translate(calc(var(--dx) * 100%), calc(var(--dy) * -100%)) rotate(calc(var(--dreh) * 1deg));
  opacity: calc(1 - var(--abnutzung) * .8);
  filter: saturate(calc(1 - var(--abnutzung) * .6)) drop-shadow(0 1px 1px rgba(0, 0, 0, .6));
  cursor: pointer;
}
.buehne-sticker.gewaehlt { outline: 1.5px dashed var(--akzent); outline-offset: 3px; cursor: grab; }
.buehne-sticker.gewaehlt:active { cursor: grabbing; }
.buehne-charm { position: absolute; left: 12%; top: 58%; width: 13%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); pointer-events: none; }
.buehne-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 30px; }
.buehne-info a { margin-left: auto; color: var(--text-2); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.buehne-info a:hover { color: var(--text); text-decoration: underline; }
.tipp { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1px solid var(--linie); font-size: 12px; color: var(--text-2); }
.tipp svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tipp kbd { padding: 1px 6px; font-size: 10px; color: var(--text); }
.werte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wert { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--linie); background: var(--tief); }
.wert .etikett { font-size: 11px; letter-spacing: .14em; }
.wert b { font-family: var(--schrift-zahl); font-size: 18px; font-weight: 600; }
.wert b.leer-wert { color: var(--text-3); }
.wert b.st { color: var(--stattrak); }

.werkstatt-rechts { display: flex; flex-direction: column; min-width: 0; }
.reiter { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--linie); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.reiter button {
  position: relative; height: 52px; padding: 0 12px; border: 0; background: none;
  font-family: var(--schrift-titel); font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap;
}
.reiter button:hover { color: var(--text); }
.reiter button[aria-selected="true"] { color: var(--text); font-weight: 700; }
.reiter button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--akzent); }
.reiter-inhalt { padding: 24px; display: flex; flex-direction: column; gap: 24px; flex: 1; }

/* Die Aktionsleiste unten: Teams ankreuzen, ein Knopf fuer Ausruesten, Speichern, Ablegen. */
.aktionsleiste {
  grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  min-height: 80px; padding: 14px 24px; border-top: 1px solid var(--linie-2); background: var(--tief);
}
.aktionsleiste .etikett { margin-right: 4px; }
/* In welches Loadout es geht - nur, wenn es mehrere gibt. */
.aktionsleiste .etikett small {
  display: block; max-width: 150px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--schrift); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-2);
}
.aktionsleiste .luecke { flex: 1; }
.teamwahl {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 18px 0 14px; border: 1px solid var(--linie-3); background: var(--flaeche-2); cursor: pointer;
}
.teamwahl input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.teamwahl:has(input:focus-visible) { outline: 2px solid var(--akzent); outline-offset: 2px; }
.teamwahl .kasten { display: grid; place-items: center; width: 18px; height: 18px; flex: none; border: 2px solid #5f6977; color: var(--akzent-text); }
.teamwahl .kasten svg { width: 14px; height: 14px; }
.teamwahl b { display: block; font-size: 14px; }
.teamwahl small { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--text-3); }
.teamwahl.ct b { color: var(--ct); }
.teamwahl.t b { color: var(--t); }
.teamwahl.an.ct { border-color: var(--ct); background: rgba(110, 168, 255, .1); }
.teamwahl.an.t { border-color: var(--t); background: rgba(240, 180, 76, .1); }
.teamwahl.an.ct .kasten { border: 0; background: var(--ct); }
.teamwahl.an.t .kasten { border: 0; background: var(--t); }
.teamwahl.an small { color: var(--text-2); }
.teamwahl.aus { border-style: dashed; border-color: var(--linie-2); background: transparent; cursor: not-allowed; }
.teamwahl.aus b, .teamwahl.aus small { color: #6d7784; }
.teamwahl.aus .kasten { border-color: #3a4350; }
.stand { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.stand i { width: 8px; height: 8px; background: #5f6977; flex: none; }
.stand.offen i { background: var(--t); }
.stand.fertig i { background: var(--akzent); }
.aktionsleiste .knopf { min-height: 48px; }
.aktionsleiste .knopf.haupt-aktion { padding: 0 30px; font-size: 15px; }

.feld { display: flex; flex-direction: column; gap: 12px; }
.feld-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.feld-kopf output, .feld-kopf .feld-wert { font-size: 14px; font-weight: 700; color: var(--text); }
.feld-kopf output.zahl { font-size: 13px; font-weight: 600; }
.feld-reihe { display: flex; align-items: center; gap: 12px; }
.feld-reihe input[type="range"] { flex: 1; min-width: 0; }
.zahlfeld, .textfeld {
  height: 44px; padding: 0 12px; border: 1px solid var(--linie-2);
  background: var(--tief); outline: none; font-variant-numeric: tabular-nums;
}
.zahlfeld { width: 104px; font-family: var(--schrift-zahl); font-size: 15px; font-weight: 600; }
.zahlfeld.gross { width: 160px; font-size: 18px; }
.textfeld { width: 100%; }
.zahlfeld:focus, .textfeld:focus { border-color: var(--linie-3); }

input[type="range"] {
  --anteil: 0%;
  -webkit-appearance: none; appearance: none; height: 6px; margin: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--akzent) 0 var(--anteil), var(--linie-3) var(--anteil) 100%);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
  background: var(--text); border: 3px solid var(--flaeche); box-shadow: 0 0 0 1px var(--text), 0 2px 6px rgba(0, 0, 0, .5);
}
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 0; background: var(--text); border: 3px solid var(--flaeche); box-shadow: 0 0 0 1px var(--text); }

/* Wear auf der ganzen Skala 0-1: die Stufen als Grautoene, was der Skin nicht erreicht, schraffiert. */
.wear-skala { position: relative; padding-top: 6px; }
.wear-skala input[type="range"] {
  display: block; width: 100%; height: 8px;
  background: linear-gradient(90deg, #e3eaf1 0 7%, #bcc6d1 7% 15%, #8f9bab 15% 38%, #6c7888 38% 45%, #4a5462 45% 100%);
}
.wear-aus {
  position: absolute; top: 6px; height: 8px; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(10, 12, 16, .9) 0 3px, rgba(10, 12, 16, .6) 3px 6px);
}
.wear-marken { position: relative; height: 14px; font-family: var(--schrift-zahl); font-size: 11px; color: var(--text-3); }
.wear-marken span { position: absolute; transform: translateX(-50%); }
.wear-marken span.jetzt { color: var(--text); }
.wear-stufen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--linie-2); background: var(--tief); }
.wear-stufen button {
  height: 40px; border: 0; border-right: 1px solid var(--linie-2); background: none;
  font-family: var(--schrift-zahl); font-size: 12px; font-weight: 600; color: var(--text-2);
}
.wear-stufen button:last-child { border-right: 0; }
.wear-stufen button[aria-pressed="true"] { background: var(--flaeche-3); box-shadow: inset 0 -2px 0 var(--akzent); color: var(--text); }

.schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--linie); background: var(--flaeche-2); cursor: pointer; }
.schalter input { position: absolute; opacity: 0; pointer-events: none; }
.schalter .bahn { position: relative; width: 40px; height: 22px; flex: none; background: var(--linie-3); transition: background .15s; }
.schalter .bahn::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--text); transition: transform .15s; }
.schalter input:checked + .bahn { background: var(--akzent); }
.schalter input:checked + .bahn::after { transform: translateX(18px); background: var(--akzent-text); }
.schalter input:focus-visible + .bahn { outline: 2px solid var(--akzent); outline-offset: 2px; }

.plaetze, .platz-namen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.platz {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 8px;
  border: 1px dashed #3a4350; background: transparent; color: var(--text-2); font-size: 20px;
}
.platz:hover:not(:disabled) { border-color: var(--text-3); color: var(--text); }
.platz:disabled { border-color: var(--linie-2); }
.platz.belegt { border: 1px solid var(--linie-3); background: var(--flaeche-2); }
.platz[aria-pressed="true"] {
  border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 8%, var(--flaeche-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 16%, transparent);
}
.platz img { width: 100%; height: 100%; object-fit: contain; }
.platz svg { width: 22px; height: 22px; }
.platz .nr { position: absolute; top: 4px; left: 6px; font-family: var(--schrift-zahl); font-size: 10px; font-weight: 600; color: var(--text-3); }
.platz-namen span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--text-3); }
.platz-namen span.gewaehlt { color: var(--text); }
.editor { display: flex; flex-direction: column; gap: 16px; padding: 16px; border: 1px solid var(--linie); background: var(--tief); }
.editor-kopf { display: flex; align-items: center; gap: 12px; }
.editor-kopf img { width: 54px; height: 44px; padding: 3px; object-fit: contain; background: var(--flaeche-2); }
.editor-kopf b { display: block; font-size: 15px; }
.editor-kopf .aktionen { margin-left: auto; display: flex; gap: 4px; }
.anker { display: flex; flex-wrap: wrap; }
.anker button {
  width: 42px; height: 42px; margin-left: -1px; border: 1px solid var(--linie-3); background: var(--flaeche-2);
  font-family: var(--schrift-zahl); font-weight: 600; font-size: 13px; color: var(--text-2);
}
.anker button:first-child { margin-left: 0; }
.anker button[aria-pressed="true"] { position: relative; border-color: var(--akzent); background: var(--akzent); color: var(--akzent-text); font-weight: 700; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.zwei .feld { gap: 10px; }
.zwei .feld-kopf .etikett { font-family: var(--schrift); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-2); }

/* ------------------------------------------------------------------ Auswahl (Sticker, Charms) */
.waehler { width: min(980px, 100%); }
.auswahl-kopf { display: flex; gap: 10px; margin-bottom: 14px; }
.auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.auswahl button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px;
  border: 1px solid var(--linie); background: var(--flaeche-2);
  font-size: 12px; color: var(--text-2); text-align: center; line-height: 1.25;
}
.auswahl button:hover { border-color: var(--akzent); color: var(--text); }
.auswahl img { width: 88px; height: 66px; object-fit: contain; }
.mehr { display: flex; justify-content: center; margin-top: 14px; }

/* ------------------------------------------------------------------ Loadouts und Teilen */
.loadouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.loadout { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--linie); background: var(--flaeche-2); }
.loadout h3 { margin: 0; font-family: var(--schrift-titel); font-size: 17px; font-weight: 700; }
.loadout .wer { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; }
.loadout .wer img { width: 20px; height: 20px; }
.loadout .bilder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.loadout .bilder img { aspect-ratio: 4 / 3; object-fit: contain; background: var(--tief); }
.loadout .unten { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.veroeffentlichen { display: flex; gap: 8px; margin-bottom: 18px; }
.code {
  margin: 16px 0; padding: 18px; border: 1px dashed var(--linie-3); text-align: center;
  font-family: var(--schrift-zahl); font-size: 30px; font-weight: 600; letter-spacing: .14em; color: var(--akzent);
}
.teilen-abschnitt { display: flex; flex-direction: column; gap: 10px; }
.teilen-abschnitt + .teilen-abschnitt { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--linie); }
.teilen-abschnitt form { display: flex; gap: 8px; }
.teilen-abschnitt input { font-family: var(--schrift-zahl); letter-spacing: .08em; text-transform: uppercase; }
.namensform { display: flex; flex-direction: column; gap: 10px; }
.namensform div { display: flex; gap: 8px; }

/* ------------------------------------------------------------------ Server (A2S) */
.serverliste { display: flex; flex-direction: column; gap: 8px; }
.server-zeile {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) auto minmax(150px, 1fr) auto;
  align-items: center; gap: 18px; min-height: 76px; padding: 0 12px 0 20px;
  border: 1px solid var(--linie); border-left: 3px solid var(--akzent); background: var(--flaeche);
}
.server-zeile.offline, .server-zeile.unknown { border-left-color: var(--linie-3); }
.server-zeile.offline .server-name b { color: var(--text-2); }
.server-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.server-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--schrift-titel); font-size: 17px; font-weight: 700; }
.server-spieler { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.server-spieler b { font-size: 20px; font-weight: 600; }
.server-spieler span { font-size: 14px; color: var(--text-2); }
.server-spieler small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.server-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.server-aktionen .symbolknopf { border: 1px solid var(--linie-2); }
/* Die Map als Kachel: ihr Bild (.mit-bild), sonst ein Farbton je Name mit feinem Raster. */
.server-map {
  --farbton: 200;
  display: grid; place-items: center; align-self: stretch; margin: 8px 0; padding: 0 12px;
  border: 0; overflow: hidden; text-align: center;
  background:
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, .035) 23px 24px),
    linear-gradient(115deg, hsl(var(--farbton) 32% 15%), hsl(var(--farbton) 42% 30%));
  font-family: var(--schrift-titel); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); overflow-wrap: anywhere;
}
/* Abgedunkelt, damit Name und Stand lesbar bleiben - laedt das Bild nicht, bleibt der Farbton darunter. */
.server-map.mit-bild {
  background:
    linear-gradient(180deg, rgba(8, 10, 14, .3), rgba(8, 10, 14, .62)),
    var(--bild) center / cover no-repeat,
    linear-gradient(115deg, hsl(var(--farbton) 32% 15%), hsl(var(--farbton) 42% 30%));
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 12px rgba(0, 0, 0, .7);
}
button.server-map:hover { filter: brightness(1.12); }
.server-zeile.offline .server-map, .server-oben.offline .server-map { filter: grayscale(.8) brightness(.75); }
.server-mehr { white-space: nowrap; }

.server-details { display: flex; flex-direction: column; gap: 20px; }
.server-oben {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; padding: 16px;
  border: 1px solid var(--linie); border-left: 3px solid var(--akzent); background: var(--tief);
}
.server-oben.offline, .server-oben.unknown { border-left-color: var(--linie-3); }
.server-oben .server-map { margin: 0; min-height: 150px; font-size: 18px; }
.server-oben-rechts { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-width: 0; }
.server-werte { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.server-werte .wert { background: var(--flaeche); }
.server-werte .wert b { font-size: 17px; overflow-wrap: anywhere; }
.server-werte .wert small { font-size: 11px; }
.server-werte .wert small a { color: inherit; text-decoration: none; }
.server-werte .wert small a:hover { color: var(--akzent); text-decoration: underline; text-underline-offset: 3px; }
.server-werte .wert b.online { color: var(--akzent); }
.server-werte .wert b.offline { color: var(--gefahr); }
.server-oben .knopf.rand { font-family: var(--schrift-zahl); font-size: 13px; }
.pille.status-online i { background: var(--akzent); }
.pille.status-offline i { background: var(--gefahr); }
.spieler-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.spieler-karte {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--linie); background: var(--flaeche-2);
}
.spieler-bild {
  display: grid; place-items: center; width: 40px; height: 40px; background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie-3);
  font-family: var(--schrift-titel); font-weight: 700; color: var(--akzent);
}
.spieler-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spieler-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spieler-punkte { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.spieler-punkte .etikett { font-size: 10px; }
.spieler-punkte b { font-size: 20px; font-weight: 600; }
.server-spieler-kopf { justify-content: flex-start; }
.server-stand { margin-top: -6px; }
.server-map .map-stand { display: block; margin-top: 3px; font-family: var(--schrift-zahl); font-size: 13px; letter-spacing: .04em; text-transform: none; color: var(--text-2); }

/* ------------------------------------------------------------------ Live vom Plugin (CS2SkinsLive) */
.map-stand .ct, .tafel-stand .ct, .runden-stand .ct, .seiten-balken .ct { color: var(--ct); }
.map-stand .t, .tafel-stand .t, .runden-stand .t, .seiten-balken .t { color: var(--t); }

/* Der Stand wie im Spiel: CT links, T rechts, jede Seite in ihrem Licht. */
.anzeigetafel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 18px 20px; border: 1px solid var(--linie);
  background: linear-gradient(90deg, rgba(110, 168, 255, .12), transparent 38%, transparent 62%, rgba(240, 180, 76, .12)), var(--tief);
}
.tafel-team { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tafel-team.t { align-items: flex-end; text-align: right; }
.tafel-team .etikett { font-size: 12px; }
.tafel-team.ct .etikett, .tafel-team.ct .tafel-lebend { color: var(--ct); }
.tafel-team.t .etikett, .tafel-team.t .tafel-lebend { color: var(--t); }
.tafel-team .kurz { display: none; }
.tafel-lebend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tafel-team.t .tafel-lebend { flex-direction: row-reverse; }
.tafel-lebend i { width: 10px; height: 16px; border: 1px solid currentColor; opacity: .45; }
.tafel-lebend i.lebt { background: currentColor; opacity: 1; }
.tafel-lebend small { margin: 0 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.tafel-mitte { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tafel-stand { display: flex; align-items: baseline; gap: 12px; font-size: 44px; font-weight: 700; line-height: 1; }
.tafel-stand .trenner { font-size: 28px; color: var(--text-3); }
.tafel-phase {
  padding: 3px 9px; border: 1px solid var(--linie-3); font-family: var(--schrift-titel); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); white-space: nowrap;
}
.tafel-phase.live { border-color: rgba(200, 242, 80, .5); color: var(--akzent); }
.tafel-phase.bombe-planted { border-color: rgba(255, 123, 123, .6); color: var(--gefahr); }

/* Die Teams als Tabellen - wie das Scoreboard im Spiel, nur eckiger. */
.team-tabellen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.team-tabelle { width: 100%; table-layout: fixed; border-collapse: collapse; border: 1px solid var(--linie); border-top: 3px solid var(--ct); background: var(--flaeche-2); }
.team-tabelle.t { border-top-color: var(--t); }
.team-tabelle caption { padding: 0 0 8px; text-align: left; font-family: var(--schrift-titel); font-size: 15px; font-weight: 700; color: var(--ct); }
.team-tabelle caption small { margin-left: 10px; font-family: var(--schrift); font-weight: 600; }
.team-tabelle.t caption { color: var(--t); }
.team-tabelle th, .team-tabelle td { padding: 8px 6px; border-top: 1px solid var(--linie); text-align: right; font-size: 13px; white-space: nowrap; }
.team-tabelle thead th {
  border-top: 0; font-family: var(--schrift-titel); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
}
.team-tabelle thead th:not(.spieler-spalte) { width: 38px; }
.team-tabelle thead th.mvp { width: 48px; }
.team-tabelle thead th.ping { width: 52px; padding-right: 12px; }
.team-tabelle th.spieler-spalte, .team-tabelle tbody th { padding-left: 12px; text-align: left; font-weight: 400; }
.team-tabelle td:last-child { padding-right: 12px; }
.team-tabelle tr.tot th, .team-tabelle tr.tot td { opacity: .45; }
.team-tabelle .leer-team { padding: 14px 12px; text-align: left; color: var(--text-3); }
.spieler-zelle { display: flex; align-items: center; gap: 10px; min-width: 0; }
.spieler-zelle .spieler-bild, .mvp-zeile .spieler-bild { flex: none; width: 28px; height: 28px; font-size: 12px; }
img.spieler-bild { object-fit: cover; }
.spieler-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; text-decoration: none; }
a.spieler-link:hover { color: var(--akzent); text-decoration: underline; text-underline-offset: 3px; }
.bot-marke { flex: none; padding: 1px 5px; border: 1px solid var(--linie-3); font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--text-3); }
.team-tabelle td.mvp { color: var(--gold); }
.team-tabelle .ping.gut { color: var(--akzent); }
.team-tabelle .ping.mittel { color: var(--stattrak); }
.team-tabelle .ping.schlecht { color: var(--gefahr); }
.zuschauer { margin-top: 10px; }

/* Die Statistik: letzte Runden links, Maps und MVPs rechts. */
.statistik { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid var(--linie); }
.statistik h3, .statistik h4 { margin: 0; }
.statistik-kopf .umschalter button { min-width: 52px; height: 34px; padding: 0 12px; font-size: 12px; }
.statistik-summe { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; padding: 12px 14px; border: 1px solid var(--linie); background: var(--tief); }
.statistik-summe p { margin: 0; color: var(--text-2); }
.statistik-summe p b { font-size: 18px; color: var(--text); }
.seiten-balken { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; }
.seiten-balken > span:last-child { text-align: right; }
.seiten-balken .balken { height: 8px; background: linear-gradient(90deg, var(--ct) 0 var(--anteil), var(--t) var(--anteil) 100%); }
.seiten-balken .balken.leer { background: var(--flaeche-3); }
.statistik-raster { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.statistik-spalte { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.statistik-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.statistik-block .etikett { font-size: 11px; }
.runden-liste, .map-liste, .mvp-liste { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.runden-zeile {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--linie); border-left: 3px solid var(--linie-3); background: var(--flaeche-2);
}
.runden-zeile.ct { border-left-color: var(--ct); }
.runden-zeile.t { border-left-color: var(--t); }
.runden-nummer { font-size: 12px; color: var(--text-3); }
.runden-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.runden-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.runden-zeile.ct .runden-text b { color: var(--ct); }
.runden-zeile.t .runden-text b { color: var(--t); }
.runden-text .grund { font-weight: 500; color: var(--text-2); }
.runden-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runden-stand { font-size: 14px; font-weight: 600; white-space: nowrap; }
.map-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 8px 10px; padding: 10px 12px; border: 1px solid var(--linie); background: var(--flaeche-2); }
.map-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--schrift-titel); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.map-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: hsl(var(--farbton, 200) 42% 45%); }
.map-name.mit-bild::before { width: 32px; height: 18px; vertical-align: -4px; background: var(--bild) center / cover no-repeat, hsl(var(--farbton, 200) 42% 45%); }
.map-zeile .seiten-balken { grid-column: 1 / -1; }
.mvp-zeile { display: grid; grid-template-columns: 18px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--linie); background: var(--flaeche-2); }
.mvp-platz { font-size: 12px; color: var(--text-3); }
.mvp-zeile:first-child .mvp-platz { color: var(--gold); font-weight: 700; }
.mvp-zeile b { font-size: 13px; color: var(--gold); white-space: nowrap; }

/* ------------------------------------------------------------------ Meldungen */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 12px 14px;
  border: 1px solid var(--linie-3); background: var(--flaeche-3); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.toast::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--akzent); }
.toast.fehler::before { background: var(--gefahr); }
/* Ist ein Dialog offen, liegt unten seine Aktionsleiste - die Meldungen darueber. */
body:has(#huelle:not([hidden])) .toasts { bottom: 112px; }

/* ------------------------------------------------------------------ Changelog */
/* Ein Tag je Kasten, der neueste mit Lime-Kante wie ein Server, der online ist. */
.changelog { display: flex; flex-direction: column; gap: 14px; max-width: 880px; }
.log-tag { border: 1px solid var(--linie); border-left: 3px solid var(--linie-3); background: var(--flaeche); }
.log-tag.neuester { border-left-color: var(--akzent); }
.log-kopf { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 16px 20px 12px; }
.log-kopf h2 { margin: 0; font-family: var(--schrift-titel); font-size: 20px; font-weight: 700; }
.log-tag.neuester .log-kopf .etikett { color: var(--akzent); }
.log-kopf .zahl { margin-left: auto; }
.log-punkte { margin: 0; padding: 0; list-style: none; }
.log-punkte li { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 11px 20px; border-top: 1px solid var(--linie); }
.log-punkte p { margin: 0; color: var(--text-2); line-height: 1.55; }
.log-punkte b { color: var(--text); font-weight: 700; }
.log-punkte code {
  padding: 1px 6px; border: 1px solid var(--linie-3); background: var(--tief);
  font-family: var(--schrift-zahl); font-size: 12px; color: var(--text); white-space: nowrap;
}
.log-bereich {
  justify-self: start; padding: 2px 8px; color: var(--text-3);
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent); background: color-mix(in srgb, currentColor 10%, transparent);
  font-family: var(--schrift-titel); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.log-bereich:empty { visibility: hidden; }
.log-bereich.fun, .umschalter button.fun { color: var(--stattrak); }
.log-bereich.prac, .umschalter button.prac { color: var(--ct); }
.log-bereich.site, .umschalter button.site { color: var(--akzent); }
.log-bereich.server { color: var(--gold); }

/* ------------------------------------------------------------------ Handy-Leiste (nur schmal) */
.handyleiste { display: none; }

/* ------------------------------------------------------------------ Schmale Bildschirme */
/* Damit das Menue oben Platz hat: erst der Text am Join-Knopf, dann der Name, dann das lange "Sign in". */
@media (max-width: 1360px) {
  #server-link .knopf-text { display: none; }
  #server-link { padding: 0 13px; }
}
@media (max-width: 1200px) {
  .marke { min-width: 0; }
  .marke span { display: none; }
  .konto .lang { display: none; }
  .konto .kurz { display: inline; }
}
@media (max-width: 1020px) {
  .leiste { gap: 16px; }
  .kopfmenue button { padding: 0 10px; }
  .kopfmenue button[aria-current="page"]::after { left: 10px; right: 10px; }
}

@media (max-width: 1100px) {
  .werkstatt { grid-template-columns: 1fr; }
  .werkstatt-links { border-right: 0; border-bottom: 1px solid var(--linie); }
}

@media (max-width: 860px) {
  :root { --leiste: 56px; }
  .leiste { gap: 10px; padding: 0 6px 0 14px; }
  .marke { min-width: 0; }
  .marke span, kbd { display: none; }
  .marke-zeichen { width: 26px; height: 26px; }
  .suche { height: 40px; }
  .konto .name, #server-link, .kopfmenue { display: none; }
  .konto .lang { display: none; }
  .konto .kurz { display: inline; }
  .konto .knopf { min-height: 40px; padding: 0 12px; }
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste { position: static; height: auto; overflow: visible; min-width: 0; padding: 12px 0 0 16px; border-right: 0; background: none; gap: 0; }
  .seitenleiste > .etikett, .seitenleiste-block { display: none; }
  .kategorien {
    flex-direction: row; overflow-x: auto; gap: 8px; padding: 0 16px 4px 0; scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  .kategorie { flex: none; width: auto; grid-template-columns: 18px auto; min-height: 44px; padding: 0 14px; border: 1px solid #232933; background: var(--flaeche); font-size: 13px; }
  .kategorie small { display: none; }
  .kategorie.aktiv { box-shadow: none; border-color: var(--akzent); background: rgba(200, 242, 80, .1); }
  .haupt { padding: 16px 16px 100px; }
  /* Passt der Teamfilter nicht neben den Titel, rutscht er darunter. */
  .haupt-kopf { flex-wrap: wrap; margin-bottom: 14px; }
  .titel { font-size: 30px; }
  .umschalter button { min-width: 44px; height: 44px; padding: 0 10px; }
  .waffenleiste { margin-bottom: 14px; }
  .loadout-aktionen { margin: -4px 0 16px; }
  .server-zeile {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name spieler" "map map" "aktionen mehr";
    gap: 10px 12px; padding: 12px 12px 12px 14px;
  }
  .server-name { grid-area: name; }
  .server-spieler { grid-area: spieler; }
  .server-zeile .server-map { grid-area: map; margin: 0; min-height: 52px; }
  .server-zeile .server-aktionen { grid-area: aktionen; }
  .server-mehr { grid-area: mehr; justify-self: end; }
  .log-kopf { padding: 14px 14px 10px; }
  .log-kopf h2 { font-size: 18px; }
  /* Schmal: der Bereich steht vorn in der ersten Zeile, der Text nutzt die ganze Breite. */
  .log-punkte li { display: block; padding: 10px 14px; }
  /* Nicht hoeher als eine Zeile (21,7 px), sonst rueckt auch die zweite ein. */
  .log-bereich { float: left; margin: 1px 10px 0 0; padding: 0 7px; line-height: 18px; }
  .log-bereich:empty { display: none; }
  .server-oben { grid-template-columns: minmax(0, 1fr); }
  .server-oben .server-map { min-height: 110px; }
  .server-werte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Auf dem Handy zuerst der Stand - Map, Werte und "Join" folgen gleich darunter. */
  .server-details .anzeigetafel { order: -1; gap: 10px; padding: 14px 12px; }
  .tafel-stand { font-size: 34px; gap: 8px; }
  .tafel-stand .trenner { font-size: 22px; }
  .team-tabellen, .statistik-raster { grid-template-columns: minmax(0, 1fr); }
  .statistik-summe { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .loadout-aktionen .stand { flex: 1 1 100%; margin: 0 0 4px; }
  .loadout-aktionen .luecke { display: none; }
  .waffe { height: 44px; }
  .raster { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .karte-text { padding: 10px 12px 12px; }
  .karte-name { font-size: 14px; }
  .karte-fuss .karte-float { display: none; }
  .huelle { padding: 0; align-items: stretch; }
  .dialog { max-height: 100vh; max-height: 100dvh; border: 0; }
  .dialog-kopf { padding: 16px 16px 14px; }
  .dialog-kopf h2 { font-size: 26px; }
  .dialog-inhalt { padding: 18px 16px 22px; }
  .werkstatt-links { padding: 16px; }
  .reiter-inhalt { padding: 18px 16px; }
  .aktionsleiste { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .aktionsleiste > .etikett, .aktionsleiste .luecke { display: none; }
  .teamwahl { flex: 1 1 140px; min-height: 48px; padding: 0 12px; }
  .teamwahl small { max-width: none; }
  .aktionsleiste .stand { flex: 1 1 100%; order: 3; }
  .aktionsleiste .knopf.haupt-aktion { flex: 1; order: 5; }
  .aktionsleiste .knopf.rand { order: 4; }
  .zwei { grid-template-columns: 1fr; }
  .handyleiste {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    /* So viele Spalten wie sichtbare Knoepfe - "Servers" gibt es nur mit eingestellten Servern. */
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie);
    background: rgba(12, 14, 18, .96); backdrop-filter: blur(12px);
  }
  .handyleiste button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 52px; border: 0; background: none; font-size: 11px; font-weight: 600; color: var(--text-2);
  }
  .handyleiste button[aria-current="page"] { color: var(--akzent); font-weight: 700; }
  .handyleiste svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .handyleiste .zahl {
    position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--akzent); color: var(--akzent-text); font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
  }
  .toasts { left: 12px; right: 12px; bottom: 84px; }
  body:has(#huelle:not([hidden])) .toasts { top: calc(12px + env(safe-area-inset-top)); bottom: auto; }
}

@media (max-width: 520px) {
  .tafel-team .lang, .tafel-lebend i { display: none; }
  .tafel-team .kurz { display: inline; }
  .tafel-lebend small { margin: 0; }
  .tafel-phase { white-space: normal; text-align: center; }
  .team-tabelle th, .team-tabelle td { padding: 8px 4px; font-size: 12px; }
  .team-tabelle thead th:not(.spieler-spalte) { width: 30px; }
  .team-tabelle thead th.mvp { width: 38px; }
  .team-tabelle thead th.ping { width: 42px; padding-right: 10px; }
  .team-tabelle th.spieler-spalte, .team-tabelle tbody th { padding-left: 10px; }
  .spieler-zelle { gap: 8px; }
  .werte { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .wert { padding: 10px; }
  .wert b { font-size: 14px; }
}

/* ------------------------------------------------------------------ Ranking */
.ranking { display: grid; gap: 14px; align-content: start; }
.rang-hinweis { margin: 0; font-size: 13px; }
.rang-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; grid-auto-rows: min-content; }
.rang-zeile {
  display: grid; grid-template-columns: 40px 32px minmax(0, 1fr) 80px 120px 92px; align-items: center; gap: 12px;
  padding: 8px 14px; border-radius: 10px; background: var(--flaeche, #14171d); border: 1px solid #ffffff0f;
}
.rang-zeile.platz1 { border-color: #e6c06a66; background: linear-gradient(90deg, #e6c06a1f, transparent 60%), var(--flaeche, #14171d); }
.rang-zeile.platz2 { border-color: #c9d1d955; }
.rang-zeile.platz3 { border-color: #d08a5255; }
.rang-platz { font: 700 16px 'Chakra Petch', sans-serif; text-align: center; color: #8a93a0; }
.platz1 .rang-platz { color: #e6c06a; }
.platz2 .rang-platz { color: #c9d1d9; }
.platz3 .rang-platz { color: #d08a52; }
.rang-avatar { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.rang-avatar.ohne { background: #ffffff12; }
.rang-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rang-bild { width: 80px; height: 32.5px; }
.rang-stufe { color: #b9c6cf; font-size: 13px; }
.rang-rating {
  justify-self: end; font: 700 15px 'Chakra Petch', sans-serif; padding: 3px 10px; border-radius: 6px;
  background: #ffffff10; font-variant-numeric: tabular-nums;
}
.rang-rating.r0 { color: #b8c2cc; }
.rang-rating.r1 { color: #8cc6ff; }
.rang-rating.r2 { color: #6f8cff; }
.rang-rating.r3 { color: #b98cff; }
.rang-rating.r4 { color: #f07ad8; }
.rang-rating.r5 { color: #ff6b6b; }
.rang-rating.r6 { color: #f2cf74; }
.rang-legende summary { cursor: pointer; color: #b9c6cf; font-weight: 600; }
.rang-legende ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rang-legende li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.rang-legende img { width: 64px; height: 26px; }
@media (max-width: 640px) {
  .rang-zeile { grid-template-columns: 28px 28px minmax(0, 1fr) 64px 78px; gap: 8px; padding: 8px 10px; }
  .rang-stufe { display: none; }
  .rang-bild { width: 64px; height: 26px; }
  .rang-avatar { width: 28px; height: 28px; }
}

/* ------------------------------------------------------------------ Surf
   Die Bestenlisten des Surf-Servers (/api/surf) und die 3D-Ansicht eines Laufs (surf3d.js). */
.surf { display: grid; gap: 14px; align-content: start; }
.surf-hinweis { margin: 0; font-size: 13px; }
.surf-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.surf-karte {
  position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--linie-2); background: var(--flaeche); transition: border-color .15s, transform .15s;
}
.surf-karte:hover { border-color: color-mix(in srgb, var(--akzent) 55%, transparent); transform: translateY(-1px); }
.surf-karte-bild { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--flaeche-3); }
.surf-karte-bild.ohne, .surf-kopf-bild.ohne { display: block; background: linear-gradient(135deg, #18202a, #10141a); }
.surf-karte-text { display: grid; gap: 3px; padding: 10px 12px 12px; }
.surf-karte-name { font-family: var(--schrift-titel); font-size: 17px; font-weight: 700; }
.surf-karte-datei { font-family: var(--schrift-zahl); font-size: 11px; color: var(--text-3); }
.surf-karte-rekord { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.surf-karte-rekord b { font-family: var(--schrift-zahl); color: var(--akzent); font-weight: 600; }
.surf-karte-rekord.keine { color: var(--text-3); }
.surf-karte small { color: var(--text-3); font-size: 12px; }
.surf-tier {
  position: absolute; top: 8px; left: 8px; padding: 2px 8px; background: rgba(10, 12, 16, .82);
  font: 700 12px var(--schrift-titel); letter-spacing: .06em; border: 1px solid currentColor;
}
.surf-tier.t1 { color: #8be38b; }
.surf-tier.t2 { color: #c8f250; }
.surf-tier.t3 { color: #f2cf74; }
.surf-tier.t4 { color: #ffa45c; }
.surf-tier.t5 { color: #ff6b6b; }
.surf-tier.t6 { color: #d48cff; }
.surf-kopf { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: center; }
.surf-kopf-bild { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--linie-2); }
.surf-kopf-text { display: grid; gap: 8px; justify-items: start; }
.surf-kopf-text h3 { margin: 0; font-family: var(--schrift-titel); font-size: 28px; line-height: 1.05; }
.surf-kopf-text a { color: var(--akzent); text-decoration: none; }
.surf-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.surf-zeile {
  display: grid; grid-template-columns: 40px 32px minmax(0, 1fr) 104px 92px 110px 96px; align-items: center; gap: 12px;
  padding: 8px 14px; border-radius: 10px; background: var(--flaeche, #14171d); border: 1px solid #ffffff0f;
}
.surf-zeile.platz1 { border-color: #e6c06a66; background: linear-gradient(90deg, #e6c06a1f, transparent 60%), var(--flaeche, #14171d); }
.surf-zeile.platz2 { border-color: #c9d1d955; }
.surf-zeile.platz3 { border-color: #d08a5255; }
.surf-zeit { font: 600 15px var(--schrift-zahl); font-variant-numeric: tabular-nums; }
.platz1 .surf-zeit { color: #e6c06a; }
.surf-abstand { font: 500 13px var(--schrift-zahl); color: var(--text-3); text-align: right; }
.platz1 .surf-abstand { color: #e6c06a; font-family: var(--schrift-titel); letter-spacing: .06em; text-transform: uppercase; }
.surf-datum { color: var(--text-3); font-size: 12px; text-align: right; }
.surf-ansehen { justify-self: end; min-height: 32px; padding: 0 12px; }
.surf-ansehen svg { width: 14px; height: 14px; color: var(--akzent); fill: var(--akzent); }
.surf-ohne { justify-self: end; padding-right: 14px; }
@media (max-width: 760px) {
  .surf-kopf { grid-template-columns: 1fr; }
  .surf-zeile { grid-template-columns: 28px 28px minmax(0, 1fr) 92px 40px; gap: 8px; padding: 8px 10px; }
  .surf-abstand, .surf-datum, .surf-ansehen-text { display: none; }
  .surf-ansehen { padding: 0 10px; }
  .surf-ohne { padding-right: 12px; }
  .r3d-tasten { transform: scale(.82); transform-origin: top left; }
  .r3d-zahlen { top: 30px; font-size: 10px; }
  .r3d-graph { width: 42%; padding: 4px 6px 6px; }
  .r3d-graph-bild { height: 30px; }
}

/* Die 3D-Ansicht */
.r3d-inhalt { display: grid; gap: 10px; }
.r3d { display: grid; gap: 10px; }
.r3d-laedt { margin: 0; padding: 120px 0; text-align: center; }
.r3d-buehne { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 300px); min-height: 260px; background: #0b0d11; border: 1px solid var(--linie-2); overflow: hidden; }
.r3d-leinwand { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: none; }
.r3d-leinwand:active { cursor: grabbing; }
.r3d-hud {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: grid; grid-template-columns: auto auto; align-items: baseline;
  column-gap: 6px; padding: 8px 16px; background: rgba(10, 12, 16, .72); border: 1px solid var(--linie-2); pointer-events: none; text-align: center;
}
.r3d-tempo { font: 700 30px var(--schrift-titel); font-variant-numeric: tabular-nums; line-height: 1; }
.r3d-hud small { font: 600 12px var(--schrift-titel); color: var(--text-3); }
.r3d-zeit { grid-column: 1 / -1; font: 500 14px var(--schrift-zahl); color: var(--text-2); }
.r3d-legende { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 8px; font: 500 11px var(--schrift-zahl); color: var(--text-3); pointer-events: none; }
.r3d-legende i { width: 110px; height: 6px; background: linear-gradient(90deg, #3b82f6, #22d3ee, #22c55e, #eab308, #ef4444); }
/* Tasten, Zahlen und Tempo-Graph ueber dem Bild (wie im Surf-HUD) */
.r3d-tasten {
  position: absolute; top: 12px; left: 12px; display: grid; grid-template-columns: repeat(3, 26px) 10px repeat(2, 40px);
  grid-template-areas: ". w . . links rechts" "a s d . space ctrl"; gap: 4px; pointer-events: none;
}
.r3d-taste {
  display: grid; place-items: center; height: 24px; padding: 0 4px; font: 600 10px var(--schrift-titel); letter-spacing: .04em;
  color: var(--text-3); background: rgba(10, 12, 16, .66); border: 1px solid var(--linie-2); transition: background .06s, color .06s;
}
.r3d-taste.an { color: #0b0d11; background: var(--akzent); border-color: var(--akzent); }
.r3d-taste-w { grid-area: w; } .r3d-taste-a { grid-area: a; } .r3d-taste-s { grid-area: s; } .r3d-taste-d { grid-area: d; }
.r3d-taste-links { grid-area: links; } .r3d-taste-rechts { grid-area: rechts; } .r3d-taste-space { grid-area: space; } .r3d-taste-ctrl { grid-area: ctrl; }
.r3d-zahlen {
  position: absolute; top: 34px; right: 12px; display: flex; gap: 4px 10px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%;
  font: 600 11px var(--schrift-titel); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); pointer-events: none;
}
.r3d-zahlen b { color: var(--text-1, #e8ecf2); margin-right: 6px; font-family: var(--schrift-zahl); }
.r3d-graph {
  position: absolute; left: 12px; bottom: 12px; width: min(220px, 34%); padding: 6px 8px 8px; background: rgba(10, 12, 16, .72);
  border: 1px solid var(--linie-2);
}
.r3d-graph-kopf { display: flex; justify-content: space-between; gap: 8px; font: 600 10px var(--schrift-titel); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.r3d-graph-bild { display: block; width: 100%; height: 44px; margin-top: 4px; cursor: pointer; }
/* Laden der echten Karte - ueber dem Tempo */
.r3d-status {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); padding: 5px 12px; white-space: nowrap;
  font: 500 12px var(--schrift-zahl); color: var(--text-2); background: rgba(10, 12, 16, .72); border: 1px solid var(--linie-2); pointer-events: none;
}
.r3d-status[hidden] { display: none; }
.r3d-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.r3d-zeitleiste { position: relative; flex: 1 1 220px; display: flex; align-items: center; }
.r3d-regler { flex: 1 1 auto; width: 100%; accent-color: var(--akzent); }
.r3d-marken { position: absolute; left: 8px; right: 8px; bottom: -3px; height: 6px; pointer-events: none; }
.r3d-marken i { position: absolute; top: 0; width: 1px; height: 6px; background: #e6c06a; }
.r3d-aus { visibility: hidden; }
/* Mit echter Karte (heller Himmel): die Zahlen in einem Kasten, oben rechts statt unter der Tempo-Legende */
.r3d-mit-karte .r3d-zahlen { top: 12px; padding: 5px 8px; background: rgba(10, 12, 16, .72); border: 1px solid var(--linie-2); }
.r3d-voll { display: inline-grid; place-items: center; padding: 0 9px; }
.r3d-voll svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.r3d-weg { display: none; }
/* Vollbild: das Bild fuellt den Schirm, die Leiste bleibt darunter */
.r3d:fullscreen { display: flex; flex-direction: column; gap: 8px; padding: 8px; background: #0b0d11; }
.r3d:fullscreen .r3d-buehne { flex: 1 1 auto; aspect-ratio: auto; max-height: none; min-height: 0; }
.r3d-gesamt { font: 500 13px var(--schrift-zahl); color: var(--text-2); min-width: 170px; }
.r3d-gruppe { display: inline-flex; }
.r3d-knopf {
  min-height: 34px; padding: 0 11px; border: 1px solid var(--linie-3); background: var(--flaeche-2); color: var(--text-2);
  font: 600 13px var(--schrift-titel);
}
.r3d-gruppe .r3d-knopf + .r3d-knopf { border-left: 0; }
.r3d-knopf[aria-pressed="true"] { background: rgba(200, 242, 80, .12); border-color: var(--akzent); color: var(--akzent); }
.r3d-spielen { min-width: 84px; background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.r3d-tipp { margin: 0; }
