/* Spielerseite der Freimarken - ein Stylesheet, ohne Skript.
 *
 * Farben aus Plan 2.2: Bundesrot #8C3431, Markgold #C6A15B, Forstgruen #395948,
 * Schiefer #333B40. Hell und dunkel folgen der Einstellung des Geraets
 * (prefers-color-scheme); es gibt keinen Umschalter, weil der ein Skript braeuchte.
 * Im Ton hanseatisch-ruhig: Pergament statt Weiss, Schiefer statt Schwarz, Gold nur als
 * Linie und fuer Geld.
 */

:root {
  --bundesrot: #8C3431;
  --markgold: #C6A15B;
  --forstgruen: #395948;
  --schiefer: #333B40;

  --grund: #F4EFE4;
  --flaeche: #FFFCF6;
  --text: #2B3135;
  --leise: #5B646A;
  --rand: #DCD2BF;
  --linie: #C6A15B;
  --verweis: #7A2D2A;
  --gold-text: #7D5E22;
  --gruen-text: #2F4D3D;
  --warnung-grund: #F6E3E1;
  --warnung-rand: #8C3431;
  --hinweis-grund: #F3EBD8;
  --kopf-grund: #333B40;
  --kopf-text: #F4EFE4;
  --kopf-leise: #C9C2B4;
  --knopf-grund: #8C3431;
  --knopf-text: #FFFCF6;

  --schrift: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --schrift-titel: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --schrift-fest: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --breite: 62rem;
  --rundung: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #1B2023;
    --flaeche: #242B2F;
    --text: #ECE6DA;
    --leise: #A7AFB3;
    --rand: #3A4449;
    --linie: #B8955A;
    --verweis: #E2A29E;
    --gold-text: #DDBD7C;
    --gruen-text: #8DB49D;
    --warnung-grund: #3A2523;
    --warnung-rand: #C9605C;
    --hinweis-grund: #2E2C25;
    --kopf-grund: #13171A;
    --kopf-text: #ECE6DA;
    --kopf-leise: #A7AFB3;
    --knopf-grund: #9B3D39;
    --knopf-text: #FFFCF6;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--verweis); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--markgold);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--schrift-titel);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); letter-spacing: 0.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin-top: 1.2em; }
p { margin: 0 0 0.9em; }
code, .kennung { font-family: var(--schrift-fest); font-size: 0.92em; }
code {
  background: var(--hinweis-grund);
  border: 1px solid var(--rand);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

.sprung {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--flaeche);
  padding: 0.5rem 0.8rem;
  z-index: 10;
}
.sprung:focus { left: 1rem; }

/* --- Kopf ------------------------------------------------------------------- */

.kopf {
  background: var(--kopf-grund);
  color: var(--kopf-text);
  border-top: 4px solid var(--bundesrot);
  border-bottom: 1px solid var(--linie);
  box-shadow: 0 3px 0 -1px var(--kopf-grund), 0 4px 0 -1px var(--linie);
}
.kopf-innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}
.marke {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--kopf-text);
  text-decoration: none;
  font-family: var(--schrift-titel);
  font-size: 1.25rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
}
.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.2rem;
}
.navigation a {
  display: block;
  color: var(--kopf-leise);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: var(--rundung);
  font-weight: 500;
}
.navigation a:hover { color: var(--kopf-text); background: rgba(198, 161, 91, 0.12); }
.navigation a[aria-current="page"] {
  color: var(--kopf-text);
  box-shadow: inset 0 -2px 0 var(--markgold);
}

/* --- Inhalt ----------------------------------------------------------------- */

.inhalt {
  flex: 1;
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 1.6rem 1rem 2.5rem;
}

.vorzeile {
  font-family: var(--schrift-titel);
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--gold-text);
  margin-bottom: 0.2em;
}
.leise { color: var(--leise); }
.einleitung { font-size: 1.08rem; max-width: 42rem; }

.blatt, .tafel {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
}
.blatt { padding: 1.3rem 1.4rem; margin-bottom: 1.2rem; }
.blatt.schmal { max-width: 40rem; }
.blatt.text { max-width: 48rem; }
.blatt.text h2 { margin-top: 1.4em; }
.blatt.text ul { padding-left: 1.2rem; }
.blatt.text li { margin-bottom: 0.4em; }

.buehne {
  padding: 1.5rem 0 1.8rem;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 1.6rem;
}
.knoepfe { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }

.raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.tafel { padding: 1rem 1.1rem; border-top: 3px solid var(--forstgruen); }
.tafel h2 { font-size: 1.05rem; margin-bottom: 0.3em; }
.tafel h2 a { color: inherit; }
.tafel p:last-child { margin-bottom: 0; }
.tafel.geld { border-top-color: var(--markgold); }
.kennzahlen .wert { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.15em; }
.geld .wert { color: var(--gold-text); }
.einheit { font-size: 0.85rem; font-weight: 500; }

.profilkopf { margin-bottom: 1.3rem; }
.profilkopf h1 { margin-bottom: 0.2em; overflow-wrap: anywhere; }
.kennung { overflow-wrap: anywhere; }

.marken { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.marken li {
  border: 1px solid var(--rand);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  background: var(--grund);
}

.tabelle { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--rand); }
th {
  font-family: var(--schrift-titel);
  font-weight: 700;
  color: var(--leise);
  border-bottom: 2px solid var(--linie);
}

.hinweis {
  background: var(--hinweis-grund);
  border-left: 4px solid var(--markgold);
  padding: 0.7rem 0.9rem;
  border-radius: 0 var(--rundung) var(--rundung) 0;
}
.hinweis.warnung { background: var(--warnung-grund); border-left-color: var(--warnung-rand); }

.schritte { padding-left: 1.3rem; }
.schritte li { margin-bottom: 0.4em; }

/* --- Formulare -------------------------------------------------------------- */

.codeformular label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.codezeile { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.codezeile input {
  flex: 1 1 12rem;
  min-width: 0;
  font-family: var(--schrift-fest);
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  color: var(--text);
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
}

button, .knopf {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--knopf-text);
  background: var(--knopf-grund);
  border: 1px solid var(--knopf-grund);
  border-radius: var(--rundung);
  padding: 0.55rem 1.1rem;
}
button:hover, .knopf:hover { filter: brightness(1.08); }
button.leise, .knopf.leise {
  color: var(--text);
  background: transparent;
  border-color: var(--rand);
}

.aktionen { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.aktionen form { margin: 0; }

/* --- Meldungen -------------------------------------------------------------- */

.meldungen { list-style: none; padding: 0; margin: 0; }
.meldung { border-top: 1px solid var(--rand); padding: 0.9rem 0; }
.meldung:first-child { border-top: 0; }
.meldung-kopf { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.3rem; }
.nummer { font-family: var(--schrift-fest); color: var(--leise); }
.stand {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--rand);
}
.stand-abgeschlossen { color: var(--gruen-text); border-color: var(--gruen-text); }
.stand-abgewiesen { color: var(--warnung-rand); border-color: var(--warnung-rand); }
.stand-in_arbeit { color: var(--gold-text); border-color: var(--gold-text); }
.grund { font-weight: 500; overflow-wrap: anywhere; }
.vermerk { overflow-wrap: anywhere; }

/* --- Ranglisten, Staedte, Aushang ------------------------------------------- */

.reiter ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.reiter a {
  display: block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--rand);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: var(--grund);
  font-weight: 500;
}
.reiter a:hover { border-color: var(--linie); }
.reiter a[aria-current="page"] {
  background: var(--forstgruen);
  border-color: var(--forstgruen);
  color: var(--knopf-text);
}
.reiter.klein a { padding: 0.2rem 0.7rem; font-size: 0.92rem; }

.zahlspalte { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.platz { width: 3.5rem; font-family: var(--schrift-fest); color: var(--leise); }
.rangliste tbody tr:nth-child(-n+3) .platz { color: var(--gold-text); font-weight: 700; }
td { overflow-wrap: anywhere; }

.regeltext {
  border-left: 3px solid var(--forstgruen);
  padding: 0.4rem 0.9rem;
  background: var(--grund);
  overflow-wrap: anywhere;
}
.spieladresse code { font-size: 1rem; }

/* --- Shop, Rechtstexte, Abzeichen ---------------------------------------------- */

/* Texte aus Tabellen und Dateien kommen ohne HTML: Umbrueche zeigt nur dieses CSS. */
.zeilen { white-space: pre-line; overflow-wrap: anywhere; }
.abzeichen {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--gold-text);
  color: var(--gold-text);
  vertical-align: middle;
}
h1 .abzeichen { font-size: 0.9rem; }
.kostenbalken { margin: 1rem 0; }
.kostenbalken label { display: block; margin-bottom: 0.3rem; }
.kostenbalken meter { width: 100%; max-width: 28rem; height: 1.1rem; }
.sortiment .artikel h2 { margin-bottom: 0.2em; }
.sortiment .wert { font-size: 1.25rem; font-weight: 700; color: var(--gold-text); }
.bestellformular label { display: block; font-weight: 700; margin: 0.9rem 0 0.3rem; }
.bestellformular input[type="text"], .bestellformular input[type="email"] {
  width: 100%;
  max-width: 26rem;
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  color: inherit;
}
.bestellformular button { margin-top: 1rem; }
.kaestchen { border: 1px solid var(--rand); border-radius: var(--rundung); padding: 0.6rem 0.9rem; }
.kaestchen label { font-weight: 400; display: flex; gap: 0.6rem; align-items: flex-start; }
.kaestchen input { margin-top: 0.3rem; flex: none; }
.uebersicht th { width: 9rem; border-bottom: 1px solid var(--rand); }
.bestellungen { list-style: none; padding: 0; margin: 0; }
.bestellung { border-top: 1px solid var(--rand); padding: 0.9rem 0; }
.bestellung:first-child { border-top: 0; }
.stand-freigeschaltet { color: var(--gruen-text); border-color: var(--gruen-text); }
.stand-bezahlt, .stand-eingegangen { color: var(--gold-text); border-color: var(--gold-text); }
.stand-storniert { color: var(--warnung-rand); border-color: var(--warnung-rand); }
.qr { display: block; margin-top: 0.6rem; background: #fff; padding: 0.4rem; }
.rechtstext .banner { margin-bottom: 1.2rem; }
.rechtstext .verweise { margin-top: 2rem; }

/* --- Fuss ------------------------------------------------------------------- */

.fuss {
  border-top: 1px solid var(--linie);
  background: var(--flaeche);
  color: var(--leise);
  font-size: 0.9rem;
}
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 1.1rem 1rem 1.4rem; }
.fuss-verweise { display: flex; gap: 1.2rem; margin-bottom: 0.5rem; font-weight: 700; }
.fuss p { margin: 0; }

@media (max-width: 40rem) {
  .blatt { padding: 1rem; }
  .kopf-innen { padding: 0.6rem 1rem; }
  .navigation a { padding: 0.3rem 0.45rem; }
  th, td { padding: 0.4rem 0.4rem; }
}

@media print {
  .kopf, .fuss, .aktionen { display: none; }
  body { background: #fff; color: #000; }
}
