/* ============================================================================
   ANTON — MDC Maschen Distribution Center
   Dark Industrial / Premium · eine Familie mit der MDC-Homepage
   ----------------------------------------------------------------------------
   CSP: default-src 'self' — keine Inline-Styles, keine data:-URIs, keine
   externen Ressourcen. Schriften lokal unter /fonts/. JS setzt Werte NUR
   über das CSSOM (style.setProperty) — Startwerte und Übergänge wohnen hier.
   ============================================================================ */

/* ------------------------------------------------------------------ Fonts */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/montserrat-500-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: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/montserrat-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/montserrat-600-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: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/montserrat-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/inter-400-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: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/inter-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/inter-500-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: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/inter-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/inter-600-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: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/inter-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/jetbrains-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/jetbrains-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----------------------------------------------------------------- Tokens */
:root {
  color-scheme: dark;

  /* MDC-Marke (Pantone → sRGB) — identisch zur Homepage */
  --brand-navy:  #0C2340;
  --brand-royal: #0033A0;
  --brand-blue:  #003DA5;
  --brand-cyan:  #0085CA;
  --brand-sky:   #99D6EA;

  /* Flächen (Navy, geschichtet) */
  --color-bg:           #081628;
  --color-bg-deep:      #050f1d;
  --color-surface:      #0e2138;
  --color-surface-2:    #16314f;
  --color-surface-line: #244463;

  /* Text — dim gegenüber der Homepage leicht aufgehellt (App = kleine
     Schriftgrade, WCAG AA ≥ 4,5:1 auf --color-surface) */
  --color-text:       #eef4fb;
  --color-text-muted: #a7bcd6;
  --color-text-dim:   #7f97b5;

  /* Akzent */
  --color-accent:          #0091d8;
  --color-accent-bright:   var(--brand-sky);
  --color-accent-deep:     var(--brand-blue);
  --color-accent-contrast: #06121f;
  --akzent-text:           #4cc2f1;   /* Akzent als KLEINER Text (AA) */
  --accent-glow:  rgba(0, 145, 216, 0.38);
  --accent-faint: rgba(0, 145, 216, 0.12);
  --accent-line:  rgba(0, 145, 216, 0.32);

  /* Semantik */
  --gruen:       #3ecf9c;
  --gruen-hauch: rgba(62, 207, 156, 0.10);
  --gruen-linie: rgba(62, 207, 156, 0.38);
  --warn:        #ffc078;
  --warn-hauch:  rgba(255, 192, 120, 0.10);
  --warn-linie:  rgba(255, 192, 120, 0.36);
  --rot:         #ff8f85;
  --rot-hauch:   rgba(255, 110, 100, 0.11);
  --rot-linie:   rgba(255, 120, 110, 0.42);
  --blau:        var(--brand-sky);

  /* Typografie */
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Radius */
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;
  --radius-pill: 999px;

  /* Tiefe */
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow:        0 18px 50px -22px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 16px 44px -18px var(--accent-glow);

  /* Bewegung */
  --duration-fast:   160ms;
  --duration-normal: 320ms;
  --duration-slow:   620ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Layout */
  --kopf-h: 58px;
  --inhalt-max: 860px;
}

/* ------------------------------------------------------------------ Basis */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

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

/* Dezente dunkle Rollbalken (Desktop) */
* { scrollbar-width: thin; scrollbar-color: var(--color-surface-line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--color-surface-line); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

.verborgen { display: none !important; }
.oben-abstand { margin-top: 0.65rem; }

/* ------------------------------------------------------------- Atmosphäre
   Wie die Homepage: Gitter + zwei Lichtinseln. Reine CSS-Verläufe —
   CSP-sicher (keine data:-URIs), einmal gemalt, keine Laufzeitkosten. */
.hintergrund {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--color-bg);
}
.hg-gitter {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(238, 244, 251, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(238, 244, 251, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 95% 60% at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 95% 60% at 50% 0%, #000 25%, transparent 78%);
}
.hg-schein {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
}
.hg-schein-eins {
  width: 74vw; height: 74vw;
  max-width: 720px; max-height: 720px;
  top: -18vw; right: -16vw;
  background: radial-gradient(circle, rgba(0, 145, 216, 0.22), transparent 62%);
}
.hg-schein-zwei {
  width: 64vw; height: 64vw;
  max-width: 620px; max-height: 620px;
  bottom: -16vw; left: -18vw;
  background: radial-gradient(circle, rgba(0, 61, 165, 0.28), transparent 62%);
}

/* ------------------------------------------------------------------- Kopf */
.kopf {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: var(--kopf-h);
  padding: calc(0.4rem + env(safe-area-inset-top)) 0.95rem 0.4rem;
  background: color-mix(in oklab, var(--color-bg-deep) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-surface-line);
}
.kopf-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.kopf-zeichen { width: 21px; height: 21px; }
.kopf-marke, .marke-block {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-text);
  font-size: 0.98rem;
}
.kopf-gruss {
  flex: 1;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kopf-konto {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-surface-line);
  background: color-mix(in oklab, var(--color-surface) 70%, transparent);
  color: var(--color-text-muted);
  border-radius: 50%;
  transition:
    color var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo);
}
.kopf-konto svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .kopf-konto:hover { color: var(--color-accent-bright); border-color: var(--accent-line); background: var(--accent-faint); }
}

/* ----------------------------------------------------------------- Layout */
main {
  max-width: var(--inhalt-max);
  margin: 0 auto;
  padding: 1rem 0.95rem 2.5rem;
}

/* Ansichts-Eintritt: display none→block startet die Animation neu —
   ein weicher Auftritt pro Ansichtswechsel, nur transform/opacity. */
.ansicht { animation: ansicht-eintritt 0.42s var(--ease-out-expo) both; }
@keyframes ansicht-eintritt {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.ansicht-kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--akzent-text);
  margin: 0.5rem 0 0.35rem;
}
.ansicht-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--accent-faint);
  flex-shrink: 0;
}

.ansicht > h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 5.4vw, 1.95rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.ansicht h2, .karten-titel {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin: 1.7rem 0 0.7rem;
}
.ansicht h2::before, .karten-titel::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--color-accent), var(--brand-sky));
  flex-shrink: 0;
}
.karten-titel { margin-top: 0 !important; }
.ansicht h2:empty { display: none; }   /* z. B. #kal-tag-titel vor JS-Füllung */

.untertitel {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  max-width: 48ch;
  margin: 0 0 1.1rem;
}

/* ----------------------------------------------------------------- Karten */
.karte {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 30%),
    var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.1rem;
  margin: 0 0 0.9rem;
}
fieldset.karte { min-width: 0; padding: 0.85rem 1.1rem 1.1rem; }
fieldset.karte legend {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--akzent-text);
  padding: 0 0.5rem;
  margin-left: -0.25rem;
}

/* ----------------------------------------------------------------- Felder */
label {
  display: block;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin: 0.65rem 0 0.3rem;
}
input, select, textarea {
  width: 100%;
  min-width: 0;                /* darf in Grid-/Flex-Spalten schrumpfen */
  min-height: 48px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  transition:
    border-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo);
}
textarea { min-height: 0; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--color-text-dim); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--accent-faint), 0 8px 24px -16px var(--accent-glow);
  background: var(--color-bg);
}
input:user-invalid { border-color: var(--rot-linie); }

/* Zahlen sind Messwerte: Mono, tabellarisch — wie an der Waage. */
input[type="number"] {
  font-family: var(--font-mono);
  font-size: 1rem;               /* nie unter 16px: iOS zoomt sonst beim Fokus */
  letter-spacing: 0.01em;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="date"], input[type="time"] { font-family: var(--font-mono); font-size: 1rem; }

/* Select mit CSS-Chevron (Verlauf-Trick — CSP-sicher, kein Bild) */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image:
    linear-gradient(45deg, transparent 49%, var(--color-text-muted) 51%),
    linear-gradient(135deg, var(--color-text-muted) 49%, transparent 51%);
  background-position:
    calc(100% - 21px) calc(50% - 2px),
    calc(100% - 15px) calc(50% - 2px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
select option { background: var(--color-bg-deep); color: var(--color-text); }

.feld-gitter { display: grid; gap: 0.6rem; }
.feld-gitter > div { min-width: 0; }
.feld-gitter.zwei { grid-template-columns: 1fr 1fr; }
.feld-gitter.drei { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 355px) { .feld-gitter { gap: 0.45rem; } }

.feld-hilfe { color: var(--color-text-dim); font-size: 0.79rem; margin: 0.45rem 0 0; }
.feld-zwischentitel {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-dim);
  margin: 1rem 0 0.1rem;
}

/* Produkt-Modus: Basis = getönte Radios; moderne Browser bekommen
   einen segmentierten Schalter (progressive Verbesserung). */
.radio-zeile { display: flex; gap: 1rem; margin-bottom: 0.7rem; }
.radio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.radio input { width: auto; min-height: 0; accent-color: var(--color-accent); }

@supports selector(:has(*)) {
  .radio-zeile {
    background: var(--color-bg-deep);
    border: 1px solid var(--color-surface-line);
    border-radius: var(--radius-pill);
    padding: 4px;
    gap: 4px;
  }
  .radio {
    flex: 1;
    min-height: 44px;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition:
      color var(--duration-fast) var(--ease-out-expo),
      background-color var(--duration-fast) var(--ease-out-expo),
      box-shadow var(--duration-fast) var(--ease-out-expo);
  }
  .radio input { position: absolute; opacity: 0; pointer-events: none; }
  .radio:has(input:checked) {
    background: var(--color-surface-2);
    color: var(--color-text);
    box-shadow: inset 0 0 0 1px var(--accent-line), var(--shadow-sm);
  }
  .radio:has(input:focus-visible) {
    outline: 2px solid var(--color-accent-bright);
    outline-offset: 2px;
  }
}

/* ---------------------------------------------------------------- Knöpfe */
.knopf, #nochmal-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.65rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--color-accent-contrast);
  background: linear-gradient(135deg, #33b1ea, var(--color-accent));
  box-shadow: var(--shadow-accent);
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo),
    color var(--duration-fast) var(--ease-out-expo);
}
@media (hover: hover) {
  .knopf:hover { transform: translateY(-2px); box-shadow: 0 20px 48px -16px var(--accent-glow); }
}
.knopf:active { transform: translateY(0) scale(0.99); }
.knopf:focus-visible { outline: 2px solid var(--color-accent-bright); outline-offset: 3px; }
.knopf[disabled] { opacity: 0.55; cursor: default; transform: none; }

.knopf-voll { width: 100%; min-height: 52px; font-size: 1rem; }

.knopf-leise, #nochmal-knopf {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-surface-line);
  box-shadow: none;
  font-weight: 500;
}
@media (hover: hover) {
  .knopf-leise:hover, #nochmal-knopf:hover {
    border-color: var(--accent-line);
    background: var(--accent-faint);
    color: var(--color-accent-bright);
    transform: translateY(-2px);
  }
}
.knopf-klein {
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
}
.knopf-zeile { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.knopf-zeile .knopf { flex: 1; }
.werkzeug-zeile { display: flex; gap: 0.6rem; margin-bottom: 0.9rem; }
.werkzeug-zeile input { flex: 1; }
.werkzeug-zeile .knopf { flex-shrink: 0; }

/* ------------------------------------------------- Statistik-Leiste (HUD)
   Dezenter Spielstand über dem Formular: Mono-Werte, ruhige Chips.
   Leer → unsichtbar, kein Springen beim Laden. */
#statistik-leiste {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.3rem 0 0.55rem;
  margin: 0.2rem 0 0.1rem;
  scrollbar-width: none;
}
#statistik-leiste::-webkit-scrollbar { display: none; }
#statistik-leiste:empty { display: none; }

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
  min-width: 76px;
  padding: 0.5rem 0.85rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%),
    var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.stat-wert {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-accent-bright);
  font-variant-numeric: tabular-nums;
}
.stat-name {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--color-text-dim);
}

/* ----------------------------------------------------------------- Listen */
.liste { display: flex; flex-direction: column; gap: 0.6rem; }
.zeile {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  transition:
    border-color var(--duration-normal) var(--ease-out-expo),
    transform var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo);
}
@media (hover: hover) {
  .zeile:hover { border-color: var(--accent-line); }
}
.zeile-mitte { flex: 1; min-width: 0; }
.zeile-titel { font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.zeile-meta {
  color: var(--color-text-dim);
  font-size: 0.79rem;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}
.zeile-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.zeile-aktionen { display: flex; flex-direction: column; gap: 0.35rem; flex-shrink: 0; }

.zeile.ueberfaellig {
  border-color: var(--rot-linie);
  background:
    linear-gradient(90deg, var(--rot-hauch), transparent 45%),
    var(--color-surface);
  box-shadow: inset 3px 0 0 0 var(--rot);
}
.zeile.erledigt-zeile { opacity: 0.55; }
.zeile.erledigt-zeile .zeile-titel {
  text-decoration: line-through;
  text-decoration-color: rgba(167, 188, 214, 0.6);
  color: var(--color-text-muted);
}

/* Leerzustände: ruhig, mit Charme aus dem Text */
.leer-hinweis {
  color: var(--color-text-dim);
  font-size: 0.88rem;
  text-align: center;
  padding: 1.35rem 1rem;
  border: 1px dashed var(--color-surface-line);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------- Abzeichen */
.abzeichen {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.6rem;
  vertical-align: middle;
}
.abzeichen-warn  { background: var(--warn-hauch);  color: var(--warn);  border-color: var(--warn-linie); }
.abzeichen-rot   { background: var(--rot-hauch);   color: var(--rot);   border-color: var(--rot-linie); }
.abzeichen-gruen { background: var(--gruen-hauch); color: var(--gruen); border-color: var(--gruen-linie); }
.abzeichen-blau  { background: var(--accent-faint); color: var(--blau); border-color: var(--accent-line); }

/* ------------------------------------------------- Meldungen & Hinweise */
.fehlertext {
  background: var(--rot-hauch);
  border: 1px solid var(--rot-linie);
  color: var(--rot);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
  animation: karte-pop 0.35s var(--ease-out-expo) both;
}
/* Passwort-Erfolg: JS entfernt .fehlertext → grüne Bestätigung */
#passwort-meldung:not(.fehlertext) {
  background: var(--gruen-hauch);
  border: 1px solid var(--gruen-linie);
  color: var(--gruen);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
}
.hinweis-block {
  background: var(--warn-hauch);
  border: 1px solid var(--warn-linie);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.6rem;
  font-size: 0.88rem;
}
.hinweis-block strong { color: var(--warn); font-weight: 600; }
.hinweis-block p { margin: 0.2rem 0 0; color: var(--color-text-muted); }

/* Erfolgskarte nach dem Speichern */
.erfolg-karte {
  border-color: var(--gruen-linie);
  background:
    radial-gradient(120% 90% at 0% 0%, var(--gruen-hauch), transparent 55%),
    var(--color-surface);
  animation: karte-pop 0.45s var(--ease-out-back) both;
}
.erfolg-titel {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gruen);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
@keyframes karte-pop {
  from { opacity: 0; transform: scale(0.965) translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* „Weiter mit …"-Vorschlag + „Nochmal"-Knopf im Erfolgsbereich */
.weiter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  margin: 0.8rem 0.5rem 0 0;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  background: var(--accent-faint);
  color: var(--color-accent-bright);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo);
}
@media (hover: hover) {
  .weiter-chip:hover {
    background: rgba(0, 145, 216, 0.22);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
  }
}
.weiter-chip:active { transform: translateY(0); }
#nochmal-knopf { margin-top: 0.8rem; }

/* ------------------------------------------------------------ Fortschritt */
.fortschritt-karte {
  background:
    radial-gradient(130% 100% at 0% 0%, var(--accent-faint), transparent 55%),
    var(--color-surface);
}
.fortschritt-zahlen {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.fortschritt-balken {
  position: relative;
  height: 14px;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-pill);
  margin-top: 0.6rem;
}
#produkte-balken {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 0;                                   /* Startwert — JS setzt via CSSOM */
  background: linear-gradient(90deg, var(--color-accent-deep), var(--color-accent) 55%, #35b5ef);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: width 0.7s var(--ease-out-expo);
}
/* Sanfter Schimmer über dem gefüllten Teil (nur transform/opacity) */
#produkte-balken::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.3) 50%, transparent 68%);
  transform: translateX(-100%);
  animation: balken-schimmer 3s var(--ease-out-expo) infinite;
}
@keyframes balken-schimmer {
  0%        { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
/* Meilenstein-Kerben: Eich-Striche auf der Messlatte (left via CSSOM) */
.stufen-marke {
  position: absolute;
  z-index: 2;
  top: -4px;
  bottom: -4px;
  width: 2px;
  border-radius: 2px;
  background: rgba(153, 214, 234, 0.55);
  transform: translateX(-50%);
  pointer-events: none;
}

/* Produktliste */
.produkt-zeile { cursor: pointer; align-items: center; }
@media (hover: hover) {
  .produkt-zeile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
}
.produkt-zeile:active { transform: scale(0.995); }
.produkt-haken {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 0.85rem;
}
.produkt-haken.gut {
  color: var(--gruen);
  background: var(--gruen-hauch);
  border: 1px solid var(--gruen-linie);
  animation: haken-pop 0.35s var(--ease-out-back);
}
.produkt-haken.offen {
  color: var(--color-text-dim);
  border: 1px dashed var(--color-surface-line);
}
@keyframes haken-pop {
  0%   { transform: scale(0.5); }
  70%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ----------------------------------------------------------------- To-dos */
.todo-haken {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: transparent;
  font-size: 0.85rem;
  border-radius: 50%;
}
.todo-haken::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid var(--color-surface-line);
  transition:
    border-color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo);
}
@media (hover: hover) {
  .todo-haken:hover::before { border-color: var(--color-accent-bright); }
}
.todo-haken.fertig {
  color: var(--gruen);
  animation: haken-pop 0.35s var(--ease-out-back);
}
.todo-haken.fertig::before {
  border-color: var(--gruen-linie);
  background: var(--gruen-hauch);
}
.einklappbar { cursor: pointer; user-select: none; color: var(--color-text-muted); }
@media (hover: hover) { .einklappbar:hover { color: var(--color-text); } }
#todos-erledigt-pfeil { color: var(--color-text-dim); font-size: 0.85em; }

/* --------------------------------------------------------------- Kalender */
.kalender-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
#kal-titel {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.kalender-kopf .knopf {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}
.kalender-wochentage, .kalender-gitter {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.kalender-wochentage span {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  text-transform: uppercase;
  padding: 0.25rem 0 0.35rem;
}
.kal-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
  min-height: 50px;
  padding: 0.28rem 0.34rem;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  transition:
    border-color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo);
}
@media (hover: hover) {
  .kal-tag:not(:disabled):hover { border-color: var(--accent-line); }
}
.kal-tag.fremdmonat { opacity: 0.22; cursor: default; }
.kal-tag.heute { border-color: var(--color-accent-bright); color: var(--color-accent-bright); }
.kal-tag.gewaehlt {
  background: var(--accent-faint);
  border-color: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 6px 18px -8px var(--accent-glow);
}
.kal-punkte { display: flex; gap: 3px; flex-wrap: wrap; }
.kal-punkt { width: 6px; height: 6px; border-radius: 50%; }
.kal-punkt.termin  { background: var(--blau); box-shadow: 0 0 6px rgba(153, 214, 234, 0.55); }
.kal-punkt.aufgabe { background: var(--warn); box-shadow: 0 0 6px rgba(255, 192, 120, 0.45); }
.kal-legende {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 0.65rem;
}
.legende-punkt { font-size: 0.8em; vertical-align: 0.08em; }
.legende-termin  { color: var(--blau); }
.legende-aufgabe { color: var(--warn); }

/* ------------------------------------------------------------- Auswertung */
.kpi-reihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.kpi-reihe:empty { display: none; }
.kpi {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 1rem 0.9rem;
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--brand-sky));
}
.kpi.gut::before  { background: linear-gradient(90deg, var(--gruen), rgba(62, 207, 156, 0.35)); }
.kpi.warn::before { background: linear-gradient(90deg, var(--rot), var(--warn)); }
.kpi-wert {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-name {
  font-family: var(--font-mono);
  color: var(--color-text-dim);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  margin-top: 0.2rem;
}
.kpi-zusatz { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 0.3rem; }
.kpi.gut .kpi-zusatz  { color: var(--gruen); }
.kpi.warn .kpi-zusatz { color: var(--rot); }

.balken-liste { display: flex; flex-direction: column; gap: 0.55rem; }
.balken-zeile {
  display: grid;
  grid-template-columns: minmax(92px, 132px) 1fr 2.8rem;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.82rem;
}
.balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-muted); }
.balken-schiene {
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-pill);
  height: 10px;
  overflow: hidden;
}
.balken-wert {
  height: 100%;
  width: 0;                                   /* Startwert — JS setzt via CSSOM */
  background: linear-gradient(90deg, var(--color-accent), var(--brand-sky));
  border-radius: var(--radius-pill);
  transition: width 0.7s var(--ease-out-expo);
}
.balken-zahl {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
}

.chip-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.chip {
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
}

/* --------------------------------------------------------------- Anmelden */
.anmelden-schicht {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(60vw 60vw at 88% -8%, rgba(0, 145, 216, 0.24), transparent 62%),
    radial-gradient(52vw 52vw at -10% 106%, rgba(0, 61, 165, 0.3), transparent 62%),
    linear-gradient(to right,  rgba(238, 244, 251, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(238, 244, 251, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, var(--color-bg), var(--color-bg-deep));
  background-size: auto, auto, 56px 56px, 56px 56px, auto;
}
.anmelden-karte {
  width: 100%;
  max-width: 370px;
  background:
    linear-gradient(165deg, var(--color-surface-2), var(--color-surface) 62%);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.9rem 1.5rem 1.5rem;
  animation: anmelden-auftritt var(--duration-slow) var(--ease-out-expo) both;
}
@keyframes anmelden-auftritt {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.marke { text-align: center; margin-bottom: 1.3rem; }
.marke-zeichen { width: 46px; height: 46px; margin: 0 auto 0.8rem; }
.marke-block { font-size: 1.55rem; display: block; letter-spacing: 0.24em; padding-left: 0.24em; }
.marke-unter {
  display: block;
  font-family: var(--font-mono);
  color: var(--color-text-dim);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  margin-top: 0.45rem;
}
.anmelden-karte .knopf { margin-top: 1.1rem; }
.anmelden-karte .fehlertext { margin-top: 0.8rem; }

/* ------------------------------------------------- Fußleiste (Schwebedock) */
.fussleiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(0.65rem + env(safe-area-inset-bottom));
  z-index: 35;
  width: min(560px, calc(100% - 1.3rem));
  margin-inline: auto;
  display: flex;
  gap: 2px;
  padding: 5px;
  background: color-mix(in oklab, var(--color-bg-deep) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}
.fuss-knopf {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--color-text-dim);
  padding: 0.5rem 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  transition:
    color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo);
}
.fuss-knopf span:last-child {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fuss-zeichen { display: grid; place-items: center; line-height: 1; }
.fuss-zeichen svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) {
  .fuss-knopf:hover { color: var(--color-text-muted); }
}
.fuss-knopf.aktiv {
  color: var(--color-accent-bright);
  background: var(--accent-faint);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  font-weight: 600;
}
.fuss-knopf.aktiv .fuss-zeichen svg { filter: drop-shadow(0 0 7px var(--accent-glow)); }
@media (max-width: 379px) {
  .fuss-knopf span:last-child { font-size: 0.56rem; letter-spacing: 0; }
}

/* ------------------------------------------------ Feier-Schicht (Meilenstein) */
#feier-schicht,
.feier-schicht {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
  background: rgba(5, 15, 29, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: feier-blende 0.3s ease-out both;
}
@keyframes feier-blende { from { opacity: 0; } to { opacity: 1; } }
.feier-karte {
  position: relative;
  z-index: 2;
  width: min(340px, 92vw);
  text-align: center;
  background: linear-gradient(165deg, var(--color-surface-2), var(--color-surface) 70%);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 2rem 1.6rem 1.6rem;
  animation: feier-auftritt 0.5s var(--ease-out-back) both;
}
@keyframes feier-auftritt {
  from { opacity: 0; transform: scale(0.85) translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.feier-zahl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 20vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--brand-sky), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.35rem;
}
.feier-titel {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.feier-text { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 1.4rem; }
.feier-karte .knopf { width: 100%; }

/* Flitter: 12 Stück, vom Entwickler ins DOM gelegt. Nur transform/opacity,
   Vielfalt über nth-child-Zyklen (robust, egal wo die Karte im DOM steht). */
.feier-flitter {
  position: absolute;
  z-index: 1;
  top: -24px;
  left: 50%;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  animation: feier-fall var(--dauer, 3.2s) linear var(--warten, 0s) infinite;
}
@keyframes feier-fall {
  0%   { transform: translate3d(0, -4vh, 0) rotate(0deg); opacity: 0; }
  6%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate3d(var(--sway, 0rem), 106vh, 0) rotate(var(--dreh, 540deg)); opacity: 0; }
}
.feier-flitter:nth-child(odd)  { width: 8px; height: 8px; border-radius: 50%; --sway: 2.4rem; --dreh: 520deg; }
.feier-flitter:nth-child(even) { --sway: -2.6rem; --dreh: -460deg; }
.feier-flitter:nth-child(4n+1) { background: #35b5ef; }
.feier-flitter:nth-child(4n+2) { background: var(--brand-sky); }
.feier-flitter:nth-child(4n+3) { background: var(--color-text); }
.feier-flitter:nth-child(4n)   { background: var(--gruen); }
.feier-flitter:nth-child(3n+1) { --dauer: 3.4s; }
.feier-flitter:nth-child(3n+2) { --dauer: 2.8s; }
.feier-flitter:nth-child(3n)   { --dauer: 3.9s; }
.feier-flitter:nth-child(5n+1) { --warten: 0s; }
.feier-flitter:nth-child(5n+2) { --warten: 0.5s; }
.feier-flitter:nth-child(5n+3) { --warten: 0.95s; }
.feier-flitter:nth-child(5n+4) { --warten: 0.25s; }
.feier-flitter:nth-child(5n)   { --warten: 0.7s; }
.feier-flitter:nth-child(12n+1)  { left: 5%; }
.feier-flitter:nth-child(12n+2)  { left: 13%; }
.feier-flitter:nth-child(12n+3)  { left: 22%; }
.feier-flitter:nth-child(12n+4)  { left: 30%; }
.feier-flitter:nth-child(12n+5)  { left: 39%; }
.feier-flitter:nth-child(12n+6)  { left: 48%; }
.feier-flitter:nth-child(12n+7)  { left: 56%; }
.feier-flitter:nth-child(12n+8)  { left: 65%; }
.feier-flitter:nth-child(12n+9)  { left: 73%; }
.feier-flitter:nth-child(12n+10) { left: 82%; }
.feier-flitter:nth-child(12n+11) { left: 90%; }
.feier-flitter:nth-child(12n)    { left: 96%; }

/* ------------------------------------------------------------------ Konto */
#abmelden-knopf { width: 100%; }
@media (hover: hover) {
  #abmelden-knopf:hover {
    border-color: var(--rot-linie);
    background: var(--rot-hauch);
    color: var(--rot);
  }
}

/* ---------------------------------------------------- Desktop (ab 700 px) */
@media (min-width: 700px) {
  body { padding-bottom: 3rem; }
  main { padding-top: calc(var(--kopf-h) + 4.6rem); }

  .kopf { padding-inline: 1.4rem; }

  /* Navigation dockt oben unter dem Kopf an (DOM-Reihenfolge egal: fixed) */
  .fussleiste {
    position: fixed;
    top: calc(var(--kopf-h) + 0.75rem);
    bottom: auto;
    width: min(var(--inhalt-max), calc(100% - 2rem));
  }
  .fuss-knopf {
    flex-direction: row;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.4rem;
  }
  .fuss-knopf span:last-child { font-size: 0.8rem; }
  .fuss-zeichen svg { width: 18px; height: 18px; }

  .karte { padding: 1.35rem 1.5rem; }
  fieldset.karte { padding: 1.1rem 1.5rem 1.5rem; }
  .balken-zeile { grid-template-columns: 150px 1fr 2.8rem; }
  .kal-tag { min-height: 58px; }
  .zeile { padding: 0.85rem 1.05rem; }
  .zeile-aktionen { flex-direction: row; align-items: center; }
}

/* --------------------------------------------------------- Reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .feier-flitter { display: none; }
  .fuss-knopf.aktiv .fuss-zeichen svg { filter: none; }
}

/* ================================================== Nachtrag 08.08.2026
   Fotos + endloser Spielstand (gleiches Token-System wie oben). */

/* Aufgaben-Chip ist ein BUTTON (antippbar) - Reset + Warnton */
button.stat-chip {
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo);
}
button.stat-chip:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}
.stat-chip-warn {
  border-color: var(--rot-linie);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%),
    var(--rot-hauch);
}
.stat-chip-warn .stat-wert { color: var(--rot); }

/* Foto-Aufnahme im Formular */
#foto-knopf { width: 100%; }
.foto-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.foto-thumbs:empty { margin-top: 0; }
.foto-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-surface-line);
  box-shadow: var(--shadow-sm);
}
.foto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.foto-thumb-neu { border-color: var(--accent-line); }
.foto-weg {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(5, 15, 29, 0.78);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.foto-weg:hover { background: var(--rot); color: #fff; }

/* Foto-Streifen an Eintrags-Zeilen */
.foto-streifen {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.foto-streifen img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-surface-line);
  cursor: zoom-in;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}
.foto-streifen img:hover { transform: scale(1.06); }

/* Foto-Grossansicht (Lightbox) */
.foto-schicht {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 15, 29, 0.92);
  display: grid;
  place-items: center;
  gap: 0.9rem;
  padding: 1rem;
  grid-template-rows: 1fr auto;
}
.foto-schicht img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  align-self: end;
}
.foto-zu { align-self: start; }
