/* IRGENDWO im Seitenlook „Chrom auf Schwarz“.
   1) Die Leiste unter der App (die App selbst gestaltet src/globals.css im Bundle).
   2) Die Rangliste /irgendwo/rangliste (Klassen .irl-*), auf dem Server gerendert. */

/* ============ 1. App ============ */
/* Die App bringt ihre Gestaltung selbst mit (spiele-quellen/irgendwo/src/globals.css). Hier nur,
   was auf der Seite um sie herum liegt. */

/* Leiste unter der App: Rangliste, Wochenwertung, Spielinfo */
.ir-leiste {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
  max-width: 1600px; margin: 0.5rem auto 0; padding: 0 24px;
}
.ir-leiste a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-2); text-decoration: none;
  padding: 0.7rem 1rem; border: 1px solid var(--linie); border-radius: 999px;
  transition: color var(--dauer-1), border-color var(--dauer-1);
}
.ir-leiste a .i { width: 0.95rem; height: 0.95rem; color: var(--spiel-cyan); }
.ir-leiste a:hover { color: var(--text); border-color: var(--linie-hell); }

/* ============ 2. Rangliste ============ */
.irl { max-width: 64rem; margin: 0 auto; }

.irl-kopf { padding-bottom: 1.6rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--linie); }
.irl-dach {
  display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.9rem;
  font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-2);
}
.irl-marke { width: 8px; height: 8px; background: var(--spiel-cyan); flex: none; }
.irl-kopf h1 { margin: 0 0 0.6rem; }
.irl-unter { color: var(--text-2); margin: 0 0 1.3rem; }
.irl-aktionen { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }

/* Zeitraum als Reiter */
.irl-reiter { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.irl-reiter a {
  display: inline-flex; align-items: baseline; gap: 0.6rem;
  padding: 0.65rem 1.1rem; border: 1px solid var(--linie-hell); border-radius: 999px;
  color: var(--text-2); text-decoration: none; font-weight: 600;
  transition: color var(--dauer-1), border-color var(--dauer-1), background-color var(--dauer-1);
}
.irl-reiter a small { font: 500 0.68rem/1 var(--mono); letter-spacing: 0.06em; color: var(--text-3); }
.irl-reiter a:hover { color: var(--text); border-color: #4a4a4a; }
.irl-reiter a[aria-current="page"] { background: #f2f2f2; border-color: #f2f2f2; color: #000; }
.irl-reiter a[aria-current="page"] small { color: #3a3a3a; }

/* Filter */
.irl-filter {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 0.75rem; align-items: end;
  padding: 1rem; margin-bottom: 1.4rem;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund);
}
.irl-feld { display: grid; gap: 0.35rem; min-width: 0; }
.irl-feld > span { font: 500 0.66rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); }
.irl-feld select { padding: 0.6rem 0.75rem; border-radius: 10px; background: #050505; }
.irl-los { white-space: nowrap; }

/* Kennzahlen */
.irl-zahlen {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 1.4rem;
  border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden;
}
.irl-zahlen div { padding: 0.9rem 1.1rem; border-left: 1px solid var(--linie); min-width: 0; }
.irl-zahlen div:first-child { border-left: 0; }
.irl-zahlen dt { font: 500 0.66rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); }
.irl-zahlen dd { margin: 0.3rem 0 0; font: 500 1.35rem/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.irl-zahlen dd small { font-size: 0.72rem; color: var(--text-3); }

/* Liste */
.irl-liste {
  list-style: none; margin: 0; padding: 0;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden;
}
.irl-liste--ich { margin-top: 0.6rem; border-style: dashed; border-color: var(--linie-hell); }
.irl-zeile {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) 7rem 5.5rem 7.5rem; gap: 0.9rem; align-items: center;
  padding: 0.8rem 1.1rem; border-top: 1px solid var(--linie);
  transition: background-color var(--dauer-1);
}
.irl-zeile:first-child { border-top: 0; }
.irl-zeile:hover { background: var(--flaeche-2); }
.irl-platz { font: 900 1.45rem/1 var(--display); color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.irl-zeile--1 .irl-platz { color: var(--spiel-cyan); }
.irl-zeile--2 .irl-platz, .irl-zeile--3 .irl-platz { color: var(--text); }
.irl-zeile--ich { position: relative; background: rgb(56 212 255 / 6%); }
.irl-zeile--ich::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--spiel-cyan); }
.irl-zeile--ich:hover { background: rgb(56 212 255 / 9%); }
.irl-wer { display: grid; gap: 0.15rem; min-width: 0; }
.irl-name { font-weight: 700; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irl-name:hover { text-decoration: underline; }
.irl-name--weg { color: var(--text-3); font-style: italic; font-weight: 500; }
.irl-du {
  justify-self: start; font: 500 0.6rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em;
  color: #000; background: var(--spiel-cyan); padding: 0.2rem 0.4rem; border-radius: 4px;
}
.irl-wer small { font-size: 0.8rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irl-wer .irl-nurklein { display: none; font-family: var(--mono); font-size: 0.74rem; }
.irl-wert { display: grid; gap: 0.15rem; text-align: right; }
.irl-wert b { font: 500 1rem/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); }
.irl-wert small { font: 500 0.62rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.irl-wert--punkte b { font-size: 1.15rem; color: var(--text); }

.irl-leer { margin-top: 0.2rem; }
.irl-leer p:first-child { color: var(--text); }
.irl-ich { margin: 0.9rem 0 0; color: var(--text-2); font-size: 0.92rem; text-align: center; }

.irl-regeln { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--linie); color: var(--text-2); font-size: 0.94rem; }
.irl-regeln h2 { font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 1rem; }
.irl-regeln ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.5rem; max-width: 48rem; }
.irl-regeln b { color: var(--text); }

@media (max-width: 900px) {
  .irl-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .irl-los { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .ir-leiste { padding: 0 16px; }
  .irl-zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .irl-zahlen div:nth-child(3) { border-left: 0; }
  .irl-zahlen div:nth-child(n + 3) { border-top: 1px solid var(--linie); }
  .irl-zeile { grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 0.7rem; padding: 0.75rem 0.85rem; }
  .irl-wert--treffer, .irl-wert--zeit { display: none; }
  .irl-wer .irl-nurklein { display: block; }
  .irl-platz { font-size: 1.2rem; }
}
@media (max-width: 420px) {
  .irl-filter { grid-template-columns: 1fr; padding: 0.85rem; }
  .irl-reiter a { flex: 1; justify-content: center; }
}

/* Handy: die Reiter der App liegen als feste Leiste unten – Platz dafuer am Seitenende */
@media (max-width: 760px) {
  body.irgendwo-seite { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}
