/* ============================================================
   Exec. – Spielerportal (oeffentliche Website + Spielerbereich)
   Eigene Datei, damit das Team-Dashboard (style.css) unangetastet
   bleibt: dort faerbt jeder Server die Oberflaeche selbst ein,
   hier gilt immer die Marke (weisser Akzent auf warmem Anthrazit).
   Gleiche Designsprache: Licht von oben, feines Korn, Mono-Labels.
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0f13;
  --bg-deep: #08090b;
  --bg-2: #16171c;
  --bg-3: #1e2026;
  --bg-4: #262930;
  --border: #2a2d35;
  --border-soft: rgba(255, 255, 255, .07);
  --text: #edeff2;
  --text-dim: #9aa4b0;
  --text-3: #6a7380;
  --accent: #ffffff;
  --accent-dim: rgba(255, 255, 255, .12);
  --accent-glow: rgba(255, 255, 255, .3);
  --accent-text: #14151a;
  --danger: #ee5c70;
  --danger-dim: rgba(238, 92, 112, .13);
  --success: #3fcb87;
  --success-dim: rgba(63, 203, 135, .13);
  --warn: #e6c054;
  --warn-dim: rgba(230, 192, 84, .13);
  --brass: #e3b761;
  --brass-dim: rgba(227, 183, 97, .13);
  --info: #5ea7f2;
  --info-dim: rgba(94, 167, 242, .12);
  --discord: #8b95f8;
  --discord-dim: rgba(88, 101, 242, .16);
  --warn-dim: rgba(230, 192, 84, .13);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 24px 70px -22px rgba(0, 0, 0, .8);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/></svg>");
  --top-h: 66px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: rgba(255, 255, 255, .13) transparent; }
body {
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    var(--grain),
    radial-gradient(1200px 620px at 50% -18%, rgba(255, 255, 255, .07), transparent 68%),
    radial-gradient(900px 620px at 105% 12%, rgba(255, 255, 255, .022), transparent 62%);
  background-attachment: fixed, fixed, fixed;
  background-blend-mode: overlay, normal, normal;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 620; }
::selection { background: rgba(255, 255, 255, .22); }
::placeholder { color: var(--text-3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .09); border-radius: 8px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .18); background-clip: padding-box; }
button, a, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; border-radius: 8px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
.ico { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor;
       stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Kleine Mono-Labels ueber Abschnitten – wie im Dashboard */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 560;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: currentColor; opacity: .5;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--bg-3); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-size: 13px; font-weight: 580; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, filter .15s, transform .06s;
}
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--accent); border-color: transparent; color: var(--accent-text); font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 18px -6px var(--accent-glow);
}
.btn-primary:hover { border-color: transparent; filter: brightness(.94); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); border-color: transparent; }
.btn-line { background: transparent; border-color: var(--border); color: var(--text); }
.btn-line:hover { background: var(--bg-3); }
.btn-danger { background: var(--danger-dim); border-color: transparent; color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-discord { background: var(--discord-dim); border-color: transparent; color: var(--discord); }
.btn-discord:hover { border-color: var(--discord); }
/* Aktiver Favoriten-Knopf (Serveransicht) - gleicher gelblicher Ton wie die Kachel */
.btn.is-fav {
  color: var(--brass); background: var(--brass-dim);
  border-color: color-mix(in srgb, var(--brass) 45%, transparent);
}
.btn.is-fav:hover { border-color: var(--brass); }
.btn.is-fav .ico { fill: currentColor; }
.btn-lg { padding: 13px 24px; font-size: 14.5px; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 4px 11px;
  font-size: 11.5px; font-weight: 560; color: var(--text-dim);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.on { color: var(--success); background: var(--success-dim); border-color: transparent; }
.chip.off { color: var(--text-3); }
.chip.owner { color: var(--brass); background: var(--brass-dim); border-color: transparent; }
.chip.team { color: var(--info); background: var(--info-dim); border-color: transparent; }
.chip.discord { color: var(--discord); background: var(--discord-dim); border-color: transparent; }
.chip.locked { color: var(--danger); background: var(--danger-dim); border-color: transparent; }
.chip.warn { color: var(--warn); background: var(--warn-dim); border-color: transparent; }

.mono { font-family: var(--mono); }
.dim { color: var(--text-dim); }
.hint { color: var(--text-3); font-size: 12.5px; line-height: 1.65; }

/* ================= TOPBAR ================= */
.top {
  position: sticky; top: 0; z-index: 60; height: var(--top-h);
  display: flex; align-items: center; gap: 26px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand span { font-size: 19px; font-weight: 740; letter-spacing: -.04em; }
.top-nav { display: flex; gap: 4px; margin-left: 8px; }
.top-nav a {
  padding: 7px 13px; border-radius: 8px; color: var(--text-dim);
  font-size: 13px; font-weight: 540; transition: color .15s, background .15s;
}
.top-nav a:hover { color: var(--text); background: var(--bg-3); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }

/* Konto-Chip mit Menue */
.account { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 5px 14px 5px 5px; color: var(--text);
  transition: border-color .15s, background .15s;
}
.account-btn:hover { border-color: var(--border); background: var(--bg-3); }
.account-btn .avatar { width: 28px; height: 28px; border-radius: 50%; }
.account-btn b { font-size: 13px; font-weight: 600; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 232px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 7px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 2px; z-index: 70;
}
.account-menu a, .account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: 9px; border: none; background: none;
  color: var(--text-dim); font-size: 13px; font-weight: 540; cursor: pointer; text-align: left;
}
.account-menu a:hover, .account-menu button:hover { background: var(--bg-3); color: var(--text); }
.account-menu .sep { height: 1px; background: var(--border-soft); margin: 5px 4px; }
.account-menu .danger { color: var(--danger); }
.account-menu .danger:hover { background: var(--danger-dim); color: var(--danger); }
.account-head { padding: 9px 11px 10px; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.account-head b { display: block; font-size: 13.5px; }
.account-head span { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }

/* ================= LANDING ================= */
.wrap { width: min(1160px, 100% - clamp(28px, 8vw, 80px)); margin: 0 auto; }
section.band { padding: clamp(64px, 9vw, 120px) 0; }

.hero { position: relative; padding: clamp(58px, 9vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero::before {
  content: ""; position: absolute; inset: -120px -40px auto; height: 620px; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(760px 420px at 50% 34%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(760px 420px at 50% 34%, #000 10%, transparent 72%);
}
.hero-inner { position: relative; text-align: center; display: grid; justify-items: center; gap: 22px; }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 70px); line-height: 1.03; font-weight: 760;
  letter-spacing: -.045em; max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #fff 30%, #98a2ad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
  color: var(--text-dim); font-size: clamp(15px, 1.6vw, 17.5px);
  max-width: 62ch; line-height: 1.68;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }

/* Produkt-Vorschau: nachgebaute Portal-Oberflaeche, kein Bild */
.shot {
  position: relative; margin-top: clamp(38px, 5vw, 62px);
  border: 1px solid var(--border-soft); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-deep));
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, color-mix(in srgb, var(--bg) 88%, transparent));
}
.shot-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-soft); background: rgba(0, 0, 0, .22);
}
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-4); }
.shot-bar span {
  margin-left: 10px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; color: var(--text-3);
}
.shot-body { padding: clamp(18px, 3vw, 30px); display: grid; gap: 16px; }
.shot-hello {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px;
}
.shot-hello .av {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(140deg, #3a3d47, #202329); flex-shrink: 0;
}
.shot-hello .l1 { width: 168px; height: 12px; border-radius: 4px; background: var(--bg-4); }
.shot-hello .l2 { width: 104px; height: 9px; border-radius: 4px; background: var(--bg-3); margin-top: 8px; }
.shot-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shot-tile {
  height: 122px; border-radius: 14px; padding: 15px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; justify-content: space-between;
}
.shot-tile .sq { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-4); }
.shot-tile .l1 { width: 74%; height: 10px; border-radius: 4px; background: var(--bg-4); }
.shot-tile .l2 { width: 46%; height: 8px; border-radius: 4px; background: var(--bg-3); margin-top: 7px; }
.shot-tile.plus {
  align-items: center; justify-content: center; color: var(--text-3);
  border-style: dashed; border-color: var(--border); font-size: 26px; font-weight: 300;
}

.strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  background: var(--bg-2); box-shadow: var(--shadow-1);
  margin-top: clamp(40px, 6vw, 72px);
}
.strip div { padding: 22px 26px; }
.strip div + div { border-left: 1px solid var(--border-soft); }
.strip b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.strip span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
              text-transform: uppercase; color: var(--text-3); }

.section-title { max-width: 60ch; margin-bottom: clamp(28px, 4vw, 44px); display: grid; gap: 14px; }
.section-title h2 {
  font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; letter-spacing: -.035em; line-height: 1.15;
}
.section-title p { color: var(--text-dim); font-size: 15px; }

/* 320px Mindestbreite ergibt bei 1160px Inhaltsbreite genau drei Spalten */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card {
  position: relative; padding: 26px 24px 24px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }
.card .ic {
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--border-soft); color: var(--text);
}
.card .ic .ico { width: 18px; height: 18px; }
.card h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; margin-bottom: 7px; }
.card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.65; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step {
  padding: 26px 24px; border-radius: var(--radius);
  border: 1px solid var(--border-soft); background: var(--bg-2);
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--text-3); letter-spacing: .1em; margin-bottom: 14px;
}
.step h3 { font-size: 15.5px; font-weight: 650; margin-bottom: 7px; }
.step p { color: var(--text-dim); font-size: 13.5px; }

.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details {
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  background: var(--bg-2); padding: 4px 18px;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 15px 0;
  font-size: 14.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-size: 18px; font-weight: 300; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--text-dim); font-size: 13.5px; padding: 0 0 16px; max-width: 76ch; }

.cta-final {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--border-soft); border-radius: 22px;
  padding: clamp(42px, 6vw, 72px) 28px;
  background:
    radial-gradient(680px 320px at 50% -30%, rgba(255, 255, 255, .1), transparent 70%),
    var(--bg-2);
  display: grid; justify-items: center; gap: 18px;
}
.cta-final h2 { font-size: clamp(25px, 3.4vw, 36px); font-weight: 720; letter-spacing: -.035em; }
.cta-final p { color: var(--text-dim); max-width: 56ch; }

footer.foot {
  border-top: 1px solid var(--border-soft); margin-top: clamp(56px, 8vw, 96px);
  padding: 34px 0 44px; display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center; justify-content: space-between;
}
footer.foot .links { display: flex; flex-wrap: wrap; gap: 20px; }
footer.foot a, footer.foot p { color: var(--text-3); font-size: 12.5px; }
footer.foot a:hover { color: var(--text-dim); }

/* ================= RECHTLICHES (Terms/Privacy) ================= */
.legal-wrap {
  width: min(760px, 100% - clamp(28px, 8vw, 80px)); margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) 0 clamp(56px, 8vw, 96px);
}
.legal-head { margin-bottom: clamp(30px, 5vw, 44px); }
.legal-head h1 {
  font-size: clamp(28px, 4.4vw, 40px); font-weight: 740; letter-spacing: -.035em;
  margin-top: 14px; line-height: 1.1;
}
.legal-sub { color: var(--text-3); font-size: 13px; margin-top: 12px; }
.legal h2 {
  font-size: 17.5px; font-weight: 660; letter-spacing: -.015em;
  margin: 40px 0 12px; padding-top: 4px; scroll-margin-top: 90px;
}
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 14.5px; font-weight: 640; margin: 20px 0 8px; color: var(--text); }
.legal p { color: var(--text-dim); font-size: 14.5px; line-height: 1.75; margin-bottom: 14px; }
.legal p strong { color: var(--text); font-weight: 610; }
.legal ul { margin: -4px 0 16px 22px; color: var(--text-dim); font-size: 14.5px; line-height: 1.75; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--accent); }
.legal address { font-style: normal; color: var(--text-dim); font-size: 14.5px; line-height: 1.75; margin-bottom: 14px; }
.legal hr { border: none; border-top: 1px solid var(--border-soft); margin: 40px 0; }

/* ================= APP-BEREICH ================= */
.app-view { padding: clamp(28px, 4vw, 44px) 0 96px; }
.crumb {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  color: var(--text-3); font-size: 12.5px; font-weight: 540; cursor: pointer;
  background: none; border: none;
}
.crumb:hover { color: var(--text); }

/* Begruessungskachel */
.hello {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(18px, 3vw, 30px);
  padding: clamp(22px, 3vw, 32px); border-radius: 20px;
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(620px 240px at 0% -40%, rgba(255, 255, 255, .07), transparent 70%),
    var(--bg-2);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.hello-av {
  width: 84px; height: 84px; border-radius: 22px; flex-shrink: 0; object-fit: cover;
  background: var(--bg-3); border: 1px solid var(--border-soft);
}
.hello-main { flex: 1 1 320px; min-width: 0; }
.hello-main h1 {
  font-size: clamp(24px, 3.2vw, 33px); font-weight: 720; letter-spacing: -.035em; line-height: 1.15;
}
.hello-main h1 span { color: var(--text-3); }
.hello-main p { color: var(--text-dim); font-size: 13.5px; margin-top: 7px; max-width: 62ch; }
.hello-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.hello-stats { display: flex; gap: 0; flex-shrink: 0; }
.hello-stats div { padding: 0 clamp(14px, 2vw, 24px); text-align: center; }
.hello-stats div + div { border-left: 1px solid var(--border-soft); }
.hello-stats b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.hello-stats span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-3);
}
.hello-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.sec-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: clamp(34px, 5vw, 48px) 0 16px;
}
.sec-head h2 { font-size: 17px; font-weight: 660; letter-spacing: -.02em; }
.sec-head .count {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 1px 8px;
}
.sec-head p { color: var(--text-3); font-size: 12.5px; margin-left: auto; }

/* Kachelraster (Server, Charaktere) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border-radius: var(--radius); text-align: left;
  font-size: 14px; line-height: 1.6;
  background: var(--bg-2); border: 1px solid var(--border-soft); color: var(--text);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03);
  cursor: pointer; transition: border-color .18s, transform .18s, background .18s;
}
.tile:hover { border-color: var(--border); transform: translateY(-2px); }
.tile:disabled, .tile.locked { cursor: not-allowed; opacity: .72; }
.tile:disabled:hover, .tile.locked:hover { transform: none; border-color: var(--border-soft); }
.tile-top { display: flex; align-items: center; gap: 13px; }
.tile-logo {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0; object-fit: cover;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 15px; font-weight: 620; color: var(--text-dim);
}
.tile-name { min-width: 0; }
.tile-name b {
  display: block; font-size: 15px; font-weight: 640; letter-spacing: -.015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-name span { font-size: 12px; color: var(--text-3); }
.tile-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tile-line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); }
.tile-add {
  align-items: center; justify-content: center; text-align: center; gap: 10px;
  border-style: dashed; border-color: var(--border); background: transparent; min-height: 168px;
}
.tile-add:hover { background: var(--bg-2); border-style: dashed; }
.tile-add .plus {
  width: 42px; height: 42px; border-radius: 13px; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--border-soft); color: var(--text-dim);
}
.tile-add b { font-size: 14px; font-weight: 620; }
.tile-add p { color: var(--text-3); font-size: 12.5px; max-width: 30ch; }
.tile-admin {
  border-color: color-mix(in srgb, var(--brass) 42%, transparent);
  background: linear-gradient(180deg, var(--brass-dim), transparent 62%), var(--bg-2);
}
.tile-admin .tile-logo { color: var(--brass); border-color: color-mix(in srgb, var(--brass) 36%, transparent); }
.tile-logo .ico { width: 20px; height: 20px; }

.empty {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 44px 26px; text-align: center; color: var(--text-3); font-size: 13.5px;
  display: grid; gap: 6px; justify-items: center;
}
.empty b { color: var(--text-dim); font-size: 14.5px; font-weight: 600; }

/* Profil / Detailkarten */
.panel {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.panel + .panel, .grid-2 + .panel, .panel + .grid-2 { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 14px; }
.panel-head h3 { font-size: 14px; font-weight: 650; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid-2 .panel + .panel { margin-top: 0; }

.kv { display: grid; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 18px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text); font-weight: 560; text-align: right; }

.linked {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--bg-3);
}
.linked .mark {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-4); border: 1px solid var(--border-soft);
}
.linked .mark img { width: 100%; height: 100%; border-radius: 11px; object-fit: cover; }
.linked .mark .ico, .auth-btn .mark .ico { width: 20px; height: 20px; }
.linked b { display: block; font-size: 13.5px; }
.linked span { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.linked .btn { margin-left: auto; }

/* Serverkopf */
.server-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: clamp(20px, 3vw, 26px); border-radius: 20px;
  border: 1px solid var(--border-soft); background: var(--bg-2);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.server-head .logo {
  width: 66px; height: 66px; border-radius: 18px; object-fit: cover; flex-shrink: 0;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 20px; font-weight: 620; color: var(--text-dim);
}
.server-head h1 { font-size: clamp(21px, 2.6vw, 27px); font-weight: 700; letter-spacing: -.03em; }
.server-head .meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.server-head .side { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

/* Onboarding-Assistent (frisch erstellter Server: Server-Key + Autorisieren) */
.onb-steps { display: flex; align-items: flex-start; gap: 0; margin: clamp(22px, 3vw, 30px) 2px 22px; }
.onb-step { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; flex-shrink: 0; text-align: center; }
.onb-step-num {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--bg-3); color: var(--text-3);
  border: 1.5px solid var(--border); transition: all .25s ease;
}
.onb-step-label { font-size: 12px; font-weight: 600; color: var(--text-3); transition: color .25s ease; }
.onb-step.is-active .onb-step-num {
  background: var(--accent-dim); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.onb-step.is-active .onb-step-label { color: var(--text); }
.onb-step.is-done .onb-step-num { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.onb-step.is-done .onb-step-num::after { content: "✓"; }
.onb-step.is-done .onb-step-num span { display: none; }
.onb-step.is-done .onb-step-label { color: var(--text); }
.onb-step-track { flex: 1; height: 1.5px; background: var(--border); margin: 16px -4px 0; transition: background .3s ease; min-width: 24px; }
.onb-step-track.is-done { background: var(--accent); }

.onb-card { max-width: 560px; }
.onb-card .hint { margin-bottom: 16px; }
.onb-authorize {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-text); font-weight: 650; font-size: 13.5px;
  box-shadow: 0 8px 22px -8px var(--accent-glow); transition: transform .18s ease, box-shadow .18s ease;
  width: fit-content;
}
.onb-authorize:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px var(--accent-glow); }

.onb-success {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.onb-success-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--success-dim); color: var(--success);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.onb-success b { font-size: 14.5px; }
.onb-success p { color: var(--text-dim); font-size: 12.5px; margin-top: 3px; width: 100%; }
.onb-success .btn { margin-top: 4px; }

/* Charakter-Kopf (eigene Klasse statt .server-head: braucht die groessere Figur) */
.char-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
  padding: clamp(18px, 3vw, 24px); border-radius: 20px;
  border: 1px solid var(--border-soft); background: var(--bg-2);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.char-hero-figure {
  width: 66px; height: 66px; border-radius: 18px; flex-shrink: 0;
  background: var(--bg-3); border: 1px solid var(--border-soft); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
}
.char-hero-figure .ico { width: 28px; height: 28px; }
.char-hero-main { min-width: 0; }
.char-hero h1 { font-size: clamp(22px, 2.8vw, 29px); font-weight: 720; letter-spacing: -.03em; }
.char-hero .meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.char-hero .side { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

/* Das Handy selbst bringt sein eigenes Aussehen mit (static/phone.css) - hier
   steht nur, wo es steht: rechts neben dem Steckbrief, und beim Scrollen
   bleibt es stehen, damit man es waehrend des Lesens bedienen kann. */
.char-split {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 32vw, 500px);
  gap: clamp(18px, 2.4vw, 34px);
}
.char-split .char-main {
  min-width: 0; display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px);
}
/* Das Handy bleibt beim Scrollen stehen. Der Wert unten muss zum topOffset in
   portal.js passen, damit es sich auf genau diese Hoehe einpasst. */
.char-phone { position: sticky; top: calc(var(--top-h) + 20px); min-width: 0; }

/* Zu schmal fuer zwei Spalten: das Handy rutscht unter den Steckbrief. */
@media (max-width: 1160px) {
  .char-split { grid-template-columns: minmax(0, 1fr); }
  .char-phone { position: static; justify-self: center; width: min(500px, 100%); }
}

/* Charakter-Dashboard: Kennzahlen */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat {
  padding: 20px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.stat .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-3);
}
.stat .val { font-size: 27px; font-weight: 700; letter-spacing: -.035em; margin-top: 9px; }
.stat .sub { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.bio { white-space: pre-wrap; color: var(--text-dim); font-size: 13.5px; line-height: 1.7; }

/* ================= FORMULARE / MODAL ================= */
label.field { display: block; margin-bottom: 14px; color: var(--text-dim); font-size: 12.5px; font-weight: 560; }
label.field small { color: var(--text-3); font-weight: 400; }
label.field input, label.field select, label.field textarea {
  width: 100%; margin-top: 7px;
  background: var(--bg-deep); color: var(--text); color-scheme: dark;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
label.field textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
label.field input:focus, label.field select:focus, label.field textarea:focus {
  outline: none; border-color: rgba(255, 255, 255, .55); box-shadow: 0 0 0 3px var(--accent-dim);
}
/* Farbwaehler: nur ein Feld breit, sonst sieht er aus wie ein leerer Balken */
label.field input[type="color"] {
  display: block; width: 64px; height: 46px; padding: 4px; cursor: pointer;
}
label.field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
label.field input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
label.field input[type="color"]::-moz-color-swatch { border: none; border-radius: 6px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 2px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: 22px; background: rgba(4, 5, 7, .74);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .16s ease-out;
}
.modal {
  width: min(520px, 100%); max-height: 88vh; overflow: auto;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px; box-shadow: var(--shadow-2);
  animation: pop .18s cubic-bezier(.2, .9, .3, 1.2);
}
.modal h2 { font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.modal .sub { color: var(--text-dim); font-size: 13.5px; margin: 7px 0 22px; }
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 32px; height: 32px;
  border-radius: 9px; border: 1px solid var(--border-soft); background: var(--bg-3);
  color: var(--text-dim); cursor: pointer; display: grid; place-items: center;
}
.modal-close:hover { color: var(--text); }
.modal-wrap { position: relative; width: min(520px, 100%); }

/* Anmelden/Registrieren */
.auth-choice { display: grid; gap: 10px; }
.auth-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 15px 17px; border-radius: 13px; cursor: pointer; font-size: 14px; line-height: 1.55;
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  transition: border-color .15s, background .15s, transform .06s;
}
.auth-btn:hover { border-color: var(--text-3); background: var(--bg-4); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-btn .mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--bg-deep); border: 1px solid var(--border-soft);
}
.auth-btn .mark img { width: 22px; height: 22px; object-fit: contain; }
.auth-btn b { display: block; font-size: 14px; font-weight: 620; }
.auth-btn span { font-size: 12px; color: var(--text-3); }
.auth-btn.discord .mark { color: var(--discord); }
.auth-note {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft);
  color: var(--text-3); font-size: 12px; line-height: 1.65;
}
.auth-switch { color: var(--text-dim); font-size: 13px; margin-top: 16px; text-align: center; }
.auth-switch button {
  background: none; border: none; color: var(--text); font-weight: 600;
  cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}

/* ================= TOASTS ================= */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  display: flex; flex-direction: column; gap: 9px; pointer-events: none;
}
.toast {
  background: var(--bg-3); border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm); padding: 12px 17px;
  font-size: 13px; box-shadow: var(--shadow-2); animation: pop .18s ease-out;
  max-width: 380px; pointer-events: auto;
}
.toast-act {
  background: none; border: none; color: var(--text); font-weight: 640; font-size: 12.5px;
  cursor: pointer; margin-left: 12px; text-decoration: underline; text-underline-offset: 3px;
}
.toast-act:hover { color: var(--accent); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.spinner {
  width: 15px; height: 15px; border-radius: 50%; display: inline-block;
  border: 2px solid rgba(255, 255, 255, .25); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 70px 0; color: var(--text-3); gap: 12px; }

/* ================= SERVERAUSWAHL =================
   Die Kachel ist ein <article>, nicht ein <button>: Favoriten-Stern und
   "Entfernen" sind eigene Knoepfe und duerfen nicht in einem Button liegen.
   Der eigentliche Klick auf die Kachel ist deshalb ein unsichtbarer Knopf,
   der die ganze Flaeche ueberdeckt (.tile-hit) - die Aktionen liegen mit
   hoeherem z-index darueber. Kein Kachel-Limit: das Raster fuellt so viele
   Zeilen wie noetig. */
.tiles-srv { grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); }
.srv { position: relative; }
.srv .tile-hit {
  position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  background: none; border: none; cursor: pointer; padding: 0;
}
.srv.locked .tile-hit { cursor: not-allowed; }
.srv-actions {
  position: absolute; top: 11px; right: 11px; z-index: 3; display: flex; gap: 5px;
  opacity: .45; transition: opacity .15s;
}
.srv:hover .srv-actions, .srv:focus-within .srv-actions, .srv.is-fav .srv-actions { opacity: 1; }
/* Platz fuer die beiden Knoepfe, damit ein langer Servername nicht darunter laeuft */
.srv .tile-name { padding-right: 66px; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg-deep) 74%, transparent);
  border: 1px solid var(--border-soft); color: var(--text-3); cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border); }
.icon-btn .ico { width: 15px; height: 15px; }
.icon-btn.is-on {
  color: var(--brass); background: var(--brass-dim);
  border-color: color-mix(in srgb, var(--brass) 45%, transparent);
}
.icon-btn.is-on .ico { fill: currentColor; }
.icon-btn.danger:hover {
  color: var(--danger); background: var(--danger-dim);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

/* Favorit = gelblicher Ton + Stern, gerade selbst online = gruener Ton + Kreis */
.srv.is-fav {
  border-color: color-mix(in srgb, var(--brass) 38%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brass) 11%, transparent),
              transparent 58%), var(--bg-2);
}
.srv.is-fav .tile-logo { border-color: color-mix(in srgb, var(--brass) 34%, transparent); }
.srv.is-live {
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--success) 12%, transparent),
              transparent 58%), var(--bg-2);
}
.srv.is-live .tile-logo { border-color: color-mix(in srgb, var(--success) 38%, transparent); }
.srv-logo { position: relative; flex-shrink: 0; }
.srv-live-dot {
  position: absolute; right: -5px; bottom: -5px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--success); border: 3.5px solid var(--bg-2);
  animation: live-pulse 2.6s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 50%, transparent); }
  60%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.srv-star { width: 13px; height: 13px; color: var(--brass); fill: currentColor;
            stroke: none; margin-left: 7px; vertical-align: -1px; }
.tile-name .row { display: flex; align-items: center; min-width: 0; }
.tile-name .row b { min-width: 0; }

/* Hinweis-Kachel (z. B. "noch nicht mit Discord verknuepft") */
.notice {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 18px;
  padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--warn) 42%, transparent);
  background: linear-gradient(180deg, var(--warn-dim), transparent 74%), var(--bg-2);
  box-shadow: var(--shadow-1);
}
.notice-ic {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--warn);
  background: var(--warn-dim); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}
.notice-ic .ico { width: 18px; height: 18px; }
.notice b { display: block; font-size: 14px; }
.notice p { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.ulink {
  color: var(--warn); font: inherit; font-weight: 640; cursor: pointer;
  background: none; border: none; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}
.ulink:hover { color: var(--text); }

/* Banner (gesperrt / gejailt) - nur wenn es einen gibt */
.banner {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px;
  padding: 16px 18px; border-radius: var(--radius); border: 1px solid transparent;
  box-shadow: var(--shadow-1);
}
.banner-ic { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
             display: grid; place-items: center; }
.banner-ic .ico { width: 19px; height: 19px; }
.banner b { display: block; font-size: 14.5px; }
.banner p { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.banner .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.banner-danger {
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: linear-gradient(180deg, var(--danger-dim), transparent 76%), var(--bg-2);
}
.banner-danger .banner-ic { background: var(--danger-dim); color: var(--danger); }
.banner-warn {
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  background: linear-gradient(180deg, var(--warn-dim), transparent 76%), var(--bg-2);
}
.banner-warn .banner-ic { background: var(--warn-dim); color: var(--warn); }

/* ================= SERVERSEITE ================= */
.server-head .actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
           gap: 14px; margin-top: 16px; }
.metric {
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.metric .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
               text-transform: uppercase; color: var(--text-3); }
.metric .val { font-size: 23px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px;
               display: flex; align-items: center; gap: 8px; }
.metric .val.sm { font-size: 17px; }
.metric .sub { color: var(--text-3); font-size: 12px; margin-top: 3px; }
.metric.ok .val { color: var(--success); }
.metric.warn .val { color: var(--warn); }
.metric.off .val { color: var(--text-3); }

.spark { width: 100%; height: 78px; display: block; }
.spark .area { fill: rgba(255, 255, 255, .07); stroke: none; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 1.6;
               stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.spark-empty { color: var(--text-3); font-size: 12.5px; padding: 26px 0; text-align: center; }
.spark-legend { display: flex; justify-content: space-between; margin-top: 8px;
                font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
                text-transform: uppercase; color: var(--text-3); }

/* ============ CHARAKTER: SEITENLEISTE WIE IM ADMIN-PANEL ============
   Bewusst dieselben Klassennamen und exakt dieselben Werte wie in style.css
   (.sidebar/.side-*/.nav-*): die Navigation soll nicht "aehnlich" aussehen,
   sondern die gleiche sein. Einziger Unterschied: sie beginnt unter der
   Kopfleiste des Portals statt am oberen Fensterrand - darum steht hier
   var(--top-h) statt 0/100vh. Die Charakterseite laeuft deshalb ueber die
   volle Breite (kein .wrap), sonst waere es keine echte Seitenleiste. */
.char-view { padding: 0; }
.char-app { display: flex; align-items: stretch; min-height: calc(100vh - var(--top-h)); }

.sidebar {
  width: 242px; flex-shrink: 0;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h));
}
.side-head {
  display: flex; align-items: center; gap: 12px;
  padding: 17px 16px; border-bottom: 1px solid var(--border-soft);
  min-height: 68px;
}
.side-logo {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--text-dim);
  background: var(--bg-3); box-shadow: 0 0 0 1px var(--border-soft);
}
.side-logo .ico { width: 18px; height: 18px; }
.side-title {
  font-weight: 650; font-size: 13.5px; letter-spacing: -.01em;
  max-width: 152px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-server {
  font-size: 11px; color: var(--text-3); margin-top: 1px;
  max-width: 152px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.side-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-group {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3); padding: 0 11px; margin: 20px 0 6px;
}
.nav-group:first-child { margin-top: 0; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 11px; margin-bottom: 2px; border-radius: var(--radius-sm);
  background: none; border: none; text-align: left; cursor: pointer;
  color: var(--text-dim); text-decoration: none;
  font-size: 13.5px; font-weight: 550;
  transition: background .15s, color .15s;
}
.nav-item .ico { width: 16px; height: 16px; }
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 22%; bottom: 22%;
  width: 2.5px; border-radius: 2px; background: var(--accent);
}
.nav-badge {
  margin-left: auto; background: var(--bg-3); color: var(--text-dim);
  font-family: var(--mono); font-size: 10px; font-weight: 620;
  padding: 1px 7px; border-radius: 999px;
}
.nav-item.active .nav-badge { background: var(--accent); color: var(--accent-text); }

.side-foot {
  padding: 13px 14px; border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 9px;
}
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 12.5px;
             font-weight: 620; overflow: hidden; }
.user-chip span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  background: var(--bg-3); color: var(--text-dim); white-space: nowrap;
}
.status-line { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); }
.status-line b { color: var(--text); font-weight: 620; margin-left: auto; }
.side-foot .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
                  background: var(--text-3); display: inline-block; }
.side-foot .dot.on { background: var(--success); }

/* Inhaltsspalte neben der Seitenleiste - uebernimmt den Innenabstand, den
   sonst .app-view/.wrap geben wuerde. */
.char-body {
  flex: 1; min-width: 0;
  padding: clamp(22px, 3vw, 34px) clamp(18px, 3.5vw, 40px) 90px;
  display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px);
}
.char-body > .crumb { margin-bottom: 0; align-self: flex-start; }
/* Laden/Fehler ohne Seitenleiste: gleiche Spaltenbreite wie die uebrigen Seiten */
.char-fallback {
  width: min(1160px, 100% - clamp(28px, 8vw, 80px)); margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) 0 96px;
}

/* ================= PROFIL ================= */
.pro-hero {
  position: relative; overflow: hidden; border-radius: 22px;
  border: 1px solid var(--border-soft); background: var(--bg-2); box-shadow: var(--shadow-1);
}
.pro-cover {
  height: 104px;
  background:
    radial-gradient(520px 190px at 12% 120%, rgba(255, 255, 255, .13), transparent 70%),
    linear-gradient(120deg, var(--bg-3), var(--bg-deep));
  border-bottom: 1px solid var(--border-soft);
}
.pro-body {
  padding: 0 clamp(18px, 3vw, 28px) 22px;
  display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end;
}
.pro-av {
  width: 98px; height: 98px; border-radius: 26px; margin-top: -46px; flex-shrink: 0;
  object-fit: cover; background: var(--bg-3); border: 3px solid var(--bg-2);
}
.pro-id { flex: 1 1 300px; min-width: 0; padding-top: 12px; }
.pro-id h1 { font-size: clamp(23px, 3vw, 30px); font-weight: 730; letter-spacing: -.035em;
             line-height: 1.15; }
.pro-headline { color: var(--text-dim); font-size: 14.5px; margin-top: 5px; }
.pro-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.pro-actions { display: flex; gap: 9px; flex-wrap: wrap; padding-bottom: 4px; }
.pro-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
             border-top: 1px solid var(--border-soft); }
.pro-stats div { padding: 15px clamp(16px, 3vw, 26px); }
.pro-stats div + div { border-left: 1px solid var(--border-soft); }
.pro-stats b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.pro-stats span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em;
                  text-transform: uppercase; color: var(--text-3); }

/* Verknuepfungs-Diagramm: Discord — Exec — Roblox, Linie gruen/rot + Haken/X */
.link-map {
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(4px, 2vw, 18px); padding: 8px 0 4px; flex-wrap: nowrap;
}
.link-node { display: grid; justify-items: center; gap: 10px; width: clamp(84px, 18vw, 124px);
             text-align: center; }
.link-badge {
  width: 62px; height: 62px; border-radius: 19px; display: grid; place-items: center;
  background: var(--bg-3); border: 1.5px solid var(--border-soft); color: var(--text);
}
.link-badge img { width: 36px; height: 36px; object-fit: contain; border-radius: 9px; }
.link-badge .ico { width: 30px; height: 30px; }
.link-badge.on { border-color: color-mix(in srgb, var(--success) 45%, transparent);
                 box-shadow: 0 0 0 4px var(--success-dim); }
.link-badge.off { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.link-node b { font-size: 13px; font-weight: 640; }
.link-node span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-wire { flex: 1 1 40px; min-width: 34px; display: grid; justify-items: center; gap: 6px; }
.link-mark {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid transparent; font-size: 12px; font-weight: 800;
}
.link-mark .ico { width: 13px; height: 13px; stroke-width: 3; }
.link-mark.on { background: var(--success-dim); color: var(--success);
                border-color: color-mix(in srgb, var(--success) 42%, transparent); }
.link-mark.off { background: var(--danger-dim); color: var(--danger);
                 border-color: color-mix(in srgb, var(--danger) 42%, transparent); }
.link-line { width: 100%; height: 3px; border-radius: 2px; }
.link-line.on { background: linear-gradient(90deg, transparent,
                var(--success) 14%, var(--success) 86%, transparent); }
.link-line.off { background: repeating-linear-gradient(90deg,
                 var(--danger) 0 6px, transparent 6px 13px); opacity: .8; }
.link-title { text-align: center; margin-top: 18px; }
.link-title b { font-size: 15px; font-weight: 660; letter-spacing: -.015em; }
.link-title p { color: var(--text-dim); font-size: 13px; margin-top: 5px; }
.link-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* Privat / Oeffentlich */
.switch-row {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 15px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft); background: var(--bg-3);
}
.switch-row .txt b { display: block; font-size: 13.5px; }
.switch-row .txt p { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.switch {
  position: relative; width: 46px; height: 26px; border-radius: 999px; flex-shrink: 0;
  background: var(--bg-4); border: 1px solid var(--border); cursor: pointer;
  transition: background .18s, border-color .18s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--text-dim); transition: transform .18s, background .18s;
}
.switch.on { background: var(--success-dim);
             border-color: color-mix(in srgb, var(--success) 50%, transparent); }
.switch.on::after { transform: translateX(20px); background: var(--success); }

/* Erfahrung ("kleines LinkedIn") */
.exp-list { display: grid; }
.exp-item { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border-soft); }
.exp-item:first-child { border-top: none; padding-top: 2px; }
.exp-ic {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: grid;
  place-items: center; background: var(--bg-3); border: 1px solid var(--border-soft);
  color: var(--text-dim);
}
.exp-ic .ico { width: 18px; height: 18px; }
.exp-main { min-width: 0; flex: 1; }
.exp-main b { display: block; font-size: 14.5px; font-weight: 640; }
.exp-org { font-size: 13px; color: var(--text-dim); margin-top: 1px; }
.exp-time { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
            text-transform: uppercase; color: var(--text-3); margin-top: 4px; }
.exp-desc { color: var(--text-dim); font-size: 13px; line-height: 1.65; margin-top: 9px;
            white-space: pre-wrap; }
.exp-actions { display: flex; gap: 6px; align-items: flex-start; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.pro-about { color: var(--text-dim); font-size: 14px; line-height: 1.72; white-space: pre-wrap; }
.empty-inline { color: var(--text-3); font-size: 13px; }

/* ================= JOBSUCHE =================
   --job ist die Hausfarbe der jeweiligen Behoerde/des Unternehmens; sie faerbt
   nur Logo und einen schmalen Streifen, damit das Raster ruhig bleibt und die
   Kacheln nicht miteinander um Aufmerksamkeit streiten. */
.job-current {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.job-current-ic {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--text-dim);
  background: var(--bg-3); border: 1px solid var(--border-soft);
}
.job-current-ic .ico { width: 21px; height: 21px; }
.job-current-main { flex: 1 1 260px; min-width: 0; }
.job-current-main b { display: block; font-size: 17px; font-weight: 680; letter-spacing: -.02em; }
.job-current-pay { text-align: right; }
.job-current-pay b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.job-current .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-3);
}

.job-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.job-search {
  display: flex; align-items: center; gap: 9px; flex: 1 1 280px;
  padding: 0 13px; border-radius: var(--radius-sm);
  background: var(--bg-deep); border: 1px solid var(--border); color: var(--text-3);
  transition: border-color .15s, box-shadow .15s;
}
.job-search:focus-within { border-color: rgba(255, 255, 255, .55); box-shadow: 0 0 0 3px var(--accent-dim); }
.job-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 13.5px; padding: 11px 0;
}
.job-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.job-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip {
  border: 1px solid var(--border-soft); background: var(--bg-2); color: var(--text-dim);
  border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 560; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.fchip:hover { color: var(--text); border-color: var(--border); }
.fchip.active { background: var(--accent); border-color: transparent; color: var(--accent-text); font-weight: 640; }

/* Etwas schmaler als die Serverkacheln: die Jobsuche teilt sich die Breite mit
   dem Handy in der rechten Spalte, sonst bliebe nur eine Kachel je Zeile. */
.tiles-job { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.tile.job { position: relative; overflow: hidden; }
.tile.job::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--job);
}
.tile.job:hover { border-color: color-mix(in srgb, var(--job) 45%, transparent); }
.tile.job .tile-hit {
  position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  background: none; border: none; cursor: pointer; padding: 0;
}
.job-logo {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--job);
  background: color-mix(in srgb, var(--job) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--job) 34%, transparent);
}
.job-logo .ico { width: 22px; height: 22px; }
.job-logo img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.job-logo.lg { width: 60px; height: 60px; border-radius: 17px; }
.job-logo.lg .ico { width: 28px; height: 28px; }

/* Schritt 1 des Antrags: Vorlage waehlen (steht vor dem Namen, weil sie
   bestimmt, welche Bausteine der Betrieb bekommt) */
.tpl-list { display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.tpl {
  display: flex; align-items: flex-start; gap: 13px; width: 100%; text-align: left;
  padding: 13px 15px; border-radius: 13px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  transition: border-color .15s, background .15s, transform .06s;
}
.tpl:hover { border-color: color-mix(in srgb, var(--job) 55%, transparent); background: var(--bg-4); }
.tpl:active { transform: translateY(1px); }
.tpl-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--job);
  background: color-mix(in srgb, var(--job) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--job) 34%, transparent);
}
.tpl-ic .ico { width: 20px; height: 20px; }
.tpl-ic img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.tpl-main { min-width: 0; flex: 1; }
.tpl-main b { display: block; font-size: 14px; font-weight: 640; }
.tpl-sub { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; line-height: 1.5; }
.tpl-mods { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tpl-plain { border-style: dashed; }

/* Schritt 2: gewaehlte Vorlage als Kopfzeile ueber dem Formular */
.tpl-chosen {
  display: flex; align-items: center; gap: 13px; margin-bottom: 18px;
  padding: 12px 14px; border-radius: 13px;
  background: var(--bg-3); border: 1px solid color-mix(in srgb, var(--job) 40%, transparent);
}
.tpl-chosen b { display: block; font-size: 13.5px; }
.tpl-chosen .btn { margin-left: auto; flex-shrink: 0; }

/* Logo-Upload */
.logo-pick { display: flex; align-items: center; gap: 10px; margin-top: 7px; flex-wrap: wrap; }
.logo-pick .btn { cursor: pointer; }
.logo-prev {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--job, var(--text-dim));
  background: color-mix(in srgb, var(--job, #8b98a9) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--job, #8b98a9) 34%, transparent);
}
.logo-prev .ico { width: 21px; height: 21px; }
.logo-prev img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.job-tag { color: var(--text-dim); font-size: 13px; line-height: 1.6; }

/* Stellenblatt im Dialog */
.job-sheet-head { display: flex; gap: 16px; align-items: flex-start; }
.job-block { margin-top: 20px; }
.job-block .lbl {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 10px;
}
.job-list { list-style: none; display: grid; gap: 8px; }
.job-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-dim); }
.job-list .ico { width: 14px; height: 14px; color: var(--success); flex-shrink: 0; }
.rank-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rank {
  font-size: 12px; color: var(--text-dim); background: var(--bg-3);
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 4px 11px;
}
.rank.first { color: var(--job); border-color: color-mix(in srgb, var(--job) 42%, transparent);
              background: color-mix(in srgb, var(--job) 13%, transparent); font-weight: 620; }

/* ================= RESPONSIV ================= */
@media (max-width: 900px) {
  .top-nav { display: none; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip div:nth-child(3) { border-left: none; }
  .strip div:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
  .steps { grid-template-columns: 1fr; }
  .shot-tiles { grid-template-columns: repeat(2, 1fr); }
  .shot-tiles > :nth-child(3) { display: none; }
  .hello-stats { width: 100%; justify-content: space-between; }
  .hello-stats div { padding: 0; text-align: left; }
  .hello-stats div + div { border-left: none; }
  /* Auf schmalen Schirmen legt sich die Seitenleiste als Leiste ueber den
     Inhalt, statt ihn auf einen Reststreifen zu quetschen. */
  .char-app { flex-direction: column; min-height: 0; }
  .sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border-soft);
  }
  .side-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; }
  .nav-group { display: none; }
  .nav-item { margin-bottom: 0; white-space: nowrap; width: auto; flex: 1 0 auto; }
  .nav-item.active::before { display: none; }
  .side-foot { flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
  .status-line b { margin-left: 6px; }
  .pro-stats { grid-template-columns: repeat(2, 1fr); }
  .pro-stats div:nth-child(3) { border-left: none; }
  .pro-stats div:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
}
@media (max-width: 560px) {
  :root { --top-h: 60px; }
  .brand span { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .strip div + div { border-left: none; border-top: 1px solid var(--border-soft); }
  .hero-cta .btn { width: 100%; }
  .server-head .side { margin-left: 0; width: 100%; }
  .server-head .actions { margin-left: 0; width: 100%; }
  .link-node { width: auto; }
  .link-badge { width: 52px; height: 52px; border-radius: 16px; }
  .link-badge img { width: 30px; height: 30px; }
  .link-badge .ico { width: 25px; height: 25px; }
  .link-node span { display: none; }
  .job-current-pay { text-align: left; }
  .job-search { flex-basis: 100%; }
  /* Kleinere Logos -> die Linie muss ein Stueck hoeher, um wieder auf der
     Mitte der Logos zu sitzen. */
  .link-wire { margin-top: -6px; }
  .pro-av { width: 78px; height: 78px; border-radius: 22px; margin-top: -38px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
