/* RoadPulseMP – Design-System "Asphalt"
   Farben/Schriften aus logo/RoadPulseMP-Logo-Set (Orange #FF7A00, Asphalt, Saira + Archivo Black).
   Aufbau: 1 Schriften · 2 Tokens (dunkel/hell) · 3 Grundlagen · 4 Layout · 5 Kopf-/Fußzeile
           6 Komponenten · 7 Formulare · 8 Dialoge/Toasts/Menüs · 9 Hilfsklassen · 10 Bewegung */

/* ===== 1 Schriften (selbst gehostet, keine Verbindung zu Google – DSGVO) ======================= */
@font-face {
  font-family: 'Archivo Black'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/archivo-black-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Black'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/archivo-black-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Saira'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/saira-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Saira'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/saira-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===== 2 Tokens ====================================================================== */
:root {
  color-scheme: dark;
  /* Flächen: dunkler Asphalt mit warmem Unterton */
  --bg: #131211;
  --bg-2: #181716;
  --surface: #1c1b19;
  --surface-2: #242320;
  --surface-3: #2e2c29;
  --border: rgb(255 255 255 / 8%);
  --border-strong: rgb(255 255 255 / 15%);
  --text: #F2F1EE;
  --text-2: #D2CEC7;
  --muted: #A6A29B;
  --faint: #6E6A64;
  /* Marke */
  --accent: #FF7A00;
  --accent-2: #FF9433;
  --accent-ink: #1A1108;
  --accent-text: #FF8F2E;
  --accent-soft: rgb(255 122 0 / 12%);
  --accent-line: rgb(255 122 0 / 42%);
  /* Status */
  --ok: #3ECF8E;   --ok-soft: rgb(62 207 142 / 14%);
  --bad: #FF6B6B;  --bad-soft: rgb(255 107 107 / 14%);
  --warn: #F5B841; --warn-soft: rgb(245 184 65 / 14%);
  --info: #6CB2FF; --info-soft: rgb(108 178 255 / 14%);
  /* Effekte */
  --header-bg: rgb(19 18 17 / 70%);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 35%);
  --shadow-2: 0 10px 30px -12px rgb(0 0 0 / 60%);
  --shadow-3: 0 30px 80px -30px rgb(0 0 0 / 75%);
  --glow: 0 0 0 1px rgb(255 122 0 / 35%), 0 12px 40px -12px rgb(255 122 0 / 55%);
  --grid-line: rgb(255 255 255 / 4.5%);
  --road: #2c2a27;
  --road-mark: #F2F1EE;
  --map-bg: #1a1917;
  --map-grid: #262420;
  --map-grid-axis: #3a3733;
  --map-label: #8e8a83;
  /* Form */
  --radius-xs: 6px; --radius-s: 8px; --radius: 12px; --radius-l: 16px; --radius-xl: 24px;
  --font-display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Saira', system-ui, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --container: 1200px;
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Hell: Systemeinstellung (ohne eigene Wahl) oder ausdrücklich gewählt */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #F2F1EE; --bg-2: #EBE9E4; --surface: #FFFFFF; --surface-2: #F6F5F2; --surface-3: #ECEAE5;
    --border: rgb(40 30 20 / 10%); --border-strong: rgb(40 30 20 / 18%);
    --text: #1C1B1A; --text-2: #3B3834; --muted: #5E5A54; --faint: #A5A099;
    --accent-ink: #1A1108; --accent-text: #B04D00; --accent-soft: rgb(255 122 0 / 11%); --accent-line: rgb(211 95 0 / 40%);
    --ok: #12804F; --ok-soft: rgb(18 128 79 / 11%); --bad: #C42F2F; --bad-soft: rgb(196 47 47 / 10%);
    --warn: #8F6300; --warn-soft: rgb(200 140 0 / 13%); --info: #1C67B8; --info-soft: rgb(28 103 184 / 10%);
    --header-bg: rgb(242 241 238 / 72%);
    --shadow-1: 0 1px 2px rgb(40 30 20 / 8%);
    --shadow-2: 0 12px 30px -14px rgb(40 30 20 / 25%);
    --shadow-3: 0 30px 70px -30px rgb(40 30 20 / 35%);
    --glow: 0 0 0 1px rgb(255 122 0 / 40%), 0 12px 36px -14px rgb(255 122 0 / 55%);
    --grid-line: rgb(40 30 20 / 6%);
    --road: #3A3A3A; --road-mark: #F2F1EE;
    --map-bg: #E7E5E0; --map-grid: #D9D6D0; --map-grid-axis: #BDB9B2; --map-label: #6b675f;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F2F1EE; --bg-2: #EBE9E4; --surface: #FFFFFF; --surface-2: #F6F5F2; --surface-3: #ECEAE5;
  --border: rgb(40 30 20 / 10%); --border-strong: rgb(40 30 20 / 18%);
  --text: #1C1B1A; --text-2: #3B3834; --muted: #5E5A54; --faint: #A5A099;
  --accent-ink: #1A1108; --accent-text: #B04D00; --accent-soft: rgb(255 122 0 / 11%); --accent-line: rgb(211 95 0 / 40%);
  --ok: #12804F; --ok-soft: rgb(18 128 79 / 11%); --bad: #C42F2F; --bad-soft: rgb(196 47 47 / 10%);
  --warn: #8F6300; --warn-soft: rgb(200 140 0 / 13%); --info: #1C67B8; --info-soft: rgb(28 103 184 / 10%);
  --header-bg: rgb(242 241 238 / 72%);
  --shadow-1: 0 1px 2px rgb(40 30 20 / 8%);
  --shadow-2: 0 12px 30px -14px rgb(40 30 20 / 25%);
  --shadow-3: 0 30px 70px -30px rgb(40 30 20 / 35%);
  --glow: 0 0 0 1px rgb(255 122 0 / 40%), 0 12px 36px -14px rgb(255 122 0 / 55%);
  --grid-line: rgb(40 30 20 / 6%);
  --road: #3A3A3A; --road-mark: #F2F1EE;
  --map-bg: #E7E5E0; --map-grid: #D9D6D0; --map-grid-axis: #BDB9B2; --map-label: #6b675f;
}

/* ===== 3 Grundlagen ================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img, svg, canvas { display: block; max-width: 100%; }
svg.icon { display: inline-block; }
[hidden] { display: none !important; }

/* Bis die Übersetzung da ist (siehe js/boot.js) – spätestens nach 1,2 s trotzdem zeigen */
html.i18n-wait body { opacity: 0; animation: rp-show 0s linear 1.2s forwards; }
@keyframes rp-show { to { opacity: 1; } }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; color: var(--text); text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1 { font: 400 clamp(32px, 4.6vw, 52px)/1.06 var(--font-display); letter-spacing: -.01em; }
h2 { font: 400 clamp(24px, 3vw, 34px)/1.12 var(--font-display); letter-spacing: -.005em; }
h3 { font-size: 18px; font-weight: 650; }
h4 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong, b { font-weight: 650; }
small, .small { font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
::selection { background: rgb(255 122 0 / 35%); color: var(--text); }

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

code, kbd, pre { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: .08em .4em; color: var(--text); overflow-wrap: anywhere; }
pre {
  margin: 0; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text);
}
kbd {
  display: inline-block; padding: 2px 8px; font: 700 12px/1.4 var(--font-body);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong);
  border-bottom-width: 3px; border-radius: 6px; vertical-align: .05em;
}

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ===== 4 Layout ===================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 820px; }
.container-wide { max-width: 1440px; }
.page { padding-block: clamp(28px, 5vw, 56px) clamp(48px, 8vw, 96px); }
.section { padding-block: clamp(56px, 9vw, 112px); position: relative; }
.stack > * + * { margin-top: var(--stack, 16px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sticky { position: sticky; top: calc(var(--header-h) + 20px); }

/* Seitenkopf */
.page-head { margin-bottom: clamp(24px, 4vw, 40px); }
.page-head .row-between { align-items: flex-end; }
.page-head h1 { margin-bottom: 10px; }
.page-head .lead { margin: 0; max-width: 680px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  color: var(--accent-text); font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
}
.kicker .icon { width: 16px; height: 16px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); line-height: 1.6; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.text-accent { color: var(--accent-text); }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }

/* Hintergrund-Raster wie Kartenpapier, zur Mitte ausgeblendet */
.bg-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
/* Mittelstreifen als Trenner */
.road-divider {
  height: 4px; border: 0; margin: 0;
  background: repeating-linear-gradient(90deg, var(--faint) 0 26px, transparent 26px 50px);
  opacity: .5;
}

/* ===== 5 Kopf- und Fußzeile ============================================================ */
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-1); }
.header-inner {
  height: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; border-radius: 8px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.wordmark { font-family: var(--font-display); color: var(--text); font-size: 19px; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.wordmark small { font-size: .52em; margin-left: .28em; vertical-align: .32em; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
  transition: color .15s, background-color .15s; white-space: nowrap;
}
.nav-link .icon { width: 18px; height: 18px; opacity: .8; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"] .icon { color: var(--accent); opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.account { display: flex; align-items: center; min-width: 40px; justify-content: flex-end; }
.account-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 6px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); font: 600 14px var(--font-body); cursor: pointer; max-width: 240px;
}
.account-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chevron { width: 16px; height: 16px; color: var(--muted); }
.lang-btn .lang-code { font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline-block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.site-header .menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.site-header.menu-open .menu-toggle .icon-close { display: inline-block; }
.site-header.menu-open .menu-toggle .icon-open { display: none; }

@media (max-width: 1060px) {
  .site-header .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-3);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s;
  }
  .site-header.menu-open .main-nav {
    opacity: 1; transform: none; pointer-events: auto; visibility: visible;
    transition: opacity .18s var(--ease), transform .18s var(--ease);
  }
  .nav-link { height: 48px; font-size: 16px; padding: 0 14px; }
}
@media (max-width: 560px) {
  .account-name, .account-chevron { display: none; }
  .account-btn { padding: 0 6px; }
  .lang-btn .lang-code { display: none; }
  .wordmark { font-size: 17px; }
  .header-actions { gap: 2px; }
  .account .btn span { display: none; }
  .account .btn { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 360px) { .wordmark small { display: none; } }

.site-footer {
  margin-top: auto; border-top: 1px solid var(--border); background: var(--bg-2);
  padding-top: clamp(40px, 6vw, 64px); color: var(--muted); font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-bottom: 40px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-tagline { color: var(--text-2); font-weight: 650; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; margin-bottom: 10px; }
.footer-brand p { max-width: 340px; }
.footer-title { font: 700 13px var(--font-body); color: var(--text); letter-spacing: .1em; text-transform: uppercase; margin: 4px 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-soon { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-block: 20px 28px; font-size: 13px;
}
.footer-bottom p { margin: 0; }
.footer-legal { max-width: 680px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== 6 Komponenten =============================================================== */

/* Buttons */
.btn {
  --btn-h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 18px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: 600 15px/1 var(--font-body); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(180deg, #FF8A1F, var(--accent)); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 1px 0 rgb(255 255 255 / 25%) inset, 0 8px 24px -10px rgb(255 122 0 / 70%);
}
.btn-primary:hover { background: linear-gradient(180deg, #FF9A3D, #FF8410); border-color: transparent; box-shadow: var(--glow); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-outline { background: transparent; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: transparent; }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-danger-solid { background: var(--bad); border-color: transparent; color: #fff; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--bad) 88%, #000); border-color: transparent; }
.btn-sm { --btn-h: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn-xs { --btn-h: 28px; padding: 0 10px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-xs .icon { width: 15px; height: 15px; }
.btn-lg { --btn-h: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn-icon { width: var(--btn-h); padding: 0; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Karten */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-l); padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow-1);
}
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font: 650 18px/1.3 var(--font-body); margin: 0 0 4px; }
.card-title .icon { color: var(--accent); width: 20px; height: 20px; }
.card-sub { color: var(--muted); font-size: 14px; margin: 0; }
.card-hover { transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.card-accent { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); }
.card-danger { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.card-flat { box-shadow: none; background: var(--bg-2); }
.icon-chip {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line);
}
.icon-chip .icon { width: 22px; height: 22px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 999px; font: 650 12px/1 var(--font-body); letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent; text-decoration: none;
}
.badge .icon { width: 13px; height: 13px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-neutral { background: var(--surface-3); color: var(--muted); }
.badge-outline { background: transparent; border-color: var(--border-strong); }
.badge-group { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot-bad { background: var(--bad); }
.dot-live { background: var(--ok); animation: rp-ping 2s ease-out infinite; }
@keyframes rp-ping { 0% { box-shadow: 0 0 0 0 rgb(62 207 142 / 55%); } 80%, 100% { box-shadow: 0 0 0 9px rgb(62 207 142 / 0%); } }

/* Status-Pille ("Server online") */
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 12px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; font-variant-numeric: tabular-nums;
}
a.pill:hover { border-color: var(--accent-line); color: var(--text); }
.pill .icon { width: 16px; height: 16px; color: var(--muted); }
.pill.is-offline .dot { background: var(--bad); animation: none; box-shadow: none; }

/* Tabs / Segmente */
.tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2);
  border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 9px;
  border: 0; background: transparent; color: var(--muted); font: 600 14px var(--font-body);
  cursor: pointer; white-space: nowrap; text-decoration: none; flex: none;
}
.tab:hover { color: var(--text); }
.tab.active, .tab[aria-selected="true"], .tab[aria-current="page"] { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-1); }
.tab .icon { width: 16px; height: 16px; }
.tab-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 700;
}
.tab-count.neutral { background: var(--surface-3); color: var(--text-2); }
.tab.active .tab-count.neutral { background: var(--bg-2); }

/* Kennzahlen */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; min-width: 0;
}
.stat b, .stat-value {
  display: block; font: 400 clamp(22px, 2.6vw, 28px)/1.15 var(--font-display); color: var(--text);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.stat span, .stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .icon { color: var(--accent); width: 20px; height: 20px; margin-bottom: 8px; display: block; }

/* Faktenliste */
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 14px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 10px; } }

/* Hinweisboxen */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius);
  background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 35%, transparent); color: var(--text);
}
.notice > .icon { color: var(--info); width: 20px; height: 20px; margin-top: 2px; }
.notice-warn { background: var(--accent-soft); border-color: var(--accent-line); }
.notice-warn > .icon { color: var(--accent-text); }
.notice-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.notice-bad > .icon { color: var(--bad); }
.notice-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.notice-ok > .icon { color: var(--ok); }
.notice p { margin: 0 0 .4em; }
.notice p:last-child { margin: 0; }

/* Meldungen unter Formularen */
.msg { margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.msg[data-tone="ok"], .success { color: var(--ok); }
.msg[data-tone="bad"], .error { color: var(--bad); }

/* Tabellen */
.table-wrap { overflow-x: auto; margin-inline: calc(-1 * clamp(18px, 2.4vw, 26px)); padding-inline: clamp(18px, 2.4vw, 26px); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.table th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; }

/* Avatare */
.avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; }
.avatar-lg { width: 96px; height: 96px; border-radius: 20px; }

/* Leerzustand */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; margin-bottom: 14px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.empty-icon .icon { width: 26px; height: 26px; }
.empty-title { color: var(--text); font-weight: 650; font-size: 17px; margin: 0 0 4px; }
.empty-text { margin: 0 auto 16px; max-width: 420px; font-size: 15px; }

/* Skeleton */
.skeleton {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: rp-shimmer 1.4s ease-in-out infinite;
}
@keyframes rp-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.skeleton-pill { width: 96px; height: 34px; border-radius: 999px; }
.skeleton-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; list-style: none; }
.skeleton-circle { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.skeleton-lines { flex: 1; display: grid; gap: 8px; }
.skeleton-line { height: 10px; }
.skeleton-line.short { width: 55%; }
.skeleton-block { height: 120px; border-radius: var(--radius); }
.skeleton-text { height: 1em; width: 6ch; display: inline-block; vertical-align: middle; }

/* Akkordeon (FAQ) */
.accordion { display: grid; gap: 10px; }
.accordion details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s, background-color .2s;
}
.accordion details[open] { border-color: var(--accent-line); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; font-weight: 650; font-size: 17px; position: relative;
  border-radius: var(--radius);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ''; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg);
  transition: transform .2s var(--ease);
}
.accordion details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.accordion details > div { padding: 0 20px 18px; color: var(--text-2); }

/* Listen mit Auswahl (Moderation, Spieler) */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: block; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background-color .12s;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.list-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }

/* Medaillen (Rangliste) */
.medal {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font: 400 13px var(--font-display); color: #1E1E1E; box-shadow: inset 0 -3px 0 rgb(0 0 0 / 18%);
}
.medal-1 { background: linear-gradient(160deg, #FFE27A, #E0A800); }
.medal-2 { background: linear-gradient(160deg, #F4F4F4, #A9ADB3); }
.medal-3 { background: linear-gradient(160deg, #F0B37E, #B4682E); }

/* ===== 7 Formulare ================================================================== */
.field { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.label, .field > label { font-weight: 600; font-size: 14px; color: var(--text); }
.label .muted, .field > label .muted { font-weight: 400; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.input, .select, .textarea,
input[type="text"], input[type="number"], input[type="search"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px;
  font: 400 15px/1.4 var(--font-body); transition: border-color .15s, box-shadow .15s, background-color .15s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
select { cursor: pointer; padding-right: 32px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
input[aria-invalid="true"] { border-color: var(--bad); }
.input-group { position: relative; }
.input-group > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.input-group > input { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.char-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.char-count.over { color: var(--bad); }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* Checkbox & Schalter */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .switch-text { min-width: 0; }
.switch-row .switch-text strong { display: block; }
.switch-row .switch-text span { color: var(--muted); font-size: 14px; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; cursor: pointer; margin: 2px 0 0;
  width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong);
  transition: background-color .2s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-1); transition: transform .2s var(--ease);
}
.switch:checked { background: var(--accent); border-color: transparent; }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch:disabled { opacity: .45; cursor: not-allowed; }
input[type="range"] { accent-color: var(--accent); }

/* ===== 8 Dialoge, Toasts, Menüs ===================================================== */
.dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-3); overflow: auto;
}
.dialog[open] { animation: rp-pop .22s var(--ease); }
.dialog::backdrop { background: rgb(8 7 6 / 62%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog-sm { width: min(420px, calc(100vw - 24px)); }
.dialog-lg { width: min(720px, calc(100vw - 24px)); }
.dialog-body { padding: clamp(20px, 3vw, 28px); margin: 0; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-title { font: 650 20px/1.3 var(--font-body); margin: 0 0 8px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.dialog-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  background: var(--info-soft); color: var(--info);
}
.dialog-icon.is-danger { background: var(--bad-soft); color: var(--bad); }
.dialog-icon .icon { width: 22px; height: 22px; }
@keyframes rp-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.toast-region {
  position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 10px;
  width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-3);
  font-size: 14px; font-weight: 550; animation: rp-pop .22s var(--ease);
}
.toast > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast > .icon { width: 20px; height: 20px; }
.toast-ok > .icon { color: var(--ok); }
.toast-bad > .icon { color: var(--bad); }
.toast-info > .icon { color: var(--info); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.toast-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.toast-close:hover { color: var(--text); background: var(--surface-2); }

.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-3);
  animation: rp-pop .16s var(--ease);
}
.menu-right { left: auto; right: 0; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px;
  background: none; border: 0; color: var(--text-2); font: 500 15px var(--font-body); text-decoration: none;
  cursor: pointer; text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.menu-item .icon { width: 18px; height: 18px; color: var(--muted); }
.menu-check { margin-left: auto; color: var(--accent) !important; }
.menu-head { display: grid; padding: 8px 10px 10px; gap: 2px; overflow-wrap: anywhere; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ===== 9 Hilfsklassen ============================================================== */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-s { margin-top: 12px; } .mt { margin-top: 20px; } .mt-l { margin-top: 32px; }
.mb-s { margin-bottom: 12px; } .mb { margin-bottom: 20px; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; }
.center { text-align: center; }
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
}

/* ===== 10 Bewegung ================================================================= */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: .08s; }
.js [data-reveal-delay="2"] { transition-delay: .16s; }
.js [data-reveal-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  html.i18n-wait body { animation: none; opacity: 1; }
}
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .stat-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Sehr schmale Handys: Kopfzeile kompakter, damit Konto + Menü sicher passen */
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .brand { gap: 7px; }
  .brand img { width: 28px; height: 28px; }
  .wordmark { font-size: 15px; }
  .header-actions .btn-icon, .header-actions .lang-btn { --btn-h: 36px; }
  .header-actions .lang-btn { width: 36px; padding: 0; }
  .account-btn { height: 36px; }
  .account .btn { --btn-h: 36px; width: 36px; }
}
