/* ==========================================================================
   Kartenduell – Aussehen
   Handy zuerst (Hochformat). Keine fremden Schriften: es wird die Schrift
   des Geräts benutzt, das lädt sofort und braucht kein CDN.
   ========================================================================== */

:root {
  --gold: #e8c36a;
  --dunkel: #0f1f1b;
  --glas: rgba(12, 26, 22, 0.82);
  --rand: rgba(255, 255, 255, 0.14);
  --text: #f3efe4;
  --leise: #a9b8b1;
  /* Abstand zu Notch und Home-Balken am iPhone */
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #24443a 0%, #12251f 55%, #0a1512 100%);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Kein Markieren/Zoomen beim schnellen Tippen auf Karten */
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}

#buehne { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

[hidden] { display: none !important; }

/* ------------------------------------------------------------ Kopfzeile -- */
#leiste {
  position: fixed; top: calc(var(--oben) + 8px); left: 10px; right: 10px;
  display: flex; align-items: center; gap: 8px; z-index: 5;
}
.luecke { flex: 1; }
.chip {
  background: var(--glas); border: 1px solid var(--rand); border-radius: 999px;
  padding: 7px 14px; font-weight: 600; font-size: 14px;
}
.rund {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--glas); border: 1px solid var(--rand); color: var(--text);
  font-size: 17px; cursor: pointer;
}

/* --------------------------------------------------------- Namensschilder -- */
#schilder { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.schild {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 96px; max-width: 160px; padding: 6px 10px 8px; white-space: nowrap;
  background: var(--glas); border: 1px solid var(--rand); border-radius: 12px;
  text-align: center; font-size: 12px; line-height: 1.25; overflow: hidden;
}
.schild b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schild small { display: block; color: var(--leise); font-size: 11px; }
/* Zeile 2: was gerade liegt (gold, gut sichtbar); Zeile 3: Gesamtstand */
.schild span { display: block; color: var(--gold); font-weight: 700; font-size: 13px; }
.schild span.ges { color: var(--leise); font-weight: 600; font-size: 11px; }
.schild.dran { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232, 195, 106, 0.35), 0 0 22px rgba(232, 195, 106, 0.35); }
.schild.weg { opacity: 0.6; }

/* Zeitbalken: schrumpft von der Restzeit auf null */
.zeit {
  position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold);
  width: var(--rest); animation: zeitlauf var(--dauer) linear forwards;
}
@keyframes zeitlauf { to { width: 0; } }

/* Mein eigenes Schild: zweite Zeile oben links (unten ist kein Platz –
   dort liegen meine Karten und die Knöpfe) */
#meinSchild {
  position: fixed; left: 10px; top: calc(var(--oben) + 54px); transform: none; z-index: 4;
  min-width: 104px; max-width: 140px; padding: 5px 8px 7px;
}
/* Mein Schild und die Schilder über den Rastern der Mitspieler: nur zwei
   Zeilen (Name, darunter "offen 21 · gesamt 45"), damit sie nichts verdecken */
#meinSchild span, .schild.flach span { display: inline; font-size: 12px; }
#meinSchild span.ges, .schild.flach span.ges { font-size: 11px; }
#meinSchild span.ges::before, .schild.flach span.ges::before { content: ' · '; }
#meinSchild small { display: none; }
/* "gesamt" ausgeschrieben, wo Platz ist; über den Rastern abgekürzt "ges." */
.schild .ges u, .schild .ges s { text-decoration: none; }
.schild .ges s { display: none; }
.schild.flach .ges u, #meinSchild .ges u { display: none; }
.schild.flach .ges s, #meinSchild .ges s { display: inline; }
/* Eine Zeile, nichts umbrechen: rechts daneben beginnt die Statuszeile. */
#meinSchild { max-width: 142px; white-space: nowrap; overflow: hidden; }
.schild.flach span { font-size: 11px; }
.schild.flach span.ges { font-size: 10px; }
.schild.flach { padding: 3px 7px 5px; min-width: 84px; line-height: 1.2; }
.schild.flach b { font-size: 12px; }
.schild.flach small { display: none; }
/* Drei Schilder nebeneinander (zu viert): Gesamtstand in eigener Zeile */
.schild.flach.eng span.ges { display: block; }
.schild.flach.eng span.ges::before { content: ''; }
.schild.flach.eng { min-width: 72px; max-width: 118px; }
/* Kleines Kartensymbol hinter der Kartenzahl (Schriftzeichen dafür sehen
   auf jedem Gerät anders aus) */
.schild .k {
  display: inline-block; width: 9px; height: 12px; margin-left: 3px;
  border: 1.5px solid var(--gold); border-radius: 2px; vertical-align: -1px;
}
/* Mehrere Knöpfe nebeneinander (Rundenende): gleich breit, nicht zu wuchtig */
#knoepfe button:disabled { opacity: 0.6; }

/* -------------------------------------------------------- Status/Meldung -- */
/* Statuszeile: zweite Zeile oben, rechts neben meinem Schild. Dort verdeckt
   sie weder den Tisch noch meine Karten. Lange Texte dürfen umbrechen. */
#status {
  position: fixed; top: calc(var(--oben) + 54px); left: 156px; right: 10px;
  background: var(--glas); border: 1px solid var(--gold); border-radius: 12px;
  padding: 6px 12px; font-weight: 600; font-size: 13px; line-height: 1.25; z-index: 4;
  min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
#status img { width: 22px; height: 22px; background: #fffdf7; border-radius: 50%; padding: 2px; }

#meldung {
  position: fixed; top: 44%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(8, 16, 14, 0.9); border: 1px solid var(--gold); border-radius: 14px;
  padding: 12px 22px; font-size: 19px; font-weight: 700; z-index: 40; pointer-events: none; /* 40: auch über Startseite (20) und Fenstern (22) sichtbar – sonst blieb z. B. „Duell schon begonnen“ unsichtbar */
  text-align: center; max-width: 86vw;
  animation: aufploppen 1.5s ease both;
}
@keyframes aufploppen {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

#netzHinweis {
  position: fixed; top: calc(var(--oben) + 6px); left: 50%; transform: translateX(-50%);
  background: #7a2a1e; border-radius: 999px; padding: 8px 16px; font-size: 13px; z-index: 30;
}

/* ---------------------------------------------------------------- Knöpfe -- */
#knoepfe {
  position: fixed; left: 0; right: 0; z-index: 4;
  bottom: calc(var(--unten) + var(--frei, 24vh));
  display: flex; justify-content: center; gap: 10px; pointer-events: none;
}
#knoepfe button { pointer-events: auto; width: auto; margin: 0; padding: 11px 20px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }

button { font: inherit; }
.haupt, .neben {
  display: block; width: 100%; margin-top: 10px; padding: 13px 16px;
  border-radius: 12px; font-weight: 700; cursor: pointer;
}
.haupt { background: var(--gold); color: #2a1e05; border: 0; }
.haupt:disabled { opacity: 0.45; }
.neben { background: transparent; color: var(--text); border: 1px solid var(--rand); font-weight: 600; }

/* --------------------------------------------------------------- Fenster -- */
.fenster {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--oben) + 14px) 14px calc(var(--unten) + 14px);
  background: rgba(5, 12, 10, 0.55); backdrop-filter: blur(3px);
  overflow-y: auto;
}
#punkte, #wahl, #regeln, #konto, #statistik { z-index: 22; }
/* Lange Fenster (Statistik) oben anfangen lassen, damit man scrollen kann */
#statistik { align-items: flex-start; }
.karte {
  width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto;
  background: linear-gradient(180deg, #1b332c, #132620);
  border: 1px solid var(--rand); border-radius: 18px; padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  user-select: text; -webkit-user-select: text;
}
.karte.schmal { max-width: 320px; }
.karte h1 { margin: 0; font-size: 30px; letter-spacing: 0.5px; color: var(--gold); }
.karte h2 { margin: 0 0 4px; font-size: 21px; }
.unter { margin: 4px 0 14px; color: var(--leise); }
.klein { font-size: 13px; color: var(--leise); margin: 10px 0 0; }

label { display: block; font-size: 13px; color: var(--leise); }
input, select {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px;
  background: #0c1a16; color: var(--text); border: 1px solid var(--rand); border-radius: 10px;
  font: inherit; font-size: 16px;   /* 16px: sonst zoomt das iPhone beim Antippen */
}
.kasten, .spielwahl {
  margin-top: 14px; padding: 14px; border: 1px solid var(--rand); border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.kasten p, .spielwahl p { margin: 4px 0 0; font-size: 14px; color: var(--leise); }
.spielwahl { border-color: rgba(232, 195, 106, 0.5); }
.spielwahl b { color: var(--gold); font-size: 18px; }
.reihe { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.reihe > * { flex: 1; }
.reihe.klein { align-items: center; margin-top: 14px; }
.reihe.klein select { margin: 0; }
.beitritt input { text-transform: uppercase; letter-spacing: 3px; text-align: center; }
.beitritt button { margin: 0; }
.code {
  font: 700 22px/1 ui-monospace, Menlo, monospace; letter-spacing: 4px; color: var(--gold);
  background: #0c1a16; border: 1px dashed var(--rand); border-radius: 10px; padding: 10px 14px;
}
.linkzeile { display: flex; gap: 10px; align-items: center; }
.linkzeile .haupt { margin: 0; }

.plaetze { list-style: none; margin: 16px 0 6px; padding: 0; }
.plaetze li {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--rand);
}
.plaetze .nr {
  width: 26px; height: 26px; border-radius: 50%; background: #0c1a16;
  display: grid; place-items: center; font-size: 13px; color: var(--leise); flex: none;
}
.plaetze .wer { flex: 1; min-width: 0; }
.plaetze em { color: var(--leise); }
.plaetze small { color: var(--leise); }
.plaetze select { width: auto; margin: 0; padding: 7px 8px; font-size: 14px; flex: none; }

/* ------------------------------------------------------------- Auswahl -- */
.wahlen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.wahlKnopf {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 14px; cursor: pointer;
  background: #fffdf7; color: #1c1d22; border: 0; font-weight: 700;
}
.wahlKnopf img { width: 44px; height: 44px; }
/* Einfache Farbfläche (Spiele mit bunten Karten statt Herz/Pik) */
.wahlKnopf .ton { width: 44px; height: 44px; border-radius: 50%; display: block; }
#status .ton { width: 20px; height: 20px; border-radius: 50%; display: inline-block; vertical-align: -4px; margin-right: 6px; border: 2px solid #fffdf7; }
/* Viele Auswahl-Knöpfe (z. B. "wohin mit der Karte?"): das Fenster rollt */
#wahl .karte { max-height: 86vh; overflow-y: auto; }

/* --------------------------------------------------------------- Punkte -- */
.tabelle { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 8px; text-align: right; font-size: 14px; }
th { font-size: 13px; color: var(--leise); font-weight: 600; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td:first-child, th:first-child { text-align: left; color: var(--leise); width: 28px; }
tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.035); }
tfoot td { border-top: 2px solid var(--rand); font-weight: 700; font-size: 16px; }
.vorn { color: var(--gold) !important; }
.null { color: #7fd6a4; font-weight: 700; }
.rang { margin: 14px 0 0; padding-left: 24px; }
.rang li { padding: 3px 0; }
.rang li:first-child { color: var(--gold); font-weight: 700; }
.rang span { float: right; color: var(--leise); font-weight: 400; }
.regelliste { padding-left: 20px; margin: 10px 0 0; }
.regelliste li { margin-bottom: 8px; }
/* Kleiner Rechtshinweis: Spielprinzip bekannt als ... – nie als Titel, nie fett. */
.bekanntAls { margin-top: 10px; font-size: 12px; color: var(--leise); }

/* ----------------------------------------------------------- Querformat -- */
@media (min-aspect-ratio: 1/1) {
  #meinSchild { left: 16px; }
  /* Im Querformat ist oben in der Mitte Platz: Status in die Kopfzeile */
  #status { top: calc(var(--oben) + 8px); left: 50%; right: auto; transform: translateX(-50%); min-height: 40px; white-space: nowrap; }
}
/* Handy im Querformat: In der Kopfzeile ist KEIN Platz (Runden-Chip links,
   sechs Knöpfe rechts) – ein langer Statustext lag über den Knöpfen. Dann
   wie im Hochformat in die zweite Zeile, rechts neben mein Schild. */
@media (min-aspect-ratio: 1/1) and (max-width: 950px) {
  #status { top: calc(var(--oben) + 54px); left: 172px; right: auto; transform: none; max-width: 44vw; min-height: 38px; white-space: normal; font-size: 12px; }
}

/* Rundenzahl: gut sichtbar, weil man sie vor jedem Spiel festlegt */
.rundenwahl { margin-top: 14px; font-size: 14px; color: var(--text); font-weight: 600; }
.rundenwahl select { border-color: rgba(232, 195, 106, 0.5); }

/* ---------------------------------------------------------------- Konto -- */
.kontozeile {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px;
  padding: 10px 12px; border: 1px solid rgba(232, 195, 106, 0.5); border-radius: 14px;
}
.kontozeile span { flex: 1 1 100%; }
.kontozeile b { color: var(--gold); }
.kontozeile button { flex: 1; width: auto; margin: 0; padding: 9px 10px; font-size: 14px; }
.verweis {
  display: block; width: 100%; margin-top: 8px; padding: 6px 0; text-align: left; cursor: pointer;
  background: none; border: 0; color: var(--gold); font-size: 14px; text-decoration: underline;
}
.fuss { margin: 16px 0 0; text-align: center; font-size: 12px; }
.fuss a, .haken a { color: var(--leise); }
.karte label { margin-top: 10px; }
.haken { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.haken input { width: 20px; height: 20px; margin: 0; flex: none; }
.fehlertext { margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: rgba(160, 50, 40, 0.35); font-size: 14px; }
.reiter { display: flex; gap: 6px; margin-bottom: 10px; }
.reiter button {
  flex: 1; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 700;
  background: transparent; color: var(--leise); border: 1px solid var(--rand);
}
.reiter button.an { background: rgba(232, 195, 106, 0.14); color: var(--gold); border-color: var(--gold); }

/* ------------------------------------------------------------ Statistik -- */
.karte.breit { max-width: 520px; }
.karte h3 { margin: 20px 0 6px; font-size: 16px; color: var(--gold); }
.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.kacheln div { padding: 12px 6px; text-align: center; border: 1px solid var(--rand); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.kacheln b { display: block; font-size: 24px; color: var(--gold); }
.kacheln span { font-size: 12px; color: var(--leise); }
table.stat th, table.stat td { font-size: 13px; padding: 6px 5px; white-space: normal; max-width: none; }
table.stat td:first-child, table.stat th:first-child { width: auto; color: var(--text); font-weight: 600; }
.vergleiche, .letzte { list-style: none; margin: 0; padding: 0; }
.vergleiche li, .letzte li { padding: 10px 0; border-bottom: 1px solid var(--rand); }
.kopf { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.kopf span { font-size: 12px; color: var(--leise); text-align: right; }
/* Balken: goldener Teil = so oft lag ich vorn */
.balken { height: 8px; margin: 7px 0 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--gold); }
.zahlen { display: flex; justify-content: space-between; font-size: 12px; color: var(--leise); }
.zahlen b { color: var(--text); }
.teile { margin-top: 4px; font-size: 12px; color: var(--leise); }
.neben.klein { padding: 9px; font-size: 13px; color: var(--leise); }

/* ============================================================ Breite Bildschirme == */
/* Statistik-Karte auch breiter auf Desktop */
@media (min-width: 600px) {
  #statistik .karte.breit { max-width: 680px; }
}
@media (min-width: 900px) {
  #statistik .karte.breit { max-width: 800px; }
}

/* Warteraum und Einstellungen ebenfalls etwas breiter */
@media (min-width: 600px) {
  #warteraum .karte { max-width: 580px; }
}

/* ============================================================ Modus-Wahl ==
   Dreistufiger Flow: Spielwahl → Runden → Modus
   ============================================================ */


/* Spiel-Popup und Modus-Wahl */
.spielPopup { max-width: 420px; text-align: center; }
.spielPopup .rundenwahl { margin-top: 16px; }
.spielPopup .haupt { margin-top: 16px; }
.spielPopup .neben { margin-top: 8px; display: block; width: 100%; }

.modusWahl { max-width: 520px; text-align: center; }
.modusKarten {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px;
}
@media (max-width: 480px) { .modusKarten { grid-template-columns: 1fr; } }

.modusKarte {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 12px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--rand);
  color: var(--text); transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.modusKarte:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: rgba(232, 195, 106, 0.08);
}
.modusIcon { font-size: 32px; }
.modusKarte b { font-size: 15px; }
.modusKarte span:last-child { font-size: 12px; color: var(--leise); }

.zurueck { margin-top: 14px; display: block; width: 100%; text-align: center; }

/* ============================================================ Wartescreen == */
.warteAnimation { margin: 20px 0 10px; }
.wartePunkte { display: flex; gap: 12px; justify-content: center; }
.wartePunkte span {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); opacity: 0.3;
  animation: wartePuls 1.4s ease-in-out infinite;
}
.wartePunkte span:nth-child(2) { animation-delay: 0.2s; }
.wartePunkte span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wartePuls {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* ==========================================================================
   Startseite – „Kartentisch"
   Idee: Man schaut auf einen Spieltisch. Oben die Holzkante, darunter grüner
   Filz, und jedes Spiel liegt als cremefarbene Spielkarte darauf. Die vier
   Kategorien tragen die vier Kartenfarben (Pik, Karo, Kreuz, Herz).
   Farben: Filzgrün, Kartencreme, Kartenrot, Tintenschwarz, Messing (--gold).
   ========================================================================== */
:root {
  --filz: #14573f;
  --filzTief: #082a1e;
  --creme: #f7f0df;
  --tinte: #1d1b19;
  --rot: #b3261e;        /* Herz und Karo auf heller Karte */
  --rotHell: #ff9d8f;    /* dasselbe Rot auf dunklem Filz – sonst zu dunkel zum Lesen */
  --holz: #4a2b19;
  /* Titelschrift mit Serifen (wie auf Spielkarten). Nur Schriften, die auf
     den Geräten schon da sind – nichts wird nachgeladen. */
  --titel: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

/* Die Startseite füllt den ganzen Bildschirm und rollt als Ganzes (kein
   Kasten in der Mitte mehr). Das feine Rauschen macht aus der Fläche Filz. */
#start, #statistik {
  align-items: flex-start; padding: 0; backdrop-filter: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E"),
    radial-gradient(120% 75% at 50% 0%, #1f7354 0%, var(--filz) 36%, #0d3d2c 70%, var(--filzTief) 100%);
}
/* Kleine Fenster, die auch in #start stehen (Einladung per Link, "in anderem
   Fenster geöffnet"), bleiben mittig. */
#start > .karte { margin: auto; width: calc(100% - 28px); }

.startSeite { width: 100%; min-height: 100%; display: flex; flex-direction: column; }
.startInnen { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ------------------------------------------------------------ Holzkante -- */
.startKopf {
  flex: none; padding-top: var(--oben);
  background: linear-gradient(180deg, #62391f 0%, var(--holz) 55%, #3a2012 100%);
  border-bottom: 2px solid #c9a24f;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.startKopf .startInnen { display: flex; align-items: center; gap: 8px; height: 56px; }
.logo { display: flex; align-items: center; gap: 9px; font: 700 21px/1 var(--titel); color: var(--creme); letter-spacing: 0.3px; }
/* Kleine schräge Karte als Zeichen */
.logo i {
  display: grid; place-items: center; width: 23px; height: 31px; rotate: -9deg;
  background: var(--creme); color: var(--tinte); border-radius: 4px;
  font: normal 16px/1 Georgia, serif; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}
.kopfKnopf {
  padding: 9px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: rgba(0, 0, 0, 0.25); color: var(--creme); border: 1px solid rgba(247, 240, 223, 0.32);
  font-size: 13.5px; font-weight: 600;
}
.kopfKnopf.hell { background: var(--creme); color: var(--tinte); border-color: var(--creme); }

/* ------------------------------------------------------------ Begrüßung -- */
.hero { display: flex; flex-direction: column; gap: 6px; padding: 18px 0 8px; }
.heroText { min-width: 0; }
.heroOben { margin: 0 0 6px; color: var(--gold); font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { margin: 0; font: 700 clamp(31px, 5.4vw, 58px)/1.04 var(--titel); color: var(--creme); letter-spacing: -0.01em; text-wrap: balance; }
.heroUnter { margin: 10px 0 0; max-width: 34em; color: rgba(247, 240, 223, 0.82); font-size: 15.5px; line-height: 1.5; }

.nameZeile { margin-top: 16px; max-width: 360px; color: rgba(247, 240, 223, 0.82); font-size: 13px; font-weight: 600; }
.startSeite input {
  background: rgba(0, 0, 0, 0.3); color: var(--creme);
  border: 1px solid rgba(247, 240, 223, 0.3); border-radius: 12px;
}
.startSeite input::placeholder { color: rgba(247, 240, 223, 0.45); }
.startSeite input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 195, 106, 0.28); }
/* Name fehlt: Feld rot umranden, bis getippt wird */
.startSeite input.fehlt { border-color: var(--rotHell); box-shadow: 0 0 0 3px rgba(255, 157, 143, 0.3); }

.haupt.gross {
  width: 100%; max-width: 360px; margin-top: 14px; padding: 16px 22px; font-size: 17px; border-radius: 14px;
  background: linear-gradient(180deg, #f3d488, var(--gold) 55%, #d2a94a);
  box-shadow: 0 2px 0 #9c7a2b, 0 10px 24px rgba(0, 0, 0, 0.38);
}
.haupt.gross:active { translate: 0 2px; box-shadow: 0 0 0 #9c7a2b, 0 6px 14px rgba(0, 0, 0, 0.38); }

.codeEingabe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; max-width: 360px; }
.codeEingabe label { flex: 1 1 100%; color: rgba(247, 240, 223, 0.82); font-size: 13px; font-weight: 600; }
.codeEingabe input {
  flex: 1; min-width: 0; margin: 0; padding: 11px 10px; text-align: center;
  text-transform: uppercase; letter-spacing: 5px; font-weight: 700; font-size: 17px;
}
.codeEingabe input::placeholder { letter-spacing: 5px; font-weight: 400; }
.codeEingabe .neben { flex: none; width: auto; margin: 0; padding: 12px 18px; color: var(--creme); border-color: rgba(247, 240, 223, 0.4); }

/* Kartenfächer: fünf Karten, um einen Punkt unter dem Fächer gedreht */
.faecher { position: relative; order: -1; height: 104px; margin: 0 auto 16px; width: 240px; --kb: 62px; --kh: 88px; }
.fk {
  position: absolute; left: 50%; bottom: 4px; width: var(--kb); height: var(--kh); margin-left: calc(var(--kb) / -2);
  --w: calc((var(--i) - 2) * 14deg);
  transform-origin: 50% 150%; transform: rotate(var(--w));
  background: linear-gradient(160deg, #fffaf0, #f1e7d0); color: var(--tinte);
  border-radius: calc(var(--kb) * 0.09); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), -3px 6px 14px rgba(0, 0, 0, 0.35);
  font-family: Georgia, "Times New Roman", serif;
  animation: faechern 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i) * 70ms + 100ms);
}
.fk.rot { color: var(--rot); }
.fk b { position: absolute; left: 9%; top: 6%; text-align: center; font-size: calc(var(--kb) * 0.21); line-height: 1; }
.fk span { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--kb) * 0.6); }
@keyframes faechern { from { transform: rotate(0deg) translateY(26px); opacity: 0; } }

/* Hinweis auf ein laufendes Spiel */
.zurueckHinweis {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 16px; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--gold); color: var(--creme); font-weight: 600;
}
.zurueckHinweis .haupt { width: auto; margin: 0; padding: 10px 16px; white-space: nowrap; }

/* ------------------------------------------------------------ Abschnitte -- */
.abschnitt { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font: 700 21px/1.2 var(--titel); color: var(--creme); }

/* Offene Tische */
.live { width: 10px; height: 10px; border-radius: 50%; background: #6ee7a0; flex: none; animation: livePuls 1.8s ease-out infinite; }
@keyframes livePuls { 0% { box-shadow: 0 0 0 0 rgba(110, 231, 160, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(110, 231, 160, 0); } }
.lobbyListe { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.lobbyEintrag {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer;
  background: rgba(0, 0, 0, 0.28); color: var(--creme); border: 1px solid rgba(232, 195, 106, 0.5); border-radius: 14px;
}
.lobbyDetails { flex: 1; min-width: 0; }
.lobbyDetails b { display: block; font: 700 16px/1.2 var(--titel); }
.lobbyDetails span { display: block; margin-top: 3px; font-size: 12.5px; color: rgba(247, 240, 223, 0.75); }
.lobbyJoin { flex: none; padding: 8px 13px; border-radius: 999px; background: var(--gold); color: #2a1e05; font-size: 13px; font-weight: 700; }
.lobbyLeer, .spielsucheLeer { margin: 18px 0 0; color: rgba(247, 240, 223, 0.78); font-size: 14px; line-height: 1.5; max-width: 40em; }

/* ---------------------------------------------------- Suche und Reiter -- */
/* Bleibt beim Rollen oben stehen: So kann man mitten in der Liste suchen. */
.suchLeiste {
  position: sticky; top: 0; z-index: 2; margin: 0 -16px; padding: 10px 16px;
  background: rgba(10, 51, 37, 0.94);
}
.spielsuche.spielsuche {
  margin: 0; padding: 13px 16px 13px 44px; border-radius: 999px; font-size: 16px;
  background: rgba(0, 0, 0, 0.32) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7f0df' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") 15px 50% / 19px no-repeat;
}
.kategorien { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.kategorien::-webkit-scrollbar { display: none; }
.katTab {
  flex: none; padding: 9px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: rgba(0, 0, 0, 0.22); color: var(--creme); border: 1px solid rgba(247, 240, 223, 0.3);
  font-size: 13.5px; font-weight: 600;
}
.katTab i { margin-right: 6px; font: normal 15px/1 Georgia, serif; }
.katTab.rot i { color: var(--rotHell); }
.katTab.an { background: var(--creme); color: var(--tinte); border-color: var(--creme); }
.katTab.an.rot i { color: var(--rot); }

/* ---------------------------------------------------------- Spielkarten -- */
.spiele { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin-top: 14px; }
.spielKachel {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 204px; padding: 14px 14px 13px; text-align: left; cursor: pointer;
  background: linear-gradient(160deg, #fffaf0 0%, #f3ead6 100%); color: var(--tinte);
  border: 0; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 8px 18px rgba(0, 0, 0, 0.36);
  transition: box-shadow 0.18s ease;
}
/* Leicht schief, wie hingelegt – nicht wie mit dem Lineal ausgerichtet */
.kachelRahmen:nth-child(3n + 1) { rotate: -0.7deg; }
.kachelRahmen:nth-child(3n + 2) { rotate: 0.6deg; }
/* Feine Innenlinie wie bei echten Spielkarten */
.spielKachel::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(29, 27, 25, 0.13); border-radius: 9px; pointer-events: none; }
.spielKachel .ecke { position: absolute; top: 12px; right: 14px; font: 19px/1 Georgia, serif; }
.spielKachel .marke { font: 700 46px/1 var(--titel); letter-spacing: -0.02em; min-height: 46px; }
.spielKachel.rot .ecke, .spielKachel.rot .marke { color: var(--rot); }
.spielKachel b { margin-top: 10px; font: 700 18px/1.15 var(--titel); }
.spielKachel .kurz {
  margin-top: 5px; font-size: 12.5px; line-height: 1.38; color: #554d40;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}
.spielKachel .spielerzahl { margin-top: auto; padding-top: 9px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #6b6151; }
/* Zuletzt gespielt: kleines Messingschild oben an der Karte */
.spielKachel.zuletzt::before {
  content: 'Zuletzt gespielt'; position: absolute; top: -9px; left: 12px; z-index: 1;
  padding: 3px 9px; border-radius: 999px; background: var(--gold); color: #2a1e05;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.spielKachel:active { translate: 0 2px; }
.startSeite button:focus-visible, .startSeite a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) {
  .kachelRahmen:hover { translate: 0 -6px; rotate: 0deg; }
  .spielKachel:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 18px 30px rgba(0, 0, 0, 0.45); }
  .katTab:not(.an):hover, .kopfKnopf:not(.hell):hover { border-color: var(--creme); }
  .lobbyEintrag:hover { border-color: var(--gold); background: rgba(0, 0, 0, 0.4); }
}

/* ----------------------------------------------------------------- Fuß -- */
.startFuss { margin-top: auto; padding: 36px 16px calc(var(--unten) + 22px); text-align: center; font-size: 13px; color: rgba(247, 240, 223, 0.7); }
.startFuss a, .fussKnopf { color: inherit; text-decoration: underline; }
.fussKnopf { background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }

/* Spielkarte in klein, oben im Fenster nach dem Antippen eines Spiels */
.popKarte {
  position: relative; display: grid; place-items: center; width: 76px; height: 106px; margin: 0 auto 14px; rotate: -4deg;
  background: linear-gradient(160deg, #fffaf0, #f1e7d0); color: var(--tinte); border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 10px 22px rgba(0, 0, 0, 0.45);
}
.popKarte.rot { color: var(--rot); }
.popKarte span { font: 700 38px/1 var(--titel); }
.popKarte i { position: absolute; top: 7px; left: 9px; font: normal 15px/1 Georgia, serif; }

/* ------------------------------------------------------ Breitere Geräte -- */
@media (min-width: 560px) { .spiele { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 820px) {
  .startInnen { padding: 0 28px; }
  .suchLeiste { margin: 0 -14px; padding: 12px 14px; display: flex; align-items: center; gap: 14px; border-radius: 0 0 18px 18px; }
  .spielsuche.spielsuche { flex: 0 1 340px; width: auto; }
  .kategorien { margin-top: 0; }
  .spiele { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
  .spielKachel { min-height: 222px; padding: 16px 16px 14px; }
  .spielKachel .kurz { font-size: 13px; }
  /* Begrüßung links, Fächer rechts */
  .hero { flex-direction: row; align-items: center; gap: 24px; padding: 44px 0 14px; }
  .heroText { flex: 1; }
  .heroUnter { font-size: 17px; }
  .faecher { order: 0; flex: none; width: 400px; height: 270px; margin: 0; --kb: 132px; --kh: 186px; }
  .abschnitt { font-size: 25px; margin-top: 36px; }
}
@media (min-width: 1080px) { .spiele { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Wer Bewegungen am Gerät abgeschaltet hat, bekommt keine */
@media (prefers-reduced-motion: reduce) {
  .fk, .live { animation: none; }
  .spielKachel, .kachelRahmen, .haupt.gross { transition: none; }
}

/* ==========================================================================
   Unterseiten (Statistik, Bestenliste) – derselbe Tisch wie die Startseite.
   Zahlen liegen als cremefarbene Karten auf dem Filz, Tabellen stehen auf
   einem „Spielblock" (helles Blatt), Listen auf dunklen Tafeln.
   ========================================================================== */
.startInnen.schmal { max-width: 780px; padding-bottom: calc(var(--unten) + 36px); }
.seitenTitel { margin: 26px 0 0; font: 700 clamp(28px, 4.6vw, 44px)/1.08 var(--titel); color: var(--creme); overflow-wrap: anywhere; }
.seitenUnter { margin: 8px 0 0; color: rgba(247, 240, 223, 0.82); font-size: 14.5px; line-height: 1.5; }
.seitenFuss { margin: 34px 0 0; text-align: center; font-size: 13px; color: rgba(247, 240, 223, 0.7); }
.unterSeite .fehlertext { color: var(--creme); }

/* Auswahlfeld (Bestenliste: welches Spiel?) */
.filterZeile { margin-top: 18px; max-width: 320px; color: rgba(247, 240, 223, 0.82); font-size: 13px; font-weight: 600; }
.startSeite select {
  background-color: rgba(0, 0, 0, 0.3); color: var(--creme);
  border: 1px solid rgba(247, 240, 223, 0.3); border-radius: 12px;
}
.startSeite select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 195, 106, 0.28); }

/* Drei Zahlen bzw. das Treppchen: je eine Spielkarte */
.zahlKarten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.zahlKarte {
  position: relative; min-width: 0; padding: 18px 8px 14px; text-align: center;
  background: linear-gradient(160deg, #fffaf0 0%, #f3ead6 100%); color: var(--tinte); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 8px 18px rgba(0, 0, 0, 0.36);
}
.zahlKarte:nth-child(1) { rotate: -1deg; }
.zahlKarte:nth-child(3) { rotate: 1deg; }
.zahlKarte b { display: block; font: 700 clamp(26px, 8vw, 44px)/1 var(--titel); letter-spacing: -0.02em; }
.zahlKarte strong { display: block; margin-top: 8px; font: 700 16px/1.2 var(--titel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zahlKarte span { display: block; margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #6b6151; }
/* Platz 1: Messingrand. Eigener Eintrag: „du" hinter dem Namen. */
.zahlKarte.erste { box-shadow: 0 0 0 3px var(--gold), 0 10px 22px rgba(0, 0, 0, 0.42); }
.zahlKarte.erste b { color: var(--rot); }
.zahlKarte.ich strong::after { content: ' (du)'; font-weight: 400; }

/* Spielblock: helles Blatt für Tabellen */
.blatt {
  margin-top: 16px; padding: 6px 10px 8px; border-radius: 14px;
  background: linear-gradient(160deg, #fffaf0 0%, #f3ead6 100%); color: var(--tinte);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 8px 18px rgba(0, 0, 0, 0.36);
  user-select: text; -webkit-user-select: text;
}
.abschnitt + .blatt { margin-top: 0; }
.blatt .tabelle { margin-top: 0; }
.blatt th { color: #6b6151; border-bottom: 1px solid rgba(29, 27, 25, 0.2); }
.blatt td, .blatt table.stat td:first-child, .blatt table.stat th:first-child { color: var(--tinte); }
.blatt table.stat th:first-child { color: #6b6151; }
.blatt tbody tr:nth-child(odd) { background: rgba(29, 27, 25, 0.045); }
.blatt td { font-variant-numeric: tabular-nums; }
.blatt tr.ich td { background: rgba(232, 195, 106, 0.45); font-weight: 700; }
/* Rangliste: Platz und Name links, Zahlen rechts */
table.rangliste td:nth-child(2), table.rangliste th:nth-child(2) { text-align: left; font-weight: 600; }
table.rangliste td:first-child, table.rangliste th:first-child { width: 52px; font-weight: 400; color: #6b6151; }

/* Dunkle Tafel für Listen und Hinweise */
.tafel {
  list-style: none; margin: 0; padding: 4px 16px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(247, 240, 223, 0.18); color: var(--creme);
  user-select: text; -webkit-user-select: text;
}
.tafel li { border-bottom-color: rgba(247, 240, 223, 0.14); }
.tafel li:last-child { border-bottom: 0; }
.tafel .kopf span, .tafel .teile, .tafel .zahlen { color: rgba(247, 240, 223, 0.72); }
.tafel .zahlen b { color: var(--creme); }
.tafel.leer { margin-top: 20px; padding: 16px; font-size: 14.5px; line-height: 1.5; }
.abschnitt + .tafel.leer { margin-top: 0; }
/* Letzte Partien: vorn der Platz, Sieg in Messing */
.mitPlatz { display: flex; align-items: center; gap: 12px; }
.mitPlatz > div { flex: 1; min-width: 0; }
.platz {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(247, 240, 223, 0.12); color: var(--creme); font: 700 16px/1 var(--titel);
}
.platz.sieg { background: var(--gold); color: #2a1e05; }

/* ==========================================================================
   Kleine Fenster (Konto, Spielwahl, Modus, Warteraum, Punkte, Regeln):
   gleiche Familie – Filzgrün mit Messingrand, Überschriften in der
   Titelschrift. Gilt überall, auch am Tisch, damit alles zusammenpasst.
   ========================================================================== */
.fenster { background: rgba(4, 20, 14, 0.62); }
.karte {
  background: linear-gradient(180deg, #17553f 0%, #0d3628 100%);
  border-color: rgba(201, 162, 79, 0.6);
}
.karte h1, .karte h2, .karte h3 { font-family: var(--titel); }
.karte h2 { font-size: 24px; color: var(--creme); }
.karte input, .karte select { background-color: rgba(0, 0, 0, 0.3); border-color: rgba(247, 240, 223, 0.28); }
.karte input:focus, .karte select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 195, 106, 0.25); }
.unter, .klein, .karte label { color: rgba(247, 240, 223, 0.78); }
.neben { border-color: rgba(247, 240, 223, 0.32); }
/* Reiter Anmelden / Konto anlegen: der gewählte ist die helle Karte */
.reiter button { color: var(--creme); border-color: rgba(247, 240, 223, 0.3); }
.reiter button.an { background: var(--creme); color: var(--tinte); border-color: var(--creme); }

/* Modus-Wahl: drei Spielkarten zum Antippen */
.modusKarte, .modusKarte:hover {
  background: linear-gradient(160deg, #fffaf0 0%, #f3ead6 100%); color: var(--tinte); border: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 8px 18px rgba(0, 0, 0, 0.36);
}
.modusKarte b { font: 700 17px/1.2 var(--titel); }
.modusKarte span:last-child { color: #554d40; }
.modusKarte:nth-child(1) { rotate: -1deg; }
.modusKarte:nth-child(3) { rotate: 1deg; }
@media (hover: hover) { .modusKarte:hover { translate: 0 -4px; rotate: 0deg; transform: none; } }
@media (max-width: 480px) { .modusKarte { rotate: 0deg !important; flex-direction: row; text-align: left; gap: 12px; padding: 14px 16px; } .modusKarte b { flex: none; } .modusKarte span:last-child { margin-left: auto; text-align: right; } }

/* Letzte Partien: Spielname nie umbrechen, die Angaben dürfen darunter rutschen */
.mitPlatz .kopf { flex-wrap: wrap; gap: 2px 10px; }
.mitPlatz .kopf b { white-space: nowrap; }
.mitPlatz .kopf span { text-align: left; }
.haken span { flex: 1; }
.karte .haken a { color: var(--creme); }

/* ==========================================================================
   Neu am 21.11.: Favoriten, Tages-Duell, Online-Zahl, Abzeichen, App-Hinweis
   ========================================================================== */

/* Rahmen um Spielkarte und Stern. Der Stern ist ein eigener Knopf NEBEN der
   Karte (nicht in ihr) – ein Knopf im Knopf wäre ungültig und für
   Vorleseprogramme nicht bedienbar. */
.kachelRahmen { position: relative; display: flex; min-width: 0; transition: translate 0.18s ease, rotate 0.18s ease; }
.kachelRahmen .spielKachel { flex: 1; width: 100%; }
.kachelRahmen.fav { order: -1; }          /* Favoriten liegen vorn */
.stern {
  position: absolute; right: 5px; bottom: 3px; z-index: 1; width: 42px; height: 42px;
  display: grid; place-items: center; background: none; border: 0; cursor: pointer;
  color: #a2967f; font: 21px/1 Georgia, serif;
}
.kachelRahmen.fav .stern { color: #b0801f; }
.spielKachel .spielerzahl { padding-right: 34px; }   /* Platz für den Stern */
@media (hover: hover) { .stern:hover { color: #b0801f; } }

/* Online-Zahl unter der Begrüßung */
.onlineZeile { display: flex; align-items: center; gap: 9px; margin: 12px 0 0; color: var(--creme); font-size: 13.5px; font-weight: 600; }

/* Tages-Duell: Tafel mit Messingrand */
.duellTafel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 20px; padding: 16px;
  border-radius: 16px; border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.2));
}
.duellTafel .popKarte { flex: none; width: 58px; height: 82px; margin: 0; }
.duellTafel .popKarte span { font-size: 28px; }
.duellTafel .popKarte i { top: 5px; left: 7px; font-size: 13px; }
.duellText { flex: 1 1 200px; min-width: 0; }
.duellText .heroOben { margin: 0 0 3px; }
.duellText b { display: block; font: 700 23px/1.15 var(--titel); color: var(--creme); }
.duellText span { display: block; margin-top: 5px; font-size: 13.5px; line-height: 1.45; color: rgba(247, 240, 223, 0.82); }
.duellKnoepfe { display: flex; gap: 8px; flex: 1 1 100%; }
.duellKnoepfe button { flex: 1; width: auto; margin: 0; padding: 12px 14px; white-space: nowrap; }
.duellKnoepfe .neben { color: var(--creme); }
@media (min-width: 820px) { .duellKnoepfe { flex: none; } .duellTafel { padding: 18px 22px; } }
.spielPopup .heroOben { margin: 0 0 8px; }

/* Abzeichen in der Statistik: geschafft = helle Karte, offen = gestrichelt */
.abschnitt small { margin-left: auto; font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: rgba(247, 240, 223, 0.72); }
.abzeichen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.abz {
  position: relative; padding: 12px 30px 12px 13px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.22); border: 1px dashed rgba(247, 240, 223, 0.3); color: rgba(247, 240, 223, 0.72);
}
.abz b { display: block; font: 700 15px/1.2 var(--titel); }
.abz span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; }
.abz i { position: absolute; top: 10px; right: 11px; font: normal 16px/1 Georgia, serif; }
.abz.hat {
  border: 0; color: var(--tinte); background: linear-gradient(160deg, #fffaf0 0%, #f3ead6 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 6px 14px rgba(0, 0, 0, 0.32);
}
.abz.hat span { color: #554d40; }
.abz.hat i { color: #b0801f; }

/* Hinweis "als App installieren" unter den Spielen */
.installKasten {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; padding: 14px 16px;
  border-radius: 14px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(247, 240, 223, 0.18); color: var(--creme);
}
.installKasten > div { flex: 1 1 220px; min-width: 0; }
.installKasten b { display: block; font: 700 17px/1.2 var(--titel); }
.installKasten span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: rgba(247, 240, 223, 0.8); }
.installKasten .haupt { flex: none; width: auto; margin: 0; padding: 12px 18px; }

/* Kopfzeile am Tisch: Seit dem Ton-Knopf sind es fünf runde Knöpfe. Auf
   schmalen Handys (360 px) brach "Runde 1 / 10" deshalb in zwei Zeilen um. */
.chip { white-space: nowrap; }
/* Der Runden-Chip darf schrumpfen (langer Spielname im Tages-Duell): Dann
   endet der Text mit "…", statt die Knöpfe rechts aus dem Bild zu schieben. */
#rundeChip { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#leiste .rund { flex: none; }
@media (max-width: 430px) {
  /* Mit dem Pause-Knopf sind es sechs runde Knöpfe: enger stellen. */
  #leiste { gap: 5px; }
  .rund { width: 34px; height: 34px; font-size: 14px; }
  .chip { padding: 7px 11px; font-size: 13px; }
}
