/* ========================================================
   MATEMARCH – modern & minimal (Dark = echtes Schwarz, Light = Weiß)
   Eine Schrift (Inter), dünne Linien, keine Schatten/Verläufe.
   ======================================================== */

:root {
  /* Flächen */
  --bg: #000000;
  --bg-elev: #0a0a0a;
  --bg-soft: #141414;
  --bg-hover: #1c1c1c;
  --border: #1f1f1f;
  --border-strong: #2e2e2e;

  /* Text */
  --text: #ededed;
  --text-muted: #a1a1a1;
  --text-subtle: #6b6b6b;

  /* Akzent: invertiert (Weiß auf Schwarz) */
  --accent: #fafafa;
  --accent-fg: #000000;
  --focus: rgba(255, 255, 255, 0.35);

  /* Status */
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);
  --success: #4ade80;
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.1);

  /* Brett (Standard: neutrales Grau) */
  --square-light: #e4e4e4;
  --square-dark: #9b9b9b;
  --center-line: #f59e0b;
  --last-move-arrow: rgba(245, 158, 11, 0.85);
  --hl-last: rgba(255, 210, 0, 0.32);
  --hl-select: rgba(255, 210, 0, 0.55);
  --hl-dot: rgba(0, 0, 0, 0.22);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --modal-backdrop: rgba(0, 0, 0, 0.72);

  /* Alte Namen (werden vereinzelt noch im Code genutzt) */
  --text-main: var(--text);
  --bg-card-border: var(--border);
  --bg-surface-elevated: var(--bg-soft);
  --gold-primary: var(--text);

  color-scheme: dark;
}

body.theme-light {
  /* Weiches Weiß (leicht warm, blendet nicht) */
  --bg: #f2f1ed;
  --bg-elev: #faf9f6;
  --bg-soft: #e9e7e2;
  --bg-hover: #dfdcd6;
  --border: #dcd9d2;
  --border-strong: #c9c5bc;

  --text: #22211f;
  --text-muted: #5d5b56;
  --text-subtle: #8c8982;

  --accent: #2a2926;
  --accent-fg: #faf9f6;
  --focus: rgba(0, 0, 0, 0.25);

  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --success: #16a34a;
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, 0.08);

  --modal-backdrop: rgba(0, 0, 0, 0.35);
  color-scheme: light;
}

/* ========================================================
   BASIS
   ======================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 3px; }
strong { font-weight: 600; }
button { font-family: inherit; }

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}

.icon-svg { display: block; }

::selection { background: var(--text); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Dünne Scrollbalken */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* ========================================================
   NAVIGATION: Seitenleiste (PC) / Symbolleiste unten (Handy)
   ======================================================== */
:root { --nav-w: 232px; --nav-h: 60px; }

.app-nav {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  width: var(--nav-w);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.1rem 0.75rem 1rem;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.app-main {
  margin-left: var(--nav-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  color: var(--text);
}

.brand-mark { color: var(--text); flex-shrink: 0; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-title {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.logo-tagline {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap; /* z. B. Japanisch/Chinesisch nicht Zeichen für Zeichen umbrechen */
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.nav-btn:hover { color: var(--text); background: var(--bg-soft); }
.nav-btn.active { color: var(--text); background: var(--bg-soft); }

.header-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
}

.header-actions .google-login-btn { justify-content: center; }
.header-actions .profile-header-pill { border-radius: var(--radius-md); height: 42px; padding: 0 0.6rem 0 0.4rem; }
.header-actions .profile-name-text { flex: 1; max-width: none; }

.nav-toggles {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-version {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

.action-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.action-icon-btn:hover { color: var(--text); background: var(--bg-soft); border-color: var(--border-strong); }

/* Google Login Button im Header */
.google-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  height: 36px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.google-login-btn:hover { opacity: 0.88; }

.google-g-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
}

/* Profil-Pill im Header wenn angemeldet */
.profile-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 0.7rem 0 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.profile-header-pill:hover { background: var(--bg-soft); border-color: var(--border-strong); }

.profile-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.78rem;
  overflow: hidden;
}

.profile-name-text {
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-rating-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ========================================================
   INHALT & TABS
   ======================================================== */
.main-content {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.tab-pane { display: none; animation: fadeIn 0.25s ease-out; }
.tab-pane.active { display: block; }

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

/* ========================================================
   STARTSEITE
   ======================================================== */
.home-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero-pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.home-hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero-description {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-description strong { color: var(--text); font-weight: 500; }

.hero-cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-cta-primary,
.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, background-color 0.15s, border-color 0.15s;
}

.btn-cta-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
}

.btn-cta-primary:hover { opacity: 0.88; }
.btn-cta-primary:disabled { opacity: 0.4; cursor: default; }

.btn-cta-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-cta-secondary:hover { background: var(--bg-soft); }

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1120px;
  margin: 2rem auto 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-portal-card {
  background: var(--bg-elev);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.card-icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.feature-portal-card h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.feature-portal-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.card-link-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.card-link-btn .icon { transition: transform 0.15s; }
.card-link-btn:hover .icon { transform: translateX(3px); }

/* ========================================================
   SPIELEN: LAYOUT
   ======================================================== */
/* Partie: Brett so groß wie möglich (Breite UND Bildschirmhöhe begrenzen) */
body.in-game .main-content { max-width: none; padding: 1rem 1.25rem; }
body.in-game .site-footer { display: none; }

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: start;
}

.board-column {
  /* Höhe: Spielerleisten + Buchstaben + Abstände ≈ 180px, die Zahlen links/rechts (≈ 54px) nehmen Breite statt Höhe */
  --board-chrome: 135px;
  --board-w: min(100%, calc(100vh - var(--board-chrome)));
  --board-w: min(100%, calc(100dvh - var(--board-chrome)));
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0.35rem;
}

.board-team-bar,
.half-header-indicator,
.board-wrapper,
.replay-bar,
.tutorial-bar { width: var(--board-w); max-width: none; }

body.hide-coords .board-column { --board-chrome: 175px; }

/* Mittellinie ist auf dem Brett sichtbar – Beschriftung darüber spart Platz */
.board-column .half-header-indicator { display: none; }

.play-layout .sidebar-column {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

/* ========================================================
   SPIELEN: AUSWAHL-SEITE
   ======================================================== */
.setup-page { max-width: 920px; }

.setup-head { margin: 0.5rem 0 1.75rem; }
.setup-head h1 { font-size: 2rem; font-weight: 650; letter-spacing: -0.03em; margin-bottom: 0.3rem; }
.setup-head .lead-text { margin: 0; }

.setup-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.setup-resume-text { display: flex; flex-direction: column; gap: 0.1rem; }
.setup-resume-text span { font-size: 0.85rem; color: var(--text-muted); }

.setup-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.setup-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.setup-mode:hover { border-color: var(--border-strong); }
.setup-mode.active { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

.setup-mode-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  color: var(--text);
}

.setup-mode.active .setup-mode-icon { background: var(--accent); color: var(--accent-fg); }

.setup-mode-text { display: flex; flex-direction: column; gap: 0.2rem; }
.setup-mode-text strong { font-size: 0.95rem; }
.setup-mode-text small { font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }

.setup-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.setup-panel h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.setup-panel > .switch-row { padding: 0.8rem 0 0; }
.setup-panel > .online-hint:first-of-type { margin-top: -0.5rem; }

.setup-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.25rem; }
.setup-actions .btn { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.9rem; }

.online-body { display: flex; flex-direction: column; gap: 1rem; }

/* Segment-Schalter (Modi, Design, Bot-Stufe) */
.mode-selector-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.mode-tab-btn:hover { color: var(--text); }
.mode-tab-btn.active { background: var(--bg-hover); color: var(--text); }

/* Spielerleisten: Spieler 1 links, Team-Uhr Mitte, Spieler 2 rechts */
.board-team-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
}

.player-indicator {
  order: 1;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
}

.player-indicator.side-right { order: 3; flex-direction: row-reverse; text-align: right; padding: 0.3rem 0.3rem 0.3rem 0.5rem; }
.player-indicator.active { background: var(--bg-soft); border-color: var(--border-strong); }
.player-indicator.active .p-avatar { box-shadow: 0 0 0 2px var(--text); }
.player-indicator.is-empty { opacity: 0.55; }

.p-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.p-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-avatar.is-empty { background: transparent; border: 1px dashed var(--border-strong); }

.p-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.p-line { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.side-right .p-line { flex-direction: row-reverse; }
.p-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.p-elo { color: var(--text-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.p-line .flag-img { flex-shrink: 0; }
.p-sub { font-size: 0.72rem; color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Team-Uhr in der Mitte (eine Uhr pro Team) */
.team-clock-box {
  order: 2;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.team-clock {
  min-width: 92px;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  opacity: 0.55;
  transition: opacity 0.15s, box-shadow 0.15s;
}

.team-clock.team-w { background: #f4f4f5; color: #0a0a0a; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.team-clock.team-b { background: #1c1c1c; color: #fafafa; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.team-clock.no-clock { font-family: var(--font-sans); font-size: 0.8rem; padding: 0.35rem 0.8rem; }
.team-clock.to-move { opacity: 1; }
.team-clock.running { box-shadow: 0 0 0 2px var(--center-line); }
.team-clock.low { color: #dc2626; }
.team-clock.team-b.low { color: #f87171; }

.captured-pieces {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1px;
  max-width: 160px;
  font-size: 0.85rem;
  line-height: 1.1;
  color: var(--text-muted);
}

.captured-pieces:empty { display: none; }

/* Mittellinien-Anzeige */
.half-header-indicator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 0.25rem;
  font-size: 0.72rem;
}

.half-label { display: flex; flex-direction: column; }
.half-label.left { text-align: left; }
.half-label.right { text-align: right; }

.half-tag {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sub-tag { color: var(--text-subtle); font-size: 0.7rem; }

.center-line-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

.line-pulse {
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: var(--center-line);
}

.line-text {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ========================================================
   BRETT
   ======================================================== */
.board-wrapper {
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}

.rank-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.file-labels {
  display: flex;
  width: var(--board-w, 100%);
  justify-content: space-around;
  padding: 0 22px;
  margin-top: -0.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-subtle);
  user-select: none;
}

.chess-board {
  flex: 1;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px var(--border);
}

/* Mittellinie: eine klare, dünne Linie */
.chess-board::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--cl-color, var(--center-line));
  pointer-events: none;
  z-index: 10;
}

.square {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
}

.square.light { background-color: var(--square-light); }
.square.dark { background-color: var(--square-dark); }

/* Markierungen als dezente Überlagerung (Feldfarbe bleibt sichtbar) */
.square.last-move-src,
.square.last-move-dst { background-image: linear-gradient(var(--hl-last), var(--hl-last)); }
.square.selected { background-image: linear-gradient(var(--hl-select), var(--hl-select)); }

.square.valid-move::before {
  content: "";
  position: absolute;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: var(--hl-dot);
  pointer-events: none;
  z-index: 5;
}

.square.valid-capture::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 5px solid var(--hl-dot);
  pointer-events: none;
  z-index: 5;
}

/* König in Gefahr */
.square.king-danger {
  box-shadow: inset 0 0 0 3px #ef4444;
  background-image: radial-gradient(circle, rgba(239, 68, 68, 0.45) 0%, rgba(239, 68, 68, 0) 70%);
  animation: kingDangerPulse 1.4s ease-in-out infinite;
}

@keyframes kingDangerPulse {
  0%, 100% { box-shadow: inset 0 0 0 3px #ef4444; }
  50% { box-shadow: inset 0 0 0 3px rgba(239, 68, 68, 0.45); }
}

.square.tutorial-target { box-shadow: inset 0 0 0 3px var(--center-line); }

/* Figuren */
.piece {
  width: 88%;
  height: 88%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.12s ease-out;
}

.piece svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.square:hover .piece { transform: scale(1.04); }

.piece.gliding { position: relative; z-index: 6; }

/* Pfeil für den letzten Zug */
.last-move-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.last-move-arrow-line { stroke: var(--last-move-arrow); stroke-width: 1.5; stroke-linecap: round; }
.last-move-arrow-head { fill: var(--last-move-arrow); }

/* Gedrehtes Brett (Schwarz unten): Felder werden per CSS-order umsortiert */
body.board-flipped .rank-labels { flex-direction: column-reverse; }
body.board-flipped .file-labels { flex-direction: row-reverse; }
body.board-flipped .half-header-indicator .half-label.left { order: 3; text-align: right; }
body.board-flipped .half-header-indicator .center-line-marker { order: 2; }
body.board-flipped .half-header-indicator .half-label.right { order: 1; text-align: left; }
body.board-flipped .board-column .tutorial-bar { order: 0; }
body.board-flipped .board-column .team-white-bar { order: 1; }
body.board-flipped .board-column .half-header-indicator { order: 2; }
body.board-flipped .board-column .board-wrapper { order: 3; }
body.board-flipped .board-column .file-labels { order: 4; }
body.board-flipped .board-column .team-black-bar { order: 10; }
body.board-flipped .board-column .replay-bar { order: 11; }

/* Koordinaten ausblenden */
body.hide-coords .rank-labels,
body.hide-coords .file-labels { display: none; }

/* Wiederholung */
.replay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  font-size: 0.85rem;
}

.replay-title { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.replay-controls { display: flex; align-items: center; gap: 0.3rem; }

.replay-pos {
  min-width: 7rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

body.replay-mode .chess-board { box-shadow: 0 0 0 2px var(--text-muted); }

/* Tutorial */
.tutorial-bar {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
}

.tutorial-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.tutorial-head strong { display: inline-flex; align-items: center; gap: 0.4rem; }
.tutorial-step { font-size: 0.78rem; color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.tutorial-text { margin: 0.35rem 0 0.75rem; font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }
.tutorial-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ========================================================
   KARTEN & SEITENLEISTE
   ======================================================== */
.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.card-header-actions { display: inline-flex; gap: 0.75rem; }

/* Aktueller Zug */
.turn-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.current-turn-display {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.turn-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.turn-details { display: flex; flex-direction: column; min-width: 0; }
.turn-team { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.turn-player { font-size: 0.82rem; color: var(--text-muted); }

/* Hinweisbox (Varianten über Klassen aus js/app.js) */
.rule-hint-box {
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.rule-hint-box strong { color: var(--text); }
.rule-hint-box.hint-ok { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.rule-hint-box.hint-ok::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); margin-right: 0.45rem; vertical-align: 0.1em; }
.rule-hint-box.hint-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); color: var(--text); }
.rule-hint-box.hint-accent { border-color: var(--border-strong); color: var(--text); }

/* Übergabe-Hinweis */
.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-color: color-mix(in srgb, var(--center-line) 45%, var(--border));
  animation: slideIn 0.25s ease-out;
}

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

.notify-icon { color: var(--center-line); padding-top: 1px; }
.notify-body strong { font-size: 0.85rem; display: block; }
.notify-body p { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

/* Steuerung */
.controls-grid {
  display: grid;
  /* 0.70: so viele Spalten, wie in die Seitenkarte passen (vorher fest 3 → rechts abgeschnitten) */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr));
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.controls-grid .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; }

.controls-grid .span-2 { grid-column: span 2; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.45; cursor: default; }
.btn.grow { flex: 1; }
.btn-sm { min-height: 30px; font-size: 0.8rem; padding: 0.3rem 0.65rem; }
.btn-icon { padding: 0.4rem; min-width: 34px; }

.btn-secondary {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-secondary.active { border-color: var(--text); }

.btn-danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  color: var(--danger);
}

.btn-danger:hover { background: var(--danger-soft); }

.btn.btn-cta-primary { height: auto; min-height: 36px; font-size: 0.85rem; }

.btn-text {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.btn-text:hover { color: var(--text); }

.mode-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.mode-badge.badge-free { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.mode-badge.badge-live { color: var(--text); border-color: var(--border-strong); }

/* Zeilen mit Schaltern / Auswahl */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}

.switch-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: pointer;
  min-width: 0;
}

.switch-label > span { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.switch-label small { font-size: 0.76rem; color: var(--text-subtle); }

.custom-switch {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  cursor: pointer;
  transition: background-color 0.15s;
}

.custom-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.custom-switch:checked { background: var(--accent); }
.custom-switch:checked::after { transform: translateX(16px); background: var(--accent-fg); }

.settings-select,
.text-input,
.online-code-input,
.chat-input {
  height: 34px;
  padding: 0 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  transition: border-color 0.15s;
}

.settings-select { min-width: 10rem; max-width: 100%; cursor: pointer; }
.settings-select:hover,
.text-input:hover,
.online-code-input:hover,
.chat-input:hover { border-color: var(--border-strong); }

.settings-select:focus-visible,
.text-input:focus-visible,
.online-code-input:focus-visible,
.chat-input:focus-visible { outline: none; border-color: var(--text-muted); }

.clock-select { min-width: 9rem; }

/* Versions-Status */
.version-tag { font-size: 0.72rem; color: var(--text-subtle); }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.feature-list li { display: flex; align-items: flex-start; gap: 0.5rem; line-height: 1.45; }
.feature-list strong { color: var(--text); font-weight: 500; }
.feat-icon { margin-top: 2px; color: var(--text-subtle); }
.feat-done .feat-icon { color: var(--success); }

/* Zug-Protokoll */
.move-log-container {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  margin: 0 -0.35rem;
}

.empty-log-hint {
  color: var(--text-subtle);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem 0;
}

.log-entry {
  display: grid;
  grid-template-columns: 2.4rem 2.2rem 1fr auto;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.35rem;
  border-radius: var(--radius-sm);
}

.log-entry:nth-child(even) { background: var(--bg-soft); }
.log-idx { color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.log-player { color: var(--text-muted); font-weight: 600; font-size: 0.75rem; }
.log-move { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text); }

.log-tag-handover {
  font-size: 0.68rem;
  color: var(--center-line);
  white-space: nowrap;
}

/* Raum-Chat */
.chat-list {
  max-height: 220px;
  min-height: 60px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.chat-msg { line-height: 1.4; overflow-wrap: anywhere; color: var(--text-muted); }
.chat-msg .chat-name { font-weight: 600; margin-right: 0.4rem; color: var(--text); }
.chat-msg .chat-name.team-b { color: var(--text-muted); }
.chat-msg.big { font-size: 1.4rem; }
.chat-empty { color: var(--text-subtle); font-size: 0.8rem; }

.chat-emojis { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.6rem 0; }

.chat-emojis button {
  height: 28px;
  min-width: 32px;
  padding: 0 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.chat-emojis button:hover { background: var(--bg-soft); }

.chat-form { display: flex; gap: 0.4rem; }
.chat-input { flex: 1; min-width: 0; }

.flag-img {
  width: 1.2em;
  height: auto;
  vertical-align: -0.15em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.35);
  margin-right: 0.35em;
}

/* ========================================================
   DIALOGE
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease-out;
}

#countryModal { z-index: 3000; }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.6rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  animation: modalIn 0.18s ease-out;
}

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

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close-btn:hover { background: var(--bg-soft); color: var(--text); }

.modal-header { margin-bottom: 1.25rem; padding-right: 2rem; }

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.3rem;
}

.modal-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
}

.modal-lead { font-size: 0.875rem; color: var(--text-muted); line-height: 1.55; }

.modal-body { display: flex; flex-direction: column; gap: 1.1rem; }
.modal-body > .switch-row { border-top: 0; padding: 0; }

.modal-actions { display: flex; gap: 0.5rem; }
.modal-actions.wrap { flex-wrap: wrap; }

.field-label { font-size: 0.82rem; font-weight: 500; margin-bottom: 0.5rem; }

.preview-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.preview-banner strong { color: var(--text); }
.preview-banner > .icon { margin-top: 1px; color: var(--text); }

.bot-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.bot-level-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.85rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.bot-level-btn:hover { background: var(--bg-soft); }
.bot-level-btn.active { border-color: var(--text); background: var(--bg-soft); }
.bot-level-btn .b-icon { color: var(--text-muted); margin-bottom: 0.25rem; }
.bot-level-btn.active .b-icon { color: var(--text); }
.bot-level-btn strong { font-size: 0.85rem; }
.bot-level-btn small { font-size: 0.72rem; color: var(--text-subtle); }

/* Bauernumwandlung */
.promo-card { max-width: 360px; }

.promo-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.promo-choices button {
  aspect-ratio: 1 / 1;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--square-light);
  cursor: pointer;
}

.promo-choices button:hover { box-shadow: 0 0 0 2px var(--text); }
.promo-choices button svg { width: 100%; height: 100%; }

/* Land wählen */
.country-search { width: 100%; }

.country-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.country-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.country-item:hover { background: var(--bg-soft); }
.country-item.selected { background: var(--bg-hover); border-color: var(--border-strong); }

/* Online-Lobby */
#onlineBody { display: flex; flex-direction: column; gap: 1rem; }

.lobby-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.code-badge {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.online-copy-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.online-join-row { display: flex; gap: 0.5rem; }

.online-code-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.text-input { width: 100%; }

.online-hint { font-size: 0.84rem; color: var(--text-muted); line-height: 1.55; }

.lobby-slots { display: grid; grid-template-columns: 1fr; gap: 0.4rem; }

.slot-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.slot-item strong { font-weight: 600; min-width: 4.5rem; }
.slot-item.me { border-color: var(--text-muted); }

.slot-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.slot-item.waiting .slot-dot { background: var(--border-strong); }
.slot-item.waiting .slot-name { color: var(--text-subtle); }

.slot-item .slot-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-item .slot-btn { min-height: 28px; font-size: 0.75rem; padding: 0.2rem 0.55rem; }

.online-bot-level {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.online-bot-level .btn.active { border-color: var(--text); }

.online-variant {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
}

.online-variant input { accent-color: var(--text); }

/* Profil */
.profile-modal-card { max-width: 600px; }

.profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.profile-large-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-hero-info { flex: 1; min-width: 0; }
.profile-hero-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.profile-hero-name { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; }
.profile-hero-email { font-size: 0.84rem; color: var(--text-muted); overflow-wrap: anywhere; }

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 1.5rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.p-stat-box { background: var(--bg-elev); padding: 0.75rem 0.5rem; text-align: center; }
.p-stat-val { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.p-stat-label { font-size: 0.72rem; color: var(--text-subtle); }

.matches-section-header { margin-bottom: 0.6rem; }
.matches-section-header h3 { font-size: 0.875rem; font-weight: 600; }

.matches-list-container {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.match-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.match-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.match-mode-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.match-mode-name { font-weight: 500; font-size: 0.875rem; }
.match-date-text { font-size: 0.75rem; color: var(--text-subtle); }
.match-stats-row { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.75rem; color: var(--text-muted); }

.match-result-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.profile-actions-left { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ========================================================
   REGELN, ÜBER, EINSTELLUNGEN
   ======================================================== */
.content-container { max-width: 960px; margin: 0 auto; }

.rules-header { text-align: center; margin: 1.5rem 0 2.75rem; }

.pill-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.rules-header h1,
.about-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.lead-text {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.rules-tutorial-btn { margin-top: 1.5rem; }

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1rem;
}

.rule-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.rule-card.highlight-card { border-color: var(--border-strong); }

.rule-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 0.6rem;
}

.rule-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}

.rule-card p,
.rule-card ul,
.rule-card ol {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.7rem;
}

.rule-card p:last-child { margin-bottom: 0; }
.rule-card ul, .rule-card ol { padding-left: 1.15rem; }
.rule-card li { margin-bottom: 0.25rem; }
.rule-card strong { color: var(--text); }

.rule-card code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.rule-alert {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text) !important;
  font-size: 0.86rem !important;
}

.turn-steps {
  list-style: none;
  padding-left: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.turn-steps li { display: flex; align-items: center; gap: 0.6rem; margin: 0; }

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tips-box { display: flex; flex-direction: column; gap: 0.5rem; }

/* Über das Projekt */
.about-hero { text-align: center; margin: 1.5rem 0 2.75rem; }
.lead-quote { font-size: 1.05rem; color: var(--text-muted); }

.about-sections { display: flex; flex-direction: column; gap: 1rem; }

.about-article {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.about-article h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
}

.about-article p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.about-article p:last-child { margin-bottom: 0; }
.about-article strong { color: var(--text); }

.roadmap-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--border-strong);
}

.timeline-item { position: relative; }

.timeline-badge {
  position: absolute;
  left: -2.55rem;
  top: 0.1rem;
  min-width: 2.3rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.05rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-subtle);
}

.timeline-item.done .timeline-badge { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.timeline-item.next .timeline-badge { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); }

.timeline-content { padding-left: 1rem; }
.timeline-content h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.15rem; }
.timeline-content p { font-size: 0.86rem; margin-bottom: 0 !important; line-height: 1.5 !important; }

.tech-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }

.tech-pill {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tech-hint {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.875rem !important;
}

/* Einstellungen */
/* Einstellungen: Menüpunkte links, Inhalt rechts */
.settings-page { max-width: 1100px; margin: 0 auto; }

.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.75rem;
  border-right: 1px solid var(--border);
  align-self: stretch;
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.settings-nav-btn:hover { color: var(--text); background: var(--bg-soft); }
.settings-nav-btn.active { color: var(--text); background: var(--bg-hover); box-shadow: inset 2px 0 0 var(--text); }

.settings-reset { margin-top: 1.25rem; }

.settings-content { padding: 1.5rem 1.75rem 1.25rem; min-width: 0; }
.settings-panel { display: none; }
.settings-panel.active { display: block; animation: fadeIn 0.2s ease-out; }
.settings-panel h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; }
.settings-panel-lead { margin: 0.25rem 0 0.75rem; font-size: 0.875rem; color: var(--text-muted); }
.settings-panel h2 + .switch-row,
.settings-panel h2 + .settings-board-grid { margin-top: 0.75rem; }

.settings-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

.settings-board-pickers .setting-block:first-child { border-top: 0; padding-top: 0; }

/* Vorschau 3×3 mit aktuellen Brettfarben und Figuren */
.settings-preview {
  position: sticky;
  top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}

.settings-preview .square { cursor: default; }
.settings-preview .piece { width: 82%; height: 82%; }

/* Profil in den Einstellungen */
.profile-edit { display: flex; flex-direction: column; }
.profile-photo-row { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 0 1rem; flex-wrap: wrap; }
.profile-photo-row .p-avatar { width: 72px; height: 72px; font-size: 1.5rem; }
.profile-photo-actions { display: flex; flex-direction: column; gap: 0.4rem; }
.profile-photo-actions .row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.profile-field-value { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.bio-input {
  width: 100%;
  min-height: 90px;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.bio-input:focus-visible { outline: none; border-color: var(--text-muted); }
.bio-block { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.85rem 0; border-top: 1px solid var(--border); }
.bio-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.78rem; color: var(--text-subtle); }

.profile-hero-bio { margin-top: 0.35rem; font-size: 0.86rem; color: var(--text-muted); white-space: pre-line; overflow-wrap: anywhere; }
.profile-hero-bio:empty { display: none; }

#usernameStatus.ok, .profile-msg.ok { color: var(--success); }
#usernameStatus.bad, .profile-msg.bad { color: var(--danger); }

.settings-card { padding: 1.25rem 1.35rem 0.5rem; }
.settings-card .card-header { margin-bottom: 0.25rem; }
.settings-card .card-header + .switch-row,
.settings-card .card-header + .setting-block { border-top: 0; }
.settings-card > .online-hint { margin-bottom: 0.5rem; }

.setting-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}

/* Brettfarben & Figuren-Stile: Kachel-Raster */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.5rem;
}

.swatch-grid.pieces { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

.board-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.4rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.board-swatch:hover { background: var(--bg-soft); color: var(--text); }
.board-swatch.active { border-color: var(--text); color: var(--text); background: var(--bg-soft); }

.board-swatch .sw {
  width: 44px;
  height: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}

.board-swatch .sw i { display: block; }

.sw-pieces {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--square-light) 50%, var(--square-dark) 50%);
}

.sw-pieces svg { width: 34px; height: 34px; display: block; }

.settings-range { display: flex; align-items: center; gap: 0.75rem; }
.settings-range input[type="range"] { width: 150px; accent-color: var(--text); }
.settings-range input[type="range"]:disabled { opacity: 0.4; }

.settings-range output {
  min-width: 3rem;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.settings-account { padding-bottom: 0.85rem; }
.settings-account-text { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; overflow-wrap: anywhere; }
.settings-account-text strong { color: var(--text); }
.settings-account-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.settings-footer { display: flex; justify-content: flex-end; }

/* ========================================================
   PROFILSEITE
   ======================================================== */
.profile-page { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.profile-empty { text-align: center; padding: 3rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.profile-empty h1 { font-size: 2rem; font-weight: 650; letter-spacing: -0.03em; }
.profile-loading { padding: 2rem 0; }

.profile-hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.p-avatar.ph-avatar { width: 112px; height: 112px; font-size: 2.6rem; }

.ph-main { min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.ph-name { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.ph-name h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.ph-name .flag-img { width: 1.6rem; flex-shrink: 0; }
.ph-meta { font-size: 0.875rem; color: var(--text-muted); }
.ph-bio { max-width: 60ch; font-size: 0.95rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.ph-bio.is-empty { color: var(--text-subtle); font-style: italic; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }

.ph-elo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 150px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  text-align: center;
}
.ph-elo-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-subtle); }
.ph-elo-val { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ph-elo small { max-width: 160px; font-size: 0.72rem; color: var(--text-subtle); line-height: 1.4; }

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
  overflow: hidden;
}
.p-tile { display: flex; flex-direction: column; gap: 0.15rem; padding: 1.1rem 1.15rem; background: var(--bg-elev); min-width: 0; }
.p-tile-label { font-size: 0.75rem; color: var(--text-subtle); font-weight: 500; }
.p-tile-val { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.p-tile-sub { font-size: 0.75rem; color: var(--text-muted); }

.profile-note { font-size: 0.8rem; color: var(--text-subtle); line-height: 1.5; }

.profile-panels { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1rem; }
.p-panel { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elev); display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.p-panel h2 { font-size: 0.95rem; font-weight: 600; }

.activity-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 130px; align-items: end; }
.activity-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.activity-bar { width: 100%; max-width: 18px; border-radius: 4px 4px 2px 2px; background: var(--text); }
.activity-bar.is-zero { background: var(--border-strong); }
.activity-day { font-size: 0.65rem; color: var(--text-subtle); font-variant-numeric: tabular-nums; }

.meter-row { display: flex; flex-direction: column; gap: 0.35rem; }
.meter-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.meter-label { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-muted); min-width: 0; }
.meter-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-track { height: 6px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 999px; background: var(--text); }

.profile-matches { gap: 0; }
.profile-matches-head { padding-bottom: 0.5rem; }
.match-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.match-icon { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--bg-soft); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; }
.match-body { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.match-title { font-weight: 600; font-size: 0.92rem; }
.match-sub { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.15rem; }
.match-chip { font-size: 0.72rem; color: var(--text-subtle); padding: 0.1rem 0.45rem; border-radius: 999px; border: 1px solid var(--border); }
.match-chip strong { color: var(--text); font-weight: 600; }
.match-result { font-size: 0.78rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 999px; white-space: nowrap; border: 1px solid var(--border-strong); color: var(--text-muted); }
.match-result.win { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.match-result.loss { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.profile-more { align-self: center; margin-top: 0.75rem; }

/* Spielerkarten am Brett: Klick öffnet das Profil */
.player-indicator.has-profile { cursor: pointer; }
.player-indicator.has-profile:hover .p-name { text-decoration: underline; text-underline-offset: 3px; }
.profile-header-pill.active { background: var(--bg-soft); border-color: var(--border-strong); }

@media (max-width: 1080px) {
  .profile-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .profile-stat-grid .p-tile:first-child { grid-column: span 2; }
  .profile-panels { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .profile-hero-card { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 1.25rem; gap: 1rem; }
  .ph-name { justify-content: center; }
  .ph-name h1 { font-size: 1.6rem; }
  .ph-actions { justify-content: center; }
  .ph-elo { width: 100%; flex-direction: row; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
  .ph-elo small { max-width: none; flex-basis: 100%; }
  .p-avatar.ph-avatar { width: 92px; height: 92px; font-size: 2.2rem; }
  .profile-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stat-grid .p-tile:first-child { grid-column: span 2; }
  .p-tile-val { font-size: 1.4rem; }
  .match-row { grid-template-columns: auto minmax(0, 1fr); }
  .match-result { grid-column: 2; justify-self: start; }
}

/* ========================================================
   FREUNDE & TEAMS
   ======================================================== */
.friends-page { max-width: 1100px; margin: 0 auto; }
.friends-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.friends-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.friends-login { align-items: flex-start; }

.friend-add-form, .team-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.friend-add-form .text-input { flex: 1; min-width: 160px; height: 38px; }
.team-form { flex: 1 1 100%; margin-top: 0.4rem; }
.team-form .text-input { flex: 1; min-width: 140px; }

.person-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}
.p-panel h2 + .person-row, .p-panel .profile-note + .person-row { border-top: 0; }
.person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.person-line { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.person-name {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.person-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.person-sub { font-size: 0.78rem; color: var(--text-muted); }
.person-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }

.team-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}
.team-card.is-pending { opacity: 0.75; border-style: dashed; }
.team-avatars { display: flex; }
.team-avatars .p-avatar { width: 40px; height: 40px; box-shadow: 0 0 0 2px var(--bg-soft); }
.team-avatars .p-avatar + .p-avatar { margin-left: -12px; }
.team-body { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.team-name { font-weight: 650; font-size: 0.98rem; overflow-wrap: anywhere; }
.team-elo { display: flex; flex-direction: column; align-items: center; gap: 0; }
.team-elo-val { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.team-card + .team-card { margin-top: 0.5rem; }
.profile-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.6rem; }
.profile-teams .team-card + .team-card { margin-top: 0; }

.friend-share { align-items: center; text-align: center; position: sticky; top: 1rem; }
.qr-box { background: #ffffff; padding: 10px; border-radius: var(--radius-md); line-height: 0; }
.qr-box svg { display: block; width: 196px; height: 196px; }
.friend-link { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); overflow-wrap: anywhere; }
.friend-share .person-actions { justify-content: center; }
.friend-state { font-size: 0.82rem; color: var(--text-muted); padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-md); }

/* Benachrichtigungszahl an „Freunde“ */
.nav-btn { position: relative; }
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Team unter der Team-Uhr (Name · Team-Elo) */
.team-tag { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.team-hint { font-weight: 500; color: var(--text); }

@media (max-width: 1240px) and (min-width: 821px) {
  .nav-badge { position: absolute; top: 4px; right: 4px; margin: 0; }
}

@media (max-width: 1080px) {
  .friends-grid { grid-template-columns: minmax(0, 1fr); }
  .friend-share { position: static; order: -1; }
  .friends-grid .friends-col:last-child { order: -1; }
}

@media (max-width: 820px) {
  .nav-badge { position: absolute; top: 6px; left: 50%; margin: 0 0 0 6px; }
  .team-tag { max-width: 90px; font-size: 0.62rem; }
}

@media (max-width: 640px) {
  .team-card { grid-template-columns: auto minmax(0, 1fr); }
  .team-elo { grid-column: 1 / -1; flex-direction: row; gap: 0.5rem; justify-content: flex-start; }
}

/* ========================================================
   DIREKTNACHRICHTEN & MELDEN
   ======================================================== */
.friends-tabs { margin-bottom: 1rem; }
.dm-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: stretch; }
.dm-list { gap: 0.25rem; max-height: calc(100vh - 220px); overflow-y: auto; }
.dm-row {
  display: flex; align-items: center; gap: 0.65rem; width: 100%;
  padding: 0.6rem; border: 0; border-radius: var(--radius-md); background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.dm-row:hover { background: var(--bg-soft); }
.dm-row.active { background: var(--bg-hover); }
.dm-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.dm-row-top { display: flex; justify-content: space-between; gap: 0.5rem; }
.dm-row-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-preview { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row.unread .dm-preview { color: var(--text); font-weight: 600; }
.dm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.dm-time { font-size: 0.7rem; color: var(--text-subtle); white-space: nowrap; }

.dm-chat { min-height: 420px; max-height: calc(100vh - 220px); gap: 0.6rem; }
.dm-pick { margin: auto; text-align: center; }
.dm-head { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.dm-back { display: none; }
.dm-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.6rem; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.dm-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-who:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.dm-messages { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem; padding: 0.25rem 0.1rem; }
.dm-empty { margin: auto; }
.dm-bubble {
  max-width: 75%; align-self: flex-start;
  padding: 0.45rem 0.7rem; border-radius: 14px 14px 14px 4px;
  background: var(--bg-soft); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.dm-bubble.own { align-self: flex-end; background: var(--accent); color: var(--accent-fg); border-color: var(--accent); border-radius: 14px 14px 4px 14px; }
.dm-bubble.own .dm-time { color: var(--accent-fg); opacity: 0.6; }
.dm-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.45; }
.dm-bubble .dm-time { align-self: flex-end; font-size: 0.65rem; }
.dm-form { display: flex; gap: 0.5rem; }
.dm-form .text-input { flex: 1; height: 40px; }
.dm-blocked { text-align: center; padding: 0.6rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }

.report-reasons { border: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.report-reason { display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; font-size: 0.9rem; }
.report-reason:hover { background: var(--bg-soft); }
.report-reason:has(input:checked) { border-color: var(--text); background: var(--bg-soft); }
.report-reason input { accent-color: var(--text); }

@media (max-width: 820px) {
  .dm-layout { grid-template-columns: minmax(0, 1fr); }
  .dm-layout.has-chat .dm-list { display: none; }
  .dm-layout:not(.has-chat) .dm-chat { display: none; }
  .dm-back { display: inline-flex; }
  .dm-chat { min-height: calc(100dvh - 260px); max-height: calc(100dvh - 200px); }
}

/* ========================================================
   BOT-ELO-AUSWAHL & TAKTIK-TIPPS
   ======================================================== */
.elo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; }
.elo-btn {
  padding: 0.55rem 0.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.elo-btn:hover { background: var(--bg-soft); color: var(--text); }
.elo-btn.active { border-color: var(--text); background: var(--bg-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

.tips-section { margin-top: 3rem; }
.tips-head { text-align: center; margin-bottom: 1.5rem; }
.tips-head h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.tip-card {
  position: relative;
  padding: 1.25rem 1.25rem 1.2rem 3.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.tip-card h3 { font-size: 1rem; font-weight: 650; margin-bottom: 0.35rem; }
.tip-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }
.tip-num {
  position: absolute;
  left: 1.1rem;
  top: 1.15rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .elo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ========================================================
   ZIEHEN, PREMOVE, PFEILE
   ======================================================== */
:root {
  --premove: rgba(59, 130, 246, 0.42);
  --mark-own: rgba(34, 197, 94, 0.88);
  --mark-partner: rgba(59, 130, 246, 0.9);
}

/* Auf dem Brett nicht scrollen/zoomen, damit Figuren mit dem Finger gezogen werden können */
.chess-board { touch-action: none; -webkit-user-select: none; user-select: none; }
body.dragging-piece, body.dragging-piece * { cursor: grabbing !important; }
body.arrow-mode .chess-board .square { cursor: crosshair; }

.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.drag-ghost svg { width: 92%; height: 92%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.piece.drag-origin { opacity: 0.3; }
.square.drag-over { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.75); }
body.theme-light .square.drag-over { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.45); }

.square.premove-sq { background-image: linear-gradient(var(--premove), var(--premove)); }
.square.premove-target::before {
  content: "";
  position: absolute;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: var(--premove);
  pointer-events: none;
  z-index: 5;
}

.marks-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 7; }
.mark-line { stroke-width: 2; stroke-linecap: round; }
.mark-line.own { stroke: var(--mark-own); }
.mark-line.partner { stroke: var(--mark-partner); }
.mark-head.own { fill: var(--mark-own); }
.mark-head.partner { fill: var(--mark-partner); }
.mark-circle { fill: none; stroke-width: 0.9; }
.mark-circle.own { stroke: var(--mark-own); }
.mark-circle.partner { stroke: var(--mark-partner); }

#btnArrowMode.active { background: color-mix(in srgb, var(--mark-own) 18%, transparent); border-color: var(--mark-own); color: var(--text); }

/* ========================================================
   TAGESSERIE
   ======================================================== */
:root { --streak: #f97316; }

.streak-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.streak-chip:hover { background: var(--bg-soft); color: var(--text); }
.streak-chip .streak-count { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.streak-chip .streak-label { color: var(--text-muted); }
.streak-chip.is-active .icon { color: var(--streak); }
.streak-chip.is-zero .icon, .streak-chip.is-zero .streak-count { color: var(--text-subtle); }

.setup-streak {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.setup-streak-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-soft); color: var(--text-subtle); }
.setup-streak.is-active .setup-streak-icon { background: color-mix(in srgb, var(--streak) 16%, transparent); color: var(--streak); }
.setup-streak-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.setup-streak-text strong { font-size: 1.05rem; }
.setup-streak-text span { font-size: 0.84rem; color: var(--text-muted); }
.setup-streak-best { font-size: 0.8rem; color: var(--text-subtle); white-space: nowrap; }

.streak-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--streak) 12%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}
.streak-line .icon { color: var(--streak); }

@media (max-width: 1240px) and (min-width: 821px) {
  .streak-chip { flex-direction: column; gap: 0; width: 44px; padding: 0.35rem 0; justify-content: center; font-size: 0.75rem; }
}

@media (max-width: 820px) {
  .header-actions .streak-chip { border: 0; padding: 0 0.3rem; gap: 0.15rem; }
  .setup-streak-best { display: none; }
}

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer-left strong { color: var(--text); font-weight: 600; }
.footer-sep { margin: 0 0.25rem; }

.footer-right { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

.footer-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text-muted);
  cursor: pointer;
}

.footer-link:hover { color: var(--text); }

/* ========================================================
   ANIMATIONEN AUS
   ======================================================== */
body.no-motion *,
body.no-motion *::before,
body.no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0s !important;
  transition-duration: 0.001ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

/* ========================================================
   RESPONSIV
   ======================================================== */
/* Mittlere Breite: Seitenleiste nur mit Symbolen */
@media (max-width: 1240px) and (min-width: 821px) {
  :root { --nav-w: 72px; }
  .app-nav { align-items: center; padding: 1.1rem 0.6rem 1rem; }
  .brand { padding: 0.2rem 0; }
  .brand-text, .nav-label, .profile-name-text, .profile-rating-badge, .nav-version,
  .google-login-btn > span:last-child { display: none; }
  .main-nav, .header-actions { width: 100%; align-items: center; }
  .nav-btn { justify-content: center; width: 48px; height: 44px; padding: 0; }
  .header-actions .google-login-btn { width: 44px; padding: 0; }
  .header-actions .profile-header-pill { width: 44px; justify-content: center; padding: 0; border: 0; }
  .nav-toggles { flex-direction: column; }
  .play-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; }
}

@media (max-width: 1080px) {
  .play-layout { grid-template-columns: minmax(0, 1fr); }
  .play-layout .sidebar-column { position: static; max-height: none; overflow: visible; max-width: 760px; margin: 0 auto; }
  .rules-grid { grid-template-columns: 1fr; }
  .home-features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Handy & schmale Fenster: Symbolleiste unten */
@media (max-width: 820px) {
  .app-nav {
    top: auto;
    right: 0;
    width: auto;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0 0.25rem env(safe-area-inset-bottom);
    border-right: 0;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    overflow: visible;
  }
  .app-nav .brand, .nav-toggles, .nav-label, .profile-name-text, .profile-rating-badge,
  .google-login-btn > span:last-child { display: none; }
  .main-nav { flex: 4; flex-direction: row; gap: 0; }
  .nav-btn { flex: 1; justify-content: center; padding: 0; border-radius: 0; background: transparent; }
  .nav-btn:hover { background: transparent; }
  .nav-btn.active { background: transparent; color: var(--text); }
  .nav-btn.active .icon { background: var(--bg-hover); border-radius: 999px; padding: 6px 16px; }
  .header-actions { flex: 1; margin: 0; flex-direction: row; align-items: center; justify-content: center; }
  .header-actions .google-login-btn { width: 40px; height: 40px; padding: 0; border-radius: 999px; background: transparent; border-color: var(--border-strong); }
  .header-actions .profile-header-pill { width: 40px; height: 40px; justify-content: center; padding: 0; border: 0; }
  .app-main { margin-left: 0; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .board-column { --board-chrome: calc(var(--nav-h) + 90px); }
  body.hide-coords .board-column { --board-chrome: calc(var(--nav-h) + 130px); }
  body.in-game .main-content { padding: 0.4rem 0.3rem 1rem; }
  /* Kompakte Spielerleisten: kleines Bild, Name gekürzt, Uhr in der Mitte */
  .board-team-bar { gap: 0.3rem; padding: 0.25rem 0.1rem; }
  .player-indicator { gap: 0.4rem; padding: 0.2rem 0.3rem 0.2rem 0.2rem; }
  .player-indicator.side-right { padding: 0.2rem 0.2rem 0.2rem 0.3rem; }
  .p-avatar { width: 28px; height: 28px; font-size: 0.7rem; }
  .p-half { display: none; }
  .cap-piece { width: 14px; height: 14px; }
  .p-elo { font-size: 0.72rem; }
  .p-line .flag-img { display: none; }
  .team-clock { min-width: 70px; padding: 0.2rem 0.5rem; font-size: 1rem; }
  .team-clock.no-clock { font-size: 0.72rem; }
  .captured-pieces { max-width: 90px; font-size: 0.72rem; }
  #rankLabelsRight { display: none; }
  .rank-labels { width: 18px; padding: 0; align-items: center; }
  .file-labels { padding: 0 0 0 18px; }
  .setup-modes { grid-template-columns: 1fr; }
  .setup-mode { flex-direction: row; align-items: center; padding: 0.9rem 1rem; }
  /* Einstellungen: Menüpunkte als waagerechte Leiste oben */
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 0.5rem; }
  .settings-nav-btn { flex-shrink: 0; padding: 0.5rem 0.7rem; }
  .settings-nav-btn.active { box-shadow: inset 0 -2px 0 var(--text); }
  .settings-reset { margin: 0 0 0 0.5rem; flex-shrink: 0; }
  .settings-board-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-preview { position: static; width: min(220px, 70%); margin: 0 auto; order: -1; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .home-features-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1.25rem 1rem 3rem; }
  .setup-head h1 { font-size: 1.6rem; }
  .setup-panel { padding: 1.1rem; }
  .home-hero { padding: 2.5rem 0 2rem; }
  .board-team-bar { gap: 0.4rem; }
  .rank-labels, .file-labels { font-size: 0.62rem; }
  .half-header-indicator { font-size: 0.62rem; }
  .sub-tag { display: none; }
  .controls-grid { grid-template-columns: repeat(2, 1fr); }
  .controls-grid .span-2 { grid-column: span 2; }
  .settings-panel .switch-row { flex-direction: column; align-items: flex-start; }
  .settings-content { padding: 1.1rem 1rem; }
  .settings-range { width: 100%; }
  .settings-range input[type="range"] { flex: 1; width: auto; }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bot-options-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 1.25rem; }
  .rules-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   BLOCKIEREN & RANGLISTEN (0.18)
   ========================================== */
.block-row { align-items: flex-start; }
.block-list { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-end; }
.block-item { display: flex; align-items: center; gap: 8px; }
.block-who { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.block-who:hover { background: var(--bg-soft); }
.block-who .p-avatar { width: 26px; height: 26px; font-size: 12px; }

.rank-panel { max-width: 760px; }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rank-head h2 { margin: 0; }
.rank-note { margin: 6px 0 12px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.rank-row:nth-child(odd) { background: var(--bg-soft); }
.rank-row.is-me { border-color: var(--accent); }
.rank-place { font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; color: var(--text-muted); }
.rank-row.top1 .rank-place, .rank-row.top2 .rank-place, .rank-row.top3 .rank-place { color: var(--text); }
.rank-row.top1 .rank-place { font-size: 1.15em; }
.rank-who { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.rank-who:hover strong { text-decoration: underline; }
.rank-who .p-avatar { flex: none; width: 32px; height: 32px; }
.rank-avatars { display: inline-flex; flex: none; }
.rank-avatars .p-avatar + .p-avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--bg-card, var(--bg)); }
.rank-text { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.rank-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rank-text small { color: var(--text-muted); width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-text .flag-img { width: 18px; height: auto; border-radius: 2px; }
.rank-value { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 820px) {
  .block-row { flex-direction: column; }
  .block-list { align-items: stretch; width: 100%; }
  .block-item { justify-content: space-between; }
}

/* ==========================================
   TAKTIK-RÄTSEL & PARTYS (0.19)
   ========================================== */
.puzzle-bar .tutorial-step { white-space: nowrap; }
.puzzle-party-line { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 0.9rem; color: var(--text-muted); }
.puzzle-party-line.is-me { color: var(--text); font-weight: 600; }
.puzzle-feedback { margin: 8px 0 0; font-weight: 600; }
.puzzle-feedback.ok { color: var(--success); }
.puzzle-feedback.bad { color: var(--danger); }
.puzzle-themes { margin: 6px 0 0; font-size: 0.9rem; color: var(--text-muted); }

.puz-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.puz-stat { display: flex; flex-direction: column; gap: 2px; }
.puz-stat-val { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.puz-stat-label { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 1100px) { .puzzles-page .friends-grid .friends-col:last-child { order: 0; } }
.puzzles-page .friends-grid { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1100px) { .puzzles-page .friends-grid { grid-template-columns: minmax(0, 1fr); } }
.puz-resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.puz-resume p { margin: 0; }
.puz-levels { margin-top: 8px; flex-wrap: wrap; }
.puz-sub { margin-top: 18px; }
.puz-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 8px; }
.puz-theme { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--bg-soft); color: var(--text); font: inherit; cursor: pointer; }
.puz-theme:hover { background: var(--bg-hover); }
.puz-theme.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.puz-theme-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.puz-theme-n { font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.puz-theme small { color: var(--text-muted); line-height: 1.3; }
.puz-how { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--text-muted); }

.party-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.party-members { display: flex; flex-direction: column; gap: 6px; }
.party-member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; }
.party-member.is-turn { border-color: var(--accent); }
.party-member .p-avatar { width: 28px; height: 28px; }
.party-member small { color: var(--text-muted); white-space: nowrap; }
.party-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-score { font-weight: 600; margin: 8px 0 0; }
.party-invite { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; flex-wrap: wrap; }
.party-friend { display: inline-flex; align-items: center; gap: 8px; }
.party-friend .p-avatar { width: 26px; height: 26px; }
.party-chat { max-height: 220px; min-height: 60px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; background: var(--bg-soft); margin-bottom: 8px; }
.party-chat-name { display: block; font-size: 0.75rem; color: var(--text-muted); }
@media (max-width: 820px) {
  .puz-stats { gap: 6px; }
  .puz-stat-val { font-size: 1.3rem; }
  .puz-themes { grid-template-columns: 1fr 1fr; }
}

/* ==========================================
   RÄTSEL-KARTE NEBEN DEM BRETT (0.20)
   ========================================== */
body.puzzle-mode .sidebar-column > .card:not(.puzzle-card) { display: none !important; }
body.puzzle-mode .half-header-indicator { display: none; }
/* Eine Spalte (Karte unter dem Brett): Brett um die Kartenhöhe kleiner, damit nichts gescrollt werden muss.
   --puz-card-h setzt js/app.js (ResizeObserver auf #puzzleBar). */
/* Mittlere Breite: Rätsel-/Trainer-Karte neben dem Brett statt darunter (kein Scrollen) */
@media (min-width: 821px) and (max-width: 1080px) {
  body.puzzle-mode .play-layout, body.review-mode .play-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 0.8rem; }
  body.puzzle-mode .play-layout .sidebar-column, body.review-mode .play-layout .sidebar-column { max-width: none; margin: 0; }
}
body.review-mode .review-card { max-height: calc(100dvh - 2rem); overflow-y: auto; }
.puzzle-card { display: flex; flex-direction: column; gap: 10px; }
.puzzle-card .card-header { margin: 0; }
.puz-card-title { display: inline-flex; align-items: center; gap: 6px; }
.puz-goal { margin: 0; line-height: 1.45; }
.puz-steps { display: flex; align-items: center; gap: 6px; }
.puz-dot { width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--border-strong); }
.puz-dot.done { background: var(--success); border-color: var(--success); }
.puz-dot.current { border-color: var(--accent); }
.puz-step-text { margin-left: 4px; font-size: 0.9rem; color: var(--text-muted); }
.puz-now strong { white-space: nowrap; }
.puz-now { padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); font-size: 0.95rem; line-height: 1.4; }
.puzzle-card .puzzle-feedback, .puzzle-card .puzzle-themes, .puzzle-card .puzzle-party-line { margin: 0; }
.puz-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.puz-actions .span-2 { grid-column: span 2; }
.puz-actions .btn { justify-content: center; }
.puz-howto { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 820px) {
  body.puzzle-mode .board-column { --board-chrome: calc(var(--nav-h) + 80px + var(--puz-card-h, 220px)); }
  .puzzle-card { gap: 8px; padding: 12px; }
  .puz-goal { font-size: 0.9rem; }
  .puz-actions { gap: 6px; }
  .puz-actions .btn { padding: 7px 6px; font-size: 0.85rem; }
  .puz-now { padding: 6px 8px; font-size: 0.9rem; }
  .puz-howto { display: none; }
}

/* ==========================================
   TRAINER / PARTIE-ANALYSE (0.21)
   Eigene Farbpalette der Bewertungen (seit 0.65, bewusst anders als bei anderen Schachseiten)
   ========================================== */
:root {
  --rv-brilliant: #8b7cf6; --rv-great: #4f9df0; --rv-best: #34b27a; --rv-excellent: #5cbf93; --rv-good: #8fae9e;
  --rv-forced: #8c8c8c; --rv-inaccuracy: #e2b93b; --rv-mistake: #e8853f; --rv-miss: #d96a9a; --rv-blunder: #e04848;
}
body.review-mode .sidebar-column > .card:not(.review-card) { display: none !important; }
body.review-mode .replay-bar { display: none !important; }
.review-card { gap: 10px; }
.rv-text { margin: 0; line-height: 1.45; }
.rv-progress { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.rv-progress span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.rv-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rv-sym { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; color: #fff; font-size: 0.78rem; line-height: 1; font-weight: 800; }
.rv-label { font-size: 0.9rem; }
.rv-brilliant .rv-sym { background: var(--rv-brilliant); }
.rv-brilliant .rv-label, .rv-c-brilliant { color: var(--rv-brilliant); }
.rv-fill-brilliant { background: var(--rv-brilliant) !important; }
.rv-great .rv-sym { background: var(--rv-great); }
.rv-great .rv-label, .rv-c-great { color: var(--rv-great); }
.rv-fill-great { background: var(--rv-great) !important; }
.rv-best .rv-sym { background: var(--rv-best); }
.rv-best .rv-label, .rv-c-best { color: var(--rv-best); }
.rv-fill-best { background: var(--rv-best) !important; }
.rv-excellent .rv-sym { background: var(--rv-excellent); }
.rv-excellent .rv-label, .rv-c-excellent { color: var(--rv-excellent); }
.rv-fill-excellent { background: var(--rv-excellent) !important; }
.rv-good .rv-sym { background: var(--rv-good); }
.rv-good .rv-label, .rv-c-good { color: var(--rv-good); }
.rv-fill-good { background: var(--rv-good) !important; }
.rv-forced .rv-sym { background: var(--rv-forced); }
.rv-forced .rv-label, .rv-c-forced { color: var(--rv-forced); }
.rv-fill-forced { background: var(--rv-forced) !important; }
.rv-inaccuracy .rv-sym { background: var(--rv-inaccuracy); }
.rv-inaccuracy .rv-label, .rv-c-inaccuracy { color: var(--rv-inaccuracy); }
.rv-fill-inaccuracy { background: var(--rv-inaccuracy) !important; }
.rv-mistake .rv-sym { background: var(--rv-mistake); }
.rv-mistake .rv-label, .rv-c-mistake { color: var(--rv-mistake); }
.rv-fill-mistake { background: var(--rv-mistake) !important; }
.rv-miss .rv-sym { background: var(--rv-miss); }
.rv-miss .rv-label, .rv-c-miss { color: var(--rv-miss); }
.rv-fill-miss { background: var(--rv-miss) !important; }
.rv-blunder .rv-sym { background: var(--rv-blunder); }
.rv-blunder .rv-label, .rv-c-blunder { color: var(--rv-blunder); }
.rv-fill-blunder { background: var(--rv-blunder) !important; }
.rv-on-board { position: absolute; top: -6px; right: -6px; z-index: 6; pointer-events: none; }
.rv-on-board .rv-sym { min-width: 24px; height: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.45); border: 2px solid var(--bg); }
.square { position: relative; }
.mark-line.review-best { stroke: var(--rv-best); }
.mark-head.review-best { fill: var(--rv-best); }
.mark-line.review-played { stroke: var(--rv-blunder); opacity: .75; }
.mark-head.review-played { fill: var(--rv-blunder); opacity: .75; }
.rv-sum-toggle { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.rv-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rv-acc-box { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); }
.rv-acc-val { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-acc-label, .rv-acc-seats { font-size: 0.8rem; color: var(--text-muted); }
.rv-table { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: center; }
.rv-th { font-size: 0.75rem; color: var(--text-muted); text-align: right; }
.rv-cnt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-current { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg-soft); }
.rv-move-no { font-size: 0.85rem; color: var(--text-muted); }
.rv-move-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-better { margin: 0; padding: 8px 10px; border-left: 3px solid var(--rv-best); background: var(--bg); border-radius: 6px; }
.rv-eval { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-muted); }
.rv-evalbar { height: 6px; border-radius: 999px; background: #3a3a3a; overflow: hidden; }
.rv-evalbar span { display: block; height: 100%; }
.rv-evalbar-w { background: #f2f2f2; } .rv-evalbar-b { background: #777; }
.rv-nav { display: flex; align-items: center; justify-content: center; gap: 6px; }
.rv-next-error { align-self: center; }
.rv-list { display: flex; flex-wrap: wrap; gap: 4px; max-height: 180px; overflow-y: auto; padding-top: 4px; border-top: 1px solid var(--border); }
.rv-item { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--text); font: inherit; font-size: 0.8rem; cursor: pointer; }
.rv-item:hover { background: var(--bg-soft); }
.rv-item.active { border-color: var(--accent); }
.rv-item .rv-sym { min-width: 18px; height: 18px; font-size: 0.68rem; }
.rv-item-no { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rv-prof-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.rv-prof-list { display: flex; flex-direction: column; gap: 6px; }
.rv-prof-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 80px; gap: 10px; align-items: center; }
.rv-prof-n { text-align: right; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
@media (max-width: 820px) {
  .rv-prof-row { grid-template-columns: 140px minmax(0, 1fr) 70px; }
  .rv-list { max-height: 72px; }
  body.review-mode .review-card { max-height: none; overflow: visible; }
  body.review-mode .board-column { --board-chrome: min(calc(var(--nav-h) + 80px + var(--rv-card-h, 300px)), calc(100dvh - 290px)); }
  .review-card .puz-howto { display: none; }
}

/* ==========================================
   ANIMATIONEN (0.22) – dezent, ohne Verläufe/Glow; "Bewegung aus" (body.no-motion) schaltet alles ab
   ========================================== */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* Seitenwechsel: Inhalt gleitet weich herein, Karten nacheinander (JS setzt --stagger kurz nach dem Wechsel) */
.tab-pane { animation: paneIn .32s var(--ease-out); }
@keyframes paneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fx-enter .p-panel, .fx-enter .card, .fx-enter .mode-card, .fx-enter .setup-mode-card, .fx-enter .feature-card,
.fx-enter .puz-theme, .fx-enter .rank-row, .fx-enter .rule-card, .fx-enter .settings-panel.active, .fx-enter .team-card {
  animation: riseIn .45s var(--ease-out) both;
  animation-delay: calc(var(--stagger, 0) * 45ms);
}
@keyframes riseIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* Knöpfe: leicht anheben, beim Drücken einsinken */
.btn { transition: background-color .15s, border-color .15s, color .15s, opacity .15s, transform .15s var(--ease-out), box-shadow .15s; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(0) scale(.97); transition-duration: .06s; }
.btn-icon:not(:disabled):hover { transform: scale(1.06); }

/* Navigation: Symbol springt beim Aktivieren */
.nav-btn .icon { transition: transform .2s var(--ease-out); }
.nav-btn:hover .icon { transform: scale(1.08); }
.nav-btn.active .icon { animation: navPop .35s var(--ease-spring); }
@keyframes navPop { 0% { transform: scale(.8); } 100% { transform: scale(1); } }
.nav-badge:not([hidden]) { animation: badgePop .4s var(--ease-spring); }
@keyframes badgePop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* Fenster (Modals): Hintergrund blendet ein, Karte federt */
.modal-overlay { animation: fadeIn .2s ease-out; }
.modal-card { animation: modalSpring .38s var(--ease-spring); }
@keyframes modalSpring { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
#gameOverModal .modal-header .icon, #gameOverModal .modal-header svg { animation: trophyBounce .7s var(--ease-spring) .15s both; }
@keyframes trophyBounce { 0% { transform: scale(0) rotate(-20deg); } 70% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }

/* Hinweisbox: kurzer "Puls", wenn sich der Text ändert */
.rule-hint-box.fx-pop, .puzzle-feedback, .rv-current { animation: hintPop .35s var(--ease-out); }
@keyframes hintPop { 0% { transform: scale(.97); opacity: .4; } 100% { transform: none; opacity: 1; } }

/* Spielerleisten: der Spieler am Zug bekommt einen weichen Übergang */
.player-indicator { transition: background-color .25s, border-color .25s, transform .25s var(--ease-out); }
.player-indicator.active { transform: translateY(-1px); }
.player-indicator.active .p-avatar { animation: turnPulse 1.8s ease-in-out infinite; }
@keyframes turnPulse { 0%, 100% { box-shadow: 0 0 0 2px var(--text); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 35%, transparent); } }

/* ---------- Brett ---------- */
.square.selected .piece { transform: scale(1.1) translateY(-3%); filter: drop-shadow(0 4px 6px rgba(0,0,0,.28)); }
.square.valid-move::before { animation: dotIn .18s var(--ease-spring) both; }
.square.valid-capture::before { animation: ringIn .2s var(--ease-out) both; }
@keyframes dotIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ringIn { from { transform: scale(1.25); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.piece.gliding { transition-timing-function: var(--ease-out) !important; }

/* König in Gefahr: Feld pulsiert, König zittert leicht */
.square.king-danger .piece { animation: kingShiver 2.4s ease-in-out infinite; }
@keyframes kingShiver { 0%, 86%, 100% { transform: none; } 89% { transform: rotate(-7deg); } 92% { transform: rotate(6deg); } 95% { transform: rotate(-4deg); } 98% { transform: rotate(2deg); } }

/* Schachmatt: der mattgesetzte König kippt um */
.square.king-mated { box-shadow: inset 0 0 0 3px #ef4444; }
.square.king-mated .piece { transform: rotate(80deg) translateY(8%); filter: grayscale(.6) opacity(.75); }
.square.king-mated.fx-anim .piece { animation: kingTopple .9s var(--ease-out) .25s both; }
@keyframes kingTopple {
  0% { transform: none; filter: none; }
  25% { transform: rotate(-12deg); }
  60% { transform: rotate(95deg) translateY(10%); }
  80% { transform: rotate(74deg) translateY(7%); }
  100% { transform: rotate(80deg) translateY(8%); filter: grayscale(.6) opacity(.75); }
}

/* Effekt-Ebene über dem Brett (wird von js/app.js gefüllt) */
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 12; overflow: hidden; }
.fx-sq { position: absolute; width: 10%; height: 10%; display: flex; align-items: center; justify-content: center; }
.fx-sq .piece { width: 88%; height: 88%; }
/* Schlagen: Ring dehnt sich aus, geschlagene Figur fällt weg */
.fx-capture-ring { position: absolute; inset: 10%; border-radius: 50%; border: 3px solid var(--text); animation: ringBurst .5s var(--ease-out) forwards; }
@keyframes ringBurst { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.fx-captured { animation: capturedOut .55s var(--ease-out) forwards; }
@keyframes capturedOut { 0% { transform: scale(1); opacity: 1; } 100% { transform: translateY(30%) scale(.3) rotate(25deg); opacity: 0; } }
/* König geschlagen: König wirbelt davon */
.fx-king-out { animation: kingOut 1s var(--ease-out) forwards; }
@keyframes kingOut { 0% { transform: none; opacity: 1; } 30% { transform: scale(1.3) rotate(-15deg); } 100% { transform: translateY(-160%) scale(.6) rotate(220deg); opacity: 0; } }
/* Schach: Ring um das Königsfeld blinkt zweimal */
.fx-check { position: absolute; inset: 3%; border-radius: 12%; border: 3px solid #ef4444; animation: checkFlash .9s ease-out forwards; }
@keyframes checkFlash { 0%, 50% { opacity: 1; transform: scale(1.15); } 25%, 75% { opacity: .2; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
/* Übergabe: Mittellinie leuchtet kurz auf */
.fx-center { position: absolute; top: 0; bottom: 0; left: 50%; width: 6px; margin-left: -3px; background: var(--center-line); animation: centerFlash .8s ease-out forwards; }
@keyframes centerFlash { 0% { opacity: 0; transform: scaleY(0); } 30% { opacity: .9; transform: scaleY(1); } 100% { opacity: 0; transform: scaleY(1); } }
/* Umwandlung: neue Figur springt auf */
.fx-promo { animation: promoPop .6s var(--ease-spring); }
@keyframes promoPop { 0% { transform: scale(.2) rotate(-30deg); } 100% { transform: none; } }
/* Rätsel/Trainer: richtiges bzw. falsches Feld */
.fx-good { position: absolute; inset: 0; background: color-mix(in srgb, var(--success) 45%, transparent); animation: sqFlash .7s ease-out forwards; }
.fx-bad { position: absolute; inset: 0; background: color-mix(in srgb, var(--danger) 50%, transparent); animation: sqFlash .7s ease-out forwards; }
@keyframes sqFlash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.chess-board.fx-shake { animation: boardShake .4s ease-in-out; }
@keyframes boardShake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
/* Großes Schriftband: "Schach!", "Schachmatt!", "König geschlagen!", "Gelöst!" */
.fx-banner { position: absolute; left: 50%; top: 50%; z-index: 14; padding: .55em 1.1em; border-radius: 999px; font-weight: 800; font-size: clamp(1rem, 3.2vw, 2rem); letter-spacing: .02em; white-space: nowrap;
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 12px 32px rgba(0,0,0,.4); transform: translate(-50%, -50%); animation: bannerIn 1.4s var(--ease-out) forwards; }
.fx-banner.check { color: #ef4444; animation-duration: 1s; font-size: clamp(.9rem, 2.4vw, 1.4rem); }
.fx-banner.mate, .fx-banner.king { background: #ef4444; color: #fff; border-color: transparent; animation-duration: 1.9s; }
.fx-banner.solved { background: var(--success); color: #06210f; border-color: transparent; }
@keyframes bannerIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  28% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(.96); }
}
.chess-board.fx-dim::before { content: ""; position: absolute; inset: 0; z-index: 11; background: rgba(0,0,0,.28); animation: fadeIn .4s ease-out; pointer-events: none; }

/* Rätsel-Schrittpunkte und Trainer-Abzeichen */
.puz-dot.done { animation: dotDone .45s var(--ease-spring); }
@keyframes dotDone { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.rv-on-board { animation: badgeIn .45s var(--ease-spring) both; }
@keyframes badgeIn { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: none; } }
.rv-item.active { transition: border-color .2s; }
.rv-progress span { transition: width .3s var(--ease-out); }

/* Hell schon vor dem ersten Bild (vor body.theme-light) */
:root[data-site-theme="light"] { --bg: #f2f1ed; --bg-elev: #faf9f6; --bg-soft: #e9e7e2; --bg-hover: #dfdcd6; --border: #dcd9d2; --border-strong: #c9c5bc; --text: #22211f; --text-muted: #5d5b56; --text-subtle: #8c8982; --accent: #2a2926; --accent-fg: #faf9f6; color-scheme: light; }

/* ==========================================
   WEBSITE-DESIGNS (0.23) – Auswahl in Einstellungen → Oberfläche
   Graphit = Standard (weiches Dunkelgrau). Schwarz = echtes Schwarz (OLED, bisheriges Design).
   Hell = weiches Weiß (body.theme-light). Schach-Themen: Mitternacht, Walnuss, Turnierfilz, Pergament, Marmor.
   Das Attribut setzt ein kleines Skript im <head> schon vor dem ersten Bild (kein Aufblitzen).
   ========================================== */
:root[data-site-theme="graphite"], body[data-site-theme="graphite"] {
  --bg: #1d1e21;
  --bg-elev: #25262a;
  --bg-soft: #2d2e33;
  --bg-hover: #36373d;
  --border: #34353b;
  --border-strong: #46474e;
  --text: #ececee;
  --text-muted: #a7a8ae;
  --text-subtle: #75767d;
  --accent: #efeff1;
  --accent-fg: #1d1e21;
  --focus: rgba(255,255,255,.3);
  --modal-backdrop: rgba(10,10,12,.62);
}

:root[data-site-theme="midnight"], body[data-site-theme="midnight"] {
  --bg: #141a26;
  --bg-elev: #1b2232;
  --bg-soft: #222b3d;
  --bg-hover: #2a3448;
  --border: #2b354a;
  --border-strong: #3c4862;
  --text: #e7ecf5;
  --text-muted: #a3aec4;
  --text-subtle: #6d7991;
  --accent: #dbe5ff;
  --accent-fg: #141a26;
  --focus: rgba(255,255,255,.3);
  --modal-backdrop: rgba(6,10,20,.65);
}

:root[data-site-theme="walnut"], body[data-site-theme="walnut"] {
  --bg: #1f1813;
  --bg-elev: #29201a;
  --bg-soft: #322820;
  --bg-hover: #3c3027;
  --border: #3e3128;
  --border-strong: #54432f;
  --text: #f2e8db;
  --text-muted: #c4b09a;
  --text-subtle: #8b7865;
  --accent: #e9c99b;
  --accent-fg: #1f1813;
  --focus: rgba(255,255,255,.3);
  --modal-backdrop: rgba(15,10,6,.65);
  --center-line: #e9a23b;
}

:root[data-site-theme="felt"], body[data-site-theme="felt"] {
  --bg: #14211b;
  --bg-elev: #1b2b23;
  --bg-soft: #22352b;
  --bg-hover: #2a3f33;
  --border: #2b4135;
  --border-strong: #3c5747;
  --text: #e9f2eb;
  --text-muted: #a8bfb0;
  --text-subtle: #6f8b7a;
  --accent: #dcf0e2;
  --accent-fg: #14211b;
  --focus: rgba(255,255,255,.3);
  --modal-backdrop: rgba(5,15,10,.65);
}

:root[data-site-theme="paper"], body[data-site-theme="paper"] {
  --bg: #efe7d6;
  --bg-elev: #f8f2e5;
  --bg-soft: #e6dcc6;
  --bg-hover: #ddd0b7;
  --border: #d9ccb3;
  --border-strong: #c4b597;
  --text: #2c251b;
  --text-muted: #6b5d48;
  --text-subtle: #978872;
  --accent: #3b3022;
  --accent-fg: #f8f2e5;
  --focus: rgba(0,0,0,.22);
  --modal-backdrop: rgba(0,0,0,.32);
  --danger: #c0392b;
  --danger-soft: rgba(192,57,43,.08);
  --success: #2f8f46;
  --warn: #a8620a;
  --warn-soft: rgba(168,98,10,.08);
  --center-line: #c2760c;
}

:root[data-site-theme="marble"], body[data-site-theme="marble"] {
  --bg: #e7e9ec;
  --bg-elev: #f4f5f7;
  --bg-soft: #dde0e5;
  --bg-hover: #d3d7dd;
  --border: #d1d5db;
  --border-strong: #bcc2ca;
  --text: #1d2127;
  --text-muted: #555c66;
  --text-subtle: #868d97;
  --accent: #1f242b;
  --accent-fg: #f4f5f7;
  --focus: rgba(0,0,0,.22);
  --modal-backdrop: rgba(0,0,0,.32);
  --danger: #c0392b;
  --danger-soft: rgba(192,57,43,.08);
  --success: #2f8f46;
  --warn: #a8620a;
  --warn-soft: rgba(168,98,10,.08);
}


/* Design-Auswahl: kleine Vorschau je Design */
.site-theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.site-theme { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, transform .15s var(--ease-out, ease); }
.site-theme:hover { transform: translateY(-2px); }
.site-theme.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.st-preview { position: relative; height: 70px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(127,127,127,.25); display: grid; grid-template-columns: 1fr 1.2fr; gap: 6px; padding: 6px; }
.st-card { border-radius: 5px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.st-line { height: 5px; border-radius: 3px; }
.st-board { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 4px; overflow: hidden; }
.st-board i { display: block; }
.st-name { font-weight: 600; font-size: .88rem; }
.st-sub { font-size: .75rem; color: var(--text-muted); margin-top: -6px; }
.settings-design-row { display: block !important; }

/* Sperr-Hinweis (0.24) */
.mod-banner { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--warn); background: var(--warn-soft); color: var(--text); font-size: .9rem; }
.mod-banner.is-ban { border-color: var(--danger); background: var(--danger-soft); }
/* Elo-Suche / Partie startet (0.70) */
.mm-banner { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin: 0 0 1rem; padding: .55rem .9rem; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--bg-soft); color: var(--text); font-size: .9rem; font-weight: 600; }
.mm-banner-icon { display: inline-flex; }
.mm-banner.is-searching .mm-banner-icon svg { animation: mmSpin 1.6s linear infinite; }
.mm-banner-note { font-weight: 400; color: var(--text-muted, inherit); }
.mm-banner .btn { margin-left: auto; padding: .3rem .8rem; font-size: .85rem; }
.mod-text { line-height: 1.5; }

/* Matchmaking & Remis & Team-Chat (0.25) */
.mm-box { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--bg-soft); margin-bottom: 1rem; }
.mm-box h3 { margin: 0; }
.mm-row { align-items: center; flex-wrap: wrap; }
.mm-status { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
.mm-status svg { animation: mmSpin 1.6s linear infinite; }
@keyframes mmSpin { to { transform: rotate(360deg); } }
.mm-or { margin: .5rem 0 .25rem; font-size: .95rem; color: var(--text-muted); }
.chat-card .card-header { gap: .5rem; flex-wrap: wrap; }
.chat-tabs { margin-left: auto; }
.chat-tabs .mode-tab-btn { padding: .2rem .6rem; font-size: .8rem; }
.chat-card.team-view .chat-list { box-shadow: inset 3px 0 0 var(--accent); }
.draw-card { max-width: 420px; text-align: center; }
.draw-card .modal-actions { justify-content: center; }

/* ============ ONLINE-STATUS, KONTO LÖSCHEN, ELO-MODUS (0.26) ============ */
.setup-modes { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) and (min-width: 821px) { .setup-modes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .setup-modes { grid-template-columns: 1fr; } }
.presence-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); opacity: .55; flex-shrink: 0; }
.presence-tag.is-online { color: var(--success); }
.presence-tag.is-online .presence-dot { background: var(--success); opacity: 1; }
.presence-tag.is-dnd { color: var(--danger); }
.presence-tag.is-dnd .presence-dot { background: var(--danger); opacity: 1; position: relative; }
.presence-tag.is-dnd .presence-dot::after { content: ""; position: absolute; left: 2px; right: 2px; top: 3.5px; height: 1px; background: var(--bg); }
.person-line .presence-tag { margin-left: .35rem; }
.dm-who .presence-tag { margin-left: .4rem; }
.presence-self { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin: 0 0 1rem; }
.presence-self-label { font-weight: 600; font-size: .9rem; }
.presence-self .profile-note { margin: 0; }
.presence-select { min-width: 10rem; }
.dm-dnd { margin: 0 0 .5rem; }
.settings-danger { margin-top: 1.25rem; padding: 1rem; border-radius: var(--radius-md); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-soft); display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.settings-danger h3 { margin: 0; font-size: 1rem; }
.settings-danger p { margin: 0; }
.del-banner:not([hidden]) { border-color: var(--danger); background: var(--danger-soft); display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }

/* ============ STARTSEITE „ALLES AUF EINEN BLICK“ + HANDY-LEISTE MIT 4 PUNKTEN (0.28) ============ */
.home-hub { margin: 0 0 2rem; }
.home-hub h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.hub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.hub-tile { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-width: 0; transition: background .15s, border-color .15s, transform .15s; }
.hub-tile:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.hub-tile:active { transform: scale(.98); }
.hub-tile.is-accent { border-color: var(--border-strong); }
.hub-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-hover); flex-shrink: 0; }
.hub-text { display: flex; flex-direction: column; min-width: 0; }
.hub-text strong { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-text small { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-back { display: none; }
@media (max-width: 1100px) { .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  /* Leiste unten: nur Home, Spielen, Rätsel, Freunde – mit kleiner Beschriftung */
  .main-nav .nav-btn[data-tab="rules"], .main-nav .nav-btn[data-tab="ranking"], .main-nav .nav-btn[data-tab="settings"],
  .app-nav .header-actions { display: none; }
  .main-nav { flex: 1; }
  .nav-btn { flex-direction: column; gap: 2px; }
  .main-nav .nav-label { display: block; font-size: .68rem; line-height: 1; color: var(--text-muted); }
  .nav-btn.active .nav-label, .nav-btn.nav-parent .nav-label { color: var(--text); font-weight: 600; }
  .main-nav .nav-btn .icon { border-radius: 999px; padding: 4px 16px; }
  .nav-btn.active .icon, .nav-btn.nav-parent .icon { background: var(--bg-hover); }
  .hub-back:not([hidden]) { display: inline-flex; align-items: center; gap: .3rem; margin: 0 0 .75rem; padding: .35rem .7rem .35rem .45rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
  .hub-grid { gap: .5rem; }
  .hub-tile { padding: .7rem; gap: .55rem; }
  .hub-icon { width: 32px; height: 32px; }
}

/* ============ ELO, REVANCHE, ERFOLGE, DIAGRAMME, LERNEN (0.29) ============ */
.elo-line { margin: .25rem 0 .75rem; padding: .6rem .8rem; border-radius: var(--radius-md); background: var(--bg-soft); border: 1px solid var(--border); font-weight: 600; font-variant-numeric: tabular-nums; }
.elo-line.is-up { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.elo-line.is-down { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; margin-top: .75rem; }
.chart-box { padding: .7rem .8rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-soft); min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .3rem; }
.chart-label { font-size: .82rem; color: var(--text-muted); }
.chart-last { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-svg { display: block; width: 100%; height: 90px; }
.chart-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-area { fill: var(--text); opacity: .07; }
.chart-dot { fill: var(--text); }
.chart-foot { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-subtle); margin-top: .2rem; }
.chart-box .profile-note { margin: .4rem 0 0; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.badge { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: var(--radius-md); border: 1px dashed var(--border); opacity: .75; min-width: 0; }
.badge.is-earned { border-style: solid; border-color: var(--border-strong); background: var(--bg-soft); opacity: 1; }
.badge-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-hover); color: var(--text-subtle); flex-shrink: 0; }
.badge.is-earned .badge-icon { background: var(--text); color: var(--bg); }
.badge-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.badge-text strong { font-size: .86rem; }
.badge-text small { font-size: .74rem; color: var(--text-muted); }
.badge-text .meter-track { height: 4px; }
.learn-list { display: flex; flex-direction: column; gap: .6rem; }
.learn-card { padding: 0; overflow: hidden; }
.learn-head { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .85rem 1rem; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.learn-head:hover { background: var(--bg-soft); }
.learn-card.is-done .hub-icon { background: var(--text); color: var(--bg); }
.learn-body { padding: 0 1rem 1rem 3.6rem; }
.learn-body p { margin: 0 0 .6rem; line-height: 1.55; }
.learn-tip { display: flex; gap: .4rem; align-items: flex-start; padding: .55rem .7rem; border-radius: var(--radius-md); background: var(--bg-soft); font-size: .9rem; }
.learn-body .modal-actions { align-items: center; flex-wrap: wrap; }
@media (max-width: 820px) { .learn-body { padding: 0 .9rem .9rem; } }

/* ============ COACH (0.30) ============ */
.coach-status { display: flex; align-items: center; gap: .4rem; margin: .4rem 0 0; font-size: .88rem; color: var(--text-muted); }
.coach-status.is-busy svg { animation: mmSpin 1.6s linear infinite; }
.coach-motif { padding: .75rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft); margin-top: .6rem; }
.coach-motif-head { display: flex; align-items: center; gap: .55rem; }
.coach-rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.coach-motif-stat { margin: .35rem 0 .2rem; font-weight: 600; font-size: .9rem; }
.coach-motif .profile-note { margin: .25rem 0 .5rem; }
.coach-trend { margin: 0; font-size: .82rem; color: var(--text-muted); }
.coach-trend.is-good { color: var(--success); }
.coach-trend.is-bad { color: var(--danger); }
.coach-task { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.coach-task:first-of-type { border-top: 0; }
.coach-task-text { display: flex; flex-direction: column; gap: .25rem; flex: 1; min-width: 0; }
.coach-task-text strong { font-size: .88rem; font-weight: 600; }
.coach-task-text small { font-size: .75rem; color: var(--text-muted); }
.coach-task.is-done .hub-icon { background: var(--text); color: var(--bg); }
.coach-task.is-done strong { color: var(--text-muted); }
.coach-plan-done { padding: .5rem .7rem; border-radius: var(--radius-md); background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); font-weight: 600; margin: 0 0 .5rem; }
.coach-team { padding: .7rem 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }
.coach-team:first-of-type { border-top: 0; }
.coach-team .rv-prof-tiles { width: 100%; }
.coach-insights { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; line-height: 1.45; }

/* Entbannungsantrag (0.31) */
.mod-banner .appeal-part { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: .5rem; }
.appeal-state { font-weight: 600; }
.appeal-text { width: 100%; resize: vertical; min-height: 120px; font: inherit; }

/* ============ SCHACH-DNA (0.32) ============ */
.dna-top { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 1rem; align-items: center; }
.dna-radar { width: 100%; height: auto; overflow: visible; }
.dna-grid { fill: none; stroke: var(--border); stroke-width: 1; }
.dna-axis { stroke: var(--border); stroke-width: 1; }
.dna-shape { fill: var(--text); fill-opacity: .14; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.dna-label { font-size: 10.5px; fill: var(--text-muted); font-family: inherit; }
.dna-label.is-empty { fill: var(--text-subtle); font-style: italic; }
.dna-side { display: flex; flex-direction: column; gap: .3rem; }
.dna-kicker { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.dna-type { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.dna-type-desc { margin: 0; line-height: 1.5; }
.dna-traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.25rem; margin-top: 1rem; }
.dna-trait .profile-note { margin: .2rem 0 0; font-size: .78rem; }
.dna-sub { font-size: .95rem; margin: 1.1rem 0 .5rem; }
.dna-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; color: var(--text-muted); margin-bottom: .3rem; }
.dna-legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.dna-legend-item i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; background: currentColor; }
.dna-legend-item.is-a i, .chart-line.is-a { color: var(--danger); stroke: var(--danger); }
.dna-legend-item.is-b i, .chart-line.is-b { color: var(--text); stroke: var(--text); }
.dna-legend-item.is-c i, .chart-line.is-c { color: var(--success); stroke: var(--success); }
.chart-dot.is-a { fill: var(--danger); } .chart-dot.is-b { fill: var(--text); } .chart-dot.is-c { fill: var(--success); }
.dna-trend { height: auto; }
.dna-teaser p { margin: .25rem 0 .6rem; }
@media (max-width: 820px) {
  .dna-top { grid-template-columns: 1fr; }
  .dna-radar { max-width: 260px; margin: 0 auto; }
  .dna-traits { grid-template-columns: 1fr; }
}

/* ===== BRETT-DESIGNS (0.33): Texturen + animierte Bretter – automatisch erzeugt (Rauschen per SVG, keine fremden Bilder) ===== */
:root {
  --tex-edelholz-l: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27200%27%20height%3D%27200%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.006%200.11%27%20numOctaves%3D%274%27%20seed%3D%273%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.55%200%200%200%200%200.36%200%200%200%200%200.17%200%200%200%201.7%20-0.62%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27%23e6c696%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --tex-edelholz-d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27200%27%20height%3D%27200%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.09%200.005%27%20numOctaves%3D%274%27%20seed%3D%277%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.2%200%200%200%200%200.09%200%200%200%200%200.03%200%200%200%203%20-1.05%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27%2393603a%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --tex-marmor-l: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27c%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.018%27%20numOctaves%3D%274%27%20seed%3D%2711%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.78%200%200%200%200%200.78%200%200%200%200%200.8%200%200%200%201.3%20-0.45%27%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%27v%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27turbulence%27%20baseFrequency%3D%270.009%200.014%27%20numOctaves%3D%275%27%20seed%3D%2712%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.42%200%200%200%200%200.42%200%200%200%200%200.47%200%200%200%20-4.6%201.02%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27%23efedea%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23c)%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23v)%27%2F%3E%3C%2Fsvg%3E");
  --tex-marmor-d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27c%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.018%27%20numOctaves%3D%274%27%20seed%3D%2723%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.16%200%200%200%200%200.22%200%200%200%200%200.24%200%200%200%201.3%20-0.45%27%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%27v%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27turbulence%27%20baseFrequency%3D%270.009%200.014%27%20numOctaves%3D%275%27%20seed%3D%2724%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.78%200%200%200%200%200.84%200%200%200%200%200.84%200%200%200%20-4.6%201.02%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27%233b4d53%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23c)%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23v)%27%2F%3E%3C%2Fsvg%3E");
  --tex-schiefer-l: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27200%27%20height%3D%27200%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.035%27%20numOctaves%3D%275%27%20seed%3D%275%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.3%200%200%200%200%200.34%200%200%200%200%200.38%200%200%200%201.2%20-0.42%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27%23a3adb5%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --tex-schiefer-d: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27200%27%20height%3D%27200%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.035%27%20numOctaves%3D%275%27%20seed%3D%279%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.08%200%200%200%200%200.1%200%200%200%200%200.12%200%200%200%201.3%20-0.4%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27%233a434c%27%2F%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
}
/* Textur je Feld; Markierungen legen sich darüber (--sq-tex) */
.square.light { --sq-tex: var(--tex-light, none); }
.square.dark { --sq-tex: var(--tex-dark, none); }
body[data-board-tex] .square { background-image: var(--sq-tex); background-size: 240% 240%; }
body[data-board-tex] .square:nth-child(3n) { background-position: 70% 20%; }
body[data-board-tex] .square:nth-child(3n+1) { background-position: 15% 80%; }
body[data-board-tex] .square:nth-child(5n+2) { background-position: 90% 60%; }
body[data-board-tex] .square:nth-child(7n+3) { background-position: 35% 35%; }
body[data-board-tex] .square.last-move-src,
body[data-board-tex] .square.last-move-dst { background-image: linear-gradient(var(--hl-last), var(--hl-last)), var(--sq-tex); }
body[data-board-tex] .square.selected { background-image: linear-gradient(var(--hl-select), var(--hl-select)), var(--sq-tex); }
body[data-board-tex] .square.premove-sq { background-image: linear-gradient(var(--premove), var(--premove)), var(--sq-tex); }
body[data-board-tex] .square.king-danger { background-image: radial-gradient(circle, rgba(239,68,68,.45) 0%, rgba(239,68,68,0) 70%), var(--sq-tex); background-size: 100% 100%, 240% 240%; }
body[data-board-tex="edelholz"] { --tex-light: var(--tex-edelholz-l); --tex-dark: var(--tex-edelholz-d); }
body[data-board-tex="marmor"] { --tex-light: var(--tex-marmor-l); --tex-dark: var(--tex-marmor-d); }
body[data-board-tex="schiefer"] { --tex-light: var(--tex-schiefer-l); --tex-dark: var(--tex-schiefer-d); }
body[data-board-tex] .chess-board { box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.25); }

/* Animierte Bretter: Hintergrund-Ebene .board-bg (2 Schichten) hinter halb durchsichtigen Feldern */
.board-bg { display: none; position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.board-bg i { position: absolute; inset: -30%; display: block; will-change: transform; }
body[data-board-anim] .board-bg { display: block; }
body[data-board-anim] .chess-board, body[data-board-anim] .settings-preview { position: relative; }

/* Ozean: Lichtspiel unter Wasser */
body[data-board-anim="ozean"] .board-bg { background: linear-gradient(160deg, #0d5f80, #062f47); }
body[data-board-anim="ozean"] .board-bg i:nth-child(1) {
  background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(170,235,255,.62), transparent 70%) 0 0 / 22% 17%;
  animation: bgDriftA 16s ease-in-out infinite alternate;
}
body[data-board-anim="ozean"] .board-bg i:nth-child(2) {
  background: radial-gradient(ellipse 45% 35% at 50% 50%, rgba(120,255,230,.32), transparent 70%) 0 0 / 31% 24%;
  animation: bgDriftB 21s ease-in-out infinite alternate; mix-blend-mode: screen;
}
/* Polarlicht: wandernde Farbschleier */
body[data-board-anim="aurora"] .board-bg { background: #070b1c; }
body[data-board-anim="aurora"] .board-bg i:nth-child(1) {
  background: radial-gradient(40% 22% at 35% 40%, rgba(40,255,160,.75), transparent 70%), radial-gradient(30% 20% at 70% 62%, rgba(60,140,255,.7), transparent 70%);
  animation: bgSwayA 14s ease-in-out infinite alternate;
}
body[data-board-anim="aurora"] .board-bg i:nth-child(2) {
  background: radial-gradient(35% 18% at 60% 30%, rgba(190,70,255,.6), transparent 70%), radial-gradient(28% 16% at 30% 72%, rgba(0,230,255,.5), transparent 70%);
  animation: bgSwayB 19s ease-in-out infinite alternate; mix-blend-mode: screen;
}
/* Galaxie: funkelnde Sterne und Nebel */
body[data-board-anim="galaxie"] .board-bg { background: radial-gradient(ellipse at 30% 25%, #2c1d63, #0a0a1d 70%); }
body[data-board-anim="galaxie"] .board-bg i:nth-child(1) {
  background:
    radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent 51%) 0 0 / 9% 11%,
    radial-gradient(1.6px 1.6px at 70% 60%, #cfe0ff 50%, transparent 51%) 0 0 / 13% 7%,
    radial-gradient(2.6px 2.6px at 40% 80%, #fff 50%, transparent 51%) 0 0 / 17% 19%;
  animation: bgTwinkle 3.5s ease-in-out infinite alternate, bgSpin 160s linear infinite;
}
body[data-board-anim="galaxie"] .board-bg i:nth-child(2) {
  background: radial-gradient(30% 22% at 65% 40%, rgba(255,80,200,.4), transparent 70%), radial-gradient(26% 20% at 30% 65%, rgba(80,120,255,.45), transparent 70%);
  animation: bgSpin 90s linear infinite reverse; mix-blend-mode: screen;
}
/* Lava: glühende, langsam fließende Hitze */
body[data-board-anim="lava"] .board-bg { background: #1c0703; }
body[data-board-anim="lava"] .board-bg i:nth-child(1) {
  background: radial-gradient(26% 20% at 30% 40%, rgba(255,90,10,.9), transparent 70%), radial-gradient(22% 26% at 72% 65%, rgba(255,50,0,.8), transparent 70%), radial-gradient(18% 14% at 55% 20%, rgba(255,140,30,.75), transparent 70%), radial-gradient(20% 16% at 22% 78%, rgba(255,70,0,.75), transparent 70%), radial-gradient(16% 18% at 80% 25%, rgba(255,110,20,.7), transparent 70%);
  animation: bgLavaA 12s ease-in-out infinite alternate;
}
body[data-board-anim="lava"] .board-bg i:nth-child(2) {
  background: radial-gradient(12% 10% at 45% 55%, rgba(255,210,80,.7), transparent 70%), radial-gradient(10% 12% at 25% 75%, rgba(255,170,40,.6), transparent 70%);
  animation: bgLavaB 9s ease-in-out infinite alternate; mix-blend-mode: screen;
}
@keyframes bgDriftA { from { transform: translate(-6%, -4%) rotate(0deg); } to { transform: translate(6%, 5%) rotate(4deg); } }
@keyframes bgDriftB { from { transform: translate(5%, 3%) rotate(2deg); } to { transform: translate(-5%, -6%) rotate(-3deg); } }
@keyframes bgSwayA { from { transform: translate(-12%, 6%) rotate(-10deg) scale(1); } to { transform: translate(12%, -6%) rotate(8deg) scale(1.15); } }
@keyframes bgSwayB { from { transform: translate(10%, -4%) rotate(6deg) scale(1.1); } to { transform: translate(-10%, 8%) rotate(-8deg) scale(.95); } }
@keyframes bgTwinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes bgSpin { to { transform: rotate(360deg); } }
@keyframes bgLavaA { from { transform: translate(-6%, 8%) scale(1); } to { transform: translate(6%, -8%) scale(1.2); } }
@keyframes bgLavaB { from { transform: translate(8%, -5%) scale(1.1); } to { transform: translate(-8%, 6%) scale(.9); } }
body.no-motion .board-bg i { animation: none !important; }

/* Kacheln in den Einstellungen */
.board-swatch .sw[data-tex] i { background-size: 200% 200%; }
.board-swatch .sw[data-tex="edelholz"] i.l { background-image: var(--tex-edelholz-l); }
.board-swatch .sw[data-tex="edelholz"] i.d { background-image: var(--tex-edelholz-d); }
.board-swatch .sw[data-tex="marmor"] i.l { background-image: var(--tex-marmor-l); }
.board-swatch .sw[data-tex="marmor"] i.d { background-image: var(--tex-marmor-d); }
.board-swatch .sw[data-tex="schiefer"] i.l { background-image: var(--tex-schiefer-l); }
.board-swatch .sw[data-tex="schiefer"] i.d { background-image: var(--tex-schiefer-d); }
.board-swatch .sw[data-anim] { position: relative; }
.board-swatch .sw[data-anim]::before { content: ""; position: absolute; inset: 0; z-index: -1; background-size: 200% 200%; animation: swShift 6s ease-in-out infinite alternate; }
.board-swatch .sw[data-anim] { isolation: isolate; }
.board-swatch .sw[data-anim="ozean"]::before { background-image: linear-gradient(135deg, #0d5f80, #3fb8d8, #062f47); }
.board-swatch .sw[data-anim="aurora"]::before { background-image: linear-gradient(135deg, #070b1c, #28ffa0, #6a3cff, #070b1c); }
.board-swatch .sw[data-anim="galaxie"]::before { background-image: linear-gradient(135deg, #0a0a1d, #5b2c9e, #ff50c8, #0a0a1d); }
.board-swatch .sw[data-anim="lava"]::before { background-image: linear-gradient(135deg, #1c0703, #ff5a0a, #ffd250, #1c0703); }
@keyframes swShift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
body.no-motion .board-swatch .sw[data-anim]::before { animation: none; }
.sw-badge { font-size: .62rem; letter-spacing: .02em; text-transform: uppercase; color: var(--text-subtle); margin-top: -2px; }
.pc-bob { animation: pcBob 3.2s ease-in-out infinite; transform-origin: 50% 88%; }
@keyframes pcBob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3%) scale(1.01, 1.025); } }
body.no-motion .pc-bob { animation: none; }
/* ===== ENDE BRETT-DESIGNS (0.33) ===== */

/* ===== MATERIAL (0.34): geschlagene Figuren unter dem Namen, Vorteil unter der Team-Uhr (wie chess.com) ===== */
.p-sub { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.side-right .p-sub { flex-direction: row-reverse; }
.p-half { overflow: hidden; text-overflow: ellipsis; }
.p-cap { display: inline-flex; align-items: center; gap: 3px; flex-wrap: nowrap; min-width: 0; }
.p-cap:empty { display: none; }
.side-right .p-cap { flex-direction: row-reverse; }
.cap-group { display: inline-flex; align-items: center; }
.side-right .cap-group { flex-direction: row-reverse; }
.cap-piece { display: block; width: 17px; height: 17px; flex-shrink: 0; }
.cap-piece svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 0 rgba(0,0,0,.15)); }
.cap-group .cap-piece + .cap-piece { margin-left: -9px; }
.side-right .cap-group .cap-piece + .cap-piece { margin-left: 0; margin-right: -9px; }
.captured-pieces { font-weight: 600; font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* ===== MITTELLINIE (0.36): Designs über body[data-center-line], Vorschau-Kacheln .cl-prev ===== */
.cl-prev { position: relative; }
.cl-prev i.l { background-color: var(--square-light); }
.cl-prev i.d { background-color: var(--square-dark); }
.wt-board::after, .cl-prev::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: var(--cl-color, var(--center-line)); pointer-events: none; z-index: 10;
}
:is(body[data-center-line="bold"] .chess-board, body[data-center-line="bold"] .wt-board, .cl-prev[data-cl-style="bold"])::after {
  width: 5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .22);
}
:is(body[data-center-line="dashed"] .chess-board, body[data-center-line="dashed"] .wt-board, .cl-prev[data-cl-style="dashed"])::after {
  width: 3px; background: repeating-linear-gradient(to bottom, var(--cl-color, var(--center-line)) 0 9px, transparent 9px 15px);
}
:is(body[data-center-line="double"] .chess-board, body[data-center-line="double"] .wt-board, .cl-prev[data-cl-style="double"])::after {
  width: 8px; background: linear-gradient(to right, var(--cl-color, var(--center-line)) 0 2px, transparent 2px 6px, var(--cl-color, var(--center-line)) 6px 8px);
}
:is(body[data-center-line="glow"] .chess-board, body[data-center-line="glow"] .wt-board, .cl-prev[data-cl-style="glow"])::after {
  width: 3px; box-shadow: 0 0 8px 2px var(--cl-color, var(--center-line)); animation: clGlow 2.4s ease-in-out infinite;
}
:is(body[data-center-line="river"] .chess-board, body[data-center-line="river"] .wt-board, .cl-prev[data-cl-style="river"])::after {
  width: 10px; opacity: .92; box-shadow: 0 0 0 1px rgba(20, 60, 110, .45), 0 0 10px rgba(80, 170, 255, .35);
  background: repeating-linear-gradient(to bottom, #2f7cc4 0 6px, #6fc0ff 6px 9px, #3b8fd9 9px 18px);
  background-size: 100% 18px; animation: clFlow 1.4s linear infinite;
}
.cl-prev[data-cl-style="river"]::after { width: 7px; }
@keyframes clGlow { 0%, 100% { box-shadow: 0 0 6px 1px var(--cl-color, var(--center-line)); } 50% { box-shadow: 0 0 16px 5px var(--cl-color, var(--center-line)); } }
@keyframes clFlow { to { background-position: 0 18px; } }
body.no-motion .chess-board::after, body.no-motion .wt-board::after, body.no-motion .cl-prev::after { animation: none !important; }

/* ===== EINFÜHRUNG FÜR NEUE BESUCHER (0.36) ===== */
.welcome-overlay { z-index: 260; }
.welcome-card { max-width: 520px; width: 100%; text-align: center; position: relative; }
.wt-counter { font-size: .72rem; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .6rem; }
.wt-visual { display: flex; justify-content: center; align-items: center; min-height: 200px; margin-bottom: 1rem; }
.wt-board { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); width: min(260px, 72vw); aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0, 0, 0, .18); }
.wt-board .square { cursor: default; }
.wt-board .piece { width: 92%; height: 92%; }
.wt-board .square:hover .piece { transform: none; }
.wt-board .square.wt-hl { box-shadow: inset 0 0 0 2px #f5b301; background-image: linear-gradient(rgba(245, 179, 1, .35), rgba(245, 179, 1, .35)); }
.wt-board .square.wt-danger { box-shadow: inset 0 0 0 2px #ef4444; background-image: radial-gradient(circle, rgba(239, 68, 68, .55), rgba(239, 68, 68, 0) 70%); }
.wt-halves .square.wt-left { background-image: linear-gradient(rgba(59, 130, 246, .3), rgba(59, 130, 246, .3)); }
.wt-halves .square.wt-right { background-image: linear-gradient(rgba(249, 115, 22, .3), rgba(249, 115, 22, .3)); }
.wt-half-label { position: absolute; top: 50%; transform: translateY(-50%); z-index: 11; font-size: .68rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .62); padding: 2px 7px; border-radius: 6px; }
.wt-half-1 { left: 6%; }
.wt-half-2 { right: 6%; }
.wt-arrow { position: absolute; inset: 0; width: 100%; height: 100%; color: #f59e0b; z-index: 12; pointer-events: none; }
.wt-order { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 1.5rem 0; }
.wt-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 70px; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--border); font-size: .8rem; }
.wt-chip strong { font-size: 1.15rem; }
.wt-chip small { opacity: .7; font-family: var(--font-mono); }
.wt-chip.is-w { background: #f5f5f4; color: #171717; }
.wt-chip.is-b { background: #1f1f22; color: #fafafa; }
.wt-next, .wt-loop { display: flex; color: var(--text-muted); }
.wt-ready { display: flex; gap: 6px; }
.wt-ready svg { width: 96px; height: 96px; }
.welcome-card h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.wt-text { color: var(--text-muted); line-height: 1.55; margin: 0 auto 1rem; max-width: 440px; min-height: 4.8em; }
.wt-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 1rem; }
.wt-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--border-strong, var(--border)); cursor: pointer; transition: width .2s; }
.wt-dot.active { width: 22px; background: var(--text); }
.wt-actions { justify-content: center; flex-wrap: wrap; }
.rules-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.rules-actions .rules-tutorial-btn { margin-top: 1.5rem; }

/* ===== GÄSTE OHNE KONTO (0.36) ===== */
.guest-join { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; background: var(--bg-soft); }
.guest-title { margin: 0 0 .35rem; font-size: 1rem; }
.guest-join .online-join-row { flex-wrap: wrap; }
.guest-join .guest-name { flex: 2 1 160px; width: auto; min-width: 0; }
.guest-join .online-code-input { flex: 1 1 90px; }

/* ===== MATERIAL GUT SICHTBAR (0.37): helle Leiste für geschlagene Figuren, farbiges +N ===== */
.p-cap:not(:empty) {
  padding: 2px 6px; border-radius: 999px;
  background: #ecebe8; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.cap-piece { width: 20px; height: 20px; }
.cap-group .cap-piece + .cap-piece { margin-left: -10px; }
.side-right .cap-group .cap-piece + .cap-piece { margin-left: 0; margin-right: -10px; }
.captured-pieces:not(:empty) {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 3px;
  padding: 1px 9px; border-radius: 999px; font-size: .9rem; font-weight: 700; line-height: 1.35;
  color: #fff; background: #16a34a; box-shadow: 0 1px 4px rgba(22, 163, 74, .35);
}
.p-adv { font-weight: 700; font-size: .8rem; color: #16a34a; margin: 0 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .cap-piece { width: 16px; height: 16px; } .cap-group .cap-piece + .cap-piece { margin-left: -8px; } }

/* ===== CHAT (0.37): Sprechblasen, eigene rechts, Team-Nachrichten markiert ===== */
.chat-list { display: flex; flex-direction: column; gap: 2px; padding: .5rem .45rem; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; color: var(--text); margin-top: 6px; }
.chat-msg.cont { margin-top: 1px; }
.chat-msg.mine { align-items: flex-end; }
.chat-head { display: flex; align-items: center; gap: .35rem; font-size: .72rem; color: var(--text-subtle); margin: 0 .35rem 2px; }
.chat-msg .chat-name { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; margin: 0; color: var(--text); }
.chat-msg.team-b .chat-name { color: var(--text-muted); }
.chat-seat { font-family: var(--font-mono); font-size: .66rem; padding: 0 4px; border-radius: 4px; border: 1px solid var(--border); }
.chat-msg.team-w .chat-seat { background: #f5f5f4; color: #171717; border-color: #d6d3d1; }
.chat-msg.team-b .chat-seat { background: #27272a; color: #fafafa; border-color: #3f3f46; }
.chat-team-badge { font-size: .62rem; font-weight: 700; letter-spacing: .06em; padding: 0 5px; border-radius: 4px; background: #7c3aed; color: #fff; }
.chat-time { font-variant-numeric: tabular-nums; }
.chat-bubble {
  max-width: 88%; padding: .4rem .65rem; border-radius: 14px 14px 14px 4px; line-height: 1.4; overflow-wrap: anywhere;
  background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border); color: var(--text);
}
.chat-msg.mine .chat-bubble { border-radius: 14px 14px 4px 14px; background: var(--text); color: var(--bg); box-shadow: none; }
.chat-msg.is-team .chat-bubble { box-shadow: inset 0 0 0 1.5px #7c3aed; background: rgba(124, 58, 237, .12); color: var(--text); }
.chat-msg.mine.is-team .chat-bubble { background: #7c3aed; color: #fff; box-shadow: none; }
.chat-msg.big .chat-bubble { font-size: 1.6rem; background: transparent; box-shadow: none; padding: 0 .2rem; }
.chat-form.to-team .chat-input { border-color: #7c3aed; box-shadow: 0 0 0 1px #7c3aed; }
.chat-card.team-view .chat-list { box-shadow: none; }
.chat-tabs .mode-tab-btn[data-chat-view="team"].active { background: #7c3aed; color: #fff; }

/* ===== PARTYS + LOBBY-EINLADUNGEN (0.37) ===== */
.lobby-invite { margin-top: 1rem; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft); }
.lobby-invite-title, .group-sub { margin: 0 0 .5rem; font-size: .9rem; }
.lobby-invite-row { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-top: 1px solid var(--border); }
.lobby-invite-row:first-of-type { border-top: 0; }
.lobby-invite-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-invite-row .slot-btn { margin-left: auto; }
.group-panel .group-head { display: flex; align-items: center; gap: .4rem; }
.group-members { display: flex; flex-wrap: wrap; gap: .45rem; margin: .6rem 0; }
.group-member { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .65rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); font-weight: 600; font-size: .85rem; }
.group-member.is-me { border-color: var(--text-muted); }
.group-member.is-leader .group-crown { display: inline-flex; color: #f59e0b; }
.group-member.is-empty { font-weight: 400; color: var(--text-subtle); border-style: dashed; background: transparent; }
.group-member .presence-tag { font-size: .7rem; }
.group-kick { display: inline-flex; padding: 2px; border: 0; border-radius: 50%; background: transparent; color: var(--text-subtle); cursor: pointer; }
.group-kick:hover { background: var(--border); color: var(--text); }
.group-invite { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; justify-content: space-between; padding: .6rem .7rem; margin-bottom: .6rem; border-radius: var(--radius-md); background: rgba(124, 58, 237, .1); box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .35); }
.party-strip { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; margin-bottom: 1rem; border-radius: var(--radius-md); background: rgba(124, 58, 237, .1); box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .35); }
.party-strip-icon { display: flex; color: #7c3aed; }
.party-strip-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.party-strip-text span { font-size: .85rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-strip-text small { font-size: .75rem; color: var(--text-subtle); }

/* ===== GEWINNCHANCE-VERLAUF + WENDEPUNKT (0.38) ===== */
.rv-chart { margin: .6rem 0 .4rem; }
.rv-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .3rem; font-size: .78rem; }
.rv-chart-title { font-weight: 600; color: var(--text); }
.rv-chart-readout { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rv-chart-area { position: relative; height: 110px; border-radius: 8px; overflow: visible; cursor: crosshair; box-shadow: 0 0 0 1px var(--border); }
.rv-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 8px; overflow: hidden; }
.rv-chart-b { fill: #2b2b2f; }
.rv-chart-w { fill: #efede8; }
.rv-chart-mid { stroke: rgba(128, 128, 128, .55); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.rv-chart-line { fill: none; stroke: #8a8a8f; stroke-width: 1.5; }
.rv-chart-mark { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; pointer-events: none; }
.rv-chart-mark.is-blunder { background: #dc2626; }
.rv-chart-mark.is-mistake { background: #f59e0b; }
.rv-chart-mark.is-miss { background: #e1467c; }
.rv-chart-mark.is-turn { width: 20px; height: 20px; margin: -10px 0 0 -10px; display: flex; align-items: center; justify-content: center; background: #7c3aed; color: #fff; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, .35); z-index: 2; }
.rv-chart-cursor { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #3b82f6; pointer-events: none; }
.rv-chart-axis { display: flex; justify-content: space-between; font-size: .68rem; color: var(--text-subtle); margin-top: 2px; }
.rv-turn { margin: .5rem 0 .7rem; padding: .65rem .8rem; border-radius: var(--radius-md); background: rgba(124, 58, 237, .1); box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .35); }
.rv-turn.active { box-shadow: inset 0 0 0 2px #7c3aed; }
.rv-turn-head { display: flex; align-items: center; gap: .2rem; color: #7c3aed; margin-bottom: .25rem; }
.rv-turn-head strong { color: var(--text); }
.rv-turn .rv-text { margin: 0 0 .25rem; }
.rv-turn-why { margin: 0 0 .5rem; font-size: .8rem; color: var(--text-muted); }
.rv-item.is-turn { box-shadow: inset 3px 0 0 #7c3aed; }

/* ===== BRETT-ANIMATIONEN (0.39): neu, aus berechneten Texturen – automatisch erzeugt (tools: boards39) ===== */
:root {
  --anim-caustA: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27260%27%20height%3D%27260%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27turbulence%27%20baseFrequency%3D%270.016%27%20numOctaves%3D%272%27%20seed%3D%274%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.78%200%200%200%200%200.97%200%200%200%200%201%200%200%200%20-7.5%201.12%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-caustB: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27320%27%20height%3D%27320%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27turbulence%27%20baseFrequency%3D%270.012%27%20numOctaves%3D%272%27%20seed%3D%2711%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.55%200%200%200%200%200.92%200%200%200%200%201%200%200%200%20-6.5%201%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-deep: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27300%27%20height%3D%27300%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.006%27%20numOctaves%3D%273%27%20seed%3D%278%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200%200%200%200%200%200.12%200%200%200%200%200.25%200%200%200%201.6%20-0.55%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-auroraG: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27360%27%20height%3D%27360%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.028%200.0025%27%20numOctaves%3D%273%27%20seed%3D%273%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.22%200%200%200%200%201%200%200%200%200%200.62%200%200%200%202.6%20-1.05%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-auroraV: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27360%27%20height%3D%27360%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.022%200.003%27%20numOctaves%3D%273%27%20seed%3D%2717%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.7%200%200%200%200%200.4%200%200%200%200%201%200%200%200%202.4%20-1.05%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-starsS: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27400%27%20height%3D%27400%27%3E%3Ccircle%20cx%3D%27355.6%27%20cy%3D%27209.8%27%20r%3D%270.62%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.71%27%2F%3E%3Ccircle%20cx%3D%278.2%27%20cy%3D%2761.8%27%20r%3D%270.60%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.64%27%2F%3E%3Ccircle%20cx%3D%27300.2%27%20cy%3D%27203.9%27%20r%3D%270.43%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.41%27%2F%3E%3Ccircle%20cx%3D%27314.3%27%20cy%3D%27178.0%27%20r%3D%270.76%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.56%27%2F%3E%3Ccircle%20cx%3D%27273.9%27%20cy%3D%27355.7%27%20r%3D%270.48%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.65%27%2F%3E%3Ccircle%20cx%3D%27254.5%27%20cy%3D%27382.6%27%20r%3D%270.93%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.44%27%2F%3E%3Ccircle%20cx%3D%27360.9%27%20cy%3D%27289.8%27%20r%3D%270.73%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%27372.1%27%20cy%3D%27270.8%27%20r%3D%270.87%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.66%27%2F%3E%3Ccircle%20cx%3D%2752.4%27%20cy%3D%27327.1%27%20r%3D%270.44%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.48%27%2F%3E%3Ccircle%20cx%3D%27128.8%27%20cy%3D%27178.4%27%20r%3D%270.60%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.91%27%2F%3E%3Ccircle%20cx%3D%27336.0%27%20cy%3D%27240.6%27%20r%3D%270.52%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.72%27%2F%3E%3Ccircle%20cx%3D%27127.1%27%20cy%3D%2770.7%27%20r%3D%270.96%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.60%27%2F%3E%3Ccircle%20cx%3D%2751.4%27%20cy%3D%27277.2%27%20r%3D%270.41%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.87%27%2F%3E%3Ccircle%20cx%3D%27199.0%27%20cy%3D%27298.4%27%20r%3D%270.78%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.88%27%2F%3E%3Ccircle%20cx%3D%27112.0%27%20cy%3D%2746.6%27%20r%3D%270.60%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.84%27%2F%3E%3Ccircle%20cx%3D%27161.9%27%20cy%3D%27219.5%27%20r%3D%270.87%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.75%27%2F%3E%3Ccircle%20cx%3D%27394.4%27%20cy%3D%2777.4%27%20r%3D%270.41%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.56%27%2F%3E%3Ccircle%20cx%3D%2740.4%27%20cy%3D%27288.3%27%20r%3D%270.70%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.60%27%2F%3E%3Ccircle%20cx%3D%2793.7%27%20cy%3D%2738.6%27%20r%3D%270.73%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%27155.5%27%20cy%3D%2711.1%27%20r%3D%270.76%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.46%27%2F%3E%3Ccircle%20cx%3D%27345.7%27%20cy%3D%2729.1%27%20r%3D%270.68%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.61%27%2F%3E%3Ccircle%20cx%3D%27280.2%27%20cy%3D%27168.0%27%20r%3D%270.70%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.51%27%2F%3E%3Ccircle%20cx%3D%27315.8%27%20cy%3D%27132.7%27%20r%3D%270.58%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%27261.1%27%20cy%3D%27102.2%27%20r%3D%270.58%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.89%27%2F%3E%3Ccircle%20cx%3D%27354.6%27%20cy%3D%27240.8%27%20r%3D%270.83%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.50%27%2F%3E%3Ccircle%20cx%3D%27108.4%27%20cy%3D%2775.6%27%20r%3D%270.59%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.45%27%2F%3E%3Ccircle%20cx%3D%27220.1%27%20cy%3D%27141.2%27%20r%3D%270.46%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.87%27%2F%3E%3Ccircle%20cx%3D%27350.3%27%20cy%3D%27290.6%27%20r%3D%270.52%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.63%27%2F%3E%3Ccircle%20cx%3D%27366.7%27%20cy%3D%27273.2%27%20r%3D%270.82%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.67%27%2F%3E%3Ccircle%20cx%3D%27255.9%27%20cy%3D%27179.2%27%20r%3D%270.38%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.60%27%2F%3E%3Ccircle%20cx%3D%27300.6%27%20cy%3D%27350.5%27%20r%3D%270.49%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.96%27%2F%3E%3Ccircle%20cx%3D%27324.2%27%20cy%3D%27358.7%27%20r%3D%270.70%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.66%27%2F%3E%3Ccircle%20cx%3D%272.0%27%20cy%3D%27249.5%27%20r%3D%270.38%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.78%27%2F%3E%3Ccircle%20cx%3D%27238.9%27%20cy%3D%2753.9%27%20r%3D%270.77%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.89%27%2F%3E%3Ccircle%20cx%3D%2714.0%27%20cy%3D%27365.5%27%20r%3D%270.91%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.49%27%2F%3E%3Ccircle%20cx%3D%27291.5%27%20cy%3D%27385.7%27%20r%3D%270.53%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.80%27%2F%3E%3Ccircle%20cx%3D%27198.5%27%20cy%3D%27234.1%27%20r%3D%270.79%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.47%27%2F%3E%3Ccircle%20cx%3D%27269.6%27%20cy%3D%27327.0%27%20r%3D%270.87%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.87%27%2F%3E%3Ccircle%20cx%3D%27357.9%27%20cy%3D%27220.9%27%20r%3D%270.88%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.74%27%2F%3E%3Ccircle%20cx%3D%27212.7%27%20cy%3D%27124.6%27%20r%3D%270.59%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.41%27%2F%3E%3Ccircle%20cx%3D%27324.2%27%20cy%3D%27276.4%27%20r%3D%270.63%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.53%27%2F%3E%3Ccircle%20cx%3D%27234.4%27%20cy%3D%27188.5%27%20r%3D%270.82%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.64%27%2F%3E%3Ccircle%20cx%3D%27314.9%27%20cy%3D%27158.6%27%20r%3D%270.87%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.77%27%2F%3E%3Ccircle%20cx%3D%27211.3%27%20cy%3D%27247.1%27%20r%3D%270.90%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27354.5%27%20cy%3D%27321.9%27%20r%3D%270.42%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.56%27%2F%3E%3Ccircle%20cx%3D%27138.4%27%20cy%3D%27369.4%27%20r%3D%270.39%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.95%27%2F%3E%3Ccircle%20cx%3D%27364.1%27%20cy%3D%27272.4%27%20r%3D%270.42%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.56%27%2F%3E%3Ccircle%20cx%3D%27351.5%27%20cy%3D%27254.3%27%20r%3D%270.38%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.55%27%2F%3E%3Ccircle%20cx%3D%27116.5%27%20cy%3D%27390.4%27%20r%3D%270.51%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.99%27%2F%3E%3Ccircle%20cx%3D%2716.0%27%20cy%3D%27385.7%27%20r%3D%270.55%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.39%27%2F%3E%3Ccircle%20cx%3D%27258.6%27%20cy%3D%2719.1%27%20r%3D%270.76%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.66%27%2F%3E%3Ccircle%20cx%3D%27282.6%27%20cy%3D%27255.0%27%20r%3D%270.63%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.97%27%2F%3E%3Ccircle%20cx%3D%270.3%27%20cy%3D%27220.3%27%20r%3D%270.70%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.37%27%2F%3E%3Ccircle%20cx%3D%27109.2%27%20cy%3D%2749.7%27%20r%3D%270.95%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.95%27%2F%3E%3Ccircle%20cx%3D%27269.9%27%20cy%3D%27396.3%27%20r%3D%270.79%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%27350.3%27%20cy%3D%27209.5%27%20r%3D%270.93%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.57%27%2F%3E%3Ccircle%20cx%3D%27336.7%27%20cy%3D%27379.4%27%20r%3D%270.37%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%27111.9%27%20cy%3D%2747.9%27%20r%3D%270.42%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.91%27%2F%3E%3Ccircle%20cx%3D%27299.4%27%20cy%3D%27386.7%27%20r%3D%270.62%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.39%27%2F%3E%3Ccircle%20cx%3D%27174.4%27%20cy%3D%27241.4%27%20r%3D%270.36%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.99%27%2F%3E%3Ccircle%20cx%3D%27241.9%27%20cy%3D%2743.0%27%20r%3D%270.86%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.99%27%2F%3E%3Ccircle%20cx%3D%27280.9%27%20cy%3D%27385.2%27%20r%3D%270.50%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.54%27%2F%3E%3Ccircle%20cx%3D%2755.6%27%20cy%3D%2769.2%27%20r%3D%270.98%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.84%27%2F%3E%3Ccircle%20cx%3D%27293.2%27%20cy%3D%2714.9%27%20r%3D%270.86%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.56%27%2F%3E%3Ccircle%20cx%3D%27328.2%27%20cy%3D%27238.3%27%20r%3D%270.61%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.41%27%2F%3E%3Ccircle%20cx%3D%2713.7%27%20cy%3D%27296.1%27%20r%3D%270.99%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.44%27%2F%3E%3Ccircle%20cx%3D%27299.1%27%20cy%3D%27397.1%27%20r%3D%270.48%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.97%27%2F%3E%3Ccircle%20cx%3D%2774.5%27%20cy%3D%27379.4%27%20r%3D%270.36%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.71%27%2F%3E%3Ccircle%20cx%3D%2781.9%27%20cy%3D%27155.4%27%20r%3D%270.43%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.49%27%2F%3E%3Ccircle%20cx%3D%27292.9%27%20cy%3D%2722.7%27%20r%3D%270.42%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.99%27%2F%3E%3Ccircle%20cx%3D%27353.2%27%20cy%3D%2741.7%27%20r%3D%270.44%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27293.6%27%20cy%3D%2780.4%27%20r%3D%270.67%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.39%27%2F%3E%3Ccircle%20cx%3D%27308.1%27%20cy%3D%27125.2%27%20r%3D%270.74%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.67%27%2F%3E%3Ccircle%20cx%3D%27397.7%27%20cy%3D%2758.7%27%20r%3D%270.93%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.88%27%2F%3E%3Ccircle%20cx%3D%27282.3%27%20cy%3D%27104.5%27%20r%3D%270.46%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27377.8%27%20cy%3D%27337.9%27%20r%3D%270.85%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.70%27%2F%3E%3Ccircle%20cx%3D%27241.2%27%20cy%3D%2763.7%27%20r%3D%270.56%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%2781.0%27%20cy%3D%27261.0%27%20r%3D%270.49%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.63%27%2F%3E%3Ccircle%20cx%3D%27135.6%27%20cy%3D%27294.1%27%20r%3D%270.79%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.50%27%2F%3E%3Ccircle%20cx%3D%27317.2%27%20cy%3D%2790.0%27%20r%3D%270.70%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.82%27%2F%3E%3Ccircle%20cx%3D%27123.4%27%20cy%3D%27183.3%27%20r%3D%270.84%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.42%27%2F%3E%3Ccircle%20cx%3D%2714.6%27%20cy%3D%2727.1%27%20r%3D%270.62%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.76%27%2F%3E%3Ccircle%20cx%3D%27258.9%27%20cy%3D%27170.9%27%20r%3D%270.75%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.84%27%2F%3E%3Ccircle%20cx%3D%2742.5%27%20cy%3D%27304.6%27%20r%3D%270.89%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.93%27%2F%3E%3Ccircle%20cx%3D%2748.3%27%20cy%3D%27370.4%27%20r%3D%270.39%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.90%27%2F%3E%3Ccircle%20cx%3D%2799.6%27%20cy%3D%27339.7%27%20r%3D%270.76%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.98%27%2F%3E%3Ccircle%20cx%3D%27271.9%27%20cy%3D%27258.3%27%20r%3D%270.70%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%27269.9%27%20cy%3D%27157.1%27%20r%3D%270.82%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.96%27%2F%3E%3Ccircle%20cx%3D%27272.8%27%20cy%3D%27229.9%27%20r%3D%270.78%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%2744.7%27%20cy%3D%2777.8%27%20r%3D%270.99%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.43%27%2F%3E%3Ccircle%20cx%3D%27312.8%27%20cy%3D%27220.7%27%20r%3D%270.64%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.36%27%2F%3E%3Ccircle%20cx%3D%2711.7%27%20cy%3D%27274.6%27%20r%3D%270.88%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.47%27%2F%3E%3Ccircle%20cx%3D%27194.4%27%20cy%3D%27196.4%27%20r%3D%270.49%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%27210.4%27%20cy%3D%27194.5%27%20r%3D%270.57%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.44%27%2F%3E%3Ccircle%20cx%3D%27149.7%27%20cy%3D%27107.4%27%20r%3D%270.45%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.60%27%2F%3E%3Ccircle%20cx%3D%27354.3%27%20cy%3D%27247.3%27%20r%3D%270.57%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.86%27%2F%3E%3Ccircle%20cx%3D%27395.9%27%20cy%3D%27111.8%27%20r%3D%270.67%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.60%27%2F%3E%3Ccircle%20cx%3D%27320.1%27%20cy%3D%27161.4%27%20r%3D%270.85%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.40%27%2F%3E%3Ccircle%20cx%3D%27157.8%27%20cy%3D%27264.0%27%20r%3D%270.64%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.59%27%2F%3E%3Ccircle%20cx%3D%27102.7%27%20cy%3D%276.0%27%20r%3D%270.97%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%27156.2%27%20cy%3D%2770.1%27%20r%3D%270.83%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.58%27%2F%3E%3Ccircle%20cx%3D%2738.0%27%20cy%3D%27279.8%27%20r%3D%270.73%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.72%27%2F%3E%3Ccircle%20cx%3D%27164.2%27%20cy%3D%27310.3%27%20r%3D%270.90%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.77%27%2F%3E%3Ccircle%20cx%3D%2791.5%27%20cy%3D%27266.7%27%20r%3D%270.45%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.54%27%2F%3E%3Ccircle%20cx%3D%2728.5%27%20cy%3D%27327.9%27%20r%3D%270.92%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.64%27%2F%3E%3Ccircle%20cx%3D%27213.6%27%20cy%3D%27258.2%27%20r%3D%270.50%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.88%27%2F%3E%3Ccircle%20cx%3D%27159.1%27%20cy%3D%27384.6%27%20r%3D%270.41%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.98%27%2F%3E%3Ccircle%20cx%3D%27162.5%27%20cy%3D%2741.9%27%20r%3D%270.60%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.41%27%2F%3E%3Ccircle%20cx%3D%27284.3%27%20cy%3D%27282.9%27%20r%3D%270.48%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.65%27%2F%3E%3Ccircle%20cx%3D%27392.4%27%20cy%3D%2757.2%27%20r%3D%270.77%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.67%27%2F%3E%3Ccircle%20cx%3D%2773.3%27%20cy%3D%27254.8%27%20r%3D%270.47%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.75%27%2F%3E%3Ccircle%20cx%3D%279.6%27%20cy%3D%2717.8%27%20r%3D%270.89%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.77%27%2F%3E%3Ccircle%20cx%3D%2724.9%27%20cy%3D%27117.7%27%20r%3D%270.93%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.95%27%2F%3E%3Ccircle%20cx%3D%27194.3%27%20cy%3D%27200.2%27%20r%3D%270.60%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.40%27%2F%3E%3Ccircle%20cx%3D%27222.9%27%20cy%3D%27296.2%27%20r%3D%270.49%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.66%27%2F%3E%3Ccircle%20cx%3D%27289.7%27%20cy%3D%27199.5%27%20r%3D%270.94%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.58%27%2F%3E%3Ccircle%20cx%3D%27158.8%27%20cy%3D%27311.4%27%20r%3D%270.38%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.71%27%2F%3E%3Ccircle%20cx%3D%27157.5%27%20cy%3D%27351.5%27%20r%3D%270.63%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.36%27%2F%3E%3Ccircle%20cx%3D%2720.3%27%20cy%3D%27336.0%27%20r%3D%270.86%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.91%27%2F%3E%3Ccircle%20cx%3D%270.2%27%20cy%3D%27221.6%27%20r%3D%270.52%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.45%27%2F%3E%3Ccircle%20cx%3D%27246.7%27%20cy%3D%27217.0%27%20r%3D%270.71%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.59%27%2F%3E%3Ccircle%20cx%3D%2749.9%27%20cy%3D%27160.4%27%20r%3D%270.74%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.70%27%2F%3E%3Ccircle%20cx%3D%27151.8%27%20cy%3D%27364.2%27%20r%3D%270.43%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.96%27%2F%3E%3Ccircle%20cx%3D%27123.9%27%20cy%3D%27325.9%27%20r%3D%270.79%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.75%27%2F%3E%3Ccircle%20cx%3D%2712.0%27%20cy%3D%27106.1%27%20r%3D%270.64%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.65%27%2F%3E%3Ccircle%20cx%3D%27246.9%27%20cy%3D%27372.6%27%20r%3D%270.80%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.99%27%2F%3E%3Ccircle%20cx%3D%27222.4%27%20cy%3D%27311.8%27%20r%3D%270.92%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.88%27%2F%3E%3Ccircle%20cx%3D%27339.8%27%20cy%3D%27206.4%27%20r%3D%270.61%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.81%27%2F%3E%3Ccircle%20cx%3D%27318.8%27%20cy%3D%27280.0%27%20r%3D%270.40%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%27175.5%27%20cy%3D%27207.8%27%20r%3D%270.51%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.40%27%2F%3E%3Ccircle%20cx%3D%27266.7%27%20cy%3D%2794.7%27%20r%3D%270.70%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.59%27%2F%3E%3Ccircle%20cx%3D%270.9%27%20cy%3D%27119.8%27%20r%3D%270.57%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.53%27%2F%3E%3Ccircle%20cx%3D%2716.6%27%20cy%3D%2747.3%27%20r%3D%270.91%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.66%27%2F%3E%3Ccircle%20cx%3D%27226.0%27%20cy%3D%27204.3%27%20r%3D%270.98%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.70%27%2F%3E%3Ccircle%20cx%3D%27126.6%27%20cy%3D%27325.4%27%20r%3D%270.72%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.78%27%2F%3E%3Ccircle%20cx%3D%27179.0%27%20cy%3D%27263.7%27%20r%3D%270.88%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.41%27%2F%3E%3Ccircle%20cx%3D%27251.0%27%20cy%3D%27168.5%27%20r%3D%270.83%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.53%27%2F%3E%3Ccircle%20cx%3D%27329.1%27%20cy%3D%27130.1%27%20r%3D%270.91%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.77%27%2F%3E%3Ccircle%20cx%3D%27296.0%27%20cy%3D%2790.3%27%20r%3D%270.46%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.36%27%2F%3E%3Ccircle%20cx%3D%27375.1%27%20cy%3D%2720.7%27%20r%3D%270.98%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.80%27%2F%3E%3Ccircle%20cx%3D%27241.8%27%20cy%3D%27367.1%27%20r%3D%270.54%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.57%27%2F%3E%3Ccircle%20cx%3D%270.9%27%20cy%3D%27360.4%27%20r%3D%270.37%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.55%27%2F%3E%3Ccircle%20cx%3D%27231.6%27%20cy%3D%27194.2%27%20r%3D%270.81%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.90%27%2F%3E%3Ccircle%20cx%3D%27298.0%27%20cy%3D%27269.9%27%20r%3D%270.96%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.87%27%2F%3E%3Ccircle%20cx%3D%27127.2%27%20cy%3D%27307.3%27%20r%3D%270.66%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.41%27%2F%3E%3Ccircle%20cx%3D%27253.8%27%20cy%3D%27322.3%27%20r%3D%270.39%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.90%27%2F%3E%3Ccircle%20cx%3D%27131.0%27%20cy%3D%27271.8%27%20r%3D%270.92%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.43%27%2F%3E%3Ccircle%20cx%3D%27308.1%27%20cy%3D%27364.4%27%20r%3D%270.72%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%2775.2%27%20cy%3D%2738.4%27%20r%3D%270.43%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%27174.3%27%20cy%3D%276.1%27%20r%3D%270.49%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.60%27%2F%3E%3Ccircle%20cx%3D%27176.9%27%20cy%3D%27165.1%27%20r%3D%270.63%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.60%27%2F%3E%3Ccircle%20cx%3D%27128.9%27%20cy%3D%27175.8%27%20r%3D%270.96%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.77%27%2F%3E%3Ccircle%20cx%3D%2761.0%27%20cy%3D%27306.1%27%20r%3D%270.36%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.79%27%2F%3E%3Ccircle%20cx%3D%27167.1%27%20cy%3D%27142.6%27%20r%3D%270.42%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.40%27%2F%3E%3Ccircle%20cx%3D%2748.4%27%20cy%3D%27367.8%27%20r%3D%270.75%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.76%27%2F%3E%3Ccircle%20cx%3D%27224.6%27%20cy%3D%275.2%27%20r%3D%270.59%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.40%27%2F%3E%3Ccircle%20cx%3D%27311.9%27%20cy%3D%27330.2%27%20r%3D%270.81%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.72%27%2F%3E%3Ccircle%20cx%3D%27266.9%27%20cy%3D%27247.7%27%20r%3D%270.51%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27298.4%27%20cy%3D%27336.7%27%20r%3D%270.59%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.78%27%2F%3E%3Ccircle%20cx%3D%27244.6%27%20cy%3D%27361.4%27%20r%3D%270.55%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.96%27%2F%3E%3Ccircle%20cx%3D%2717.9%27%20cy%3D%27249.0%27%20r%3D%270.93%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.46%27%2F%3E%3Ccircle%20cx%3D%27315.7%27%20cy%3D%27134.0%27%20r%3D%270.40%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.69%27%2F%3E%3Ccircle%20cx%3D%27398.6%27%20cy%3D%27269.5%27%20r%3D%270.98%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.53%27%2F%3E%3Ccircle%20cx%3D%27134.6%27%20cy%3D%274.9%27%20r%3D%270.78%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.93%27%2F%3E%3Ccircle%20cx%3D%27309.9%27%20cy%3D%27230.3%27%20r%3D%270.74%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.84%27%2F%3E%3Ccircle%20cx%3D%277.3%27%20cy%3D%2787.7%27%20r%3D%270.88%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.79%27%2F%3E%3Ccircle%20cx%3D%27250.3%27%20cy%3D%27348.7%27%20r%3D%270.74%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.37%27%2F%3E%3Ccircle%20cx%3D%27314.2%27%20cy%3D%27259.0%27%20r%3D%270.35%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%27303.9%27%20cy%3D%27249.5%27%20r%3D%270.94%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.49%27%2F%3E%3Ccircle%20cx%3D%27398.5%27%20cy%3D%27113.9%27%20r%3D%270.89%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.78%27%2F%3E%3Ccircle%20cx%3D%27362.1%27%20cy%3D%27253.5%27%20r%3D%270.60%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.74%27%2F%3E%3Ccircle%20cx%3D%27121.9%27%20cy%3D%27388.1%27%20r%3D%270.56%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.98%27%2F%3E%3Ccircle%20cx%3D%27212.4%27%20cy%3D%27133.7%27%20r%3D%270.62%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%2786.8%27%20cy%3D%27247.1%27%20r%3D%270.87%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.61%27%2F%3E%3Ccircle%20cx%3D%27294.4%27%20cy%3D%27136.9%27%20r%3D%270.45%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.37%27%2F%3E%3Ccircle%20cx%3D%27125.4%27%20cy%3D%2741.4%27%20r%3D%270.64%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27321.7%27%20cy%3D%27273.0%27%20r%3D%270.59%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.93%27%2F%3E%3Ccircle%20cx%3D%2754.9%27%20cy%3D%27329.2%27%20r%3D%270.67%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.66%27%2F%3E%3Ccircle%20cx%3D%27170.8%27%20cy%3D%27270.4%27%20r%3D%271.00%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.61%27%2F%3E%3Ccircle%20cx%3D%27300.1%27%20cy%3D%27364.7%27%20r%3D%270.45%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.46%27%2F%3E%3Ccircle%20cx%3D%27236.8%27%20cy%3D%27198.3%27%20r%3D%270.61%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.61%27%2F%3E%3Ccircle%20cx%3D%27381.9%27%20cy%3D%2754.1%27%20r%3D%270.45%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.90%27%2F%3E%3Ccircle%20cx%3D%2755.4%27%20cy%3D%27155.5%27%20r%3D%270.50%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.54%27%2F%3E%3Ccircle%20cx%3D%2773.2%27%20cy%3D%27177.7%27%20r%3D%270.99%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.91%27%2F%3E%3Ccircle%20cx%3D%27392.1%27%20cy%3D%27225.7%27%20r%3D%270.36%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.50%27%2F%3E%3Ccircle%20cx%3D%2720.9%27%20cy%3D%2778.6%27%20r%3D%270.81%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.58%27%2F%3E%3Ccircle%20cx%3D%27397.6%27%20cy%3D%27300.6%27%20r%3D%270.55%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.98%27%2F%3E%3Ccircle%20cx%3D%27234.8%27%20cy%3D%2718.7%27%20r%3D%270.77%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.74%27%2F%3E%3Ccircle%20cx%3D%27229.8%27%20cy%3D%27167.6%27%20r%3D%270.77%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.65%27%2F%3E%3Ccircle%20cx%3D%2743.3%27%20cy%3D%27200.3%27%20r%3D%270.65%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.86%27%2F%3E%3Ccircle%20cx%3D%27343.1%27%20cy%3D%27266.2%27%20r%3D%270.43%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.39%27%2F%3E%3Ccircle%20cx%3D%27315.7%27%20cy%3D%2755.5%27%20r%3D%270.45%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.78%27%2F%3E%3Ccircle%20cx%3D%27243.7%27%20cy%3D%27310.2%27%20r%3D%270.69%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%27350.6%27%20cy%3D%27201.8%27%20r%3D%270.71%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.79%27%2F%3E%3Ccircle%20cx%3D%27311.7%27%20cy%3D%27175.9%27%20r%3D%270.53%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.38%27%2F%3E%3Ccircle%20cx%3D%27232.0%27%20cy%3D%27263.6%27%20r%3D%270.74%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.96%27%2F%3E%3Ccircle%20cx%3D%27290.4%27%20cy%3D%27258.6%27%20r%3D%270.36%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.70%27%2F%3E%3Ccircle%20cx%3D%27251.2%27%20cy%3D%27162.1%27%20r%3D%270.44%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.82%27%2F%3E%3Ccircle%20cx%3D%2741.5%27%20cy%3D%2793.9%27%20r%3D%270.83%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%27196.0%27%20cy%3D%2770.0%27%20r%3D%270.72%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%27167.6%27%20cy%3D%2747.3%27%20r%3D%270.86%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.84%27%2F%3E%3Ccircle%20cx%3D%27105.8%27%20cy%3D%27234.3%27%20r%3D%270.39%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.97%27%2F%3E%3Ccircle%20cx%3D%27100.6%27%20cy%3D%2769.4%27%20r%3D%270.57%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.58%27%2F%3E%3Ccircle%20cx%3D%2794.2%27%20cy%3D%27264.9%27%20r%3D%270.57%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.50%27%2F%3E%3Ccircle%20cx%3D%2758.0%27%20cy%3D%27318.3%27%20r%3D%270.75%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.76%27%2F%3E%3Ccircle%20cx%3D%2737.7%27%20cy%3D%27290.1%27%20r%3D%270.59%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.65%27%2F%3E%3Ccircle%20cx%3D%2764.2%27%20cy%3D%2748.3%27%20r%3D%270.90%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.49%27%2F%3E%3Ccircle%20cx%3D%27331.4%27%20cy%3D%27379.1%27%20r%3D%270.68%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.69%27%2F%3E%3Ccircle%20cx%3D%2740.5%27%20cy%3D%27365.5%27%20r%3D%270.84%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.44%27%2F%3E%3Ccircle%20cx%3D%27111.2%27%20cy%3D%27230.7%27%20r%3D%270.62%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.89%27%2F%3E%3Ccircle%20cx%3D%27159.5%27%20cy%3D%2750.1%27%20r%3D%270.88%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.82%27%2F%3E%3Ccircle%20cx%3D%27142.4%27%20cy%3D%27328.8%27%20r%3D%270.73%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.67%27%2F%3E%3Ccircle%20cx%3D%27268.3%27%20cy%3D%2745.5%27%20r%3D%270.42%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.43%27%2F%3E%3Ccircle%20cx%3D%27375.6%27%20cy%3D%27164.7%27%20r%3D%270.75%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.55%27%2F%3E%3Ccircle%20cx%3D%27376.7%27%20cy%3D%27213.4%27%20r%3D%270.96%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.74%27%2F%3E%3Ccircle%20cx%3D%27169.0%27%20cy%3D%27326.1%27%20r%3D%270.37%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.48%27%2F%3E%3Ccircle%20cx%3D%27213.0%27%20cy%3D%27356.1%27%20r%3D%271.00%27%20fill%3D%27%23dbe6ff%27%20opacity%3D%270.58%27%2F%3E%3Ccircle%20cx%3D%27376.7%27%20cy%3D%2752.6%27%20r%3D%270.94%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.70%27%2F%3E%3Ccircle%20cx%3D%27246.4%27%20cy%3D%27305.8%27%20r%3D%270.52%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.44%27%2F%3E%3Ccircle%20cx%3D%27105.0%27%20cy%3D%27257.6%27%20r%3D%270.38%27%20fill%3D%27%23fff3d6%27%20opacity%3D%270.98%27%2F%3E%3C%2Fsvg%3E");
  --anim-starsB: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27500%27%20height%3D%27500%27%3E%3Ccircle%20cx%3D%27131.8%27%20cy%3D%27126.4%27%20r%3D%271.14%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.80%27%2F%3E%3Ccircle%20cx%3D%27242.8%27%20cy%3D%27474.4%27%20r%3D%271.45%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.45%27%2F%3E%3Ccircle%20cx%3D%27498.7%27%20cy%3D%27345.5%27%20r%3D%271.51%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.54%27%2F%3E%3Ccircle%20cx%3D%27438.1%27%20cy%3D%2774.4%27%20r%3D%271.55%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.76%27%2F%3E%3Ccircle%20cx%3D%27303.4%27%20cy%3D%27144.2%27%20r%3D%271.97%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%2795.9%27%20cy%3D%27408.4%27%20r%3D%271.35%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.63%27%2F%3E%3Ccircle%20cx%3D%27465.5%27%20cy%3D%27146.2%27%20r%3D%271.33%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.62%27%2F%3E%3Ccircle%20cx%3D%27432.2%27%20cy%3D%27451.7%27%20r%3D%271.29%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%27442.0%27%20cy%3D%27456.3%27%20r%3D%271.82%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.65%27%2F%3E%3Ccircle%20cx%3D%27255.7%27%20cy%3D%27383.5%27%20r%3D%271.45%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.45%27%2F%3E%3Ccircle%20cx%3D%27171.1%27%20cy%3D%27438.7%27%20r%3D%271.28%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.77%27%2F%3E%3Ccircle%20cx%3D%2778.6%27%20cy%3D%2730.8%27%20r%3D%271.19%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.68%27%2F%3E%3Ccircle%20cx%3D%27350.3%27%20cy%3D%27328.0%27%20r%3D%271.10%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.94%27%2F%3E%3Ccircle%20cx%3D%2761.6%27%20cy%3D%27146.6%27%20r%3D%271.12%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.44%27%2F%3E%3Ccircle%20cx%3D%2747.4%27%20cy%3D%27173.5%27%20r%3D%271.33%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.76%27%2F%3E%3Ccircle%20cx%3D%27290.9%27%20cy%3D%2721.3%27%20r%3D%271.25%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.86%27%2F%3E%3Ccircle%20cx%3D%27145.3%27%20cy%3D%27117.4%27%20r%3D%271.79%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.63%27%2F%3E%3Ccircle%20cx%3D%27390.0%27%20cy%3D%27426.3%27%20r%3D%271.41%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.94%27%2F%3E%3Ccircle%20cx%3D%27119.2%27%20cy%3D%275.1%27%20r%3D%271.97%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.90%27%2F%3E%3Ccircle%20cx%3D%27464.0%27%20cy%3D%27392.5%27%20r%3D%271.55%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.75%27%2F%3E%3Ccircle%20cx%3D%27148.2%27%20cy%3D%27330.6%27%20r%3D%271.52%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.64%27%2F%3E%3Ccircle%20cx%3D%27377.0%27%20cy%3D%27321.1%27%20r%3D%271.53%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.47%27%2F%3E%3Ccircle%20cx%3D%2759.3%27%20cy%3D%2713.6%27%20r%3D%271.38%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27363.5%27%20cy%3D%27428.3%27%20r%3D%271.73%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.55%27%2F%3E%3Ccircle%20cx%3D%27105.8%27%20cy%3D%2711.0%27%20r%3D%271.82%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%27473.0%27%20cy%3D%2722.5%27%20r%3D%271.36%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.98%27%2F%3E%3Ccircle%20cx%3D%2777.6%27%20cy%3D%27260.8%27%20r%3D%271.21%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.73%27%2F%3E%3Ccircle%20cx%3D%27347.3%27%20cy%3D%27116.3%27%20r%3D%271.11%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.36%27%2F%3E%3Ccircle%20cx%3D%27246.5%27%20cy%3D%27460.8%27%20r%3D%271.57%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.55%27%2F%3E%3Ccircle%20cx%3D%27332.3%27%20cy%3D%27370.1%27%20r%3D%271.84%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.58%27%2F%3E%3Ccircle%20cx%3D%27143.3%27%20cy%3D%27178.8%27%20r%3D%271.27%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.79%27%2F%3E%3Ccircle%20cx%3D%27421.7%27%20cy%3D%27370.2%27%20r%3D%271.17%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%27169.1%27%20cy%3D%27297.6%27%20r%3D%271.89%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.82%27%2F%3E%3Ccircle%20cx%3D%2735.3%27%20cy%3D%27240.2%27%20r%3D%271.48%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.97%27%2F%3E%3Ccircle%20cx%3D%2740.2%27%20cy%3D%27292.3%27%20r%3D%271.14%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%27129.8%27%20cy%3D%2785.0%27%20r%3D%271.44%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.83%27%2F%3E%3Ccircle%20cx%3D%2765.0%27%20cy%3D%27342.1%27%20r%3D%271.82%27%20fill%3D%27%23ffffff%27%20opacity%3D%270.95%27%2F%3E%3Ccircle%20cx%3D%27143.6%27%20cy%3D%27268.8%27%20r%3D%271.57%27%20fill%3D%27%23cfe0ff%27%20opacity%3D%270.99%27%2F%3E%3C%2Fsvg%3E");
  --anim-nebulaA: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27340%27%20height%3D%27340%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.007%27%20numOctaves%3D%274%27%20seed%3D%276%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.62%200%200%200%200%200.3%200%200%200%200%200.95%200%200%200%201.7%20-0.62%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-nebulaB: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27380%27%20height%3D%27380%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.006%27%20numOctaves%3D%274%27%20seed%3D%2729%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200.15%200%200%200%200%200.42%200%200%200%200%201%200%200%200%201.6%20-0.6%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-lavaCracks: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27280%27%20height%3D%27280%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27turbulence%27%20baseFrequency%3D%270.011%27%20numOctaves%3D%273%27%20seed%3D%279%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%201%200%200%200%200%200.78%200%200%200%200%200.25%200%200%200%20-4.2%200.9%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-lavaGlow: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27320%27%20height%3D%27320%27%3E%3Cfilter%20id%3D%27n%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.007%27%20numOctaves%3D%273%27%20seed%3D%2714%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%201%200%200%200%200%200.32%200%200%200%200%200.02%200%200%200%203.2%20-1.05%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23n)%27%2F%3E%3C%2Fsvg%3E");
  --anim-embers: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27300%27%20height%3D%27300%27%3E%3Cdefs%3E%3CradialGradient%20id%3D%27e%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff3c4%27%2F%3E%3Cstop%20offset%3D%27.35%27%20stop-color%3D%27%23ffb347%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%23ff5a00%27%20stop-opacity%3D%270%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D%27206.9%27%20cy%3D%27222.1%27%20r%3D%271.44%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.59%27%2F%3E%3Ccircle%20cx%3D%2752.3%27%20cy%3D%27246.8%27%20r%3D%273.08%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.51%27%2F%3E%3Ccircle%20cx%3D%27181.7%27%20cy%3D%2796.2%27%20r%3D%271.73%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.92%27%2F%3E%3Ccircle%20cx%3D%27158.0%27%20cy%3D%27188.9%27%20r%3D%273.79%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27266.3%27%20cy%3D%27132.1%27%20r%3D%272.32%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.64%27%2F%3E%3Ccircle%20cx%3D%27180.9%27%20cy%3D%27288.9%27%20r%3D%272.67%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.94%27%2F%3E%3Ccircle%20cx%3D%27231.2%27%20cy%3D%27244.5%27%20r%3D%273.16%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.56%27%2F%3E%3Ccircle%20cx%3D%27169.2%27%20cy%3D%27173.0%27%20r%3D%273.49%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.54%27%2F%3E%3Ccircle%20cx%3D%27235.6%27%20cy%3D%273.9%27%20r%3D%271.78%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.88%27%2F%3E%3Ccircle%20cx%3D%2726.7%27%20cy%3D%27289.1%27%20r%3D%271.28%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.71%27%2F%3E%3Ccircle%20cx%3D%27261.0%27%20cy%3D%27269.4%27%20r%3D%273.11%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.61%27%2F%3E%3Ccircle%20cx%3D%27245.9%27%20cy%3D%2741.0%27%20r%3D%273.39%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.53%27%2F%3E%3Ccircle%20cx%3D%2744.4%27%20cy%3D%27222.5%27%20r%3D%272.47%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.51%27%2F%3E%3Ccircle%20cx%3D%27141.7%27%20cy%3D%2721.3%27%20r%3D%272.93%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.67%27%2F%3E%3Ccircle%20cx%3D%27111.8%27%20cy%3D%270.4%27%20r%3D%271.44%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.89%27%2F%3E%3Ccircle%20cx%3D%27184.3%27%20cy%3D%27244.9%27%20r%3D%273.28%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.95%27%2F%3E%3Ccircle%20cx%3D%2711.2%27%20cy%3D%27228.9%27%20r%3D%272.07%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.50%27%2F%3E%3Ccircle%20cx%3D%2733.2%27%20cy%3D%2782.0%27%20r%3D%272.86%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.56%27%2F%3E%3Ccircle%20cx%3D%2746.5%27%20cy%3D%27256.1%27%20r%3D%272.84%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.64%27%2F%3E%3Ccircle%20cx%3D%2769.7%27%20cy%3D%27191.9%27%20r%3D%272.27%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.52%27%2F%3E%3Ccircle%20cx%3D%27210.1%27%20cy%3D%27185.8%27%20r%3D%271.59%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.54%27%2F%3E%3Ccircle%20cx%3D%27130.8%27%20cy%3D%27156.2%27%20r%3D%272.89%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.57%27%2F%3E%3Ccircle%20cx%3D%27217.0%27%20cy%3D%27110.5%27%20r%3D%272.66%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.50%27%2F%3E%3Ccircle%20cx%3D%27242.6%27%20cy%3D%27211.8%27%20r%3D%271.95%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.63%27%2F%3E%3Ccircle%20cx%3D%2737.4%27%20cy%3D%27145.2%27%20r%3D%272.54%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.54%27%2F%3E%3Ccircle%20cx%3D%2753.2%27%20cy%3D%27184.7%27%20r%3D%272.38%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.87%27%2F%3E%3Ccircle%20cx%3D%2730.7%27%20cy%3D%2760.1%27%20r%3D%273.08%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.64%27%2F%3E%3Ccircle%20cx%3D%27266.2%27%20cy%3D%27123.1%27%20r%3D%273.54%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.96%27%2F%3E%3Ccircle%20cx%3D%2778.3%27%20cy%3D%2714.5%27%20r%3D%273.16%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.82%27%2F%3E%3Ccircle%20cx%3D%2774.3%27%20cy%3D%27230.6%27%20r%3D%271.52%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.95%27%2F%3E%3Ccircle%20cx%3D%27117.3%27%20cy%3D%27289.8%27%20r%3D%272.43%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.42%27%2F%3E%3Ccircle%20cx%3D%27192.3%27%20cy%3D%2799.8%27%20r%3D%271.53%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.74%27%2F%3E%3Ccircle%20cx%3D%27273.5%27%20cy%3D%2723.3%27%20r%3D%271.59%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.78%27%2F%3E%3Ccircle%20cx%3D%2790.5%27%20cy%3D%27245.5%27%20r%3D%273.53%27%20fill%3D%27url(%23e)%27%20opacity%3D%270.53%27%2F%3E%3C%2Fsvg%3E");
}
.board-bg::after { content: ""; position: absolute; pointer-events: none; }
.board-bg i { mix-blend-mode: normal; }

/* Ozean: Sonnenlicht bricht sich im Wasser (zwei Lichtnetze gegeneinander), dazu sanfte Lichtstrahlen */
body[data-board-anim="ozean"] .board-bg { background: var(--anim-deep) 0 0 / 300px, linear-gradient(170deg, #0f6a8d 0%, #0a4766 55%, #062c44 100%); }
body[data-board-anim="ozean"] .board-bg i:nth-child(1) { inset: -40%; background: var(--anim-caustA) 0 0 / 230px; opacity: .85; animation: oceanA 26s linear infinite; }
body[data-board-anim="ozean"] .board-bg i:nth-child(2) { inset: -40%; background: var(--anim-caustB) 0 0 / 300px; opacity: .55; mix-blend-mode: screen; animation: oceanB 34s linear infinite; }
body[data-board-anim="ozean"] .board-bg::after { inset: -10% 0 0 0; background: repeating-linear-gradient(100deg, rgba(190,240,255,0) 0 9%, rgba(190,240,255,.10) 11%, rgba(190,240,255,0) 14%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%); -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%); animation: oceanRays 11s ease-in-out infinite alternate; }
@keyframes oceanA { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(-230px, -115px, 0) rotate(0deg); } }
@keyframes oceanB { from { transform: translate3d(-300px, 0, 0) scale(1.15); } to { transform: translate3d(0, -150px, 0) scale(1.15); } }
@keyframes oceanRays { from { transform: translateX(-4%) skewX(-4deg); opacity: .7; } to { transform: translateX(4%) skewX(4deg); opacity: 1; } }

/* Polarlicht: wehende Licht-Vorhänge über einem Sternenhimmel */
body[data-board-anim="aurora"] .board-bg { background: var(--anim-starsS) 0 0 / 400px, linear-gradient(180deg, #050a1c 0%, #0a1430 60%, #0b1a2c 100%); }
body[data-board-anim="aurora"] .board-bg i:nth-child(1) { inset: -30% -60%; background: var(--anim-auroraG) 0 0 / 360px 520px;
  mask-image: linear-gradient(to bottom, transparent 5%, #000 35%, #000 55%, transparent 90%); -webkit-mask-image: linear-gradient(to bottom, transparent 5%, #000 35%, #000 55%, transparent 90%);
  animation: auroraA 30s ease-in-out infinite alternate; }
body[data-board-anim="aurora"] .board-bg i:nth-child(2) { inset: -30% -60%; background: var(--anim-auroraV) 0 0 / 360px 560px; opacity: .8; mix-blend-mode: screen;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 25%, transparent 60%); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 25%, transparent 60%);
  animation: auroraB 38s ease-in-out infinite alternate; }
@keyframes auroraA { 0% { transform: translate3d(-12%, 0, 0) skewX(-8deg) scaleY(1); } 50% { transform: translate3d(0, -3%, 0) skewX(4deg) scaleY(1.08); } 100% { transform: translate3d(12%, 0, 0) skewX(-4deg) scaleY(.96); } }
@keyframes auroraB { 0% { transform: translate3d(10%, 4%, 0) skewX(6deg); opacity: .5; } 50% { opacity: .9; } 100% { transform: translate3d(-10%, -2%, 0) skewX(-6deg); opacity: .6; } }

/* Galaxie: Nebel, Sternenfeld, funkelnde Sterne und gelegentlich eine Sternschnuppe */
body[data-board-anim="galaxie"] .board-bg { background: var(--anim-nebulaA) 0 0 / 340px, var(--anim-nebulaB) 120px 80px / 380px, radial-gradient(ellipse at 30% 25%, #251a55, #090918 70%); }
body[data-board-anim="galaxie"] .board-bg i:nth-child(1) { inset: -20%; background: var(--anim-starsS) 0 0 / 400px; animation: galaxyDrift 140s linear infinite; }
body[data-board-anim="galaxie"] .board-bg i:nth-child(2) { inset: -20%; background: var(--anim-starsB) 0 0 / 500px; animation: galaxyDrift 90s linear infinite reverse, twinkle 4.5s ease-in-out infinite alternate; }
body[data-board-anim="galaxie"] .board-bg::after { top: 8%; left: -30%; width: 34%; height: 2px; border-radius: 2px; transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95)); box-shadow: 0 0 8px rgba(200,220,255,.8);
  opacity: 0; animation: shootingStar 11s ease-in infinite 3s; }
@keyframes galaxyDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-400px, -200px, 0); } }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes shootingStar { 0%, 88% { opacity: 0; transform: translate(0, 0) rotate(18deg); } 90% { opacity: 1; } 100% { opacity: 0; transform: translate(420%, 160%) rotate(18deg); } }

/* Lava: glühende Risse, pulsierende Hitze und aufsteigende Funken */
body[data-board-anim="lava"] .board-bg { background: radial-gradient(ellipse at 50% 110%, #7a1a05 0%, #3a0904 50%, #160302 100%); }
body[data-board-anim="lava"] .board-bg i:nth-child(1) { inset: -30%; background: var(--anim-lavaGlow) 0 0 / 320px; animation: lavaFlow 28s ease-in-out infinite alternate, lavaPulse 6s ease-in-out infinite alternate; }
body[data-board-anim="lava"] .board-bg i:nth-child(2) { inset: -30%; background: var(--anim-lavaCracks) 0 0 / 280px; mix-blend-mode: screen; animation: lavaFlow2 40s linear infinite; }
body[data-board-anim="lava"] .board-bg::after { inset: 0 0 -100% 0; background: var(--anim-embers) 0 0 / 300px; animation: embersRise 14s linear infinite; }
@keyframes lavaFlow { from { transform: translate3d(-5%, 4%, 0) scale(1.05); } to { transform: translate3d(5%, -4%, 0) scale(1.15); } }
@keyframes lavaPulse { from { opacity: .7; } to { opacity: 1; } }
@keyframes lavaFlow2 { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-280px, -140px, 0); } }
@keyframes embersRise { from { transform: translate3d(0, 0, 0); opacity: .9; } to { transform: translate3d(-30px, -50%, 0); opacity: .9; } }
body.no-motion .board-bg::after { animation: none !important; opacity: 0; }

/* Kacheln der animierten Bretter: ruhige Mini-Vorschau aus denselben Texturen */
.board-swatch .sw[data-anim]::before { animation-duration: 9s; }
.board-swatch .sw[data-anim="ozean"]::before { background: var(--anim-caustA) 0 0 / 80px, linear-gradient(170deg, #0f6a8d, #062c44); }
.board-swatch .sw[data-anim="aurora"]::before { background: var(--anim-auroraG) 0 0 / 90px 130px, linear-gradient(180deg, #050a1c, #0b1a2c); }
.board-swatch .sw[data-anim="galaxie"]::before { background: var(--anim-starsS) 0 0 / 120px, var(--anim-nebulaA) 0 0 / 110px, #0d0b22; }
.board-swatch .sw[data-anim="lava"]::before { background: var(--anim-lavaCracks) 0 0 / 90px, var(--anim-lavaGlow) 0 0 / 110px, #250604; }
/* ===== ENDE BRETT-ANIMATIONEN (0.39) ===== */

/* ===== BRETT-WAHL (0.39): Feldränder, eigene Farben, Figuren-Form/Farbe ===== */
/* Feldränder: jede Kachel bekommt eine feine Innenlinie -> zwischen den Feldern entsteht ein Streifen */
body[data-board-grid] .chess-board .square::after,
body[data-board-grid] .settings-preview .square::after,
body[data-board-grid] .wt-board .square::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 1px var(--grid-color);
}
body[data-board-grid] .chess-board { box-shadow: 0 0 0 2px var(--grid-color), 0 8px 26px rgba(0, 0, 0, .25); }
body[data-board-grid="gold"] .chess-board .square::after, body[data-board-grid="bronze"] .chess-board .square::after {
  box-shadow: inset 0 0 0 1px var(--grid-color), inset 0 0 0 1.5px rgba(255, 255, 255, .12);
}
/* Kacheln der Feldränder */
.grid-prev { position: relative; }
.grid-prev i.l { background: #c4515b; }
.grid-prev i.d { background: #2b2b2f; }
.grid-prev i { box-shadow: inset 0 0 0 1.5px var(--grid-prev, transparent); }
.grid-prev[data-grid-style="gold"] { --grid-prev: #d4af37; }
.grid-prev[data-grid-style="silver"] { --grid-prev: #c7ccd3; }
.grid-prev[data-grid-style="bronze"] { --grid-prev: #b4733f; }
.grid-prev[data-grid-style="black"] { --grid-prev: #0d0d0d; }
.grid-prev[data-grid-style="white"] { --grid-prev: #f5f5f5; }
.grid-swatches .board-swatch { position: relative; }
.grid-color-input { width: 34px; height: 20px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: transparent; cursor: pointer; }
/* Eigene Brettfarben */
.custom-colors { display: flex; flex-wrap: wrap; gap: .75rem; }
.color-pick { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .6rem .35rem .35rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft); cursor: pointer; font-size: .85rem; }
.color-pick input[type="color"] { width: 34px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.color-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .25); border-radius: 6px; }
/* Figuren: Farbwahl ausgegraut, solange ein Spezial-Stil gewählt ist */
#pieceColorBlock.is-off .swatch-grid { opacity: .45; }
.swatch-grid.pieces .sw-pieces svg { width: 36px; height: 36px; }

/* ===== ZUG-ANIMATIONEN (0.39): ruhiger und hochwertiger (überschreibt die Effekte aus 0.22) ===== */
.piece { transition: transform .18s cubic-bezier(.3,.7,.25,1), filter .18s ease-out; }
.square.selected .piece { transform: scale(1.08) translateY(-4%); filter: drop-shadow(0 8px 8px rgba(0,0,0,.3)); }
.square:hover .piece { transform: scale(1.03); }
.square.valid-move::before { animation: dotIn .22s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes dotIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* Schlagen: dünne Druckwelle + Figur löst sich auf (statt Wegwirbeln) */
.fx-capture-ring { inset: 18%; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 0 12px rgba(255,255,255,.45); animation: ringBurst .55s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes ringBurst { from { transform: scale(.5); opacity: .95; } to { transform: scale(1.7); opacity: 0; } }
@keyframes capturedOut { 0% { transform: scale(1); opacity: 1; filter: blur(0); } 100% { transform: scale(.72) translateY(-6%); opacity: 0; filter: blur(3px); } }
/* König geschlagen: steigt auf, wird grau und verblasst */
@keyframes kingOut { 0% { transform: none; opacity: 1; filter: none; } 25% { transform: scale(1.12); filter: drop-shadow(0 0 10px rgba(239,68,68,.9)); } 100% { transform: translateY(-55%) scale(.85); opacity: 0; filter: grayscale(1) blur(2px); } }
/* Schach: weicher roter Schein, zweimal */
.fx-check { inset: 0; border: 0; border-radius: 0; background: radial-gradient(circle, rgba(239,68,68,.55) 0%, rgba(239,68,68,.18) 45%, rgba(239,68,68,0) 70%); animation: checkFlash 1.1s ease-out forwards; }
@keyframes checkFlash { 0% { opacity: 0; transform: scale(.7); } 22% { opacity: 1; transform: scale(1.15); } 45% { opacity: .35; } 65% { opacity: .9; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1); } }
/* Übergabe: Lichtimpuls läuft entlang der Mittellinie */
.fx-center { width: 4px; margin-left: -2px; background: linear-gradient(to bottom, transparent, var(--center-line) 40%, #fff 50%, var(--center-line) 60%, transparent); box-shadow: 0 0 12px var(--center-line); animation: centerFlash .9s cubic-bezier(.3,.7,.25,1) forwards; }
@keyframes centerFlash { 0% { opacity: 0; transform: translateY(-60%) scaleY(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(60%) scaleY(.6); } }
/* Umwandlung: neue Figur erscheint mit Lichtschein */
@keyframes promoPop { 0% { transform: scale(.4); filter: brightness(2.2) drop-shadow(0 0 10px #fff); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: none; filter: none; } }
/* Brett wackelt nur noch dezent */
@keyframes boardShake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 50% { transform: translateX(2px); } 75% { transform: translateX(-1px); } }
/* Schriftband: Glas-Optik, gleitet ein */
.fx-banner { backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3); background: color-mix(in srgb, var(--bg-elev) 78%, transparent); box-shadow: 0 18px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); }
.fx-banner.mate, .fx-banner.king { background: rgba(220, 38, 38, .88); }
@keyframes bannerIn {
  0% { opacity: 0; transform: translate(-50%, -38%) scale(.94); filter: blur(4px); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(.98); }
}
/* König in Gefahr: statt Zittern ein ruhiges Atmen */
@keyframes kingShiver { 0%, 100% { transform: none; filter: none; } 50% { transform: scale(1.04); filter: drop-shadow(0 0 6px rgba(239,68,68,.75)); } }
.square.king-danger .piece { animation-duration: 1.8s; }

/* ===== TRAINER AM HANDY (0.40): feste Steuerleiste über der unteren Navigation ===== */
.rv-dock { display: none; }
@media (max-width: 820px) {
  .rv-dock {
    display: flex; flex-direction: column; gap: 6px; position: fixed; left: 8px; right: 8px; z-index: 150;
    bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom, 0px));
    padding: 8px 10px; border-radius: 14px; border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
    backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
  .rv-dock-info { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: .82rem; }
  .rv-dock-pos { font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
  .rv-dock-move { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .rv-dock-chance { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .rv-dock-nav { display: flex; align-items: center; gap: 6px; }
  .rv-dock-nav .btn-icon { flex: 0 0 auto; width: 40px; height: 40px; }
  .rv-dock-nav .rv-dock-big { flex: 1 1 0; width: auto; height: 44px; }
  .rv-dock-err { flex: 0 0 auto; height: 40px; white-space: nowrap; }
  body.rv-dock-on .main-content { padding-bottom: calc(var(--nav-h) + 130px); }
  /* Die Navigation im Trainer-Kasten ist doppelt – am Handy übernimmt die Leiste */
  body.rv-dock-on #reviewCard .rv-nav, body.rv-dock-on #reviewCard .rv-next-error { display: none; }
}
/* ===== BRETT & FIGUREN: REITER + LINIENFARBE (0.41) ===== */
.board-tabs {
  display: flex; gap: 0.25rem; margin: 0.25rem 0 1rem; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.board-tabs::-webkit-scrollbar { display: none; }
.board-tab-btn {
  flex-shrink: 0; padding: 0.55rem 0.9rem; border: 0; background: none; color: var(--text-muted);
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; border-radius: 6px 6px 0 0;
  box-shadow: inset 0 -2px 0 transparent; transition: color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.board-tab-btn:hover { color: var(--text); background: var(--bg-soft); }
.board-tab-btn.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }
.board-tab[hidden] { display: none; }
.board-tab:not([hidden]) { animation: fadeIn 0.18s ease-out; }
.board-tab > .setting-block:first-child, .board-tab > .switch-row:first-child { border-top: 0; padding-top: 0; }
.cl-colors { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.cl-color {
  display: block; position: relative; width: 36px; height: 36px; padding: 3px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; background: none; box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.12s, border-color 0.12s;
}
.cl-color:hover { transform: scale(1.08); }
.cl-color.active { border-color: var(--text); box-shadow: none; }
.cl-color i { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
/* "Auto" = Farbe des Website-Designs (halb Linie, halb Brett) */
.cl-color[data-clc="auto"] i { background: linear-gradient(135deg, var(--center-line) 0 50%, var(--square-dark, #777) 50% 100%); }
/* Eigene Farbe: Regenbogen-Ring, innen die gewählte Farbe; Farbwähler liegt unsichtbar darüber */
.cl-color[data-clc="custom"] { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #3b82f6, #a855f7, #ec4899, #ef4444); box-shadow: none; }
.cl-color[data-clc="custom"]::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--clc, #f59e0b); box-shadow: 0 0 0 2px var(--bg-elevated, var(--bg)); }
.cl-color-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
@media (max-width: 820px) {
  .settings-preview { width: min(150px, 45%); }
  .board-tabs { margin-bottom: 0.75rem; }
}
@media (max-width: 640px) {
  .board-tab-btn { padding: 0.5rem 0.6rem; font-size: 0.85rem; }
  .board-tab .swatch-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}

/* ===== LEVEL-SYSTEM (0.43): Abzeichen je Rang, Balken, Startseiten-Karte, Spielende, Aufstieg ===== */
.lv-badge {
  --lv: #8b8f98; position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg-soft); box-shadow: inset 0 0 0 3px var(--lv);
}
.lv-knight { --lv: #22a06b; } .lv-bishop { --lv: #3b82f6; } .lv-rook { --lv: #8b5cf6; }
.lv-queen { --lv: #e8590c; } .lv-king { --lv: #e03131; } .lv-grandmaster { --lv: #d4a017; }
.lv-piece { width: 64%; height: 64%; display: flex; }
.lv-piece svg { width: 100%; height: 100%; }
.lv-num {
  position: absolute; right: -6px; bottom: -4px; min-width: 22px; padding: 1px 5px; border-radius: 999px;
  background: var(--lv); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.35; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-elevated, var(--bg)); font-variant-numeric: tabular-nums;
}
.lv-badge.lv-sm { width: 30px; height: 30px; box-shadow: inset 0 0 0 2px var(--lv); }
.lv-badge.lv-sm .lv-num { font-size: 0.6rem; min-width: 17px; padding: 0 3px; right: -7px; bottom: -5px; }
.lv-badge.lv-lg { width: 60px; height: 60px; box-shadow: inset 0 0 0 4px var(--lv); }
.lv-badge.lv-lg .lv-num { font-size: 0.82rem; min-width: 26px; }
.lv-badge.lv-xl { width: 96px; height: 96px; box-shadow: inset 0 0 0 5px var(--lv); }
.lv-badge.lv-xl .lv-num { font-size: 1rem; min-width: 32px; padding: 2px 8px; right: -4px; bottom: -2px; }

.lv-bar-box { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lv-bar { height: 8px; border-radius: 999px; background: var(--bg-hover, var(--bg-soft)); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.lv-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #22c55e; transition: width 1.1s cubic-bezier(.25,.8,.25,1); }
.lv-bar-text { color: var(--text-muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }

/* Seitenleiste */
.level-chip {
  display: flex; align-items: center; gap: 0.55rem; width: 100%; padding: 0.45rem 0.6rem; margin-bottom: 0.35rem;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: transparent; color: var(--text); cursor: pointer;
}
.level-chip:hover { background: var(--bg-soft); }
.lv-chip-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--bg-hover, var(--bg-soft)); overflow: hidden; }
.lv-chip-bar i { display: block; height: 100%; background: #22c55e; border-radius: inherit; }
@media (max-width: 1240px) { .level-chip { justify-content: center; padding: 0.4rem; } .lv-chip-bar { display: none; } }
@media (max-width: 820px) { .level-chip { display: none; } }

/* Startseite */
.lv-card { border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--bg-elevated, var(--bg-soft)); padding: 1rem 1.1rem; margin-bottom: 1.5rem; }
.lv-card:empty { display: none; }
.lv-card-head { display: flex; align-items: center; gap: 1rem; }
.lv-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.lv-kicker { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle, var(--text-muted)); }
.lv-card-title { font-size: 1.1rem; }
.lv-how { margin-top: 0.8rem; }
.lv-how summary { cursor: pointer; color: var(--text-muted); font-size: 0.88rem; }
.lv-how-list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.3rem 1.2rem; font-size: 0.86rem; }
.lv-how-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.25rem 0; border-bottom: 1px dashed var(--border); }
.lv-how-list b { color: #16a34a; white-space: nowrap; }
.lv-tiers { display: flex; flex-wrap: wrap; gap: 0.9rem 1.1rem; margin-top: 0.9rem; }
.lv-tier { display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0.45; }
.lv-tier.is-done { opacity: 1; }
.lv-tier small { font-size: 0.72rem; color: var(--text-muted); }

/* Profil */
.ph-level { display: flex; align-items: center; gap: 0.8rem; margin: 0.5rem 0 0.2rem; max-width: 420px; }
.ph-level-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }

/* Spielende */
.go-xp { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.7rem 0.85rem; margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.45rem; }
.go-xp-top { display: flex; align-items: center; gap: 0.7rem; }
.go-xp-sum { font-size: 1.15rem; color: #16a34a; }
.go-xp-up { margin-left: auto; font-size: 0.8rem; font-weight: 700; color: #fff; background: #16a34a; padding: 2px 9px; border-radius: 999px; }
.go-xp-items { font-size: 0.8rem; color: var(--text-muted); }

/* "+10 XP" */
.xp-pop {
  position: fixed; right: 20px; bottom: 24px; z-index: 400; pointer-events: none;
  padding: 6px 14px; border-radius: 999px; background: #16a34a; color: #fff; font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); animation: xpPop 1.9s ease-out forwards;
}
@keyframes xpPop { 0% { opacity: 0; transform: translateY(12px) scale(.9); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px); } }
@media (max-width: 820px) { .xp-pop { right: 50%; transform: translateX(50%); bottom: 90px; } @keyframes xpPop { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } } }

/* Level-Aufstieg */
.lvl-up { position: fixed; inset: 0; z-index: 450; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .35); cursor: pointer; animation: fadeIn .2s ease-out; transition: opacity .45s; }
.lvl-up.is-out { opacity: 0; }
.lvl-up-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 1.6rem 2.4rem; border-radius: 18px;
  background: var(--bg-elevated, var(--bg)); border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  animation: lvlUp .6s cubic-bezier(.2,1.4,.4,1) both;
}
.lvl-up-kicker { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: #16a34a; font-weight: 700; }
.lvl-up-title { font-size: 1.6rem; }
.lvl-up-sub { color: var(--text-muted); }
@keyframes lvlUp { from { opacity: 0; transform: scale(.7) translateY(20px); } to { opacity: 1; transform: none; } }
body.no-motion .lvl-up-card, body.no-motion .xp-pop, body.no-motion .lvl-up { animation: none; }
body.no-motion .lv-fill { transition: none; }

/* ===== TÄGLICHE AUFGABEN (0.45) ===== */
.qs-card { border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--bg-elevated, var(--bg-soft)); padding: 0.9rem 1.1rem; margin: -0.6rem 0 1.5rem; }
.qs-card:empty { display: none; }
.qs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.qs-head small { color: var(--text-muted); font-size: 0.78rem; }
.qs-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 0.7rem; padding: 0.45rem 0; border-top: 1px solid var(--border); }
.qs-check { display: flex; color: var(--text-muted); }
.qs-row.is-done .qs-check { color: #16a34a; }
.qs-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qs-name { font-size: 0.9rem; }
.qs-row.is-done .qs-name { color: var(--text-muted); text-decoration: line-through; }
.qs-bar { height: 6px; }
.qs-count { font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.qs-xp { font-size: 0.8rem; color: #16a34a; white-space: nowrap; }
.qs-bonus { margin-top: 0.4rem; padding-top: 0.5rem; border-top: 1px dashed var(--border); font-size: 0.82rem; color: var(--text-muted); }
.qs-bonus.is-done { color: #16a34a; font-weight: 600; }
.go-xp-quest { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #16a34a; font-weight: 600; }

/* ===== SCHNELL-SIGNALE + DENK LAUT (0.45) ===== */
.signal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.signal-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0.5rem 0.4rem; font-size: 0.8rem; min-width: 0; }
.signal-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-pop {
  position: absolute; left: 50%; top: 9%; transform: translateX(-50%); z-index: 40; pointer-events: none;
  display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; border-radius: 14px;
  background: rgba(17, 17, 20, .92); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); border: 2px solid #3b82f6;
  animation: sigIn .35s cubic-bezier(.2,1.3,.4,1) both; transition: opacity .45s;
}
.sig-pop span { display: flex; flex-direction: column; line-height: 1.2; }
.sig-pop small { font-size: 0.72rem; opacity: 0.75; }
.sig-pop strong { font-size: 1.05rem; }
.sig-pop.is-out { opacity: 0; }
.sig-pop.sig-handover { border-color: #f59e0b; } .sig-pop.sig-defend { border-color: #ef4444; } .sig-pop.sig-attack { border-color: #e8590c; }
.sig-pop.sig-wait { border-color: #8b8f98; } .sig-pop.sig-help { border-color: #a855f7; } .sig-pop.sig-nice { border-color: #22c55e; }
@keyframes sigIn { from { opacity: 0; transform: translate(-50%, -12px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0); } }
body.no-motion .sig-pop { animation: none; }
.marks-overlay .mark-line.plan { stroke: #a855f7; stroke-dasharray: 2.2 1.6; opacity: .9; }
.marks-overlay .mark-head.plan { fill: #a855f7; opacity: .9; }
.marks-overlay .mark-circle.plan { stroke: #a855f7; stroke-dasharray: 2 1.5; fill: rgba(168, 85, 247, .12); }

/* ===== TEILEN (0.45): Highlight + Spielerkarte ===== */
.share-modal { max-width: 520px; }
.share-preview { display: flex; justify-content: center; margin-bottom: 0.9rem; }
.share-preview img { width: min(100%, 360px); border-radius: 12px; box-shadow: 0 8px 26px rgba(0, 0, 0, .3); }
.share-status { min-height: 1.3em; margin: 0.6rem 0 0; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
#shareActions .btn { display: inline-flex; align-items: center; gap: 6px; }

/* ===== FERNSCHACH (0.45) ===== */
.corr-card-home { border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--bg-elevated, var(--bg-soft)); padding: 0.9rem 1.1rem; margin: -0.6rem 0 1.5rem; }
.corr-card-home:empty { display: none; }
.corr-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.corr-head-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.corr-head-btns .btn { display: inline-flex; align-items: center; gap: 5px; }
.corr-empty { color: var(--text-muted); font-size: 0.86rem; margin: 0.3rem 0 0; }
.corr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.corr-code { font-family: var(--font-mono, monospace); font-size: 0.8rem; padding: 2px 7px; border-radius: 6px; background: var(--bg-hover, var(--bg-soft)); }
.corr-main { display: flex; flex-direction: column; min-width: 0; }
.corr-teams { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corr-status { font-size: 0.78rem; color: var(--text-muted); }
.corr-row.is-myTurn .corr-status, .corr-row.is-botTurn .corr-status { color: #16a34a; font-weight: 600; }
.corr-row.is-ended, .corr-row.is-gone { opacity: 0.7; }
.corr-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.corr-bar { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem; }
.corr-bar[hidden], .voice-card[hidden], .signal-card[hidden] { display: none; }
.corr-bar-icon { display: flex; color: #3b82f6; }
.corr-bar-text { display: flex; flex-direction: column; gap: 2px; }
.corr-bar-text small { color: var(--text-muted); font-size: 0.82rem; }
@media (max-width: 640px) { .corr-row { grid-template-columns: auto minmax(0, 1fr); } .corr-actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* ===== KI-KLON + PARTNERSUCHE (0.47) ===== */
.clone-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin: 1rem 0 0.4rem; padding: 0.8rem 0.9rem; border-radius: var(--radius-md); background: var(--bg-soft); border: 1px solid var(--border); }
.clone-label { font-size: 0.88rem; flex: 1 1 260px; }
.clone-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.dna-type-line { font-size: 1.15rem; font-weight: 700; margin: 0.2rem 0; }
.match-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.match-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.match-name { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.match-name:hover { text-decoration: underline; }
.match-type { color: var(--text-muted); font-size: 0.78rem; }
.match-reasons { color: #16a34a; font-size: 0.78rem; }
.match-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.match-score { font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .match-row { grid-template-columns: auto minmax(0, 1fr); } .match-right { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; } }

/* ===== LIVE ZUSCHAUEN (0.48) ===== */
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.3rem; }
.live-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.live-main { display: flex; flex-direction: column; min-width: 0; }
.live-teams { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-meta { color: var(--text-muted); font-size: 0.78rem; }
.live-row .btn { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.eval-strip { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.45rem; font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.eval-strip[hidden] { display: none; }
.eval-track { flex: 1; height: 12px; border-radius: 999px; background: #26272d; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.eval-fill { display: block; height: 100%; width: 50%; background: #f1f1f1; transition: width .8s cubic-bezier(.25,.8,.25,1); }
.eval-side { white-space: nowrap; color: var(--text-muted); }
body.no-motion .eval-fill { transition: none; }

/* ===== TEAM-LIGA (0.48) ===== */
.league-wrap { overflow-x: auto; }
.league-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.league-table th { text-align: center; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 0.4rem 0.35rem; border-bottom: 1px solid var(--border); }
.league-table td { text-align: center; padding: 0.55rem 0.35rem; border-bottom: 1px solid var(--border); }
.league-table .is-team { text-align: left; }
.league-table td.is-team strong { display: block; }
.league-table td.is-team small { color: var(--text-muted); font-size: 0.76rem; }
.league-table tr.is-me { background: var(--bg-soft); }
.league-table tr.top1 .rank-place { color: #d4a017; font-weight: 800; }
.league-table tr.top2 .rank-place { color: #9aa1ab; font-weight: 800; }
.league-table tr.top3 .rank-place { color: #b4733f; font-weight: 800; }
.league-pts { font-weight: 800; }

/* ===== PARTIE-ARCHIV, ERÖFFNUNGSBUCH, PARTIE DER WOCHE (0.49) ===== */
.arch-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.arch-res { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.arch-res.is-win { background: rgba(22, 163, 74, .15); color: #16a34a; }
.arch-res.is-loss { background: rgba(239, 68, 68, .14); color: #ef4444; }
.arch-res.is-draw { background: var(--bg-hover, var(--bg-soft)); color: var(--text-muted); }
.arch-main { display: flex; flex-direction: column; min-width: 0; }
.arch-teams { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-meta { color: var(--text-muted); font-size: 0.76rem; }
.arch-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .arch-row { grid-template-columns: auto minmax(0, 1fr); } .arch-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.opening-panel .mode-selector-tabs { margin: 0.4rem 0 0.9rem; }
.opening-layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.opening-board .wt-board { width: 100%; }
.opening-nav { display: flex; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.opening-seq { margin: 0.6rem 0 0; padding-left: 1.3rem; font-size: 0.8rem; color: var(--text-muted); }
.opening-turn { margin: 0 0 0.5rem; font-size: 0.95rem; }
.opening-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m n" "bar bar"; gap: 4px 0.6rem; width: 100%; padding: 0.5rem 0.6rem; margin-bottom: 0.3rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.opening-row:hover, .opening-row.is-shown { background: var(--bg-soft); border-color: var(--text-muted); }
.opening-move { grid-area: m; font-weight: 600; font-size: 0.88rem; }
.opening-n { grid-area: n; color: var(--text-muted); font-size: 0.78rem; }
.opening-bar { grid-area: bar; display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--bg-hover, var(--bg-soft)); }
.opening-bar i { display: block; height: 100%; }
.ob-w { background: #f1f1f1; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); } .ob-d { background: #8b8f98; } .ob-b { background: #26272d; }
.opening-foot { margin-top: 0.6rem; }
@media (max-width: 820px) { .opening-layout { grid-template-columns: minmax(0, 1fr); } .opening-board { max-width: 340px; margin: 0 auto; width: 100%; } }
.gotw-card { border-color: #d4a017; }
.gotw-card h2 { margin: 0.2rem 0 0.2rem; }

/* ===== KURSE + FINDE DEN FEHLER (0.50) ===== */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.7rem; margin-top: 0.6rem; }
.course-card { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.course-card:hover { background: var(--bg-soft); border-color: var(--text-muted); }
.course-card.is-done .hub-icon { color: var(--success, #22c55e); }
.course-text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; flex: 1; }
.course-text small { color: var(--text-muted); font-size: 0.78rem; }
.course-bar { margin-top: 0.25rem; }
.course-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0.7rem; align-items: start; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.course-num { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.course-step.is-next .course-num { border-color: var(--accent); color: var(--accent); }
.course-step.is-done .course-num { background: var(--success, #22c55e); border-color: transparent; color: #fff; }
.course-step-main strong { display: block; font-size: 0.92rem; }
.course-read { margin: 0.4rem 0 0; font-size: 0.86rem; line-height: 1.5; }
.course-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.course-complete { margin: 0.8rem 0 0; font-weight: 600; color: var(--success, #22c55e); }
.spot-arrows .sa-a { stroke: #3b82f6; } .spot-arrows .sa-a-dot, .spot-arrows .sa-a-head { fill: #3b82f6; }
.spot-arrows .sa-b { stroke: #f59e0b; } .spot-arrows .sa-b-dot, .spot-arrows .sa-b-head { fill: #f59e0b; }
.spot-arrows .sa-good { stroke: #22c55e; } .spot-arrows .sa-good-dot, .spot-arrows .sa-good-head { fill: #22c55e; }
.spot-arrows .sa-bad { stroke: #ef4444; } .spot-arrows .sa-bad-dot, .spot-arrows .sa-bad-head { fill: #ef4444; }
.spot-choice.spot-a { border-left: 4px solid #3b82f6; }
.spot-choice.spot-b { border-left: 4px solid #f59e0b; }
.spot-side > .btn { margin-top: 0.5rem; }
.spot-verdict { font-weight: 700; margin: 0 0 0.4rem; }
.spot-verdict.is-right { color: #22c55e; }
.spot-verdict.is-wrong { color: #ef4444; }
.spot-result { font-size: 1.1rem; font-weight: 600; }
@media (max-width: 820px) {
  .course-step { grid-template-columns: 28px minmax(0, 1fr); }
  .course-actions { grid-column: 2; }
}

/* ===== TITEL, WOCHENRÜCKBLICK (0.51) ===== */
.ph-title { margin: 0.1rem 0 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.ph-title-pick { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0.15rem 0 0.35rem; font-size: 0.8rem; color: var(--text-muted); }
.ph-title-select { font: inherit; font-weight: 600; color: var(--accent); background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); padding: 0.15rem 0.4rem; }
.ph-title-select option { color: var(--text); background: var(--bg-card, var(--bg)); }
.wk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.5rem; }
.wk-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0.55rem 0.3rem; border-radius: var(--radius-md); background: var(--bg-soft); text-align: center; }
.wk-tile b { font-size: 1.15rem; }
.wk-tile small { font-size: 0.7rem; color: var(--text-muted); }
.wk-delta { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
.wk-delta.is-up { color: #22c55e; }
.wk-delta.is-down { color: #ef4444; }
.wk-line { margin: 0.6rem 0; font-size: 0.86rem; }
@media (max-width: 520px) {
  .wk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== TEAM-SPRACHCHAT (0.52) ===== */
.voice-status { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; font-size: 0.88rem; }
.voice-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); }
.voice-status.is-waiting .voice-dot, .voice-status.is-connecting .voice-dot { background: #f59e0b; }
.voice-status.is-live .voice-dot { background: #22c55e; }
.voice-status.is-failed .voice-dot, .voice-status.is-denied .voice-dot, .voice-status.is-unsupported .voice-dot { background: #ef4444; }
.voice-dot.is-speaking { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35); }
body:not(.no-motion) .voice-dot.is-speaking { animation: voicePulse 0.8s ease-in-out infinite; }
@keyframes voicePulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.15); } }
.voice-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ===== ANALYSE-BRETT (0.54) ===== */
.ana-modes { margin: 0.4rem 0 0.9rem; }
.ana-board .square { cursor: pointer; }
.ana-board .square.ana-target { box-shadow: inset 0 0 0 3px rgba(34, 197, 94, 0.75); }
.ana-arrows .ana-best { stroke: #22c55e; opacity: 0.85; }
.ana-arrows .ana-best-head { fill: #22c55e; }
.ana-side { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.ana-eval { display: flex; flex-direction: column; gap: 0.35rem; }
.ana-evalbar { height: 10px; }
.ana-best-line { margin: 0.2rem 0 0; font-weight: 600; font-size: 0.88rem; }
.ana-check { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; }
.ana-moves { margin: 0; padding-left: 1.6rem; max-height: 220px; overflow: auto; font-size: 0.84rem; }
.ana-moves li.is-cur .ana-mv { background: var(--bg-soft); font-weight: 700; }
.ana-mv { border: 0; background: transparent; color: var(--text); font: inherit; padding: 0.15rem 0.35rem; border-radius: 6px; cursor: pointer; text-align: left; }
.ana-mv:hover { background: var(--bg-soft); }
.ana-field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.84rem; color: var(--text-muted); }
.ana-field select, .ana-field textarea { font: inherit; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.4rem 0.5rem; }
.ana-field textarea { resize: vertical; }
.ana-palette { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.3rem; }
.ana-pal { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft); color: var(--text); cursor: pointer; }
.ana-pal svg { width: 100%; height: 100%; }
.ana-pal.active { outline: 2px solid var(--accent); outline-offset: 1px; }
.ana-erase { grid-column: span 2; aspect-ratio: auto; }

/* ===== TRAININGSMODUS (0.55) ===== */
.train-status { margin: 0 0 0.4rem; font-size: 0.88rem; }
.train-status.is-busy { color: var(--text-muted); }
.train-warn { border: 1px solid #f59e0b; border-radius: var(--radius-md); padding: 0.7rem 0.8rem; background: rgba(245, 158, 11, 0.08); }
.train-warn strong { color: #f59e0b; }
.train-warn p { margin: 0.35rem 0; font-size: 0.88rem; }
.train-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.train-card[hidden] { display: none; }

/* ===== ZUSCHAUER-REAKTIONEN (0.56) ===== */
.react-bar { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin: 0 0 0.5rem; }
.react-bar[hidden] { display: none; }
.react-label { font-size: 0.78rem; color: var(--text-muted); margin-right: 0.2rem; }
.react-btn { padding: 0.3rem 0.55rem; font-size: 0.8rem; gap: 0.3rem; }
.react-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.react-pop { position: absolute; bottom: 4%; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.6rem; border-radius: 999px; background: rgba(20, 20, 23, 0.85); color: #fff; font-size: 0.8rem; font-weight: 600; white-space: nowrap; animation: reactRise 3.2s ease-out forwards; }
.react-pop.is-mine { background: var(--accent); color: var(--accent-fg); }
@keyframes reactRise { 0% { transform: translateY(0) scale(0.8); opacity: 0; } 12% { opacity: 1; transform: translateY(-10%) scale(1); } 100% { transform: translateY(-420%); opacity: 0; } }
body.no-motion .react-pop { animation: none; bottom: 45%; }

/* ===== BEDIENUNG OHNE MAUS (0.58) ===== */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.chess-board .square:focus { outline: none; }
.chess-board .square:focus-visible { box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 5px rgba(0, 0, 0, 0.35); z-index: 2; }
.kb-move { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 0.8rem; }
.kb-move label { font-size: 0.82rem; font-weight: 600; }
.kb-row { display: flex; gap: 0.4rem; }
.kb-row input { flex: 1; min-width: 0; font: inherit; font-family: ui-monospace, Consolas, monospace; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.45rem 0.6rem; }
.kb-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.kb-move small { color: var(--text-muted); font-size: 0.74rem; line-height: 1.4; }

/* ===== FEHLERSUCHE (0.59) ===== */
/* Das HTML-Attribut hidden gewinnt immer: sonst überschreiben Klassen wie .btn (display:flex) es
   (so war z. B. „Rematch“ in lokalen Partien sichtbar). */
[hidden] { display: none !important; }

/* Logo auf der Startseite (0.60; am Handy gibt es keine Seitenleiste) */
.hero-logo { display: block; margin: 0 auto 0.6rem; color: var(--text); }
