/* ============================================================
   dashboard2.css — Homescreen „Bühne“ (js/screens/dashboard2.js)

   Leitidee nach Pauls Rückmeldung („überladen, zu viel“): EIN
   Grün. Oben die satte Fando-Bühne wie bei Login und Shop – sie
   trägt Kopf, Gruß und die Kennzahlen als Glas-Scorecard. Darunter
   rollt EINE weiße Fläche mit großem Radius über die Bühne; die
   Sektionen darin sind ruhige Zeilen mit Overline-Köpfen, keine
   Karten-Stapel. Keine 3D-Optik, kein Parallax.
   ============================================================ */

.dash5 { min-height: 100%; display: flex; flex-direction: column; background: var(--surface); }

/* ---------------- Grüne Bühne ---------------- */
.d5-hero {
  position: relative; overflow: hidden; color: #fff;
  padding: calc(var(--safe-top) + 14px) 20px 46px;
  background: linear-gradient(150deg, #5aa233 0%, #43811f 60%, #356a1b 100%);
}
/* Palmen-Wasserzeichen wie auf der Shop-Bühne und im „Was ist neu“ –
   dasselbe Zeichen auf jeder grünen Fläche. (Vorher standen hier zwei
   Ringe; Paul wollte die Palme, wie überall sonst.) */
.d5-hero::before {
  content: ""; position: absolute; right: -48px; bottom: -40px; width: 238px; height: 272px;
  background: url("../img/logo-white.svg") no-repeat center / contain;
  opacity: 0.12; pointer-events: none;
  /* Bewusst angeschnitten, aber GROSS: Die Krone steht frei über der
     Scorecard, Stamm und rechte Wedel laufen aus dem Bild. Eine ganz
     sichtbare kleine Palme mitten in der Fläche sieht aus wie ein
     verrutschtes Bild; eine angeschnittene große liest sich als Fläche. */
  transform-origin: 60% 30%;
  animation: palm-sway 7s ease-in-out infinite;
}
.d5-hero > * { position: relative; z-index: 1; }

.d5-top { display: flex; justify-content: space-between; align-items: center; }
.d5-ol {
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
}
/* App-Name direkt unter der Marke: nur minimal größer, dicht dran. */
.d5-app { font-size: var(--fs-md); font-weight: var(--fw-bold); line-height: 1.15; }
.d5-ib {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.d5-ib .avatar { --sz: 40px; }
.d5-chip {
  height: 40px; padding: 0 13px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-weight: var(--fw-bold); font-size: var(--fs-sm);
}
.d5-greet {
  margin-top: 16px;
  font-size: var(--fs-3xl); font-weight: var(--fw-black);
  letter-spacing: var(--tracking-tight); line-height: 1.05;
}
/* „Servus,“ gedämpft, der Name voll – wie im alten Kopf, nur auf Grün. */
.d5-greet .hi { color: rgba(255, 255, 255, 0.68); font-weight: var(--fw-semibold); }

/* Glas-Scorecard: eine Zeile Kennzahlen + eine Status-Zeile.
   Rang führt, Ziffern in Weiß, Trennlinien hauchdünn. */
.d5-score {
  margin-top: 18px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.d5-srow { display: flex; align-items: stretch; padding: 13px 6px; }
.d5-stat {
  flex: 1; min-width: 0; text-align: center;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.d5-stat + .d5-stat { border-left: 1px solid rgba(255, 255, 255, 0.16); }
.d5-stat b { font-size: var(--fs-xl); font-weight: var(--fw-black); line-height: 1.05; font-variant-numeric: tabular-nums; }
.d5-stat.rank b { font-size: 26px; }
.d5-stat .sl {
  font-size: 9px; font-weight: var(--fw-bold);
  letter-spacing: 0.09em; text-transform: uppercase; color: rgba(255, 255, 255, 0.68);
}
.d5-form { display: flex; align-items: center; justify-content: center; gap: 5px; height: calc(var(--fs-xl) * 1.05); }
.d5-form .fd { width: 9px; height: 9px; border-radius: 50%; background: #fff; font-style: normal; }
.d5-form .fd.l { background: rgba(255, 255, 255, 0.34); }

.d5-goal {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px 12px; border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.d5-goal .l {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.d5-goal .l .icon { flex: none; }
.d5-goal .r { margin-left: auto; white-space: nowrap; font-size: var(--fs-sm); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.d5-goal .bar { flex-basis: 100%; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.d5-goal .bar i { display: block; height: 100%; border-radius: 99px; background: #fff; transform-origin: left; }

/* ---------------- Weiße Fläche ---------------- */
.d5-sheet {
  flex: 1; position: relative; z-index: 2;
  background: var(--surface); border-radius: 26px 26px 0 0;
  margin-top: -26px; padding: 4px 16px 8px;
  box-shadow: 0 -12px 30px rgba(35, 37, 37, 0.12);
}
.d5-sec { margin-top: 4px; }
.d5-sec .section-head { margin: 22px 2px 12px; }

/* ---------------- Bilanz-Zeile --------------------------------
   Zwei farbige Bereiche (Breite = Sieg-Verhältnis), bewusst
   schlank: flache Farben, keine Schatten, feine Fuge. Kam vom
   Homescreen und wohnt jetzt im Profil (Modifier .pf). */
.d4-wlbar { display: flex; gap: 2px; height: 30px; margin: 12px 2px 0; }
.d4-wlbar.pf { height: 26px; margin: 14px auto 0; width: 66%; align-self: center; }
.d4-wlbar .w, .d4-wlbar .l {
  flex-basis: 0; min-width: 0; display: flex; align-items: center; overflow: hidden;
  font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap;
}
/* Die Farbsprache der App: Siege grün (wie „Bin da“), Ndl. grau –
   Niederlagen sind hier nirgends rot. */
.d4-wlbar .w { background: var(--fando-600); color: #fff; border-radius: 99px 4px 4px 99px; justify-content: flex-start; padding-left: 12px; }
.d4-wlbar .l { background: var(--stone-200); color: var(--ink-600); border-radius: 4px 99px 99px 4px; justify-content: flex-end; padding-right: 12px; }
/* Steht nur eine Seite (0 Ndl., 0 Siege oder noch kein Spiel):
   volle Rundung, Beschriftung links. */
.d4-wlbar .w.only, .d4-wlbar .l.only { flex-grow: 1; border-radius: 99px; justify-content: flex-start; padding: 0 12px; }
.d4-wlbar .l.only { color: var(--text-muted); }
.d4-wlbar span { display: inline-flex; align-items: center; gap: 4px; }
.d4-wlbar .icon { width: 12px; height: 12px; }
.d4-wlbar i { font-style: normal; font-variant-numeric: tabular-nums; }

/* ---------------- Schwebende Aktionsleiste ---------------- */
.d4-sentinel { height: 1px; }
.d4-dock { position: sticky; top: 0; z-index: 10; padding: 14px 0 4px; }
.d4-dock::before {
  content: ""; position: absolute; inset: 0 -16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  opacity: 0; transition: opacity var(--dur-2);
}
/* Kein weißer Container: jeder Knopf steht frei und trägt seinen
   eigenen weichen Schatten (reine Tiefenstaffelung). */
.d4-dock .bar { position: relative; display: flex; gap: 10px; align-items: center; }
.d4-dock.pinned { padding: calc(var(--safe-top) + 8px) 0 8px; }
.d4-dock.pinned::before { opacity: 1; }
.d4-cta {
  flex: 1; height: 50px; border-radius: var(--r-pill); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(135deg, #5aa233, #3f7620);
  color: #fff; font-size: var(--fs-md); font-weight: var(--fw-bold);
  box-shadow: 0 8px 18px rgba(53, 106, 27, 0.30);
}
.d4-cta:active { background: var(--fando-600); }
/* Die Acht bleibt schwarz (sie IST die schwarze Kugel), der Pokal
   sitzt als grünes Icon im weißen Kreis. */
.d4-side {
  flex: none; width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: var(--ink-800); border: 0; color: #fff;
  box-shadow: 0 8px 18px rgba(35, 37, 37, 0.26);
}
.d4-side.light {
  background: #fff; color: var(--fando-700);
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(35, 37, 37, 0.16);
}
/* Die Acht als flache Scheibe – bewusst ohne Kugel-Glanz */
.d4-eight {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--ink-800); font-size: 13px; font-weight: var(--fw-black);
  font-style: normal; line-height: 1;
}
/* Geteilte Modus-Kugeln flach ziehen */
.dash5 .mode-ball { background: var(--ball, #1c1d1d); box-shadow: none; }

/* ---------------- Sektion: Im Lokal (Lokal-Karte) ----------------
   Zwei Etagen statt der alten Einzeiler-Zeile: oben WER da ist
   (tippbar → volle Liste), unten die EIGENE Meldung als Leiste.
   Die alten .d4-lokal-*-Regeln bleiben darunter stehen – dashboard.js
   (geteilte Sheets) und der alte Homescreen nutzen sie weiterhin. */
.lok-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.lok-head {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  padding: 12px 14px; border: 0; background: none; cursor: pointer;
  text-align: left; color: inherit; font: inherit;
}
.lok-head > .icon-sm:last-child { flex: none; color: var(--stone-300); }
.lok-head .d4-pulse { display: inline-block; margin-right: 8px; vertical-align: 1px; }
/* Leerlauf-Kreis, wenn keine Gesichter zu zeigen sind */
.lok-orb {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fando-tint); color: var(--fando-700);
}
.lok-orb.idle { background: var(--stone-100); color: var(--stone-500); }

/* Meine Leiste: neutral = zwei Segmente, sonst Zustand + Aktion(en) */
.lok-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-top: 1px solid var(--border);
}
.lok-seg {
  flex: 1; min-width: 0; height: 42px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: none; color: var(--text);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.lok-seg.primary {
  background: var(--fando); border-color: var(--fando); color: #fff;
  box-shadow: 0 4px 10px rgba(53, 106, 27, 0.22);
}
.lok-state {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); white-space: nowrap;
}
.lok-state .icon-sm { flex: none; }
.lok-seit { font-weight: var(--fw-regular); color: var(--text-muted); margin-left: 4px; }
.lok-act {
  flex: none; height: 36px; padding: 0 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.lok-act.primary { background: var(--fando); border-color: var(--fando); color: #fff; }
/* „Du bist da“: die ganze Leiste färbt sich leise Fando – Bestätigung
   ohne Feuerwerk, die Abmeldung bleibt als klarer Knopf erhalten. */
.lok-bar.is-in { background: var(--fando-tint); border-top-color: var(--fando-200); }
.lok-bar.is-in .lok-state { color: var(--fando-700); }
.lok-bar.is-in .lok-act { background: var(--surface); border-color: var(--fando-200); }
.lok-bar.is-coming .lok-state { color: var(--text); }

.d4-lokal-line { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 2px; }
.d4-pulse { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--fando); margin: 0 3px; }
.d4-pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--fando); animation: pulse-ring 2s var(--ease-out) infinite;
}
.d4-pulse.idle { background: var(--stone-300); }
.d4-pulse.idle::after { display: none; }
.dash5 .presence-faces .avatar { box-shadow: 0 0 0 2px var(--surface); }
.dash5 .pr-avatar.is-coming { opacity: 0.55; }
.d4-lokal-line .d4-sm { flex: none; }
.d4-lokal-cta { display: flex; gap: 8px; margin-top: 11px; padding: 0 2px; }
.d4-sm {
  height: 36px; padding: 0 15px; border-radius: var(--r-pill); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  background: var(--fando); border: 1px solid var(--fando); color: #fff;
}
.d4-sm.ghost { background: none; border-color: var(--border-strong); color: var(--text); }
.d4-sm.slim { background: none; border-color: transparent; color: var(--text-muted); padding: 0 8px; }

/* Laufende Spiele: weiße Karten-Zeilen wie das Spotlight */
.d4-live {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  margin-top: 10px; padding: 11px 13px; color: inherit; font: inherit;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-xs); border-radius: 14px;
}
/* Spiele ANDERER: sattes Grün mit weißem Text – das eigene bleibt weiß. */
.d4-live.other {
  background: linear-gradient(135deg, #5aa233, #3f7620);
  border: 0; color: #fff;
  box-shadow: 0 6px 16px rgba(53, 106, 27, 0.24);
}
.d4-live.other .caption { color: rgba(255, 255, 255, 0.85); }
.d4-live.other .score i { color: rgba(255, 255, 255, 0.75); }
.d4-live.other .badge-green { background: rgba(255, 255, 255, 0.22); color: #fff; }
/* Auf der grünen Zeile ginge das fando-grüne Tisch-Symbol unter. */
.d4-live.other .table-chip .icon-sm { color: #fff; }
.d4-live .score { font-weight: var(--fw-bold); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.d4-live .score i { font-style: normal; color: var(--text-subtle); }

/* ---------------- „Für dich“: Schnapp-Karten ---------------- */
.d4-car {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 8px;
  scrollbar-width: none;
}
.d4-car::-webkit-scrollbar { display: none; }
.d4-cc {
  flex: 0 0 78%; scroll-snap-align: center; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-xs);
}
/* Kopfzeilen kräftig: sattes Grün, Kronen-Karten dunkel mit Gold */
.d4-cc .hd {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 14px; background: var(--fando-600);
}
.d4-cc .hd .k {
  font-size: 10px; font-weight: var(--fw-black); letter-spacing: 0.1em;
  text-transform: uppercase; color: #fff;
}
.d4-cc .hd .badge { background: rgba(255, 255, 255, 0.22); color: #fff; }
.d4-cc.gold .hd { background: var(--ink-800); }
.d4-cc.gold .hd .k { color: var(--gold); }
.d4-cc.gold .hd .badge { background: rgba(255, 255, 255, 0.16); color: var(--gold-pale); }
.d4-cc.stone .hd { background: var(--stone-200); }
.d4-cc.stone .hd .k { color: var(--ink-600); }
.d4-cc.stone .hd .badge { background: #fff; color: var(--text-muted); }
.d4-cc .bd { display: flex; align-items: center; gap: 11px; padding: 12px 14px; min-width: 0; }
.d4-cc .bd .avatar { --sz: 40px; }
.d4-cc.more {
  flex-basis: 42%; align-items: center; justify-content: center; gap: 8px; padding: 14px;
  background: linear-gradient(150deg, #5aa233, #3f7620); border: 0; color: #fff;
  font-size: var(--fs-sm); font-weight: var(--fw-bold); text-align: center;
}
.d4-dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.d4-dots span { width: 6px; height: 6px; border-radius: 99px; background: var(--stone-300); transition: width var(--dur-2) var(--ease-standard), background var(--dur-2); }
.d4-dots span.on { width: 18px; background: var(--fando); }

/* ---------------- Spotlight als leise Zeile ----------------
   Der Ton (green/gold/red/dust) lebt nur noch im Icon-Plättchen –
   die Zeile selbst ist eine eingelassene Fläche, kein Vollton. */
.d5-spot {
  width: 100%; text-align: left; cursor: default;
  display: flex; align-items: center; gap: 12px;
  margin-top: 22px; padding: 13px 14px;
  border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-xs);
  color: inherit; font: inherit;
}
button.d5-spot { cursor: pointer; }
.d5-spot .sic { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.d5-spot .sic.green { background: var(--fando-100); color: var(--fando-700); }
.d5-spot .overline { color: var(--fando-700); }
.d5-spot .sic.red { background: var(--danger-tint); color: var(--danger); }
.d5-spot .sic.dust { background: var(--stone-200); color: var(--stone-600); }
.d5-spot .sic.gold { background: var(--ink-800); color: var(--gold); }
.d5-spot .btn { background: var(--surface); }

/* ---------------- Motto-Woche: der laute Banner ----------------
   Läuft die Motto-Woche, darf sie NICHT leise sein (Pauls Wunsch):
   satte Fando-Fläche mit Palmen-Wasserzeichen (Pflicht auf jedem Grün)
   und einmaligem Glanz-Streif. Die Belohnung steht als Chips darunter –
   gibt es Ranglisten-Punkte, führen sie als VOLLWEISSER Chip, die
   Palmen folgen im leisen Glas-Chip. Angekündigte Wochen bleiben die
   .d5-spot-Zeile darüber. */
.d5-motto {
  position: relative; overflow: hidden; width: 100%; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  margin-top: 22px; padding: 15px 14px 15px 16px;
  border-radius: 18px; color: #fff; font: inherit; text-align: left;
  background: linear-gradient(150deg, #5aa233 0%, #43811f 60%, #356a1b 100%);
  box-shadow: var(--shadow-sm);
}
.d5-motto::before {
  content: ""; position: absolute; right: -34px; bottom: -30px; width: 150px; height: 172px;
  background: url("../img/logo-white.svg") no-repeat center / contain;
  opacity: 0.13; pointer-events: none;
  transform-origin: 60% 30%;
  animation: palm-sway 7s ease-in-out infinite;
}
.d5-motto > * { position: relative; z-index: 1; }
.d5-motto .wn-glint { z-index: 0; }
.d5-motto .mo-ol {
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.78);
}
.d5-motto .mo-name {
  font-size: var(--fs-xl); font-weight: var(--fw-black);
  letter-spacing: var(--tracking-tight); line-height: 1.1;
}
.d5-motto .mo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.mb-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap;
}
/* Punkte schlagen Palmen: der Punkte-Chip ist vollweiß und steht vorn. */
.mb-chip.points { background: #fff; box-shadow: none; color: var(--fando-700); }
.mb-chip .mb-palm { width: 13px; height: 15px; object-fit: contain; }
.d5-motto .mo-more { flex: none; color: rgba(255, 255, 255, 0.75); }

/* ---------------- Saisonfinale: die dunkle Bühne am Start ----------------
   Geplant, läuft, beendet – immer dieselbe Karte (js/screens/dashboard2.js
   finalBuehne). Dunkles Plättchen mit Gold wie die Kronen-Chips, grüner
   Lichtschein oben links (gold, wenn beendet), Palme als Wasserzeichen,
   Medaillon links. Der Chip, der MICH betrifft, steht vorn und ist weiss
   (hot) oder grün (ok); der Rest ist Glas. */
.d5-final {
  position: relative; overflow: hidden; width: 100%; cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 22px; padding: 14px 14px 13px;
  border-radius: 18px; color: #fff; font: inherit; text-align: left;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(90, 162, 51, 0.42), transparent 55%),
    linear-gradient(160deg, var(--ink-800), var(--ink-900));
  box-shadow: var(--shadow-md);
}
.d5-final.final { background:
    radial-gradient(120% 90% at 0% 0%, rgba(240, 200, 90, 0.32), transparent 55%),
    linear-gradient(160deg, var(--ink-800), var(--ink-900)); }
.d5-final::before {
  content: ""; position: absolute; right: -40px; bottom: -36px; width: 170px; height: 194px;
  background: url("../img/logo-white.svg") no-repeat center / contain;
  opacity: 0.07; pointer-events: none;
}
.d5-final > * { position: relative; z-index: 1; }
.d5-final .wn-glint { z-index: 0; }
.df-medal {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(200, 162, 74, 0.35);
}
.df-medal .icon { width: 22px; height: 22px; }
.d5-final.running .df-medal { color: #fff; box-shadow: 0 0 0 2px var(--fando), 0 0 18px rgba(90, 162, 51, 0.5); }
.df-ol {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-pale);
}
.d5-final.running .df-ol { color: #b9ec9a; }
.df-ol .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.df-name {
  font-size: var(--fs-xl); font-weight: var(--fw-black);
  letter-spacing: var(--tracking-tight); line-height: 1.1; color: #fff;
}
.df-sub { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: rgba(255, 255, 255, 0.7); }
.df-top { display: flex; align-items: center; gap: 12px; width: 100%; }
/* Chips in eigener Zeile unter dem Kopf: volle Breite, kein Umbruch neben
   dem Medaillon (dort war die Karte 194 px hoch). */
.df-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.df-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap; color: #fff;
}
.df-chip .icon-sm { width: 13px; height: 13px; }
.df-chip.hot { background: #fff; color: var(--ink-900); box-shadow: none; }
.df-chip.ok { background: var(--fando); box-shadow: none; }
.df-chip.dim { color: rgba(255, 255, 255, 0.6); }
.df-chip.gold { color: var(--gold-pale); box-shadow: inset 0 0 0 1px rgba(200, 162, 74, 0.45); }
.df-more { flex: none; color: rgba(255, 255, 255, 0.6); }

/* ---------------- Sektion: Aktivität ----------------
   Die Zeile ist ein Rahmen mit drei Plätzen: Symbol, antippbarer Text
   (führt zum Spieler) und – bei freudigen Momenten – der Daumen. Zwei
   getrennte Knöpfe, weil ein Knopf im Knopf ungültiges HTML wäre. */
/* Die Verwaltungszeilen sind seit dem Angleich MINI-KARTEN: gleiche
   Familie wie die Momente (Fläche, Rundung), nur eine Stufe leiser –
   getönte Fläche statt Weiß, kein Rahmen, kein Schatten, weniger Luft.
   Vorher wechselten sich fette Karten und nackte Balken ab; das las
   sich wie zwei verschiedene Apps übereinander. */
.d4-act {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  padding: 10px 12px; margin-top: 8px;
  background: var(--bg-sunken); border-radius: var(--r-lg);
}
/* Gesicht und Daumen richten sich an der ERSTEN Textzeile aus: Bei
   umgebrochenen Sätzen schwamm das mittig zentrierte Gesicht sonst
   zwischen den Zeilen, und jede Zeile sah anders aus. */
.d4-act .activity-dot { flex: none; margin-top: 2px; }
.d4-act .fd-ava { margin-top: 2px; }
/* Auf der getönten Fläche braucht der stille Daumen Weiß, sonst versinkt er. */
.d4-act .act-thumb { margin-top: 2px; background: var(--surface); }
.d4-act .act-thumb.on { background: var(--fando-100); }
.d4-act .when { font-variant-numeric: tabular-nums; }
.d4-act-txt {
  min-width: 0; text-align: left; background: none; border: 0; padding: 0;
  font: inherit; color: inherit; cursor: pointer;
}
/* Kein einsames Wort in der zweiten Zeile („… zum ¶ Doppel“) – wo der
   Browser es kann, bricht er den Satz ausgewogen um. */
.d4-act-txt .small { line-height: 1.4; text-wrap: pretty; }
.d4-act-meta { margin-top: 2px; }
.act-who { color: var(--fando-700); font-weight: var(--fw-semibold); margin-top: 2px; }

/* Daumen: still, solange niemand reagiert hat – wer selbst gratuliert
   hat, sieht seinen Daumen grün gefüllt. Kein Rot, keine Zähler-Blase:
   Es ist eine Geste, keine Statistik. */
.act-thumb {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--stone-100); color: var(--text-muted); border: 0;
  font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  cursor: pointer; transition: transform var(--dur-2) var(--ease-standard), background var(--dur-2), color var(--dur-2);
}
.act-thumb:active { transform: scale(0.9); }
.act-thumb.on { background: var(--fando-100); color: var(--fando-700); }
.act-thumb .icon-sm { width: 15px; height: 15px; }

.feed-more, .feed-end {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 0 4px; font-size: var(--fs-2xs); color: var(--text-subtle);
}
.feed-end { padding-top: 14px; }

/* ============================================================
   Bewegung — Bühne zuerst, dann rollt die Fläche nach; Sektionen
   steigen beim Erscheinen ein (nur .first, Live-Updates still).
   ============================================================ */
@keyframes d4-rise { from { opacity: 0; transform: translateY(20px) scale(0.985); } }

.dash5.first [data-reveal]:not(.in) { opacity: 0; }
.dash5.first [data-reveal].in { animation: d4-rise var(--dur-4) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms); }

/* Bühnen-Einzug: Kopf, Gruß, Scorecard nacheinander */
.dash5.first .d5-top { animation: fade-down var(--dur-3) var(--ease-out) both; }
.dash5.first .d5-greet { animation: fade-up var(--dur-4) var(--ease-out) 90ms both; }
.dash5.first .d5-score { animation: fade-up var(--dur-4) var(--ease-out) 180ms both; }
.dash5.first .d5-stat { animation: fade-in var(--dur-3) var(--ease-out) both; }
.dash5.first .d5-stat:nth-child(1) { animation-delay: 280ms; }
.dash5.first .d5-stat:nth-child(2) { animation-delay: 350ms; }
.dash5.first .d5-stat:nth-child(3) { animation-delay: 420ms; }
.dash5.first .d5-stat:nth-child(4) { animation-delay: 490ms; }
.dash5.first .d5-form .fd { animation: pop-in var(--dur-4) var(--ease-spring) both; animation-delay: calc(520ms + var(--i, 0) * 45ms); }
.dash5.first .d5-goal { animation: fade-in var(--dur-3) var(--ease-out) 560ms both; }
.dash5.first .d5-goal .bar i { animation: grow-bar 700ms var(--ease-out) 680ms both; }

/* Die weiße Fläche rollt kurz nach der Bühne hoch */
.dash5.first .d5-sheet { animation: d4-rise var(--dur-5, 480ms) var(--ease-out) 120ms both; }
.dash5.first .d4-dock .bar { animation: scale-in var(--dur-4) var(--ease-spring) 260ms both; }

/* Die Bilanz-Hälften schieben sich im Profil von beiden Seiten zusammen */
.d4-wlbar.pf { overflow: hidden; }
.d4-wlbar.pf .w { animation: d4-wl-left 550ms var(--ease-out) 200ms both; }
.d4-wlbar.pf .l { animation: d4-wl-right 550ms var(--ease-out) 200ms both; }
@keyframes d4-wl-left { from { transform: translateX(-102%); opacity: 0.4; } }
@keyframes d4-wl-right { from { transform: translateX(102%); opacity: 0.4; } }

/* Schnapp-Karten treten nacheinander von rechts an */
.dash5.first .d4-fyi.in .d4-cc { animation: slide-in-right var(--dur-4) var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 75ms); }
.dash5.first .d4-fyi.in .d4-dots { animation: fade-in var(--dur-3) var(--ease-out) 600ms both; }

.dash5.first .d4-acts.in .d4-act { animation: fade-up var(--dur-3) var(--ease-out) both; animation-delay: calc(100ms + var(--i, 0) * 60ms); }

/* ---------------- Feed-Karten (Momente) ----------------
   Momente mit Titel sind Karten mit Gesichtern und Endstand; die
   Verwaltungszeilen bleiben schmal dazwischen. Drei Bühnen:
   hell (Standard), dunkel mit Gold (Krone), grün mit Palme (Feste). */
.d4-fc {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-xs);
  padding: 12px 13px 9px; margin-top: 10px;
}
.d4-fc > * { position: relative; z-index: 1; }
.fc-main {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  text-align: left; background: none; border: 0; padding: 0;
  font: inherit; color: inherit; cursor: pointer;
}
div.fc-main { cursor: default; }
.fc-head { display: block; font-size: var(--fs-md); font-weight: var(--fw-bold); letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
.fc-txt { display: block; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.4; margin-top: 3px; text-wrap: pretty; }
.fc-score {
  flex: none; align-self: center; margin-left: 4px;
  font-size: var(--fs-xl); font-weight: var(--fw-black);
  letter-spacing: -0.02em; color: var(--fando-700);
}
.fc-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--stone-100);
  min-height: 26px;
}
.fc-foot .act-who { margin-top: 0; }

/* Gesichter mit kleiner Typ-Marke – auch in den schmalen Zeilen. */
.fd-ava { position: relative; flex: none; display: flex; }
.fd-ava .avatar { --sz: 38px; box-shadow: 0 0 0 2px var(--surface); }
.fd-ava .avatar + .avatar { margin-left: -12px; }
.fd-ava .fd-ic {
  position: absolute; right: -5px; bottom: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal;
  background: var(--stone-100); color: var(--text-muted);
  box-shadow: 0 0 0 2px var(--surface);
}
.fd-ava .fd-ic .icon-sm { width: 12px; height: 12px; }
.fd-ava .fd-ic.green { background: var(--fando-100); color: var(--fando-700); }
.fd-ava .fd-ic.gold { background: var(--ink-800); color: var(--gold); }
.d4-act .fd-ava .avatar { --sz: 34px; }

/* Krone: dunkle Bühne, goldene Schrift. */
.d4-fc.fc-gold {
  background: linear-gradient(150deg, var(--ink-700) 0%, var(--ink-900) 100%);
  border-color: transparent; color: #fff;
}
.fc-gold .fc-head { color: var(--gold); }
.fc-gold .fc-txt { color: rgba(255,255,255,0.8); }
.fc-gold .fc-score { color: var(--gold); }
.fc-gold .fc-foot { border-top-color: rgba(255,255,255,0.14); }
.fc-gold .caption { color: rgba(255,255,255,0.55); }
.fc-gold .act-who { color: var(--gold-pale); }
.fc-gold .act-thumb { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.85); }
.fc-gold .act-thumb.on { background: var(--gold); color: var(--ink-900); }
.fc-gold .fd-ava .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,0.28); }
.fc-gold .fd-ava .fd-ic { box-shadow: 0 0 0 2px var(--ink-800); }

/* Feste (Geburtstag, Jubiläum): grüne Bühne – und jede grüne Fläche
   trägt die grosse, angeschnittene Palme. */
.d4-fc.fc-fest {
  background: linear-gradient(158deg, #5aa233 0%, #43811f 58%, #33641a 100%);
  border-color: transparent; color: #fff;
}
.d4-fc.fc-fest::before {
  content: ""; position: absolute; right: -30px; bottom: -34px;
  width: 120px; height: 138px; pointer-events: none; z-index: 0;
  background: url("../img/logo-white.svg") no-repeat center / contain;
  opacity: 0.16;
  transform-origin: 60% 30%;
  animation: palm-sway 7s ease-in-out infinite;
}
.fc-fest .fc-head { color: #fff; }
.fc-fest .fc-txt { color: rgba(255,255,255,0.88); }
.fc-fest .fc-foot { border-top-color: rgba(255,255,255,0.2); }
.fc-fest .caption { color: rgba(255,255,255,0.75); }
.fc-fest .act-who { color: #fff; }
.fc-fest .act-thumb { background: rgba(255,255,255,0.18); color: #fff; }
.fc-fest .act-thumb.on { background: #fff; color: var(--fando-700); }
.fc-fest .fd-ava .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,0.4); }
.fc-fest .fd-ava .fd-ic { background: #fff; color: var(--fando-700); box-shadow: none; }

/* Gestaffeltes Einblenden auch für die Karten. */
.dash5.first .d4-acts.in .d4-fc { animation: fade-up var(--dur-3) var(--ease-out) both; animation-delay: calc(100ms + var(--i, 0) * 60ms); }
@media (prefers-reduced-motion: reduce) {
  .d4-fc.fc-fest::before { animation: none; }
}
