/*
  Schriften liegen hier, nicht bei Google.

  Ein Aufruf an fonts.gstatic.com uebertraegt die IP-Adresse jedes Besuchers in
  ein Drittland, bevor irgendjemand irgendetwas anklicken konnte. Beide
  Schriften stehen unter der SIL Open Font License, also duerfen sie hier
  liegen. Nebenbei fallen zwei DNS-Aufloesungen und zwei Verbindungen weg.

  Nur latin und latin-ext: die Seite ist deutsch. Space Grotesk ist eine
  variable Schrift, eine Datei traegt alle drei Schnitte.
*/

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('./schrift/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('./schrift/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./schrift/jetbrains-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./schrift/jetbrains-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/*
  Dieselbe Palette wie das Dashboard in apps/web/app/globals.css. Bewusst
  kopiert und nicht geteilt: die Seite hat keinen Build-Schritt, und dreissig
  Zeilen Tokens zu duplizieren ist billiger als ein Bundler fuer eine Seite.
  Wer hier Farben aendert, aendert sie dort mit.
*/
:root {
  --grund: #101218;
  --flaeche: #171a22;
  --erhaben: #1d2029;
  --linie: #242833;
  --linie-hell: #2f3442;
  --text: #ccd1dc;
  --gedaempft: #838a9b;
  --lit: #f5e6c8;
  --lit-schwach: #6b5f45;
  --schein: #7c86ff;
  --radius: 6px;
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--grund); color: var(--text); }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.92em; letter-spacing: 0; }

:focus-visible { outline: 2px solid var(--schein); outline-offset: 2px; border-radius: 3px; }

.rahmen { max-width: 52rem; margin: 0 auto; padding: 0 1.5rem; }

.kopf { border-bottom: 1px solid var(--linie); }
.kopf-innen { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; }
.wortmarke { font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }
.kopf-link { color: var(--gedaempft); text-decoration: none; font-size: 0.85rem; }
.kopf-link:hover { color: var(--text); }

.seite { padding: 4rem 1.5rem 6rem; }

h1 { font-size: 1.75rem; font-weight: 600; margin: 0 0 0.35rem; letter-spacing: -0.01em; }
.unterzeile { color: var(--gedaempft); margin: 0 0 2.5rem; }

/* Jedes laufende Spiel ist beleuchtet: hier stehen nur laufende. */
.liste { border-top: 1px solid var(--linie); }

.spiel {
  display: grid;
  grid-template-columns: 3px auto 1fr auto;
  gap: 0 1.25rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--linie);
  text-decoration: none;
  color: inherit;
}
.spiel:hover { background: var(--flaeche); }

.balken {
  align-self: stretch;
  border-radius: 2px;
  background: var(--lit);
  box-shadow: 0 0 12px 0 color-mix(in srgb, var(--lit) 45%, transparent);
}

/* Ohne Titelbild faellt die Spalte weg, statt eine Luecke zu lassen. */
.spiel:not(:has(.titelbild)) { grid-template-columns: 3px 1fr auto; }

.titelbild {
  display: block;
  width: 4.5rem;
  height: 3rem;
  border-radius: 4px;
  overflow: hidden;
  background: var(--flaeche);
  border: 1px solid var(--linie);
}
.titelbild img { width: 100%; height: 100%; object-fit: cover; display: block; }

.spiel-mitte { min-width: 0; }

.name { display: block; font-weight: 500; color: var(--lit); margin-bottom: 0.2rem; }

.beschreibung {
  color: var(--text);
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.adresse { display: block; color: var(--gedaempft); font-size: 0.85rem; }
.zeit { color: var(--gedaempft); font-size: 0.85rem; text-align: right; }

.laedt, .leer { color: var(--gedaempft); padding: 2.5rem 0; }

.fuss {
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--linie);
  max-width: 34rem;
}
.fuss h2 { font-size: 1.05rem; font-weight: 500; margin: 0 0 0.75rem; }
.fuss p { color: var(--gedaempft); margin: 0 0 1.25rem; }

pre {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  margin: 0 0 1.5rem;
  overflow-x: auto;
  color: var(--text);
}

.link { color: var(--schein); text-decoration: none; }
.link:hover { text-decoration: underline; }

@media (max-width: 34rem) {
  .spiel, .spiel:not(:has(.titelbild)) { grid-template-columns: 3px auto 1fr; }
  .titelbild { width: 3.5rem; height: 2.5rem; }
  .zeit { grid-column: 2; text-align: left; padding-top: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Doku ---------------------------------------------------------------
   Eine lange Seite, die jemand querliest. Deshalb kurze Zeilen, klare
   Abstaende vor Ueberschriften und Code, der sich als Block abhebt. */
.doku { max-width: 42rem; }
.doku h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 3.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linie);
  letter-spacing: -0.01em;
}
.doku h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lit);
  margin: 2.25rem 0 0.6rem;
}
.doku p { margin: 0 0 1rem; }
.doku .hinweis { color: var(--gedaempft); font-size: 0.92rem; }

/* Die Wortmarke ist im Kopf jetzt ein Link zurueck zur Startseite. */
a.wortmarke { color: inherit; text-decoration: none; }

.inhalt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-bottom: 1rem;
}
.inhalt a { color: var(--schein); text-decoration: none; font-size: 0.9rem; }
.inhalt a:hover { text-decoration: underline; }

.block {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1.15rem;
  /* Lange Zeilen scrollen im Block, nicht die ganze Seite. */
  overflow-x: auto;
  line-height: 1.6;
}

.tabelle {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
}
.tabelle td {
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--linie);
  vertical-align: top;
}
.tabelle td:first-child { white-space: nowrap; padding-right: 1.75rem; }
.tabelle td:last-child { color: var(--gedaempft); }

@media (max-width: 34rem) {
  .tabelle td:first-child { white-space: normal; }
}
.kopf-links { display: flex; gap: 1.25rem; }
.trenner { display: inline-block; width: 1px; height: 0.8em; background: var(--linie-hell); margin: 0 0.85rem; vertical-align: -0.05em; }

/* Fusszeile. Impressum und Datenschutz muessen von jeder Seite aus in einem
   Klick erreichbar sein, das ist keine Geschmacksfrage. */
.seitenfuss { border-top: 1px solid var(--linie); margin-top: 4rem; }
.seitenfuss-innen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  color: var(--gedaempft);
  font-size: 0.85rem;
}
.seitenfuss-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.seitenfuss-links a { color: var(--gedaempft); text-decoration: none; }
.seitenfuss-links a:hover { color: var(--text); }

/* Die Schriftdateien tragen keinen Hash im Namen, aendern sich aber auch nie.
   Sie kommen aus dem Verzeichnis _headers, siehe dort. */
