/* Startseite: „Letzte Spiele“ / „Nächste Spiele“ (includes/startseite_spiele.php).
   Kacheln und Pillen kommen aus apps.css (.app-games, .app-tab). */

.home-games { margin-top: 28px; }
.home-games__kopf {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; margin-bottom: 14px;
}
.home-games__kopf h2 { margin: 0; font-size: 1.6rem; }
.home-games__filter { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-600); }
.home-games__filter select {
  min-width: 260px; padding: 9px 36px 9px 12px; border: 1px solid var(--border); border-radius: 999px;
  font: inherit; font-weight: 600; color: var(--ink-900); cursor: pointer; appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ef7b00' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.home-games__filter select:hover { border-color: var(--brand-orange); }
.home-games__filter select:focus { outline: 2px solid var(--brand-orange); outline-offset: 1px; }

/* eine Zeile je Spiel: links Wochentag + Datum, in der Mitte Paarung mit dem Bewerb darunter, rechts Zeit/Ergebnis */
.hg-spiel {
  display: grid; grid-template-columns: 3.4em 1fr auto; align-items: center; gap: 2px 14px;
  padding: 9px 6px; margin: 0 -6px; border-top: 1px solid var(--border); border-radius: 8px;
  color: var(--ink-700); text-decoration: none; font-size: 0.92rem;
}
.app-games__title + .hg-spiel { border-top-color: transparent; }
a.hg-spiel[href]:hover { background: var(--surface-muted); }
.hg-datum {
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
  color: var(--ink-600); font-size: 0.8rem; font-variant-numeric: tabular-nums;
}
.hg-datum b { font-size: 0.95rem; font-weight: 700; color: var(--ink-900); }
.hg-mitte { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
.hg-mitte .hg-teams { flex: 1 1 100%; }

/* LIVE-Marke, Spielstand in der Zeile */
.hg-live {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; color: #fff; background: #d6001c;
}
.hg-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: hg-puls 1.4s ease-in-out infinite; }
@keyframes hg-puls { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .hg-live i { animation: none; } }
.hg-wert .hg-live-satz { font-weight: 700; color: #d6001c; }
/* Sätze: bis zu vier je Zeile, ein 5-Satz-Spiel bekommt eine zweite Zeile statt die Paarung zu verdrängen */
.hg-wert small.hg-saetze { max-width: 13em; margin-left: auto; white-space: normal; line-height: 1.1; font-size: 0.68rem; }
.hg-wert .hg-ergebnis { line-height: 1; font-size: 1.15rem; }
.hg-saetze span { display: inline-block; white-space: nowrap; }
.hg-saetze span + span { margin-left: 0.45em; }

.hg-bewerb {
  justify-self: start; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  font-size: 0.72rem; font-weight: 600; border: 1px solid transparent;
}
/* Liga & Cup und Landesklasse gleich – der Bewerb steht im Text der Pille */
.hg-bewerb.hg-liga,
.hg-bewerb.hg-lk { color: #203b54; background: #eef1f5; border-color: #dde3ea; }

.hg-teams { min-width: 0; max-width: 100%; display: flex; flex-wrap: wrap; column-gap: 4px; color: var(--ink-900); font-weight: 600; }
.hg-gegen { color: var(--ink-400); font-weight: 400; }

.hg-wert { text-align: right; white-space: nowrap; }
.hg-ergebnis {
  font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 1.25rem; font-weight: 800; color: var(--ink-900);
}
.hg-wert small { display: block; font-size: 0.72rem; color: var(--ink-400); }
.hg-zeit { font-weight: 600; color: var(--ink-600); }
.hg-fehlt { font-size: 0.82rem; font-weight: 500; color: var(--ink-400); }
.hg-leer { color: var(--ink-400); margin: 6px 0; }
.hg-weg { display: none !important; }

@media (max-width: 860px) {
  .home-games__filter { flex: 1 1 100%; min-width: 0; }
  .home-games__filter select { flex: 1; min-width: 0; width: 100%; text-overflow: ellipsis; }
  /* Handy: Heim und Gast je in einer eigenen Zeile, Namen nicht mitten im Namen umbrechen */
  .hg-spiel { gap: 2px 10px; }
  .hg-teams { flex-direction: column; }
  .hg-teams > span:not(.hg-gegen) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hg-gegen { display: none; }
  /* Sätze untereinander statt nebeneinander, damit die Paarung Platz behält und die Zeile nicht höher wird */
  .hg-wert .hg-ergebnis { line-height: 1; font-size: 1.1rem; }
  .hg-wert small.hg-saetze { max-width: 6.4em; line-height: 1.15; font-size: 0.68rem; }   /* zwei Sätze je Zeile */
  .hg-bewerb { padding: 2px 7px; }
  .hg-live { padding: 2px 6px; gap: 4px; }
  .hg-mitte { column-gap: 4px; }
}
