/* ============================================================================
   overview.css – Moderator-Übersicht (kompakt).
   Telefon-first, eine Bildschirmhöhe ohne Scrollen. Gedacht zum Mitmoderieren:
   aktueller Stand (Punkte), Platzierung und Tendenz auf einen Blick, darunter
   die Top 3. Baut auf theme.css auf (Tokens, .hc-card, .hc-badge, Keyframes).
   ========================================================================== */

:root {
  --ov-max: 460px;
  --ov-pad: 14px;
  --sa-top: env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
  --sa-left: env(safe-area-inset-left, 0px);
  --sa-right: env(safe-area-inset-right, 0px);
}

body { min-height: 100dvh; }

.mod {
  width: 100%;
  max-width: var(--ov-max);
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(var(--ov-pad) + var(--sa-top))
    calc(var(--ov-pad) + var(--sa-right))
    calc(var(--ov-pad) + var(--sa-bottom))
    calc(var(--ov-pad) + var(--sa-left));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------------------------------------------------------------- Kopf ---- */
.mod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.mod-brand {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Verbindungs-Badge */
.mod-conn { gap: 0.5em; transition: color 0.3s ease, border-color 0.3s ease; }
.mod-conn__dot {
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  background: var(--muted-2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.mod-conn.is-on { color: #61e9b1; border-color: rgba(97, 233, 177, 0.42); }
.mod-conn.is-on .mod-conn__dot {
  background: #2fe6a0;
  box-shadow: 0 0 10px #2fe6a0;
  animation: hc-pulse 2s ease-in-out infinite;
}
.mod-conn.is-off { color: #ff8a8a; border-color: rgba(255, 138, 138, 0.4); }
.mod-conn.is-off .mod-conn__dot {
  background: #ff5d5d;
  box-shadow: 0 0 8px rgba(255, 93, 93, 0.7);
}

/* --------------------------------------------------------------- Hero ----- */
.mod-hero {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Vom Vorzeichen getönter Schein hinter der Karte. */
.mod-hero::before {
  content: '';
  position: absolute;
  inset: -50% -10% auto -10%;
  height: 220px;
  background: radial-gradient(60% 100% at 50% 0%, var(--ov-hero-glow, transparent), transparent 70%);
  pointer-events: none;
  transition: background 0.5s ease;
}
.mod-hero > * { position: relative; z-index: 1; }

.mod-hero__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 1.4em;
}
.mod-hero__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* Platzierung "#3/12" – das Kernstück fürs Moderieren. */
.mod-place {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.mod-place b { color: var(--ink); }
.mod-place small {
  font-family: var(--font-mono);
  font-size: 0.6em;
  font-weight: 700;
  color: var(--muted-2);
}

/* Großer Punktewert */
.mod-points {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.mod-points__value {
  font-size: clamp(3.2rem, 19vw, 4.6rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s ease, text-shadow 0.4s ease;
}
.mod-points[data-tint="hot"] .mod-points__value {
  color: var(--hot-a);
  text-shadow: 0 0 30px rgba(255, 106, 46, 0.45);
}
.mod-points[data-tint="cold"] .mod-points__value {
  color: var(--cold-a);
  text-shadow: 0 0 30px rgba(57, 168, 255, 0.42);
}
.mod-points[data-tint="zero"] .mod-points__value { color: var(--muted); }
.mod-points.is-pop .mod-points__value { animation: count-pop 0.5s ease; }

.mod-points__state {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* Tendenz-Zeile: Cold · Tug-Bar · Hot */
.mod-trend {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.mod-trend__side {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-variant-numeric: tabular-nums;
}
.mod-trend__tag { font-size: 1rem; }
.mod-trend__num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
}
.mod-trend__side--hot { color: var(--hot-a); }
.mod-trend__side--cold { color: var(--cold-a); }
.mod-trend__side.is-pop .mod-trend__num { animation: count-pop 0.45s ease; }

/* Live Mini-Tug-Bar */
.mod-tug {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}
.mod-tug__cold,
.mod-tug__hot { position: absolute; top: 0; bottom: 0; }
.mod-tug__cold {
  left: 0; right: 0;
  background: linear-gradient(90deg, var(--cold-c), var(--cold-b) 60%, var(--cold-a));
  z-index: 0;
}
.mod-tug__hot {
  right: 0;
  width: 50%;
  background: linear-gradient(90deg, var(--hot-a), var(--hot-b) 40%, var(--hot-c));
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}
.mod-tug__seam {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 2px;
  margin-left: -1px;
  z-index: 2;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  animation: seam-pulse 2.4s ease-in-out infinite;
}

/* ------------------------------------------------------------- Top 3 ------ */
.mod-top3 { display: flex; flex-direction: column; gap: 8px; }
.mod-top3__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.mod-top3__count { font-size: 0.7rem; color: var(--muted-2); }

.mod-top3__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mod-medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
  min-width: 0;
  animation: chip-up 0.4s ease both;
}
.mod-medal--1 { border-color: rgba(255, 180, 77, 0.34); background: linear-gradient(180deg, rgba(255, 180, 77, 0.08), rgba(255,255,255,0.02)); }
.mod-medal--2 { border-color: rgba(255, 255, 255, 0.18); }
.mod-medal--3 { border-color: rgba(255, 138, 77, 0.22); }
.mod-medal__rank { font-size: 1.25rem; line-height: 1; }
.mod-medal__points {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.mod-medal__points.is-hot { color: var(--hot-a); }
.mod-medal__points.is-cold { color: var(--cold-a); }
.mod-medal__points.is-zero { color: var(--muted); }
.mod-medal__title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mod-medal--skeleton {
  min-height: 66px;
  background: linear-gradient(100deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: ov-shimmer 1.4s ease-in-out infinite;
}
@keyframes ov-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.mod-empty {
  text-align: center;
  color: var(--muted-2);
  font-size: 0.82rem;
  padding: 12px 0;
}

[hidden] { display: none !important; }

@media (min-width: 420px) {
  :root { --ov-pad: 18px; }
}
