/* Startseite (/) und Download-Seite (/download/) – Entwurf „Kartentisch“: Nachtblau, Messing, Brandrot.
   Schriften selbst ausgeliefert (SIL OFL, game/assets/fonts), keine Anfrage an Google. */
@font-face { font-family: "Black Ops One"; src: url("BlackOpsOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("BarlowCondensed-Medium.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --nacht: #0b1017; --grund: #0f151e; --held: #101825; --band: #131b27; --karte: #1a2230; --linie: #2a3547;
  --knopf: #2a3547; --knopfrand: #4a5a73; --messing: #e2bd66; --messing-hell: #f7de98; --gold: #d5a94e;
  --gold-rand: #f1d58c; --gold-schatten: #6d4b16; --brand: #e05a20; --hell: #f1e8d2; --text: #e9dfc6;
  --dunkel: #b9b09a; --leise: #8f99a8; --blass: #9aa6b6; --grau: #c9bfa6; --rahmen: #3a414d; --rahmenrand: #5a6372;
  --stencil: "Black Ops One", "Arial Black", Impact, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); font-family: "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-weight: 500; color: var(--text); }
a { color: var(--messing); }
a:hover { color: var(--messing-hell); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2 { margin: 0; font-family: var(--stencil); font-weight: 400; }
p { margin: 0; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 64px; }
@media (min-width: 900px) { .m-only { display: none !important; } }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 64px; padding: 0 30px;
  border-radius: 12px; font-size: 27px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .08s, filter .15s; }
.btn:active { transform: translateY(2px); }
.btn-gold { background: var(--gold); border: 2px solid var(--gold-rand); box-shadow: 0 4px 0 var(--gold-schatten), 0 12px 26px rgba(0,0,0,.45); color: #1b1206; }
.btn-gold:hover { color: #1b1206; filter: brightness(1.07); }
.btn-dunkel { background: #1e2836; border: 2px solid var(--knopfrand); color: var(--text); padding: 0 28px; }
.btn-dunkel:hover { color: var(--hell); border-color: #6a7c96; }
.btn svg { flex-shrink: 0; }

/* Kopfleiste */
.kopf { background: var(--nacht); border-bottom: 2px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.kopf .wrap { height: 84px; display: flex; align-items: center; gap: 40px; }
.marke { display: flex; flex-shrink: 0; align-items: center; gap: 14px; text-decoration: none; }
.marke img { width: 48px; height: 48px; border-radius: 11px; }
.marke span { font-family: var(--stencil); font-size: 30px; color: var(--messing); letter-spacing: 1px; }
.nav { display: flex; gap: 32px; flex-grow: 1; font-size: 22px; font-weight: 600; }
/* Passt nicht alles in die Zeile (schmale Fenster, lange Sprachen), rutschen die hinteren Links in eine
   unsichtbare zweite Zeile statt Knopf und Umschalter aus dem Bild zu schieben. */
.nav { min-width: 0; flex-wrap: wrap; height: 32px; line-height: 32px; overflow: hidden; }
.kopf .spielen { flex-shrink: 0; }
@media (max-width: 999px) { .nav { visibility: hidden; } }   /* dazwischen nur noch Platzhalter */
.nav a { color: var(--grau); text-decoration: none; }
.nav a:hover { color: var(--hell); }
.kopf .spielen { height: 48px; padding: 0 22px; border-radius: 10px; background: var(--knopf); border: 2px solid var(--knopfrand);
  font-size: 22px; gap: 10px; color: var(--text); }
/* Sprache (i18n.js): unsichtbares <select> über Globus + Name – Maus, Tastatur, Touch wie ein Auswahlfeld */
.sprache { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px;
  border-radius: 10px; border: 2px solid var(--linie); color: var(--grau); font-size: 20px; font-weight: 600; white-space: nowrap; }
.sprache:hover { color: var(--hell); border-color: var(--knopfrand); }
.sprache:focus-within { outline: 3px solid var(--messing); outline-offset: 2px; }
.sprache svg { flex-shrink: 0; }
.sprache select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }

/* Held */
.held { position: relative; background: var(--held); overflow: hidden; }
.held::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 70% at 72% 105%, rgba(224,90,32,.45), rgba(224,90,32,0) 100%),
    linear-gradient(90deg, rgba(44,61,88,.55) 1.5px, transparent 1.5px) 0 0 / 64px 64px,
    linear-gradient(0deg, rgba(44,61,88,.55) 1.5px, transparent 1.5px) 0 0 / 64px 64px; }
.held .wrap { position: relative; min-height: 820px; padding-top: 96px; padding-bottom: 72px; display: flex; gap: 56px; }
.held-text { width: 600px; flex-shrink: 0; display: flex; flex-direction: column; gap: 30px; padding-top: 12px; }
.held-logo { width: 150px; height: 150px; border-radius: 34px; box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 2px rgba(226,189,102,.35); }
.held-kopf { display: flex; flex-direction: column; gap: 14px; }
.held h1 { font-size: 104px; line-height: .95; color: var(--messing); letter-spacing: 2px; text-shadow: 0 4px 0 #4f370f, 0 12px 30px rgba(0,0,0,.6); }
.held .claim { font-size: 40px; font-weight: 600; color: var(--hell); line-height: 1.1; }
.held .lead { font-size: 25px; line-height: 1.4; color: var(--dunkel); max-width: 560px; }
.held-knoepfe { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.held .klein { font-size: 20px; color: var(--leise); }
.held-bilder { position: relative; flex-grow: 1; padding-top: 30px; min-width: 0; }
.rahmen { box-sizing: border-box; background: var(--rahmen); border: 2px solid var(--rahmenrand); }
.rahmen img { width: 100%; height: 100%; object-fit: cover; }
.held-bild1 { width: 760px; max-width: 100%; aspect-ratio: 760 / 428; padding: 14px; border-radius: 18px;
  box-shadow: 0 40px 80px rgba(0,0,0,.6); transform: rotate(-2deg); }
.held-bild1 img { border-radius: 8px; }
.held-bild2 { position: absolute; inset-inline-start: 50%; top: 420px; width: 400px; max-width: 52%; aspect-ratio: 400 / 240; padding: 10px;
  border-radius: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.6); transform: rotate(3deg); }
.held-bild2 img { border-radius: 6px; }

/* Abschnitte */
.abschnitt { padding: 96px 0; }
.abschnitt .wrap { display: flex; flex-direction: column; gap: 44px; }
.titel { display: flex; flex-direction: column; gap: 10px; }
.titel .ueber { font-size: 22px; font-weight: 700; letter-spacing: 6px; color: var(--brand); }
.titel h2 { font-size: 60px; color: var(--hell); line-height: 1.05; }
.karte { background: var(--karte); border: 2px solid var(--linie); border-radius: 16px; }
.raster { display: grid; gap: 24px; }
.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zeit { display: flex; flex-direction: column; gap: 14px; padding: 30px; }
.zeit .jahr { font-family: var(--stencil); font-size: 64px; color: var(--messing); line-height: 1; }
.zeit .jahr.rot { color: var(--brand); }
.zeit .name { font-size: 28px; font-weight: 700; color: var(--hell); }
.zeit .text { font-size: 21px; line-height: 1.4; color: var(--dunkel); }

.welt { position: relative; height: 640px; overflow: hidden; }
.welt img { width: 100%; height: 100%; object-fit: cover; }
.welt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 260px;
  background: linear-gradient(to top, rgba(11,16,23,.95), rgba(11,16,23,0)); }
.welt .unter { position: absolute; left: 0; right: 0; bottom: 56px; z-index: 1; }
.welt .unter .wrap { display: flex; flex-direction: column; gap: 8px; }
.welt .gross { font-family: var(--stencil); font-size: 52px; color: var(--hell); }
.welt .text { font-size: 26px; color: var(--grau); }

.merkmal { display: flex; gap: 20px; padding: 28px; }
.merkmal svg { flex-shrink: 0; }
.merkmal div { display: flex; flex-direction: column; gap: 6px; }
.merkmal b { font-size: 28px; font-weight: 700; color: var(--hell); }
.merkmal span { font-size: 21px; line-height: 1.4; color: var(--dunkel); }

.mehr { background: var(--band); border-top: 2px solid var(--linie); border-bottom: 2px solid var(--linie); }
.mehr .wrap { flex-direction: row; gap: 64px; align-items: center; }
.mehr .links { display: flex; flex-direction: column; gap: 22px; width: 560px; flex-shrink: 0; }
.mehr h2 { font-size: 56px; }
.punkte { display: flex; flex-direction: column; gap: 14px; font-size: 24px; color: var(--grau); line-height: 1.35; }
.punkte div { display: flex; gap: 12px; }
.punkte i { color: var(--messing); font-weight: 700; font-style: normal; }
.mehr .rahmen { flex-grow: 1; min-width: 0; padding: 12px; border-radius: 16px; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.mehr .rahmen img { height: 390px; border-radius: 8px; }

.dl { padding: 96px 0 80px; }
.dl .wrap { display: flex; flex-direction: column; gap: 44px; }
.dl .titel { align-items: center; text-align: center; }
.dl .unterzeile { font-size: 24px; color: var(--dunkel); }
.system { display: flex; flex-direction: column; gap: 16px; padding: 30px; }
.system.an { border: 3px solid var(--gold); padding: 29px; }
.system .name { font-size: 32px; font-weight: 700; color: var(--hell); }
.system .info { font-size: 20px; color: var(--blass); flex-grow: 1; }
[data-size] { white-space: nowrap; unicode-bidi: isolate; }
[data-size]::before { content: " · "; }
.system .btn { height: auto; min-height: 56px; font-size: 24px; border-radius: 10px; padding: 6px 16px; gap: 10px; white-space: normal; text-align: center; line-height: 1.1; }
.system .btn-dunkel { background: var(--knopf); }
.system:not(.an) .btn-gold { background: var(--knopf); border: 2px solid var(--knopfrand); color: var(--text); box-shadow: none; }
.system.an .btn-dunkel { background: var(--gold); border-color: var(--gold-rand); color: #1b1206; box-shadow: 0 3px 0 var(--gold-schatten); }
.system.an .btn-dunkel svg { fill: #1b1206; }
.dl .fuss-hinweis { text-align: center; font-size: 20px; color: var(--leise); }

.fuss { background: var(--nacht); border-top: 2px solid var(--linie); }
.fuss .wrap { height: 120px; display: flex; align-items: center; gap: 16px; }
.fuss img { width: 40px; height: 40px; border-radius: 9px; }
.fuss .marke-text { font-family: var(--stencil); font-size: 24px; color: var(--messing); flex-grow: 1; }
.fuss .leise { font-size: 20px; color: var(--leise); }
.fuss .leise a { color: var(--leise); }

/* Zwischengrößen: Entwurf bleibt, Raster und Held werden schmaler */
@media (max-width: 1300px) {
  .held-text { width: 520px; }
  .held h1 { font-size: 88px; }
  .r4, .r5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r5 > :last-child:nth-child(odd) { grid-column: 1 / -1; }   /* 5 Karten: die letzte (Browser) über die ganze Breite */
  .r3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mehr .links { width: 460px; }
}
@media (max-width: 1100px) {
  .wrap { padding: 0 40px; }
  .nav { gap: 22px; }
  .kopf .wrap { gap: 24px; }
  .held .wrap { flex-direction: column; min-height: 0; }
  .held-text { width: auto; }
  .held-bilder { padding-bottom: 200px; }
  .held-bild2 { top: auto; bottom: 0; }
  .mehr .wrap { flex-direction: column; align-items: stretch; }
  .mehr .links { width: auto; }
}

/* Handy-Entwurf (390 breit) */
@media (max-width: 899px) {
  .d-only { display: none !important; }
  .wrap { padding: 0 20px; }
  .kopf .wrap { height: 64px; gap: 10px; padding: 0 16px; }
  .marke { gap: 10px; flex-grow: 1; }
  .marke img { width: 36px; height: 36px; border-radius: 8px; }
  .marke span { font-size: 22px; letter-spacing: 0; }
  .nav { display: none; }
  .kopf .spielen { height: 44px; padding: 0 14px; font-size: 19px; gap: 8px; }
  .kopf .spielen svg { width: 14px; height: 14px; }
  .sprache { height: 44px; padding: 0 10px; gap: 6px; font-size: 18px; }
  .held::before { background: radial-gradient(ellipse 80% 80% at 50% 100%, rgba(224,90,32,.4), rgba(224,90,32,0) 100%),
      linear-gradient(90deg, rgba(44,61,88,.55) 1px, transparent 1px) 0 0 / 40px 40px,
      linear-gradient(0deg, rgba(44,61,88,.55) 1px, transparent 1px) 0 0 / 40px 40px; }
  .held .wrap { padding-top: 40px; padding-bottom: 44px; gap: 22px; align-items: center; text-align: center; }
  .held-text { display: contents; }
  .held-logo { width: 124px; height: 124px; border-radius: 28px; box-shadow: 0 16px 40px rgba(0,0,0,.55), 0 0 0 2px rgba(226,189,102,.35); }
  .held-kopf { display: contents; }
  .held h1 { font-size: min(50px, 11.6vw); line-height: 1; letter-spacing: 1px; text-shadow: 0 3px 0 #4f370f; }
  .held h1 wbr { display: none; }
  .held .claim { font-size: 28px; }
  .held .lead { font-size: 20px; }
  .held-knoepfe { width: 100%; }
  .held-knoepfe .btn-gold { width: 100%; height: 58px; font-size: 24px; box-shadow: 0 4px 0 var(--gold-schatten); gap: 10px; }
  .held-knoepfe [data-second] { display: none; }
  .held .klein { font-size: 17px; }
  .held-bilder { width: 100%; padding: 0; order: 10; }
  .held-bild1 { width: 100%; aspect-ratio: auto; height: auto; padding: 8px; border-radius: 12px; transform: none; box-shadow: 0 20px 40px rgba(0,0,0,.55); }
  .held-bild1 img { height: 190px; border-radius: 6px; }
  .held-bild2 { display: none; }
  .abschnitt { padding: 44px 0; }
  .abschnitt .wrap { gap: 20px; }
  .titel { gap: 20px; }
  .titel .ueber { font-size: 17px; letter-spacing: 4px; }
  .titel h2 { font-size: 34px; }
  .r4, .zeitalter .raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .zeit { gap: 6px; padding: 16px; border-radius: 12px; }
  .zeit .jahr { font-size: 36px; }
  .zeit .name { font-size: 20px; }
  .zeit .text { font-size: 16px; line-height: 1.25; }
  .welt { height: 300px; }
  .welt::after { height: 170px; }
  .welt .unter { bottom: 20px; }
  .welt .unter .wrap { gap: 4px; }
  .welt .gross { font-size: min(26px, 6.1vw); }
  .welt .text { font-size: 17px; }
  .merkmale .wrap { gap: 14px; }
  .merkmale .titel { gap: 20px; margin-bottom: 6px; }
  .merkmale .raster { display: flex; flex-direction: column; gap: 14px; }
  .merkmal { padding: 16px; border-radius: 12px; }
  .merkmal div { gap: 4px; }
  .merkmal b { font-size: 22px; }
  .merkmal span { font-size: 17px; line-height: 1.3; }
  .mehr .wrap { gap: 16px; }
  .mehr .links { gap: 16px; }
  .mehr h2 { font-size: 32px; }
  .mehr .text-m { font-size: 19px; line-height: 1.4; color: var(--grau); }
  .mehr .rahmen { padding: 8px; border-radius: 12px; box-shadow: none; }
  .mehr .rahmen img { height: 190px; border-radius: 6px; }
  .dl { padding: 44px 0 60px; }
  .dl .wrap { gap: 14px; }
  .dl .titel { align-items: flex-start; text-align: start; gap: 14px; }
  .dl .titel h2 { font-size: 32px; margin-bottom: 6px; }
  .zeile { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 18px; border-radius: 12px;
    background: var(--karte); border: 2px solid var(--linie); color: var(--text); text-decoration: none; }
  .zeile b { font-size: 22px; font-weight: 700; }
  .zeile span { font-size: 16px; color: var(--blass); }
  .zeile.gold { background: var(--gold); border-color: var(--gold); box-shadow: 0 3px 0 var(--gold-schatten); color: #1b1206; }
  .zeile.gold span { color: #1b1206; }
  .dl .version-m { font-size: 16px; color: var(--leise); }
  .fuss .wrap { height: 90px; gap: 10px; }
  .fuss img { width: 32px; height: 32px; border-radius: 7px; }
  .fuss .marke-text { font-size: 18px; }
  .fuss .leise { font-size: 16px; }
}

/* Mehrsprachig: auf schmalen Handys reicht die Kopfzeile nicht für Schriftzug + Sprache + Spielen – dort steht
   nur das Logo (der Schriftzug folgt groß darunter); Arabisch verträgt keine Sperrung; Befehle, Dateinamen,
   Prüfsummen bleiben links nach rechts; lange Wörter (de, fi …) brechen notfalls um. */
@media (max-width: 559px) {
  .kopf .marke span { display: none; }
  .sprache-name { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
}
:lang(ar) .titel .ueber, :lang(ar) .marke span { letter-spacing: 0; }
code, .datei, .pruef span { direction: ltr; unicode-bidi: isolate; }
h1, h2, .titel .ueber, .zeit .name, .merkmal b, .welt .gross { overflow-wrap: break-word; }
/* Chinesisch/Japanisch/Koreanisch: Überschriften ausgewogen umbrechen, Wörter nicht mitten im Begriff trennen */
:is(:lang(ja), :lang(zh), :lang(ko)) :is(h1, h2, .claim, .zeit .name, .merkmal b, .welt .gross) { text-wrap: balance; }
html:lang(ja) { word-break: auto-phrase; }
html:lang(ko) { word-break: keep-all; }
