/* SalesMap – Oberfläche
   ---------------------------------------------------------------------------
   Der Arbeitsbereich ist EINSPALTIG. In 3088_ics, von dem die Bedienung stammt,
   sind es zwei Spalten (Haushalte links, Detail rechts); hier liegt unter der
   Nadel direkt der Ausgang, es gibt also nichts auszuwählen. Nur die Verpackung
   wechselt mit der Geräteausrichtung:

   • Querformat (>= 900px): ein schmales Panel am rechten Kartenrand, die Karte
                            läuft daneben durch.
   • Hochformat (< 900px):  dasselbe Panel als Bottom-Sheet mit Griff
                            (halb / ganz / zu).

   Gestaltungsprinzip: ruhige Flächen, Haarlinien statt Rahmen, Bedeutung über
   Icon-Chips statt über Farbflächen. Jede Kachel trägt ein Icon im abgerundeten
   Quadrat – im Ruhezustand grau, aktiv in der Farbe der Sache. Primäre
   Touchziele bleiben bei mindestens 44px.

   Die eine Farbregel, die überall gilt: die sieben Ausgangsfarben sind dieselben
   wie in 3060_d2d und 3088_ics, und sie stehen im Skript (OUTCOME_TYPES), nicht
   hier. Das CSS bekommt sie je Element als --c gereicht.
*/

:root {
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #8a97ab;
  --line: #e4e9f0;
  --line-soft: #f1f4f8;
  --bg: #f2f4f8;
  --card: #ffffff;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, .09);

  /* Kopfzeile / Seitenleiste: ein tiefes Nachtblau statt Schwarz */
  --nav-bg: #0b1222;
  --nav-bg-2: #111a2e;
  --nav-ink: #e8eef7;
  --nav-muted: #8494ab;

  --topbar-h: 50px;
  --side-w: 232px;                 /* Seitenleiste ab 1024px (Rechner, iPad quer) */
  --r-tile: 14px;
  --r-field: 11px;
  --r-big: 20px;
  --shadow-tile: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
  --shadow-float: 0 10px 30px -6px rgba(15, 23, 42, .22), 0 3px 8px rgba(15, 23, 42, .08);
  --shadow-pop: 0 24px 60px -12px rgba(15, 23, 42, .35), 0 6px 16px rgba(15, 23, 42, .10);
  --ring: 0 0 0 3px rgba(37, 99, 235, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --glass: rgba(255, 255, 255, .86);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  overflow: hidden;             /* kein Seiten-Scroll – nur Panels scrollen */
  overscroll-behavior: none;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { display: flex; flex-direction: column; }

button, input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }

/* Tastatur-Fokus sichtbar und einheitlich – Maus und Finger zeigen ihn nicht. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus:not(:focus-visible) { outline: none; }

/* Dünne, ruhige Rollbalken am Rechner statt der grauen Systembalken. */
@media (hover: hover) and (pointer: fine) {
  * { scrollbar-width: thin; scrollbar-color: #c9d2de transparent; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: #cfd7e2; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background-color: #b5c0cf; }
  ::-webkit-scrollbar-track { background: transparent; }
}

/* Ein `hidden`-Attribut muss stärker sein als jede display-Regel einer Klasse.
   Der Browser bringt dafür nur `[hidden] { display: none }` mit – und das
   verliert gegen jedes `.klasse { display: flex }`. Einmal zentral geklärt. */
[hidden] { display: none !important; }

/* ====================================================================   Kopfzeile
   =========================================================================== */

.topbar {
  flex: 0 0 auto;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--nav-bg-2), var(--nav-bg));
  color: var(--nav-ink);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06);
  z-index: 30;
}

.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 750; letter-spacing: .12em; font-size: 12.5px;
  color: #f1f5fb; flex: 0 0 auto;
}

/* Symbol + Schriftzug: ein Tipp dreht die Karte nach Norden. Als Knopf, aber
   ohne Knopf-Aussehen; das Symbol steht als kleines App-Zeichen im Farbquadrat. */
.brand-marke {
  display: inline-flex; align-items: center; gap: 9px;
  margin: -5px; padding: 5px;
  background: none; border: 0; border-radius: 10px;
  color: inherit; font: inherit; letter-spacing: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.brand-marke svg {
  width: 28px; height: 28px; padding: 5px; border-radius: 9px; flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(140deg, #38bdf8 0%, #2563eb 55%, #4f46e5 100%);
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-marke:active { background: rgba(255, 255, 255, .08); }
@media (hover: hover) { .brand-marke:hover { background: rgba(255, 255, 255, .06); } }

/* Das angemeldete Konto – als Schild neben der Marke. Auf einer GEMEINSAMEN
   Karte ist das keine Zierde: die eigenen Nadeln und die der anderen
   unterscheiden sich nur in der Deckkraft, und eine Nadel im falschen Namen
   fällt sonst erst Wochen später auf. Der Punkt davor trägt die Kontofarbe,
   dieselbe, die am Ring der eigenen Nadeln bei den anderen steht. */
.brand-konto {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 9px 3px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  color: #cfdbea; font-weight: 600; font-size: 11px; letter-spacing: .02em;
  text-transform: lowercase;
}
.brand-konto::before {
  content: ''; flex: 0 0 auto;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c, #38bdf8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .14);
}

.tabs { display: flex; gap: 2px; }
.tab {
  appearance: none; border: 0; background: transparent; position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--nav-muted); font-size: 13px; font-weight: 600; letter-spacing: -.005em;
  padding: 7px 12px; border-radius: 10px; cursor: pointer; min-height: 34px;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.tab-ic { flex: 0 0 auto; width: 17px; height: 17px; opacity: .9; transition: color .15s; }
@media (hover: hover) { .tab:not(.active):hover { color: #e2e8f0; background: rgba(255, 255, 255, .06); } }
.tab.active {
  background: #f8fafc; color: #0b1222;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .35);
}
.tab.active .tab-ic { color: var(--accent); opacity: 1; }

/* Dringlichkeits-Zähler am Followup-Tab. Sitzt wie eine Benachrichtigung oben
   rechts an der Beschriftung; die Farbe kommt aus dem Skript (--fu-badge) und
   sagt, wie nah der nächste Termin ist. */
.tab-badge {
  position: absolute; top: -1px; right: 1px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--fu-badge, #dc2626); color: var(--fu-badge-ink, #fff);
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums;
  --fu-ring: #0b1220;                    /* Rand in Kopfzeilenfarbe, damit er absetzt */
  box-shadow: 0 0 0 2px var(--fu-ring);
}
.tab.active .tab-badge { --fu-ring: #f8fafc; }
/* Platz für den Zähler, damit er nicht auf der Beschriftung sitzt – aber nur,
   solange er wirklich da ist. */
.tab:has(.tab-badge:not([hidden])) { padding-right: 26px; }

/* Fünf Minuten vor dem Termin (oder überfällig) schlägt der Zähler Alarm: zwei
   kurze Schläge, dann Ruhe. Ein Herzschlag fällt im Augenwinkel stärker auf als
   ein gleichmäßiges Pulsieren und nutzt sich langsamer ab. */
.tab-badge--alarm { animation: fu-alarm 1.4s ease-in-out infinite; }
@keyframes fu-alarm {
  0%   { transform: scale(1);    box-shadow: 0 0 0 2px var(--fu-ring), 0 0 0 0 rgba(220, 38, 38, 0); }
  11%  { transform: scale(1.35); box-shadow: 0 0 0 2px var(--fu-ring), 0 0 16px 6px rgba(220, 38, 38, .95); }
  22%  { transform: scale(1.06); box-shadow: 0 0 0 2px var(--fu-ring), 0 0 9px 3px rgba(220, 38, 38, .5); }
  33%  { transform: scale(1.32); box-shadow: 0 0 0 2px var(--fu-ring), 0 0 16px 6px rgba(220, 38, 38, .95); }
  52%  { transform: scale(1);    box-shadow: 0 0 0 2px var(--fu-ring), 0 0 7px 2px rgba(220, 38, 38, .4); }
  100% { transform: scale(1);    box-shadow: 0 0 0 2px var(--fu-ring), 0 0 0 0 rgba(220, 38, 38, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tab-badge--alarm { animation: none; box-shadow: 0 0 0 2px var(--fu-ring), 0 0 12px 3px rgba(220, 38, 38, .85); }
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.stat-chip { font-size: 12px; color: var(--nav-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-chip b { color: #f1f5fb; font-weight: 700; }
/* Ein Abschluss darf leuchten – in der Farbe seines Ausgangs, aufgehellt für
   den dunklen Grund. Null bleibt weiß: grün heißt „es gibt einen". */
.stat-chip b.sc-abschl.an { color: #4ade80; }
/* „+1": die unbestätigten, gelb wie ihre Nadel, dicht an der grünen Zahl. */
.stat-chip b.sc-unbest { color: #facc15; margin-left: 1px; }

/* Der Live-Punkt: steht die Leitung zu den anderen Konten? Ohne sie sieht die
   Karte genauso aus, nur altert sie still – das hier ist die einzige Stelle,
   an der ein Abriss auffällt. */
.live {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  font-size: 11.5px; font-weight: 600; color: #7d8da3;
  font-variant-numeric: tabular-nums;
}
.live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #64748b; flex: 0 0 auto;
  transition: background .2s, box-shadow .2s;
}
.live.on { color: #bbf7d0; }
.live.on i { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: live-puls 2.4s ease-out infinite; }
@keyframes live-puls {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) { .live.on i { animation: none; } }

/* Änderungen aus dem Funkloch, die noch hochgeladen werden müssen. Bernstein:
   nichts ist verloren, aber es ist auch noch nicht bei den anderen. */
.wartet {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(245, 158, 11, .18); color: #fcd34d;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wartet[hidden] { display: none; }

/* ---- Handy und iPad hochkant: zwei Zeilen ---------------------------------
   Neun Tabs plus Marke, Live-Punkt und Tageszahl passen nicht in eine Zeile.
   Gelöst ohne Änderung am HTML: die Leiste darf umbrechen, die Tabs bekommen
   die volle Breite der zweiten Zeile und scrollen darin waagerecht. Weil sie
   zusammen breiter sind als der Bildschirm, steht an einer Kante stets ein
   angeschnittener Tab – das ist der Hinweis, dass es weitergeht. Dazu scrollt
   main.js den aktiven Tab in die Mitte.

   Ab 1024px (Rechner, iPad quer) werden dieselben Tabs zur Seitenleiste, siehe
   unten – dort ist Platz in der Höhe, nicht in der Breite. */
@media (max-width: 1023.98px) {
  .topbar {
    height: auto;
    min-height: calc(var(--topbar-h) + var(--safe-top));
    flex-wrap: wrap;
    gap: 0 10px;
    padding: var(--safe-top) 12px 0;
  }
  .brand { padding: 9px 0 3px; }
  .topbar-right { padding-top: 6px; }
  .tabs {
    order: 2;
    flex: 0 0 100%;
    /* Bis an beide Bildschirmkanten, damit der angeschnittene Tab nicht in
       einem Innenabstand endet und wie ein Fehler aussieht. */
    margin: 2px -12px 0;
    width: calc(100% + 24px);
    /* Der Innenabstand oben/unten hält Platz für den Followup-Zähler und seinen
       Alarmring: overflow-x macht auch die Y-Achse beschneidend. */
    padding: 6px 12px 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 12px;
    /* Weich auslaufende Kanten statt hart abgeschnittener Tabs */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 0 0 auto;
    min-height: 38px;                      /* Daumenziel */
    padding: 8px 13px 8px 11px;
    font-size: 13.5px;
    background: rgba(255, 255, 255, .05);
  }
  .tab-badge { top: 2px; right: 3px; }
}

/* ---- Rechner und iPad quer: Seitenleiste ------------------------------------
   Marke oben, die Tabs untereinander mit Symbol, Live-Punkt und Tagesstand
   unten. Die Karte bekommt die ganze Höhe. */
@media (min-width: 1024px) {
  body { flex-direction: row; }
  .topbar {
    flex: 0 0 var(--side-w); width: var(--side-w);
    height: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: calc(var(--safe-top) + 18px) 12px 14px;
    background:
      radial-gradient(120% 40% at 0% 0%, rgba(56, 189, 248, .10), transparent 60%),
      linear-gradient(180deg, var(--nav-bg-2), var(--nav-bg) 45%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: none;
  }
  .topbar::-webkit-scrollbar { display: none; }
  .brand { flex-wrap: wrap; padding: 0 8px 20px; row-gap: 12px; }
  .brand-marke { font-size: 13.5px; }
  .brand-konto { max-width: 100%; }
  .tabs { flex-direction: column; gap: 2px; }
  .tab {
    justify-content: flex-start; gap: 12px;
    padding: 9px 12px; min-height: 40px;
    font-size: 13.5px;
  }
  .tab.active {
    background: rgba(255, 255, 255, .09); color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  }
  .tab.active::before {
    content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px;
    width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa;
  }
  .tab.active .tab-ic { color: #7cc4ff; }
  .tab-badge { top: 11px; right: 10px; }
  .tab.active .tab-badge { --fu-ring: #1a2336; }
  .topbar-right {
    margin: auto 0 0; padding-top: 18px;
    flex-direction: column; align-items: stretch; gap: 8px;
  }
  .topbar-right .live, .topbar-right .wartet { align-self: flex-start; }
  .stat-chip {
    white-space: normal; line-height: 1.55;
    padding: 11px 12px; border-radius: 12px;
    background: rgba(255, 255, 255, .045);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  }
  .views { min-width: 0; }
}

/* Schmale Telefone: die Tageszahl bleibt immer stehen – sie ist unterwegs die
   meistgelesene Zahl der App. Platz machen der Reihe nach der Schriftzug (das
   Symbol bleibt) und zuletzt das Wort „Heute". */
@media (max-width: 400px) {
  .brand-name { display: none; }
  .topbar-right { gap: 8px; }
}
@media (max-width: 340px) {
  .sc-heute { display: none; }
}

/* ===========================================================================
   Ansichten
   =========================================================================== */

.views { flex: 1 1 auto; position: relative; min-height: 0; }
.view { display: none; position: absolute; inset: 0; }
.view.active { display: block; }

/* Die Karte ist die EINZIGE Ansicht, die nie auf `display:none` fällt.

   Sie zeichnet auf einer WebGL-Fläche (renderingType VECTOR). Ein Kasten mit
   `display:none` hat 0×0 Pixel, und eine WebGL-Fläche ohne Maße ist für den
   Browser eine, die niemand mehr braucht: er kassiert ihren Zeichenkontext ein
   – auf dem iPhone schon nach Sekunden, wenn das Gerät knapp an Speicher ist.
   Zurück auf dem Kartentab stand dann das letzte Bild da und ließ sich nicht
   mehr schieben.

   Also bleibt sie im Layout stehen und wird nur unsichtbar geschaltet:
   `visibility` nimmt sie aus dem Bild UND aus der Trefferprüfung, lässt ihr aber
   ihre Größe – und damit den Zeichenkontext. Der zweite Halt für denselben Fall
   steht in main.js (karteHeilen). */
#view-map { display: block; }
/* Auch alles DARIN, nicht nur die Hülle: `visibility` vererbt sich zwar, ein
   Kind darf sich mit `visibility: visible` aber wieder hervorholen. */
#view-map:not(.active),
#view-map:not(.active) * { visibility: hidden; }

.map-area { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; background: #e3e8ef; }

.list-wrap {
  position: absolute; inset: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 14px calc(28px + var(--safe-bottom));
}
/* Ab Tablet-Breite: Inhalt mittig auf Lesebreite, der Rollbalken bleibt am
   Rand. Einstellungen und Season schmaler – dort stehen Zeilen, keine Raster. */
@media (min-width: 700px) {
  .list-wrap {
    padding: 24px max(24px, calc((100% - 960px) / 2)) calc(40px + var(--safe-bottom));
  }
  #settingsWrap, #seasonWrap { padding-inline: max(24px, calc((100% - 720px) / 2)); }
}

/* Kartenausfall: Google Maps kommt über das Netz, und unterwegs kommt es
   manchmal nicht. Statt einer grauen Fläche, über die man rätselt, steht dann
   hier, was los ist und was trotzdem geht. */
.map-fehler {
  position: absolute; z-index: 18;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(320px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 22px 20px; border-radius: var(--r-big); text-align: center;
  background: #fff; color: var(--ink-2);
  box-shadow: var(--shadow-pop);
}
.map-fehler strong { font-size: 15px; font-weight: 650; color: var(--ink); }
.map-fehler span { font-size: 13px; line-height: 1.5; }
.map-fehler-btn {
  appearance: none; border: 0; cursor: pointer; margin-top: 3px;
  padding: 9px 16px; border-radius: 11px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
}

/* ===========================================================================
   Potential: Gebiet einkreisen (Tab „Potential", liegt über der Karte)
   =========================================================================== */

.imp-pruefung { display: block; margin: 2px 0 6px; font-size: 11.5px; color: var(--muted); }

.pot-panel {
  position: absolute; z-index: 20; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(460px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px 14px 15px; border-radius: var(--r-big);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow-float);
}
.pot-panel[hidden] { display: none; }
.pot-kopf strong { font-size: 15px; font-weight: 700; }
.pot-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pot-text { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.pot-text b { color: var(--ink); }
.pot-grau { color: var(--muted); }
.pot-fehler { margin: 0; font-size: 12.5px; color: #dc2626; }
.pot-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.pot-knoepfe .btn { display: inline-flex; align-items: center; gap: 6px; }
.pot-name {
  width: 100%; box-sizing: border-box; padding: 9px 11px; min-height: 40px;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff;
  font-size: 16px; color: var(--ink);   /* < 16px zoomt iOS beim Fokus */
}
.pot-name:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
/* Fängt den einen Strich: die Karte darunter bewegt sich währenddessen nicht. */
.pot-flaeche {
  position: absolute; inset: 0; z-index: 19; cursor: crosshair;
  touch-action: none; background: rgba(37, 99, 235, .04);
}
.pot-flaeche[hidden] { display: none; }
.pot-flaeche svg { display: block; pointer-events: none; }
.pot-flaeche path {
  fill: rgba(37, 99, 235, .1); stroke: #2563eb; stroke-width: 3;
  stroke-linejoin: round; stroke-linecap: round;
}

/* ===========================================================================
   Kartensteuerung
   ===========================================================================
   Liegt mittig unten über der Karte: Joystick (Zoom, Drehen, Standort) und
   daneben der Schalter für die fremden Nadeln. Mittig statt am Rand, damit sie
   im Hoch- wie im Querformat mit beiden Daumen erreichbar ist. Das Blatt legt
   sich beim Aufziehen darüber – ausweichen muss sie ihm also nicht. */

.map-controls {
  position: absolute; z-index: 19;
  left: 50%; bottom: calc(var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  transition: left .2s ease, bottom .26s cubic-bezier(.32, .72, 0, 1), opacity .2s;
}

.map-ctrl {
  appearance: none; border: 1px solid rgba(255, 255, 255, .75); cursor: pointer;
  width: 48px; height: 48px; border-radius: 16px; flex: 0 0 auto;
  background: var(--glass); color: var(--ink-2);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-float);
  transition: transform .14s var(--ease), color .15s, background .15s;
}
@media (hover: hover) { .map-ctrl:hover { color: var(--ink); background: #fff; } }
.map-ctrl:active { transform: scale(.93); }
.map-ctrl.active { color: var(--accent); }

/* Der Schalter für die fremden Nadeln hängt NEBEN der Reihe statt in ihr: sonst
   schöbe er den Joystick um seine halbe Breite aus der Mitte, und der muss
   mittig unter dem Daumen liegen. Ausgeschaltet ist er durchgestrichen – ein
   bloß blasser Knopf sähe aus wie einer, der gerade nicht geht. */
#ctrlFremde { position: absolute; left: calc(100% + 9px); top: 50%; transform: translateY(-50%); }
#ctrlFremde:active { transform: translateY(-50%) scale(.93); }
#ctrlFremde.aus { color: #b4bfcd; background: #f1f5f9; }
#ctrlFremde.aus::after {
  content: ''; position: absolute; left: 9px; right: 9px; top: 50%;
  height: 2px; border-radius: 2px; background: #94a3b8;
  transform: rotate(-38deg);
}

/* Joystick: runder Hebel mit zwei Achsen, die Auslenkung bestimmt das Tempo.
   Hoch/runter zoomt, links/rechts dreht die Karte, ein Druck in die Mitte holt
   den Standort. Er ist größer als die runden Knöpfe und ragt aus der Reihe nach
   oben wie nach unten heraus – die vier Hinweise sitzen an seinen Rändern,
   damit man auch ohne Erklärung sieht, wohin sich der Knopf ziehen lässt. */
.map-ctrl.joystick {
  width: 104px; height: 104px; border-radius: 50%;
  position: relative; padding: 0;
  cursor: grab; touch-action: none;
}
.map-ctrl.joystick:active { transform: none; }   /* nicht das ganze Pad stauchen */
.map-ctrl.joystick.dragging { border-color: rgba(37, 99, 235, .35); cursor: grabbing; }
.joy-hint {
  position: absolute; width: 15px; height: 15px; color: #b3bfcf;
  pointer-events: none; user-select: none; z-index: 1;
}
.joy-up    { top: 7px;    left: 50%; transform: translateX(-50%); }
.joy-down  { bottom: 7px; left: 50%; transform: translateX(-50%); }
/* Beide Dreh-Pfeile sind dasselbe Bild; der linke wird gespiegelt. */
.joy-left  { left: 8px;   top: 50%;  transform: translateY(-50%) scaleX(-1); }
.joy-right { right: 8px;  top: 50%;  transform: translateY(-50%); }
.joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(150deg, #3b82f6, var(--accent-2));
  box-shadow: 0 3px 9px rgba(29, 78, 216, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
  transform: translate(-50%, -50%);
  transition: transform .14s cubic-bezier(.2, .8, .3, 1);
  display: flex; align-items: center; justify-content: center;
}
/* Das Fadenkreuz im Knopf. Es ersetzt einen eigenen Standort-Knopf: nur daran
   ist zu sehen, dass ein Druck in die Mitte den Standort holt. */
.joy-me {
  width: 20px; height: 20px; color: #fff; opacity: .58;
  pointer-events: none; transition: opacity .18s ease;
}
.map-ctrl.joystick.active .joy-me { opacity: 1; }
/* Während die Ortung läuft, pulst das Fadenkreuz. Das ist die Antwort auf den
   Tipp: ein Fix kann draußen Sekunden dauern, und ohne sichtbares „ich suche"
   hält man den Knopf für kaputt und drückt weiter. */
@keyframes joy-sucht { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.map-ctrl.joystick.sucht .joy-me { animation: joy-sucht 1s ease-in-out infinite; }
.map-ctrl.joystick.dragging .joy-knob {
  transition: none;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .4), 0 0 0 5px rgba(37, 99, 235, .22);
}
@keyframes joy-tap { from { box-shadow: 0 2px 7px rgba(15, 23, 42, .3), 0 0 0 0 rgba(37, 99, 235, .35); }
                     to   { box-shadow: 0 2px 7px rgba(15, 23, 42, .3), 0 0 0 16px rgba(37, 99, 235, 0); } }
.joy-knob.tapped { animation: joy-tap .45s ease-out; }

/* ---- Eigener Standort ----
   Blauer Punkt, bewusst rund und ohne Spitze: er ist keine Nadel, sondern zeigt,
   wo man selbst steht. Nadeln hängen mit der Unterkante am Ort – der Punkt wird
   um seine halbe Höhe nach unten geschoben, damit seine MITTE auf dem Standort
   sitzt. */
.me-dot {
  position: relative;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .45);
  transform: translateY(50%);
  pointer-events: none;
}
.me-dot::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%; background: rgba(37, 99, 235, .35);
  animation: me-pulse 2s ease-out infinite;
}
@keyframes me-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .me-dot::after { animation: none; opacity: 0; } }

/* ---- Die Mannschaft auf der Karte ----
   Ein Kreis mit Initialen in der Kontofarbe, darunter eine kurze Spitze: die
   Spitze sitzt auf dem Standort, wie bei einer Nadel. Bewusst KEINE Nadelform –
   eine Nadel ist ein Haus, das hier ist ein Mensch. Der Name steht rechts
   daneben, damit man nicht erst tippen muss, um zu wissen, wer das ist. */
.kollege {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding-bottom: 7px; cursor: pointer;
}
.kollege::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top: 8px solid var(--c); border-bottom: 0;
}
.kollege-kreis {
  position: relative; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em;
  border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(15, 23, 42, .45);
}
.kollege-name {
  position: absolute; left: calc(50% + 21px); top: 8px;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .94); color: var(--ink);
  font-size: 11px; font-weight: 700; box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
}
/* Live: ein Ring läuft nach außen – so fällt ein Kollege auf, der sich gerade
   bewegt, und unterscheidet sich vom Punkt, an dem vor einer halben Stunde
   jemand stand. */
.kollege.live .kollege-kreis::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--c); animation: kollege-puls 2s ease-out infinite;
}
@keyframes kollege-puls { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
.kollege.offline .kollege-kreis::after { animation: none; opacity: 0; }
/* Älter als drei Minuten: blass – er WAR hier. */
.kollege.alt { opacity: .55; }
.kollege.alt .kollege-kreis { filter: saturate(.55); }
/* Aus der Mannschaft angesprungen: einmal kurz hüpfen, damit man ihn findet. */
.kollege.gesucht { animation: kollege-gesucht .9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes kollege-gesucht { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-14px) scale(1.25); }
                             100% { transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .kollege.live .kollege-kreis::after, .kollege.gesucht { animation: none; }
}

/* Kopfzeile: der eigene Standort kommt bei den anderen an. */
.live-ort { color: #86efac; margin-left: 1px; }
.live.teilt { color: #bbf7d0; }

/* ===========================================================================
   Nadeln
   ===========================================================================
   Tropfenform, mit der Spitze am Ort. Die Füllung ist die Farbe des Ausgangs –
   dieselbe wie auf den Ausgangskacheln und in jeder Liste, damit sich eine
   Nadel ohne Umrechnung lesen lässt. */

.pin {
  position: relative;
  width: 32px; height: 32px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--pin-color, #64748b);
  border: 2.5px solid #fff;
  box-shadow: 0 3px 9px rgba(15, 23, 42, .42);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
/* Offene Nadel: weiß gefüllt. Weil der Rand aller Nadeln ebenfalls weiß ist,
   bekäme sie sonst gar keine Kontur – der dunkle Ring übernimmt das. */
.pin.offen {
  box-shadow: 0 0 0 1.5px rgba(15, 23, 42, .55), 0 3px 9px rgba(15, 23, 42, .42);
}

/* ---- Die Nadeln der anderen ----
   Halbe Deckkraft, und darum der Ring in der Farbe ihres Kontos. Die Deckkraft
   sagt „nicht meine" – sie sagt aber nicht, WESSEN, und bei zwei Leuten in
   derselben Straße ist genau das die Frage. Ein Name passt auf 32px nicht, eine
   Farbe schon. Dieselbe Farbe trägt das Konto in der Mannschaftsliste, in der
   Übersicht und am eigenen Schild in der Kopfzeile. */
.pin.fremd {
  opacity: .5;
  box-shadow: 0 0 0 2.5px var(--pin-owner, #64748b), 0 3px 9px rgba(15, 23, 42, .42);
}
.pin.fremd.offen {
  box-shadow: 0 0 0 1.5px rgba(15, 23, 42, .45), 0 0 0 4px var(--pin-owner, #64748b),
              0 3px 9px rgba(15, 23, 42, .42);
}
/* Eine fremde Nadel, die GERADE über die Leitung hereingekommen ist, blitzt
   einmal auf. Ohne das erscheint sie lautlos, und man hält sie beim nächsten
   Blick für eine, die schon immer da war. */
.pin.neu { animation: pin-neu 1.6s cubic-bezier(.22, 1, .36, 1); z-index: 9; }
@keyframes pin-neu {
  0%   { opacity: 0;  transform: rotate(-45deg) scale(.3); }
  35%  { opacity: 1;  transform: rotate(-45deg) scale(1.28); }
  55%  { opacity: 1;  transform: rotate(-45deg) scale(1); }
  100% { opacity: .5; transform: rotate(-45deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .pin.neu { animation: none; } }

/* Die Zahl steht auf der Farbe des Ausgangs – die reicht von hellem
   Followup-Gelb bis zum fast schwarzen „Übersprungen". Welche Schriftfarbe
   darauf lesbar ist, rechnet pinInk() je Nadel aus (--pin-ink). */
.pin span {
  transform: rotate(45deg);
  color: var(--pin-ink, var(--ink)); font-size: 12.5px; font-weight: 700; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.pin.selected {
  width: 40px; height: 40px; z-index: 10;
  opacity: 1;                                  /* auch eine fremde steht offen voll da */
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .45), 0 5px 14px rgba(15, 23, 42, .45);
}
.pin.selected span { font-size: 14px; }
/* Am Finger: gestrichelter Ring und ein Hauch größer. Der Unterschied muss aus
   dem Augenwinkel erkennbar sein – man schaut beim Ziehen auf die Karte, nicht
   auf den Knopf, den man gerade gedrückt hat. */
.pin.ziehbar { cursor: grab; outline: 2.5px dashed var(--accent); outline-offset: 3px; }
.pin.ziehbar:active { cursor: grabbing; }
/* Während ein Haus am Finger hängt, tritt der Rest der Karte zurück – sonst
   greift man im Gedränge die falsche Nadel. */
body.move-mode .pin:not(.ziehbar), body.move-mode .cluster { opacity: .35; }

/* Die Blase hängt wie jede Nadel mit ihrer Unterkante am Ort – die halbe Höhe
   zurück, damit ihre MITTE auf der Lage sitzt. Ohne das säße sie um ihren halben
   Durchmesser darüber, und der ist je nach Größe verschieden. */
.cluster {
  --fill: #cbd5e1;
  transform: translateY(50%);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--fill);
  box-shadow: 0 0 0 2px #fff, 0 3px 10px rgba(15, 23, 42, .42);
  color: var(--ink); font-weight: 700; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
/* Eine Blase gehört genau EINEM Konto – gebündelt wird je Konto, nie gemischt
   (siehe applyClustering in main.js). Ist es nicht meines, tritt sie zurück wie
   eine fremde Nadel: dieselben 50 %, und derselbe Ring in der Farbe ihres
   Kontos, damit man auch herausgezoomt sieht, wessen Gegend das ist. */
.cluster.fremd {
  opacity: .5;
  box-shadow: 0 0 0 2.5px var(--blase-owner, #fff), 0 3px 10px rgba(15, 23, 42, .42);
}

/* ===========================================================================
   Das Ausgangs-Blatt
   ===========================================================================
   Das Blatt, das ein Kartentipp aufzieht: oben, wonach gefragt wird, in der
   Mitte die sieben Ausgänge als Kacheln, unten die Wege aus dem Blatt heraus
   (verschieben, löschen, abbrechen).

   Im Hochformat kommt es von unten und deckt gut die halbe Höhe ab – der
   Daumen erreicht jede Kachel, ohne dass die Hand umgreift. Am Schreibtisch
   steht dasselbe Blatt als Kärtchen in der Mitte.

   Es hängt am <body>, nicht in der Kartenansicht: so deckt es auch die
   Kopfzeile ab, und beim Schließen verschwindet es spurlos. */

.blatt {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 23, 42, .42);
  -webkit-backdrop-filter: blur(4px) saturate(1.1); backdrop-filter: blur(4px) saturate(1.1);
  animation: blatt-grund .18s ease;
}
@keyframes blatt-grund { from { opacity: 0; } to { opacity: 1; } }

.blatt-box {
  width: min(460px, 100%);
  max-height: 88%;
  background: var(--card);
  border-radius: 26px 26px 0 0;
  padding: 0 16px calc(16px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 -16px 50px rgba(15, 23, 42, .28);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  animation: blatt-auf .24s cubic-bezier(.32, .72, 0, 1);
}
@keyframes blatt-auf { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Beim Schließen gleitet es hinaus, statt schlagartig zu verschwinden – ein
   Abbruch soll nicht aussehen wie ein Fehler. */
.blatt.zu { animation: blatt-grund .18s ease reverse forwards; pointer-events: none; }
.blatt.zu .blatt-box { animation: blatt-auf .18s cubic-bezier(.32, .72, 0, 1) reverse forwards; }

/* Wird nur der INHALT ersetzt (eine Meldung von der Leitung zur offenen Nadel),
   soll das Blatt nicht noch einmal hereinfahren. */
.blatt.ohne-anlauf, .blatt.ohne-anlauf .blatt-box { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .blatt, .blatt-box, .blatt.zu, .blatt.zu .blatt-box { animation: none; }
}

@media (min-width: 640px) {
  .blatt { align-items: center; }
  .blatt-box {
    width: min(500px, 100%);
    border-radius: 24px;
    padding: 4px 20px 20px;
    max-height: 86%;
    box-shadow: var(--shadow-pop), 0 0 0 1px rgba(15, 23, 42, .04);
    animation: blatt-mitte .2s cubic-bezier(.2, .9, .3, 1);
  }
  @keyframes blatt-mitte {
    from { transform: translateY(14px) scale(.97); opacity: 0; }
    to   { transform: none; opacity: 1; }
  }
  .blatt.zu .blatt-box { animation: blatt-mitte .16s ease reverse forwards; }
  .blatt-griff { display: none; }
}

/* Der Griff ist hier reine Zierde – gezogen wird am Blatt nicht. Er sagt aber
   auf einen Blick „das kam von unten und geht auch wieder dorthin". */
.blatt-griff {
  flex: 0 0 auto; align-self: center;
  width: 38px; height: 5px; border-radius: 3px; background: #d5dce6;
  margin: 9px 0 2px;
}

/* Der Kopf klebt oben: bei sieben Kacheln und einem Verlauf darunter scrollt
   das Blatt, und dann muss sichtbar bleiben, worum es geht. */
.blatt-kopf {
  position: sticky; top: 0; z-index: 2;
  flex: 0 0 auto;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0 10px;
  background: var(--card);
  border-bottom: 1px solid var(--line-soft);
}
.blatt-titel { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.blatt-titel strong { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.blatt-titel small {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Die neun Ausgänge ----
   Alle gleichwertig, 3 × 3 (seit 31.10.2026 mit „Später klingeln"; vorher 4 × 2,
   davor sechs zu dritt, Übersprungen und Lead als Leisten). */
.ab-raster {
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px;
  padding-bottom: 2px;
}
.ab-kachel {
  appearance: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 74px; padding: 8px 4px;
  border: 1px solid var(--line); border-radius: 18px;
  background: #fff; color: var(--ink-2);
  box-shadow: var(--shadow-tile);
  transition: transform .14s var(--ease), border-color .15s, background .15s, box-shadow .15s;
}
.ab-kachel .ab-ic {
  width: 38px; height: 38px; border-radius: 12px; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 11%, #fff);
}
@media (hover: hover) {
  .ab-kachel:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--line)); box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--c) 35%, transparent); transform: translateY(-1px); }
}
/* Der Druck muss am Finger ankommen: die Kachel IST die Antwort, es gibt kein
   „Übernehmen" dahinter. */
.ab-kachel:active { transform: scale(.96); background: var(--line-soft); }
.ab-ic { color: var(--c); display: flex; }
.ab-l { font-size: 11.5px; font-weight: 650; line-height: 1.15; text-align: center;
        overflow-wrap: anywhere; hyphens: auto; }
/* Der gesetzte Ausgang trägt seine Farbe voll – man soll beim Aufschlagen des
   Blattes sehen, was hier schon steht, ohne die Kopfzeile zu lesen. */
.ab-kachel.on {
  background: color-mix(in srgb, var(--c) 8%, #fff);
  border-color: color-mix(in srgb, var(--c) 45%, #fff);
  color: color-mix(in srgb, var(--c) 74%, #0f172a);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 22%, #fff);
}
.ab-kachel.on .ab-ic { color: #fff; background: var(--c); }

/* ---- Feinere Ausgänge (seit 28.10.2026) ----
   Nach dem Tipp auf Absage, Ungeeignet … die Gründe als Chips, zwei je Reihe. */
.fein-raster {
  flex: 0 1 auto; overflow-y: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
  padding-bottom: 2px;
}
.fein-chip {
  appearance: none; cursor: pointer; text-align: left;
  min-height: 46px; padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); border-radius: 14px;
  border-left: 4px solid var(--c);
  background: #fff; color: var(--ink-2);
  font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2;
  box-shadow: var(--shadow-tile);
  transition: transform .14s var(--ease), background .15s;
}
.fein-chip:active { transform: scale(.97); background: var(--line-soft); }
/* Wie oft der Grund schon gewählt wurde – klein oben rechts im Chip. */
.fein-chip { position: relative; padding-right: 30px; }
.fein-n {
  position: absolute; top: 5px; right: 6px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 80%, #0f172a);
}
.fein-n.null { background: var(--line-soft); color: #94a3b8; }
.fein-chip.sonstige { color: #64748b; }
.fein-chip.on { background: color-mix(in srgb, var(--c) 10%, #fff); }
.fein-sonst { display: flex; gap: 8px; align-items: stretch; }
.fein-sonst[hidden] { display: none; }
.fein-sonst textarea {
  flex: 1 1 auto; font: inherit; font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; resize: none;
}
@media (min-width: 520px) { .fein-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- Name, Notiz, Termin (seit 10.10.2026) ----
   Eingeklappt eine Leiste über den Kacheln; aufgeklappt drei Felder. Schrift
   16px in den Feldern: darunter zoomt Safari beim Antippen die Seite auf. */
.ab-details {
  flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 16px; background: #fbfcfe;
}
.ab-details > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.ab-details > summary::-webkit-details-marker { display: none; }
.abd-ic { display: flex; color: var(--accent); flex: 0 0 auto; }
.abd-l { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abd-pfeil { flex: 0 0 auto; color: var(--muted); transition: transform .15s; }
.ab-details[open] .abd-pfeil { transform: rotate(180deg); }
.ab-details[open] > summary { border-bottom: 1px solid var(--line-soft); }
.abd-felder { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 12px; }
.abd-f { display: flex; flex-direction: column; gap: 4px; }
.abd-f > span:first-child {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.abd-f input, .abd-f textarea {
  width: 100%; display: block; appearance: none; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-field);
  background: #fff; color: var(--ink);
  padding: 9px 11px; min-height: 42px; font: inherit; font-size: 16px;
}
.abd-f textarea { resize: vertical; min-height: 64px; line-height: 1.35; }
.abd-f input:focus, .abd-f textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.abd-termin { display: flex; gap: 6px; align-items: center; }
.abd-termin input { flex: 1 1 auto; min-width: 0; }
.abd-termin .icon-btn[hidden] { display: none; }
.abd-termin-wahl {
  appearance: none; cursor: pointer; flex: 1 1 auto; min-width: 0; min-height: 42px;
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; font-size: 14.5px; font-weight: 600;
}
.abd-termin-wahl svg { flex: 0 0 auto; color: var(--accent); }
.abd-termin-wahl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abd-termin-wahl.leer { color: var(--muted); font-weight: 500; }
.abd-termin-wahl:active { background: var(--line-soft); }
.abd-f.fehlt > span:first-child { color: #dc2626; }
.abd-f.fehlt input, .abd-f.fehlt .abd-termin-wahl { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.tk-wann { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }

/* ---- Mini-Kalender beim Eintragen eines Termins ----------------------------- */
.mk {
  position: fixed; inset: 0; z-index: 75;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 23, 42, .35);
}
.mk-box {
  width: min(560px, 100%); height: min(92%, 760px);
  background: var(--card); border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -16px 50px rgba(15, 23, 42, .3);
  animation: blatt-auf .22s cubic-bezier(.32, .72, 0, 1);
}
@media (min-width: 640px) {
  .mk { align-items: center; }
  .mk-box { border-radius: 22px; height: min(88%, 760px); animation: blatt-mitte .2s cubic-bezier(.2, .9, .3, 1); }
}
.mk-kopf { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.mk-kopf .btn { flex: 0 0 auto; }
.mk-leiste { display: flex; align-items: center; gap: 6px; padding: 0 10px 8px; }
.mk-leiste .at-schritt { width: 34px; height: 44px; }
.mk-leiste .zurueck svg { transform: rotate(180deg); }
.mk-tage { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mk-tag {
  appearance: none; cursor: pointer; border: 1px solid transparent; border-radius: 10px; background: none;
  display: flex; flex-direction: column; align-items: center; padding: 3px 0 1px; color: var(--ink-2); font: inherit;
}
.mk-tag span { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mk-tag b { font-size: 15px; font-weight: 700; line-height: 1.2; }
.mk-tag i { font-style: normal; font-size: 10px; line-height: 10px; height: 10px; color: var(--accent); letter-spacing: -1px; }
.mk-tag.sicht { background: var(--accent-soft); }
.mk-tag.heute b { color: var(--accent); }
.mk-tag.gewaehlt { border-color: var(--accent); }
.mk-rkopf, .mk-ganz {
  display: grid; grid-template-columns: 40px repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--ink-2);
}
.mk-rkopf span { text-align: center; padding: 4px 0; }
.mk-rkopf span.heute { color: var(--accent); }
.mk-ganz span { padding: 2px 4px; font-size: 10.5px; font-weight: 600; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.mk-grid { --hh: 48px; display: grid; grid-template-columns: 40px minmax(0, 1fr); }
.mk-std { height: var(--hh); position: relative; top: -7px; padding: 0 5px; text-align: right; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-stunden { border-right: 1px solid var(--line); }
.mk-spalten { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-dcol { position: relative; border-right: 1px solid var(--line-soft); cursor: copy; }
.mk-dcol.heute { background: var(--accent-soft); }
.mk-slot { height: var(--hh); border-bottom: 1px solid var(--line-soft); pointer-events: none; }
.mk-ev {
  position: absolute; z-index: 1; margin-left: 1px; pointer-events: none; overflow: hidden;
  padding: 1px 4px; border-radius: 5px; font-size: 10.5px; line-height: 1.25; color: #fff;
  background: var(--c); border-left: 3px solid rgba(0, 0, 0, .2);
}
.mk-ev.fremd { background: #e2e8f0; color: #334155; border-left-color: #94a3b8; }
.mk-neu {
  position: absolute; z-index: 3; margin-left: 2px; touch-action: none; cursor: grab; user-select: none;
  display: flex; flex-direction: column; overflow: hidden; padding: 2px 6px; border-radius: 7px;
  background: var(--accent); color: #fff; font-size: 11px; line-height: 1.25;
  box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(37, 99, 235, .45);
  transition: box-shadow .15s;
}
.mk-neu b { font-weight: 800; white-space: nowrap; }
.mk-neu span { opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-neu.kurz { flex-direction: row; align-items: center; gap: 5px; padding-block: 0; }
.mk-neu.fu { background: #ca8a04; box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(202, 138, 4, .45); }
.mk-neu.konflikt { box-shadow: 0 0 0 2px #dc2626, 0 4px 14px rgba(220, 38, 38, .35); }
.mk-neu.zieht { cursor: grabbing; opacity: .92; box-shadow: 0 0 0 2px #fff, 0 10px 26px rgba(15, 23, 42, .35); }
.mk-fuss { display: flex; flex-direction: column; gap: 4px; padding: 8px 14px 10px; border-top: 1px solid var(--line); }
.mk-wahl { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.mk-wahl > svg { flex: 0 0 auto; color: var(--accent); }
.mk-wahl > span { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mk-wahl small { color: #b91c1c; font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-wahl.konflikt > svg { color: #dc2626; }
.mk-wahl input[type="time"] { flex: 0 0 auto; width: 100px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; }
.mk-tipp { font-size: 11.5px; color: var(--muted); }
.mk-tipp:empty { display: none; }
.mk-warn { font-size: 11.5px; color: #b45309; }
.abd-kal, .abd-hinweis { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin-top: -4px; }
.abd-kal[hidden] { display: none; }

/* Fotos zur Notiz (seit 15.10.2026) */
.foto-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.foto-mini, .foto-neu {
  position: relative; flex: 0 0 auto;
  width: 64px; height: 64px; border-radius: var(--r-field); overflow: hidden;
}
.foto-mini { padding: 0; border: 1px solid var(--line); background: var(--line-soft); cursor: zoom-in; }
.foto-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-mini.wartet img { opacity: .6; }
.foto-wartet {
  position: absolute; right: 3px; bottom: 3px;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px;
  background: rgba(15, 23, 42, .75); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.foto-neu {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px dashed var(--line); background: #fff; color: var(--accent); cursor: pointer;
  font-size: 11px; font-weight: 600;
}
.foto-neu:active { background: var(--line-soft); }
.lese-fotos { flex: 0 0 auto; margin: 0 0 10px; }

.foto-gross {
  position: fixed; inset: 0; z-index: 75;
  display: flex; align-items: center; justify-content: center;
  background: #020617; touch-action: pan-y pinch-zoom;
}
.fg-bild { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.fg-oben {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-top) + 8px) 10px 8px 16px;
  background: linear-gradient(rgba(2, 6, 23, .7), transparent); color: #e2e8f0;
}
.fg-info { flex: 1 1 auto; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-btn {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 20px;
  background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.fg-btn.fragt { background: #dc2626; }
.fg-pfeil {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 64px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 34px; line-height: 1; cursor: pointer;
}
.fg-pfeil.links { left: 8px; }
.fg-pfeil.rechts { right: 8px; }
.fg-pfeil[hidden] { display: none; }

/* Adresse, Name, Termin im Kopf des Blattes */
.blatt-titel small.adr-zeile { display: flex; align-items: center; gap: 4px; }
.blatt-titel small.adr-zeile svg { flex: 0 0 auto; }
.blatt-titel small.lese-notiz { white-space: pre-wrap; color: var(--ink-2); margin-top: 2px; }

/* ---- Fuß des Blattes ---- */
.blatt-fuss {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding-top: 2px;
}
.blatt-fuss .btn { flex: 1 1 0; }
.blatt-fuss.fragt { flex-wrap: wrap; }
.fuss-frage {
  flex: 1 0 100%; font-size: 13px; font-weight: 600; color: #b91c1c;
  padding: 2px 2px 4px;
}
.btn.gefahr { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.gefahr:active { background: #b91c1c; }
@media (hover: hover) { .btn.gefahr:hover { background: #c81e1e; border-color: #c81e1e; } }

/* ---- Zum Lesen: die Nadel eines anderen Kontos ---- */
.lese-wer { display: flex; align-items: center; gap: 7px; color: var(--c); }
.fremd-punkt {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
  background: var(--c); opacity: .4;
}
.fremd-punkt.on { opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }

.lese-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 12px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--c, #cbd5e1) 35%, #fff);
  background: color-mix(in srgb, var(--c, #cbd5e1) 7%, #fff);
}
.lese-chip .tile-ic { background: var(--c, #94a3b8); color: #fff; width: 34px; height: 34px; border-radius: 11px; }
.lese-l { display: flex; flex-direction: column; min-width: 0; }
.lese-l strong { font-size: 14.5px; font-weight: 650; }
.lese-l small { font-size: 12px; color: var(--muted); }

.lese-verlauf > h4 {
  margin: 0 0 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted);
}
.hist { display: flex; flex-direction: column; gap: 2px; }
.hist-row { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
.hist-ic {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c);
}
.hist-label { flex: 1 1 auto; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.hist-time { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Der gemeinsame Icon-Chip – gebraucht ihn nur noch der Lese-Chip. */
.tile-ic {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--line-soft); color: #a5b2c4;
}

/* ===========================================================================
   Eingabefelder mit Icon
   ===========================================================================
   Nur noch die Suche in der Übersicht – an einer Nadel gibt es nichts zu
   tippen. */

.ifield { position: relative; }
.ifield-ic {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  display: flex; color: #a5b2c4; pointer-events: none;
  transition: color .15s;
}
.ifield input {
  width: 100%; display: block; appearance: none;
  border: 1px solid var(--line); border-radius: var(--r-field);
  background: #fff; color: var(--ink);
  padding: 9px 11px 9px 38px; min-height: 40px;
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
.ifield input::placeholder { color: #aab6c6; }
.ifield input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: var(--ring);
}
.ifield:focus-within .ifield-ic { color: var(--accent); }
.ifield-sm .ifield-ic { left: 9px; }
.ifield-sm input { min-height: 36px; padding: 7px 9px 7px 32px; font-size: 13px; font-weight: 600; }

/* ===========================================================================
   Knöpfe
   =========================================================================== */

.icon-btn {
  appearance: none; border: 1px solid var(--line); background: #fff; cursor: pointer;
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:active { background: var(--line-soft); }
@media (hover: hover) { .icon-btn:hover { background: var(--line-soft); color: var(--ink); } }

.btn {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 12px; padding: 8px 14px; min-height: 44px;
  font-size: 13.5px; font-weight: 650; letter-spacing: -.005em;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .12s var(--ease);
}
.btn:active { background: var(--line-soft); transform: scale(.985); }
@media (hover: hover) { .btn:hover { background: #f8fafc; border-color: #d5dce6; } }
.btn.block { width: 100%; }
.btn.ghost-danger { color: #e11d48; border-color: #fadfe4; background: #fff; }
.btn.ghost-danger:active { background: #fff1f2; }

.chip {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 6px 12px; min-height: 34px;
  font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:active { background: var(--line-soft); }
@media (hover: hover) { .chip:not(.on):hover { border-color: #d0d8e3; color: var(--ink); } }
.chip.on { border-color: color-mix(in srgb, var(--accent) 55%, #fff); color: var(--accent-2); background: var(--accent-soft); }

/* ===========================================================================
   Listen (Übersicht, Mannschaft)
   =========================================================================== */

.filterbar {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 10px;
}
.fkacheln { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.fkachel {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  min-height: 40px; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-tile);
  transition: border-color .15s, background .15s;
}
.fkachel .tile-ic { width: 26px; height: 26px; border-radius: 8px; background: transparent; color: var(--c); }
.fkachel.on { border-color: color-mix(in srgb, var(--c) 45%, #fff); background: color-mix(in srgb, var(--c) 8%, #fff); }
.fkachel.on .tile-ic { background: var(--c); color: #fff; }

.frow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.frow-n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.liste { display: flex; flex-direction: column; gap: 6px; }

/* Eine Zeile: Farbpunkt des Ausgangs, Adresse, Zeit. Als <button>, damit sie
   mit der Tastatur erreichbar ist und auf dem Telefon ein sauberes Touchziel
   abgibt. */
.lz {
  appearance: none; cursor: pointer; text-align: left; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; min-height: 56px;
  border: 1px solid var(--line); border-radius: var(--r-tile);
  background: var(--card); box-shadow: var(--shadow-tile);
  transition: border-color .15s, background .15s;
}
.lz:active { background: var(--line-soft); }
@media (hover: hover) { .lz:hover { border-color: #d3dbe6; box-shadow: 0 4px 14px -6px rgba(15, 23, 42, .16); } }
/* Eine fremde Zeile steht leiser da – wie die Nadel auf der Karte, nur nicht
   ganz so blass: in einer Liste muss man sie lesen können. */
.lz.fremd { background: #fbfcfe; border-style: dashed; }
.lz-dot {
  flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%;
  background: var(--c, #cbd5e1); box-shadow: 0 0 0 1.5px rgba(15, 23, 42, .18);
}
.lz-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lz-mid strong {
  font-size: 13.5px; font-weight: 650; letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lz-mid small {
  font-size: 11.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lz-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.lz-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lz-time.rot { color: #dc2626; font-weight: 700; }
/* Stand eines Abschlusses in der Liste des Arbeitstags. */
.lz-stand {
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; background: #e3f6ea; color: #15803d;
}
.lz-stand.gelb { background: #fdf3cf; color: #a16207; }
.lz-wer {
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
  max-width: 10ch; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c);
}
.lz.fu.ueber { border-color: #fca5a5; background: #fff7f7; }

.leer {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 20px; color: var(--muted); text-align: center; font-size: 13px;
}
.leer svg { color: #cbd5e1; }

/* ===========================================================================
   Mannschaft
   =========================================================================== */

.tz-avatar {
  position: relative; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 14%, #fff);
  color: var(--c); font-size: 12.5px; font-weight: 800; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 32%, #fff);
}
/* Der grüne Punkt sagt: dieses Konto hat gerade eine offene Leitung, ist also
   draußen unterwegs. Er kommt vom Server (SSE), nicht aus einer Vermutung. */
.tz-on {
  position: absolute; right: -3px; bottom: -3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #cbd5e1; box-shadow: 0 0 0 2.5px #fff;
}
.tz-on.an { background: #22c55e; }
.tz.ich { border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.tz-hinweis { margin: 0 2px; font-size: 12px; color: var(--muted); }
/* Wo steht dieses Konto? Grün heißt live, bernstein „war vor Kurzem hier". */
.tz-ort {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 2px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.tz-ort.live { color: #15803d; }
.tz-ort.alt { color: #b45309; }
.tz-ich { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tz-heute { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tz-heute b { font-size: 15px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.tz-ab {
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: #e7f8ee; color: #15803d;
}

/* ===========================================================================
   Auswertung – gemeinsame Bausteine für Arbeitstag, Statistik und Season
   =========================================================================== */

.sblock { margin: 0 0 18px; }
.sblock > h3 {
  margin: 0 0 8px; padding: 0 2px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.sblock-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 8px; padding: 0 2px;
}
.sblock-kopf > h3 {
  margin: 0; min-width: 0;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
/* Kleiner Knopf rechts im Blockkopf: die Pausenschwelle (führt in die
   Einstellungen) oder die Sortierung. */
.sblock-hinweis {
  appearance: none; cursor: pointer; flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 3px 9px 3px 7px; min-height: 28px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.sblock-hinweis:active { background: var(--line-soft); }
.sblock-hinweis svg { color: var(--muted); }
.sblock-fuss { margin: 7px 2px 0; font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.sblock-fuss:empty { display: none; }
.sblock-fuss b { font-variant-numeric: tabular-nums; }

.skacheln {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin: 0 0 20px;
}
@media (min-width: 760px) {
  .skacheln { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
}
.skachel {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 13px 6px 12px; border-radius: var(--r-tile); text-align: center; min-width: 0;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-tile);
}
.sk-v { font-size: 21px; font-weight: 750; letter-spacing: -.025em; font-variant-numeric: tabular-nums;
        white-space: nowrap; }
.sk-l { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.sk-s { font-size: 10.5px; color: var(--muted); line-height: 1.3; margin-top: 2px;
        overflow-wrap: anywhere; }
/* Die Arbeitszeit ist die Zahl, nach der man fragt – sie trägt Blau. Grün trägt
   nur, was mit einem Abschluss zu tun hat, wie in der Kurve. */
.skachel.betont { border-color: color-mix(in srgb, var(--accent) 35%, #fff);
                  background: color-mix(in srgb, var(--accent) 5%, #fff); }
.skachel.betont .sk-v { color: var(--accent); }
.skachel.gruen { border-color: #bbe8cc; background: #f3fcf6; }
.skachel.gruen .sk-v { color: #15803d; }
/* Noch kein bestätigter, aber ein unbestätigter: gelb, wie seine Nadel. */
.skachel.gelb { border-color: #f3e2a2; background: #fffcf0; }
.skachel.gelb .sk-v { color: #a16207; }

/* Farbpunkt vor einem Ausgang – in Tabellen und Chips. */
.punkt {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, var(--muted)); margin-right: 6px; vertical-align: 1px;
  flex: 0 0 auto;
}
b.gruen { color: #15803d; }
b.gelb { color: #a16207; }
.h3-gelb { color: #a16207; }

/* Klapptabelle unter einer Auswertung: jeder einzelne Eintrag. */
.s-tabelle {
  margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--r-tile);
  background: var(--card); overflow: hidden;
}
.s-tabelle > summary {
  cursor: pointer; list-style: none; padding: 11px 12px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.s-tabelle > summary::-webkit-details-marker { display: none; }
.s-tabelle > summary::before { content: '▸'; display: inline-block; margin-right: 7px; color: var(--muted);
                               transition: transform .15s; }
.s-tabelle[open] > summary::before { transform: rotate(90deg); }
.s-tabelle table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.s-tabelle th { text-align: left; font-size: 10.5px; font-weight: 700; color: var(--muted);
                text-transform: uppercase; letter-spacing: .05em; padding: 6px 12px;
                border-top: 1px solid var(--line-soft); }
.s-tabelle td { padding: 8px 12px; border-top: 1px solid var(--line-soft); white-space: nowrap;
                font-variant-numeric: tabular-nums; }
.s-tabelle tr[data-haus] { cursor: pointer; }
.s-tabelle tr[data-haus]:active td { background: var(--line-soft); }
.luecke { color: #b45309; }

/* Vor- und Zurück-Knöpfe: Arbeitstag und Season. */
.at-schritt {
  appearance: none; cursor: pointer; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
}
.at-schritt:first-child svg { transform: rotate(180deg); }
.at-schritt:active { background: var(--line-soft); }
.at-schritt:disabled { opacity: .35; cursor: default; }

/* ===========================================================================
   Arbeitstag
   =========================================================================== */

.at-leiste { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.at-datum {
  flex: 1 1 auto; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 40px; padding: 3px 10px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
}
.at-datum span { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase;
                 letter-spacing: .05em; line-height: 1.2; }
.at-datum input {
  appearance: none; border: 0; background: transparent; padding: 0; margin: 0;
  font-size: 16px; font-weight: 650; color: var(--ink); text-align: center;
  font-variant-numeric: tabular-nums; min-height: 22px;
}
.at-datum input:focus { outline: none; }

/* Der dunkle Kopf: zwei Zahlen nebeneinander, nach denen man nach einem Tag
   fragt – wie schnell ging es, und was hat es je Stunde gebracht. */
.at-held {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 0 0 10px; border-radius: var(--r-big); color: #f8fafc;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(56, 189, 248, .16), transparent 55%),
    radial-gradient(80% 120% at 0% 100%, rgba(79, 70, 229, .20), transparent 60%),
    linear-gradient(160deg, #142038, #0b1222);
  box-shadow: 0 10px 30px -12px rgba(11, 18, 34, .55);
  overflow: hidden;
}
.at-held-teil {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 8px 15px; text-align: center; min-width: 0;
}
.at-held-teil + .at-held-teil { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .09); }
.at-held-v { font-size: 34px; font-weight: 780; letter-spacing: -.03em; line-height: 1.05;
             font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-held-l { font-size: 11px; font-weight: 650; color: #93c5fd; margin-top: 5px;
             text-transform: uppercase; letter-spacing: .06em; }
/* Die Termine tragen Grün – wie ihre Nadel. */
.at-held-teil.termin .at-held-l { color: #86efac; }
.at-held-s { font-size: 11.5px; color: #94a3b8; margin-top: 3px; line-height: 1.3; }
.at-held-knopf {
  appearance: none; cursor: pointer; margin-top: 6px;
  border: 1px solid rgba(134, 239, 172, .45); background: rgba(134, 239, 172, .1); color: #bbf7d0;
  border-radius: 999px; padding: 4px 11px; font-size: 11.5px; font-weight: 650;
}
.at-held-knopf:active { background: rgba(134, 239, 172, .2); }
.at-held-fuss { margin: -2px 2px 10px; font-size: 11.5px; color: var(--ink-2); text-align: center; }
.at-held-fuss b { color: #15803d; font-variant-numeric: tabular-nums; }

/* ---- Tempokurve ---- */
.tp-karte {
  border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--card);
  box-shadow: var(--shadow-tile); padding: 6px 4px 8px;
}
.tp-plot { width: 100%; min-height: 200px; }
.tp-svg { display: block; overflow: visible; }
.tp-grid { stroke: var(--line-soft); stroke-width: 1; shape-rendering: crispEdges; }
.tp-base { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.tp-tick { font-size: 10px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.tp-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tp-abschluss { stroke: #15803d; stroke-width: 1.25; stroke-dasharray: 3 2; opacity: .8; }
.tp-abschluss-punkt { fill: #15803d; stroke: #fff; stroke-width: 1.5; }
.tp-abschluss-zeit { font-size: 10.5px; font-weight: 700; fill: #15803d; font-variant-numeric: tabular-nums; }
/* Unbestätigt: dieselbe Zeichnung in Gelb. Die Schrift ein dunkleres Gelb –
   #eab308 auf Weiß ließe sich kaum lesen. */
.tp-abschluss.gelb { stroke: #ca8a04; }
.tp-abschluss-punkt.gelb { fill: #eab308; }
.tp-abschluss-zeit.gelb { fill: #a16207; }

.tp-legende {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px;
  padding: 4px 8px 0; font-size: 11.5px; color: var(--ink-2);
}
.tp-legende span { display: inline-flex; align-items: center; gap: 6px; }
.tp-legende i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.tp-l-linie { height: 2px !important; background: var(--accent); border-radius: 1px !important; }
.tp-l-pause { background: repeating-linear-gradient(135deg, #f8fafc 0 3px, #d7dee8 3px 6px);
              box-shadow: inset 0 0 0 1px #e2e8f0; }
.tp-l-abschluss { background: repeating-linear-gradient(135deg, #f0fbf4 0 3px, #9fdcb6 3px 6px);
                  box-shadow: inset 0 0 0 1px #bbe8cc; }
.tp-l-abschluss.gelb { background: repeating-linear-gradient(135deg, #fefbe8 0 3px, #f0d565 3px 6px);
                       box-shadow: inset 0 0 0 1px #f7e39a; }

/* ---- Ablauf ---- */
.ablauf { display: flex; flex-direction: column; gap: 5px; }
.ab-zeile {
  display: grid; grid-template-columns: 94px 58px 1fr auto; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card);
}
.ab-zeit { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ab-zeit i { font-style: normal; color: var(--muted); margin: 0 2px; }
.ab-marke {
  justify-self: start; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 999px; background: #eef2f7; color: #64748b;
}
.ab-marke.arbeit { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.ab-text { font-size: 12px; color: var(--ink-2); min-width: 0; }
.ab-dauer { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Eine Pause ist schraffiert wie in der Kurve – und grün, wenn an ihr ein
   Abschluss hing. */
.ab-zeile.pause { background: repeating-linear-gradient(135deg, #fbfcfd 0 6px, #f3f6f9 6px 12px); }
.ab-zeile.pause.gruen { background: repeating-linear-gradient(135deg, #f6fdf8 0 6px, #e5f7ec 6px 12px);
                        border-color: #bbe8cc; }
.ab-zeile.pause.gruen .ab-marke { background: #dcf5e6; color: #15803d; }
.ab-zeile.pause.gruen .ab-text { color: #15803d; font-weight: 600; }
.ab-zeile.pause.gelb { background: repeating-linear-gradient(135deg, #fffdf2 0 6px, #fdf5d6 6px 12px);
                       border-color: #f3e2a2; }
.ab-zeile.pause.gelb .ab-marke { background: #fdf0c4; color: #a16207; }
.ab-zeile.pause.gelb .ab-text { color: #a16207; font-weight: 600; }

/* ===========================================================================
   Statistik – der Abfragebaukasten
   =========================================================================== */

/* Einfach / Erweitert: ein Segmentschalter ganz oben. Er ist die erste
   Entscheidung auf der Seite – „will ich nur sehen, wie es läuft, oder selbst
   auswerten" –, also steht er vor allem anderen und über die volle Breite. */
.modus {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px;
  padding: 4px; margin: 0 0 14px; border-radius: 14px; background: #e6ebf2;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05);
}
.modus-knopf {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; border-radius: 10px; background: transparent;
  font-size: 13.5px; font-weight: 650; color: var(--ink-2);
  transition: background .15s, color .15s, box-shadow .15s;
}
.modus-knopf svg { color: var(--muted); }
.modus-knopf.an { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .10), 0 2px 8px -2px rgba(15, 23, 42, .10); }
@media (hover: hover) { .modus-knopf:not(.an):hover { color: var(--ink); background: rgba(255, 255, 255, .5); } }
.modus-knopf.an svg { color: var(--accent); }

.einfach-zeit { margin: 0 0 12px; }

/* Alle Ausgänge in EINEM Streifen: wie sich die Türen verteilen, ohne dass man
   sechs Balken vergleichen muss. */
.ausgang-streifen {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px;
  background: var(--line-soft);
}
.ausgang-streifen i { display: block; background: var(--c); min-width: 3px; }
.ausgang-legende {
  display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px;
  font-size: 12px; color: var(--ink-2);
}
.ausgang-legende span { display: inline-flex; align-items: center; }
.ausgang-legende b { margin-left: 4px; font-variant-numeric: tabular-nums; color: var(--ink); }

/* Türen ohne Termin in Folge: die laufende Serie, gemessen am eigenen Rekord. */
.serie {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 13px 12px; border-radius: var(--r-tile);
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-tile);
}
.serie-jetzt { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.serie-v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.serie-l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.serie-s { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.serie-balken { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; margin: 6px 0 1px; }
.serie-balken i { display: block; height: 100%; border-radius: 3px; background: #dc2626; }
.serie-zeile {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.serie-zeile b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* „Wann läuft es am besten?" – vier Zeilen, je eine Antwort. */
.erkenntnisse { display: flex; flex-direction: column; gap: 5px; }
.erkenntnis {
  display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto;
  column-gap: 10px; align-items: center;
  padding: 9px 12px; border-radius: var(--r-tile);
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-tile);
}
.erk-ic {
  grid-row: 1 / 3; width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent);
}
.erk-titel { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.erk-inhalt { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; min-width: 0; }
.erk-inhalt strong { font-size: 14px; font-weight: 700; }
.erk-inhalt strong.blass { color: var(--muted); font-weight: 600; font-size: 13px; }
.erk-inhalt small { font-size: 12px; color: var(--ink-2); }

/* Fertige Fragen: eine waagerecht scrollende Reihe. */
.q-fragen {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px 10px; padding: 0 12px 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.q-fragen::-webkit-scrollbar { display: none; }
.q-fragen .chip { flex: 0 0 auto; white-space: nowrap; }

.q-karte {
  margin: 0 0 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-tile);
  background: var(--card); box-shadow: var(--shadow-tile);
}
details.q-karte > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px; min-height: 26px;
}
details.q-karte > summary::-webkit-details-marker { display: none; }
details.q-karte[open] > summary { margin-bottom: 6px; }
.q-titel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; flex: 0 0 auto; }
.q-titel svg { color: var(--muted); }
/* Zugeklappt sagt der Satz daneben, worauf die Zahlen stehen. */
.q-satz {
  flex: 1 1 auto; min-width: 0; text-align: right;
  font-size: 12px; color: var(--accent); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
details.q-karte > summary::after {
  content: '▾'; color: var(--muted); font-size: 12px; transition: transform .15s; flex: 0 0 auto;
}
details.q-karte[open] > summary::after { transform: rotate(180deg); }

.q-feld { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.q-label {
  display: block; margin: 0 0 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.q-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip.klein { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.chip.klein .punkt { margin-right: 0; }
.chip.klein.on .punkt { box-shadow: 0 0 0 2px #fff; }
.q-feld > .chip { margin-top: 2px; }
.q-feld:last-of-type + .chip { margin-top: 6px; }

.q-datum, .q-uhr { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.q-uhr { margin-top: 0; }
.q-datum span, .q-uhr span { font-size: 12px; color: var(--muted); }
.q-datum input, .q-uhr select, .q-wahl select {
  appearance: none; flex: 1 1 0; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff;
  padding: 8px 10px; min-height: 40px;
  font-size: 16px;                              /* < 16px zoomt iOS beim Fokus */
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.q-uhr select, .q-wahl select {
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.q-datum input:focus, .q-uhr select:focus, .q-wahl select:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.q-zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-wahl { display: flex; flex-direction: column; min-width: 0; }
/* Abstand nur zwischen gestapelten Wahlen – nicht zwischen den beiden
   nebeneinander im Raster, sonst sitzt die rechte tiefer als die linke. */
.q-zweispaltig + .q-wahl { margin-top: 8px; }
.q-wahl .q-label { margin-bottom: 4px; }
.q-wahl select { width: 100%; }

/* ---- Ergebnis: eine Dimension ---- */
.erg-liste { display: flex; flex-direction: column; gap: 4px; }
.erg-zeile {
  display: grid; grid-template-columns: minmax(84px, 34%) 1fr auto; grid-template-rows: auto auto;
  column-gap: 10px; align-items: center;
  padding: 7px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
}
.erg-name {
  grid-row: 1 / 3; font-size: 12.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 4px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.erg-balken { grid-row: 1 / 3; height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.erg-balken i { display: block; height: 100%; border-radius: 999px; background: var(--c, var(--accent)); }
.erg-wert { font-size: 13.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.erg-basis { font-size: 10.5px; color: var(--muted); text-align: right; white-space: nowrap; }
/* Die beste belastbare Zeile: Stern und ein Hauch Farbe. */
.erg-zeile.beste { border-color: color-mix(in srgb, var(--accent) 40%, #fff);
                   background: color-mix(in srgb, var(--accent) 5%, #fff); }
.erg-zeile.beste .erg-name { color: var(--accent); }
.erg-zeile.beste .erg-name svg { fill: currentColor; flex: 0 0 auto; }
/* Zu dünne Basis: blass. Die Zahl steht da, man soll ihr aber nicht trauen. */
.erg-zeile.duenn .erg-wert, .erg-zeile.duenn .erg-balken { opacity: .4; }

/* ---- Ergebnis: Kreuztabelle ---- */
.kreuz-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-tile);
              border: 1px solid var(--line); background: var(--card); }
.kreuz { border-collapse: separate; border-spacing: 2px; width: 100%; font-variant-numeric: tabular-nums; }
.kreuz th {
  font-size: 10.5px; font-weight: 700; color: var(--muted); padding: 4px 3px; white-space: nowrap;
}
.kreuz thead th { text-align: center; }
.kreuz tbody th { text-align: right; padding-right: 6px; position: sticky; left: 0; background: var(--card); }
.kreuz td {
  min-width: 34px; height: 30px; padding: 0 3px; border-radius: 6px;
  text-align: center; font-size: 11.5px; font-weight: 650; cursor: default;
  background: #f8fafc;
}
.kreuz td.kz-nix { background: #fbfcfd; }
.kreuz td.duenn { color: var(--muted) !important; font-weight: 500;
                  background: repeating-linear-gradient(135deg, #fbfcfd 0 3px, #f1f5f9 3px 6px) !important; }

/* ===========================================================================
   Statistik, Fragen – Claude plant, die App rechnet, Claude erklärt
   =========================================================================== */

.ki-eingabe {
  display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px;
  padding: 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-tile);
}
.ki-eingabe textarea {
  appearance: none; resize: none; width: 100%; min-height: 58px;
  border: 0; background: transparent; padding: 4px 4px 0;
  font: inherit; font-size: 16px;                     /* < 16px zoomt iOS beim Fokus */
  line-height: 1.4; color: var(--ink);
}
.ki-eingabe textarea:focus { outline: none; }
.ki-eingabe textarea::placeholder { color: #9aa8b9; }
.ki-eingabe:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, #fff);
                           box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.ki-eingabe .btn { align-self: flex-end; }
.btn.primaer {
  background: linear-gradient(180deg, #3576f0, var(--accent)); border-color: var(--accent-2); color: #fff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn.primaer:active { background: var(--accent-2); }
@media (hover: hover) { .btn.primaer:hover { background: linear-gradient(180deg, #2f6ee8, var(--accent-2)); border-color: var(--accent-2); } }
.btn:disabled { opacity: .55; cursor: default; }

.ki-beispiele { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ki-beispiele .q-label { flex: 1 0 100%; margin: 0 2px 0; }
.ki-beispiele .chip { text-align: left; height: auto; min-height: 32px; white-space: normal; line-height: 1.3; }

/* Drei Phasen. Die mittlere sagt ausdrücklich, dass die App rechnet – das ist
   der Punkt, auf den es für das Vertrauen in die Antwort ankommt. */
.ki-fortschritt {
  margin: 0 0 14px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card);
}
.ki-phase { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; color: var(--muted); }
.ki-punkt {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: #eef2f7; color: var(--muted);
}
.ki-phase.aktiv { color: var(--ink); font-weight: 650; }
.ki-phase.aktiv .ki-punkt { background: var(--accent); color: #fff; animation: ki-puls 1.2s ease-in-out infinite; }
.ki-phase.fertig { color: var(--ink-2); }
.ki-phase.fertig .ki-punkt { background: #dcf5e6; color: #15803d; }
@keyframes ki-puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .35); } 50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); } }
@media (prefers-reduced-motion: reduce) { .ki-phase.aktiv .ki-punkt { animation: none; } }
.ki-hinweis { margin: 6px 0 0 32px; font-size: 11.5px; color: var(--muted); }

.ki-fehler {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px;
  border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px;
}
.ki-fehler span { flex: 1 1 auto; }

.ki-antwort { margin: 0 0 14px; }
.ki-frage { display: flex; flex-direction: column; gap: 3px; margin: 0 2px 8px; }
.ki-frage-text { font-size: 15px; font-weight: 650; color: var(--ink); }
.ki-frage small { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* Die Antwort selbst: dunkel wie der Kopf der anderen Ansichten – sie ist die
   eine Zahl, derentwegen man gefragt hat. */
.ki-kurz {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 16px; margin: 0 0 16px; border-radius: var(--r-big);
  background: radial-gradient(90% 140% at 100% 0%, rgba(56, 189, 248, .15), transparent 55%), linear-gradient(160deg, #142038, #0b1222);
  color: #f8fafc;
}
.ki-kurz svg { flex: 0 0 auto; color: #93c5fd; margin-top: 2px; }
.ki-kurz p { margin: 0; font-size: 15px; line-height: 1.5; }
.ki-kurz.nicht { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.ki-kurz.nicht svg { color: #ea580c; }

.ki-h {
  margin: 0 2px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}

/* Ein Häppchen: Nummer und Titel, woraus es besteht (Filter, Aufteilung,
   Kennzahl), die Tabelle, die Erklärung, der Weg zum Nachprüfen. */
.ki-schritt {
  display: flex; flex-direction: column; gap: 9px;
  padding: 12px; margin: 0 0 8px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-tile);
}
.ki-schritt > .chip { align-self: flex-start; }
.ki-schritt-kopf { display: flex; gap: 10px; align-items: flex-start; }
.ki-nr {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 750; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent);
}
.ki-schritt-titel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ki-schritt-titel strong { font-size: 14px; font-weight: 650; }
.ki-schritt-titel small { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.ki-abfrage { display: flex; flex-wrap: wrap; gap: 5px; }
.ki-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; background: #eef2f7; color: var(--ink-2);
  font-size: 11.5px; font-weight: 600;
}
.ki-tag svg { color: var(--muted); }
.ki-erklaerung { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.ki-leer { margin: 0; font-size: 12px; color: var(--muted); }

.erg-liste.kompakt { gap: 3px; }
.erg-liste.kompakt .erg-zeile { padding: 5px 9px; box-shadow: none; }
/* Was Claude hervorheben ließ: blauer Rahmen – dieselbe Farbe wie der Stern im
   erweiterten Modus, denn es ist dieselbe Aussage. */
.erg-zeile.hervor { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff);
                    box-shadow: 0 0 0 1px var(--accent) inset; }
.erg-zeile.hervor .erg-name { color: var(--accent); }
.kreuz td.hervor { box-shadow: 0 0 0 2px var(--accent) inset; color: var(--accent); font-weight: 750; }

.ki-vorbehalte {
  margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px;
  background: #fffbeb; border: 1px solid #fde68a;
}
.ki-vorbehalte .q-label { color: #a16207; }
.ki-vorbehalte ul { margin: 0; padding-left: 18px; }
.ki-vorbehalte li { font-size: 12.5px; color: #713f12; line-height: 1.45; margin: 2px 0; }

.ki-meta { margin: 6px 2px 0; font-size: 11px; color: var(--muted); }

.ki-verlauf-liste { display: flex; flex-direction: column; }
.ki-verlauf-eintrag {
  appearance: none; border: 0; border-top: 1px solid var(--line-soft); background: transparent;
  cursor: pointer; text-align: left; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.ki-verlauf-eintrag:active { background: var(--line-soft); }
.ki-verlauf-eintrag span { font-size: 13px; color: var(--ink); }
.ki-verlauf-eintrag small { font-size: 11px; color: var(--muted); }

/* ===========================================================================
   Season
   =========================================================================== */

.season-kopf { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.season-titel {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; min-width: 0;
}
.season-titel strong { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.season-titel small { font-size: 12px; color: var(--muted); }

/* Schalter Termine / Türen: zugleich die Summe des Monats über alle Konten. */
.season-wertung { grid-template-columns: 1fr 1fr; }
.season-knopf { flex-direction: column; gap: 1px; min-height: 54px; line-height: 1.15; }
.season-knopf b { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.season-knopf span { font-size: 12px; font-weight: 600; color: var(--muted); }
.season-knopf.an span { color: var(--ink-2); }
.season-knopf .rang-gelb { margin-left: 2px; }

/* Vergleich / Mein Monat (seit 11.10.2026): zwei Ansichten statt drei. */
.season-ansicht { grid-template-columns: 1fr 1fr; }

/* ---- Mein Monat: der Kalender aus 3088_ics -------------------------------
   Sieben Spalten Mo–So, dahinter eine schmalere Spalte mit der Woche. */
.se-karte {
  max-width: 560px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-tile);
  box-shadow: var(--shadow-tile); padding: 12px;
}
.se-gitter {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.15fr); gap: 5px;
}
.se-wt {
  text-align: center; padding-bottom: 2px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.se-wt--so { color: #cbd5e1; }
.se-wt--woche { letter-spacing: .02em; }
.se-tag {
  position: relative; aspect-ratio: 1; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--se-bg, #fff); color: var(--se-fg, var(--ink));
  box-shadow: inset 0 0 0 1px var(--se-li, var(--line));
  cursor: default;
}
.se-tag--luecke { background: none; box-shadow: none; }
.se-tag--offen { opacity: .4; }
/* Sonn- und Feiertage: kein Arbeitstag, also kein rotes Feld, das nach
   Versäumnis aussieht – grau und leer, ohne Wertung. */
.se-tag--frei { background: #e8edf3; box-shadow: none; }
.se-tag--heute { outline: 2px solid var(--ink); outline-offset: 1px; }
/* Leads neben den Terminen: klein und gelb in der Ecke. */
.se-lead {
  position: absolute; top: 2px; right: 3px;
  font-style: normal; font-size: 9.5px; font-weight: 800; line-height: 1;
  padding: 1px 3px; border-radius: 5px; background: #eab308; color: #422006;
}
/* Rampe rot → gelb → grün, unverändert aus 3088_ics übernommen (dort erzeugt
   von tools/season-rampe.py in OKLCH) – nicht einzeln nachbessern. */
.se-tag[data-s="0"]  { --se-bg: #d2786a; --se-fg: #4c110b; --se-li: #c05b4e; }
.se-tag[data-s="1"]  { --se-bg: #d68167; --se-fg: #571e0b; --se-li: #c46548; }
.se-tag[data-s="2"]  { --se-bg: #d98a65; --se-fg: #5c2506; --se-li: #c76f44; }
.se-tag[data-s="3"]  { --se-bg: #db9465; --se-fg: #602d00; --se-li: #c87941; }
.se-tag[data-s="4"]  { --se-bg: #dc9e66; --se-fg: #5d3000; --se-li: #c98341; }
.se-tag[data-s="5"]  { --se-bg: #dca86a; --se-fg: #603800; --se-li: #c98e44; }
.se-tag[data-s="6"]  { --se-bg: #dbb16f; --se-fg: #624000; --se-li: #c79849; }
.se-tag[data-s="7"]  { --se-bg: #dabb77; --se-fg: #5d4300; --se-li: #c5a351; }
.se-tag[data-s="8"]  { --se-bg: #d0c078; --se-fg: #564700; --se-li: #bba753; }
.se-tag[data-s="9"]  { --se-bg: #bebe75; --se-fg: #4c4b00; --se-li: #a7a751; }
.se-tag[data-s="10"] { --se-bg: #aabc75; --se-fg: #3c4902; --se-li: #91a653; }
.se-tag[data-s="11"] { --se-bg: #94ba79; --se-fg: #29470d; --se-li: #79a45a; }
.se-tag[data-s="12"] { --se-bg: #7db87f; --se-fg: #17491d; --se-li: #5fa263; }
.se-tag[data-s="13"] { --se-bg: #77ae7c; --se-fg: #063e14; --se-li: #599860; }
.se-tag[data-s="14"] { --se-bg: #71a478; --se-fg: #023913; --se-li: #548e5e; }
.se-tag[data-s="15"] { --se-bg: #6b9a74; --se-fg: #002d0e; --se-li: #4f855b; }
/* Die Woche: Summe Mo–So, bei Punkten gegen das Ziel 15. */
.se-woche {
  display: flex; align-items: center; justify-content: center; gap: 1px;
  border-radius: 8px; background: var(--line-soft);
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.se-woche b { font-size: 14px; font-weight: 750; }
.se-woche small { font-size: 10px; font-weight: 600; color: var(--muted); }
.se-woche.voll { background: #dcfce7; color: #166534; }
.se-woche.voll small { color: #15803d; }
@media (max-width: 380px) {
  .se-gitter { gap: 3px; }
  .se-tag { border-radius: 6px; font-size: 12px; }
  .se-woche b { font-size: 12px; }
  .se-woche small { font-size: 9px; }
}

.rang { display: flex; flex-direction: column; gap: 5px; }
.rang-zeile {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-tile);
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-tile);
}
.rang-zeile.ich { border-color: color-mix(in srgb, var(--accent) 40%, #fff);
                  background: color-mix(in srgb, var(--accent) 4%, #fff); }
.rang-platz {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 750; color: var(--ink-2); background: #eef2f7;
  font-variant-numeric: tabular-nums;
}
/* Gold, Silber, Bronze – nur, wer auch wirklich etwas hat. */
.rang-platz.p1 { background: linear-gradient(145deg, #fde68a, #f59e0b); color: #78350f; }
.rang-platz.p2 { background: linear-gradient(145deg, #f1f5f9, #cbd5e1); color: #334155; }
.rang-platz.p3 { background: linear-gradient(145deg, #fed7aa, #c2410c); color: #fff; }
.tz-avatar.klein { width: 32px; height: 32px; border-radius: 10px; font-size: 11px; }
.rang-mitte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rang-name { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rang-gelb { font-style: normal; font-size: 11px; font-weight: 600; color: #a16207; margin-left: 3px; }
.rang-name small { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase;
                   letter-spacing: .06em; margin-left: 4px; }
.rang-balken { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.rang-balken i { display: block; height: 100%; border-radius: 999px; background: var(--c, var(--accent)); }
.rang-wert { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.rang-wert b { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.rang-wert small { font-size: 10.5px; color: var(--muted); }
.rang-wert b .rang-von { display: inline; font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 1px; }
/* Punkte-Wertung: heute und diese Woche gegen ihr Ziel, erreicht = grün */
.rang-ziele { display: flex; gap: 10px; font-size: 11px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.rang-ziele i { font-style: normal; font-weight: 500; }
.rang-ziele .voll { color: #15803d; }

/* ---- Zahlenfeld in einer Einstellungszeile ---- */
.set-num {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.set-num input {
  width: 64px; appearance: none; text-align: center;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff;
  padding: 8px 6px; min-height: 40px;
  font-size: 16px;                         /* < 16px zoomt iOS beim Fokus */
  font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.set-num input::-webkit-outer-spin-button,
.set-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.set-num input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.set-num.breit input { width: 84px; }
label.set-row { cursor: default; }

@media (max-width: 420px) {
  .fkacheln { grid-template-columns: repeat(5, 1fr); }
  /* Drei Felder auf 390px: die Beschriftung braucht den Platz, die Zeichen nicht. */
  .modus-knopf { gap: 4px; font-size: 13px; }
  .modus-knopf svg { display: none; }
  .sk-v { font-size: 17px; }
  .ab-zeile { grid-template-columns: 86px 1fr auto; }
  .ab-zeile .ab-marke { display: none; }
  .erg-zeile { grid-template-columns: minmax(74px, 32%) 1fr auto; }
}

/* ===========================================================================
   Einstellungen
   =========================================================================== */

.set-group { margin: 0 0 18px; }
.set-h {
  margin: 0 0 8px; padding: 0 2px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.set-row {
  appearance: none; width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--r-tile);
  background: var(--card); box-shadow: var(--shadow-tile);
  transition: background .15s;
}
.set-row:active { background: var(--line-soft); }
@media (hover: hover) { button.set-row:hover, a.set-row:hover { background: #fafbfd; } }
/* Zeilen einer Gruppe stehen als EINE Karte mit Trennlinien da (wie in iOS). */
.set-row:has(+ .set-row) { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.set-row + .set-row { border-top-color: var(--line-soft); border-top-left-radius: 0; border-top-right-radius: 0; }
.set-row.static { cursor: default; }

/* Office-Board: Auswahl von Board und Spalte (seit 10.10.2026) */
/* Hinweis unter einer Gruppe und die Zeile als Link (App herunterladen) –
   beides hatte bis 10.10.2026 keine eigenen Regeln und stand in Browser-Optik da. */
.set-hinweis { margin: 2px 4px 8px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
a.set-row { text-decoration: none; color: inherit; }
.set-mehr { flex: 0 0 auto; font-size: 12px; font-weight: 650; color: var(--accent); }
.set-unter { font-weight: 500; color: var(--muted); }
.board-farbe { background: color-mix(in srgb, var(--c) 14%, #fff); }
.board-farbe i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px #fff; }
.set-board {
  margin: -2px 0 8px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--card);
  display: flex; flex-direction: column; gap: 10px;
}
.set-board-f { display: flex; flex-direction: column; gap: 4px; }
.set-board-f > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.set-board-f select {
  width: 100%; min-height: 42px; padding: 8px 10px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff; color: var(--ink);
}
.set-board-f select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.set-board-knoepfe { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* Gründe der feineren Ausgänge (Admin) */
.fein-set { align-items: flex-start; }
.fein-set-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fein-set-chips .chip { gap: 4px; padding-right: 4px; cursor: default; }
.fein-set-chips .fein-set-sonst { color: #94a3b8; border-style: dashed; padding-right: 10px; }
.fein-set-weg {
  appearance: none; border: 0; background: none; cursor: pointer; color: #94a3b8;
  display: inline-flex; padding: 3px; border-radius: 50%;
}
.fein-set-weg:hover { color: #dc2626; background: #fee2e2; }
.fein-set-neu { display: flex; gap: 6px; margin-top: 8px; }
.fein-set-neu input {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px;
}
.fein-set-neu input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.set-board-fehler { margin: 0; font-size: 12.5px; color: #b91c1c; }
.set-ic {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--line-soft); color: var(--ink-2);
}
.set-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-text strong { font-size: 13.5px; font-weight: 650; }
.set-text small { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.set-fuss { margin: 24px 2px 0; font-size: 11.5px; color: var(--muted); text-align: center; }

/* Schiebeschalter – reine Anzeige, geschaltet wird die ganze Zeile. */
.schalter {
  flex: 0 0 auto; position: relative;
  width: 40px; height: 24px; border-radius: 999px; background: #d7dfe9;
  transition: background .18s;
}
.schalter::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .3);
  transition: transform .18s;
}
.schalter.an { background: #22c55e; }
.schalter.an::after { transform: translateX(16px); }

/* ===========================================================================
   Toast
   =========================================================================== */

#toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 80;
  transform: translate(-50%, 12px);
  /* Ohne max-content bemisst sich die Breite am Platz RECHTS von left:50%, also
     an der halben Bildbreite – „Standort wird gesucht …" brach dadurch mitten im
     Satz um. */
  width: max-content; max-width: min(90vw, 380px);
  padding: 11px 18px; border-radius: 999px;
  background: rgba(15, 23, 42, .86); color: #fff;
  -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
  box-shadow: 0 10px 30px -6px rgba(15, 23, 42, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
  font-size: 14px; font-weight: 600; text-align: center;
  opacity: 0; pointer-events: none;                 /* schluckt keinen Kartentipp */
  transition: opacity .16s ease, transform .16s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Auf der Karte liegt unten der Joystick (104px hoch), und ausgerechnet seine
   Meldungen dürfen ihn nicht zudecken. */
body.view-map #toast { bottom: calc(var(--safe-bottom) + 172px); }
/* Über dem Blatt statt dahinter: die Meldung kommentiert ja gerade das, was im
   Blatt passiert ist – und das Blatt deckt die untere Hälfte ab. */
body.blatt-auf #toast {
  bottom: auto; top: calc(var(--safe-top) + 64px); z-index: 90;
  transform: translate(-50%, -12px);
}
body.blatt-auf #toast.show { transform: translate(-50%, 0); }
/* Neben der Seitenleiste: mittig über dem Inhalt, nicht über dem Fenster. */
@media (min-width: 1024px) { body:not(.blatt-auf) #toast { left: calc(50% + var(--side-w) / 2); } }

/* ===========================================================================
   Anmeldung (views/login.ejs, views/register.ejs)
   =========================================================================== */

.lock {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(56, 189, 248, .18), transparent 70%),
    radial-gradient(55% 45% at 90% 95%, rgba(79, 70, 229, .22), transparent 70%),
    linear-gradient(170deg, #111a2e, #0a1020);
}
.lock-box {
  width: min(380px, 100%);
  display: flex; flex-direction: column; gap: 10px;
  text-align: center;
  padding: 30px 26px 26px; border-radius: 24px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 80px -20px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.lock-brand {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  font-weight: 750; letter-spacing: .16em; font-size: 14px;
  color: #f1f5fb; margin-bottom: 16px;
}
.lock-brand svg {
  width: 56px; height: 56px; padding: 13px; border-radius: 18px; color: #fff;
  background: linear-gradient(140deg, #38bdf8 0%, #2563eb 55%, #4f46e5 100%);
  box-shadow: 0 12px 30px -8px rgba(37, 99, 235, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.lock-label {
  font-size: 11.5px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: #8494ab; text-align: left; margin: 4px 0 -4px 2px;
}
.lock-input {
  appearance: none; width: 100%;
  padding: 13px 15px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06); color: #f8fafc;
  transition: border-color .15s, background .15s, box-shadow .15s;
  font-size: 17px;                                  /* < 16px zoomt iOS beim Fokus */
  letter-spacing: .1em;
}
/* Der Benutzername ist Text und kein Passwort – gesperrte Zeichen würden ihn
   nur schwerer lesbar machen. */
.lock-input--text { letter-spacing: normal; }
.lock-input:focus { outline: none; border-color: #60a5fa; background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 4px rgba(96, 165, 250, .18); }
.lock-go {
  appearance: none; border: 0; cursor: pointer;
  padding: 13px 15px; border-radius: 13px; min-height: 48px; margin-top: 6px;
  background: linear-gradient(180deg, #3b82f6, var(--accent-2)); color: #fff; font-size: 15px; font-weight: 650;
  box-shadow: 0 10px 24px -8px rgba(37, 99, 235, .8), inset 0 1px 0 rgba(255, 255, 255, .2);
}
@media (hover: hover) { .lock-go:hover { filter: brightness(1.08); } }
.lock-go:active { transform: scale(.985); }
.lock-err { margin: 2px 0 0; color: #fca5a5; font-size: 13px; font-weight: 600; }
.lock-note { margin: 14px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.lock-alt { margin: 12px 0 0; color: #64748b; font-size: 12.5px; }
.lock-alt a { color: #38bdf8; font-weight: 600; text-decoration: none; }
.lock-alt a:hover { text-decoration: underline; }

.lock.shake .lock-box { animation: lock-shake .3s ease; }
@keyframes lock-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  55% { transform: translateX(6px); }
  80% { transform: translateX(-3px); }
}
@media (prefers-reduced-motion: reduce) { .lock.shake .lock-box { animation: none; } }

/* ===========================================================================
   Querformat-Sperre
   ===========================================================================
   Das Manifest (orientation: portrait) hält die installierte App auf Android
   schon von sich aus aufrecht – iOS ignoriert das Feld aber vollständig, in der
   Lasche wie auf dem Home-Bildschirm. Und in einer normalen Browser-Lasche
   greift es nirgends. Deshalb hier zusätzlich eine reine CSS-Sperre. Sie gilt
   nur für Geräte mit grobem Zeiger und flachem Fenster – ein Laptop im
   Querformat ist gemeint, ein Telefon in der Hand nicht. */
.hochkant { display: none; }

@media (orientation: landscape) and (max-height: 560px) and (pointer: coarse) {
  .hochkant {
    display: flex; position: fixed; inset: 0; z-index: 200;
    align-items: center; justify-content: center; padding: 24px;
    background: #0b1220; color: #cbd5e1;
  }
  .hochkant-box {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    text-align: center; max-width: 320px;
  }
  .hochkant-box strong { font-size: 15px; color: #f8fafc; }
  .hochkant-box span { font-size: 13px; line-height: 1.5; }
  .hochkant-box svg { color: #38bdf8; }
}

/* Importe aus d2dfinder (weiße Nadeln) */
/* Kompakt: eine Karte je Import, Name + zwei Symbolknöpfe, darunter Zahlen und
   der Weg als Chip (Tipp = ein/aus, ✕ = Weg löschen). Die Überschrift klappt
   die ganze Liste ein. */
.imp-klappe {
  appearance: none; border: 0; background: none; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 6px; text-align: left; font-family: inherit;
}
.imp-klappe svg { transition: transform .15s; transform: rotate(90deg); }
.imp-klappe.zu svg { transform: none; }
.imp-summe { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; }
.import-liste { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.import-row {
  padding: 8px 10px 7px; border: 1px solid var(--line); border-radius: var(--r-tile);
  background: var(--card); box-shadow: var(--shadow-tile);
}
.imp-kopf { display: flex; align-items: center; gap: 6px; }
.imp-kopf strong { flex: 1 1 auto; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-kopf .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.imp-kopf .icon-btn.danger { color: #dc2626; }
.imp-zeile { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
.imp-zeile small { color: var(--muted); font-size: 12px; }
.imp-weg {
  display: inline-flex; align-items: center; margin-left: auto;
  border: 1px solid #93c5fd; border-radius: 999px; background: #eff6ff; color: #1d4ed8;
}
.imp-weg button {
  appearance: none; border: 0; background: none; color: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12px; font-weight: 600;
}
.imp-weg-an { padding: 3px 4px 3px 8px; }
.imp-weg-x { padding: 3px 8px 3px 4px; opacity: .7; }
.imp-weg.aus { border-color: var(--line); background: none; color: var(--muted); }
.imp-weg.aus .imp-weg-an span { text-decoration: line-through; }
.import-balken { display: block; height: 4px; border-radius: 2px; background: rgba(148,163,184,.25); margin-top: 6px; overflow: hidden; }
.import-balken span { display: block; height: 100%; background: #16a34a; }
.blatt-titel .import-zeile { display: block; margin-top: 2px; opacity: .85; }

/* Lead (weiß): Symbol und Rand dunkel, sonst verschwände Weiß auf Weiß */
.ab-kachel.lead .ab-ic, .fkachel[data-out="lead"] .tile-ic { color: #334155; }
.ab-kachel.lead.on { background: #f1f5f9; border-color: #334155; }
.fkachel[data-out="lead"].on .tile-ic { background: #fff; color: #334155; box-shadow: inset 0 0 0 1.5px #334155; }
/* Blase aus lauter Leads (noch nirgends geklingelt) */
.cluster.weiss {
  --fill: #ffffff;
  color: #334155;
  box-shadow: 0 0 0 2px #334155, 0 3px 10px rgba(15, 23, 42, .42);
}
.ab-kachel.lead .ab-l { color: #334155; }

/* ---- Start und Ziel eines Laufwegs: Knöpfe auf der Karte, ein Tipp öffnet das Navi-Blatt ----
   Der Marker hängt unten mittig; translateY(50%) setzt den Punkt genau aufs Wegende.
   Die Fläche ist größer als der Punkt, damit der Finger ihn trifft. */
.weg-ende {
  width: 34px; height: 34px; transform: translateY(50%);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.weg-ende span, .navi-punkt {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .45);
  background: #16a34a;
}
.weg-ende.ziel span, .navi-titel.ziel .navi-punkt { background: #dc2626; }
.weg-ende:active span { transform: scale(1.2); }
/* Ziel-Markierung (langer Druck auf die Karte): die Spitze steht auf dem Ort */
.navi-ziel { cursor: pointer; line-height: 0; filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .5)); }
.navi-ziel svg { fill: #7c3aed; stroke: #fff; stroke-width: 1.6; }
.navi-ziel svg circle { fill: #fff; stroke: none; }
.navi-ziel:active svg { transform: scale(1.15); transform-origin: 50% 100%; }
.navi-titel { display: flex; align-items: center; gap: 8px; }
.navi-punkt { flex: 0 0 auto; width: 14px; height: 14px; border-width: 2px; }
.navi-knoepfe { display: flex; flex-direction: column; gap: 8px; }
.navi-knoepfe .btn { text-decoration: none; justify-content: center; min-height: 48px; }

/* Auf sehr schmalen Telefonen etwas kleinere Schrift. */
@media (max-width: 370px) {
  .ab-raster .ab-l { font-size: 10.5px; }
}

/* Potential: Siedlungen im Bild (main.js siedlungenLaden) */
.pot-sd { display: flex; align-items: center; gap: 8px; }
.pot-sd .chip { flex: 0 0 auto; }
.pot-sd-text { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }

/* Steckbrief einer Siedlung (Potential, Tipp auf eine gewählte Fläche) */
.sdi { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.sdi-text { color: var(--ink-2); margin: 8px 0; }
.sdi-kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sdi-kachel { border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line)); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.sdi-kachel b { font-size: 19px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdi-kachel span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.sdi-kachel small { font-size: 11px; color: var(--ink-2); opacity: .8; }
.sdi-block h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.sdi-streifen { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line); }
.sdi-legende { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; }
.sdi-legende i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.sdi-balken { display: flex; flex-direction: column; gap: 3px; }
.sdi-zeile { display: grid; grid-template-columns: 68px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; }
.sdi-zeile i { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.sdi-zeile i b { display: block; height: 100%; background: #64748b; border-radius: 4px; }
.sdi-zeile em { font-style: normal; text-align: right; color: var(--ink-2); }
.sdi-arten { display: flex; flex-wrap: wrap; gap: 6px; }
.sdi-arten .chip { cursor: default; }
.sdi-quelle { font-size: 11px; color: var(--ink-2); opacity: .8; margin: 0; }
.pot-legende { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 11.5px; color: var(--ink-2); }
.pot-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---- Ränge und Gebiete (seit 25.10.2026) ---- */
.tz-rang { font-size: 10px; font-weight: 700; color: #7c3aed; text-transform: uppercase; letter-spacing: .06em; }
.tz-rang-wahl, .geb-wahl, .pot-mitglied {
  min-height: 30px; padding: 3px 8px; font: inherit; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff; color: var(--ink);
}
.geb-wahl { margin-left: auto; }
.gebiet-row { border-left: 4px solid var(--c); }
.imp-gebiete-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pot-gebiet { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.pot-mitglied { flex: 1 1 160px; min-height: 36px; font-size: 14px; }
.pot-gebiet-ok { margin-top: 8px; display: flex; align-items: center; gap: 6px; color: #15803d; }
.geb-leeren { margin-left: auto; color: #b91c1c; }
.ab-fuer { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.ab-fuer small { font-size: 11px; }
.ab-fuer select {
  flex: 1 1 auto; min-height: 36px; padding: 4px 8px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff; color: var(--ink);
}

/* ---- Tab Mitglieder (seit 25.10.2026, vorher Mannschaft) ---- */
.mg-gruppe { margin-top: 12px; }
.mg-n { margin-left: 4px; font-weight: 600; letter-spacing: 0; }
.lz.mg { flex-direction: column; align-items: stretch; gap: 8px; border-left: 4px solid var(--c); cursor: default; }
.mg-kopf { display: flex; align-items: center; gap: 10px; }
.mg-kopf .tz-rang-wahl { flex: 0 0 auto; }
.mg-zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mg-zahlen span {
  display: flex; flex-direction: column; align-items: center; padding: 5px 2px;
  border-radius: 10px; background: #f1f5f9; font-size: 11px; color: var(--muted);
}
.mg-zahlen b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mg-zahlen .gruen b { color: #15803d; }
.mg-zahlen .gelb b { color: #a16207; }
.mg-gebiete, .mg-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mg-leer { font-size: 12px; color: var(--muted); }
.mg-fortschritt { display: flex; flex-direction: column; gap: 3px; }
.mg-fortschritt small { font-size: 11.5px; color: var(--muted); }
.mg-weg { margin-left: auto; color: #b91c1c; }
.lz.mg:active, .lz.mg:hover { background: var(--card); }
.mg-geb {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 12px; overflow: hidden;
}
.mg-geb button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border: 0; background: none; cursor: pointer; font: inherit; }
.mg-geb .mg-geb-x { padding: 4px 7px 4px 5px; color: #b91c1c; border-left: 1px solid var(--line); }
.mg-geb-wahl {
  min-height: 28px; padding: 2px 8px; font: inherit; font-size: 12px; color: var(--accent);
  border: 1px dashed var(--line); border-radius: 999px; background: #fff;
}
.imp-zu { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.imp-zu select { margin-left: 0; flex: 1 1 auto; max-width: 260px; }
.imp-zu.dir { color: #15803d; font-weight: 600; }
/* Offene Nadeln, die nicht mir zugewiesen sind (seit 25.10.2026): wie fremde Blasen */
.cluster.weiss.fremd {
  opacity: .5;
  box-shadow: 0 0 0 2px #334155, 0 0 0 4.5px var(--blase-owner, #94a3b8), 0 3px 10px rgba(15, 23, 42, .42);
}

/* ---- Auswahlfelder einheitlich (seit 25.10.2026) ----
   Statt der grauen Systemknöpfe dieselbe Form wie die übrigen Felder, mit
   eigenem Pfeil. Die Abfrage-Auswahlen (.q-uhr / .q-wahl) haben ihren schon. */
.tz-rang-wahl, .geb-wahl, .pot-mitglied, .mg-geb-wahl, .ab-fuer select, .set-board-f select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a97ab' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
.tz-rang-wahl, .geb-wahl, .pot-mitglied, .ab-fuer select, .set-board-f select { background-color: #fff; }
.mg-geb-wahl { background-color: var(--accent-soft); border-style: solid; border-color: transparent; }
.tz-rang-wahl:focus, .geb-wahl:focus, .pot-mitglied:focus, .mg-geb-wahl:focus, .ab-fuer select:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
@media (hover: hover) {
  .tz-rang-wahl:hover, .geb-wahl:hover, .pot-mitglied:hover, .ab-fuer select:hover, .set-board-f select:hover { border-color: #cfd7e2; }
}
.set-board-f select:disabled { opacity: .55; cursor: default; }
.ab-fuer select { font-weight: 500; }

/* ===========================================================================
   Tabs im Inneren (Überarbeitung 25.10.2026)
   ===========================================================================
   Weniger Rahmen, mehr Fläche; jede Zahl mit einem Zeichen, das sagt, was sie
   ist; Fortschritt als Ring. */

/* ---- Kennzahl-Kacheln: Zeichen oben links, Zahl groß, Text darunter ---- */
.skachel {
  align-items: flex-start; text-align: left;
  padding: 12px 13px 12px; gap: 0;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 0 0 1px rgba(15, 23, 42, .045);
}
.sk-ic {
  width: 28px; height: 28px; border-radius: 9px; margin-bottom: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--line-soft); color: var(--ink-2);
}
.sk-v { font-size: 22px; line-height: 1.1; }
.sk-l { font-size: 12px; font-weight: 650; color: var(--ink-2); margin-top: 2px; }
.sk-s { margin-top: 3px; }
.skachel.betont { background: #fff; border-color: transparent; }
.skachel.betont .sk-ic { background: var(--accent-soft); color: var(--accent); }
.skachel.gelb { background: #fffbeb; border-color: transparent; box-shadow: 0 0 0 1px #f6e3a1; }
.skachel.gelb .sk-ic { background: #fdefc0; color: #a16207; }
.skachel.gruen { box-shadow: 0 0 0 1px #bbe8cc; }
.skachel.gruen .sk-ic { background: #dcf5e6; color: #15803d; }
@media (max-width: 420px) { .sk-v { font-size: 19px; } .skachel { padding: 11px 10px; } }

/* ---- Arbeitstag: der Kopf mit dem Tagesziel ---- */
.held {
  margin: 0 0 12px; padding: 18px 18px 16px; border-radius: 24px; color: #f8fafc;
  background:
    radial-gradient(90% 110% at 100% 0%, rgba(56, 189, 248, .20), transparent 55%),
    radial-gradient(80% 120% at 0% 100%, rgba(99, 102, 241, .26), transparent 60%),
    linear-gradient(160deg, #15223d, #0b1222);
  box-shadow: 0 16px 40px -16px rgba(11, 18, 34, .6);
}
.held-oben { display: flex; align-items: center; gap: 18px; }
.held-ring { position: relative; flex: 0 0 auto; width: 126px; height: 126px; }
.held-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.hr-bahn { fill: none; stroke: rgba(255, 255, 255, .10); stroke-width: 10; stroke-linecap: round; }
.hr-wert {
  fill: none; stroke: #60a5fa; stroke-width: 10; stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(96, 165, 250, .65));
}
.hr-wert.voll { stroke: #fbbf24; filter: drop-shadow(0 0 6px rgba(251, 191, 36, .6)); }
.held-ring-in {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.held-ring-in b { font-size: 36px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.held-ring-in span { margin-top: 4px; font-size: 10.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: #93a4bd; }
.held-ziel { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.held-punkte { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Punkte als Münzen: grau = noch offen, Gold = verdient */
.held-punkte i {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .14);
}
.held-punkte i.an {
  background: radial-gradient(circle at 35% 30%, #fef3c7, #fbbf24 45%, #d97706);
  box-shadow: 0 0 12px rgba(251, 191, 36, .55), inset 0 -2px 0 rgba(146, 64, 14, .35);
}
.held-punkte span { margin-left: 4px; font-size: 13px; color: #a5b4c8; font-variant-numeric: tabular-nums; }
.held-punkte span b { font-size: 19px; color: #fff; font-weight: 800; }
.held-ziel small { font-size: 13px; line-height: 1.4; color: #a5b4c8; }
.held-ziel small b { color: #fff; }
.held-unten { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.held-zahl {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
  padding: 11px 13px 10px; border-radius: 16px;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.held-zahl-l {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: #93c5fd;
}
.held-zahl.termin .held-zahl-l { color: #86efac; }
.held-zahl b { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.held-zahl b i { font-style: normal; font-size: 15px; font-weight: 750; color: #facc15; margin-left: 5px; }
.held-zahl small { font-size: 11.5px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 760px) {
  .held { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; padding: 22px 24px; }
  .held-unten { margin-top: 0; }
}
@media (max-width: 360px) {
  .held-ring { width: 108px; height: 108px; }
  .held-ring-in b { font-size: 30px; }
  .held-oben { gap: 14px; }
}

/* Datumsleiste über Arbeitstag und Season: ohne Kasten, groß */
.at-datum { border-color: transparent; box-shadow: 0 0 0 1px rgba(15, 23, 42, .05), var(--shadow-tile); border-radius: 14px; }
.at-schritt { border-color: transparent; box-shadow: 0 0 0 1px rgba(15, 23, 42, .05), var(--shadow-tile); border-radius: 14px; }

/* ---- Übersicht: Ausgänge als Chips mit Zahl ---- */
.fchips {
  display: flex; gap: 6px; overflow-x: auto;
  margin: 0 -14px; padding: 2px 14px 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.fchips::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .fchips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; } }
.fchip {
  appearance: none; cursor: pointer; flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 5px 12px 5px 5px; border-radius: 999px;
  border: 1px solid transparent; background: #fff; color: var(--ink-2);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .06), var(--shadow-tile);
  font-size: 13px; font-weight: 650; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s, transform .12s var(--ease);
}
.fchip:active { transform: scale(.96); }
.fchip-ic {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c);
}
.fchip.hell .fchip-ic { background: #eef2f7; color: #334155; }
.fchip-n { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip.on {
  background: color-mix(in srgb, var(--c) 90%, #0f172a); color: #fff;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--c) 70%, transparent);
}
.fchip.on .fchip-ic { background: rgba(255, 255, 255, .22); color: #fff; }
.fchip.on .fchip-n { color: rgba(255, 255, 255, .8); }
.fchip.hell.on { background: #1e293b; box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .5); }
@media (hover: hover) { .fchip:not(.on):hover { color: var(--ink); box-shadow: 0 0 0 1px rgba(15, 23, 42, .12), var(--shadow-tile); } }

/* ---- Listenzeilen: Zeichen des Ausgangs im getönten Quadrat ---- */
.lz {
  gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .05), var(--shadow-tile);
}
.lz.fremd { background: #fbfcfe; border-style: solid; border-color: transparent; }
.lz.fremd .lz-ic { opacity: .7; }
.lz-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c);
}
.lz-ic.hell { background: #f1f5f9; color: #334155; box-shadow: inset 0 0 0 1px var(--line); }
.lz-mid strong { font-size: 14px; }
.lz-aus { font-weight: 700; color: color-mix(in srgb, var(--c) 72%, #0f172a); }
.lz-termin {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  margin-top: 4px; padding: 2px 8px 2px 6px; border-radius: 999px;
  background: #e9f9ef; color: #15803d; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.lz-time { font-weight: 600; }
.liste { gap: 7px; }
.filterbar { gap: 10px; margin-bottom: 14px; }
.ifield-sm input { min-height: 44px; border-radius: 14px; border-color: transparent; font-size: 15px; font-weight: 500;
                   box-shadow: 0 0 0 1px rgba(15, 23, 42, .06), var(--shadow-tile); }
.ifield-sm input:focus { box-shadow: 0 0 0 1px var(--accent), var(--ring); }
.ifield-sm .ifield-ic { left: 13px; }
.ifield-sm input { padding-left: 38px; }

/* Gemeinsame Ruhe für die Karten in den Tabs: Haarlinie als Schatten statt Rand */
.serie, .erkenntnis, .tp-karte, .q-karte, .ki-schritt, .ki-eingabe, .se-karte, .rang-zeile,
.import-row, .set-row, .set-board, .ab-zeile, .erg-zeile, .s-tabelle, .kreuz-wrap {
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .05), var(--shadow-tile);
}
.serie, .tp-karte, .se-karte, .q-karte, .ki-schritt { border-radius: 18px; }
.serie { padding: 14px 16px; }
.serie-v { font-size: 30px; font-weight: 800; }
.serie-balken { height: 8px; border-radius: 4px; }
.serie-balken i { background: linear-gradient(90deg, #f97316, #dc2626); border-radius: 4px; }
.erk-ic { border-radius: 11px; width: 34px; height: 34px; }
.erkenntnis { padding: 11px 14px; border-radius: 16px; }
.rang-zeile { padding: 11px 14px; border-radius: 16px; }
.rang-zeile.ich { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, #fff), var(--shadow-tile); }
.rang-balken, .erg-balken { height: 8px; }
.ausgang-streifen { height: 16px; gap: 3px; }
.ab-zeile { border-radius: 13px; }
.set-row + .set-row { box-shadow: 0 0 0 1px rgba(15, 23, 42, .05), var(--shadow-tile); border-top: 1px solid var(--line-soft); }

/* Season: Monatskopf und Kalender */
.season-titel strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.season-knopf b { font-size: 24px; font-weight: 800; }
.se-karte { padding: 14px; }
.se-gitter { gap: 6px; }
.se-tag { border-radius: 11px; font-size: 15px; font-weight: 800; }
.se-woche { border-radius: 11px; }

/* ---- Importe und Gebiete ---- */
.import-liste { gap: 8px; }
.import-row { padding: 12px 12px 11px 12px; border-radius: 18px; }
.imp-kopf { gap: 10px; }
.imp-kopf .icon-btn { width: 36px; height: 36px; border-radius: 11px; border-color: transparent; background: var(--line-soft); }
.imp-kopf .icon-btn.danger { background: #fef2f2; }
.imp-titel { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.imp-titel strong { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-titel small { font-size: 12px; color: var(--muted); }
/* Fortschritt bearbeitet / alle als Ring */
.imp-ring {
  flex: 0 0 auto; position: relative; width: 44px; height: 44px; border-radius: 50%;
  background: conic-gradient(#22c55e calc(var(--p) * 1%), #e8edf3 0);
  display: flex; align-items: center; justify-content: center;
}
.imp-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.imp-ring b { position: relative; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.imp-ring b i { font-style: normal; font-size: 9px; font-weight: 700; color: var(--muted); }
.imp-ring.fertig { background: #22c55e; }
.imp-zahlen { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.imp-zahlen > span:not(.imp-weg) {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 4px 10px; border-radius: 999px; background: var(--line-soft);
  font-size: 12px; color: var(--ink-2);
}
.imp-zahlen b { font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.imp-zahlen .imp-weg { margin-left: auto; }
.import-row > .imp-zu { margin-top: 8px; }
.imp-zu select { min-height: 34px; font-size: 13px; font-weight: 500; border-radius: 10px; }
.imp-pruefung { margin: 8px 0 0; }
.gebiet-row { border-left: 0; position: relative; padding-left: 16px; overflow: hidden; }
.gebiet-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.gebiet-row .imp-zeile { margin-top: 6px; }

/* ---- Mitglieder ---- */
.lz.mg { border-left: 0; position: relative; overflow: hidden; padding: 14px 14px 12px 18px; border-radius: 18px; }
.lz.mg::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.mg-zahlen span { border-radius: 12px; padding: 7px 2px; background: var(--line-soft); }
.mg-zahlen b { font-size: 18px; font-weight: 800; }
.tz-avatar { border-radius: 14px; width: 42px; height: 42px; font-size: 13px; }

/* Leerzustand freundlicher */
.leer { padding: 56px 24px; gap: 12px; font-size: 14px; }
.leer svg { width: 44px; height: 44px; padding: 10px; border-radius: 16px; background: #fff; color: #9aa8bb;
            box-shadow: 0 0 0 1px rgba(15, 23, 42, .05), var(--shadow-tile); box-sizing: content-box; }
.mg-geb-wahl, .geb-wahl, .imp-zu select { max-width: 100%; min-width: 0; }
.mg-gebiete > select, .mg-knoepfe > select { flex: 0 1 auto; }

/* Season, Mein Monat: Fortschritt zum Monatsziel */
.sz {
  margin: 0 0 12px; padding: 15px 16px 14px; border-radius: 20px; color: #f8fafc;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(251, 191, 36, .18), transparent 55%),
    linear-gradient(160deg, #15223d, #0b1222);
  box-shadow: 0 12px 30px -14px rgba(11, 18, 34, .6);
}
.sz-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sz-l { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: #fcd34d; }
.sz-v { font-size: 15px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.sz-v b { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.sz-balken { height: 10px; margin: 10px 0 12px; border-radius: 6px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.sz-balken i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f59e0b, #fbbf24 60%, #fde68a); box-shadow: 0 0 12px rgba(251, 191, 36, .5); }
.sz-unten { display: flex; flex-wrap: wrap; gap: 6px; }
.sz-teil { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: 12px; color: #a5b4c8; font-variant-numeric: tabular-nums; }
.sz-teil b { color: #fff; font-size: 13px; }
.sz-teil.voll { background: rgba(74, 222, 128, .16); color: #bbf7d0; }

/* ===========================================================================
   Karte: Tageskarte (HUD) und Legende (seit 25.10.2026)
   =========================================================================== */
.hud {
  position: absolute; z-index: 18; top: 12px; left: 12px;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 24px);
  padding: 6px 8px 6px 6px; border: 0; border-radius: 20px; cursor: pointer; text-align: left;
  color: #f8fafc;
  background: rgba(11, 18, 34, .78);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 10px 28px -8px rgba(2, 6, 23, .55), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform .14s var(--ease), background .15s;
}
.hud:active { transform: scale(.97); }
@media (hover: hover) { .hud:hover { background: rgba(11, 18, 34, .88); } }
.hud-ring { position: relative; flex: 0 0 auto; width: 44px; height: 44px; }
.hud-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.hud-ring .hr-bahn, .hud-ring .hr-wert { stroke-width: 13; }
.hud-ring b {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.hud-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hud-text strong { font-size: 13px; font-weight: 700; white-space: nowrap; }
.hud-text small { font-size: 11.5px; color: #a5b4c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-termin {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  margin-left: 2px; padding: 6px 10px 6px 8px; border-radius: 14px;
  background: rgba(255, 255, 255, .07); color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.hud-termin b { font-size: 15px; font-weight: 800; color: #e2e8f0; }
.hud-termin.an { background: rgba(34, 197, 94, .18); color: #86efac; }
.hud-termin.an b { color: #bbf7d0; }
.hud-termin i { font-style: normal; font-size: 12px; font-weight: 800; color: #facc15; }

/* Unter der Tageskarte liegt nichts, was man im Potential braucht – dort
   gehört die Fläche dem Kasten zum Einkreisen. */
#view-map:has(#potPanel:not([hidden])) .hud,
#view-map:has(#potPanel:not([hidden])) .karten-legende { display: none; }
/* Beim Verschieben einer Nadel tritt sie zurück wie alles andere. */
body.move-mode .hud { opacity: .35; pointer-events: none; }

/* Handy und iPad hochkant: auf der Karte steht der Tagesstand in der
   Tageskarte, die Kopfzeile wird ruhiger. In den anderen Tabs bleibt er oben. */
@media (max-width: 1023.98px) {
  body.view-map:not(:has(#potPanel:not([hidden]))) .topbar .stat-chip { display: none; }
}
@media (min-width: 700px) {
  .hud { top: 16px; left: 16px; padding: 8px 10px 8px 8px; gap: 12px; border-radius: 22px; }
  .hud-ring { width: 52px; height: 52px; }
  .hud-ring b { font-size: 16px; }
  .hud-text strong { font-size: 14px; }
  .hud-text small { font-size: 12px; }
}

/* Legende unten links, nur wo Platz ist */
.karten-legende { display: none; }
@media (min-width: 1024px) {
  .karten-legende {
    position: absolute; z-index: 17; left: 16px; bottom: 28px;
    display: flex; flex-direction: column; gap: 5px;
    padding: 10px 12px; border-radius: 16px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    box-shadow: var(--shadow-float); border: 1px solid rgba(255, 255, 255, .7);
    font-size: 12px; font-weight: 600; color: var(--ink-2);
    pointer-events: none;
  }
  .karten-legende span { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
  .karten-legende i {
    width: 11px; height: 11px; border-radius: 50% 50% 50% 2px; transform: rotate(-45deg);
    background: var(--c); box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(15, 23, 42, .35);
  }
  .karten-legende i.hell { box-shadow: 0 0 0 1.5px #334155; }
}
@media (prefers-reduced-motion: reduce) { .hud { transition: none; } }

/* Ziel des Kontos (seit 25.10.2026): Lead-Konten gelb, Termin-Konten grün */
.ziel-termin { color: #15803d; }
.ziel-lead { color: #a16207; }
.brand-konto.ziel-termin { color: #4ade80; }
.brand-konto.ziel-lead { color: #facc15; }

/* Logo oben links nach Ziel des Kontos (seit 26.10.2026): Termin-Konto grün,
   Lead-Konto gelb; darunter klein „Termine“ / „Leads“. */
.brand-txt { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.brand-modus {
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800;
  margin-top: 2px;
}
.brand-modus:empty { display: none; }
.brand[data-ziel="termin"] .brand-marke svg {
  background: linear-gradient(140deg, #4ade80 0%, #16a34a 55%, #15803d 100%);
  box-shadow: 0 4px 12px -2px rgba(22, 163, 74, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand[data-ziel="lead"] .brand-marke svg {
  color: #422006;
  background: linear-gradient(140deg, #fde047 0%, #facc15 55%, #eab308 100%);
  box-shadow: 0 4px 12px -2px rgba(234, 179, 8, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand[data-ziel="termin"] .brand-modus { color: #4ade80; }
.brand[data-ziel="lead"] .brand-modus { color: #facc15; }
.tz-ziel { flex: 0 0 auto; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

/* Lead erfassen (Lead-Konto, seit 26.10.2026): Formular im Blatt und die Karte mit
   den Kundendaten an einer grünen Nadel. */
.lead-form { padding: 4px 2px 0; }
.lf-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 360px) { .lf-zwei { grid-template-columns: 1fr; } }
.lf-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-wahl label { position: relative; }
.lf-wahl input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.lf-wahl span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
  text-transform: none; letter-spacing: 0;
}
.lf-wahl input:checked + span { background: #15803d; border-color: #15803d; color: #fff; }
.lf-wahl input:focus-visible + span { box-shadow: var(--ring); }
.lf-frei { font-style: normal; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .7; }
.lead-form input:user-invalid { border-color: #dc2626; }
.lf-fuss { position: sticky; bottom: 0; background: var(--card); padding-top: 8px; display: flex; gap: 8px; }
.lf-fuss .block { flex: 1 1 auto; }
.kunde-karte {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(21, 128, 61, .07); box-shadow: inset 0 0 0 1px rgba(21, 128, 61, .22);
}
.kk-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kk-kopf strong { font-size: 15px; }
.kk-zeilen { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.kk-zeilen a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 600; }
.kk-zeilen span:empty { display: none; }
.lf-fuss .btn[type="submit"] { background: #15803d; border-color: #15803d; color: #fff; gap: 6px; }
.lf-fuss .btn[type="submit"]:active { background: #166534; }
.lf-einw {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px;
  background: #f8fafc; box-shadow: inset 0 0 0 1px var(--line);
}
.lf-einw.erteilt { flex-direction: row; align-items: center; justify-content: space-between; color: #15803d; }
.lf-einw.erteilt span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.lf-einw-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lf-haken { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; }
.lf-haken input { width: 22px; height: 22px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #15803d; }
.lf-widerruf { margin: 0; font-size: 12px; color: var(--muted); }
.lf-warn { margin: 0; font-size: 12.5px; color: #b45309; font-weight: 600; }
.lf-einw .chip { align-self: flex-start; text-decoration: none; }
.lf-sig-h { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lf-sig {
  width: 100%; aspect-ratio: 300 / 110; touch-action: none; background: #fff;
  border: 1.5px dashed #94a3b8; border-radius: 10px; cursor: crosshair;
}
.lf-sig.fehlt { border-color: #dc2626; }
svg.unterschrift { display: block; }
svg.unterschrift path { fill: none; stroke: #0f172a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kk-einw { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: #15803d; font-weight: 600; }
.kk-einw.fehlt { color: #b45309; }
.kk-einw svg.unterschrift { margin-left: auto; }
.kk-widerruf { margin-top: 6px; background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: #b91c1c; text-decoration: underline; cursor: pointer; }
.kk-verborgen { font-size: 12.5px; color: var(--muted); padding: 8px 12px; border-radius: 10px; background: #f8fafc; }
=======
/* Übersicht in Schüben (seit 25.10.2026): unsichtbarer Anker am Ende, an dem die
   nächsten Zeilen nachgeladen werden (listeBeobachten in main.js). */
.liste-mehr { flex: none; height: 1px; margin-top: -6px; }

/* ===========================================================================
   Termine (seit 30.10.2026): Kalender wie 3057_calendar – Tag, 3 Tage, Woche,
   Monat, Liste. Tipp auf einen Block → Blatt mit den Knöpfen.
   =========================================================================== */

/* PV / Wärmepumpe / beides – im Blatt unter dem Termin und im Folgetermin. */
.tart-reihe { display: flex; gap: 6px; flex-wrap: wrap; }
.tart {
  appearance: none; cursor: pointer; flex: 1 1 0; min-width: 0; min-height: 38px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  font-size: 13px; font-weight: 650; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s, transform .12s var(--ease);
}
.tart:active { transform: scale(.97); }
.tart.an { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Der Tab füllt die Höhe; gescrollt wird im Raster, im Monat und in der Liste. */
#termineWrap button, .tk-knopf { font-family: inherit; }
#termineWrap {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  background: var(--card);
}
.tk-kopf {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px 6px;
}
.tk-titel { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.tk-titel strong { font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tk-titel small { font-size: 11px; color: var(--muted); }
.tk-heute {
  appearance: none; cursor: pointer; flex: 0 0 auto; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 13px; font-weight: 650; color: var(--ink);
}
.tk-heute:active { background: var(--line-soft); }

.tk-leiste { display: flex; gap: 6px; padding: 0 12px 8px; align-items: stretch; }
.tk-switch {
  flex: 1 1 auto; display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: #e6ebf2; min-width: 0;
}
.tk-switch button {
  appearance: none; border: 0; cursor: pointer; flex: 1 1 0; min-width: 0;
  padding: 7px 2px; border-radius: 7px; background: none;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap;
}
.tk-switch button.an { background: var(--accent); color: #fff; }
.tk-wer {
  appearance: none; cursor: pointer; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2);
}
.tk-wer.an { background: var(--ink); border-color: var(--ink); color: #fff; }
.tk-offen {
  appearance: none; cursor: pointer; margin: 0 12px 8px; padding: 7px 10px;
  display: flex; align-items: center; gap: 6px; border: 0; border-radius: 10px;
  background: #fef3c7; color: #92400e; font-size: 12.5px; font-weight: 650; text-align: left;
}
.tk-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }

/* ---- Tag / 3 Tage / Woche: Zeitraster ------------------------------------ */
.tk-raster { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.tk-rkopf { display: grid; border-bottom: 1px solid var(--line); background: var(--card); }
.tk-kcol {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ink);
}
.tk-kcol .wday { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tk-kcol .num { font-size: 19px; font-weight: 650; line-height: 30px; min-width: 30px; height: 30px; border-radius: 50%; }
.tk-kcol.heute .num { background: var(--accent); color: #fff; font-size: 14px; }
.tk-rscroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-bottom: var(--safe-bottom);
}
.tk-rgrid { --hh: 52px; display: grid; position: relative; }
.tk-stunden { border-right: 1px solid var(--line); }
.tk-std {
  height: var(--hh); position: relative; top: -7px; padding: 0 6px;
  text-align: right; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.tk-dcol { position: relative; border-right: 1px solid var(--line-soft); }
.tk-dcol.heute { background: var(--accent-soft); }
.tk-slot { height: var(--hh); border-bottom: 1px solid var(--line-soft); }
.tk-block {
  position: absolute; z-index: 2; margin-left: 1px;
  appearance: none; border: 0; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; overflow: hidden;
  padding: 3px 6px; border-radius: 7px;
  background: var(--c); color: #fff; border-left: 3px solid rgba(0, 0, 0, .22);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
  transition: transform .12s var(--ease), box-shadow .15s;
}
.tk-block:active { transform: scale(.97); box-shadow: 0 6px 18px rgba(15, 23, 42, .25); }
.tk-block.alt {
  background: repeating-linear-gradient(135deg, #e2e8f0 0 6px, #f1f5f9 6px 12px);
  color: #64748b; border-left-color: #94a3b8; box-shadow: none;
}
.tk-b-t { font-size: 10.5px; font-weight: 600; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-b-n {
  font-size: 12px; font-weight: 650; line-height: 1.35; display: flex; align-items: center; gap: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tk-b-n svg { flex: 0 0 auto; }
.tk-block.kurz { flex-direction: row; align-items: center; gap: 4px; padding-block: 1px; }
.tk-block.kurz .tk-b-t { display: none; }
.tk-jetzt { position: absolute; left: 0; right: 0; height: 2px; background: #dc2626; z-index: 5; pointer-events: none; }
.tk-jetzt::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }

/* ---- Monat --------------------------------------------------------------- */
.tk-monat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.tk-mkopf { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.tk-mkopf span { text-align: center; padding: 7px 0; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tk-mgitter { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.tk-mzelle {
  min-width: 0; min-height: 0; overflow: hidden; cursor: pointer; padding: 3px 3px 2px;
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 2px;
}
.tk-mzelle.fremd { opacity: .38; }
.tk-mnr { font-size: 12.5px; font-weight: 600; align-self: flex-start; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; }
.tk-mzelle.heute .tk-mnr { background: var(--accent); color: #fff; }
.tk-mev {
  appearance: none; border: 0; cursor: pointer; text-align: left; width: 100%;
  padding: 1px 4px; border-radius: 4px; background: var(--c); color: #fff;
  font-size: 10.5px; font-weight: 550; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 2px solid rgba(0, 0, 0, .22);
}
.tk-mev b { font-weight: 700; }
.tk-mev.alt { background: #e2e8f0; color: #64748b; }
/* Follow-up (Termin an einer Wiedervorlage, 30 min): gelber Streifen links. */
.tk-block.fu, .tk-mev.fu { border-left-color: #eab308; }
.tk-b-fu { flex: 0 0 auto; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: 9.5px; padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, .18); }
.tk-block.alt .tk-b-fu { background: #fde68a; color: #92400e; }
.lz-termin.fu { background: #fef3c7; color: #92400e; }
/* Block einer Nadel, die nicht mehr Termin/Wiedervorlage ist: rot gestrichelt, mit ✕. */
.tk-block.verwaist { outline: 2px dashed #dc2626; outline-offset: -2px; opacity: .85; }
.tk-mev.verwaist { outline: 1.5px dashed #dc2626; outline-offset: -1.5px; }
.tk-litem.verwaist { border-color: #fecaca; border-left-color: #dc2626; border-left-style: dashed; }
.tk-litem { position: relative; }
.tk-b-nadel {
  display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; margin-top: 2px;
  padding: 0 5px; border-radius: 4px; background: #fee2e2; color: #991b1b;
  font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tk-block.kurz .tk-b-nadel { display: none; }
.tk-x {
  position: absolute; top: 3px; right: 3px; z-index: 3; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; min-width: 24px; height: 24px; padding: 0 5px;
  justify-content: center; border-radius: 7px; background: #fff; color: #dc2626;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .25); font-size: 11px;
}
.tk-x b { font-weight: 800; }
.tk-x.fragt { background: #dc2626; color: #fff; animation: tk-weg-puls 1s ease-in-out infinite; }
.tk-litem .tk-x { top: 50%; right: 10px; transform: translateY(-50%); height: 30px; min-width: 30px; }
.tk-block.kurz .tk-x { top: 50%; transform: translateY(-50%); height: 20px; min-width: 20px; }
/* Storniert: Name durchgestrichen, Zeit ist im Kalender wieder frei. */
.tk-block.storno .tk-b-n, .tk-mev.storno, .tk-litem.storno strong { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.tk-block.storno { opacity: .7; }
.tk-nadel { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #fee2e2; color: #991b1b; }
.tk-weg { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; }
.tk-weg small { font-size: 12px; color: #7f1d1d; line-height: 1.4; }
.tk-weg .btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.tk-weg .btn.fragt { animation: tk-weg-puls 1s ease-in-out infinite; }
@keyframes tk-weg-puls { 50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, .25); } }
.tk-fu { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #fef3c7; color: #92400e; }
.tk-mmehr { font-size: 10px; color: var(--muted); padding-left: 3px; }

/* ---- Liste --------------------------------------------------------------- */
.tk-agenda { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 12px calc(24px + var(--safe-bottom)); }
.tk-lgrp h4 {
  display: flex; align-items: center; gap: 6px; margin: 14px 2px 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2);
}
.tk-lgrp.warn h4 { color: #b45309; }
.tk-litem {
  appearance: none; cursor: pointer; width: 100%; text-align: left; margin-bottom: 6px;
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px;
  color: var(--ink);
}
.tk-litem:active { background: var(--line-soft); }
.tk-litem.alt { opacity: .6; }
.tk-lzeit { display: flex; flex-direction: column; min-width: 42px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-lzeit small { font-size: 11px; font-weight: 500; color: var(--muted); }
.tk-lmid { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-lmid strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-lmid small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Schilder und das Blatt ---------------------------------------------- */
.tk-schilder { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tk-art, .tk-st {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.tk-art { background: #e0e7ff; color: #3730a3; }
.tk-st { background: color-mix(in srgb, var(--c) 13%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); }
.tk-info { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 12px; }
.tk-alt-info { font-size: 12px; color: var(--muted); }
.tk-notiz { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); white-space: pre-line; line-height: 1.4; }
.tk-neufolge { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.tk-aktionen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tk-knopf {
  appearance: none; cursor: pointer; min-height: 64px; padding: 6px 2px;
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 28%, var(--line)); border-radius: 14px;
  background: #fff; color: color-mix(in srgb, var(--c, var(--accent)) 80%, #000);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11.5px; font-weight: 650; transition: background .15s, color .15s, transform .12s var(--ease);
}
.tk-knopf:active { transform: scale(.96); }
.tk-knopf.an { background: var(--c); border-color: var(--c); color: #fff; }
.tk-knopf.folge { --c: var(--accent); }
.tk-form {
  display: flex; flex-direction: column; gap: 10px; margin-top: 10px;
  padding: 10px; border-radius: 12px; background: var(--line-soft);
}
.tk-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tk-form input {
  font: inherit; font-size: 15px; padding: 9px 10px; min-height: 42px;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff; color: var(--ink);
}
.tk-form input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.tk-hinweis { font-size: 11.5px; color: var(--muted); }
.tk-form-knoepfe { display: flex; gap: 8px; justify-content: flex-end; }
