/* =========================================================================
   Amtspokal 2026 - Monitor-Screens
   Für einen Bildschirm im Querformat gebaut: alle Größen skalieren mit der
   Viewport-Höhe, damit derselbe Screen auf 24" wie auf einem Beamer lesbar
   bleibt. Dunkler Grund, weil der Monitor im Clubhaus meist gegen Tageslicht
   steht und heller Text darauf ruhiger wirkt.
   ========================================================================= */

:root {
  --apk-green: #1f7a4d;
  --apk-green-light: #35a96c;
  --apk-accent: #c7e34a;
  --apk-bg: #0d2a1d;
  --apk-bg-2: #103527;
  --apk-surface: rgba(255, 255, 255, 0.07);
  --apk-surface-strong: rgba(255, 255, 255, 0.13);
  --apk-border: rgba(255, 255, 255, 0.14);
  --apk-text: #f2f7f3;
  --apk-text-muted: #a8c3b4;
  --apk-radius: 14px;

  /* Eine Einheit, an der die gesamte Typo hängt: 1vh auf niedrigen Screens,
     nach oben gedeckelt, damit auf 4K nichts absurd groß wird. */
  --apk-u: clamp(6px, 1.35vh, 13px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.apk-screen-body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(53, 169, 108, 0.22) 0%, transparent 60%),
    linear-gradient(160deg, var(--apk-bg-2) 0%, var(--apk-bg) 55%, #082016 100%);
  color: var(--apk-text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.apk-stage {
  height: 100%;
  /* overflow:hidden ist hier Sicherheitsleine: läuft doch mal ein Element
     über, weitet Chrome auf dem Handy sonst den ganzen Layout-Viewport. */
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: calc(var(--apk-u) * 1.8) calc(var(--apk-u) * 2.4) calc(var(--apk-u) * 1.2);
  gap: calc(var(--apk-u) * 1.4);
}

/* ---- Kopfzeile ---------------------------------------------------------- */

.apk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--apk-u) * 2);
  flex: 0 0 auto;
}

.apk-brand {
  display: flex;
  align-items: center;
  gap: calc(var(--apk-u) * 1.5);
  min-width: 0;
}

.apk-wordmark {
  font-size: calc(var(--apk-u) * 2.6);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.apk-wordmark-dot {
  color: var(--apk-accent);
}

.apk-brand-sep {
  width: 2px;
  height: calc(var(--apk-u) * 3);
  background: var(--apk-border);
  border-radius: 2px;
}

.apk-event {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.apk-event strong {
  font-size: calc(var(--apk-u) * 2.4);
  font-weight: 700;
}

.apk-event small {
  font-size: calc(var(--apk-u) * 1.5);
  color: var(--apk-text-muted);
}

.apk-topbar-right {
  display: flex;
  align-items: center;
  gap: calc(var(--apk-u) * 2);
}

.apk-clublogos {
  display: flex;
  gap: calc(var(--apk-u) * 0.9);
}

.apk-clublogos img {
  height: calc(var(--apk-u) * 4.2);
  width: calc(var(--apk-u) * 4.2);
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: calc(var(--apk-u) * 0.3);
}

.apk-clock {
  font-size: calc(var(--apk-u) * 3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--apk-surface);
  border: 1px solid var(--apk-border);
  border-radius: var(--apk-radius);
  padding: calc(var(--apk-u) * 0.4) calc(var(--apk-u) * 1.2);
}

/* ---- Bühne -------------------------------------------------------------- */

.apk-canvas {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--apk-u) * 1.2);
}

.apk-fade-in {
  animation: apk-fade 420ms ease-out;
}

@keyframes apk-fade {
  from {
    opacity: 0;
    transform: translateY(calc(var(--apk-u) * 1.2));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apk-fade-in {
    animation: none;
  }
}

.apk-screen-head {
  display: flex;
  align-items: baseline;
  gap: calc(var(--apk-u) * 1.4);
  flex: 0 0 auto;
}

.apk-screen-head h1 {
  margin: 0;
  font-size: calc(var(--apk-u) * 3.2);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: calc(var(--apk-u) * 1);
}

.apk-screen-sub {
  font-size: calc(var(--apk-u) * 1.7);
  color: var(--apk-text-muted);
}

.apk-livedot {
  width: calc(var(--apk-u) * 1.3);
  height: calc(var(--apk-u) * 1.3);
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6);
  animation: apk-pulse 1.8s infinite;
}

@keyframes apk-pulse {
  70% {
    box-shadow: 0 0 0 calc(var(--apk-u) * 1.4) rgba(255, 77, 77, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
  }
}

.apk-boot,
.apk-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--apk-u) * 2.2);
  color: var(--apk-text-muted);
}

/* ---- Partienliste ------------------------------------------------------- */

.apk-matchlist {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: calc(var(--apk-u) * 1.2);
  /* Karten füllen die Fläche gleichmäßig aus; innerhalb der Karte steht die
     Altersklasse oben und die Begegnung mittig im verbleibenden Raum - so
     wirkt auch ein Screen mit nur drei Partien gefüllt statt verloren. */
  grid-auto-rows: 1fr;
}

/* Ab vier Partien zweispaltig - vorher wirken die Zeilen auf dem Querformat
   verloren breit. */
.apk-matchlist-4,
.apk-matchlist-5,
.apk-matchlist-6 {
  grid-template-columns: 1fr 1fr;
}

/* Je weniger Partien auf dem Screen stehen, desto größer darf alles sein -
   sonst schwimmen drei Zeilen verloren auf einer 16:9-Fläche. --apk-u vererbt
   sich an alles in der Liste, es reicht also, hier die Einheit zu drehen. */
.apk-matchlist-1 {
  --apk-u: clamp(9px, 3.2vh, 30px);
}
.apk-matchlist-2 {
  --apk-u: clamp(8px, 2.5vh, 24px);
}
.apk-matchlist-3 {
  --apk-u: clamp(8px, 2.1vh, 20px);
}
/* Ab hier zweispaltig: pro Karte steht nur noch die halbe Breite zur
   Verfügung, entsprechend zurückhaltender die Einheit. */
.apk-matchlist-4 {
  --apk-u: clamp(7px, 1.6vh, 15px);
}
.apk-matchlist-5,
.apk-matchlist-6 {
  --apk-u: clamp(6px, 1.45vh, 14px);
}

/* Ab sieben Partien dreispaltig (3x3). Die Karte ist dann zu schmal für
   "Seite A | Sätze | Seite B" nebeneinander - darum beide Seiten oben, die
   Sätze mittig darunter. */
.apk-matchlist-7,
.apk-matchlist-8,
.apk-matchlist-9 {
  --apk-u: clamp(6px, 1.4vh, 13px);
  grid-template-columns: repeat(3, 1fr);
}

.apk-matchlist-7 .apk-match-body,
.apk-matchlist-8 .apk-match-body,
.apk-matchlist-9 .apk-match-body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  row-gap: calc(var(--apk-u) * 0.9);
}

.apk-matchlist-7 .apk-scores,
.apk-matchlist-8 .apk-scores,
.apk-matchlist-9 .apk-scores {
  grid-column: 1 / -1;
  order: 3;
}

.apk-match {
  background: var(--apk-surface);
  border: 1px solid var(--apk-border);
  border-radius: var(--apk-radius);
  padding: calc(var(--apk-u) * 1.3) calc(var(--apk-u) * 1.6);
  display: flex;
  flex-direction: column;
  gap: calc(var(--apk-u) * 0.7);
  min-height: 0;
}

.apk-match-live {
  background: linear-gradient(100deg, rgba(53, 169, 108, 0.26), var(--apk-surface));
  border-color: rgba(53, 169, 108, 0.5);
}

.apk-match-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(var(--apk-u) * 1);
}

.apk-ageclass {
  font-size: calc(var(--apk-u) * 1.75);
  font-weight: 700;
  color: var(--apk-accent);
  letter-spacing: 0.01em;
}

.apk-meta {
  font-size: calc(var(--apk-u) * 1.45);
  color: var(--apk-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.apk-match-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  align-content: center;
  gap: calc(var(--apk-u) * 1);
}

.apk-side {
  display: flex;
  align-items: center;
  gap: calc(var(--apk-u) * 0.9);
  min-width: 0;
}

.apk-match-body > .apk-side:last-child {
  flex-direction: row-reverse;
  text-align: right;
}

.apk-side-logo {
  width: calc(var(--apk-u) * 3.1);
  height: calc(var(--apk-u) * 3.1);
  flex: 0 0 auto;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: calc(var(--apk-u) * 0.22);
}

.apk-side-text {
  min-width: 0;
}

.apk-side-player {
  font-size: calc(var(--apk-u) * 1.8);
  font-weight: 600;
  line-height: 1.15;
  /* Zwei Zeilen sind erlaubt - "Heiko Brand/ Michael Breiholz" abzuschneiden
     wäre schlechter als ein Umbruch, Platz ist in der Karte genug. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}

.apk-side-club {
  font-size: calc(var(--apk-u) * 1.4);
  color: var(--apk-text-muted);
  white-space: nowrap;
}

.apk-side-open,
.apk-side-winner .apk-side-open {
  color: var(--apk-text-muted);
  font-weight: 500;
  font-style: italic;
}

.apk-side-winner .apk-side-player {
  color: #fff;
  font-weight: 800;
}

.apk-winner-mark {
  color: var(--apk-accent);
  font-size: calc(var(--apk-u) * 1.5);
  font-weight: 900;
  margin-left: calc(var(--apk-u) * 0.5);
}

.apk-scores {
  display: flex;
  align-items: center;
  gap: calc(var(--apk-u) * 0.6);
  justify-content: center;
}

.apk-set {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  background: var(--apk-surface-strong);
  border-radius: calc(var(--apk-radius) * 0.6);
  padding: calc(var(--apk-u) * 0.25) calc(var(--apk-u) * 0.75);
  font-size: calc(var(--apk-u) * 2.1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.apk-set i {
  font-style: normal;
  opacity: 0.45;
  padding: 0 1px;
}

.apk-set em {
  position: absolute;
  top: calc(var(--apk-u) * -1.1);
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: calc(var(--apk-u) * 0.95);
  letter-spacing: 0.08em;
  color: var(--apk-text-muted);
}

.apk-set-lead-a b:first-child,
.apk-set-lead-b b:last-child {
  color: var(--apk-accent);
}

.apk-set-empty {
  color: var(--apk-text-muted);
  background: transparent;
  font-size: calc(var(--apk-u) * 1.5);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- Ranking ------------------------------------------------------------ */

.apk-ranking {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--apk-u) * 1.4);
}

.apk-rank-card {
  background: var(--apk-surface);
  border: 1px solid var(--apk-border);
  border-top: calc(var(--apk-u) * 0.5) solid var(--apk-club-color, var(--apk-green-light));
  border-radius: var(--apk-radius);
  padding: calc(var(--apk-u) * 1.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--apk-u) * 0.7);
  text-align: center;
  min-height: 0;
}

.apk-rank-1 {
  background: linear-gradient(180deg, rgba(199, 227, 74, 0.2), var(--apk-surface));
  box-shadow: 0 0 0 1px rgba(199, 227, 74, 0.35);
}

.apk-rank-place {
  font-size: calc(var(--apk-u) * 2);
  font-weight: 800;
  color: var(--apk-text-muted);
}

.apk-rank-1 .apk-rank-place {
  color: var(--apk-accent);
}

.apk-rank-logo {
  width: calc(var(--apk-u) * 9);
  height: calc(var(--apk-u) * 9);
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: calc(var(--apk-u) * 0.4);
}

.apk-rank-name {
  font-size: calc(var(--apk-u) * 2.4);
  font-weight: 700;
}

.apk-rank-wins {
  display: flex;
  align-items: baseline;
  gap: calc(var(--apk-u) * 0.6);
}

.apk-rank-wins b {
  font-size: calc(var(--apk-u) * 5);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.apk-rank-wins span {
  font-size: calc(var(--apk-u) * 1.5);
  color: var(--apk-text-muted);
}

.apk-rank-bar {
  width: 100%;
  height: calc(var(--apk-u) * 0.7);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.apk-rank-bar i {
  display: block;
  height: 100%;
  background: var(--apk-club-color, var(--apk-green-light));
  border-radius: 999px;
  transition: width 600ms ease-out;
}

.apk-rank-stats {
  margin: 0;
  display: flex;
  gap: calc(var(--apk-u) * 1.6);
}

.apk-rank-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apk-rank-stats dt {
  font-size: calc(var(--apk-u) * 1.2);
  color: var(--apk-text-muted);
}

.apk-rank-stats dd {
  margin: 0;
  font-size: calc(var(--apk-u) * 1.8);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---- Freitext-Screens --------------------------------------------------- */

.apk-slide {
  /* Ein Freitext-Screen trägt nur eine Botschaft - die darf größer ausfallen
     als eine Partienliste. Wie viel größer, entscheidet die Textmenge
     (Klassen -lg/-md/-sm werden beim Rendern gesetzt). */
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: calc(var(--apk-u) * 3);
}

.apk-slide-lg {
  --apk-u: clamp(8px, 2.6vh, 26px);
}

.apk-slide-md {
  --apk-u: clamp(7px, 1.9vh, 19px);
}

.apk-slide-sm {
  --apk-u: clamp(6px, 1.5vh, 15px);
}

.apk-slide-main {
  min-height: 0;
  overflow: hidden;
}

.apk-slide-main {
  flex: 1 1 auto;
  min-width: 0;
}

.apk-slide h1 {
  margin: 0 0 calc(var(--apk-u) * 1.6);
  font-size: calc(var(--apk-u) * 4.4);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.apk-slide-text {
  font-size: calc(var(--apk-u) * 2.2);
  line-height: 1.45;
  color: #e2eee7;
  max-width: 34em;
}

.apk-slide-text p {
  margin: 0 0 calc(var(--apk-u) * 1.2);
}

.apk-slide-image {
  flex: 0 0 42%;
  /* stretch, damit das Bild die volle Screenhöhe nutzen darf - ohne das
     schrumpft der Container durch align-items:center auf die Bildhöhe. */
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apk-slide-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--apk-radius);
}

/* ---- Fußzeile: Fortschritt --------------------------------------------- */

.apk-progress {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: calc(var(--apk-u) * 1.4);
}

.apk-progress-bar {
  height: 3px;
  flex: 1 1 auto;
  background: var(--apk-accent);
  border-radius: 999px;
  width: 0;
  opacity: 0.65;
}

.apk-dots {
  display: flex;
  gap: calc(var(--apk-u) * 0.2);
}

/* Die Punkte sind Buttons: der sichtbare Punkt ist klein, die Klickfläche
   drumherum aber groß genug für Maus und Finger. */
.apk-dots button {
  width: calc(var(--apk-u) * 1.6);
  height: calc(var(--apk-u) * 1.6);
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apk-dots button::before {
  content: '';
  width: calc(var(--apk-u) * 0.7);
  height: calc(var(--apk-u) * 0.7);
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.apk-dots button:hover::before,
.apk-dots button:focus-visible::before {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.3);
}

.apk-dots button.is-active::before {
  background: var(--apk-accent);
}

/* ---- Teilen (nur Touch-Geräte) ------------------------------------------ */

.apk-share {
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(var(--apk-u) * 4.2);
  height: calc(var(--apk-u) * 4.2);
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--apk-border);
  border-radius: var(--apk-radius);
  background: var(--apk-surface);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: calc(var(--apk-u) * 1.1);
}

.apk-share svg {
  width: 55%;
  height: 55%;
}

@media (hover: none) and (pointer: coarse) {
  .apk-share {
    display: inline-flex;
  }
}

/* ---- Hochkant-Hinweis (nur Handy im Portrait) --------------------------- */

.apk-rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  text-align: center;
  background: var(--apk-bg);
  color: var(--apk-text);
}

.apk-rotate svg {
  color: var(--apk-accent);
  animation: apk-rotate-hint 2.4s ease-in-out infinite;
}

@keyframes apk-rotate-hint {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-90deg);
  }
}

.apk-rotate strong {
  font-size: 1.5rem;
}

.apk-rotate p {
  margin: 0;
  max-width: 28em;
  color: var(--apk-text-muted);
  line-height: 1.45;
}

.apk-rotate-dismiss {
  margin-top: 8px;
  padding: 12px 22px;
  border: 1px solid var(--apk-border);
  border-radius: 999px;
  background: var(--apk-surface-strong);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (orientation: portrait) and (max-width: 900px) {
  .apk-rotate:not(.is-dismissed) {
    display: flex;
  }
}

.apk-offline {
  position: fixed;
  right: calc(var(--apk-u) * 2);
  bottom: calc(var(--apk-u) * 3);
  background: rgba(192, 54, 44, 0.9);
  color: #fff;
  font-size: calc(var(--apk-u) * 1.4);
  padding: calc(var(--apk-u) * 0.5) calc(var(--apk-u) * 1.2);
  border-radius: 999px;
}

/* ---- Hochkant (Handy quer halten oder Tablet im Portrait) --------------- */

@media (orientation: portrait) {
  :root {
    --apk-u: clamp(8px, 2.4vw, 14px);
  }

  /* Die Skalierung nach Kartenzahl/Textmenge rechnet mit der Viewport-Höhe -
     hochkant ist die riesig, darum hier alles auf die Basis-Einheit zurück. */
  .apk-matchlist-1,
  .apk-matchlist-2,
  .apk-matchlist-3,
  .apk-matchlist-4,
  .apk-matchlist-5,
  .apk-matchlist-6,
  .apk-matchlist-7,
  .apk-matchlist-8,
  .apk-matchlist-9,
  .apk-slide-lg,
  .apk-slide-md,
  .apk-slide-sm {
    --apk-u: clamp(8px, 2.4vw, 14px);
  }

  .apk-topbar {
    flex-wrap: wrap;
    gap: calc(var(--apk-u) * 1);
  }

  .apk-brand {
    flex: 1 1 100%;
  }

  .apk-event small {
    display: none;
  }

  .apk-topbar-right {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  /* Begegnung untereinander statt nebeneinander: Seite A, Seite B, Sätze. */
  .apk-match-body {
    grid-template-columns: 1fr;
    gap: calc(var(--apk-u) * 0.8);
  }

  .apk-match-body > .apk-side:last-child {
    flex-direction: row;
    text-align: left;
  }

  .apk-scores {
    order: 3;
    justify-content: flex-start;
  }

  /* Hochkant ist die Breite knapp: alles, was im Querformat bewusst nicht
     umbricht (Meta, Vereinsname, Satz-Chips), darf hier umbrechen, und die
     Grid-Spalten müssen unter ihre Mindestbreite schrumpfen dürfen. */
  .apk-match-body > * {
    min-width: 0;
  }

  .apk-scores {
    flex-wrap: wrap;
  }

  .apk-meta,
  .apk-side-club {
    white-space: normal;
  }

  .apk-slide h1,
  .apk-slide-text {
    overflow-wrap: anywhere;
  }

  .apk-matchlist-4,
  .apk-matchlist-5,
  .apk-matchlist-6,
  .apk-matchlist-7,
  .apk-matchlist-8,
  .apk-matchlist-9 {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    align-content: start;
  }

  /* Neun gestapelte Karten passen hochkant nicht auf einen Schirm - im
     Notlayout darf die Bühne scrollen. */
  .apk-canvas {
    overflow-y: auto;
  }

  .apk-matchlist-7 .apk-scores,
  .apk-matchlist-8 .apk-scores,
  .apk-matchlist-9 .apk-scores {
    grid-column: auto;
  }

  .apk-screen-head {
    flex-wrap: wrap;
    row-gap: 0;
  }

  /* Ranking hochkant: kompakte Zeilenkarten statt drei Podest-Säulen. */
  .apk-ranking {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    align-content: start;
  }

  .apk-rank-card {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      'place logo name wins'
      'bar bar bar bar'
      'stats stats stats stats';
    align-items: center;
    justify-items: start;
    text-align: left;
    gap: calc(var(--apk-u) * 0.6) calc(var(--apk-u) * 1);
    padding: calc(var(--apk-u) * 1) calc(var(--apk-u) * 1.2);
  }

  .apk-rank-place {
    grid-area: place;
  }

  .apk-rank-logo {
    grid-area: logo;
    width: calc(var(--apk-u) * 4.5);
    height: calc(var(--apk-u) * 4.5);
  }

  .apk-rank-name {
    grid-area: name;
    font-size: calc(var(--apk-u) * 2);
  }

  .apk-rank-wins {
    grid-area: wins;
  }

  .apk-rank-wins b {
    font-size: calc(var(--apk-u) * 3.2);
  }

  .apk-rank-bar {
    grid-area: bar;
  }

  .apk-rank-stats {
    grid-area: stats;
  }

  .apk-slide {
    flex-direction: column;
    /* stretch statt flex-start: sonst wird der Textblock so breit wie sein
       längstes Wort und ragt über den Rand. */
    align-items: stretch;
  }

  .apk-slide-main {
    width: 100%;
  }

  .apk-slide-image {
    flex: 0 0 auto;
    max-height: 40%;
  }
}
